Hello,
>From a processing script, I would like to compute raster statistics from a
>feature.geometry().
I call QgsZonalStatistics.calculateStatistics() with :
QgsZonalStatistics.calculateStatistics(
Raster.dataProvider(),
Feature.geometry(),
Raster.rasterUnitsPerPixelX(),
Raster.rasterUnitsPerPixelY(),
1,
QgsZonalStatistics.Statistic.All
)
The output contain a dict :
{0: 6.4578613687}
Which correspond to Variety (last value inserted in results here
https://qgis.org/api/qgszonalstatistics_8cpp_source.html)
Do you agree that the output should contain all statistics since I use
QgsZonalStatistics.Statistic.All ?
Is this a bug or a feature ?
Another question :
How I am supposed to build the last argument of calculateStatistics() if I want
to compute only Mean and Median ?
Kind regards,
Nicolas
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer