Calculating the zonal stats now takes a long time. It would be great if that could be made faster. Steps to take: - [x] make list of existing relevant libraries: see below - [x] benchmark them: [benchmarks]( https://github.com/geofileops/geobenchmark/blob/main/results_zonalstats/GeoBenchmark.png): based on the benchmarks, the pyqgis zonal_stats was the (only) one with with significantly better performance. - [x] first rough implementation: #42 - [ ] tests still need to be added - [ ] decouple implementation further for rasterstats one + make implementation more generic ### Listing of relevant libraries - rasterio: [manual](https://pysal.org/scipy2019-intermediate-gds/deterministic/gds2-rasters.html) - pygeoprocessing (open?): [doc](https://pygeoprocessing.readthedocs.io/en/latest/api/pygeoprocessing.html#pygeoprocessing.zonal_statistics) - pyjeo (GPL): [doc](https://pyjeo.readthedocs.io/en/latest/2_tutorial.html#tutorial-on-extract-calculating-regional-statistics) - pyQGIS (GPL): [post](https://gis.stackexchange.com/questions/421556/performance-problem-with-getting-average-pixel-values-within-buffered-circles) - fast, but less clean on server. - [relevant src](https://github.com/qgis/QGIS/blob/d5626d92360efffb4b8085389c8d64072ef65833/src/analysis/vector/qgszonalstatistics.cpp#L266) - ?: [doc](https://pygis.io/docs/f_rs_extraction.html) These libraries also take partial pixels in account, so they are not fit for purpose. - xagg: [repo](https://github.com/ks905383/xagg) - exactextract (apache2): [repo](https://github.com/isciences/exactextract)
Calculating the zonal stats now takes a long time. It would be great if that could be made faster.
Steps to take:
Listing of relevant libraries
These libraries also take partial pixels in account, so they are not fit for purpose.