I am new to GIS so excuse my lack of proper terminology.

What I would like to do is to calculate a mean DNI (direct normal irradiance) for multiple bird species. I do find a DNI-raster online (https://solargis.com/maps-and-gis-data/download/world) and have a multipolygon (?) containing species-presence polygons (available from birdlife). I've added a picture of the layers to ensure that my terminology is correct. DNI-raster and species-presence multipolygon

I would now like to create an attribute that is basically the mean irradiance a bird species would receive given the DNI that its distribution range receives. What I envision is that this would mean that each "pixel" the species occurs in should be multiplied by its corresponding DNI value. Next all these "pixels" should be summed and then divided by the total amount of occurence-"pixels" for that species. I am just not sure how to do this.

I hope the question is clear, and that someone could help me with this.


Try the Zonal Statistics tool, which

"Calculates statistics of a raster layer for each feature of an overlapping polygon vector layer." -from QGIS User Manual


  • In QGIS 2.18 and earlier, Zonal Statistics was a plugin and had to be installed through the Plugin Manager.
  • In QGIS 3.0 and later, Zonal Statistics is a core tool, accessed through the Processing Toolbox > Raster Analysis. (Processing Toolbox is a plugin, activate it through the plugin menu.)

Multipolygon is a vector layer type that allows geographically separate polygons to be joined together into a single feature (which displays as one line on the attribute table). A feature of this type is called a multipart polygon (compared to a single part polygon). A multipolygon layer can have single-part as well as multipart polygons.

The manual doesn't say whether zonal stats will work with multi-part polygons, but I wouldn't expect it to be a problem. If the results seem incorrect, run the multiparts to singleparts tool, which will split all multi-part polygons into separate features. Then run the zonal stats tool again.

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.