Friday, 30 November 2018

qgis - How does Zonal Statistics work exactly?


I'm a bit confused on how the zonal statistics tools work in QGIS (either the 'Zonal Statistics' tool under the Raster tools from the QGIS geoalgorithms toolbox or the 'Raster statistics from polygons' tool under the SAGA Vector<->Raster tools).


Basically I have a raster map layer and some small polygons in a separate layer. I want to assign each polygon the value of the raster below. In case a polygon overlaps multiple raster cells, I just want to have the maximum.


Yet the output doesn't make any sense and I can't get behind the reasoning of those results (which are obviously not the maximum of the underlain raster cell):



enter image description here


Any ideas what I'm doing wrong or what I didn't consider yet? The results with the python API in qgis.analysis.QgsZonalStatistics() (according to this question here) are much better, but it does only offer count, mean and sum...but for some reason no max or min.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...