All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Recode.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/Recode.h
22 
23  \brief Transformation of discrete values to other values.
24 */
25 
26 #ifndef __TERRALIB_SE_INTERNAL_RECODE_H
27 #define __TERRALIB_SE_INTERNAL_RECODE_H
28 
29 // TerraLib
30 #include "Function.h"
31 
32 namespace te
33 {
34  namespace se
35  {
36 // Forward declaration
37  class MapItem;
38  class ParameterValue;
39 
40  /*!
41  \class Recode
42 
43  \brief Transformation of discrete values to other values.
44 
45  The Symbology encoding specification defines
46  three pre-defined functions for transforming raw data:
47  <ul>
48  <li><b>Categorization:</b> The transformation of continuous
49  values to distinct values. This is
50  for example needed to generate choropleth
51  maps from continuous attributes. Another
52  example would be the stepwise selection of
53  different text heights or line widths in
54  dependence from such an attribute;</li>
55  <li><b>Interpolation:</b> Transformation of continuous values by a
56  function defined on a number of nodes. This
57  is used to adjust the value distribution of an
58  attribute to the desired distribution of a
59  continuous symbolization control variable
60  (like size, width, color, etc);</li>
61  <li><b>Recoding:</b> Transformation of discrete values to any
62  other values. This is needed when integers
63  have to be translated into text or, reversely,
64  text contents into other texts or numeric values
65  or colors.</li>
66  </ul>
67  <br>
68  It allows to replace a color in
69  the ExternalGraphic, the color specified in
70  the OriginalColor sub-element, by another
71  color as a result of a recode function.
72 
73  \sa Function, ExternalGraphic, MapItem, ParameterValue
74  */
75  class TESEEXPORT Recode : public Function
76  {
77  public:
78 
79  /** @name Initializer Methods
80  * Methods related to instantiation and destruction.
81  */
82  //@{
83 
84  /*! \brief It initializes a new Recode. */
85  Recode();
86 
87  /*! \brief Destructor. */
88  ~Recode();
89 
90  //@}
91 
92  /** @name Initializer Methods
93  * Methods related to instantiation and destruction.
94  */
95  //@{
96 
97  void setLookupValue(ParameterValue* v);
98  void add(MapItem* m);
99 
100  //@}
101 
102  private:
103 
104  ParameterValue* m_lookupValue; //!< Mandatory.
105  std::vector<MapItem*> m_mapItems; //!< Mandatory.
106  };
107 
108  } // end namespace se
109 } // end namespace te
110 
111 #endif // __TERRALIB_SE_INTERNAL_RECODE_H
Symbology Encoding functions.
Definition: Function.h:65
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:190
Transformation of discrete values to other values.
Definition: Recode.h:75
ParameterValue * m_lookupValue
Mandatory.
Definition: Recode.h:104
Symbology Encoding functions.
std::vector< MapItem * > m_mapItems
Mandatory.
Definition: Recode.h:105