[gdal-dev] Computing statistics from raster dataset without writing aux.xml
Laurențiu Nicola
lnicola at dend.ro
Mon Oct 10 05:40:55 PDT 2022
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
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221010/711a4e61/attachment.htm>
More information about the gdal-dev
mailing list