Skip to content

Commit 88a6d2b

Browse files
committedMay 29, 2017
include gdal_version and add private constructor
1 parent 9b46d9d commit 88a6d2b

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
lines changed
 

‎python/analysis/raster/qgsalignraster.sip

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class QgsAlignRaster
2525

2626
%TypeHeaderCode
2727
#include "qgsalignraster.h"
28+
29+
#include <gdal_version.h>"
2830
%End
2931
public:
3032
QgsAlignRaster();
@@ -94,6 +96,8 @@ Get raster value at the given coordinates (from the first band)
9496

9597
protected:
9698

99+
private:
100+
RasterInfo( const QgsAlignRaster::RasterInfo &rh );
97101
};
98102

99103

@@ -125,7 +129,7 @@ filename of the source raster
125129
%Docstring
126130
filename of the newly created aligned raster (will be overwritten if exists already)
127131
%End
128-
ResampleAlg resampleMethod;
132+
QgsAlignRaster::ResampleAlg resampleMethod;
129133
%Docstring
130134
resampling method to be used
131135
%End

‎python/analysis/vector/qgszonalstatistics.sip

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ class QgsZonalStatistics
3939
typedef QFlags<QgsZonalStatistics::Statistic> Statistics;
4040

4141

42-
QgsZonalStatistics( QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix = "", int rasterBand = 1,
43-
Statistics stats = Statistics( Count | Sum | Mean ) );
42+
QgsZonalStatistics( QgsVectorLayer *polygonLayer,
43+
QgsRasterLayer *rasterLayer,
44+
const QString &attributePrefix = "",
45+
int rasterBand = 1,
46+
QgsZonalStatistics::Statistics stats = QgsZonalStatistics::Statistics( QgsZonalStatistics::Count | QgsZonalStatistics::Sum | QgsZonalStatistics::Mean ) );
4447
%Docstring
4548
Constructor for QgsZonalStatistics.
4649
%End

‎src/analysis/raster/qgsalignraster.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ typedef void *GDALDatasetH SIP_SKIP;
4040
*/
4141
class ANALYSIS_EXPORT QgsAlignRaster
4242
{
43+
#ifdef SIP_RUN
44+
#include <gdal_version.h>"
45+
#endif
46+
4347
public:
4448
QgsAlignRaster();
4549
@@ -91,6 +95,9 @@ class ANALYSIS_EXPORT QgsAlignRaster
9195
int mBandCnt;
9296
9397
private:
98+
#ifdef SIP_RUN
99+
RasterInfo( const QgsAlignRaster::RasterInfo &rh );
100+
#endif
94101
95102
friend class QgsAlignRaster;
96103
};
@@ -130,7 +137,7 @@ class ANALYSIS_EXPORT QgsAlignRaster
130137
//! filename of the newly created aligned raster (will be overwritten if exists already)
131138
QString outputFilename;
132139
//! resampling method to be used
133-
ResampleAlg resampleMethod;
140+
QgsAlignRaster::ResampleAlg resampleMethod;
134141
//! rescaling of values according to the change of pixel size
135142
bool rescaleValues;
136143

‎src/analysis/vector/qgszonalstatistics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <QProgressDialog>
3030
#include <QFile>
3131

32-
QgsZonalStatistics::QgsZonalStatistics( QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix, int rasterBand, Statistics stats )
32+
QgsZonalStatistics::QgsZonalStatistics( QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix, int rasterBand, QgsZonalStatistics::Statistics stats )
3333
: mRasterLayer( rasterLayer )
3434
, mRasterBand( rasterBand )
3535
, mPolygonLayer( polygonLayer )

‎src/analysis/vector/qgszonalstatistics.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ class ANALYSIS_EXPORT QgsZonalStatistics
5959
/**
6060
* Constructor for QgsZonalStatistics.
6161
*/
62-
QgsZonalStatistics( QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix = "", int rasterBand = 1,
63-
Statistics stats = Statistics( Count | Sum | Mean ) );
62+
QgsZonalStatistics( QgsVectorLayer *polygonLayer,
63+
QgsRasterLayer *rasterLayer,
64+
const QString &attributePrefix = "",
65+
int rasterBand = 1,
66+
QgsZonalStatistics::Statistics stats = QgsZonalStatistics::Statistics( QgsZonalStatistics::Count | QgsZonalStatistics::Sum | QgsZonalStatistics::Mean ) );
6467

6568
/** Starts the calculation
6669
\returns 0 in case of success*/

0 commit comments

Comments
 (0)
Please sign in to comment.