QGIS – Obtaining Information of All Habitats Within an Area

qgis

I have a raster TIFF containing a habitat map. The raster, with resolution of 10m x 10m, indicates a different code for each pixel (say code 1 = woodland, 2 = grassland, 3 = urban area.
I've got another vector files containing multiple polygons indicating several demarcated area.

For each polygon I want the information of which percentage of woodland, grassland, urban area etc. i.e. different type of habitat according to the raster TIFF.

I am using QGIS 3.22. How can I do it?

Best Answer

  1. Zonal Histogram. Output will contain one column with pixel count for each raster value
  2. Multiple Field Calculators or one Refactor fields to create new columns with percentages for each class.

enter image description here

Related Question