[GIS] Calculate land cover for grid cells in QGIS

intersectionland-coverland-useqgis

I have a raster containing information on the land cover type in a region.
I also have an ESRI shapefile consisting of a grid composed of 2500 cells. I would like to calculate the percentage cover of each land cover type in each cell.

To do this, I vectorized my raster and dissolved the polygons to obtain a shapefile where each polygon is a land cover type. I then tried to use the intersection tool to obtain a shapefile with polygons for each land cover type in each cell. This procedure takes too much time however (days by my calculation). I have also tried to split the grid into smaller grids but still faced the same problem.

Is there a more effective way of obtaining what I want?

Best Answer

You can use Raster layer zonal statistics in which you can select the land cover raster layer as input file, and use the shapefile as zone layer. It will calculate the area (in the raster unit) of each land cover within each zone in the shapefile. Then it will be easy to calculate the percentage.

The tool is available from Processing toolbox -> Raster Analysis -> Raster layer zonal statistics.

Check the help above for more information.

enter image description here

I am using QGIS 3.10.4.

Related Question