I am using QGIS 3.18 to do a quick calculation of the population inside a buffered area. The data for the population comes from WorldPop, the file I got is in the form of GeoTIFF. I inserted it as a raster layer. Then, I put some point type geometries in the map and created a 100 km buffer around the point.

I run the Zonal Statistics tool, The Zonal Statistics then created a new layer, with the categories (sum, mean, etc). But the fields are returned empty (null).

The funny thing is if I do this in QGIS 3.10, the zonal statistics works. Exactly the same settings. The only difference, the stats (sum) is entered directly as a column in the buffer layer, and it contains data. Is this a known bug?

  • What about the CRS of the raster and the vector layer before you start the Zonal Statistics? Are both in the same projection?
    – MAP
    Jun 8 at 10:41
  • Yes. I checked and rechecked all CRS. Project, Point, and Raster are in the same CRS. I even, counterintuitively, tried it on different CRS (just to test), also doesn't work.
    – necrohiero
    Jun 8 at 10:42
  • Check the band of the raster you are using for this tool.
    – Michal De
    Jun 8 at 12:16

Try "Raster statistics for polygons" from Saga tools. It work's fine.

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.