src/terralib/se/Utils.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/Utils.cpp
22 
23  \brief Utility functions for Symbology Enconding module.
24 */
25 
26 // TerraLib
27 #include "../color/ColorTransform.h"
28 #include "../color/RGBAColor.h"
29 #include "../fe/Literal.h"
30 #include "../raster/BandProperty.h"
31 #include "ChannelSelection.h"
32 #include "CoverageStyle.h"
33 #include "Description.h"
34 #include "FeatureTypeStyle.h"
35 #include "Fill.h"
36 #include "Graphic.h"
37 #include "LineSymbolizer.h"
38 #include "Mark.h"
39 #include "ParameterValue.h"
40 #include "PointSymbolizer.h"
41 #include "PolygonSymbolizer.h"
42 #include "RasterSymbolizer.h"
43 #include "Rule.h"
44 #include "SelectedChannel.h"
45 #include "Stroke.h"
46 #include "SvgParameter.h"
47 #include "TextSymbolizer.h"
48 #include "Utils.h"
49 
50 // STL
51 #include <cassert>
52 #include <cstdlib>
53 
54 // Boost
55 #include <boost/lexical_cast.hpp>
56 
57 te::se::Stroke* te::se::CreateStroke(const std::string& color, const std::string& width)
58 {
59  return te::se::CreateStroke(color, width, "");
60 }
61 
62 te::se::Stroke* te::se::CreateStroke(const std::string& color, const std::string& width, const std::string& opacity)
63 {
64  return te::se::CreateStroke(color, width, opacity, "");
65 }
66 
67 te::se::Stroke* te::se::CreateStroke(const std::string& color, const std::string& width,
68  const std::string& opacity, const std::string& dasharray)
69 {
70  return te::se::CreateStroke(color, width, opacity, dasharray, "", "");
71 }
72 
73 te::se::Stroke* te::se::CreateStroke(const std::string& color, const std::string& width,
74  const std::string& opacity, const std::string& dasharray,
75  const std::string& linecap, const std::string& linejoin)
76 {
77  te::se::Stroke* stroke = te::se::CreateStroke(nullptr, width, opacity, dasharray, linecap, linejoin);
78 
79  if(!color.empty())
80  stroke->setColor(color);
81 
82  return stroke;
83 }
84 
86  const std::string& width, const std::string& opacity,
87  const std::string& dasharray, const std::string& linecap, const std::string& linejoin)
88 {
89  te::se::Stroke* stroke = new te::se::Stroke;
90 
91  if(graphicFill)
92  stroke->setGraphicFill(graphicFill);
93 
94  if(!width.empty())
95  stroke->setWidth(width);
96 
97  if(!opacity.empty())
98  stroke->setOpacity(opacity);
99 
100  if(!dasharray.empty())
101  stroke->setDashArray(dasharray);
102 
103  if(!linecap.empty())
104  stroke->setLineCap(linecap);
105 
106  if(!linejoin.empty())
107  stroke->setLineJoin(linecap);
108 
109  return stroke;
110 }
111 
112 te::se::Fill* te::se::CreateFill(const std::string& color, const std::string& opacity)
113 {
114  te::se::Fill* fill = new te::se::Fill;
115 
116  if(!color.empty())
117  fill->setColor(color);
118 
119  if(!opacity.empty())
120  fill->setOpacity(opacity);
121 
122  return fill;
123 }
124 
126 {
127  te::se::Fill* fill = new te::se::Fill;
128  fill->setGraphicFill(graphicFill);
129 
130  return fill;
131 }
132 
133 te::se::Mark* te::se::CreateMark(const std::string& wellKnownName, te::se::Stroke* stroke, te::se::Fill* fill)
134 {
135  std::string* name = new std::string(wellKnownName);
136 
137  te::se::Mark* mark = new te::se::Mark;
138  mark->setWellKnownName(name);
139  mark->setStroke(stroke);
140  mark->setFill(fill);
141 
142  return mark;
143 }
144 
145 te::se::Graphic* te::se::CreateGraphic(te::se::Mark* mark, const std::string& size, const std::string& rotation, const std::string& opacity)
146 {
147  te::se::Graphic* graphic = new te::se::Graphic;
148  graphic->add(mark);
149 
150  if(!size.empty())
151  graphic->setSize(new te::se::ParameterValue(size));
152 
153  if(!rotation.empty())
154  graphic->setRotation(new te::se::ParameterValue(rotation));
155 
156  if(!opacity.empty())
157  graphic->setOpacity(new te::se::ParameterValue(opacity));
158 
159  return graphic;
160 }
161 
163 {
165 
166  if(fill)
167  symbolizer->setFill(fill);
168 
169  if(stroke)
170  symbolizer->setStroke(stroke);
171 
172  return symbolizer;
173 }
174 
176 {
178 
179  if(stroke)
180  symbolizer->setStroke(stroke);
181 
182  return symbolizer;
183 }
184 
186 {
188  symbolizer->setGraphic(graphic);
189 
190  return symbolizer;
191 }
192 
193 te::se::Font* te::se::CreateFont(const std::string& family, const std::string& size, const te::se::Font::FontStyleType& style, const te::se::Font::FontWeightType& weight)
194 {
195  te::se::Font* font = new te::se::Font;
196  font->setFamily(family);
197  font->setSize(size);
198  font->setStyle(style);
199  font->setWeight(weight);
200 
201  return font;
202 }
203 
205 {
207  symbolizer->setLabel(new te::se::ParameterValue(label));
208  symbolizer->setFill(fill);
209  symbolizer->setFont(font);
210 
211  return symbolizer;
212 }
213 
214 te::se::Description* te::se::CreateDescription(const std::string& title, const std::string& abst)
215 {
216  te::se::Description* description = new te::se::Description;
217  description->setTitle(title);
218  description->setAbstract(abst);
219 
220  return description;
221 }
222 
224 {
225  std::string color = GenerateRandomColor();
226 
227  return CreateSymbolizer(geomType, color);
228 }
229 
230 te::se::Symbolizer* te::se::CreateSymbolizer(const te::gm::GeomType& geomType, const std::string& color)
231 {
232  switch(geomType)
233  {
234  case te::gm::PolygonType:
246  {
247  te::se::Fill* fill = CreateFill(color, "1.0");
248  te::se::Stroke* stroke = CreateStroke("#000000", "1");
250  symbolizer->setFill(fill);
251  symbolizer->setStroke(stroke);
252  return symbolizer;
253  }
254 
263  {
264  te::se::Stroke* stroke = CreateStroke(color, "1");
266  symbolizer->setStroke(stroke);
267  return symbolizer;
268  }
269 
270  case te::gm::PointType:
271  case te::gm::PointMType:
272  case te::gm::PointZType:
273  case te::gm::PointZMType:
278  {
279  te::se::Fill* markFill = CreateFill(color, "1.0");
280  te::se::Stroke* markStroke = CreateStroke("#000000", "1");
281  te::se::Mark* mark = CreateMark("circle", markStroke, markFill);
282  te::se::Graphic* graphic = CreateGraphic(mark, "12", "", "");
283  return CreatePointSymbolizer(graphic);
284  }
285 
286  default:
287  return nullptr;
288  }
289 }
290 
292 {
293  te::se::Symbolizer* symbolizer = CreateSymbolizer(geomType);
294 
295  te::se::Rule* rule = new te::se::Rule;
296 
297  if(symbolizer != nullptr)
298  rule->push_back(symbolizer);
299 
301  style->push_back(rule);
302 
303  return style;
304 }
305 
306 te::se::Style* te::se::CreateCoverageStyle(const std::vector<te::rst::BandProperty*>& properties)
307 {
308  if (properties.empty())
309  return nullptr;
310 
311  // Default raster symbolizer
312  te::se::RasterSymbolizer* rasterSymbolizer = new te::se::RasterSymbolizer;
313 
314  // General parameters
315  rasterSymbolizer->setOpacity(new te::se::ParameterValue("1.0"));
316  rasterSymbolizer->setGain(new te::se::ParameterValue("0.0"));
317  rasterSymbolizer->setOffset(new te::se::ParameterValue("0.0"));
318 
319  //No Data Value
320  if (properties[0]->m_noDataValue == std::numeric_limits<double>::max())
321  {
322  rasterSymbolizer->setNoDataValue(nullptr);
323  }
324  else
325  {
326  std::string noDataValueStr = boost::lexical_cast<std::string>(properties[0]->m_noDataValue);
327  rasterSymbolizer->setNoDataValue(new te::se::ParameterValue(noDataValueStr));
328  }
329 
330  // Channel selection
331  if ((properties.size() == 1) || (properties.size() == 2))
332  {
334  sc->setSourceChannelName(std::string("0"));
335 
338  cs->setGrayChannel(sc);
339 
340  rasterSymbolizer->setChannelSelection(cs);
341  }
342  else if (properties.size() >= 3)
343  {
344  // Red Channel
346  scr->setSourceChannelName(std::string("0"));
347 
348  // Green Channel
350  scg->setSourceChannelName(std::string("1"));
351 
352  // Blue channel
354  scb->setSourceChannelName(std::string("2"));
355 
358  cs->setRedChannel(scr);
359  cs->setGreenChannel(scg);
360  cs->setBlueChannel(scb);
361 
362  rasterSymbolizer->setChannelSelection(cs);
363  }
364 
365  te::se::Rule* rule = new te::se::Rule();
366  rule->push_back(rasterSymbolizer);
367 
369  style->push_back(rule);
370 
371  return style;
372 }
373 
374 te::se::Style* te::se::CreateCoverageStyle(const std::size_t& nBands)
375 {
376  if(nBands == 0)
377  return nullptr;
378 
379  // Default raster symbolizer
380  te::se::RasterSymbolizer* rasterSymbolizer = CreateRasterSymbolizer(nBands);
381 
382  te::se::Rule* rule = new te::se::Rule();
383  rule->push_back(rasterSymbolizer);
384 
386  style->push_back(rule);
387 
388  return style;
389 }
390 
391 
393 {
394  // Default raster symbolizer
395  te::se::RasterSymbolizer* rasterSymbolizer = new te::se::RasterSymbolizer;
396 
397  // General parameters
398  rasterSymbolizer->setOpacity(new te::se::ParameterValue("1.0"));
399  rasterSymbolizer->setGain(new te::se::ParameterValue("0.0"));
400  rasterSymbolizer->setOffset(new te::se::ParameterValue("0.0"));
401 
402  // Channel selection
403  if((nBands == 1) || (nBands == 2))
404  {
406  sc->setSourceChannelName(std::string("0"));
407 
410  cs->setGrayChannel(sc);
411 
412  rasterSymbolizer->setChannelSelection(cs);
413  }
414  else if(nBands >= 3)
415  {
416  // Red Channel
418  scr->setSourceChannelName(std::string("0"));
419 
420  // Green Channel
422  scg->setSourceChannelName(std::string("1"));
423 
424  // Blue channel
426  scb->setSourceChannelName(std::string("2"));
427 
430  cs->setRedChannel(scr);
431  cs->setGreenChannel(scg);
432  cs->setBlueChannel(scb);
433 
434  rasterSymbolizer->setChannelSelection(cs);
435  }
436 
437  return rasterSymbolizer;
438 }
439 
441 {
442  assert(s);
443 
444  std::size_t nRules = s->getRules().size();
445 
446  if(nRules <= 0)
447  return nullptr;
448 
449  // for while, consider one rule
450  const te::se::Rule* r = s->getRule(0);
451 
452  const std::vector<te::se::Symbolizer*>& symbolizers = r->getSymbolizers();
453 
454  if(symbolizers.empty())
455  return nullptr;
456 
457  // for while, consider one raster symbolizer
458  te::se::RasterSymbolizer* rasterSymbolizer = dynamic_cast<te::se::RasterSymbolizer*>(symbolizers[0]);
459 
460  return rasterSymbolizer;
461 }
462 
464 {
466  t.setHsv(rand() % 360, 64 + (rand() % 192), 128 + (rand() % 128));
467 
468  te::color::RGBAColor color(t.getRgba());
469 
470  return color.getColor();
471 }
472 
474 {
475  if(stroke == nullptr)
476  return;
477 
478  te::se::GetColor(stroke->getColor(), stroke->getOpacity(), color);
479 }
480 
482 {
483  if(fill == nullptr)
484  return;
485  te::se::GetColor(fill->getColor(), fill->getOpacity(), color);
486 }
487 
489 {
490  if(color == nullptr && opacity == nullptr)
491  return;
492 
493  int alpha = TE_OPAQUE;
494  if(opacity)
495  {
496  alpha = (int)(te::se::GetDouble(opacity) * TE_OPAQUE);
497  rgba.setColor(rgba.getRed(), rgba.getGreen(), rgba.getBlue(), alpha);
498  }
499 
500  if(color)
501  {
503  rgba.setColor(rgb.getRed(), rgb.getGreen(), rgb.getBlue(), rgba.getAlpha());
504  }
505 }
506 
508 {
510 }
511 
513 {
514  return atoi(te::se::GetString(param).c_str());
515 }
516 
518 {
519  return atof(te::se::GetString(param).c_str());
520 }
521 
522 std::string te::se::GetString(const te::se::ParameterValue* param)
523 {
524  assert(param->getNParameters() > 0);
525 
527  assert(p);
528 
529  if(p->m_mixedData)
530  {
531  return *p->m_mixedData;
532  }
533  else //if(p->m_expression)
534  {
535  te::fe::Literal* l = dynamic_cast<te::fe::Literal*>(p->m_expression);
536  assert(l);
537  return l->getValue();
538  }
539 }
A TextSymbolizer is used to render text labels according to various graphical parameters.
void setRotation(ParameterValue *value)
The Rotation element gives the rotation of a graphic in the clockwise direction about its center poin...
Definition: Graphic.cpp:125
The CoverageStyle defines the styling that is to be applied to a subset of Coverage data...
void setRedChannel(SelectedChannel *c)
A selected channel to be display.
void setGraphicFill(Graphic *fill)
Sets the GraphicFill element to this Stroke. GraphicFill defines that the pixels of the line will be ...
Definition: Stroke.cpp:57
A SvgParameter refers to an SVG/CSS graphical-formatting parameter.
TESEEXPORT void GetColor(const te::se::Stroke *stroke, te::color::RGBAColor &color)
It gets the RGBA color from the Stroke element.
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
A Description gives human-readable descriptive information for the object it is included within...
Definition: Description.h:56
ChannelSelection specifies the false-color channel selection for a multi-spectral raster source (such...
void setWidth(const std::string &width)
Definition: Stroke.cpp:98
void setColor(const std::string &hexColor)
It sets the color using a two hexadecimal RGB-encoded color.
Definition: RGBAColor.h:341
void setOpacity(ParameterValue *value)
The Opacity element gives the opacity to use for rendering the graphic. It has the same semantics as ...
Definition: Graphic.cpp:103
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
Definition: Style.h:65
A Mark specifies a geometric shape and applies coloring to it.
Definition: Mark.h:84
int getRed() const
It returns the red component color value (a value from 0 to 255).
Definition: RGBAColor.h:307
void setAbstract(const std::string &a)
Definition: Description.cpp:43
A PolygonSymbolizer is used to draw a polygon (or other area-type geometries), including filling its ...
TESEEXPORT Symbolizer * CreateSymbolizer(const te::gm::GeomType &geomType)
Try creates an appropriate symbolizer based on given geometry type.
Utility functions for Symbology Enconding module.
TESEEXPORT RasterSymbolizer * CreateRasterSymbolizer(const std::size_t &nBands)
Try creates an appropriate raster symbolizer style based on given number of bands.
A Fill specifies the pattern for filling an area geometry.
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:80
TESEEXPORT RasterSymbolizer * GetRasterSymbolizer(Style *s)
Try to get raster symbolizer from a style.
void setSize(ParameterValue *value)
The Size element gives the absolute size of the graphic in uoms encoded as a floating-point number...
Definition: Graphic.cpp:114
The CoverageStyle defines the styling that is to be applied to a subset of Coverage data...
Definition: CoverageStyle.h:45
void setColor(const std::string &color)
Definition: Fill.cpp:66
TESEEXPORT Style * CreateCoverageStyle(const std::vector< te::rst::BandProperty * > &properties)
Try creates an appropriate coverage style based on given band properties.
void setGain(ParameterValue *p)
The ParameterValueType uses WFS-Filter expressions to give values for SE graphic parameters.
int getBlue() const
It returns the blue component color value (a value from 0 to 255).
Definition: RGBAColor.h:317
int getGreen() const
It returns the green component color value (a value from 0 to 255).
Definition: RGBAColor.h:312
#define TE_OPAQUE
For an RGBA color this is the value of the alpha-channel for totally opaque.
A PointSymbolizer specifies the rendering of a graphic Symbolizer at a point.
void setSize(const std::string &size)
Definition: Font.cpp:83
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
void setFill(Fill *f)
Definition: Mark.cpp:108
void push_back(const std::string &semanticTypeIdentifier)
Definition: Style.cpp:75
TESEEXPORT double GetDouble(const te::se::ParameterValue *param)
It gets the parameter value as a double.
void setGrayChannel(SelectedChannel *c)
TESEEXPORT LineSymbolizer * CreateLineSymbolizer(Stroke *stroke)
Creates a line symbolizer.
TESEEXPORT TextSymbolizer * CreateTextSymbolizer(const std::string &label, Fill *fill, Font *font)
Creates a text symbolizer.
void getRgba(int *r, int *g, int *b, int *a=0) const
It gets the color value.
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
Definition: Graphic.h:66
TESEEXPORT PolygonSymbolizer * CreatePolygonSymbolizer(Stroke *stroke, Fill *fill)
Creates a polygon symbolizer.
void push_back(Symbolizer *s)
Definition: Rule.cpp:138
void setDashArray(const std::string &dasharray)
Definition: Stroke.cpp:113
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
void setColor(const std::string &color)
Definition: Stroke.cpp:88
void add(ExternalGraphic *g)
Graphics can either be referenced from an external URL in a common format (such as GIF or SVG)...
Definition: Graphic.cpp:59
void setHsv(int h, int s, int v, int a=255)
It sets the h, s, v components of this color.
TESEEXPORT Style * CreateFeatureTypeStyle(const te::gm::GeomType &geomType)
Try creates an appropriate feature type style based on given geometry type.
const Parameter * getParameter(size_t i) const
A Description gives human-readable descriptive information for the object it is included within...
Rule * getRule(std::size_t i) const
Definition: Style.cpp:105
const std::vector< Rule * > & getRules() const
Definition: Style.cpp:94
A LineSymbolizer is used to style a stroke along a linear geometry type, such as a string of line seg...
void setOpacity(const std::string &opacity)
Definition: Stroke.cpp:93
const SvgParameter * getOpacity() const
Definition: Stroke.cpp:128
The FeatureTypeStyle defines the styling that is to be applied to a dataset that can be viewed as a f...
const SvgParameter * getColor() const
Definition: Stroke.cpp:123
void setNoDataValue(ParameterValue *p)
void setColorCompositionType(ColorCompositionType cct)
void setChannelSelection(ChannelSelection *c)
A Font specifies the text font to use in a text symbolizer.
Definition: Font.h:63
void setStroke(Stroke *stroke)
A Stroke specifies the appearance of a linear geometry. The Stroke element is optional inside of Line...
int getAlpha() const
It returns the alpha component color value (a value from 0 to 255).
Definition: RGBAColor.h:322
void setTitle(const std::string &title)
Definition: Description.cpp:33
void setLineCap(const std::string &cap)
Definition: Stroke.cpp:108
TESEEXPORT Graphic * CreateGraphic(Mark *mark, const std::string &size, const std::string &rotation, const std::string &opacity)
Creates a graphic.
A PolygonSymbolizer is used to draw a polygon (or other area-type geometries), including filling its ...
te::gm::Polygon * p
size_t getNParameters() const
void setOpacity(const std::string &opacity)
Definition: Fill.cpp:71
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos...
A Fill specifies the pattern for filling an area geometry.
Definition: Fill.h:59
void setOpacity(ParameterValue *p)
FontStyleType
It defines the style to use for a font.
Definition: Font.h:72
void setGraphicFill(Graphic *g)
Sets the GraphicFill element to this Fill. GraphicFill defines that the pixels of the area will be dr...
Definition: Fill.cpp:46
TESEEXPORT Mark * CreateMark(const std::string &wellKnownName, Stroke *stroke, Fill *fill)
Creates a mark.
A TextSymbolizer is used to render text labels according to various graphical parameters.
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos...
const std::vector< Symbolizer * > & getSymbolizers() const
Definition: Rule.cpp:158
TESEEXPORT Stroke * CreateStroke(const std::string &color, const std::string &width)
Creates a stroke.
void setWeight(const FontWeightType &weight)
Definition: Font.cpp:78
void setLabel(ParameterValue *l)
A Mark specifies a geometric shape and applies coloring to it.
void setLineJoin(const std::string &join)
Definition: Stroke.cpp:103
This class can be used to represent literal values.
Definition: fe/Literal.h:56
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
Definition: Rule.h:76
void setOffset(ParameterValue *p)
A Stroke specifies the appearance of a linear geometry.
Definition: Stroke.h:67
void setFamily(const std::string &family)
Definition: Font.cpp:68
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
void setStroke(Stroke *stroke)
A Stroke specifies the appearance of a linear geometry.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57
TESEEXPORT int GetInt(const te::se::ParameterValue *param)
It gets the parameter value as an integer.
void setSourceChannelName(const std::string &name)
TESEEXPORT Font * CreateFont(const std::string &family, const std::string &size, const te::se::Font::FontStyleType &style=te::se::Font::StyleNormal, const te::se::Font::FontWeightType &weight=te::se::Font::WeightNormal)
Creates a font.
void setStroke(Stroke *s)
Definition: Mark.cpp:119
The FeatureTypeStyle defines the styling that is to be applied to a dataset that can be viewed as a f...
A LineSymbolizer is used to style a stroke along a linear geometry type, such as a string of line seg...
const SvgParameter * getColor() const
Definition: Fill.cpp:76
TESEEXPORT std::string GenerateRandomColor()
Creates a random RGB color encoded using two hexadecimal digits per primary-color component prefixed ...
TESEEXPORT Description * CreateDescription(const std::string &title, const std::string &abst)
Creates a description.
A PointSymbolizer specifies the rendering of a graphic Symbolizer at a point.
const std::string & getValue() const
It returns the literal value.
Definition: fe/Literal.cpp:36
A class to transform RGBA color to HSV, HSL and CMYK.
void setFill(Fill *f)
A Fill specifies the pattern for filling an area geometry.
void setStyle(const FontStyleType &style)
Definition: Font.cpp:73
A selected channel to be display.
FontWeightType
It gives the amount of weight or boldness to use for a font.
Definition: Font.h:84
void setWellKnownName(std::string *name)
The WellKnownName element gives the well-known name of the shape of the mark.
Definition: Mark.cpp:54
void setBlueChannel(SelectedChannel *c)
void setGraphic(Graphic *graphic)
TESEEXPORT std::string GetString(const te::se::ParameterValue *param)
It gets the parameter value as a string.
A Stroke specifies the appearance of a linear geometry.
std::string getColor(const NameFormat format=HexRgb) const
It gets the color encoded using two hexadecimal digits per primary-color component, in the order Red, Green, Blue, if HexRgb format, or Alpha, Red, Green, Blue, if HexArgb format, prefixed with a hash (#) sign.
Definition: RGBAColor.h:371
TESEEXPORT PointSymbolizer * CreatePointSymbolizer(Graphic *graphic)
Creates a point symbolizer.
TESEEXPORT Fill * CreateFill(const std::string &color, const std::string &opacity)
Creates a fill.
void setGreenChannel(SelectedChannel *c)
const SvgParameter * getOpacity() const
Definition: Fill.cpp:81
ChannelSelection specifies the false-color channel selection for a multi-spectral raster source (such...