Hi David, I'm familiar with the sort of behaviour Javier mentions from using QGIS. Opening some file formats in read-only mode in QGIS (at least, I assume that's what QGIS defaults to if I just view a raster!) will cause "nuisance" .aux.xml sidecar files to be written with band statistics.
Cheers, Daniel On Mon, 3 Nov 2025, 14:20 David Klaus via gdal-dev, < [email protected]> wrote: > Javier, > > That is strange. I could be wrong and maybe someone can weigh in if I am. > But, I believe that aux files are created when you try to write information > about or into the file that can't be stored within the file (for one reason > or another). Are you trying to generate information about the file? Perhaps > a code snippet would help everyone identify the issue? > > On Mon, Nov 3, 2025 at 9:12 AM Javier Jimenez Shaw <[email protected]> > wrote: > >> Thank you David. >> >> Unfortunately I don't want to (a.k.a. cannot) change the original files. >> I don't want to write any type of file in that directory (like the .aux.xml >> files). >> >> (note: I am opening the files in C++ with GDALOpenEx) >> >> >> On Mon, 3 Nov 2025 at 14:45, David Klaus <[email protected]> wrote: >> >>> Hi Javier, >>> >>> I'm not sure if this applies to your use case, but I ran into a similar >>> issue embedding geolocation information in PDF files. Sidecar files were >>> created, but the geolocation data wasn’t embedded directly in the PDF. >>> >>> At my company, we use the C++ GDAL API, and I was able to resolve it by >>> opening the GDALDataset with the GDALAccess::GA_Update flag. >>> >>> As for whether GDAL reads sidecar files when present—I believe it does, >>> but I'm not entirely certain, so I’ll defer to others on that point. >>> >>> Hope this helps, >>> >>> >>> On Mon, Nov 3, 2025 at 4:13 AM Javier Jimenez Shaw via gdal-dev < >>> [email protected]> wrote: >>> >>>> Hi >>>> >>>> When I read some raster files (in particular thermal JPEG files), a >>>> side car file .aux.xml appears next to it. >>>> >>>> I would like to avoid the creation of this side car file, but I want to >>>> use any .aux.xml file if it is already there. Yes, I could imagine there is >>>> a performance impact if I read it several times, but I am going to read the >>>> file only once. >>>> >>>> The config option GDAL_PAM_ENABLED seems to be completely disabling PAM >>>> functionality: >>>> >>>> https://gdal.org/en/stable/user/configoptions.html#persistent-auxiliary-metadata-pam-options >>>> Reading the documentation, I would imagine that the PAM is completely >>>> disabled, not only the creation of the side car file while reading a >>>> raster. >>>> >>>> Is it posible to not create the .aux.xml, but use it if present? >>>> >>>> Thank you >>>> _______________________________________________ >>>> gdal-dev mailing list >>>> [email protected] >>>> https://lists.osgeo.org/mailman/listinfo/gdal-dev >>>> >>> >>> >>> -- >>> David Klaus >>> Carlson Software >>> >>> >>> *Disclaimer* >>> >>> The information contained in this communication from the sender is >>> confidential. It is intended solely for use by the recipient and others >>> authorized to receive it. If you are not the recipient, you are hereby >>> notified that any disclosure, copying, distribution or taking action in >>> relation of the contents of this information is strictly prohibited and may >>> be unlawful. >>> >> > > -- > David Klaus > Carlson Software > > > *Disclaimer* > > The information contained in this communication from the sender is > confidential. It is intended solely for use by the recipient and others > authorized to receive it. If you are not the recipient, you are hereby > notified that any disclosure, copying, distribution or taking action in > relation of the contents of this information is strictly prohibited and may > be unlawful. > _______________________________________________ > 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
