[GRASS-dev] Re: [GRASS GIS] #73: r.out.gdal tiff output does not
work
Glynn Clements
glynn at gclements.plus.com
Wed Apr 22 18:13:37 EDT 2009
Markus Metz wrote:
> > - all floating point: IEEE's NaN
>
> Problem with NaN? According to IEEE 754, x == y is always FALSE if
> either x or y or both are NaN. Assuming (nodata =
> GDALGetRasterNoDataValue()) == NaN, then going through all cells if
> (cell == nodata) will always be FALSE, nodata cells may not be detected?
> Depends on each implementation of nodata detection? Can be solved for
> GRASS, but how is this done in all other GIS applications?
if (x == nodata || isnan(nodata) && isnan(x))
isnan() is C99 and POSIX, or it can be defined as e.g.:
#define ISNAN(x) ((x) != (x))
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list