18#ifndef QGSRASTERMATRIX_H
19#define QGSRASTERMATRIX_H
21#include "qgis_analysis.h"
76 bool isNumber()
const {
return ( mColumns == 1 && mRows == 1 ); }
77 double number()
const {
return mData[0]; }
91 void setData(
int cols,
int rows,
double *data,
double nodataValue );
93 int nColumns()
const {
return mColumns; }
94 int nRows()
const {
return mRows; }
146 bool absoluteValue();
151 double *mData =
nullptr;
152 double mNodataValue = -1;
155 bool twoArgumentOperation( TwoArgOperator op,
const QgsRasterMatrix &other );
156 double calculateTwoArgumentOp( TwoArgOperator op,
double arg1,
double arg2 )
const;
159 bool oneArgumentOperation( OneArgOperator op );
160 bool testPowerValidity(
double base,
double power )
const;
Represents a matrix in a raster calculator operation.
QgsRasterMatrix()=default
Takes ownership of data array.
bool isNumber() const
Returns true if matrix is 1x1 (=scalar number)
void setNodataValue(double d)
double * data()
Returns data array (but not ownership)
double nodataValue() const