Skip to content

Commit

Permalink
Added Python wrappers for QgsZonalStatistics
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Sep 28, 2011
1 parent c5d1f7a commit 3cac713
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/analysis/analysis.sip
Expand Up @@ -9,4 +9,4 @@

%Include qgsgeometryanalyzer.sip
%Include qgsoverlayanalyzer.sip

%Include qgszonalstatistics.sip
21 changes: 21 additions & 0 deletions python/analysis/qgszonalstatistics.sip
@@ -0,0 +1,21 @@
/** \ingroup analysis
* The QGis class that calculates raster statistics (count, sum, mean) for
* a polygon or multipolygon layer and appends the results as attributes
*/

class QgsZonalStatistics
{
%TypeHeaderCode
#include <qgszonalstatistics.h>
%End

public:

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

/**Starts the calculation
@return 0 in case of success*/
int calculateStatistics( QProgressDialog* p );
};

0 comments on commit 3cac713

Please sign in to comment.