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. */
103 
104  //@}
105 
106  /** @name Accessor methods
107  * Methods used to get or set properties.
108  */
109  //@{
110 
112 
114 
116 
118 
120 
122 
123  ParameterValue* getOpacity() const { return m_opacity; }
124 
125  ParameterValue* getGain() const { return m_gain; }
126 
127  ParameterValue* getOffset() const { return m_offset; }
128 
129  ParameterValue* getNoDataValue() const { return m_noDataValue; }
130 
131  ParameterValue* getChannelDomain() const { return m_channelDomain; }
132 
134 
135  te::se::ChannelSelection* getChannelSelection() const { return m_channelSelection; }
136 
138 
139  OverlapBehavior getOverlapBehavior() const { return m_overlapBehavior; }
140 
142 
143  te::se::ColorMap* getColorMap() const { return m_colorMap; }
144 
146 
147  te::se::ContrastEnhancement* getContrastEnhancement() const { return m_contrastEnhancement; }
148 
150 
151  ShadedRelief* getShadedRelief() const { return m_shadedRelief; }
152 
154 
155  te::se::ImageOutline* getImageOutline() const { return m_imageOutline; }
156 
157  const std::string& getType() const;
158 
159  //@}
160 
161  /*! \brief It creates a new copy of this object. */
162  Symbolizer* clone() const;
163 
164  private:
165 
166  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)
167  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)
168  ParameterValue* m_gain; //!< It defines the gain value used to renderer the main raster pixels, a initial value could be 1.0. (Optional)
169  ParameterValue* m_offset; //!< It defines the offset value used to renderer the main raster pixels, a initial value could be 0.0. (Optional)
170  ParameterValue* m_noDataValue; //!< It defines the no data value used to renderer the main raster pixels, a initial value is infinite value. (Optional)
171  ParameterValue* m_channelDomain; //!< It defines The channel domain (real, imaginary, i.e.) to use as source (see te::map::RasterTransform::ChannelDomain for reference).
172  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)
173  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)
174  ColorMap* m_colorMap; //!< It defines either the colors of a pallette-type raster source or the mapping of numeric pixel values to colors. (Optional)
175  ContrastEnhancement* m_contrastEnhancement; //!< It defines contrast enhancement for a channel of a false-color image or for a color image. (Optional)
176  ShadedRelief* m_shadedRelief; //!< It selects the application of relief shading (or "hill shading") to an image for a three-dimensional visual effect. (Optional)
177  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)
178 
179  static const std::string sm_type; //!< A static data member used in the implementation of getType method.
180  };
181 
182  } // end namespace se
183 } // end namespace te
184 
185 #endif // __TERRALIB_SE_INTERNAL_RASTERSYMBOLIZER_H
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
A Symbolizer describes how a Feature is to appear on a map.
This class is used to encode the name of any property of an object.
Definition: PropertyName.h:55
ChannelSelection specifies the false-color channel selection for a multi-spectral raster source (such...
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
Definition: ColorMap.h:62
ContrastEnhancement defines the 'stretching' of contrast for a channel of a false-color image or for ...
ImageOutline specifies how individual source rasters in a multi-raster set (such as a set of satellit...
Definition: ImageOutline.h:54
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos,...
ParameterValue * m_offset
It defines the offset value used to renderer the main raster pixels, a initial value could be 0....
te::se::ImageOutline * getImageOutline() const
ParameterValue * getChannelDomain() const
ParameterValue * m_channelDomain
It defines The channel domain (real, imaginary, i.e.) to use as source (see te::map::RasterTransform:...
RasterSymbolizer()
It initializes a new RasterSymbolizer.
void setOffset(ParameterValue *p)
const std::string & getType() const
It returns the symbolizer type.
void setShadedRelief(ShadedRelief *s)
ParameterValue * getNoDataValue() const
ParameterValue * m_gain
It defines the gain value used to renderer the main raster pixels, a initial value could be 1....
ShadedRelief * m_shadedRelief
It selects the application of relief shading (or "hill shading") to an image for a three-dimensional ...
ImageOutline * m_imageOutline
It specifies how individual source rasters in a multi-raster set (such as a set of satellite-image sc...
void setGain(ParameterValue *p)
void setChannelDomain(ParameterValue *p)
ContrastEnhancement * m_contrastEnhancement
It defines contrast enhancement for a channel of a false-color image or for a color image....
ParameterValue * getOpacity() const
OverlapBehavior getOverlapBehavior() const
ColorMap * m_colorMap
It defines either the colors of a pallette-type raster source or the mapping of numeric pixel values ...
OverlapBehavior m_overlapBehavior
It tells a system how to behave when multiple raster images in a layer overlap each other,...
te::se::ColorMap * getColorMap() const
RasterSymbolizer(const RasterSymbolizer &rhs)
Copy constructor.
static const std::string sm_type
A static data member used in the implementation of getType method.
ShadedRelief * getShadedRelief() const
void setNoDataValue(ParameterValue *p)
void setChannelSelection(ChannelSelection *c)
ParameterValue * getOffset() const
ChannelSelection * m_channelSelection
It specifies the false-color channel selection for a multi-spectral raster source (such as a multi-ba...
ParameterValue * m_noDataValue
It defines the no data value used to renderer the main raster pixels, a initial value is infinite val...
Symbolizer * clone() const
It creates a new copy of this object.
~RasterSymbolizer()
Destructor.
void setGeometry(te::fe::PropertyName *g)
void setOpacity(ParameterValue *p)
void setImageOutline(ImageOutline *i)
void setContrastEnhancement(ContrastEnhancement *c)
ParameterValue * getGain() const
void setOverlapBehavior(OverlapBehavior b)
OverlapBehavior
OverlapBehavior tells a system how to behave when multiple raster images in a layer overlap each othe...
te::se::ChannelSelection * getChannelSelection() const
void setColorMap(ColorMap *c)
te::fe::PropertyName * m_geometry
The interpretation of Geometry is system-dependent, as raster data may be organized differently from ...
te::se::ContrastEnhancement * getContrastEnhancement() const
ParameterValue * m_opacity
An Opacity of 0.0 can be selected for the main raster to avoid rendering the main-raster pixels,...
ShadedRelief specifies the application of relief shading (or "hill shading") to a DEM raster to give ...
Definition: ShadedRelief.h:59
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:81
@ RANDOM
Definition: Enums.h:57
TerraLib.
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:201