[GRASS-user] cannot write raster w/ max = inf

Markus Metz markus.metz.giswork at gmail.com
Sat Nov 11 03:49:55 PST 2017


On Sat, Nov 11, 2017 at 11:14 AM, Even Rouault <even.rouault at spatialys.com>
wrote:
>
> > inf is a perfectly valid number, meaning infinity. Unfortunately, a test
>
> > for inf is only available with C standard 99, and I don't know of a
manual
>
> > test in C for inf (or -inf) to avoid C 99. The bug is in r.out.gdal, not
>
> > testing for input inf values.
>
>
>
> You could use the CPLIsInf() macro from GDAL's cpl_port.h . It uses
different implementations depending on the platform.

Nice! Thanks for the hint, using it now to test for inf during export.

inf values are now exported with r.out.gdal in trunk and relbr72 (r71665,6).

Markus M

>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20171111/9cd0812f/attachment.html>


More information about the grass-user mailing list