I have seen How to calculate the average value of a raster within polygons?, which helps me a bit but not completely.

I have a raster of 16000 by 12000 (country-size) and a vector which indicates different types of landuse. I would like to get the average value of the raster per type of landuse (Forest, Recreation, Roads, Farmlands, etc.)

The post linked above says to use the 'Zonal Statistics' tool. Unfortunately I can't seem to get this to work for a layer with a lot of different polygons.

I could create separate layers for each landuse type and use that for the analysis, but I rather have something quicker.

Maybe an option is also to rasterize the vector and then use the 'Raster Layer Zonal Statistics'tool?

  • You could have used the "aggregate" tool after the zonal statistic tool but @Sken2107 is the best solution !
    – wanderzen
    Commented May 30, 2022 at 14:01

1 Answer 1


The solution would be to Dissolve (Processing Toolbox -> Vector Geometry) your polygon layer using the landuse as the "Dissolve field(s)". By doing this you will have one polygon layer per landuse type. Then you can apply the Zonal Statistics (Processing Toolbox -> Raster Analysis) which is going to give you a single value (for the selected parameter to compute, mean for instance) for each landuse.

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.