[gdal-dev] Raster attributes tables with URL raster

Rahkonen Jukka jukka.rahkonen at maanmittauslaitos.fi
Tue Dec 16 13:39:19 PST 2025


Hi,

The http://... downloads the file, use the vsicurl method instead. Test with gdalinfo:

gdalinfo /vsicurl/"https://noaa-ocs-nationalbathymetry-pds.s3.amazonaws.com/BlueTopo/BC26826R/BlueTopo_BC26826R_20241023.tiff"

-Jukka Rahkonen-


________________________________________
Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org> käyttäjän Kirk Waters - NOAA Federal via gdal-dev <gdal-dev at lists.osgeo.org> puolesta
Lähetetty: Tiistai 16. joulukuuta 2025 22.32
Vastaanottaja: gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
Aihe: [gdal-dev] Raster attributes tables with URL raster

Dear GDAL gurus,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 (https://noaa-ocs-nationalbathymetry-pds.s3.amazonaws.com/BlueTopo/BC26826R/BlueTopo_BC26826R_20241023.tiff) 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).from osgeo import gdalgdal.UseExceptions()url='https://noaa-ocs-nationalbathymetry-pds.s3.amazonaws.com/BlueTopo/BC26826R/BlueTopo_BC26826R_20241023.tiff'ds = gdal.Open(url)for band_id in range(ds.RasterCount):    band = ds.GetRasterBand(band_id+1)    rat = band.GetDefaultRAT()    print(f"Band {band_id+1} has rat type {type(rat)}")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.Thanks,Kirk Waters, PhD NOAA Office for Coastal ManagementApplied Sciences Program      coast.noaa.gov/digitalcoast


More information about the gdal-dev mailing list