QGIS API Documentation  2.99.0-Master (5169e0d)
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 ()
 
 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...
 
QgsRasterCalcNodeoperator= (const QgsRasterCalcNode &rh)=delete
 QgsRasterCalcNode cannot be copied. More...
 
void setLeft (QgsRasterCalcNode *left)
 
void setRight (QgsRasterCalcNode *right)
 
Type type () const
 

Static Public Member Functions

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

Detailed Description

Definition at line 32 of file qgsrastercalcnode.h.

Member Enumeration Documentation

◆ Operator

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 45 of file qgsrastercalcnode.h.

◆ Type

defines possible types of node

Enumerator
tOperator 
tNumber 
tRasterRef 
tMatrix 

Definition at line 36 of file qgsrastercalcnode.h.

Constructor & Destructor Documentation

◆ QgsRasterCalcNode() [1/6]

QgsRasterCalcNode::QgsRasterCalcNode ( )

Definition at line 20 of file qgsrastercalcnode.cpp.

◆ QgsRasterCalcNode() [2/6]

QgsRasterCalcNode::QgsRasterCalcNode ( double  number)

Definition at line 30 of file qgsrastercalcnode.cpp.

◆ QgsRasterCalcNode() [3/6]

QgsRasterCalcNode::QgsRasterCalcNode ( QgsRasterMatrix matrix)

Definition at line 40 of file qgsrastercalcnode.cpp.

◆ QgsRasterCalcNode() [4/6]

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

Definition at line 51 of file qgsrastercalcnode.cpp.

◆ QgsRasterCalcNode() [5/6]

QgsRasterCalcNode::QgsRasterCalcNode ( const QString &  rasterName)

Definition at line 61 of file qgsrastercalcnode.cpp.

◆ ~QgsRasterCalcNode()

QgsRasterCalcNode::~QgsRasterCalcNode ( )

Definition at line 74 of file qgsrastercalcnode.cpp.

◆ QgsRasterCalcNode() [6/6]

QgsRasterCalcNode::QgsRasterCalcNode ( const QgsRasterCalcNode rh)
delete

QgsRasterCalcNode cannot be copied.

Member Function Documentation

◆ calculate()

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
Since
QGIS 2.10
Note
not available in Python bindings

Definition at line 86 of file qgsrastercalcnode.cpp.

◆ operator=()

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

QgsRasterCalcNode cannot be copied.

◆ parseRasterCalcString()

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

Definition at line 234 of file qgsrastercalcnode.cpp.

◆ setLeft()

void QgsRasterCalcNode::setLeft ( QgsRasterCalcNode left)
inline

Definition at line 88 of file qgsrastercalcnode.h.

◆ setRight()

void QgsRasterCalcNode::setRight ( QgsRasterCalcNode right)
inline

Definition at line 89 of file qgsrastercalcnode.h.

◆ type()

Type QgsRasterCalcNode::type ( ) const
inline

Definition at line 85 of file qgsrastercalcnode.h.


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