Skip to content

Commit

Permalink
include gdal_version and add private constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 29, 2017
1 parent 9b46d9d commit 88a6d2b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
6 changes: 5 additions & 1 deletion python/analysis/raster/qgsalignraster.sip
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class QgsAlignRaster

%TypeHeaderCode
#include "qgsalignraster.h"

#include <gdal_version.h>"
%End
public:
QgsAlignRaster();
Expand Down Expand Up @@ -94,6 +96,8 @@ Get raster value at the given coordinates (from the first band)

protected:

private:
RasterInfo( const QgsAlignRaster::RasterInfo &rh );
};


Expand Down Expand Up @@ -125,7 +129,7 @@ filename of the source raster
%Docstring
filename of the newly created aligned raster (will be overwritten if exists already)
%End
ResampleAlg resampleMethod;
QgsAlignRaster::ResampleAlg resampleMethod;
%Docstring
resampling method to be used
%End
Expand Down
7 changes: 5 additions & 2 deletions python/analysis/vector/qgszonalstatistics.sip
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ class QgsZonalStatistics
typedef QFlags<QgsZonalStatistics::Statistic> Statistics;


QgsZonalStatistics( QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix = "", int rasterBand = 1,
Statistics stats = Statistics( Count | Sum | Mean ) );
QgsZonalStatistics( QgsVectorLayer *polygonLayer,
QgsRasterLayer *rasterLayer,
const QString &attributePrefix = "",
int rasterBand = 1,
QgsZonalStatistics::Statistics stats = QgsZonalStatistics::Statistics( QgsZonalStatistics::Count | QgsZonalStatistics::Sum | QgsZonalStatistics::Mean ) );
%Docstring
Constructor for QgsZonalStatistics.
%End
Expand Down
9 changes: 8 additions & 1 deletion src/analysis/raster/qgsalignraster.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ typedef void *GDALDatasetH SIP_SKIP;
*/
class ANALYSIS_EXPORT QgsAlignRaster
{
#ifdef SIP_RUN
#include <gdal_version.h>"
#endif
public:
QgsAlignRaster();
Expand Down Expand Up @@ -91,6 +95,9 @@ class ANALYSIS_EXPORT QgsAlignRaster
int mBandCnt;
private:
#ifdef SIP_RUN
RasterInfo( const QgsAlignRaster::RasterInfo &rh );
#endif
friend class QgsAlignRaster;
};
Expand Down Expand Up @@ -130,7 +137,7 @@ class ANALYSIS_EXPORT QgsAlignRaster
//! filename of the newly created aligned raster (will be overwritten if exists already)
QString outputFilename;
//! resampling method to be used
ResampleAlg resampleMethod;
QgsAlignRaster::ResampleAlg resampleMethod;
//! rescaling of values according to the change of pixel size
bool rescaleValues;
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/vector/qgszonalstatistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <QProgressDialog>
#include <QFile>

QgsZonalStatistics::QgsZonalStatistics( QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix, int rasterBand, Statistics stats )
QgsZonalStatistics::QgsZonalStatistics( QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix, int rasterBand, QgsZonalStatistics::Statistics stats )
: mRasterLayer( rasterLayer )
, mRasterBand( rasterBand )
, mPolygonLayer( polygonLayer )
Expand Down
7 changes: 5 additions & 2 deletions src/analysis/vector/qgszonalstatistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ class ANALYSIS_EXPORT QgsZonalStatistics
/**
* Constructor for QgsZonalStatistics.
*/
QgsZonalStatistics( QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix = "", int rasterBand = 1,
Statistics stats = Statistics( Count | Sum | Mean ) );
QgsZonalStatistics( QgsVectorLayer *polygonLayer,
QgsRasterLayer *rasterLayer,
const QString &attributePrefix = "",
int rasterBand = 1,
QgsZonalStatistics::Statistics stats = QgsZonalStatistics::Statistics( QgsZonalStatistics::Count | QgsZonalStatistics::Sum | QgsZonalStatistics::Mean ) );

/** Starts the calculation
\returns 0 in case of success*/
Expand Down

0 comments on commit 88a6d2b

Please sign in to comment.