Ticket #3573 (closed defect: fixed)
gdalinfo -stats and numeric imprecision on dataset with nodata
|Reported by:||maphew||Owned by:||rouault|
When I run gdalinfo -stats on a 32bit 1-band tiff (elevation model) it renders the image unviewable in Arcmap 9.3.1sp1. Arccatalog & Arcmap report all the usual info as for as datatype presence of pyramids and so on, it just draws as white. There is no error message.
Before calculating statistics Arcmap reports high/low values in the form of:
High : 3.40282e+038 Low : 1.17549e-038
and after gdalinfo -stats it becomes:
High : 1952.5 Low : -3.40282e+038
After playing with Arcmap symbology and using contrast stretch, std devations, etc. The Low changes to:
Low : -340282346638529990000000000000000000000.000000
Arccatalog reports NoData: -3.4028235e+038
The raster can be made to display by instructing Arcmap to use "Stretched>Min/Max?>Edit-High-Low" and change the bottom end to the real minimum value, or at least 0. This is not a real solution as it's only good for that particular Arcmap session. Deleting the "foobar.tif.aux.xml"works better.
Using ArcGIS to calulate statistics on the same file after deleting .aux.xml reveals the true min/max statistics:
High : 580.340637 Low : 213.000000
I'm using GDAL 1.7.0dev, released 2008/11/26 on Windows7 x64 via OSGeo4w.