QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Types | Public Member Functions | Static Public Member Functions | List of all members
QgsRasterCalcNode Class Reference

#include <qgsrastercalcnode.h>

Public Types

enum  Operator {
  opPLUS, opMINUS, opMUL, opDIV,
  opPOW, opSQRT, opSIN, opCOS,
  opTAN, opASIN, opACOS, opATAN,
  opEQ, opNE, opGT, opLT,
  opGE, opLE, opAND, opOR,
  opSIGN, opLOG, opLOG10, opNONE
}
 possible operators More...
 
enum  Type { tOperator = 1, tNumber, tRasterRef, tMatrix }
 defines possible types of node More...
 

Public Member Functions

 QgsRasterCalcNode ()=default
 Constructor for QgsRasterCalcNode. More...
 
 QgsRasterCalcNode (double number)
 
 QgsRasterCalcNode (QgsRasterMatrix *matrix)
 
 QgsRasterCalcNode (Operator op, QgsRasterCalcNode *left, QgsRasterCalcNode *right)
 
 QgsRasterCalcNode (const QString &rasterName)
 
 QgsRasterCalcNode (const QgsRasterCalcNode &rh)=delete
 QgsRasterCalcNode cannot be copied. More...
 
 ~QgsRasterCalcNode ()
 
bool calculate (QMap< QString, QgsRasterBlock * > &rasterData, QgsRasterMatrix &result, int row=-1) const
 Calculates result of raster calculation (might be real matrix or single number). More...
 
QList< const QgsRasterCalcNode * > findNodes (const QgsRasterCalcNode::Type type) const
 Returns a list of nodes of a specific type. More...
 
QgsRasterCalcNodeoperator= (const QgsRasterCalcNode &rh)=delete
 QgsRasterCalcNode cannot be copied. More...
 
void setLeft (QgsRasterCalcNode *left)
 
void setRight (QgsRasterCalcNode *right)
 
QString toString (bool cStyle=false) const
 Returns a string representation of the expression. More...
 
Type type () const
 

Static Public Member Functions

static QgsRasterCalcNodeparseRasterCalcString (const QString &str, QString &parserErrorMsg)
 

Detailed Description

Definition at line 35 of file qgsrastercalcnode.h.

Member Enumeration Documentation

possible operators

Enumerator
opPLUS 
opMINUS 
opMUL 
opDIV 
opPOW 
opSQRT 
opSIN 
opCOS 
opTAN 
opASIN 
opACOS 
opATAN 
opEQ 
opNE 
opGT 

=

opLT 
opGE 
opLE 
opAND 
opOR 
opSIGN 
opLOG 
opLOG10 
opNONE 

Definition at line 48 of file qgsrastercalcnode.h.

defines possible types of node

Enumerator
tOperator 
tNumber 
tRasterRef 
tMatrix 

Definition at line 39 of file qgsrastercalcnode.h.

Constructor & Destructor Documentation

QgsRasterCalcNode::QgsRasterCalcNode ( )
default

Constructor for QgsRasterCalcNode.

QgsRasterCalcNode::QgsRasterCalcNode ( double  number)

Definition at line 21 of file qgsrastercalcnode.cpp.

QgsRasterCalcNode::QgsRasterCalcNode ( QgsRasterMatrix matrix)

Definition at line 26 of file qgsrastercalcnode.cpp.

QgsRasterCalcNode::QgsRasterCalcNode ( Operator  op,
QgsRasterCalcNode left,
QgsRasterCalcNode right 
)

Definition at line 33 of file qgsrastercalcnode.cpp.

QgsRasterCalcNode::QgsRasterCalcNode ( const QString &  rasterName)

Definition at line 41 of file qgsrastercalcnode.cpp.

QgsRasterCalcNode::~QgsRasterCalcNode ( )

Definition at line 49 of file qgsrastercalcnode.cpp.

QgsRasterCalcNode::QgsRasterCalcNode ( const QgsRasterCalcNode rh)
delete

QgsRasterCalcNode cannot be copied.

Member Function Documentation

bool QgsRasterCalcNode::calculate ( QMap< QString, QgsRasterBlock * > &  rasterData,
QgsRasterMatrix result,
int  row = -1 
) const

Calculates result of raster calculation (might be real matrix or single number).

Parameters
rasterDatainput raster data references, map of raster name to raster data block
resultdestination raster matrix for calculation results
rowoptional row number to calculate for calculating result by rows, or -1 to calculate entire result
Note
not available in Python bindings
Since
QGIS 2.10

Definition at line 55 of file qgsrastercalcnode.cpp.

QList< const QgsRasterCalcNode * > QgsRasterCalcNode::findNodes ( const QgsRasterCalcNode::Type  type) const

Returns a list of nodes of a specific type.

Since
QGIS 3.4.4

Definition at line 312 of file qgsrastercalcnode.cpp.

QgsRasterCalcNode& QgsRasterCalcNode::operator= ( const QgsRasterCalcNode rh)
delete

QgsRasterCalcNode cannot be copied.

QgsRasterCalcNode * QgsRasterCalcNode::parseRasterCalcString ( const QString &  str,
QString &  parserErrorMsg 
)
static

Definition at line 324 of file qgsrastercalcnode.cpp.

void QgsRasterCalcNode::setLeft ( QgsRasterCalcNode left)
inline

Definition at line 95 of file qgsrastercalcnode.h.

void QgsRasterCalcNode::setRight ( QgsRasterCalcNode right)
inline

Definition at line 96 of file qgsrastercalcnode.h.

QString QgsRasterCalcNode::toString ( bool  cStyle = false) const

Returns a string representation of the expression.

Parameters
cStyleif true operators will follow C syntax
Since
QGIS 3.4.4

Definition at line 203 of file qgsrastercalcnode.cpp.

Type QgsRasterCalcNode::type ( ) const
inline

Definition at line 92 of file qgsrastercalcnode.h.


The documentation for this class was generated from the following files: