Re: using NaN as no-data value
Even Rouault via gdal-dev <[email protected]>
| Newsgroups | gmane.comp.gis.gdal.devel |
|---|---|
| Message-ID | <[email protected]> |
Javier, > I have seen some GeoTIFFs for DSMs (float32) with NaN as no-data > value. It was not set in the metadata, but worked as that. Most (I wouldn't claim "all") code in GDAL that does no-data checking does for floating point values "if (std::isnan(pixel_val) || pixel_val == nodata)", so yes, even when not advertized as the band nodata value, a NaN pixel will be deal as it > I think I have also seen it with NaN set in the metadata. > Also many other numbers as no-data value, like -10000 or -9999 or > -8888 (yes, and many other posible values). > > Is there any reason to prefer or discourage NaN as a no-data value for > a float32 GeoTIFF? If you are curious there is a 10 page essay on that topic on https://docs.ogc.org/per/24-040r1.html#Geomatys_contribution_misconceptions_about_NaN . Personnally that didn't help me to draw a conclusion on your question. Maybe except that both suck in different ways. Even -- http://www.spatialys.com My software is free, but my time generally not. _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev