QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
src
analysis
raster
qgsrastercalcnode.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrastercalcnode.h
3
Node for raster calculator tree
4
--------------------
5
begin : 2010-10-23
6
copyright : (C) 20010 by Marco Hugentobler
7
email : marco dot hugentobler at sourcepole dot ch
8
***************************************************************************/
9
10
/***************************************************************************
11
* *
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
16
* *
17
***************************************************************************/
18
19
#ifndef QGSRASTERCALCNODE_H
20
#define QGSRASTERCALCNODE_H
21
22
#include "
qgsrastermatrix.h
"
23
#include <QMap>
24
#include <QString>
25
26
class
QgsRasterBlock
;
27
31
class
ANALYSIS_EXPORT
QgsRasterCalcNode
32
{
33
public
:
35
enum
Type
36
{
37
tOperator = 1,
38
tNumber
,
39
tRasterRef
,
40
tMatrix
41
};
42
44
enum
Operator
45
{
46
opPLUS
,
47
opMINUS
,
48
opMUL
,
49
opDIV
,
50
opPOW
,
51
opSQRT
,
52
opSIN
,
53
opCOS
,
54
opTAN
,
55
opASIN
,
56
opACOS
,
57
opATAN
,
58
opEQ
,
// =
59
opNE
,
60
opGT
,
// >
61
opLT
,
// <
62
opGE
,
// >=
63
opLE
,
// <=
64
opAND
,
65
opOR
,
66
opSIGN
,
// change sign
67
opLOG
,
68
opLOG10
,
69
opNONE
,
70
};
71
72
QgsRasterCalcNode
();
73
QgsRasterCalcNode
(
double
number );
74
QgsRasterCalcNode
(
QgsRasterMatrix
* matrix );
75
QgsRasterCalcNode
(
Operator
op,
QgsRasterCalcNode
* left,
QgsRasterCalcNode
* right );
76
QgsRasterCalcNode
(
const
QString
& rasterName );
77
~
QgsRasterCalcNode
();
78
79
Type
type
()
const
{
return
mType; }
80
81
//set left node
82
void
setLeft
(
QgsRasterCalcNode
* left ) {
delete
mLeft; mLeft = left; }
83
void
setRight
(
QgsRasterCalcNode
* right ) {
delete
mRight; mRight = right; }
84
93
bool
calculate(
QMap<QString, QgsRasterBlock* >
& rasterData,
QgsRasterMatrix
& result,
int
row = -1 )
const
;
94
97
Q_DECL_DEPRECATED
bool
calculate(
QMap<QString, QgsRasterMatrix*>
& rasterData,
QgsRasterMatrix
& result )
const
;
98
99
static
QgsRasterCalcNode
* parseRasterCalcString(
const
QString
& str,
QString
& parserErrorMsg );
100
101
private
:
102
Type
mType;
103
QgsRasterCalcNode
* mLeft;
104
QgsRasterCalcNode
* mRight;
105
double
mNumber;
106
QString
mRasterName;
107
QgsRasterMatrix
* mMatrix;
108
Operator
mOperator;
109
110
QgsRasterCalcNode
(
const
QgsRasterCalcNode
& rh );
111
QgsRasterCalcNode
& operator=(
const
QgsRasterCalcNode
& rh );
112
};
113
114
115
#endif // QGSRASTERCALCNODE_H
QgsRasterCalcNode::tNumber
Definition:
qgsrastercalcnode.h:38
QgsRasterCalcNode::opLT
Definition:
qgsrastercalcnode.h:61
QMap
QgsRasterCalcNode::opMINUS
Definition:
qgsrastercalcnode.h:47
QgsRasterCalcNode::opMUL
Definition:
qgsrastercalcnode.h:48
qgsrastermatrix.h
QgsRasterCalcNode::opAND
Definition:
qgsrastercalcnode.h:64
QgsRasterCalcNode::tRasterRef
Definition:
qgsrastercalcnode.h:39
QgsRasterCalcNode::opPLUS
Definition:
qgsrastercalcnode.h:46
QgsRasterCalcNode::opGE
Definition:
qgsrastercalcnode.h:62
QgsRasterCalcNode::type
Type type() const
Definition:
qgsrastercalcnode.h:79
QgsRasterCalcNode::opNE
Definition:
qgsrastercalcnode.h:59
QgsRasterCalcNode::opLOG
Definition:
qgsrastercalcnode.h:67
QgsRasterBlock
Raster data container.
Definition:
qgsrasterblock.h:32
QgsRasterCalcNode::opNONE
Definition:
qgsrastercalcnode.h:69
QgsRasterCalcNode::opDIV
Definition:
qgsrastercalcnode.h:49
QgsRasterCalcNode::Type
Type
defines possible types of node
Definition:
qgsrastercalcnode.h:35
QgsRasterCalcNode::Operator
Operator
possible operators
Definition:
qgsrastercalcnode.h:44
QgsRasterCalcNode::opGT
=
Definition:
qgsrastercalcnode.h:60
QgsRasterCalcNode::opLOG10
Definition:
qgsrastercalcnode.h:68
QgsRasterCalcNode::opOR
Definition:
qgsrastercalcnode.h:65
QString
QgsRasterCalcNode::opSIN
Definition:
qgsrastercalcnode.h:52
QgsRasterCalcNode::opSQRT
Definition:
qgsrastercalcnode.h:51
QgsRasterMatrix
Definition:
qgsrastermatrix.h:24
QgsRasterCalcNode
Definition:
qgsrastercalcnode.h:31
QgsRasterCalcNode::opPOW
Definition:
qgsrastercalcnode.h:50
QgsRasterCalcNode::opEQ
Definition:
qgsrastercalcnode.h:58
QgsRasterCalcNode::opASIN
Definition:
qgsrastercalcnode.h:55
QgsRasterCalcNode::opTAN
Definition:
qgsrastercalcnode.h:54
QgsRasterCalcNode::opLE
Definition:
qgsrastercalcnode.h:63
QgsRasterCalcNode::opSIGN
Definition:
qgsrastercalcnode.h:66
QgsRasterCalcNode::setLeft
void setLeft(QgsRasterCalcNode *left)
Definition:
qgsrastercalcnode.h:82
QgsRasterCalcNode::setRight
void setRight(QgsRasterCalcNode *right)
Definition:
qgsrastercalcnode.h:83
QgsRasterCalcNode::opCOS
Definition:
qgsrastercalcnode.h:53
QgsRasterCalcNode::opACOS
Definition:
qgsrastercalcnode.h:56
QgsRasterCalcNode::opATAN
Definition:
qgsrastercalcnode.h:57
Generated on Sun Jun 24 2018 11:42:48 for QGIS API Documentation by
1.8.13