>> a) Why does gdalinfo not report the presence of nan? Meaning: how do I know >> when I will need to invoke (b)? > >It doesn't report nan as the nodata value, because the file lacks the >GDAL_NODATA tiff tag set at "nan". So the issue is on the producer side.
Ok, noted. I will try trace this backward and report there. >> b) What do I need to do so that applications will use nan as nodata? > > gdalwarp -dstnodata nan ... > >or if you want to remap nan to some other value > > gdalwarp -dstnodata -9999 ... Wonderful, thank you. >In most cases, you'd need to explicitly add the srcnodata value with >-srcnodata nan , but nan is a special case. When gdalwarp finds a pixel >at NaN value, be it the declared nodata value or not, it assumes this is >nodata, hence you can omit -srcnodata nan. Wouldn't be true if 0 or some >other value was the undeclared nodata value. Hmmm. Part of me expects gdalwarp to then record it found and used undeclared nodata by setting the "nodata=nan" in the metadata. Regardless thanks for this important detail. -Matt _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev