[gdal-dev] aux.xml files

Frank Warmerdam warmerdam at pobox.com
Tue Jan 20 11:28:30 EST 2009


Chris Padwick wrote:
> Howdy,
> 
>  
> 
> I’m using gdal 1.5.2.  Every time I call GDALRasterBand::GetHistogram() 
> gdal generates a file with the same name as the image and the extension 
> .aux.xml.  This file appears to contain a band by band image histogram 
> along with some other information.  On subsequent calls, using the same 
> image, gdal appears to be finding the .aux.xml file and reading the 
> stats from the file rather than computing them from scratch.
> 
> I understand the rationale for the behavior but it is causing problems 
> for me.  How can I disable creation of these files, and/or force 
> computation of the stats from scratch every time?

Chris,

You can disable creation of .aux.xml files entirely by setting the
GDAL_PAM_ENABLED configuration variable to the value NO.  The most
common way to do this is in the environment.

eg.

set GDAL_PAM_ENABLED=NO

(on windows)

There are Compute function variants for getting band statistics, and
min/max but I can't seem to find one for histograms.  There ought to
be one.  If you file a ticket, I can add one in trunk if that is helpful.

Of course, you can just write your own histogram computation code.

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