15

I have some Python code that makes Raster Attribute Tables for GeoTiffs using GDAL.

In ArcGIS I can see these attribute tables fine and they behave how I like (as classifications) but in QGIS the whole concept of an attribute table seems to be missing.

Is there any way to access a RAT in QGIS?

11

This feature request might fill your needs: http://hub.qgis.org/issues/4321

| improve this answer | |
  • If I understand correctly this feature still still doesn't exist? – kalakaru Mar 17 '16 at 8:27
  • 4
    Yes, not yet implemented. Evidently is not something asked by many. – Giovanni Manghi Mar 17 '16 at 16:42
1

There is still no such function in QGIS as raster attributive table (as it was in ArcMap). However, you can get similar output by running Raster layer unique values report. This function counts unique values (which is perfect for integer rasters) and even calculates the area.

enter image description here

The output will look smth like:

Extent: 103.2208100000000002,52.1505000000000010 : 141.5203300000000013,73.7999700000000018

Projection: WGS 84 (EPSG:4326)

Width in pixels: 33991 (units per pixel 0.00112675)

Height in pixels: 19214 (units per pixel 0.00112675)

Total pixel count: 653103074

NODATA pixel count: 339328216

Value   Pixel count Area (deg²)
0   1549588 1.96732049625739
1   248748550   315.8053113661866
2   17323972    21.99410759001047
3   24404810    30.98377305468765
4   3532094 4.48426350804714
5   7962170 10.10858385305366
6   10253674    13.01782346155333
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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