3

I am trying to implement a process that uses the Zonal Statistics menu function. In Lyon, the menu that pops up had a field with a list of calculations, each with a check box. Here you can select what to calculate, specifically the mean of values in a polygon. However, in the Wien version, the zonal statistics function does not have the same field.

How would you go about doing this in PyQGIS, so that it is unaffected by QGIS version changes? Specifically, how could you use zonal calculator in PyQGIS to calculate mean of areas in a raster using polygons from a shapefile?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.