QGIS API Documentation  3.14.0-Pi (9f7028fd23)
Public Types | Public Member Functions | List of all members
QgsRasterMatrix Class Reference

#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
 Takes ownership of data array. More...
 
 QgsRasterMatrix (const QgsRasterMatrix &m)
 
 QgsRasterMatrix (int nCols, int nRows, double *data, double nodataValue)
 
 ~QgsRasterMatrix ()
 
bool absoluteValue ()
 Calculates the absolute value. More...
 
bool acosinus ()
 
bool add (const QgsRasterMatrix &other)
 Adds another matrix to this one. More...
 
bool asinus ()
 
bool atangens ()
 
bool changeSign ()
 
bool cosinus ()
 
double * data ()
 Returns data array (but not ownership) More...
 
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) More...
 
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. More...
 
bool min (const QgsRasterMatrix &other)
 Calculates the minimum value between two matrices. More...
 
bool multiply (const QgsRasterMatrix &other)
 
int nColumns () const
 
double nodataValue () const
 
bool notEqual (const QgsRasterMatrix &other)
 
int nRows () const
 
double number () const
 
QgsRasterMatrixoperator= (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. More...
 
double * takeData ()
 Returns data and ownership. More...
 
bool tangens ()
 

Detailed Description

Definition at line 28 of file qgsrastermatrix.h.

Member Enumeration Documentation

◆ OneArgOperator

Enumerator
opSQRT 
opSIN 
opCOS 
opTAN 
opASIN 
opACOS 
opATAN 
opSIGN 
opLOG 
opLOG10 
opABS 

Definition at line 51 of file qgsrastermatrix.h.

◆ TwoArgOperator

Enumerator
opPLUS 
opMINUS 
opMUL 
opDIV 
opPOW 
opEQ 
opNE 
opGT 
opLT 
opGE 
opLE 
opAND 
opOR 
opMIN 
opMAX 

Definition at line 32 of file qgsrastermatrix.h.

Constructor & Destructor Documentation

◆ QgsRasterMatrix() [1/3]

QgsRasterMatrix::QgsRasterMatrix ( )
default

Takes ownership of data array.

◆ QgsRasterMatrix() [2/3]

QgsRasterMatrix::QgsRasterMatrix ( int  nCols,
int  nRows,
double *  data,
double  nodataValue 
)
Note
note available in Python bindings

Definition at line 23 of file qgsrastermatrix.cpp.

◆ QgsRasterMatrix() [3/3]

QgsRasterMatrix::QgsRasterMatrix ( const QgsRasterMatrix m)

Definition at line 31 of file qgsrastermatrix.cpp.

◆ ~QgsRasterMatrix()

QgsRasterMatrix::~QgsRasterMatrix ( )

Definition at line 36 of file qgsrastermatrix.cpp.

Member Function Documentation

◆ absoluteValue()

bool QgsRasterMatrix::absoluteValue ( )

Calculates the absolute value.

Returns
true on success
Since
QGIS 3.10

Definition at line 199 of file qgsrastermatrix.cpp.

◆ acosinus()

bool QgsRasterMatrix::acosinus ( )

Definition at line 169 of file qgsrastermatrix.cpp.

◆ add()

bool QgsRasterMatrix::add ( const QgsRasterMatrix other)

Adds another matrix to this one.

Definition at line 74 of file qgsrastermatrix.cpp.

◆ asinus()

bool QgsRasterMatrix::asinus ( )

Definition at line 159 of file qgsrastermatrix.cpp.

◆ atangens()

bool QgsRasterMatrix::atangens ( )

Definition at line 179 of file qgsrastermatrix.cpp.

◆ changeSign()

bool QgsRasterMatrix::changeSign ( )

Definition at line 184 of file qgsrastermatrix.cpp.

◆ cosinus()

bool QgsRasterMatrix::cosinus ( )

Definition at line 164 of file qgsrastermatrix.cpp.

◆ data()

double* QgsRasterMatrix::data ( )
inline

Returns data array (but not ownership)

Note
not available in Python bindings

Definition at line 82 of file qgsrastermatrix.h.

◆ divide()

bool QgsRasterMatrix::divide ( const QgsRasterMatrix other)

Definition at line 89 of file qgsrastermatrix.cpp.

◆ equal()

bool QgsRasterMatrix::equal ( const QgsRasterMatrix other)

Definition at line 99 of file qgsrastermatrix.cpp.

◆ greaterEqual()

bool QgsRasterMatrix::greaterEqual ( const QgsRasterMatrix other)

Definition at line 119 of file qgsrastermatrix.cpp.

◆ greaterThan()

bool QgsRasterMatrix::greaterThan ( const QgsRasterMatrix other)

Definition at line 109 of file qgsrastermatrix.cpp.

◆ isNumber()

bool QgsRasterMatrix::isNumber ( ) const
inline

Returns true if matrix is 1x1 (=scalar number)

Definition at line 75 of file qgsrastermatrix.h.

◆ lesserEqual()

bool QgsRasterMatrix::lesserEqual ( const QgsRasterMatrix other)

Definition at line 124 of file qgsrastermatrix.cpp.

◆ lesserThan()

bool QgsRasterMatrix::lesserThan ( const QgsRasterMatrix other)

Definition at line 114 of file qgsrastermatrix.cpp.

◆ log()

bool QgsRasterMatrix::log ( )

Definition at line 189 of file qgsrastermatrix.cpp.

◆ log10()

bool QgsRasterMatrix::log10 ( )

Definition at line 194 of file qgsrastermatrix.cpp.

◆ logicalAnd()

bool QgsRasterMatrix::logicalAnd ( const QgsRasterMatrix other)

Definition at line 129 of file qgsrastermatrix.cpp.

◆ logicalOr()

bool QgsRasterMatrix::logicalOr ( const QgsRasterMatrix other)

Definition at line 134 of file qgsrastermatrix.cpp.

◆ max()

bool QgsRasterMatrix::max ( const QgsRasterMatrix other)

Calculates the maximum value between two matrices.

Returns
true on success
Since
QGIS 3.10

Definition at line 139 of file qgsrastermatrix.cpp.

◆ min()

bool QgsRasterMatrix::min ( const QgsRasterMatrix other)

Calculates the minimum value between two matrices.

Returns
true on success
Since
QGIS 3.10

Definition at line 144 of file qgsrastermatrix.cpp.

◆ multiply()

bool QgsRasterMatrix::multiply ( const QgsRasterMatrix other)

Definition at line 84 of file qgsrastermatrix.cpp.

◆ nColumns()

int QgsRasterMatrix::nColumns ( ) const
inline

Definition at line 92 of file qgsrastermatrix.h.

◆ nodataValue()

double QgsRasterMatrix::nodataValue ( ) const
inline

Definition at line 95 of file qgsrastermatrix.h.

◆ notEqual()

bool QgsRasterMatrix::notEqual ( const QgsRasterMatrix other)

Definition at line 104 of file qgsrastermatrix.cpp.

◆ nRows()

int QgsRasterMatrix::nRows ( ) const
inline

Definition at line 93 of file qgsrastermatrix.h.

◆ number()

double QgsRasterMatrix::number ( ) const
inline

Definition at line 76 of file qgsrastermatrix.h.

◆ operator=()

QgsRasterMatrix & QgsRasterMatrix::operator= ( const QgsRasterMatrix m)

Definition at line 41 of file qgsrastermatrix.cpp.

◆ power()

bool QgsRasterMatrix::power ( const QgsRasterMatrix other)

Definition at line 94 of file qgsrastermatrix.cpp.

◆ setData()

void QgsRasterMatrix::setData ( int  cols,
int  rows,
double *  data,
double  nodataValue 
)

Definition at line 56 of file qgsrastermatrix.cpp.

◆ setNodataValue()

void QgsRasterMatrix::setNodataValue ( double  d)
inline

Definition at line 96 of file qgsrastermatrix.h.

◆ sinus()

bool QgsRasterMatrix::sinus ( )

Definition at line 154 of file qgsrastermatrix.cpp.

◆ squareRoot()

bool QgsRasterMatrix::squareRoot ( )

Definition at line 149 of file qgsrastermatrix.cpp.

◆ subtract()

bool QgsRasterMatrix::subtract ( const QgsRasterMatrix other)

Subtracts another matrix from this one.

Definition at line 79 of file qgsrastermatrix.cpp.

◆ takeData()

double * QgsRasterMatrix::takeData ( )

Returns data and ownership.

Sets data and nrows, ncols of this matrix to 0

Note
not available in Python bindings

Definition at line 65 of file qgsrastermatrix.cpp.

◆ tangens()

bool QgsRasterMatrix::tangens ( )

Definition at line 174 of file qgsrastermatrix.cpp.


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