QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
Represents a node in a raster calculator. More...
#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 , opABS , opMAX , opMIN , 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 (const QgsRasterCalcNode &rh)=delete | |
QgsRasterCalcNode cannot be copied. More... | |
QgsRasterCalcNode (const QString &rasterName) | |
QgsRasterCalcNode (double number) | |
QgsRasterCalcNode (Operator op, QgsRasterCalcNode *left, QgsRasterCalcNode *right) | |
QgsRasterCalcNode (QgsRasterMatrix *matrix) | |
~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... | |
QgsRasterCalcNode & | operator= (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 QgsRasterCalcNode * | parseRasterCalcString (const QString &str, QString &parserErrorMsg) |
Represents a node in a raster calculator.
Definition at line 36 of file qgsrastercalcnode.h.
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 | |
opABS | |
opMAX | |
opMIN | |
opNONE |
Definition at line 49 of file qgsrastercalcnode.h.
defines possible types of node
Enumerator | |
---|---|
tOperator | |
tNumber | |
tRasterRef | |
tMatrix |
Definition at line 40 of file qgsrastercalcnode.h.
|
default |
Constructor for QgsRasterCalcNode.
QgsRasterCalcNode::QgsRasterCalcNode | ( | double | number | ) |
Definition at line 19 of file qgsrastercalcnode.cpp.
QgsRasterCalcNode::QgsRasterCalcNode | ( | QgsRasterMatrix * | matrix | ) |
Definition at line 24 of file qgsrastercalcnode.cpp.
QgsRasterCalcNode::QgsRasterCalcNode | ( | Operator | op, |
QgsRasterCalcNode * | left, | ||
QgsRasterCalcNode * | right | ||
) |
Definition at line 31 of file qgsrastercalcnode.cpp.
QgsRasterCalcNode::QgsRasterCalcNode | ( | const QString & | rasterName | ) |
Definition at line 39 of file qgsrastercalcnode.cpp.
QgsRasterCalcNode::~QgsRasterCalcNode | ( | ) |
Definition at line 47 of file qgsrastercalcnode.cpp.
|
delete |
QgsRasterCalcNode cannot be copied.
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).
rasterData | input raster data references, map of raster name to raster data block |
result | destination raster matrix for calculation results |
row | optional row number to calculate for calculating result by rows, or -1 to calculate entire result |
Definition at line 53 of file qgsrastercalcnode.cpp.
QList< const QgsRasterCalcNode * > QgsRasterCalcNode::findNodes | ( | const QgsRasterCalcNode::Type | type | ) | const |
Returns a list of nodes of a specific type.
Definition at line 367 of file qgsrastercalcnode.cpp.
|
delete |
QgsRasterCalcNode cannot be copied.
|
static |
Definition at line 379 of file qgsrastercalcnode.cpp.
|
inline |
Definition at line 99 of file qgsrastercalcnode.h.
|
inline |
Definition at line 100 of file qgsrastercalcnode.h.
QString QgsRasterCalcNode::toString | ( | bool | cStyle = false | ) | const |
Returns a string representation of the expression.
cStyle | if true operators will follow C syntax |
Definition at line 214 of file qgsrastercalcnode.cpp.
|
inline |
Definition at line 96 of file qgsrastercalcnode.h.