QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
QgsZonalStatistics Class Reference

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 Member Functions

 QgsZonalStatistics (QgsVectorLayer *polygonLayer, const QString &rasterFile, const QString &attributePrefix="", int rasterBand=1)
 ~QgsZonalStatistics ()
int calculateStatistics (QProgressDialog *p)
 Starts the calculation.

Detailed Description

A class that calculates raster statistics (count, sum, mean) for a polygon or multipolygon layer and appends the results as attributes.

Constructor & Destructor Documentation

QgsZonalStatistics::QgsZonalStatistics ( QgsVectorLayer polygonLayer,
const QString &  rasterFile,
const QString &  attributePrefix = "",
int  rasterBand = 1 
)
QgsZonalStatistics::~QgsZonalStatistics ( )

Member Function Documentation

int QgsZonalStatistics::calculateStatistics ( QProgressDialog *  p)

Starts the calculation.

Returns
0 in case of success

The documentation for this class was generated from the following files: