Class: QgsRasterMatrix¶
- class qgis.analysis.QgsRasterMatrix¶
Bases:
sip.wrapper
Takes ownership of data array
QgsRasterMatrix(m:
QgsRasterMatrix
)Represents a matrix in a raster calculator operation.
Methods
Calculates the absolute value
- rtype
bool
Adds another matrix to this one
- rtype
bool
- rtype
bool
- rtype
bool
- rtype
bool
- param other
- param other
- param other
- param other
Returns
True
if matrix is 1x1 (=scalar number)- param other
- param other
- rtype
bool
- rtype
bool
- param other
- param other
Calculates the maximum value between two matrices
Calculates the minimum value between two matrices
- param other
- rtype
int
- rtype
int
- rtype
float
- param other
- rtype
float
- param other
- param cols
- param d
- rtype
bool
- rtype
bool
Subtracts another matrix from this one
- rtype
bool
Attributes
- class OneArgOperator¶
Bases:
int
- class TwoArgOperator¶
Bases:
int
- absoluteValue(self) → bool¶
Calculates the absolute value
- Return type
bool
- Returns
True
on success
New in version 3.10.
- acosinus(self) → bool¶
- Return type
bool
- add(self, other: QgsRasterMatrix) → bool¶
Adds another matrix to this one
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- asinus(self) → bool¶
- Return type
bool
- atangens(self) → bool¶
- Return type
bool
- changeSign(self) → bool¶
- Return type
bool
- cosinus(self) → bool¶
- Return type
bool
- divide(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- equal(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- greaterEqual(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- greaterThan(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- isNumber(self) → bool¶
Returns
True
if matrix is 1x1 (=scalar number)- Return type
bool
- lesserEqual(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- lesserThan(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- log(self) → bool¶
- Return type
bool
- log10(self) → bool¶
- Return type
bool
- logicalAnd(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- logicalOr(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- max(self, other: QgsRasterMatrix) → bool¶
Calculates the maximum value between two matrices
- Return type
bool
- Returns
True
on success
New in version 3.10.
- Parameters
other (QgsRasterMatrix) –
- min(self, other: QgsRasterMatrix) → bool¶
Calculates the minimum value between two matrices
- Return type
bool
- Returns
True
on success
New in version 3.10.
- Parameters
other (QgsRasterMatrix) –
- multiply(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- nColumns(self) → int¶
- Return type
int
- nRows(self) → int¶
- Return type
int
- nodataValue(self) → float¶
- Return type
float
- notEqual(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- number(self) → float¶
- Return type
float
- opABS = 10¶
- opACOS = 5¶
- opAND = 11¶
- opASIN = 4¶
- opATAN = 6¶
- opCOS = 2¶
- opDIV = 3¶
- opEQ = 5¶
- opGE = 9¶
- opGT = 7¶
- opLE = 10¶
- opLOG = 8¶
- opLOG10 = 9¶
- opLT = 8¶
- opMAX = 14¶
- opMIN = 13¶
- opMINUS = 1¶
- opMUL = 2¶
- opNE = 6¶
- opOR = 12¶
- opPLUS = 0¶
- opPOW = 4¶
- opSIGN = 7¶
- opSIN = 1¶
- opSQRT = 0¶
- opTAN = 3¶
- power(self, other: QgsRasterMatrix) → bool¶
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- setData(self, cols: int, rows: int, nodataValue: float) → float¶
- Parameters
cols (int) –
rows (int) –
nodataValue (float) –
- Return type
float
- setNodataValue(self, d: float)¶
- Parameters
d (float) –
- sinus(self) → bool¶
- Return type
bool
- squareRoot(self) → bool¶
- Return type
bool
- subtract(self, other: QgsRasterMatrix) → bool¶
Subtracts another matrix from this one
- Parameters
other (QgsRasterMatrix) –
- Return type
bool
- tangens(self) → bool¶
- Return type
bool