RasterSymbolizer.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/RasterSymbolizer.h
22 
23  \brief The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos, DEMs).
24 */
25 
26 #ifndef __TERRALIB_SE_INTERNAL_RASTERSYMBOLIZER_H
27 #define __TERRALIB_SE_INTERNAL_RASTERSYMBOLIZER_H
28 
29 // TerraLib
30 #include "Symbolizer.h"
31 
32 namespace te
33 {
34  namespace fe { class PropertyName; }
35 
36  namespace se
37  {
38 // Forward declarations
39  class ChannelSelection;
40  class ColorMap;
41  class ContrastEnhancement;
42  class ImageOutline;
43  class ParameterValue;
44  class ShadedRelief;
45 
46  /*!
47  \class RasterSymbolizer
48 
49  \brief The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos, DEMs).
50 
51  A RasterSymbolizer is used to specify the rendering of
52  raster/matrix-coverage data (e.g., satellite images, DEMs).
53  <br>
54  Geometry-type transformations are also system-dependent and
55  it is assumed that this capability will be little used.
56 
57  \ingroup se
58 
59  \sa Symbolizer, te::fe::PropertyName, ParameterValue, ChannelSelection, ColorMap, ContrastEnhancement, ShadedRelief, ImageOutline
60  */
62  {
63  public:
64 
66 
67  /*!
68  \enum OverlapBehavior
69 
70  \brief OverlapBehavior tells a system how to behave when multiple
71  raster images in a layer overlap each other, for example with
72  satellite-image scenes.
73  */
75  {
76  LATEST_ON_TOP, /*!< It refers to the time the scene was captured. */
77  EARLIEST_ON_TOP, /*!< It refers to the time the scene was captured. */
78  AVERAGE, /*!< It means to average multiple scenes together. This
79  can produce blurry results if the source images
80  are not perfectly aligned in their geo-referencing. */
81  RANDOM, /*!< It means to select an image (or piece thereof)
82  randomly and place it on top. */
83  NO_BEHAVIOR
84  };
85 
86  /** @name Initializer Methods
87  * Methods related to instantiation and destruction.
88  */
89  //@{
90 
91  /*! \brief It initializes a new RasterSymbolizer. */
93 
94  /*!
95  \brief Copy constructor.
96 
97  \param rhs The other raster symbolizer.
98  */
100 
101  /*! \brief Destructor. */
102  ~RasterSymbolizer();
103 
104  //@}
105 
106  /** @name Accessor methods
107  * Methods used to get or set properties.
108  */
109  //@{
110 
111  void setGeometry(te::fe::PropertyName* g);
112 
113  void setOpacity(ParameterValue* p);
114 
115  void setGain(ParameterValue* p);
116 
117  void setOffset(ParameterValue* p);
118 
119  void setNoDataValue(ParameterValue* p);
120 
121  ParameterValue* getOpacity() const { return m_opacity; }
122 
123  ParameterValue* getGain() const { return m_gain; }
124 
125  ParameterValue* getOffset() const { return m_offset; }
126 
127  ParameterValue* getNoDataValue() const { return m_noDataValue; }
128 
129  void setChannelSelection(ChannelSelection* c);
130 
131  te::se::ChannelSelection* getChannelSelection() const { return m_channelSelection; }
132 
133  void setOverlapBehavior(OverlapBehavior b);
134 
135  OverlapBehavior getOverlapBehavior() const { return m_overlapBehavior; }
136 
137  void setColorMap(ColorMap* c);
138 
139  te::se::ColorMap* getColorMap() const { return m_colorMap; }
140 
141  void setContrastEnhancement(ContrastEnhancement* c);
142 
143  te::se::ContrastEnhancement* getContrastEnhancement() const { return m_contrastEnhancement; }
144 
145  void setShadedRelief(ShadedRelief* s);
146 
147  ShadedRelief* getShadedRelief() const { return m_shadedRelief; }
148 
149  void setImageOutline(ImageOutline* i);
150 
151  te::se::ImageOutline* getImageOutline() const { return m_imageOutline; }
152 
153  const std::string& getType() const;
154 
155  //@}
156 
157  /*! \brief It creates a new copy of this object. */
158  Symbolizer* clone() const;
159 
160  private:
161 
162  te::fe::PropertyName* m_geometry; //!< The interpretation of Geometry is system-dependent, as raster data may be organized differently from feature data, though omitting this element selects the default raster-data source. (Optional)
163  ParameterValue* m_opacity; //!< An Opacity of 0.0 can be selected for the main raster to avoid rendering the main-raster pixels, or an opacity can be used for a PolygonSymbolizer Fill to allow the main-raster data be visible through the fill. (Optional)
164  ParameterValue* m_gain; //!< It defines the gain value used to renderer the main raster pixels, a initial value could be 1.0. (Optional)
165  ParameterValue* m_offset; //!< It defines the offset value used to renderer the main raster pixels, a initial value could be 0.0. (Optional)
166  ParameterValue* m_noDataValue; //!< It defines the no data value used to renderer the main raster pixels, a initial value is infinite value. (Optional)
167  ChannelSelection* m_channelSelection; //!< It specifies the false-color channel selection for a multi-spectral raster source (such as a multi-band satellite-imagery source). (Optional)
168  OverlapBehavior m_overlapBehavior; //!< It tells a system how to behave when multiple raster images in a layer overlap each other, for example with satellite-image scenes. (Optional)
169  ColorMap* m_colorMap; //!< It defines either the colors of a pallette-type raster source or the mapping of numeric pixel values to colors. (Optional)
170  ContrastEnhancement* m_contrastEnhancement; //!< It defines contrast enhancement for a channel of a false-color image or for a color image. (Optional)
171  ShadedRelief* m_shadedRelief; //!< It selects the application of relief shading (or "hill shading") to an image for a three-dimensional visual effect. (Optional)
172  ImageOutline* m_imageOutline; //!< It specifies how individual source rasters in a multi-raster set (such as a set of satellite-image scenes) should be outlined to make the individual-image locations visible. (Optional)
173 
174  static const std::string sm_type; //!< A static data member used in the implementation of getType method.
175  };
176 
177  } // end namespace se
178 } // end namespace te
179 
180 #endif // __TERRALIB_SE_INTERNAL_RASTERSYMBOLIZER_H
ParameterValue * m_opacity
An Opacity of 0.0 can be selected for the main raster to avoid rendering the main-raster pixels...
static const std::string sm_type
A static data member used in the implementation of getType method.
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:80
ParameterValue * getOffset() const
te::se::ChannelSelection * getChannelSelection() const
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
te::se::ContrastEnhancement * getContrastEnhancement() const
ParameterValue * m_noDataValue
It defines the no data value used to renderer the main raster pixels, a initial value is infinite val...
ContrastEnhancement * m_contrastEnhancement
It defines contrast enhancement for a channel of a false-color image or for a color image...
ParameterValue * getGain() const
ShadedRelief * getShadedRelief() const
OverlapBehavior
OverlapBehavior tells a system how to behave when multiple raster images in a layer overlap each othe...
ParameterValue * m_gain
It defines the gain value used to renderer the main raster pixels, a initial value could be 1...
This class is used to encode the name of any property of an object.
Definition: PropertyName.h:54
ParameterValue * getOpacity() const
URI C++ Library.
ColorMap * m_colorMap
It defines either the colors of a pallette-type raster source or the mapping of numeric pixel values ...
ContrastEnhancement defines the 'stretching' of contrast for a channel of a false-color image or for ...
ImageOutline * m_imageOutline
It specifies how individual source rasters in a multi-raster set (such as a set of satellite-image sc...
OverlapBehavior getOverlapBehavior() const
ShadedRelief * m_shadedRelief
It selects the application of relief shading (or "hill shading") to an image for a three-dimensional ...
ImageOutline specifies how individual source rasters in a multi-raster set (such as a set of satellit...
Definition: ImageOutline.h:53
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos...
te::fe::PropertyName * m_geometry
The interpretation of Geometry is system-dependent, as raster data may be organized differently from ...
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:187
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
ParameterValue * m_offset
It defines the offset value used to renderer the main raster pixels, a initial value could be 0...
OverlapBehavior m_overlapBehavior
It tells a system how to behave when multiple raster images in a layer overlap each other...
A Symbolizer describes how a Feature is to appear on a map.
te::se::ColorMap * getColorMap() const
ParameterValue * getNoDataValue() const
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
Definition: ColorMap.h:61
ShadedRelief specifies the application of relief shading (or "hill shading") to a DEM raster to give ...
Definition: ShadedRelief.h:58
ChannelSelection * m_channelSelection
It specifies the false-color channel selection for a multi-spectral raster source (such as a multi-ba...
te::se::ImageOutline * getImageOutline() const
ChannelSelection specifies the false-color channel selection for a multi-spectral raster source (such...