All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RasterSymbolizer.cpp
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.cpp
22 
23  \brief The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos, DEMs).
24 */
25 
26 // TerraLib
27 #include "../fe/PropertyName.h"
28 #include "ChannelSelection.h"
29 #include "ColorMap.h"
30 #include "ContrastEnhancement.h"
31 #include "ImageOutline.h"
32 #include "ParameterValue.h"
33 #include "RasterSymbolizer.h"
34 #include "ShadedRelief.h"
35 
36 const std::string te::se::RasterSymbolizer::sm_type("RasterSymbolizer");
37 
39  : te::se::Symbolizer(),
40  m_geometry(0),
41  m_opacity(0),
42  m_gain(0),
43  m_offset(0),
44  m_channelSelection(0),
45  m_overlapBehavior(NO_BEHAVIOR),
46  m_colorMap(0),
47  m_contrastEnhancement(0),
48  m_shadedRelief(0),
49  m_imageOutline(0)
50 {
51 }
52 
54  : te::se::Symbolizer(rhs),
55  m_geometry(0),
56  m_opacity(0),
57  m_gain(0),
58  m_offset(0),
59  m_channelSelection(0),
60  m_overlapBehavior(rhs.m_overlapBehavior),
61  m_colorMap(0),
62  m_contrastEnhancement(0),
63  m_shadedRelief(0),
64  m_imageOutline(0)
65 {
66  if(rhs.m_geometry)
68 
69  if(rhs.m_opacity)
70  m_opacity = rhs.m_opacity->clone();
71 
72  if(rhs.m_gain)
73  m_gain = rhs.m_gain->clone();
74 
75  if(rhs.m_offset)
76  m_offset = rhs.m_offset->clone();
77 
78  if(rhs.m_channelSelection)
80 
81  if(rhs.m_colorMap)
82  m_colorMap = rhs.m_colorMap->clone();
83 
84  if(rhs.m_contrastEnhancement)
86 
87  if(rhs.m_shadedRelief)
89 
90  if(rhs.m_imageOutline)
92 }
93 
95 {
96  delete m_geometry;
97  delete m_opacity;
98  delete m_gain;
99  delete m_offset;
100  delete m_channelSelection;
101  delete m_colorMap;
102  delete m_contrastEnhancement;
103  delete m_shadedRelief;
104  delete m_imageOutline;
105 }
106 
108 {
109  delete m_geometry;
110  m_geometry = g;
111 }
112 
114 {
115  delete m_opacity;
116  m_opacity = p;
117 }
118 
120 {
121  delete m_gain;
122  m_gain = p;
123 }
124 
126 {
127  delete m_offset;
128  m_offset = p;
129 }
130 
132 {
133  delete m_channelSelection;
134  m_channelSelection = c;
135 }
136 
138 {
139  m_overlapBehavior = b;
140 }
141 
143 {
144  delete m_colorMap;
145  m_colorMap = c;
146 }
147 
149 {
150  delete m_contrastEnhancement;
151  m_contrastEnhancement = c;
152 }
153 
155 {
156  delete m_shadedRelief;
157  m_shadedRelief = s;
158 }
159 
161 {
162  delete m_imageOutline;
163  m_imageOutline = i;
164 }
165 
166 const std::string& te::se::RasterSymbolizer::getType() const
167 {
168  return sm_type;
169 }
170 
172 {
173  return new RasterSymbolizer(*this);
174 }
ImageOutline specifies how individual source rasters in a multi-raster set (such as a set of satellit...
const std::string & getName() const
It returns the property name.
ImageOutline * clone() const
It creates a new copy of this object.
ParameterValue * m_opacity
An Opacity of 0.0 can be selected for the main raster to avoid rendering the main-raster pixels...
ColorMap * clone() const
Definition: ColorMap.cpp:80
ChannelSelection specifies the false-color channel selection for a multi-spectral raster source (such...
static const std::string sm_type
A static data member used in the implementation of getType method.
ChannelSelection * clone() const
It creates a new copy of this object.
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:80
const std::string & getType() const
It returns the symbolizer type.
void setGain(ParameterValue *p)
void setShadedRelief(ShadedRelief *s)
The ParameterValueType uses WFS-Filter expressions to give values for SE graphic parameters.
ContrastEnhancement defines the 'stretching' of contrast for a channel of a false-color image or for ...
void setContrastEnhancement(ContrastEnhancement *c)
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
ShadedRelief * clone() const
It creates a new copy of this object.
ContrastEnhancement * m_contrastEnhancement
It defines contrast enhancement for a channel of a false-color image or for a color image...
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
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 ...
void setChannelSelection(ChannelSelection *c)
ImageOutline * m_imageOutline
It specifies how individual source rasters in a multi-raster set (such as a set of satellite-image sc...
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 ...
void setOpacity(ParameterValue *p)
RasterSymbolizer()
It initializes a new RasterSymbolizer.
ParameterValue * m_offset
It defines the offset value used to renderer the main raster pixels, a initial value could be 0...
ParameterValue * clone() const
It creates a new copy of this object.
void setOverlapBehavior(OverlapBehavior b)
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos...
ShadedRelief specifies the application of relief shading (or "hill shading") to a DEM raster to give ...
void setOffset(ParameterValue *p)
void setColorMap(ColorMap *c)
Symbolizer * clone() const
It creates a new copy of this object.
void setGeometry(te::fe::PropertyName *g)
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
void setImageOutline(ImageOutline *i)
ContrastEnhancement * clone() const
It creates a new copy of this object.
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
Definition: ColorMap.h:60
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...
ChannelSelection specifies the false-color channel selection for a multi-spectral raster source (such...