Loading...
Searching...
No Matches
Interpolate.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file terralib/se/Interpolate.h
22
23 \brief The transformation of continuous values to a number of values (Interpolate function).
24*/
25
26#ifndef __TERRALIB_SE_INTERNAL_INTERPOLATE_H
27#define __TERRALIB_SE_INTERNAL_INTERPOLATE_H
28
29// TerraLib
30#include "Function.h"
31
32// STL
33#include <vector>
34
35namespace te
36{
37 namespace se
38 {
39// Forward declarations
40 class InterpolationPoint;
41 class ParameterValue;
42
43 /*!
44 \class Interpolate
45
46 \brief The transformation of continuous values to a number of values (Interpolate function).
47
48 The Symbology encoding specification defines
49 three pre-defined functions for transforming raw data:
50 <ul>
51 <li><b>Categorization:</b> The transformation of continuous
52 values to distinct values. This is
53 for example needed to generate choropleth
54 maps from continuous attributes. Another
55 example would be the stepwise selection of
56 different text heights or line widths in
57 dependence from such an attribute;</li>
58 <li><b>Interpolation:</b> Transformation of continuous values by a
59 function defined on a number of nodes. This
60 is used to adjust the value distribution of an
61 attribute to the desired distribution of a
62 continuous symbolization control variable
63 (like size, width, color, etc);</li>
64 <li><b>Recoding:</b> Transformation of discrete values to any
65 other values. This is needed when integers
66 have to be translated into text or, reversely,
67 text contents into other texts or numeric values
68 or colors.</li>
69 </ul>
70
71 The Interpolation points have to be specified in
72 ascending order of Data. They define a graph of
73 points. LookupValues less than the Data value of the
74 first InterpolationPoint are mapped to its
75 corresponding Value. Accordingly, LookupValues greater than the
76 Data value of the last InterpolationPoint are mapped
77 to the Value of this one. LookupValues between two
78 InterpolationPoints are interpolated between the
79 corresponding Values.
80 <br>
81 Only numeric quantities are allowed for
82 LookupValue and Data. Values are usually numeric
83 as well. The interpolation of color-values requires
84 the attribute mode="color" at the Interpolate element.
85
86 \sa Function, ParameterValue, InterpolationPoint
87 */
89 {
90 public:
91
92 /*!
93 \enum ModeType
94
95 \brief It controls the ...
96 */
98 {
99 LINEAR, /*!< */
100 COSINE, /*!< */
101 CUBIC /*!< */
102 };
103
104 /*!
105 \enum MethodType
106
107 \brief It controls the ...
108 */
110 {
111 NUMERIC, /*!< */
112 COLOR /*!< */
113 };
114
115 /** @name Initializer Methods
116 * Methods related to instantiation and destruction.
117 */
118 //@{
119
120 /*! \brief It initializes a new Interpolate. */
122
123 /*!
124 \brief Copy constructor.
125
126 \param rhs The other Interpolate.
127 */
129
130 /*! \brief Destructor. */
132
133 /*!
134 \brief It returns a clone of this object.
135
136 \return A clone of this object.
137 */
138 virtual Interpolate* clone() const;
139
140 //@}
141
142 /** @name Accessor methods
143 * Methods used to get or set properties.
144 */
145 //@{
146
148
149 ParameterValue* getLookupValue() const { return m_lookupValue; }
150
152
154
155 const ModeType& getModeType() const { return m_mode; }
156
158
159 const MethodType& geMethodType() const { return m_method; }
160
161 const std::vector<InterpolationPoint*>& getInterpolationPoints() const;
162
163 //@}
164
165 private:
166
168 std::vector<InterpolationPoint*> m_interpolationPoints; //!< Mandatory.
169 ModeType m_mode; //!< Mandatory.
170 MethodType m_method; //!< Mandatory.
171 };
172
173 } // end namespace se
174} // end namespace te
175
176#endif // __TERRALIB_SE_INTERNAL_INTERPOLATE_H
Symbology Encoding functions.
Definition: Function.h:66
The transformation of continuous values to a number of values (Interpolate function).
Definition: Interpolate.h:89
ParameterValue * getLookupValue() const
Definition: Interpolate.h:149
void add(InterpolationPoint *i)
const std::vector< InterpolationPoint * > & getInterpolationPoints() const
MethodType
It controls the ...
Definition: Interpolate.h:110
Interpolate(const Interpolate &rhs)
Copy constructor.
ModeType m_mode
Mandatory.
Definition: Interpolate.h:169
const MethodType & geMethodType() const
Definition: Interpolate.h:159
virtual Interpolate * clone() const
It returns a clone of this object.
MethodType m_method
Mandatory.
Definition: Interpolate.h:170
std::vector< InterpolationPoint * > m_interpolationPoints
Mandatory.
Definition: Interpolate.h:168
void setLookupValue(ParameterValue *v)
void setMethodType(MethodType t)
const ModeType & getModeType() const
Definition: Interpolate.h:155
Interpolate()
It initializes a new Interpolate.
void setModeType(ModeType t)
ParameterValue * m_lookupValue
Mandatory.
Definition: Interpolate.h:167
~Interpolate()
Destructor.
ModeType
It controls the ...
Definition: Interpolate.h:98
They are used to define a graph of points.
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
TerraLib.
Symbology Encoding functions.
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:201