Yann Chemin wrote: > it might be that some communication improvement from GRASS-GDAL could be > done? > > is there a clear NODATA/NAN definition understood within GDAL that we could > use within r.out.gdal as a target NODATA value whenever anything than a > number is used (i.e. NaN, nan, -nan, helloworld, mynameisbee, etc.) > > typically MODIS users are used to -28768 and similar "standard" NODATA > numbers, but that maybe another story.
IMHO, anything using NaN as a no-data value should treat all NaNs equally. The reason being that the only way to reliably propagate the representation for a NaN is to memcpy() it. Assignment only preserves NaN-ness, not necessarily the representation. Actually, r.external is doing it wrong, as it expects any NaNs supplied by GDAL to exactly match the representation generated by Rast_set_d_null_value() (the all-ones bit pattern). Fixed in r65602. And if the no-data value isn't NaN, you have the issue of comparing floating-point values for equality. Well, that will probably work so long as the chosen no-data value is an integer. -- Glynn Clements <[email protected]> _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
