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
te::se::RasterSymbolizer::setOffset
void setOffset(ParameterValue *p)
te::se::RasterSymbolizer::setImageOutline
void setImageOutline(ImageOutline *i)
te::se::RasterSymbolizer::clone
Symbolizer * clone() const
It creates a new copy of this object.
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::se::RasterSymbolizer::setShadedRelief
void setShadedRelief(ShadedRelief *s)
te::se::RasterSymbolizer::getShadedRelief
ShadedRelief * getShadedRelief() const
Definition: RasterSymbolizer.h:151
te::se::RasterSymbolizer::getNoDataValue
ParameterValue * getNoDataValue() const
Definition: RasterSymbolizer.h:129
te::se::RasterSymbolizer::EARLIEST_ON_TOP
@ EARLIEST_ON_TOP
Definition: RasterSymbolizer.h:77
te::se::RasterSymbolizer::getImageOutline
te::se::ImageOutline * getImageOutline() const
Definition: RasterSymbolizer.h:155
te::se::RasterSymbolizer::OverlapBehavior
OverlapBehavior
OverlapBehavior tells a system how to behave when multiple raster images in a layer overlap each othe...
Definition: RasterSymbolizer.h:75
te::se::RasterSymbolizer::RasterSymbolizer
RasterSymbolizer(const RasterSymbolizer &rhs)
Copy constructor.
te::se::RasterSymbolizer::getOffset
ParameterValue * getOffset() const
Definition: RasterSymbolizer.h:127
te::se::RasterSymbolizer::getType
const std::string & getType() const
It returns the symbolizer type.
te::se::RasterSymbolizer::m_noDataValue
ParameterValue * m_noDataValue
It defines the no data value used to renderer the main raster pixels, a initial value is infinite val...
Definition: RasterSymbolizer.h:170
te::se::RasterSymbolizer::m_geometry
te::fe::PropertyName * m_geometry
The interpretation of Geometry is system-dependent, as raster data may be organized differently from ...
Definition: RasterSymbolizer.h:166
te::se::RasterSymbolizer::m_contrastEnhancement
ContrastEnhancement * m_contrastEnhancement
It defines contrast enhancement for a channel of a false-color image or for a color image....
Definition: RasterSymbolizer.h:175
te::se::RasterSymbolizer::LATEST_ON_TOP
@ LATEST_ON_TOP
Definition: RasterSymbolizer.h:76
te::se::RasterSymbolizer
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos,...
Definition: RasterSymbolizer.h:62
te::se::ChannelSelection
ChannelSelection specifies the false-color channel selection for a multi-spectral raster source (such...
Definition: ChannelSelection.h:63
te::se::RasterSymbolizer::m_channelDomain
ParameterValue * m_channelDomain
It defines The channel domain (real, imaginary, i.e.) to use as source (see te::map::RasterTransform:...
Definition: RasterSymbolizer.h:171
te::se::RasterSymbolizer::setNoDataValue
void setNoDataValue(ParameterValue *p)
te::se::RasterSymbolizer::m_imageOutline
ImageOutline * m_imageOutline
It specifies how individual source rasters in a multi-raster set (such as a set of satellite-image sc...
Definition: RasterSymbolizer.h:177
te::se::ColorMap
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
Definition: ColorMap.h:62
te::se::RasterSymbolizer::m_gain
ParameterValue * m_gain
It defines the gain value used to renderer the main raster pixels, a initial value could be 1....
Definition: RasterSymbolizer.h:168
TESEEXPORT
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:201
te::se::RasterSymbolizer::setGain
void setGain(ParameterValue *p)
te::se::RasterSymbolizer::setChannelDomain
void setChannelDomain(ParameterValue *p)
te::se::RasterSymbolizer::getOverlapBehavior
OverlapBehavior getOverlapBehavior() const
Definition: RasterSymbolizer.h:139
Symbolizer.h
A Symbolizer describes how a Feature is to appear on a map.
te::se::RasterSymbolizer::m_colorMap
ColorMap * m_colorMap
It defines either the colors of a pallette-type raster source or the mapping of numeric pixel values ...
Definition: RasterSymbolizer.h:174
te::common::RANDOM
@ RANDOM
Definition: Enums.h:57
te::se::RasterSymbolizer::setOpacity
void setOpacity(ParameterValue *p)
TE_DEFINE_VISITABLE
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
te::se::RasterSymbolizer::RasterSymbolizer
RasterSymbolizer()
It initializes a new RasterSymbolizer.
te::se::RasterSymbolizer::setContrastEnhancement
void setContrastEnhancement(ContrastEnhancement *c)
te::se::RasterSymbolizer::setOverlapBehavior
void setOverlapBehavior(OverlapBehavior b)
te::se::RasterSymbolizer::getGain
ParameterValue * getGain() const
Definition: RasterSymbolizer.h:125
te::se::ContrastEnhancement
ContrastEnhancement defines the 'stretching' of contrast for a channel of a false-color image or for ...
Definition: ContrastEnhancement.h:65
te::fe::PropertyName
This class is used to encode the name of any property of an object.
Definition: PropertyName.h:55
te::se::RasterSymbolizer::getChannelDomain
ParameterValue * getChannelDomain() const
Definition: RasterSymbolizer.h:131
te::se::RasterSymbolizer::m_channelSelection
ChannelSelection * m_channelSelection
It specifies the false-color channel selection for a multi-spectral raster source (such as a multi-ba...
Definition: RasterSymbolizer.h:172
te::se::ShadedRelief
ShadedRelief specifies the application of relief shading (or "hill shading") to a DEM raster to give ...
Definition: ShadedRelief.h:59
te::se::RasterSymbolizer::m_shadedRelief
ShadedRelief * m_shadedRelief
It selects the application of relief shading (or "hill shading") to an image for a three-dimensional ...
Definition: RasterSymbolizer.h:176
te::se::RasterSymbolizer::getColorMap
te::se::ColorMap * getColorMap() const
Definition: RasterSymbolizer.h:143
te::se::RasterSymbolizer::getOpacity
ParameterValue * getOpacity() const
Definition: RasterSymbolizer.h:123
te::se::RasterSymbolizer::setChannelSelection
void setChannelSelection(ChannelSelection *c)
te::se::ImageOutline
ImageOutline specifies how individual source rasters in a multi-raster set (such as a set of satellit...
Definition: ImageOutline.h:54
te::se::RasterSymbolizer::~RasterSymbolizer
~RasterSymbolizer()
Destructor.
te::se::RasterSymbolizer::m_overlapBehavior
OverlapBehavior m_overlapBehavior
It tells a system how to behave when multiple raster images in a layer overlap each other,...
Definition: RasterSymbolizer.h:173
te::se::RasterSymbolizer::setGeometry
void setGeometry(te::fe::PropertyName *g)
te::se::RasterSymbolizer::setColorMap
void setColorMap(ColorMap *c)
te::se::RasterSymbolizer::getContrastEnhancement
te::se::ContrastEnhancement * getContrastEnhancement() const
Definition: RasterSymbolizer.h:147
te::se::RasterSymbolizer::m_offset
ParameterValue * m_offset
It defines the offset value used to renderer the main raster pixels, a initial value could be 0....
Definition: RasterSymbolizer.h:169
te::se::ParameterValue
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
Definition: ParameterValue.h:55
te::se::Symbolizer
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:81
te::se::RasterSymbolizer::sm_type
static const std::string sm_type
A static data member used in the implementation of getType method.
Definition: RasterSymbolizer.h:179
te::se::RasterSymbolizer::getChannelSelection
te::se::ChannelSelection * getChannelSelection() const
Definition: RasterSymbolizer.h:135
te::se::RasterSymbolizer::m_opacity
ParameterValue * m_opacity
An Opacity of 0.0 can be selected for the main raster to avoid rendering the main-raster pixels,...
Definition: RasterSymbolizer.h:167