[gdal-dev] Re:

Frank Warmerdam warmerdam at pobox.com
Thu Sep 17 15:58:28 EDT 2009

Jason Roberts wrote:
> Riki,
> Please let us know whether Frank's suggestion works or not. I have been
> experimenting with writing GeoTIFFs using GDAL 1.6.0 and the Python bindings
> and have not been successful so far at using GDAL to calculate statistics
> that ArcGIS recognizes. It would be interesting to know whether this
> suggestion will work.
> If anyone is interested, after creating a GTiff with one band, writing
> values to the band, flushing the cache, I have been calling
>     band.SetStatistics(*band.GetStatistics(False, True))
> and then looking at the resulting file from ArcGIS 9.3.1 (the latest
> version). ArcGIS reports that there are no statistics. I can then calculate
> them with ArcGIS, if desired, but like Riki, it would be useful if I did not
> need to do this.


I notice that if I run gdalinfo -stats from trunk I get the stats written
to the .aux.xml file while I don't from the 1.6 branch.  I think this is
something that has been fixed recently.  I'd suggest working from trunk if
that is at all practical.

If it is important, I could backport some of the statistics retaining
fixes back to 1.6 branch.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the gdal-dev mailing list