Hi Mats,

This won't help you, but I wanted to suggest you make a temporary directory, 
copy the .aux.xml file there, then set GDAL_PAM_PROXY_DIR. Unfortunately, at 
least in my test, GDAL still seems to save the file next to the input, even 
when calling SetConfigOption before doing anything else.

Regards,
Laurentiu

On Mon, Oct 10, 2022, at 13:11, Budalen, Mats Bruun via gdal-dev wrote:
> Hello!
>  
> I’m writing a Python program which reads raster data. The program uses the 
> *ComputeStatistics()* function on the dataset, which automatically attempts 
> to write the result to an .aux.xml next to the raster file. I do not under 
> any circumstance want to try to write to the source directory, so I have set 
> *gdal.SetConfigOption('GDAL_PAM_ENABLED','NO')* before I open the dataset.
>  
> My program will sometimes come across datasets where the SRS is only defined 
> in an aux.xml. Unfortunately, the above ConfigOption prevents the SRS 
> definition from being read from the aux.xml.
>  
> Is there any way to compute statistics without creating/changing the aux.xml, 
> while at the same time reading the SRS?
>  
>  
> Regards,
>  
> Mats Budalen
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to