Class: QgsRasterCalcNode

class qgis.analysis.QgsRasterCalcNode

Bases: sip.wrapper

Constructor for QgsRasterCalcNode.

QgsRasterCalcNode(number: float)

QgsRasterCalcNode(matrix: QgsRasterMatrix)

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

QgsRasterCalcNode(rasterName: str)

Methods

findNodes

Returns a list of nodes of a specific type

parseRasterCalcString

param str

setLeft

param left

setRight

param right

toString

Returns a string representation of the expression

type

QgsRasterCalcNode cannot be copied

Attributes

opABS

opACOS

opAND

opASIN

opATAN

opCOS

opDIV

opEQ

opGE

opGT

opLE

opLOG

opLOG10

opLT

opMAX

opMIN

opMINUS

opMUL

opNE

opNONE

opOR

opPLUS

opPOW

opSIGN

opSIN

opSQRT

opTAN

tMatrix

tNumber

tOperator

tRasterRef

class Operator

Bases: int

class Type

Bases: int

findNodes(self, type: QgsRasterCalcNode.Type) → List[QgsRasterCalcNode]

Returns a list of nodes of a specific type

New in version 3.6.

Parameters

type (QgsRasterCalcNode.Type) –

Return type

List[QgsRasterCalcNode]

opABS = 23
opACOS = 10
opAND = 18
opASIN = 9
opATAN = 11
opCOS = 7
opDIV = 3
opEQ = 12
opGE = 16
opGT = 14
opLE = 17
opLOG = 21
opLOG10 = 22
opLT = 15
opMAX = 24
opMIN = 25
opMINUS = 1
opMUL = 2
opNE = 13
opNONE = 26
opOR = 19
opPLUS = 0
opPOW = 4
opSIGN = 20
opSIN = 6
opSQRT = 5
opTAN = 8
parseRasterCalcString(str: str, parserErrorMsg: str) → QgsRasterCalcNode
Parameters
  • str (str) –

  • parserErrorMsg (str) –

Return type

QgsRasterCalcNode

setLeft(self, left: QgsRasterCalcNode)
Parameters

left (QgsRasterCalcNode) –

setRight(self, right: QgsRasterCalcNode)
Parameters

right (QgsRasterCalcNode) –

tMatrix = 4
tNumber = 2
tOperator = 1
tRasterRef = 3
toString(self, cStyle: bool = False) → str

Returns a string representation of the expression

Parameters

cStyle (bool = False) – if True operators will follow C syntax

New in version 3.6.

Return type

str

type(self) → QgsRasterCalcNode.Type

QgsRasterCalcNode cannot be copied

Return type

QgsRasterCalcNode.Type