QGIS/python/analysis/vector/qgszonalstatistics.sip.in

75 lines
2.2 KiB
Plaintext
Raw Normal View History

2017-05-21 22:18:04 +07:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/vector/qgszonalstatistics.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsZonalStatistics
{
2017-05-21 22:18:04 +07:00
%Docstring
2017-12-15 10:36:55 -04:00
A class that calculates raster statistics (count, sum, mean) for a polygon or multipolygon layer and appends the results as attributes*
%End
2017-05-21 22:18:04 +07:00
%TypeHeaderCode
#include "qgszonalstatistics.h"
%End
public:
enum Statistic
{
2017-05-21 22:18:04 +07:00
Count,
Sum,
Mean,
Median,
StDev,
Min,
Max,
Range,
Minority,
Majority,
Variety,
Variance,
All
};
typedef QFlags<QgsZonalStatistics::Statistic> Statistics;
QgsZonalStatistics( QgsVectorLayer *polygonLayer,
QgsRasterLayer *rasterLayer,
2017-09-25 14:20:39 +10:00
const QString &attributePrefix = QString(),
int rasterBand = 1,
QgsZonalStatistics::Statistics stats = QgsZonalStatistics::Statistics( QgsZonalStatistics::Count | QgsZonalStatistics::Sum | QgsZonalStatistics::Mean ) );
2017-05-21 22:18:04 +07:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsZonalStatistics.
2017-05-21 22:18:04 +07:00
%End
int calculateStatistics( QgsFeedback *feedback );
2017-05-21 22:18:04 +07:00
%Docstring
2017-12-15 10:36:55 -04:00
Starts the calculation
2017-05-21 22:18:04 +07:00
:return: 0 in case of success*
%End
public:
};
QFlags<QgsZonalStatistics::Statistic> operator|(QgsZonalStatistics::Statistic f1, QFlags<QgsZonalStatistics::Statistic> f2);
2017-05-21 22:18:04 +07:00
2017-09-25 14:20:39 +10:00
2017-05-21 22:18:04 +07:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/vector/qgszonalstatistics.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/