QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Represents a matrix in a raster calculator operation. More...
#include <qgsrastermatrix.h>
Public Types | |
enum | OneArgOperator { opSQRT , opSIN , opCOS , opTAN , opASIN , opACOS , opATAN , opSIGN , opLOG , opLOG10 , opABS } |
enum | TwoArgOperator { opPLUS , opMINUS , opMUL , opDIV , opPOW , opEQ , opNE , opGT , opLT , opGE , opLE , opAND , opOR , opMIN , opMAX } |
Public Member Functions | |
QgsRasterMatrix ()=default | |
QgsRasterMatrix (const QgsRasterMatrix &m) | |
QgsRasterMatrix (int nCols, int nRows, double *data, double nodataValue) | |
Takes ownership of data array. | |
~QgsRasterMatrix () | |
bool | absoluteValue () |
Calculates the absolute value. | |
bool | acosinus () |
bool | add (const QgsRasterMatrix &other) |
Adds another matrix to this one. | |
bool | asinus () |
bool | atangens () |
bool | changeSign () |
bool | cosinus () |
double * | data () |
Returns data array (but not ownership) | |
bool | divide (const QgsRasterMatrix &other) |
bool | equal (const QgsRasterMatrix &other) |
bool | greaterEqual (const QgsRasterMatrix &other) |
bool | greaterThan (const QgsRasterMatrix &other) |
bool | isNumber () const |
Returns true if matrix is 1x1 (=scalar number) | |
bool | lesserEqual (const QgsRasterMatrix &other) |
bool | lesserThan (const QgsRasterMatrix &other) |
bool | log () |
bool | log10 () |
bool | logicalAnd (const QgsRasterMatrix &other) |
bool | logicalOr (const QgsRasterMatrix &other) |
bool | max (const QgsRasterMatrix &other) |
Calculates the maximum value between two matrices. | |
bool | min (const QgsRasterMatrix &other) |
Calculates the minimum value between two matrices. | |
bool | multiply (const QgsRasterMatrix &other) |
int | nColumns () const |
double | nodataValue () const |
bool | notEqual (const QgsRasterMatrix &other) |
int | nRows () const |
double | number () const |
QgsRasterMatrix & | operator= (const QgsRasterMatrix &m) |
bool | power (const QgsRasterMatrix &other) |
void | setData (int cols, int rows, double *data, double nodataValue) |
void | setNodataValue (double d) |
bool | sinus () |
bool | squareRoot () |
bool | subtract (const QgsRasterMatrix &other) |
Subtracts another matrix from this one. | |
double * | takeData () |
Returns data and ownership. | |
bool | tangens () |
Represents a matrix in a raster calculator operation.
Definition at line 29 of file qgsrastermatrix.h.
Enumerator | |
---|---|
opSQRT | |
opSIN | |
opCOS | |
opTAN | |
opASIN | |
opACOS | |
opATAN | |
opSIGN | |
opLOG | |
opLOG10 | |
opABS |
Definition at line 51 of file qgsrastermatrix.h.
Enumerator | |
---|---|
opPLUS | |
opMINUS | |
opMUL | |
opDIV | |
opPOW | |
opEQ | |
opNE | |
opGT | |
opLT | |
opGE | |
opLE | |
opAND | |
opOR | |
opMIN | |
opMAX |
Definition at line 32 of file qgsrastermatrix.h.
|
default |
QgsRasterMatrix::QgsRasterMatrix | ( | int | nCols, |
int | nRows, | ||
double * | data, | ||
double | nodataValue | ||
) |
Takes ownership of data array.
Definition at line 23 of file qgsrastermatrix.cpp.
QgsRasterMatrix::QgsRasterMatrix | ( | const QgsRasterMatrix & | m | ) |
Definition at line 31 of file qgsrastermatrix.cpp.
QgsRasterMatrix::~QgsRasterMatrix | ( | ) |
Definition at line 36 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::absoluteValue | ( | ) |
Calculates the absolute value.
true
on success Definition at line 199 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::acosinus | ( | ) |
Definition at line 169 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::add | ( | const QgsRasterMatrix & | other | ) |
Adds another matrix to this one.
Definition at line 74 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::asinus | ( | ) |
Definition at line 159 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::atangens | ( | ) |
Definition at line 179 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::changeSign | ( | ) |
Definition at line 184 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::cosinus | ( | ) |
Definition at line 164 of file qgsrastermatrix.cpp.
|
inline |
Returns data array (but not ownership)
Definition at line 84 of file qgsrastermatrix.h.
bool QgsRasterMatrix::divide | ( | const QgsRasterMatrix & | other | ) |
Definition at line 89 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::equal | ( | const QgsRasterMatrix & | other | ) |
Definition at line 99 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::greaterEqual | ( | const QgsRasterMatrix & | other | ) |
Definition at line 119 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::greaterThan | ( | const QgsRasterMatrix & | other | ) |
Definition at line 109 of file qgsrastermatrix.cpp.
|
inline |
Returns true
if matrix is 1x1 (=scalar number)
Definition at line 77 of file qgsrastermatrix.h.
bool QgsRasterMatrix::lesserEqual | ( | const QgsRasterMatrix & | other | ) |
Definition at line 124 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::lesserThan | ( | const QgsRasterMatrix & | other | ) |
Definition at line 114 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::log | ( | ) |
Definition at line 189 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::log10 | ( | ) |
Definition at line 194 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::logicalAnd | ( | const QgsRasterMatrix & | other | ) |
Definition at line 129 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::logicalOr | ( | const QgsRasterMatrix & | other | ) |
Definition at line 134 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::max | ( | const QgsRasterMatrix & | other | ) |
Calculates the maximum value between two matrices.
true
on success Definition at line 139 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::min | ( | const QgsRasterMatrix & | other | ) |
Calculates the minimum value between two matrices.
true
on success Definition at line 144 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::multiply | ( | const QgsRasterMatrix & | other | ) |
Definition at line 84 of file qgsrastermatrix.cpp.
|
inline |
Definition at line 94 of file qgsrastermatrix.h.
|
inline |
Definition at line 97 of file qgsrastermatrix.h.
bool QgsRasterMatrix::notEqual | ( | const QgsRasterMatrix & | other | ) |
Definition at line 104 of file qgsrastermatrix.cpp.
|
inline |
Definition at line 95 of file qgsrastermatrix.h.
|
inline |
Definition at line 78 of file qgsrastermatrix.h.
QgsRasterMatrix & QgsRasterMatrix::operator= | ( | const QgsRasterMatrix & | m | ) |
Definition at line 41 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::power | ( | const QgsRasterMatrix & | other | ) |
Definition at line 94 of file qgsrastermatrix.cpp.
void QgsRasterMatrix::setData | ( | int | cols, |
int | rows, | ||
double * | data, | ||
double | nodataValue | ||
) |
Definition at line 56 of file qgsrastermatrix.cpp.
|
inline |
Definition at line 98 of file qgsrastermatrix.h.
bool QgsRasterMatrix::sinus | ( | ) |
Definition at line 154 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::squareRoot | ( | ) |
Definition at line 149 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::subtract | ( | const QgsRasterMatrix & | other | ) |
Subtracts another matrix from this one.
Definition at line 79 of file qgsrastermatrix.cpp.
double * QgsRasterMatrix::takeData | ( | ) |
Returns data and ownership.
Sets data and nrows, ncols of this matrix to 0
Definition at line 65 of file qgsrastermatrix.cpp.
bool QgsRasterMatrix::tangens | ( | ) |
Definition at line 174 of file qgsrastermatrix.cpp.