18 #ifndef QGSZONALSTATISTICS_H
19 #define QGSZONALSTATISTICS_H
26 class QProgressDialog;
37 int calculateStatistics( QProgressDialog* p );
43 int cellInfoForBBox(
const QgsRectangle& rasterBBox,
const QgsRectangle& featureBBox,
double cellSizeX,
double cellSizeY,
44 int& offsetX,
int& offsetY,
int& nCellsX,
int& nCellsY )
const;
47 void statisticsFromMiddlePointTest(
void* band,
QgsGeometry* poly,
int pixelOffsetX,
int pixelOffsetY,
int nCellsX,
int nCellsY,
48 double cellSizeX,
double cellSizeY,
const QgsRectangle& rasterBBox,
double& sum,
double& count );
50 void statisticsFromMiddlePointTest_improved(
void* band,
QgsGeometry* poly,
int pixelOffsetX,
int pixelOffsetY,
int nCellsX,
int nCellsY,
51 double cellSizeX,
double cellSizeY,
const QgsRectangle& rasterBBox,
double& sum,
double& count );
54 void statisticsFromPreciseIntersection(
void* band,
QgsGeometry* poly,
int pixelOffsetX,
int pixelOffsetY,
int nCellsX,
int nCellsY,
55 double cellSizeX,
double cellSizeY,
const QgsRectangle& rasterBBox,
double& sum,
double& count );
58 bool validPixel(
float value )
const;
60 QString getUniqueFieldName( QString fieldName );
62 QString mRasterFilePath;
66 QString mAttributePrefix;
68 float mInputNodataValue;
72 #endif // QGSZONALSTATISTICS_H