QGIS API Documentation
3.0.2-Girona (307d082)
|
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, Variance = 2048, All = Count | Sum | Mean | Median | StDev | Max | Min | Range | Minority | Majority | Variety | Variance } |
Enumeration of flags that specify statistics to be calculated. More... | |
Public Member Functions | |
QgsZonalStatistics (QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix=QString(), int rasterBand=1, QgsZonalStatistics::Statistics stats=QgsZonalStatistics::Statistics(QgsZonalStatistics::Count|QgsZonalStatistics::Sum|QgsZonalStatistics::Mean)) | |
Constructor for QgsZonalStatistics. More... | |
int | calculateStatistics (QgsFeedback *feedback) |
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 40 of file qgszonalstatistics.h.
Enumeration of flags that specify statistics to be calculated.
Definition at line 45 of file qgszonalstatistics.h.
QgsZonalStatistics::QgsZonalStatistics | ( | QgsVectorLayer * | polygonLayer, |
QgsRasterLayer * | rasterLayer, | ||
const QString & | attributePrefix = QString() , |
||
int | rasterBand = 1 , |
||
QgsZonalStatistics::Statistics | stats = QgsZonalStatistics::Statistics( QgsZonalStatistics::Count | QgsZonalStatistics::Sum | QgsZonalStatistics::Mean ) |
||
) |
Constructor for QgsZonalStatistics.
Definition at line 32 of file qgszonalstatistics.cpp.
int QgsZonalStatistics::calculateStatistics | ( | QgsFeedback * | feedback | ) |
Starts the calculation.
Definition at line 40 of file qgszonalstatistics.cpp.