Re: [gdal-dev] reading rat values from GDB raster

2023-07-19 Thread Even Rouault
Le 19/07/2023 à 16:26, William Kyngesburye a écrit : Ah, that works to get the xml rat. I had converted to tif with Arc before I remembered that GDAL can read gdb rasters now, and got a dbf rat. I can trim the xml rat down, but I need to leave the value field so it has some way to lookup a c

Re: [gdal-dev] reading rat values from GDB raster

2023-07-19 Thread William Kyngesburye
Ah, that works to get the xml rat. I had converted to tif with Arc before I remembered that GDAL can read gdb rasters now, and got a dbf rat. I can trim the xml rat down, but I need to leave the value field so it has some way to lookup a cell value in the rat, but identifying a cell (QGIS or g

Re: [gdal-dev] reading rat values from GDB raster

2023-07-18 Thread Even Rouault
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 an

[gdal-dev] reading rat values from GDB raster

2023-07-18 Thread William Kyngesburye
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