QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
A class that calculates raster statistics (count, sum, mean) for a polygon or multipolygon layer and appends the results as attributes. More...
#include <qgszonalstatistics.h>
Public Types | |
enum | Statistic { Count = 1, Sum = 2, Mean = 4, Median = 8, StDev = 16, Min = 32, Max = 64, Range = 128, Minority = 256, Majority = 512, Variety = 1024, All = Count | Sum | Mean | Median | StDev | Max | Min | Range | Minority | Majority | Variety } |
Enumeration of flags that specify statistics to be calculated. More... | |
Public Member Functions | |
QgsZonalStatistics (QgsVectorLayer *polygonLayer, const QString &rasterFile, const QString &attributePrefix="", int rasterBand=1, const Statistics &stats=Statistics(Count|Sum|Mean)) | |
int | calculateStatistics (QProgressDialog *p) |
Starts the calculation. More... | |
A class that calculates raster statistics (count, sum, mean) for a polygon or multipolygon layer and appends the results as attributes.
Definition at line 30 of file qgszonalstatistics.h.
Enumeration of flags that specify statistics to be calculated.
Definition at line 35 of file qgszonalstatistics.h.
QgsZonalStatistics::QgsZonalStatistics | ( | QgsVectorLayer * | polygonLayer, |
const QString & | rasterFile, | ||
const QString & | attributePrefix = "" , |
||
int | rasterBand = 1 , |
||
const Statistics & | stats = Statistics( Count | Sum | Mean ) |
||
) |
Definition at line 34 of file qgszonalstatistics.cpp.
int QgsZonalStatistics::calculateStatistics | ( | QProgressDialog * | p | ) |
Starts the calculation.
Definition at line 54 of file qgszonalstatistics.cpp.