<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Javier,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>You can control with the GDAL_DISABLE_READDIR_ON_OPEN configuration parameter (<a href="https://gdal.org/user/configoptions.html">https://gdal.org/user/configoptions.html</a>). Typically, I set GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR which will disable this.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Mike<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>-- <o:p></o:p></p></div><div><p class=MsoNormal>Michael Smith<o:p></o:p></p><p class=MsoNormal>Remote Sensing/GIS Center<o:p></o:p></p><p class=MsoNormal>US Army Corps of Engineers<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:12.0pt;color:black'>From: </span></b><span style='font-size:12.0pt;color:black'>gdal-dev <gdal-dev-bounces@lists.osgeo.org> on behalf of Javier Jimenez Shaw via gdal-dev <gdal-dev@lists.osgeo.org><br><b>Reply-To: </b>Javier Jimenez Shaw <j1@jimenezshaw.com><br><b>Date: </b>Saturday, April 27, 2024 at 7:01 AM<br><b>To: </b>gdal dev <gdal-dev@lists.osgeo.org><br><b>Subject: </b>[gdal-dev] don't search side car files on s3 with gdalinfo<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal>Hi<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I am accessing a big file in S3. All works fine (when I learned how to set the authentication environment variables), but gdalinfo is checking for a lot of files that do not exist. I know there is only a GeoTIFF - COG (no side car files)<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>However gdalinfo is trying to find several side car files, that are not there. S3 returns a 403. It takes its time to search for all those files.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Is there a way to tell to gdalinfo that it should not check for those files?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Bonus: QGIS is also taking time to open it (just using 'qgis' instead of 'gdalinfo' in the command line). I think it is for the same reason. It there a hack there as well?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>$ AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... AWS_SESSION_TOKEN=... gdalinfo /vsis3/blah/folder/ortho.tiff<br>Driver: GTiff/GeoTIFF<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.tiff.aux.xml">https://blah.s3.amazonaws.com/folder/ortho.tiff.aux.xml</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.aux">https://blah.s3.amazonaws.com/folder/ortho.aux</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.AUX">https://blah.s3.amazonaws.com/folder/ortho.AUX</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.tiff.aux">https://blah.s3.amazonaws.com/folder/ortho.tiff.aux</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.tiff.AUX">https://blah.s3.amazonaws.com/folder/ortho.tiff.AUX</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.tiff.ovr">https://blah.s3.amazonaws.com/folder/ortho.tiff.ovr</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.tiff.OVR">https://blah.s3.amazonaws.com/folder/ortho.tiff.OVR</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.tiff.msk">https://blah.s3.amazonaws.com/folder/ortho.tiff.msk</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.tiff.MSK">https://blah.s3.amazonaws.com/folder/ortho.tiff.MSK</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.XML">https://blah.s3.amazonaws.com/folder/ortho.XML</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.xml">https://blah.s3.amazonaws.com/folder/ortho.xml</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.IMD">https://blah.s3.amazonaws.com/folder/ortho.IMD</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.imd">https://blah.s3.amazonaws.com/folder/ortho.imd</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.RPB">https://blah.s3.amazonaws.com/folder/ortho.RPB</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.rpb">https://blah.s3.amazonaws.com/folder/ortho.rpb</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.PVL">https://blah.s3.amazonaws.com/folder/ortho.PVL</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.pvl">https://blah.s3.amazonaws.com/folder/ortho.pvl</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho_rpc.txt">https://blah.s3.amazonaws.com/folder/ortho_rpc.txt</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho_RPC.TXT">https://blah.s3.amazonaws.com/folder/ortho_RPC.TXT</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho_metadata.txt">https://blah.s3.amazonaws.com/folder/ortho_metadata.txt</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho_METADATA.TXT">https://blah.s3.amazonaws.com/folder/ortho_METADATA.TXT</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho_MTL.txt">https://blah.s3.amazonaws.com/folder/ortho_MTL.txt</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho_MTL.TXT">https://blah.s3.amazonaws.com/folder/ortho_MTL.TXT</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/METADATA.DIM">https://blah.s3.amazonaws.com/folder/METADATA.DIM</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/metadata.dim">https://blah.s3.amazonaws.com/folder/metadata.dim</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho_metadata.xml">https://blah.s3.amazonaws.com/folder/ortho_metadata.xml</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho_METADATA.XML">https://blah.s3.amazonaws.com/folder/ortho_METADATA.XML</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.TXT">https://blah.s3.amazonaws.com/folder/ortho.TXT</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.txt">https://blah.s3.amazonaws.com/folder/ortho.txt</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.RPC">https://blah.s3.amazonaws.com/folder/ortho.RPC</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.rpc">https://blah.s3.amazonaws.com/folder/ortho.rpc</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.pass">https://blah.s3.amazonaws.com/folder/ortho.pass</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/ortho.PASS">https://blah.s3.amazonaws.com/folder/ortho.PASS</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/summary.txt">https://blah.s3.amazonaws.com/folder/summary.txt</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/SUMMARY.TXT">https://blah.s3.amazonaws.com/folder/SUMMARY.TXT</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/HDRdisplay.txt">https://blah.s3.amazonaws.com/folder/HDRdisplay.txt</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/HDRdisplay.TXT">https://blah.s3.amazonaws.com/folder/HDRdisplay.TXT</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/HDRho_display.txt">https://blah.s3.amazonaws.com/folder/HDRho_display.txt</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/HDRho_display.TXT">https://blah.s3.amazonaws.com/folder/HDRho_display.TXT</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/RPCdisplay.txt">https://blah.s3.amazonaws.com/folder/RPCdisplay.txt</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/RPCdisplay.TXT">https://blah.s3.amazonaws.com/folder/RPCdisplay.TXT</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/RPCho_display.txt">https://blah.s3.amazonaws.com/folder/RPCho_display.txt</a>: 403<br>Warning 1: HTTP response code on <a href="https://blah.s3.amazonaws.com/folder/RPCho_display.TXT">https://blah.s3.amazonaws.com/folder/RPCho_display.TXT</a>: 403<br>Files: /vsis3/blah/folder/ortho.tiff<o:p></o:p></p></div><div><p class=MsoNormal>...<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><div><div><div><p class=MsoNormal>.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ... .... ._ .__<o:p></o:p></p></div></div></div></div></div></div><p class=MsoNormal>_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev <o:p></o:p></p></div></body></html>