<div dir="auto"><div>Hi David,<div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Daniel</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, 3 Nov 2025, 14:20 David Klaus via gdal-dev, <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr">Javier,<div><br></div><div>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?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 3, 2025 at 9:12 AM Javier Jimenez Shaw <<a href="mailto:j1@jimenezshaw.com" target="_blank" rel="noreferrer">j1@jimenezshaw.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thank you David.</div><div><br></div><div>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).</div><div><br></div><div>(note: I am opening the files in C++ with GDALOpenEx)</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 3 Nov 2025 at 14:45, David Klaus <<a href="mailto:dklaus@carlsonsw.com" target="_blank" rel="noreferrer">dklaus@carlsonsw.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr">Hi Javier,<br><br>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.<br><br>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.<br><br>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.<br><br>Hope this helps,<br><br><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 3, 2025 at 4:13 AM Javier Jimenez Shaw via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi</div><div><br></div><div>When I read some raster files (in particular thermal JPEG files), a side car file .aux.xml appears next to it.</div><div><br></div><div>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.</div><div><br></div><div>The config option GDAL_PAM_ENABLED seems to be completely disabling PAM functionality:</div><div><a href="https://gdal.org/en/stable/user/configoptions.html#persistent-auxiliary-metadata-pam-options" target="_blank" rel="noreferrer">https://gdal.org/en/stable/user/configoptions.html#persistent-auxiliary-metadata-pam-options</a></div><div>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.</div><div><br></div><div>Is it posible to not create the .aux.xml, but use it if present?</div><div><br></div><div>Thank you</div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">David Klaus<div>Carlson Software</div></div></div>
<br><br><p style="font-family:Verdana;font-size:10pt;color:rgb(119,119,119)"><b>Disclaimer</b></p><p style="font-family:Verdana;font-size:8pt;color:rgb(119,119,119)">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.</p></div>
</div></blockquote></div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">David Klaus<div>Carlson Software</div></div></div>
<br><br><p style="font-family:Verdana;font-size:10pt;color:#777777"><b>Disclaimer</b></p><p style="font-family:Verdana;font-size:8pt;color:#777777">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.</p></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div></div></div>