I don’t know why after I save my bandmath for the water extraction in either geotiff or dim, the boundary between water and image background is gone! This causes that the water binary values change from 1 to 255 while the image background gets a value from NaN to 255! This is like all the background now is water as well!
which NoData value did you select in the band properties?
I didnt select any Nodata. The image background is already No Data from the beginning which is normal. But after saving the bandmath as geotiff, the boundary between the water bodies (shown above) and background is gone, so that image background gets a new value of 255 (8bit tiff) the same as water bodies! This is like all background is water now!
As you see, after bandmath in geotiff, the water boundary is gone, and background gets a value of 255.
can you please open the layer properties in SNAP and see if there is “use nodata value” checked?
You can select any value which is not present in the image and set it to nodata. Then check “use nodata value” and save the changes via File > save product. If you export the layer subsequently, there should be only the background remaining as 255.
Thanks for your reply. I think I am missing sth. Plz correct me if I ve got it wrong:
I have an input image that I wanna do the bandmath on, and then save it as geotiff.
Properties > uncheck “No-data value used” first (by default its checked), and change the “No data value” (by default 0) to sth like 9999, now again Check “No data value used”. Close
File> Save Product. And now Export > Geotiff.
Should I do this change on the "input image" or on the “bandmath image” that already got the value issue for the background?
- open the input image
- switch to the pixel info tab
- move your mouse over the boundaries to see which values are there
- enter this value in the properties of the input image as nodata, select usage of nodata
- do the band math
- if the boundaries are not included in the result: export to GeoTiff
please don’t create duplicate topics over the same issue.