23

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?

1

3 Answers 3

13

This feature request might fill your needs: https://github.com/qgis/QGIS/issues/22427

2
  • If I understand correctly this feature still still doesn't exist?
    – kalakaru
    Commented Mar 17, 2016 at 8:27
  • 4
    Yes, not yet implemented. Evidently is not something asked by many.
    – gioman
    Commented Mar 17, 2016 at 16:42
7

Good news! A Raster Attribute Table plugin (experimental) is now available. There's also a Youtube video introduction at https://www.youtube.com/watch?v=nARp6yxRt68

enter image description here

3
3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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