te::se::PolygonSymbolizer Class Referenceabstract

A PolygonSymbolizer is used to draw a polygon (or other area-type geometries), including filling its interior and stroking its border (outline). More...

#include <PolygonSymbolizer.h>

Inheritance diagram for te::se::PolygonSymbolizer:
te::se::Symbolizer te::common::BaseVisitable< Visitor >

Public Types

typedef void ReturnType
 
typedef Visitor VisitorType
 

Public Member Functions

virtual ReturnType accept (VisitorType &guest) const=0
 It call the visit method from the guest object. More...
 
Symbolizerclone () const
 It creates a new copy of this object. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 PolygonSymbolizer ()
 It initializes a new PolygonSymbolizer. More...
 
 PolygonSymbolizer (const PolygonSymbolizer &rhs)
 Copy constructor. More...
 
 ~PolygonSymbolizer ()
 Destructor. More...
 
Accessor methods

Methods used to get or set properties.

void setGeometry (te::fe::PropertyName *geometry)
 The Geometry element of a PolygonSymbolizer defines the linear geometry to be used for styling. The Geometry element is optional and if it is absent then the all geometry properties of the feature type that is used in the containing FeatureType are used. Most frequently, though, feature types will have only a single geometry property. See OGC te::fe::PropertyName class for more information on attribute names. If a polygon has "holes", then they are not filled, but the borders around the holes are stroked in the usual way. "Islands" within holes are filled and stroked, and so on. If a point geometry is referenced instead of a polygon, then a small, square, ortho-normal polygon should be constructed for rendering. If a line is referenced, then the line (string) is closed for filling (only) by connecting its end point to its start point, any line crossings are corrected in some way, and only the original line is stroked. If a raster geometry is used, then the raster-coverage area is used as the polygon. A missing Geometry element selects the "default" geometry for a feature type. More...
 
const te::fe::PropertyNamegetGeometry () const
 
void setFill (Fill *f)
 A Fill specifies the pattern for filling an area geometry. More...
 
const FillgetFill () const
 Gets the Fill associates with the PolygonSymbolizer. More...
 
void setStroke (Stroke *stroke)
 A Stroke specifies the appearance of a linear geometry. More...
 
const StrokegetStroke () const
 Gets the Stroke associates with the PolygonSymbolizer. More...
 
void setDisplacement (Displacement *d)
 The Displacement gives the X and Y displacements from the original geometry. More...
 
const DisplacementgetDisplacement () const
 
void setPerpendicularOffset (ParameterValue *perpendicularOffset)
 PerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry. More...
 
const ParameterValuegetPerpendicularOffset () const
 
const std::string & getType () const
 It returns the symbolizer type. 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 DescriptiongetDescription () const
 
void setBaseSymbolizer (te::xl::SimpleLink *baseSymbolizer)
 
const te::xl::SimpleLinkgetBaseSymbolizer () 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
 

Private Attributes

Displacementm_displacement
 The Displacement gives the X and Y displacements from the original geometry. (Optional) More...
 
Fillm_fill
 Specifies how the area of the geometry will be filled. (Optional) More...
 
te::fe::PropertyNamem_geometry
 A Geometry gives reference to a (the) geometry property of a feature to be used for rendering. (Optional) More...
 
ParameterValuem_perpendicularOffset
 A "PerpendicularOffset" gives the perpendicular distance away from a line to draw a label. (Optional) More...
 
Strokem_stroke
 A "Stroke" specifies the appearance of a linear geometry. (Optional) More...
 

Static Private Attributes

static const std::string sm_type
 A static data member used in the implementation of getType method. More...
 

Detailed Description

A PolygonSymbolizer is used to draw a polygon (or other area-type geometries), including filling its interior and stroking its border (outline).

The Fill and Stroke elements are contained in the PolygonSymbolizer in the conceptual order that they are used and plotted using the "painters model", where the Fill will be rendered first, and then the Stroke will be rendered on top of the fill. A missing Stroke element means that the geometry will not be stroked.

See also
Symbolizer, Fill, Stroke, te::fe::PropertyName, Displacement, ParameterValue, ImageOutline

Definition at line 60 of file PolygonSymbolizer.h.

Member Typedef Documentation

◆ ReturnType

typedef void te::common::BaseVisitable< Visitor , void >::ReturnType
inherited

Definition at line 58 of file BaseVisitable.h.

◆ VisitorType

typedef Visitor te::common::BaseVisitable< Visitor , void >::VisitorType
inherited

Definition at line 57 of file BaseVisitable.h.

Constructor & Destructor Documentation

◆ PolygonSymbolizer() [1/2]

te::se::PolygonSymbolizer::PolygonSymbolizer ( )

It initializes a new PolygonSymbolizer.

◆ PolygonSymbolizer() [2/2]

te::se::PolygonSymbolizer::PolygonSymbolizer ( const PolygonSymbolizer rhs)

Copy constructor.

Parameters
rhsThe other polygon symbolizer.

◆ ~PolygonSymbolizer()

te::se::PolygonSymbolizer::~PolygonSymbolizer ( )

Destructor.

Member Function Documentation

◆ accept()

virtual ReturnType te::common::BaseVisitable< Visitor , void >::accept ( VisitorType guest) const
pure virtualinherited

It call the visit method from the guest object.

Parameters
guestThe guest or visitor.
Returns
Any valid value define by the template type R.

◆ clone()

Symbolizer* te::se::PolygonSymbolizer::clone ( ) const
virtual

It creates a new copy of this object.

Implements te::se::Symbolizer.

◆ getBaseSymbolizer()

const te::xl::SimpleLink* te::se::Symbolizer::getBaseSymbolizer ( ) const
inherited

◆ getDescription()

