<div dir="ltr"><div>Dear GDAL gurus,</div><div>I'm struggling a little with raster attribute tables if the file is remote. They don't seem to be recognized. For example, there is a file (<a href="https://noaa-ocs-nationalbathymetry-pds.s3.amazonaws.com/BlueTopo/BC26826R/BlueTopo_BC26826R_20241023.tiff">https://noaa-ocs-nationalbathymetry-pds.s3.amazonaws.com/BlueTopo/BC26826R/BlueTopo_BC26826R_20241023.tiff</a>) with a side-car *.aux.xml file that has a RAT for band 3. If I pull down those two files locally and run gdalinfo on it, I can see the RAT. If I do the same with the URL, no attributes show. My goal is to grab the RAT in python, but this test script also gets nothing for each band (each band has a NoneType RAT instead of a gdal.RasterAttributeTable).</div><div><br></div><div>from osgeo import gdal<br><br>gdal.UseExceptions()<br>url='<a href="https://noaa-ocs-nationalbathymetry-pds.s3.amazonaws.com/BlueTopo/BC26826R/BlueTopo_BC26826R_20241023.tiff">https://noaa-ocs-nationalbathymetry-pds.s3.amazonaws.com/BlueTopo/BC26826R/BlueTopo_BC26826R_20241023.tiff</a>'<br>ds = gdal.Open(url)<br>for band_id in range(ds.RasterCount):<br>    band = ds.GetRasterBand(band_id+1)<br>    rat = band.GetDefaultRAT()<br>    print(f"Band {band_id+1} has rat type {type(rat)}")</div><div><br></div><div>Is there something I'm doing wrong? I've tried the various options for GDAL_DISABLE_READDIR_ON_OPEN, but they haven't changed the result.</div><div><br></div><div>Thanks,</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">Kirk Waters, PhD </font></div><div><font face="arial, helvetica, sans-serif">NOAA Office for Coastal Management<br></font></div><div><font face="arial, helvetica, sans-serif">Applied Sciences Program      </font></div><div><div><font face="arial, helvetica, sans-serif"><a href="http://coast.noaa.gov/digitalcoast" target="_blank">coast.noaa.gov/digitalcoast</a></font></div></div><div><br></div><div><br></div></div></div></div></div>