[gdal-dev] java Dataset.GetRasterBand(i).ComputeRasterMinMax not working for float data

Ari Jolma ari.jolma at gmail.com
Sat Jan 28 03:59:28 PST 2017


28.01.2017, 13:45, Even Rouault kirjoitti:
>
> > Computed Min/Max=-340282306073709650000000000000000000000.000,2282.341
>
> > NoData Value=-3.4028229999999999e+038
>
> >
>
> >
>
> I've pushed a fix for that in
>
> https://trac.osgeo.org/gdal/changeset/37229
>

IMO it is not a good idea to use Inf's or such as no data values since 
comparisons of floating point values are non-reliable. I've hit this in 
the case where I set raster data from GDAL raster to a piddle in PDL 
(comparable to NumPy in Python world) for raster algebra. I didn't find 
a good solution then - I'll need to examine this changeset more and see 
if it provides a good solution to the problem.

Thanks,

Ari

> -- 
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170128/0bc19494/attachment.html>


More information about the gdal-dev mailing list