const Description* te::se::Symbolizer::getDescription ( ) const
inherited

◆ getDisplacement()

const Displacement* te::se::PolygonSymbolizer::getDisplacement ( ) const

◆ getFill()

const Fill* te::se::PolygonSymbolizer::getFill ( ) const

Gets the Fill associates with the PolygonSymbolizer.

Returns
The Fill element.

◆ getGeometry()

const te::fe::PropertyName* te::se::PolygonSymbolizer::getGeometry ( ) const

◆ getName()

const std::string& te::se::Symbolizer::getName ( ) const
inherited

◆ getPerpendicularOffset()

const ParameterValue* te::se::PolygonSymbolizer::getPerpendicularOffset ( ) const

◆ getStroke()

const Stroke* te::se::PolygonSymbolizer::getStroke ( ) const

Gets the Stroke associates with the PolygonSymbolizer.

Returns
The Stroke element.

◆ getType()

const std::string& te::se::PolygonSymbolizer::getType ( ) const
virtual

It returns the symbolizer type.

Returns
The symbolizer type.

Implements te::se::Symbolizer.

◆ getUom()

const te::common::BaseUnitOfMeasure* te::se::Symbolizer::getUom ( ) const
inherited

◆ getVersion()

const std::string& te::se::Symbolizer::getVersion ( ) const
inherited

◆ setBaseSymbolizer()

void te::se::Symbolizer::setBaseSymbolizer ( te::xl::SimpleLink baseSymbolizer)
inherited

◆ setDescription()

void te::se::Symbolizer::setDescription ( Description d)
inherited

◆ setDisplacement()

void te::se::PolygonSymbolizer::setDisplacement ( Displacement d)

The Displacement gives the X and Y displacements from the original geometry.

This element may be used to avoid over-plotting of multiple PolygonSymbolizers for one geometry or supplying "shadows" of polygon gemeotries. The displacements are in units of pixels above and to the right of the point. The default displacement is X = 0, Y = 0.

Parameters
d

◆ setFill()

void te::se::PolygonSymbolizer::setFill ( Fill f)

A Fill specifies the pattern for filling an area geometry.

The allowed SvgParameters are: "fill" (color) and "fill-opacity".

◆ setGeometry()

void te::se::PolygonSymbolizer::setGeometry ( te::fe::PropertyName geometry)

The Geometry element of a PolygonSymbolizer defines the linear geometry to be used for styling. The Geometry element is optional and if it is absent then the all geometry properties of the feature type that is used in the containing FeatureType are used. Most frequently, though, feature types will have only a single geometry property. See OGC te::fe::PropertyName class for more information on attribute names. If a polygon has "holes", then they are not filled, but the borders around the holes are stroked in the usual way. "Islands" within holes are filled and stroked, and so on. If a point geometry is referenced instead of a polygon, then a small, square, ortho-normal polygon should be constructed for rendering. If a line is referenced, then the line (string) is closed for filling (only) by connecting its end point to its start point, any line crossings are corrected in some way, and only the original line is stroked. If a raster geometry is used, then the raster-coverage area is used as the polygon. A missing Geometry element selects the "default" geometry for a feature type.

Note
Geometry types other than inherently linear types can also be used. If a point geometry is used, it should be interpreted as a line of "epsilon" (arbitrarily small) length with a horizontal orientation centered on the point, and should be rendered with two end caps. If a polygon is used (or other "area" type), then its closed outline is used as the line string (with no end caps). If a raster geometry is used, its coverage-area outline is used for the line, rendered with no end caps.

◆ setName()

void te::se::Symbolizer::setName ( const std::string &  name)
inherited

◆ setPerpendicularOffset()

void te::se::PolygonSymbolizer::setPerpendicularOffset ( ParameterValue perpendicularOffset)

PerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry.

The distance is in uoms and is positive to the outside of the polygon. Negative numbers mean drawing the polygon smaller. The default offset is 0.

◆ setStroke()

void te::se::PolygonSymbolizer::setStroke ( Stroke stroke)

A Stroke specifies the appearance of a linear geometry.

A missing Stroke element means that the geometry will not be stroked.

◆ setUom()

void te::se::Symbolizer::setUom ( const te::common::BaseUnitOfMeasure *  uom)
inherited

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:

◆ setVersion()

void te::se::Symbolizer::setVersion ( const std::string &  version)
inherited

Member Data Documentation

◆ m_displacement

Displacement* te::se::PolygonSymbolizer::m_displacement
private

The Displacement gives the X and Y displacements from the original geometry. (Optional)

Definition at line 191 of file PolygonSymbolizer.h.

◆ m_fill

Fill* te::se::PolygonSymbolizer::m_fill
private

Specifies how the area of the geometry will be filled. (Optional)

Definition at line 189 of file PolygonSymbolizer.h.

◆ m_geometry

te::fe::PropertyName* te::se::PolygonSymbolizer::m_geometry
private

A Geometry gives reference to a (the) geometry property of a feature to be used for rendering. (Optional)

Definition at line 188 of file PolygonSymbolizer.h.

◆ m_perpendicularOffset

ParameterValue* te::se::PolygonSymbolizer::m_perpendicularOffset
private

A "PerpendicularOffset" gives the perpendicular distance away from a line to draw a label. (Optional)

Definition at line 192 of file PolygonSymbolizer.h.

◆ m_stroke

Stroke* te::se::PolygonSymbolizer::m_stroke
private

A "Stroke" specifies the appearance of a linear geometry. (Optional)

Definition at line 190 of file PolygonSymbolizer.h.

◆ sm_type

const std::string te::se::PolygonSymbolizer::sm_type
staticprivate

A static data member used in the implementation of getType method.

Definition at line 194 of file PolygonSymbolizer.h.


The documentation for this class was generated from the following file: