Skip to content

Commit 97e643d

Browse files
alexbruymach0
authored andcommittedNov 13, 2011
Added Python wrappers for QgsZonalStatistics
1 parent 6f25bf3 commit 97e643d

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed
 

‎python/analysis/analysis.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
%Include qgsgeometryanalyzer.sip
1111
%Include qgsoverlayanalyzer.sip
12-
12+
%Include qgszonalstatistics.sip
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/** \ingroup analysis
2+
* The QGis class that calculates raster statistics (count, sum, mean) for
3+
* a polygon or multipolygon layer and appends the results as attributes
4+
*/
5+
6+
class QgsZonalStatistics
7+
{
8+
%TypeHeaderCode
9+
#include <qgszonalstatistics.h>
10+
%End
11+
12+
public:
13+
14+
QgsZonalStatistics( QgsVectorLayer* polygonLayer, const QString& rasterFile,
15+
const QString& attributePrefix = "", int rasterBand = 1 );
16+
~QgsZonalStatistics();
17+
18+
/**Starts the calculation
19+
@return 0 in case of success*/
20+
int calculateStatistics( QProgressDialog* p );
21+
};

0 commit comments

Comments
 (0)
Please sign in to comment.