[gdal-dev] GDAL 2.3.1 on linux disregarding nodata values
Tom van Tilburg
tom.van.tilburg at gmail.com
Fri Jul 6 05:00:16 PDT 2018
I just did a fresh build of trunk (2.4.0) but noticed 2 issues:
1. The installed version in /usr/local/bin is still version 2.3.1:
> ls /usr/local/bin/gdalinfo -lrth
-rwxr-xr-x 1 root root 40K Jul 6 13:51 /usr/local/bin/gdalinfo
> /usr/local/bin/gdalinfo --version
GDAL 2.3.1, released 2018/06/22
(I did an ldconfig to be sure, but no to avail)
2. The newly build version in the git repo segfaults on:
/var/data/git_repos/gdal/gdal/apps/gdalinfo dem.tif
[..snip..]
Origin = (171950.000000000000000,437050.000000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
ERROR 1: illegal axis orientation combination
Upper Left ( 171950.000, 437050.000)
ERROR 1: illegal axis orientation combination
Lower Left ( 171950.000, 435950.000)
ERROR 1: illegal axis orientation combination
Upper Right ( 173050.000, 437050.000)
ERROR 1: illegal axis orientation combination
Lower Right ( 173050.000, 435950.000)
ERROR 1: illegal axis orientation combination
Center ( 172500.000, 436500.000)
Segmentation fault (core dumped)
Since there is a second version of proj on the system, I have used
./configure --with-static-proj4
Thanks for dealing with this.
Best,
Tom
On Fri, Jul 6, 2018 at 12:14 PM, Even Rouault <even.rouault at spatialys.com>
wrote:
> On jeudi 5 juillet 2018 14:22:16 CEST Tom van Tilburg wrote:
> > I have a fresh gdal 2.3.1 build on a ubuntu 17.10 that tells me:
> > > gdalinfo dem.tif -stats -mm
> >
> > [..snip...]
> > Band 1 Block=2200x1 Type=Float32, ColorInterp=Gray
> > Min=-2.233 Max=340282346638529993179660072199368212480.000 Computed
> > Min/Max=-2.233,340282346638528859811704183484516925440.000
> > Minimum=-2.233, Maximum=340282346638529993179660072199368212480.000,
> > Mean=42029510023671999325552505715632898048.000,
> > StdDev=111961692493879995008202507419807383552.000
> > NoData Value=3.40282346638529011e+38
> > Metadata:
> > STATISTICS_MAXIMUM=3.4028234663853e+38
> > STATISTICS_MEAN=4.2029510023672e+37
> > STATISTICS_MINIMUM=-2.2330000400543
> > STATISTICS_STDDEV=1.1196169249388e+38
>
> ok, the issue is that nodata value (stored as text in GeoTIFF) is slightly
> above the maximum value of a float32. Presumably due to rounding issues
> when
> formatting it. I've pushed a fix to detect that situation and clamp it to
> the
> max value of float32. A bit strange that the issue wasn't found on Windows
> though.
>
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180706/8c4a169e/attachment.html>
More information about the gdal-dev
mailing list