I am attempting to load this dataset into QGIS. Following Loading *.adf files into QGIS, I can load the data by opening the hdr.adf file in the Data Source Manager. However, it imports without any labels on the discrete values in the color ramp:

color ramp

I know the labels do reside in the vat.adf file.

How do I load those labels into the QGIS color ramp?


1 Answer 1


You'll have to manually label the symbology, QGIS does not support raster attribute tables (the vat.adf in the case of Esri Grid format).

You can read the attribute table using GDAL - the output of gdalinfo your_raster will include the attribute table if available.

Though I just tested on the oregon_veg/orveg10 raster you linked to and it has a very large attribute table. It might be easier to convert it to a spreadsheet to simplify reading it. The code in this answer includes a python function to convert raster attribute tables to CSV.

  • 1
    Using the CSV version of the code in the answer you linked worked for me. I also pulled out the color pallet using gdalinfo. I used the the Export Color Map to File... QGIS menu option to get a reference file to which to match my output. Finally I exported a tab-separated file from a spreadsheet program and converted the tabs to spaces.
    – watkipet
    Mar 22, 2021 at 23:13
  • @Stish you can add csv files to QGIS using the Browser, or drag and drop just like any other dataset. This answer though doesn't specifically require you to add the csv to QGIS, the reason I suggested creating a csv is just to simplify reading the attributes when manually labelling the symbology, e.g copy/pasting each value and label entry from csv to symbology dialog in QGIS. You could do this with the csv open in QGIS, but would probably be easier to have the csv open in a separate Excel/LibreOffice Calc window.
    – user2856
    Mar 25, 2021 at 20:43

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.