I have been working with some rasters and would like to know how to calculate the area occupied by one element of a raster in QGIS?

  • 1
    What do you mean by "element"? A cell? An area of same value? – underdark Feb 19 '13 at 20:31
  • 1
    area with the same value :) – Nadia Feb 19 '13 at 20:39

with 3 steps you can achieve what you want:

  1. Vectorize raster based on the values you want to calculate
  2. Open your new vector, and create a new column. Name it 'Area'.
  3. Use the field calculator to populate the column with the variable $area

I'm assuming you just need to know the area occupied by each value. You can get this value by getting the statistics per value for the raster. Specifically, you want the total number of cells with a particular value. Once you have those totals, you can just multiply them with the cell size of your raster to get the area.

  • 2
    Remembering that cell size is the square of the cell width...a common mistake since most GIS packages report cell width rather than cell area. – user681 Apr 9 '13 at 13:49
  • 1
    This is only true if the raster is in a scale small enough that the areas of all cells are roughly equal. – Anaphory Nov 26 '19 at 12:52

The method of Vectorization gives a cluster based measure of the area rather than a pixel based area. If you were to calculate a specified area or the area of a feature this works just fine. While running the Raster to Vector option ,it identifies the adjacent pixels and groups it and then creates a vector of it. The total count in the image could be confusing here. These methods could also be helpful for calculating the area. What are the methods for calculating area from a raster in QGIS

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.