In order to calculate land cover diversity within defined patches, I need the coverage proportion of each landcover type for each patch. So I am searching for something similar to the zonal stats tool available for raster-within-polygon calculations.

In contrast to Calculate proportional area of polygon within another layer's polygon, I do not aim to calculate the proportional coverage of single polygons but the total proporional coverage of all polygons representing the same land cover type. Note: land cover types can be represented by more than one polygon within a patch.

enter image description here The screenshot exemplarily shows two patch-polygons (dotted lines) with land cover polygons (different forest and open land types, each represented by a specific signature). For each patch polygon, I need a summary of proportional coverage of each land cover type.

The screenshot shows just a few land cover types, however there are many more - so I seek an "automatic" solution.

the result should be a "proportional coverage of landcover types"-table like this (where the "sum" culumn is not necessary): enter image description here

2 Answers 2


I would first create a new field that holds the size of the large polygon, or patch as you name it (ie field name area_patch). I would use the field calculator, see this. Then perform an intersection with the 'patch layer' and the 'land use layer'. QGIS also has an intersection function. This gives you a new vector layer where you again need to create a new field where you calculate the area for each feature again (ie field name area_lu). Next you can use a field calculator to calculate the percentages per polygon (area_lu / area_patch * 100).

Now you have a table where each polygon has a field that has the percentage of the area it fills within each patch. It should also have field value left over from the intersection with the original 'object_id' from the patch layer. Several polygons should have the same original object_id. You can use a 'statistics by category' now using the original object_id and land use type as input. You should be able to sum the values in each field, here the percentages you calculated should be summed.

It might require some time figuring out the tools, but this is how I would do it. Hope it helps.

  • thank you very much, @Jarren. I performed a very similar procedure in R and it works. However, next time I'll try in QGIS. Sometimes you want to stick to a programm and not need changing between different applications all the time :)
    – yenats
    Commented Sep 15, 2017 at 14:32

Partial Answer

My recommended workflow: (and I would put these steps (Step 3- Step 6) into a modelbuilder model for automation)

  1. Convert your land cover to raster
  2. Bring in your area polygons (the areas that you need the zonal statistics for).
  3. In modelbuilder, iterate through the area polygons. Be sure to set the Value to a unique identifier.
  4. Mask the raster to the selected polygon
  5. Calculate statistics on the masked raster
  6. Export the table from the raster (set the name = %Value%.csv, so the unique identifier matches up with the polygons.

Now you'll have a folder full of broken down coverages within each polygon.I don't have an automated process for the next bit.

  1. Take the csv files
  2. Pivot the tables
  3. Append them all together.
  • Just now realizing that you're in QGIS. Maybe there are some parallels.
    – Map Man
    Commented Sep 13, 2017 at 16:27
  • so that was a ArcGIS-workflow?
    – yenats
    Commented Sep 13, 2017 at 16:39
  • That is correct.
    – Map Man
    Commented Sep 13, 2017 at 16:44
  • As the land cover polygons are not numeric, it seems rather useless to convert into raster, isn't it?
    – yenats
    Commented Sep 14, 2017 at 11:34
  • @yenats You are fundamentally correct, but the Esri tool functions best with Raster as an input--It is just easier to run statistics on an image. Unless someone can suggest a tool with similar functionality that can work with vector.
    – Map Man
    Commented Sep 14, 2017 at 15:40

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.