GeoscienceAustralia / dea-cogger

Convert NetCDFs to Cloud Optimized GeoTIFFs
15 stars 4 forks source link

Patch cog conversion app #28

Closed santoshamohan closed 5 years ago

santoshamohan commented 5 years ago

Reason for pull request

Some of the bands within the source datasets had None as the no data value. Additional check within the code is required to ensure that nodata_mask is updated to a value 255 for a negative integer values only.

Also, the files referenced within qsub-cog app is relative meaning the same app does not work as expected when we run the qsub-cog command from a different directory. To solve this, make all the file references within the app as absolute.

Proposed solution

  1. Update nodata_mask to a value 255 only when we have negative band value.
  2. Make changes to glob the relative pattern for *.tif or *.TIF files and *.nc or *.NC files.
  3. Update all file references as absolute.