mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
sipify analysis raster
This commit is contained in:
parent
537ef07c10
commit
2bf92f34f3
@ -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
|
class QgsAspectFilter: QgsDerivativeFilter
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsaspectfilter.h>
|
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
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsaspectfilter.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
QgsAspectFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
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
|
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
|
||||||
nodata value if not present or outside of the border. Must be implemented by subclasses*/
|
float *x12, float *x22, float *x32,
|
||||||
float processNineCellWindow( float* x11, float* x21, float* x31,
|
|
||||||
float* x12, float* x22, float* x32,
|
|
||||||
float *x13, float *x23, float *x33 );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -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
|
class QgsDerivativeFilter : QgsNineCellFilter
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsderivativefilter.h>
|
Adds the ability to calculate derivatives in x- and y-directions. Needs to be subclassed (e.g. for slope and aspect)*
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsderivativefilter.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
QgsDerivativeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
QgsDerivativeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
||||||
virtual ~QgsDerivativeFilter();
|
virtual ~QgsDerivativeFilter();
|
||||||
//to be implemented by subclasses
|
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
|
||||||
virtual float processNineCellWindow( float* x11, float* x21, float* x31,
|
float *x12, float *x22, float *x32,
|
||||||
float* x12, float* x22, float* x32,
|
|
||||||
float *x13, float *x23, float *x33 ) = 0;
|
float *x13, float *x23, float *x33 ) = 0;
|
||||||
|
|
||||||
protected:
|
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 );
|
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 );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -1,104 +1,140 @@
|
|||||||
/**
|
/************************************************************************
|
||||||
* \class QgsKernelDensityEstimation
|
* This file has been generated automatically from *
|
||||||
* \ingroup analysis
|
* *
|
||||||
* Performs Kernel Density Estimation ("heatmap") calculations on a vector layer.
|
* src/analysis/raster/qgskde.h *
|
||||||
* @note added in QGIS 3.0
|
* *
|
||||||
*/
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QgsKernelDensityEstimation
|
class QgsKernelDensityEstimation
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgskde.h>
|
Performs Kernel Density Estimation ("heatmap") calculations on a vector layer.
|
||||||
|
.. versionadded:: 3.0
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgskde.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Kernel shape type
|
|
||||||
enum KernelShape
|
enum KernelShape
|
||||||
{
|
{
|
||||||
KernelQuartic, //!< Quartic kernel
|
KernelQuartic,
|
||||||
KernelTriangular, //!< Triangular kernel
|
KernelTriangular,
|
||||||
KernelUniform, //!< Uniform (flat) kernel
|
KernelUniform,
|
||||||
KernelTriweight, //!< Triweight kernel
|
KernelTriweight,
|
||||||
KernelEpanechnikov, //!< Epanechnikov kernel
|
KernelEpanechnikov,
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Output values type
|
|
||||||
enum OutputValues
|
enum OutputValues
|
||||||
{
|
{
|
||||||
OutputRaw, //!< Output the raw KDE values
|
OutputRaw,
|
||||||
OutputScaled, //!< Output mathematically correct scaled values
|
OutputScaled,
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Result of operation
|
|
||||||
enum Result
|
enum Result
|
||||||
{
|
{
|
||||||
Success, //!< Operation completed successfully
|
Success,
|
||||||
DriverError, //!< Could not open the driver for the specified format
|
DriverError,
|
||||||
InvalidParameters, //!< Input parameters were not valid
|
InvalidParameters,
|
||||||
FileCreationError, //!< Error creating output file
|
FileCreationError,
|
||||||
RasterIoError, //!< Error writing to raster
|
RasterIoError,
|
||||||
};
|
};
|
||||||
|
|
||||||
//! KDE parameters
|
|
||||||
struct Parameters
|
struct Parameters
|
||||||
{
|
{
|
||||||
//! Vector point layer
|
|
||||||
QgsVectorLayer *vectorLayer;
|
QgsVectorLayer *vectorLayer;
|
||||||
|
%Docstring
|
||||||
|
Vector point layer
|
||||||
|
%End
|
||||||
|
|
||||||
//! Fixed radius, in map units
|
|
||||||
double radius;
|
double radius;
|
||||||
|
%Docstring
|
||||||
|
Fixed radius, in map units
|
||||||
|
%End
|
||||||
|
|
||||||
//! Field for radius, or empty if using a fixed radius
|
|
||||||
QString radiusField;
|
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;
|
QString weightField;
|
||||||
|
%Docstring
|
||||||
|
Field name for weighting field, or empty if not using weights
|
||||||
|
%End
|
||||||
|
|
||||||
//! Size of pixel in output file
|
|
||||||
double pixelSize;
|
double pixelSize;
|
||||||
|
%Docstring
|
||||||
|
Size of pixel in output file
|
||||||
|
%End
|
||||||
|
|
||||||
//! Kernel shape
|
|
||||||
QgsKernelDensityEstimation::KernelShape shape;
|
QgsKernelDensityEstimation::KernelShape shape;
|
||||||
|
%Docstring
|
||||||
|
Kernel shape
|
||||||
|
%End
|
||||||
|
|
||||||
//! Decay ratio (Triangular kernels only)
|
|
||||||
double decayRatio;
|
double decayRatio;
|
||||||
|
%Docstring
|
||||||
|
Decay ratio (Triangular kernels only)
|
||||||
|
%End
|
||||||
|
|
||||||
//! Type of output value
|
|
||||||
QgsKernelDensityEstimation::OutputValues outputValues;
|
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 ¶meters, const QString &outputFile, const QString &outputFormat );
|
QgsKernelDensityEstimation( const Parameters ¶meters, 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();
|
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();
|
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 );
|
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();
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -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
|
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
|
%TypeHeaderCode
|
||||||
#include <qgsninecellfilter.h>
|
#include "qgsninecellfilter.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
/** Constructor that takes input file, output file and output format (GDAL string)*/
|
|
||||||
QgsNineCellFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
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();
|
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 );
|
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;
|
double cellSizeX() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: float
|
||||||
|
%End
|
||||||
void setCellSizeX( double size );
|
void setCellSizeX( double size );
|
||||||
double cellSizeY() const;
|
double cellSizeY() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: float
|
||||||
|
%End
|
||||||
void setCellSizeY( double size );
|
void setCellSizeY( double size );
|
||||||
|
|
||||||
double zFactor() const;
|
double zFactor() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: float
|
||||||
|
%End
|
||||||
void setZFactor( double factor );
|
void setZFactor( double factor );
|
||||||
|
|
||||||
double inputNodataValue() const;
|
double inputNodataValue() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: float
|
||||||
|
%End
|
||||||
void setInputNodataValue( double value );
|
void setInputNodataValue( double value );
|
||||||
double outputNodataValue() const;
|
double outputNodataValue() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: float
|
||||||
|
%End
|
||||||
void setOutputNodataValue( double value );
|
void setOutputNodataValue( double value );
|
||||||
|
|
||||||
/** Calculates output value from nine input values. The input values and the output value can be equal to the
|
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
|
||||||
nodata value if not present or outside of the border. Must be implemented by subclasses*/
|
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;
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -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
|
class QgsRasterCalcNode
|
||||||
{
|
{
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgsrastercalcnode.h>
|
#include "qgsrastercalcnode.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
//! defines possible types of node
|
|
||||||
enum Type
|
enum Type
|
||||||
{
|
{
|
||||||
tOperator,
|
tOperator,
|
||||||
@ -13,7 +25,6 @@ class QgsRasterCalcNode
|
|||||||
tMatrix
|
tMatrix
|
||||||
};
|
};
|
||||||
|
|
||||||
//! possible operators
|
|
||||||
enum Operator
|
enum Operator
|
||||||
{
|
{
|
||||||
opPLUS,
|
opPLUS,
|
||||||
@ -28,15 +39,17 @@ class QgsRasterCalcNode
|
|||||||
opASIN,
|
opASIN,
|
||||||
opACOS,
|
opACOS,
|
||||||
opATAN,
|
opATAN,
|
||||||
opEQ, // =
|
opEQ,
|
||||||
opNE, //!=
|
opNE,
|
||||||
opGT, // >
|
opGT,
|
||||||
opLT, // <
|
opLT,
|
||||||
opGE, // >=
|
opGE,
|
||||||
opLE, // <=
|
opLE,
|
||||||
opAND,
|
opAND,
|
||||||
opOR,
|
opOR,
|
||||||
opSIGN, // change sign
|
opSIGN,
|
||||||
|
opLOG,
|
||||||
|
opLOG10,
|
||||||
opNONE,
|
opNONE,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -47,29 +60,31 @@ class QgsRasterCalcNode
|
|||||||
QgsRasterCalcNode( const QString &rasterName );
|
QgsRasterCalcNode( const QString &rasterName );
|
||||||
~QgsRasterCalcNode();
|
~QgsRasterCalcNode();
|
||||||
|
|
||||||
Type type() const;
|
|
||||||
|
|
||||||
//set left node
|
Type type() const;
|
||||||
|
%Docstring
|
||||||
|
QgsRasterCalcNode cannot be copied
|
||||||
|
:rtype: Type
|
||||||
|
%End
|
||||||
|
|
||||||
void setLeft( QgsRasterCalcNode *left );
|
void setLeft( QgsRasterCalcNode *left );
|
||||||
void setRight( QgsRasterCalcNode *right );
|
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/;
|
static QgsRasterCalcNode *parseRasterCalcString( const QString &str, QString &parserErrorMsg ) /Factory/;
|
||||||
|
%Docstring
|
||||||
|
:rtype: QgsRasterCalcNode
|
||||||
|
%End
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
QgsRasterCalcNode( const QgsRasterCalcNode &rh );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -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
|
struct QgsRasterCalculatorEntry
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
@ -5,58 +18,70 @@ struct QgsRasterCalculatorEntry
|
|||||||
%End
|
%End
|
||||||
|
|
||||||
QString ref; //name
|
QString ref; //name
|
||||||
QgsRasterLayer *raster;
|
QgsRasterLayer *raster; //pointer to rasterlayer
|
||||||
int bandNumber; //raster band number
|
int bandNumber; //raster band number
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Raster calculator class*/
|
|
||||||
class QgsRasterCalculator
|
class QgsRasterCalculator
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsrastercalculator.h>
|
Raster calculator class*
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsrastercalculator.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Result of the calculation
|
|
||||||
enum Result
|
enum Result
|
||||||
{
|
{
|
||||||
Success, /*!< Calculation successful */
|
Success,
|
||||||
CreateOutputError, /*!< Error creating output data file */
|
CreateOutputError,
|
||||||
InputLayerError, /*!< Error reading input layer */
|
InputLayerError,
|
||||||
Canceled, /*!< User canceled calculation */
|
Canceled,
|
||||||
ParserError, /*!< Error parsing formula */
|
ParserError,
|
||||||
MemoryError, /*!< Error allocating memory for result */
|
MemoryError,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** QgsRasterCalculator constructor.
|
QgsRasterCalculator( const QString &formulaString, const QString &outputFile, const QString &outputFormat,
|
||||||
* @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,
|
|
||||||
const QgsRectangle &outputExtent, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry> &rasterEntries );
|
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.
|
QgsRasterCalculator( const QString &formulaString, const QString &outputFile, const QString &outputFormat,
|
||||||
* @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,
|
|
||||||
const QgsRectangle &outputExtent, const QgsCoordinateReferenceSystem &outputCrs, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry> &rasterEntries );
|
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 );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -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
|
class QgsRasterMatrix
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
|
||||||
#include <qgsrastermatrix.h>
|
|
||||||
%End
|
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsrastermatrix.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum TwoArgOperator
|
enum TwoArgOperator
|
||||||
@ -13,12 +24,12 @@ class QgsRasterMatrix
|
|||||||
opMUL,
|
opMUL,
|
||||||
opDIV,
|
opDIV,
|
||||||
opPOW,
|
opPOW,
|
||||||
opEQ, // =
|
opEQ,
|
||||||
opNE, // != resp. <>
|
opNE,
|
||||||
opGT, // >
|
opGT,
|
||||||
opLT, // <
|
opLT,
|
||||||
opGE, // >=
|
opGE,
|
||||||
opLE, // <=
|
opLE,
|
||||||
opAND,
|
opAND,
|
||||||
opOR
|
opOR
|
||||||
};
|
};
|
||||||
@ -32,60 +43,149 @@ class QgsRasterMatrix
|
|||||||
opASIN,
|
opASIN,
|
||||||
opACOS,
|
opACOS,
|
||||||
opATAN,
|
opATAN,
|
||||||
opSIGN
|
opSIGN,
|
||||||
|
opLOG,
|
||||||
|
opLOG10,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Takes ownership of data array*/
|
|
||||||
QgsRasterMatrix();
|
QgsRasterMatrix();
|
||||||
//! @note note available in python bindings
|
%Docstring
|
||||||
// QgsRasterMatrix( int nCols, int nRows, float *data, double nodataValue );
|
Takes ownership of data array
|
||||||
|
%End
|
||||||
|
|
||||||
QgsRasterMatrix( const QgsRasterMatrix &m );
|
QgsRasterMatrix( const QgsRasterMatrix &m );
|
||||||
~QgsRasterMatrix();
|
~QgsRasterMatrix();
|
||||||
|
|
||||||
/** Returns true if matrix is 1x1 (=scalar number)*/
|
|
||||||
bool isNumber() const;
|
bool isNumber() const;
|
||||||
|
%Docstring
|
||||||
|
Returns true if matrix is 1x1 (=scalar number)
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
double number() const;
|
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 );
|
void setData( int cols, int rows, double *data, double nodataValue );
|
||||||
|
|
||||||
int nColumns() const;
|
int nColumns() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: int
|
||||||
|
%End
|
||||||
int nRows() const;
|
int nRows() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: int
|
||||||
|
%End
|
||||||
|
|
||||||
double nodataValue() const;
|
double nodataValue() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: float
|
||||||
|
%End
|
||||||
void setNodataValue( double d );
|
void setNodataValue( double d );
|
||||||
|
|
||||||
// QgsRasterMatrix &operator=( const QgsRasterMatrix &m );
|
|
||||||
/** Adds another matrix to this one*/
|
|
||||||
bool add( const QgsRasterMatrix &other );
|
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 );
|
bool subtract( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
Subtracts another matrix from this one
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool multiply( const QgsRasterMatrix &other );
|
bool multiply( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool divide( const QgsRasterMatrix &other );
|
bool divide( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool power( const QgsRasterMatrix &other );
|
bool power( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool equal( const QgsRasterMatrix &other );
|
bool equal( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool notEqual( const QgsRasterMatrix &other );
|
bool notEqual( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool greaterThan( const QgsRasterMatrix &other );
|
bool greaterThan( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool lesserThan( const QgsRasterMatrix &other );
|
bool lesserThan( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool greaterEqual( const QgsRasterMatrix &other );
|
bool greaterEqual( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool lesserEqual( const QgsRasterMatrix &other );
|
bool lesserEqual( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool logicalAnd( const QgsRasterMatrix &other );
|
bool logicalAnd( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool logicalOr( const QgsRasterMatrix &other );
|
bool logicalOr( const QgsRasterMatrix &other );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
bool squareRoot();
|
bool squareRoot();
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool sinus();
|
bool sinus();
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool asinus();
|
bool asinus();
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool cosinus();
|
bool cosinus();
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool acosinus();
|
bool acosinus();
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool tangens();
|
bool tangens();
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool atangens();
|
bool atangens();
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool changeSign();
|
bool changeSign();
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool log();
|
bool log();
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
bool log10();
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -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
|
class QgsRelief
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsrelief.h>
|
Produces colored relief rasters from DEM*
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsrelief.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
struct ReliefColor
|
struct ReliefColor
|
||||||
{
|
{
|
||||||
@ -16,27 +31,50 @@ class QgsRelief
|
|||||||
QgsRelief( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
QgsRelief( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
||||||
~QgsRelief();
|
~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 );
|
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;
|
double zFactor() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: float
|
||||||
|
%End
|
||||||
void setZFactor( double factor );
|
void setZFactor( double factor );
|
||||||
|
|
||||||
void clearReliefColors();
|
void clearReliefColors();
|
||||||
void addReliefColorClass( const QgsRelief::ReliefColor &color );
|
void addReliefColorClass( const QgsRelief::ReliefColor &color );
|
||||||
QList< QgsRelief::ReliefColor > reliefColors() const;
|
QList< QgsRelief::ReliefColor > reliefColors() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: list of QgsRelief.ReliefColor
|
||||||
|
%End
|
||||||
void setReliefColors( const QList< QgsRelief::ReliefColor > &c );
|
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();
|
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 );
|
bool exportFrequencyDistributionToCsv( const QString &file );
|
||||||
|
%Docstring
|
||||||
|
Write frequency of elevation values to file for manual inspection
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
QgsRelief( const QgsRelief &rh );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -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
|
class QgsRuggednessFilter: QgsNineCellFilter
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsruggednessfilter.h>
|
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
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsruggednessfilter.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
QgsRuggednessFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
QgsRuggednessFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
||||||
~QgsRuggednessFilter();
|
~QgsRuggednessFilter();
|
||||||
|
|
||||||
protected:
|
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*/
|
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
|
||||||
float processNineCellWindow( float* x11, float* x21, float* x31,
|
float *x12, float *x22, float *x32,
|
||||||
float* x12, float* x22, float* x32,
|
|
||||||
float *x13, float *x23, float *x33 );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -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
|
class QgsSlopeFilter: QgsDerivativeFilter
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsslopefilter.h>
|
Calculates slope values in a window of 3x3 cells based on first order derivatives in x- and y- directions*
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsslopefilter.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
QgsSlopeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
QgsSlopeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
||||||
~QgsSlopeFilter();
|
~QgsSlopeFilter();
|
||||||
|
|
||||||
/** Calculates output value from nine input values. The input values and the output value can be equal to the
|
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
|
||||||
nodata value if not present or outside of the border. Must be implemented by subclasses*/
|
float *x12, float *x22, float *x32,
|
||||||
float processNineCellWindow( float* x11, float* x21, float* x31,
|
|
||||||
float* x12, float* x22, float* x32,
|
|
||||||
float *x13, float *x23, float *x33 );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -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
|
class QgsTotalCurvatureFilter: QgsNineCellFilter
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgstotalcurvaturefilter.h>
|
Calculates total curvature as described by Wilson, Gallant (2000): terrain analysis*
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgstotalcurvaturefilter.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
QgsTotalCurvatureFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
QgsTotalCurvatureFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
|
||||||
~QgsTotalCurvatureFilter();
|
~QgsTotalCurvatureFilter();
|
||||||
|
|
||||||
protected:
|
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*/
|
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
|
||||||
float processNineCellWindow( float* x11, float* x21, float* x31,
|
float *x12, float *x22, float *x32,
|
||||||
float* x12, float* x22, float* x32,
|
|
||||||
float *x13, float *x23, float *x33 );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
@ -17,17 +17,6 @@ analysis/interpolation/qgsgridfilewriter.sip
|
|||||||
analysis/interpolation/qgsinterpolator.sip
|
analysis/interpolation/qgsinterpolator.sip
|
||||||
analysis/interpolation/qgsidwinterpolator.sip
|
analysis/interpolation/qgsidwinterpolator.sip
|
||||||
analysis/interpolation/qgstininterpolator.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/qgsserverfilter.sip
|
||||||
server/qgsserverinterface.sip
|
server/qgsserverinterface.sip
|
||||||
server/qgsaccesscontrolfilter.sip
|
server/qgsaccesscontrolfilter.sip
|
||||||
|
@ -86,13 +86,13 @@ class ANALYSIS_EXPORT QgsKernelDensityEstimation
|
|||||||
double pixelSize;
|
double pixelSize;
|
||||||
|
|
||||||
//! Kernel shape
|
//! Kernel shape
|
||||||
KernelShape shape;
|
QgsKernelDensityEstimation::KernelShape shape;
|
||||||
|
|
||||||
//! Decay ratio (Triangular kernels only)
|
//! Decay ratio (Triangular kernels only)
|
||||||
double decayRatio;
|
double decayRatio;
|
||||||
|
|
||||||
//! Type of output value
|
//! Type of output value
|
||||||
OutputValues outputValues;
|
QgsKernelDensityEstimation::OutputValues outputValues;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,6 +103,10 @@ class ANALYSIS_EXPORT QgsRasterCalcNode
|
|||||||
static QgsRasterCalcNode *parseRasterCalcString( const QString &str, QString &parserErrorMsg ) SIP_FACTORY;
|
static QgsRasterCalcNode *parseRasterCalcString( const QString &str, QString &parserErrorMsg ) SIP_FACTORY;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
#ifdef SIP_RUN
|
||||||
|
QgsRasterCalcNode( const QgsRasterCalcNode &rh );
|
||||||
|
#endif
|
||||||
|
|
||||||
Type mType;
|
Type mType;
|
||||||
QgsRasterCalcNode *mLeft = nullptr;
|
QgsRasterCalcNode *mLeft = nullptr;
|
||||||
QgsRasterCalcNode *mRight = nullptr;
|
QgsRasterCalcNode *mRight = nullptr;
|
||||||
|
@ -31,6 +31,12 @@ class QProgressDialog;
|
|||||||
|
|
||||||
struct ANALYSIS_EXPORT QgsRasterCalculatorEntry
|
struct ANALYSIS_EXPORT QgsRasterCalculatorEntry
|
||||||
{
|
{
|
||||||
|
#ifdef SIP_RUN
|
||||||
|
% TypeHeaderCode
|
||||||
|
#include <qgsrastercalculator.h>
|
||||||
|
% End
|
||||||
|
#endif
|
||||||
|
|
||||||
QString ref; //name
|
QString ref; //name
|
||||||
QgsRasterLayer *raster; //pointer to rasterlayer
|
QgsRasterLayer *raster; //pointer to rasterlayer
|
||||||
int bandNumber; //raster band number
|
int bandNumber; //raster band number
|
||||||
|
@ -61,8 +61,9 @@ class ANALYSIS_EXPORT QgsRasterMatrix
|
|||||||
|
|
||||||
//! Takes ownership of data array
|
//! Takes ownership of data array
|
||||||
QgsRasterMatrix();
|
QgsRasterMatrix();
|
||||||
|
|
||||||
//! \note note available in Python bindings
|
//! \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( const QgsRasterMatrix &m );
|
||||||
~QgsRasterMatrix();
|
~QgsRasterMatrix();
|
||||||
|
|
||||||
|
@ -60,18 +60,21 @@ class ANALYSIS_EXPORT QgsRelief
|
|||||||
void setZFactor( double factor ) { mZFactor = factor; }
|
void setZFactor( double factor ) { mZFactor = factor; }
|
||||||
|
|
||||||
void clearReliefColors();
|
void clearReliefColors();
|
||||||
void addReliefColorClass( const ReliefColor &color );
|
void addReliefColorClass( const QgsRelief::ReliefColor &color );
|
||||||
QList< ReliefColor > reliefColors() const { return mReliefColors; }
|
QList< QgsRelief::ReliefColor > reliefColors() const { return mReliefColors; }
|
||||||
void setReliefColors( const QList< ReliefColor > &c ) { mReliefColors = c; }
|
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
|
/** Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression
|
||||||
\returns true in case of success*/
|
\returns true in case of success*/
|
||||||
QList< ReliefColor > calculateOptimizedReliefClasses();
|
QList< QgsRelief::ReliefColor > calculateOptimizedReliefClasses();
|
||||||
|
|
||||||
//! Write frequency of elevation values to file for manual inspection
|
//! Write frequency of elevation values to file for manual inspection
|
||||||
bool exportFrequencyDistributionToCsv( const QString &file );
|
bool exportFrequencyDistributionToCsv( const QString &file );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
#ifdef SIP_RUN
|
||||||
|
QgsRelief( const QgsRelief &rh );
|
||||||
|
#endif
|
||||||
|
|
||||||
QString mInputFile;
|
QString mInputFile;
|
||||||
QString mOutputFile;
|
QString mOutputFile;
|
||||||
|
@ -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 "],
|
"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 "],
|
"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()"],
|
"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)"],
|
"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)"],
|
"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)"],
|
"QgsSizeScaleWidget": ["QgsSizeScaleWidget(const QgsVectorLayer *layer, const QgsSymbol *symbol)"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user