Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
what format do you want the output table to be in? – BradHards Jan 17 '13 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 Jan 17 '13 at 15:20
So you're trying to get it into ArcGIS? – BradHards Jan 17 '13 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 Jan 17 '13 at 20:07

Here is the documentation

They are known as RATs and came about after your question.

I believe ArcGIS will not read them but would like to be corrected.

share|improve this answer
The "good GISStackX reference" is circular, i.e. it links to THIS question. – Luke Jan 12 '15 at 3:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.