By default, QGIS does not seem to recognize "Value Tables" (VAT) the way ArcGIS does. So far I cannot find a way to represent the pixel values discretely, or apply a "legend" to the layer. Is there something that can be done to associate the VAT with the raster in QGIS? Ultimately I'd like to symbolize and see the joined values when I use the "Identify" tool on a pixel?

For example, I've downloaded a landcover GeoTIFF from the NRCS that contains a single "Pixel Value" field, which represents the type of landcover. In addition to the GeoTIFF, the authors included a "Value table" (<filename>.vat.dbf), which essentially is "joined" to the raster to give a plain English description of the "Pixel Value", as well as RGB values. There are 17 discrete values in the VAT, but a small sample looks like this:

Value   Count   Red Green   Blue    Land_Cover
0   299079  0.00000000000   0.00000000000   0.00000000000   Unclassified
11  3896533 0.27843137255   0.41960784314   0.62745098039   Open Water
12  86735   0.81960784314   0.86666666667   0.97647058824   Perennial Snow/Ice
21  4527275 0.86666666667   0.78823529412   0.78823529412   Developed, Open Space

This data can be downloaded from the "National Land Cover Dataset by State" at https://datagateway.nrcs.usda.gov/GDGHome_DirectDownLoad.aspx


In general, this appears to be a feature that is not available, I came across this QGIS, as of October 23, 2017, Feature request #14449, with still an open status and no resolution.

Many categorical raster datasets, such as those representing vegetation and landcover, have associated attribute tables. There are the usual value and count columns, but there are also often additional fields that hold useful vegetation descriptions. These might include vegetation type, vegetation complex, landcover type etc. ERDAS Imagine raster files will have a .vat.dbf with these attributes.

It would be incredibly useful to be able to open this attribute table as you can with a vector dataset. Then queries could be run and the corresponding cells highlighted. Additional columns could be added, and used to classify cells into new categories without having to do an r.recode or similar operation. For instance, you could assign weights this way, to prepare for site selection model.

But, I would try this approach, as reference here Displaying NLCD landcover data in QGIS with landcover class type?

  • Drop-down Render Type to "Singleband pseudocolor"
  • Drop-down Color and select one of the color ramps.
  • Click the "Classify" button
  • Click "Apply"

Additionally, these attribute columns could be made available to style the raster via the Categorized or Rule based renderers. For example, a vegetation dataset could be brought in and styled by the vegetation type attribute column. Or groups of vegetation/landcover types could be given a color with the Rule based renderer.

  • Thank you, that is very helpful. I ran into the same issue as the comment to @Stu Smith solution. I was unable to using "unique values [rather] than Continuous, Equal interval and Quantile". I was able to get around it but classifying Quantile with the correct number of classes, and reclassing and resymbolizing manually. Oct 23 '17 at 18:54
  • 1
    I'd still like to know if there is a more automated way to read/join the raster to the VAT. The NLCD data is just one of the raster datasets I am interested in. There are others that have hundreds of classifications, so understanding the QGIS > VAT would make the process much faster. Oct 23 '17 at 18:55
  • 1
    I updated my response with a QGIS feature request that has an open status yet to be resolved, as an FYI.
    – whyzar
    Oct 23 '17 at 19:15
  • 1
    Thank you, that definitely answers my question. I appreciate your help! Oct 23 '17 at 19:24
  • 1
    Good news! A Raster Attribute Table plugin (experimental) is now available. There's also a Youtube video introduction at youtube.com/watch?v=nARp6yxRt68
    – Stu Smith
    May 18 at 17:12

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