A Symbolizer describes how a feature is to appear on a map. More...
#include <Symbolizer.h>
Public Types | |
typedef R | ReturnType |
typedef Visitor | VisitorType |
Public Member Functions | |
virtual ReturnType | accept (VisitorType &guest) const =0 |
It call the visit method from the guest object. More... | |
virtual Symbolizer * | clone () const =0 |
It creates a new copy of this object. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
Symbolizer () | |
It initializes a new Symbolizer. More... | |
Symbolizer (const Symbolizer &rhs) | |
Copy constructor. More... | |
virtual | ~Symbolizer () |
Virtual destructor. More... | |
Accessor methods | |
Methods used to get or set properties. | |
void | setName (const std::string &name) |
const std::string & | getName () const |
void | setDescription (Description *d) |
const Description * | getDescription () const |
void | setBaseSymbolizer (te::xl::SimpleLink *baseSymbolizer) |
const te::xl::SimpleLink * | getBaseSymbolizer () const |
void | setVersion (const std::string &version) |
const std::string & | getVersion () const |
void | setUom (const te::common::BaseUnitOfMeasure *uom) |
It sets the unit-of-measure. More... | |
const te::common::BaseUnitOfMeasure * | getUom () const |
virtual const std::string & | getType () const =0 |
It returns the symbolizer type. More... | |
Private Attributes | |
te::xl::SimpleLink * | m_baseSymbolizer |
A BaseSymbolizer (an OnlineResource) defines the default properties of a Symbolizer to be those of an external Symbolizer, which will frequently be inside of an OGC Symbolizer repository. The Symbolizer properties given in-line override the base-Symbolizer properties. (Optional) More... | |
Description * | m_description |
It gives the familiar short title for display lists and longer description for the symbolizer. (Optional) More... | |
std::string | m_name |
It allows the symbolizer to be referenced externally, which is needed in some methods of SE usage. (Optional) More... | |
const te::common::BaseUnitOfMeasure * | m_uom |
Unit of measurement. If no uom is set inside of Symbolizer, all units are measured in pixel. (Mandatory) More... | |
std::string | m_version |
The version is an optional attribute on the FeatureType Style element that identifies the SE version number that the FeatureTypeStyle corresponds to. For now, the only allowed value is 1.1.0. (Mandatory) More... | |
A Symbolizer describes how a feature is to appear on a map.
A Symbolizer is an abstract type for encoding the graphical properties used to portray geographic information. Concrete Symbolizers are derived from this base type. A Symbolizer describes how a feature is to appear on a map. The Symbolizer describes not just the shape that should appear but also such graphical properties as color and opacity. A Symbolizer is obtained by specifying one of a small number of different types of Symbolizers and then supplying parameters to override its default behaviour. Five types of Symbolizers are defined:
Concrete Symbolizer types are derived from this base type.
Definition at line 80 of file Symbolizer.h.
|
inherited |
Definition at line 58 of file BaseVisitable.h.
|
inherited |
Definition at line 57 of file BaseVisitable.h.
te::se::Symbolizer::Symbolizer | ( | ) |
It initializes a new Symbolizer.
Definition at line 35 of file Symbolizer.cpp.
te::se::Symbolizer::Symbolizer | ( | const Symbolizer & | rhs | ) |
Copy constructor.
rhs | The other symbolizer. |
Definition at line 43 of file Symbolizer.cpp.
References te::se::Description::clone(), m_baseSymbolizer, and m_description.
|
virtual |
Virtual destructor.
Definition at line 61 of file Symbolizer.cpp.
|
pure virtualinherited |
It call the visit method from the guest object.
guest | The guest or visitor. |
|
pure virtual |
It creates a new copy of this object.
Implemented in te::se::PolygonSymbolizer, te::se::RasterSymbolizer, te::se::LineSymbolizer, te::se::TextSymbolizer, and te::se::PointSymbolizer.
Referenced by te::se::ImageOutline::getSymbolizer(), te::qt::widgets::PointSymbolizerWidget::getSymbolizer(), te::qt::widgets::LineSymbolizerWidget::getSymbolizer(), te::qt::widgets::PolygonSymbolizerWidget::getSymbolizer(), te::qt::widgets::StyleControllerWidget::onAddSymbolizerClicked(), te::qt::widgets::StyleControllerWidget::onLibraryManagerClicked(), te::qt::widgets::ROIManagerWidget::onVectorLayerToolButtonClicked(), and te::qt::widgets::StyleExplorer::swapSymbolizers().
const te::xl::SimpleLink * te::se::Symbolizer::getBaseSymbolizer | ( | ) | const |
Definition at line 94 of file Symbolizer.cpp.
Referenced by te::se::serialize::WriteSymbolizerHelper().
const te::se::Description * te::se::Symbolizer::getDescription | ( | ) | const |
Definition at line 83 of file Symbolizer.cpp.
Referenced by te::se::serialize::WriteSymbolizerHelper().
const std::string & te::se::Symbolizer::getName | ( | ) | const |
Definition at line 72 of file Symbolizer.cpp.
Referenced by te::layout::LegendChildModel::drawLegend(), te::layout::LegendModel::drawStyleLegend(), and te::se::serialize::WriteSymbolizerHelper().
|
pure virtual |
It returns the symbolizer type.
Implemented in te::se::PolygonSymbolizer, te::se::RasterSymbolizer, te::se::LineSymbolizer, te::se::TextSymbolizer, and te::se::PointSymbolizer.
Referenced by te::qt::widgets::SymbologyPreview::build(), te::qt::widgets::StyleDockWidget::onSymbolizerSelected(), te::qt::widgets::ROIManagerWidget::onVectorLayerToolButtonClicked(), te::layout::LegendItem::paint(), and te::se::serialize::Symbolizer::write().
const te::common::BaseUnitOfMeasure * te::se::Symbolizer::getUom | ( | ) | const |
Definition at line 114 of file Symbolizer.cpp.
const std::string & te::se::Symbolizer::getVersion | ( | ) | const |
Definition at line 104 of file Symbolizer.cpp.
Referenced by te::se::serialize::WriteSymbolizerHelper().
void te::se::Symbolizer::setBaseSymbolizer | ( | te::xl::SimpleLink * | baseSymbolizer | ) |
Definition at line 88 of file Symbolizer.cpp.
void te::se::Symbolizer::setDescription | ( | Description * | d | ) |
Definition at line 77 of file Symbolizer.cpp.
Referenced by te::se::serialize::ReadSymbolizerHelper().
void te::se::Symbolizer::setName | ( | const std::string & | name | ) |
Definition at line 67 of file Symbolizer.cpp.
Referenced by te::se::serialize::ReadSymbolizerHelper().
void te::se::Symbolizer::setUom | ( | const te::common::BaseUnitOfMeasure * | uom | ) |
It sets the unit-of-measure.
All Symbolizers include an optional gml:uom-attribute as used by GML (this is set inside the abstract SymbolizerType and therefore inherited by all Symbolizers). This applies to all elements included inside a Symbolizer such as stroke-width, size, font-size, Gap, InitialGap, Displacement and PerpendicularOffset. If no uom is set inside of Symbolizer, all units are measured in pixel, the behaviour used by SLD 1.0.0. The following uom definitions are recommended to be used:
Definition at line 109 of file Symbolizer.cpp.
void te::se::Symbolizer::setVersion | ( | const std::string & | version | ) |
Definition at line 99 of file Symbolizer.cpp.
Referenced by te::se::serialize::ReadSymbolizerHelper().
|
private |
A BaseSymbolizer (an OnlineResource) defines the default properties of a Symbolizer to be those of an external Symbolizer, which will frequently be inside of an OGC Symbolizer repository. The Symbolizer properties given in-line override the base-Symbolizer properties. (Optional)
Definition at line 164 of file Symbolizer.h.
Referenced by Symbolizer().
|
private |
It gives the familiar short title for display lists and longer description for the symbolizer. (Optional)
Definition at line 163 of file Symbolizer.h.
Referenced by Symbolizer().
|
private |
It allows the symbolizer to be referenced externally, which is needed in some methods of SE usage. (Optional)
Definition at line 162 of file Symbolizer.h.
|
private |
Unit of measurement. If no uom is set inside of Symbolizer, all units are measured in pixel. (Mandatory)
Definition at line 166 of file Symbolizer.h.
|
private |
The version is an optional attribute on the FeatureType Style element that identifies the SE version number that the FeatureTypeStyle corresponds to. For now, the only allowed value is 1.1.0. (Mandatory)
Definition at line 165 of file Symbolizer.h.