lmotta / ibamaprocessing

Processing tools for QGIS
GNU General Public License v2.0
4 stars 0 forks source link

enhancement - native NoData handling #1

Closed thareUSGS closed 4 years ago

thareUSGS commented 4 years ago

First off -great tool. But, if possible to implement, I would like to request a couple enhancements.

  1. I noticed the default behavior for handling NoData is to force the user to define a value even if there is a NoData value already defined in the image's metadata (label). While I really like the option for the user to define (or even override) the NoData value, having an option to simply use the pre-defined internal NoData would be valuable.

  2. Often I also like to create footprints for non-integer data like elevation models (which often use a floating point bit type). Thus their internally set NoData value is something like -3.40282e+38. The current input type only supports integers.

Now in my case solving (1) would alleviate the need to support floating point values within the IBAMA GUI interface. This again just means letting the internally set NoData value be used instead of the need for the user to define any NoData value.

If you need a file to test, here is a cropped 32bit GeoTIFF of a larger elevation model (DEM).

lmotta commented 4 years ago

Updated version 1.6. Now, the algorithm uses the null data value in the image, if exists. The type of nodata field is double type. Thanks Trent

thareUSGS commented 4 years ago

Wow - thanks for the fast implementation. I have just tested over several folders of different rasters types - all good (even for Mars data).

just some notes:

I agree with picking the NoData value from the first band (even though each band can have different NoData values).

And while I completely agree with using the internally defined NoData as the default, I wonder if someone will want to override the defined NoData value. I would hope that might be rare use-case, but something to think about.

Please close this issue as you see fit. thanks again.

lmotta commented 4 years ago

I agree about is rare a user need overrride the default Nodata of image, if have this value, it define the region without valid pixels.

My first aproach was for use the most common images, how, CBERS and Landsat, in this images, need define the nodata.

Now, it look better for create Footprint with valid pixels, when you have a lot of images with different Nodata values.

Thanks again