[gdal-dev] Need help in writing aux.xml (pam) using cpp

Christian Rapp crappbytes at gmail.com
Wed Jan 2 05:59:37 PST 2013


Hello altogether and happy new year,


I just started using the GDAL c++ interface. I want to create float32
based GEoTiffs. This works quite well but in ArcMap they don't look that
good because Statistics are missing.

So first of all I called GetStatistics() Method from a Standard
GDALDataset. This had no effect, at least ArcMap stilled complained
about missing statistics. Then I switched to GDALPamDataset and
GDALPamRasterBand and tried the same method again. Using the exiftool
from Phil Harvey I see the statistics were written in the GDALMetadata
section Even Esri recognizes this. Ok even better but why don't I get
this values in an external aux.xml file?
Right now I just call GetStatistics() right before GDALClose().

I also had a look at code of the gdalinfo tool. Because gdalinfo -stat
creates what I want. But I don't see anything what could help me.

Best regards
Christian Rapp


More information about the gdal-dev mailing list