QGIS API Documentation
2.8.6-Wien
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
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
ANALYSIS_EXPORT
QgsRasterCalcNode
27
{
28
public
:
30
enum
Type
31
{
32
tOperator = 1,
33
tNumber
,
34
tRasterRef
35
};
36
38
enum
Operator
39
{
40
opPLUS
,
41
opMINUS
,
42
opMUL
,
43
opDIV
,
44
opPOW
,
45
opSQRT
,
46
opSIN
,
47
opCOS
,
48
opTAN
,
49
opASIN
,
50
opACOS
,
51
opATAN
,
52
opEQ
,
// =
53
opNE
,
54
opGT
,
// >
55
opLT
,
// <
56
opGE
,
// >=
57
opLE
,
// <=
58
opAND
,
59
opOR
,
60
opSIGN
,
// change sign
61
opNONE
,
62
};
63
64
QgsRasterCalcNode
();
65
QgsRasterCalcNode
(
double
number );
66
QgsRasterCalcNode
( Operator op,
QgsRasterCalcNode
* left,
QgsRasterCalcNode
* right );
67
QgsRasterCalcNode
(
const
QString& rasterName );
68
~
QgsRasterCalcNode
();
69
70
Type
type
()
const
{
return
mType; }
71
72
//set left node
73
void
setLeft
(
QgsRasterCalcNode
* left ) {
delete
mLeft; mLeft = left; }
74
void
setRight
(
QgsRasterCalcNode
* right ) {
delete
mRight; mRight = right; }
75
77
bool
calculate( QMap<QString, QgsRasterMatrix*>& rasterData,
QgsRasterMatrix
& result )
const
;
78
79
static
QgsRasterCalcNode
* parseRasterCalcString(
const
QString& str, QString& parserErrorMsg );
80
81
private
:
82
Type mType;
83
QgsRasterCalcNode
* mLeft;
84
QgsRasterCalcNode
* mRight;
85
double
mNumber;
86
QString mRasterName;
87
Operator mOperator;
88
};
89
90
91
#endif // QGSRASTERCALCNODE_H
QgsRasterCalcNode::tNumber
Definition:
qgsrastercalcnode.h:33
QgsRasterCalcNode::opLT
Definition:
qgsrastercalcnode.h:55
QgsRasterCalcNode::opMINUS
Definition:
qgsrastercalcnode.h:41
QgsRasterCalcNode::opMUL
Definition:
qgsrastercalcnode.h:42
qgsrastermatrix.h
QgsRasterCalcNode::opAND
Definition:
qgsrastercalcnode.h:58
QgsRasterCalcNode::opPLUS
Definition:
qgsrastercalcnode.h:40
QgsRasterCalcNode::opGE
Definition:
qgsrastercalcnode.h:56
QgsRasterCalcNode::opNE
Definition:
qgsrastercalcnode.h:53
QgsRasterCalcNode::opNONE
Definition:
qgsrastercalcnode.h:61
QgsRasterCalcNode::opDIV
Definition:
qgsrastercalcnode.h:43
QgsRasterCalcNode::Type
Type
defines possible types of node
Definition:
qgsrastercalcnode.h:30
QgsRasterCalcNode::Operator
Operator
possible operators
Definition:
qgsrastercalcnode.h:38
QgsRasterCalcNode::opGT
=
Definition:
qgsrastercalcnode.h:54
QgsRasterCalcNode::opOR
Definition:
qgsrastercalcnode.h:59
QgsRasterCalcNode::opSIN
Definition:
qgsrastercalcnode.h:46
QgsRasterCalcNode::opSQRT
Definition:
qgsrastercalcnode.h:45
QgsRasterMatrix
Definition:
qgsrastermatrix.h:21
QgsRasterCalcNode
Definition:
qgsrastercalcnode.h:26
QgsRasterCalcNode::opPOW
Definition:
qgsrastercalcnode.h:44
QgsRasterCalcNode::opEQ
Definition:
qgsrastercalcnode.h:52
QgsRasterCalcNode::opASIN
Definition:
qgsrastercalcnode.h:49
QgsRasterCalcNode::opTAN
Definition:
qgsrastercalcnode.h:48
QgsRasterCalcNode::opLE
Definition:
qgsrastercalcnode.h:57
QgsRasterCalcNode::opSIGN
Definition:
qgsrastercalcnode.h:60
QgsRasterCalcNode::setLeft
void setLeft(QgsRasterCalcNode *left)
Definition:
qgsrastercalcnode.h:73
QgsRasterCalcNode::setRight
void setRight(QgsRasterCalcNode *right)
Definition:
qgsrastercalcnode.h:74
QgsRasterCalcNode::opCOS
Definition:
qgsrastercalcnode.h:47
QgsRasterCalcNode::opACOS
Definition:
qgsrastercalcnode.h:50
QgsRasterCalcNode::type
Type type() const
Definition:
qgsrastercalcnode.h:70
QgsRasterCalcNode::opATAN
Definition:
qgsrastercalcnode.h:51
Generated on Mon Feb 1 2016 14:19:41 for QGIS API Documentation by
1.8.8