QGIS API Documentation
2.0.1-Dufour
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
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
};
62
63
QgsRasterCalcNode
();
64
QgsRasterCalcNode
(
double
number );
65
QgsRasterCalcNode
( Operator op,
QgsRasterCalcNode
* left,
QgsRasterCalcNode
* right );
66
QgsRasterCalcNode
(
const
QString& rasterName );
67
~
QgsRasterCalcNode
();
68
69
Type
type
()
const
{
return
mType; }
70
71
//set left node
72
void
setLeft
(
QgsRasterCalcNode
* left ) {
delete
mLeft; mLeft = left; }
73
void
setRight
(
QgsRasterCalcNode
* right ) {
delete
mRight; mRight = right; }
74
76
bool
calculate( QMap<QString, QgsRasterMatrix*>& rasterData,
QgsRasterMatrix
& result )
const
;
77
78
static
QgsRasterCalcNode
* parseRasterCalcString(
const
QString& str, QString& parserErrorMsg );
79
80
private
:
81
Type
mType
;
82
QgsRasterCalcNode
*
mLeft
;
83
QgsRasterCalcNode
*
mRight
;
84
double
mNumber
;
85
QString
mRasterName
;
86
Operator
mOperator
;
87
};
88
89
90
#endif // QGSRASTERCALCNODE_H
Generated on Tue Sep 24 2013 14:41:46 for QGIS API Documentation by
1.8.1.2