I ran GLCM on a NASA MODIS Aqua Level 2 chlor_a band using the SNAP GUI. The generated bands appear to use -32767.0 for ``No Data Value’’ but properties have it set to 0.0.
in the properties, you can only change the definition of the NoData value (what pixel value is shown transparently by SNAP). Setting another value does not reclassify existing values.
You have two options
- reclassify the output: -32767 to 0
- define 0 as NoData in the input product and repeat the GCLM (haven’t tested but should propagate how NoData values are written in the outputs).
I have been changing the “No data value” in properties (otherwise the image views are useless), but GCLM generates multiple output bands (I usually get interrupted before I’m finished; in classroom setting pre-COVID-19 results in students checking their phones). The values in the output bands are not in the same units as the input, so GCLM shouldn’t propagate the “No data value” of the input bands but instead supply a value appropriate to the output data.
I see, thank you for the explanation.
Is reclassification in the band maths an option?
IF texture = -32676 THEN 0 ELSE texture
Ideally, algorithms should set an appropriate no-data value when the computed product has different units/scale from the input. For teaching, reclassification might be a way to add interest by introducing band maths.
As the textures are probably stored as 16 bit signed integer, the only reasonable NoData values is negative one because 0 is a valid output of the GLCM.