[gdal-dev] reading rat values from GDB raster

Even Rouault even.rouault at spatialys.com
Tue Jul 18 15:30:45 PDT 2023


William,

if you gdal_translate / CreateCopy() to a TIF, the RAT will be written 
in the side car .aux.xml file. You can either use your favorite XML 
edition tool to remove all columns but the one you are interested in, or 
use the C/C++/Python GDALRasterAttributeTable API to create a new RAT 
and copy values from the original one. 
https://github.com/OSGeo/gdal/blob/master/autotest/gcore/rat.py might 
serve as a starting point to get some sense of the API

Even

Le 18/07/2023 à 23:19, William Kyngesburye a écrit :
> I would like to convert a GDB raster with a multi column rat by writing out one of the columns. I can see the rat with gdalinfo but I can't figure out how to read values from the rat (other than the cell value) so they can be written to a new raster.
>
> -----
> William Kyngesburye
> <kyngchaos*at*kyngchaos*dot*com>
> <https://www.kyngchaos.com>
>
> Don't Panic
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list