27 #include "../../../fe/serialization/xml/Filter.h"
28 #include "../../../fe/serialization/xml/Expression.h"
29 #include "../../../xlink/serialization/xml/XLinkSerializer.h"
30 #include "../../../xml/AbstractWriter.h"
31 #include "../../../xml/Reader.h"
32 #include "../../AnchorPoint.h"
33 #include "../../Categorize.h"
34 #include "../../ChannelSelection.h"
35 #include "../../ColorMap.h"
36 #include "../../ContrastEnhancement.h"
37 #include "../../Description.h"
38 #include "../../Displacement.h"
39 #include "../../ExternalGraphic.h"
40 #include "../../Fill.h"
41 #include "../../Font.h"
42 #include "../../Graphic.h"
43 #include "../../GraphicStroke.h"
44 #include "../../Halo.h"
45 #include "../../ImageOutline.h"
46 #include "../../InlineContent.h"
47 #include "../../Interpolate.h"
48 #include "../../InterpolationPoint.h"
49 #include "../../LabelPlacement.h"
50 #include "../../LinePlacement.h"
51 #include "../../Mark.h"
52 #include "../../ParameterValue.h"
53 #include "../../PointPlacement.h"
54 #include "../../RasterSymbolizer.h"
55 #include "../../Rule.h"
56 #include "../../SelectedChannel.h"
57 #include "../../ShadedRelief.h"
58 #include "../../Stroke.h"
59 #include "../../SvgParameter.h"
60 #include "../../Symbolizer.h"
117 std::string fbv = reader.
getAttr(
"fallbackValue");
118 assert(!fbv.empty());
119 c->setFallbackValue(fbv);
122 std::string tbt = reader.
getAttr(
"threshholdsBelongTo");
123 assert(!tbt.empty() && (tbt ==
"preceding" || tbt ==
"succeeding"));
183 std::vector<te::se::ParameterValue*> thresholds = c->
getThresholds();
185 assert(thresholds.size() == values.size()-1);
187 for(std::size_t i = 0; i < values.size(); ++i)
191 if(i != values.size()-1)
220 std::size_t nChannels = 0;
246 assert(nChannels > 0);
320 Save(categorize, writer);
325 Save(interpolate, writer);
409 description->setTitle(title);
422 description->setAbstract(abs);
432 return description.release();
497 eg->setOnlineResource(te::xl::serialize::ReadSimpleLink(reader));
540 const std::string& format = eg->
getFormat();
541 assert(!format.empty());
575 return fill.release();
618 return font.release();
682 return graphic.release();
692 const std::vector<te::se::Mark*> marks = graphic->
getMarks();
693 for(std::size_t i = 0; i < marks.size(); ++i)
694 Save(marks[i], writer);
697 for(std::size_t i = 0; i < egs.size(); ++i)
698 Save(egs[i], writer);
739 return graphicStroke.release();
744 if(graphicStroke == 0)
751 Save(graphic, writer);
782 return halo.release();
806 imageOutline->setSymbolizer(Symbolizer::getInstance().read(reader));
811 return imageOutline.release();
816 if(imageOutline == 0)
822 Symbolizer::getInstance().write(imageOutline->
getSymbolizer(), writer);
832 std::string encondingValue = reader.
getAttr(
"enconding");
833 assert(encondingValue ==
"xml" || encondingValue ==
"base64");
872 std::string fbv = reader.
getAttr(
"fallbackValue");
873 assert(!fbv.empty());
874 interpolate->setFallbackValue(fbv);
877 std::string mode = reader.
getAttr(
"mode");
878 assert(!mode.empty() && (mode ==
"linear" || mode ==
"cosine" || mode ==
"cubic"));
881 else if(mode ==
"cosine")
887 std::string method = reader.
getAttr(
"method");
888 assert(!method.empty() && (method ==
"numeric" || method ==
"color"));
909 return interpolate.release();
952 assert(!ipts.empty());
953 for(std::size_t i = 0; i < ipts.size(); ++i)
954 Save(ipts[i], writer);
1017 return lp.release();
1033 assert(linePlacement);
1034 Save(linePlacement, writer);
1062 lp->setIsRepeated(isRepeated);
1086 lp->setIsAligned(isAligned);
1096 lp->setGeneralizeLine(generalizeLine);
1103 return lp.release();
1115 std::string isRepeated;
1116 lp->
isRepeated() ? isRepeated =
"true" : isRepeated =
"false";
1122 std::string isAligned;
1123 lp->
isAligned() ? isAligned =
"true" : isAligned =
"false";
1126 std::string generalizeLine;
1128 writer.
writeElement(
"se:GeneralizeLine", generalizeLine);
1154 mark->setOnlineResource(te::xl::serialize::ReadSimpleLink(reader));
1169 return mark.release();
1181 writer.
writeElement(
"se:WellKnownName", *wellKnownName);
1193 const std::string* format = mark->
getFormat();
1216 if(type ==
"AVERAGE")
1219 if(type ==
"EARLIEST_ON_TOP")
1222 if(type ==
"LATEST_ON_TOP")
1225 if(type ==
"RANDOM")
1246 writer.
writeElement(
"se:OverlapBehavior",
"EARLIEST_ON_TOP");
1250 writer.
writeElement(
"se:OverlapBehavior",
"LATEST_ON_TOP");
1274 return param.release();
1284 for(std::size_t i = 0; i != n; ++i)
1322 return pp.release();
1379 rule->enableElseFilter();
1391 rule->setMinScaleDenominator(minScale);
1404 rule->setMaxScaleDenominator(maxScale);
1419 return rule.release();
1451 const std::vector<te::se::Symbolizer*>& symbs = rule->
getSymbolizers();
1452 for(std::size_t i = 0; i < symbs.size(); ++i)
1453 Symbolizer::getInstance().write(symbs[i], writer);
1487 return sc.release();
1529 return sr.release();
1539 std::string brightnessOnlyValue;
1540 sr->
isBrightnessOnly() ? brightnessOnlyValue =
"true" : brightnessOnlyValue =
"false";
1542 writer.
writeElement(
"se:BrightnessOnly", brightnessOnlyValue);
1578 return stroke.release();
1614 std::string name = reader.
getAttr(
"name");
1615 assert(!name.empty());
1639 return svgParam.release();
1651 Save(static_cast<const te::se::ParameterValue*>(p), writer);
const ParameterValue * getRotation() const
ParameterValue * getValue() const
A selected channel to be display.
const SvgParameter * getLineCap() const
const ParameterValue * getDisplacementX() const
const AnchorPoint * getAnchorPoint() const
ContrastEnhancementType
The type of contrast enhancement.
A Description gives human-readable descriptive information for the object it is included within...
const ParameterValue * getRadius() const
The transformation of continuous values to distinct values (Categorize function). ...
bool hasElseFilter() const
double getReliefFactor() const
A Mark specifies a geometric shape and applies coloring to it.
This class models a XML reader object.
TESEEXPORT te::se::InterpolationPoint * ReadInterpolationPoint(te::xml::Reader &reader)
Interpolate * getInterpolate() const
A Displacement gives X and Y offset displacements to use for rendering a text label, graphic or other Symbolizer near a point.
A LinePlacement specifies how a text label should be rendered relative to a linear geometry...
The LabelPlacement specifies where and how a text label should be rendered relative to a geometry...
const std::vector< ExternalGraphic * > getExternalGraphics() const
const std::string & getTitle() const
const std::string & getFallbackValue() const
virtual void writeStartElement(const std::string &qName)=0
const ParameterValue * getGap() const
const Displacement * getDisplacement() const
TESEEXPORT te::se::SvgParameter * ReadSvgParameter(te::xml::Reader &reader)
te::fe::Expression * m_expression
Parameter from an expression.
virtual void writeValue(const std::string &value)=0
const double & getMinScaleDenominator() const
const SvgParameter * getLineJoin() const
bool isBrightnessOnly() const
const ParameterValue * getInitialGap() const
TEFEEXPORT te::fe::Filter * ReadFilter(te::xml::Reader &reader)
ThresholdsBelongToType
It controls the interval order.
const SvgParameter * getFamily() const
std::string * m_mixedData
Parameter from a mixed data content.
ParameterValue * getLookupValue() const
const std::vector< InterpolationPoint * > & getInterpolationPoints() const
const std::string & getAbstract() const
SelectedChannel * getRedChannel() const
TESEEXPORT te::se::GraphicStroke * ReadGraphicStroke(te::xml::Reader &reader)
const std::string & getData() const
const ThresholdsBelongToType & getThresholdsBelongTo() const
TESEEXPORT te::se::ContrastEnhancement * ReadContrastEnhancement(te::xml::Reader &reader)
SelectedChannel * getBlueChannel() const
void setDashOffset(const std::string &offset)
const te::fe::Filter * getFilter() const
const ParameterValue * getRotation() const
This class models a XML writer object.
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
const SvgParameter * getWeight() const
The transformation of continuous values to a number of values (Interpolate function).
const MethodType & geMethodType() const
const AnchorPoint * getAnchorPoint() const
TESEEXPORT te::se::Fill * ReadFill(te::xml::Reader &reader)
TESEEXPORT te::se::Halo * ReadHalo(te::xml::Reader &reader)
InlineContent is XML- or base64-encoded encoded content in some externally-defined format that is inc...
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
void WriteStringPtrHelper(const std::string &elementName, const std::string *s, te::xml::AbstractWriter &writer)
const std::string * getFormat() const
TESEEXPORT te::se::Mark * ReadMark(te::xml::Reader &reader)
TESEEXPORT te::se::ParameterValue * ReadParameterValue(te::xml::Reader &reader)
const ParameterValue * getGap() const
An AnchorPoint identifies the location inside of a text label to use an 'anchor' for positioning it r...
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node.
std::string getSourceChannelName() const
const ParameterValue * getDisplacementY() const
TESEEXPORT te::se::Stroke * ReadStroke(te::xml::Reader &reader)
const std::vector< ParameterValue * > & getThresholds() const
const SvgParameter * getSize() const
const Parameter * getParameter(size_t i) const
const te::xl::SimpleLink * getOnlineResource() const
TESEEXPORT te::se::Categorize * ReadCategorize(te::xml::Reader &reader)
A PointPlacement specifies how a text label should be rendered relative to a geometric point...
TESEEXPORT RasterSymbolizer::OverlapBehavior ReadOverlapBehavior(te::xml::Reader &reader)
virtual void writeElement(const std::string &qName, const std::string &value)=0
The ExternalGraphic allows a reference to be made to an external graphic file with a Web URL or to in...
const SvgParameter * getOpacity() const
TESEEXPORT te::se::Interpolate * ReadInterpolate(te::xml::Reader &reader)
OverlapBehavior
OverlapBehavior tells a system how to behave when multiple raster images in a layer overlap each othe...
const Graphic * getGraphicFill() const
Gets the GraphicFill element associate to this Stroke.
static T & getInstance()
It returns a reference to the singleton instance.
virtual double getElementValueAsDouble() const
It returns the element data value in the case of VALUE node.
TESEEXPORT te::se::ExternalGraphic * ReadExternalGraphic(te::xml::Reader &reader)
TESEEXPORT te::se::Displacement * ReadDisplacement(te::xml::Reader &reader)
const SvgParameter * getColor() const
const Graphic * getGraphicFill() const
Gets the GraphicFill element associate to this Fill.
ModeType
It controls the ...
const GraphicStroke * getGraphicStroke() const
Gets the GraphicStroke element associate to this Stroke.
ParameterValue * getLookupValue() const
EncodingType getEncoding() const
ContrastEnhancement defines the 'stretching' of contrast for a channel of a false-color image or for ...
const InlineContent * getInlineContent() const
MethodType
It controls the ...
TEDATAACCESSEXPORT void Save(const std::string &fileName)
A Font specifies the text font to use in a text symbolizer.
Auxiliary classes and functions to serialize Symbolizer informations from a XML document.
ColorCompositionType getColorCompositionType() const
Utility methods for the Symbology serialization.
size_t getNParameters() const
void WriteOnlineResourceHelper(const te::xl::SimpleLink *link, te::xml::AbstractWriter &writer)
ImageOutline specifies how individual source rasters in a multi-raster set (such as a set of satellit...
A Fill specifies the pattern for filling an area geometry.
const ParameterValue * getAnchorPointX() const
std::string getName() const
const std::string * getWellKnownName() const
const std::string & getFormat() const
virtual std::string getAttr(const std::string &name) const =0
It returns the attribute value in the case of an element node with valid attributes.
TESEEXPORT te::se::SelectedChannel * ReadSelectedChannel(te::xml::Reader &reader)
TESEEXPORT void Save(const te::se::AnchorPoint *ap, te::xml::AbstractWriter &writer)
const Stroke * getStroke() const
ParameterValue * getValue() const
TESEEXPORT te::se::ColorMap * ReadColorMap(te::xml::Reader &reader)
virtual bool getElementValueAsBoolean() const
It returns the element data value in the case of VALUE node.
TESEEXPORT te::se::LabelPlacement * ReadLabelPlacement(te::xml::Reader &reader)
TESEEXPORT te::se::InlineContent * ReadInlineContent(te::xml::Reader &reader)
const std::vector< Symbolizer * > & getSymbolizers() const
const te::xl::SimpleLink * getOnlineResource() const
ContrastEnhancementType getContrastEnhancementType() const
const ParameterValue * getInitialGap() const
InlineContent * getInlineContent() const
SelectedChannel * getGreenChannel() const
const Displacement * getDisplacement() const
Data serialization for the Symbology Encoder module.
virtual void writeAttribute(const std::string &attName, const std::string &value)=0
TESEEXPORT te::se::LinePlacement * ReadLinePlacement(te::xml::Reader &reader)
ContrastEnhancement * getContrastEnhancement() const
const std::vector< Mark * > getMarks() const
const LinePlacement * getLinePlacement() const
const SvgParameter * getDashArray() const
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
EncodingType
The format type of encoded data.
They are used to define a graph of points.
A Stroke specifies the appearance of a linear geometry.
TESEEXPORT te::se::ChannelSelection * ReadChannelSelection(te::xml::Reader &reader)
virtual NodeType getNodeType() const =0
It return the type of node read.
TESEEXPORT te::se::PointPlacement * ReadPointPlacement(te::xml::Reader &reader)
const Fill * getFill() const
TEFEEXPORT void Save(const te::fe::Filter *filter, te::xml::AbstractWriter &writer)
virtual std::string getElementValue() const =0
It returns the element data value in the case of VALUE node.
Categorize * getCategorize() const
TESEEXPORT te::se::ImageOutline * ReadImageOutline(te::xml::Reader &reader)
const SvgParameter * getStyle() const
virtual void writeEndElement(const std::string &qName)=0
const ParameterValue * getAnchorPointY() const
TESEEXPORT te::se::Font * ReadFont(te::xml::Reader &reader)
const double & getMaxScaleDenominator() const
const SvgParameter * getColor() const
A SvgParameter refers to an SVG/CSS graphical-formatting parameter.
const ModeType & getModeType() const
TESEEXPORT te::se::Rule * ReadRule(te::xml::Reader &reader)
void WriteParameterValuePtrHelper(const std::string &elementName, const te::se::ParameterValue *p, te::xml::AbstractWriter &writer)
const Description * getDescription() const
TESEEXPORT te::se::Description * ReadDescription(te::xml::Reader &reader)
virtual bool hasAttrs() const =0
It tells if the element has attributes in the case of an element node.
Symbolizer * getSymbolizer() const
SelectedChannel * getGrayChannel() const
A Halo is a type of Fill that is applied to the backgrounds of font glyphs.
const PointPlacement * getPointPlacement() const
virtual bool next()=0
It gets the next event to be read.
const ParameterValue * getPerpendicularOffset() const
const ParameterValue * getSize() const
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
ShadedRelief specifies the application of relief shading (or "hill shading") to a DEM raster to give ...
const Graphic * getGraphic() const
const Graphic * getLegendGraphic() const
TESEEXPORT te::se::Graphic * ReadGraphic(te::xml::Reader &reader)
A GraphicStroke defines a repeated-linear graphic pattern to be used for stroking a line...
double getGammaValue() const
TESEEXPORT te::se::ShadedRelief * ReadShadedRelief(te::xml::Reader &reader)
const std::vector< ParameterValue * > & getThresholdValues() const
const SvgParameter * getWidth() const
void WriteSelectedChannelHelper(const std::string &elementName, const te::se::SelectedChannel *sc, te::xml::AbstractWriter &writer)
bool getGeneralizeLine() const
const Fill * getFill() const
const SvgParameter * getOpacity() const
ChannelSelection specifies the false-color channel selection for a multi-spectral raster source (such...
TESEEXPORT te::se::AnchorPoint * ReadAnchorPoint(te::xml::Reader &reader)
const ParameterValue * getOpacity() const
const std::string * getName() const