sipify analysis raster

This commit is contained in:
Denis Rouzaud 2017-06-21 09:55:29 +02:00
parent 537ef07c10
commit 2bf92f34f3
18 changed files with 612 additions and 211 deletions

View File

@ -1,17 +1,41 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsaspectfilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAspectFilter: QgsDerivativeFilter
{
%TypeHeaderCode
#include <qgsaspectfilter.h>
%Docstring
Calculates aspect values in a window of 3x3 cells based on first order derivatives in x- and y- directions. Direction is clockwise starting from north*
%End
%TypeHeaderCode
#include "qgsaspectfilter.h"
%End
public:
QgsAspectFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsAspectFilter();
/** Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 );
%Docstring
Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*
:rtype: float
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsaspectfilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,21 +1,47 @@
/** Adds the ability to calculate derivatives in x- and y-directions. Needs to be subclassed (e.g. for slope and aspect)*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsderivativefilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsDerivativeFilter : QgsNineCellFilter
{
%TypeHeaderCode
#include <qgsderivativefilter.h>
%Docstring
Adds the ability to calculate derivatives in x- and y-directions. Needs to be subclassed (e.g. for slope and aspect)*
%End
%TypeHeaderCode
#include "qgsderivativefilter.h"
%End
public:
QgsDerivativeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
virtual ~QgsDerivativeFilter();
//to be implemented by subclasses
virtual float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 ) = 0;
protected:
/** Calculates the first order derivative in x-direction according to Horn (1981)*/
float calcFirstDerX( float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 );
/** Calculates the first order derivative in y-direction according to Horn (1981)*/
%Docstring
Calculates the first order derivative in x-direction according to Horn (1981)
:rtype: float
%End
float calcFirstDerY( float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 );
%Docstring
Calculates the first order derivative in y-direction according to Horn (1981)
:rtype: float
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsderivativefilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,104 +1,140 @@
/**
* \class QgsKernelDensityEstimation
* \ingroup analysis
* Performs Kernel Density Estimation ("heatmap") calculations on a vector layer.
* @note added in QGIS 3.0
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgskde.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsKernelDensityEstimation
{
%TypeHeaderCode
#include <qgskde.h>
%Docstring
Performs Kernel Density Estimation ("heatmap") calculations on a vector layer.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgskde.h"
%End
public:
//! Kernel shape type
enum KernelShape
{
KernelQuartic, //!< Quartic kernel
KernelTriangular, //!< Triangular kernel
KernelUniform, //!< Uniform (flat) kernel
KernelTriweight, //!< Triweight kernel
KernelEpanechnikov, //!< Epanechnikov kernel
KernelQuartic,
KernelTriangular,
KernelUniform,
KernelTriweight,
KernelEpanechnikov,
};
//! Output values type
enum OutputValues
{
OutputRaw, //!< Output the raw KDE values
OutputScaled, //!< Output mathematically correct scaled values
OutputRaw,
OutputScaled,
};
//! Result of operation
enum Result
{
Success, //!< Operation completed successfully
DriverError, //!< Could not open the driver for the specified format
InvalidParameters, //!< Input parameters were not valid
FileCreationError, //!< Error creating output file
RasterIoError, //!< Error writing to raster
Success,
DriverError,
InvalidParameters,
FileCreationError,
RasterIoError,
};
//! KDE parameters
struct Parameters
{
//! Vector point layer
QgsVectorLayer *vectorLayer;
%Docstring
Vector point layer
%End
//! Fixed radius, in map units
double radius;
%Docstring
Fixed radius, in map units
%End
//! Field for radius, or empty if using a fixed radius
QString radiusField;
%Docstring
Field for radius, or empty if using a fixed radius
%End
//! Field name for weighting field, or empty if not using weights
QString weightField;
%Docstring
Field name for weighting field, or empty if not using weights
%End
//! Size of pixel in output file
double pixelSize;
%Docstring
Size of pixel in output file
%End
//! Kernel shape
QgsKernelDensityEstimation::KernelShape shape;
%Docstring
Kernel shape
%End
//! Decay ratio (Triangular kernels only)
double decayRatio;
%Docstring
Decay ratio (Triangular kernels only)
%End
//! Type of output value
QgsKernelDensityEstimation::OutputValues outputValues;
%Docstring
Type of output value
%End
};
/**
* Constructor for QgsKernelDensityEstimation. Requires a Parameters object specifying the options to use
* to generate the surface. The output path and file format are also required.
*/
QgsKernelDensityEstimation( const Parameters &parameters, const QString &outputFile, const QString &outputFormat );
%Docstring
Constructor for QgsKernelDensityEstimation. Requires a Parameters object specifying the options to use
to generate the surface. The output path and file format are also required.
%End
/**
* Runs the KDE calculation across the whole layer at once. Either call this method, or manually
* call run(), addFeature() and finalise() separately.
*/
Result run();
%Docstring
Runs the KDE calculation across the whole layer at once. Either call this method, or manually
call run(), addFeature() and finalise() separately.
:rtype: Result
%End
/**
* Prepares the output file for writing and setups up the surface calculation. This must be called
* before adding features via addFeature().
* @see addFeature()
* @see finalise()
*/
Result prepare();
%Docstring
Prepares the output file for writing and setups up the surface calculation. This must be called
before adding features via addFeature().
.. seealso:: addFeature()
.. seealso:: finalise()
:rtype: Result
%End
/**
* Adds a single feature to the KDE surface. prepare() must be called before adding features.
* @see prepare()
* @see finalise()
*/
Result addFeature( const QgsFeature &feature );
%Docstring
Adds a single feature to the KDE surface. prepare() must be called before adding features.
.. seealso:: prepare()
.. seealso:: finalise()
:rtype: Result
%End
/**
* Finalises the output file. Must be called after adding all features via addFeature().
* @see prepare()
* @see addFeature()
*/
Result finalise();
%Docstring
Finalises the output file. Must be called after adding all features via addFeature().
.. seealso:: prepare()
.. seealso:: addFeature()
:rtype: Result
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgskde.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,33 +1,88 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsninecellfilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsNineCellFilter
{
%Docstring
Base class for raster analysis methods that work with a 3x3 cell filter and calculate the value of each cell based on
the cell value and the eight neighbour cells. Common examples are slope and aspect calculation in DEMs. Subclasses only implement
the method that calculates the new value from the nine values. Everything else (reading file, writing file) is done by this subclass*
%End
%TypeHeaderCode
#include <qgsninecellfilter.h>
#include "qgsninecellfilter.h"
%End
public:
/** Constructor that takes input file, output file and output format (GDAL string)*/
QgsNineCellFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
%Docstring
Constructor that takes input file, output file and output format (GDAL string)
%End
virtual ~QgsNineCellFilter();
/** Starts the calculation, reads from mInputFile and stores the result in mOutputFile
@param p progress dialog that receives update and that is checked for abort. 0 if no progress bar is needed.
@return 0 in case of success*/
int processRaster( QProgressDialog *p );
%Docstring
Starts the calculation, reads from mInputFile and stores the result in mOutputFile
\param p progress dialog that receives update and that is checked for abort. 0 if no progress bar is needed.
:return: 0 in case of success*
:rtype: int
%End
double cellSizeX() const;
%Docstring
:rtype: float
%End
void setCellSizeX( double size );
double cellSizeY() const;
%Docstring
:rtype: float
%End
void setCellSizeY( double size );
double zFactor() const;
%Docstring
:rtype: float
%End
void setZFactor( double factor );
double inputNodataValue() const;
%Docstring
:rtype: float
%End
void setInputNodataValue( double value );
double outputNodataValue() const;
%Docstring
:rtype: float
%End
void setOutputNodataValue( double value );
/** Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
virtual float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 ) = 0;
%Docstring
Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*
:rtype: float
%End
protected:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsninecellfilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,10 +1,22 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsrastercalcnode.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsRasterCalcNode
{
%TypeHeaderCode
#include <qgsrastercalcnode.h>
#include "qgsrastercalcnode.h"
%End
public:
//! defines possible types of node
enum Type
{
tOperator,
@ -13,7 +25,6 @@ class QgsRasterCalcNode
tMatrix
};
//! possible operators
enum Operator
{
opPLUS,
@ -28,15 +39,17 @@ class QgsRasterCalcNode
opASIN,
opACOS,
opATAN,
opEQ, // =
opNE, //!=
opGT, // >
opLT, // <
opGE, // >=
opLE, // <=
opEQ,
opNE,
opGT,
opLT,
opGE,
opLE,
opAND,
opOR,
opSIGN, // change sign
opSIGN,
opLOG,
opLOG10,
opNONE,
};
@ -47,29 +60,31 @@ class QgsRasterCalcNode
QgsRasterCalcNode( const QString &rasterName );
~QgsRasterCalcNode();
Type type() const;
//set left node
Type type() const;
%Docstring
QgsRasterCalcNode cannot be copied
:rtype: Type
%End
void setLeft( QgsRasterCalcNode *left );
void setRight( QgsRasterCalcNode *right );
/** Calculates result (might be real matrix or single number)*/
// bool calculate( QMap<QString, QgsRasterCalculateInputMatrix*> &rasterData, QgsRasterMatrix &result ) const;
/** Calculates result of raster calculation (might be real matrix or single number).
* @param rasterData input raster data references, map of raster name to raster data block
* @param result destination raster matrix for calculation results
* @param row optional row number to calculate for calculating result by rows, or -1 to
* calculate entire result
* @note added in QGIS 2.10
* @note not available in Python bindings
*/
//bool calculate( QMap<QString, QgsRasterBlock* > &rasterData, QgsRasterMatrix &result, int row = -1 ) const;
static QgsRasterCalcNode *parseRasterCalcString( const QString &str, QString &parserErrorMsg ) /Factory/;
%Docstring
:rtype: QgsRasterCalcNode
%End
private:
QgsRasterCalcNode( const QgsRasterCalcNode &rh );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsrastercalcnode.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,3 +1,16 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsrastercalculator.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
struct QgsRasterCalculatorEntry
{
%TypeHeaderCode
@ -5,58 +18,70 @@ struct QgsRasterCalculatorEntry
%End
QString ref; //name
QgsRasterLayer *raster;
QgsRasterLayer *raster; //pointer to rasterlayer
int bandNumber; //raster band number
};
/** Raster calculator class*/
class QgsRasterCalculator
{
%TypeHeaderCode
#include <qgsrastercalculator.h>
%Docstring
Raster calculator class*
%End
%TypeHeaderCode
#include "qgsrastercalculator.h"
%End
public:
//! Result of the calculation
enum Result
{
Success, /*!< Calculation successful */
CreateOutputError, /*!< Error creating output data file */
InputLayerError, /*!< Error reading input layer */
Canceled, /*!< User canceled calculation */
ParserError, /*!< Error parsing formula */
MemoryError, /*!< Error allocating memory for result */
Success,
CreateOutputError,
InputLayerError,
Canceled,
ParserError,
MemoryError,
};
/** QgsRasterCalculator constructor.
* @param formulaString formula for raster calculation
* @param outputFile output file path
* @param outputFormat output file format
* @param outputExtent output extent. CRS for output is taken from first entry in rasterEntries.
* @param nOutputColumns number of columns in output raster
* @param nOutputRows number of rows in output raster
* @param rasterEntries list of referenced raster layers
*/
QgsRasterCalculator( const QString& formulaString, const QString& outputFile, const QString& outputFormat,
QgsRasterCalculator( const QString &formulaString, const QString &outputFile, const QString &outputFormat,
const QgsRectangle &outputExtent, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry> &rasterEntries );
%Docstring
QgsRasterCalculator constructor.
\param formulaString formula for raster calculation
\param outputFile output file path
\param outputFormat output file format
\param outputExtent output extent. CRS for output is taken from first entry in rasterEntries.
\param nOutputColumns number of columns in output raster
\param nOutputRows number of rows in output raster
\param rasterEntries list of referenced raster layers
%End
/** QgsRasterCalculator constructor.
* @param formulaString formula for raster calculation
* @param outputFile output file path
* @param outputFormat output file format
* @param outputExtent output extent, CRS is specified by outputCrs parameter
* @param outputCrs destination CRS for output raster
* @param nOutputColumns number of columns in output raster
* @param nOutputRows number of rows in output raster
* @param rasterEntries list of referenced raster layers
* @note added in QGIS 2.10
*/
QgsRasterCalculator( const QString& formulaString, const QString& outputFile, const QString& outputFormat,
QgsRasterCalculator( const QString &formulaString, const QString &outputFile, const QString &outputFormat,
const QgsRectangle &outputExtent, const QgsCoordinateReferenceSystem &outputCrs, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry> &rasterEntries );
%Docstring
QgsRasterCalculator constructor.
\param formulaString formula for raster calculation
\param outputFile output file path
\param outputFormat output file format
\param outputExtent output extent, CRS is specified by outputCrs parameter
\param outputCrs destination CRS for output raster
\param nOutputColumns number of columns in output raster
\param nOutputRows number of rows in output raster
\param rasterEntries list of referenced raster layers
.. versionadded:: 2.10
%End
/** Starts the calculation and writes new raster
@param p progress bar (or 0 if called from non-gui code)
@return 0 in case of success*/
int processCalculation( QProgressDialog *p = 0 );
%Docstring
:rtype: int
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsrastercalculator.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,9 +1,20 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsrastermatrix.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsRasterMatrix
{
%TypeHeaderCode
#include <qgsrastermatrix.h>
%End
%TypeHeaderCode
#include "qgsrastermatrix.h"
%End
public:
enum TwoArgOperator
@ -13,12 +24,12 @@ class QgsRasterMatrix
opMUL,
opDIV,
opPOW,
opEQ, // =
opNE, // != resp. <>
opGT, // >
opLT, // <
opGE, // >=
opLE, // <=
opEQ,
opNE,
opGT,
opLT,
opGE,
opLE,
opAND,
opOR
};
@ -32,60 +43,149 @@ class QgsRasterMatrix
opASIN,
opACOS,
opATAN,
opSIGN
opSIGN,
opLOG,
opLOG10,
};
/** Takes ownership of data array*/
QgsRasterMatrix();
//! @note note available in python bindings
// QgsRasterMatrix( int nCols, int nRows, float *data, double nodataValue );
%Docstring
Takes ownership of data array
%End
QgsRasterMatrix( const QgsRasterMatrix &m );
~QgsRasterMatrix();
/** Returns true if matrix is 1x1 (=scalar number)*/
bool isNumber() const;
%Docstring
Returns true if matrix is 1x1 (=scalar number)
:rtype: bool
%End
double number() const;
%Docstring
:rtype: float
%End
/** Returns data array (but not ownership)*/
//! @note not available in python bindings
// double *data();
/** Returns data and ownership. Sets data and nrows, ncols of this matrix to 0*/
//! @note not available in python bindings
// double *takeData();
void setData( int cols, int rows, double *data, double nodataValue );
int nColumns() const;
%Docstring
:rtype: int
%End
int nRows() const;
%Docstring
:rtype: int
%End
double nodataValue() const;
%Docstring
:rtype: float
%End
void setNodataValue( double d );
// QgsRasterMatrix &operator=( const QgsRasterMatrix &m );
/** Adds another matrix to this one*/
bool add( const QgsRasterMatrix &other );
/** Subtracts another matrix from this one*/
%Docstring
Adds another matrix to this one
:rtype: bool
%End
bool subtract( const QgsRasterMatrix &other );
%Docstring
Subtracts another matrix from this one
:rtype: bool
%End
bool multiply( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool divide( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool power( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool equal( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool notEqual( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool greaterThan( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool lesserThan( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool greaterEqual( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool lesserEqual( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool logicalAnd( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool logicalOr( const QgsRasterMatrix &other );
%Docstring
:rtype: bool
%End
bool squareRoot();
%Docstring
:rtype: bool
%End
bool sinus();
%Docstring
:rtype: bool
%End
bool asinus();
%Docstring
:rtype: bool
%End
bool cosinus();
%Docstring
:rtype: bool
%End
bool acosinus();
%Docstring
:rtype: bool
%End
bool tangens();
%Docstring
:rtype: bool
%End
bool atangens();
%Docstring
:rtype: bool
%End
bool changeSign();
%Docstring
:rtype: bool
%End
bool log();
%Docstring
:rtype: bool
%End
bool log10();
%Docstring
:rtype: bool
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsrastermatrix.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,9 +1,24 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsrelief.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsRelief
{
%TypeHeaderCode
#include <qgsrelief.h>
%Docstring
Produces colored relief rasters from DEM*
%End
%TypeHeaderCode
#include "qgsrelief.h"
%End
public:
struct ReliefColor
{
@ -16,27 +31,50 @@ class QgsRelief
QgsRelief( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsRelief();
/** Starts the calculation, reads from mInputFile and stores the result in mOutputFile
@param p progress dialog that receives update and that is checked for abort. 0 if no progress bar is needed.
@return 0 in case of success*/
int processRaster( QProgressDialog *p );
%Docstring
Starts the calculation, reads from mInputFile and stores the result in mOutputFile
\param p progress dialog that receives update and that is checked for abort. 0 if no progress bar is needed.
:return: 0 in case of success*
:rtype: int
%End
double zFactor() const;
%Docstring
:rtype: float
%End
void setZFactor( double factor );
void clearReliefColors();
void addReliefColorClass( const QgsRelief::ReliefColor &color );
QList< QgsRelief::ReliefColor > reliefColors() const;
%Docstring
:rtype: list of QgsRelief.ReliefColor
%End
void setReliefColors( const QList< QgsRelief::ReliefColor > &c );
/** Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression
@return true in case of success*/
QList< QgsRelief::ReliefColor > calculateOptimizedReliefClasses();
%Docstring
Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression
:return: true in case of success*
:rtype: list of QgsRelief.ReliefColor
%End
/** Write frequency of elevation values to file for manual inspection*/
bool exportFrequencyDistributionToCsv( const QString &file );
%Docstring
Write frequency of elevation values to file for manual inspection
:rtype: bool
%End
private:
QgsRelief( const QgsRelief &rh );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsrelief.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,17 +1,45 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsruggednessfilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsRuggednessFilter: QgsNineCellFilter
{
%TypeHeaderCode
#include <qgsruggednessfilter.h>
%Docstring
Calculates the ruggedness index based on a 3x3 moving window.
Algorithm from Riley et al. 1999: A terrain ruggedness index that quantifies topographic heterogeneity*
%End
%TypeHeaderCode
#include "qgsruggednessfilter.h"
%End
public:
QgsRuggednessFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsRuggednessFilter();
protected:
/** Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 );
%Docstring
Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*
:rtype: float
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsruggednessfilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,16 +1,41 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsslopefilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsSlopeFilter: QgsDerivativeFilter
{
%TypeHeaderCode
#include <qgsslopefilter.h>
%Docstring
Calculates slope values in a window of 3x3 cells based on first order derivatives in x- and y- directions*
%End
%TypeHeaderCode
#include "qgsslopefilter.h"
%End
public:
QgsSlopeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsSlopeFilter();
/** Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 );
%Docstring
Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*
:rtype: float
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgsslopefilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,17 +1,43 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgstotalcurvaturefilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsTotalCurvatureFilter: QgsNineCellFilter
{
%TypeHeaderCode
#include <qgstotalcurvaturefilter.h>
%Docstring
Calculates total curvature as described by Wilson, Gallant (2000): terrain analysis*
%End
%TypeHeaderCode
#include "qgstotalcurvaturefilter.h"
%End
public:
QgsTotalCurvatureFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsTotalCurvatureFilter();
protected:
/** Calculates total curvature from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 );
%Docstring
Calculates total curvature from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*
:rtype: float
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgstotalcurvaturefilter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -17,17 +17,6 @@ analysis/interpolation/qgsgridfilewriter.sip
analysis/interpolation/qgsinterpolator.sip
analysis/interpolation/qgsidwinterpolator.sip
analysis/interpolation/qgstininterpolator.sip
analysis/raster/qgsderivativefilter.sip
analysis/raster/qgsaspectfilter.sip
analysis/raster/qgskde.sip
analysis/raster/qgsninecellfilter.sip
analysis/raster/qgsrastercalcnode.sip
analysis/raster/qgsrastercalculator.sip
analysis/raster/qgsrastermatrix.sip
analysis/raster/qgsrelief.sip
analysis/raster/qgsruggednessfilter.sip
analysis/raster/qgsslopefilter.sip
analysis/raster/qgstotalcurvaturefilter.sip
server/qgsserverfilter.sip
server/qgsserverinterface.sip
server/qgsaccesscontrolfilter.sip

View File

@ -86,13 +86,13 @@ class ANALYSIS_EXPORT QgsKernelDensityEstimation
double pixelSize;
//! Kernel shape
KernelShape shape;
QgsKernelDensityEstimation::KernelShape shape;
//! Decay ratio (Triangular kernels only)
double decayRatio;
//! Type of output value
OutputValues outputValues;
QgsKernelDensityEstimation::OutputValues outputValues;
};
/**

View File

@ -103,6 +103,10 @@ class ANALYSIS_EXPORT QgsRasterCalcNode
static QgsRasterCalcNode *parseRasterCalcString( const QString &str, QString &parserErrorMsg ) SIP_FACTORY;
private:
#ifdef SIP_RUN
QgsRasterCalcNode( const QgsRasterCalcNode &rh );
#endif
Type mType;
QgsRasterCalcNode *mLeft = nullptr;
QgsRasterCalcNode *mRight = nullptr;

View File

@ -31,6 +31,12 @@ class QProgressDialog;
struct ANALYSIS_EXPORT QgsRasterCalculatorEntry
{
#ifdef SIP_RUN
% TypeHeaderCode
#include <qgsrastercalculator.h>
% End
#endif
QString ref; //name
QgsRasterLayer *raster; //pointer to rasterlayer
int bandNumber; //raster band number

View File

@ -61,8 +61,9 @@ class ANALYSIS_EXPORT QgsRasterMatrix
//! Takes ownership of data array
QgsRasterMatrix();
//! \note note available in Python bindings
QgsRasterMatrix( int nCols, int nRows, double *data, double nodataValue );
QgsRasterMatrix( int nCols, int nRows, double *data, double nodataValue ) SIP_SKIP;
QgsRasterMatrix( const QgsRasterMatrix &m );
~QgsRasterMatrix();

View File

@ -60,18 +60,21 @@ class ANALYSIS_EXPORT QgsRelief
void setZFactor( double factor ) { mZFactor = factor; }
void clearReliefColors();
void addReliefColorClass( const ReliefColor &color );
QList< ReliefColor > reliefColors() const { return mReliefColors; }
void setReliefColors( const QList< ReliefColor > &c ) { mReliefColors = c; }
void addReliefColorClass( const QgsRelief::ReliefColor &color );
QList< QgsRelief::ReliefColor > reliefColors() const { return mReliefColors; }
void setReliefColors( const QList< QgsRelief::ReliefColor > &c ) { mReliefColors = c; }
/** Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression
\returns true in case of success*/
QList< ReliefColor > calculateOptimizedReliefClasses();
QList< QgsRelief::ReliefColor > calculateOptimizedReliefClasses();
//! Write frequency of elevation values to file for manual inspection
bool exportFrequencyDistributionToCsv( const QString &file );
private:
#ifdef SIP_RUN
QgsRelief( const QgsRelief &rh );
#endif
QString mInputFile;
QString mOutputFile;

View File

@ -424,7 +424,7 @@ ACCEPTABLE_MISSING_DOCS = {
"QgsMapCanvasLayer": ["QgsMapCanvasLayer(QgsMapLayer *layer, bool visible=true, bool isInOverview=false)", "setVisible(bool visible)", "isVisible() const ", "setInOverview(bool isInOverview)", "layer()", "layer() const ", "isInOverview() const "],
"QgsMapRenderer": ["setOutputSize(QSizeF size, double dpi)", "destinationSrsChanged()", "mapUnitsChanged()", "clearLayerCoordinateTransforms()", "outputSizeF()", "height() const ", "transformation(const QgsMapLayer *layer) const ", "setOutputUnits(OutputUnits u)", "setMapUnits(Qgis::UnitType u)", "coordinateTransform()", "outputUnits() const ", "mapUnitsPerPixel() const ", "width() const ", "addLayerCoordinateTransform(const QString &layerId, const QString &srcAuthId, const QString &destAuthId, int srcDatumTransform=-1, int destDatumTransform=-1)", "setOutputSize(QSize size, int dpi)", "mapUnits() const "],
"QgsAttributeDialog": ["feature()", "attributeForm()"],
"QgsRelief": ["zFactor() const ", "setReliefColors(const QList< ReliefColor > &c)", "addReliefColorClass(const ReliefColor &color)", "clearReliefColors()", "setZFactor(double factor)", "QgsRelief(const QString &inputFile, const QString &outputFile, const QString &outputFormat)", "reliefColors() const "],
"QgsRelief": ["zFactor() const ", "setReliefColors(const QList< QgsRelief::ReliefColor > &c)", "addReliefColorClass(const QgsRelief::ReliefColor &color)", "clearReliefColors()", "setZFactor(double factor)", "QgsRelief(const QString &inputFile, const QString &outputFile, const QString &outputFormat)", "reliefColors() const "],
"QgsAlignRaster": ["gridOffset() const ", "None", "setGridOffset(QPointF offset)"],
"pal::GeomFunction": ["cross_product(double x1, double y1, double x2, double y2, double x3, double y3)", "dist_euc2d(double x1, double y1, double x2, double y2)", "findLineCircleIntersection(double cx, double cy, double radius, double x1, double y1, double x2, double y2, double &xRes, double &yRes)", "dist_euc2d_sq(double x1, double y1, double x2, double y2)"],
"QgsSizeScaleWidget": ["QgsSizeScaleWidget(const QgsVectorLayer *layer, const QgsSymbol *symbol)"],