Is there a way to build a raster attribute table using one of the GDAL utilities? I know you can view it using gdalinfo
and I have successfully created one using Python, but it would be so much easier to just run a command line utility to build a raster attribute table on a raster.
-
what format do you want the output table to be in?BradHards– BradHards2013年01月17日 03:43:53 +00:00Commented Jan 17, 2013 at 3:43
-
Well, in Python there is a RasterAttributeTableClass that you can use to build the raster attribute table directly into the raster. It may be stored in the aux file, I'm not sure. But ArcGIS recognizes it and will symbolize by it. You can also view it in ArcGIS just as you would any other attribute table.Brian– Brian2013年01月17日 15:20:47 +00:00Commented Jan 17, 2013 at 15:20
-
So you're trying to get it into ArcGIS?BradHards– BradHards2013年01月17日 19:49:46 +00:00Commented Jan 17, 2013 at 19:49
-
Not necessarily, but I do have access to ArcGIS that I use for viewing rasters occasionally. I realize that using ArcGIS to create the raster attribute table is an option, but I have several GDAL workflows (using 64bit GDAL) and I want the RAT to be part of that workflow.Brian– Brian2013年01月17日 20:07:01 +00:00Commented Jan 17, 2013 at 20:07
1 Answer 1
Here is the documentation
http://gdal.org/classGDALRasterAttributeTable.html
They are known as RATs and came about after your question. http://lists.osgeo.org/pipermail/gdal-dev/2005-July/006082.html
I believe ArcGIS will not read them but would like to be corrected.
-
FWIW, the page is nowadays here: gdal.org/doxygen/classGDALRasterAttributeTable.htmlmarkusN– markusN2019年11月17日 21:28:11 +00:00Commented Nov 17, 2019 at 21:28