Loading...
Searching...
No Matches
te::se::Rule Class Reference

A Rule is used to attach property/scale conditions to and group the individual symbols used for rendering. More...

#include <Rule.h>

Inheritance diagram for te::se::Rule:

Public Member Functions

Initializer Methods

Methods related to instantiation and destruction.

 Rule ()
 It initializes a new Rule. More...
 
 ~Rule ()
 Destructor. More...
 

Accessor methods

Methods used to get or set properties.

std::string * m_name
 It allows the rule to be referenced externally, which is needed in some methods of SE usage. (Optional) More...
 
Descriptionm_description
 It gives the familiar short title for display lists and longer description for the rule. (Optional) More...
 
Graphicm_legendGraphic
 It allows an optional explicit Graphic Symbolizer to be displayed in a legend for this rule. (Optional) More...
 
te::fe::Filterm_filter
 It allows the selection of features in rules to be controlled by attribute conditions. (Optional) More...
 
bool m_elseFilter
 It allows rules to be specified that are activated for features that are not selected by any other rule in a feature-type style. Default: false. If true, this is a Else filter rule. (Optional) More...
 
double m_minScaleDenominator
 It defines the range of map-rendering scales for which the rule should be applied. Default: 0.0. (Optional) More...
 
double m_maxScaleDenominator
 It defines the range of map-rendering scales for which the rule should be applied. Default: TE_DOUBLE_INFINITY. (Optional) More...
 
std::vector< Symbolizer * > m_symbolizers
 A Symbolizer describes how a feature/coverage is to appear on a map. (Mandatory) More...
 
void setName (std::string *name)
 
const std::string * getName () const
 
void setDescription (Description *d)
 
const DescriptiongetDescription () const
 
void setLegendGraphic (Graphic *legendGraphic)
 
const GraphicgetLegendGraphic () const
 
void removeLegendGraphic ()
 
void setFilter (te::fe::Filter *f)
 
const te::fe::FiltergetFilter () const
 
void enableElseFilter ()
 
void disableElseFilter ()
 
bool hasElseFilter () const
 
void setMinScaleDenominator (const double &minScaleDenominator)
 
const double & getMinScaleDenominator () const
 
void setMaxScaleDenominator (const double &maxScaleDenominator)
 
const double & getMaxScaleDenominator () const
 
void push_back (Symbolizer *s)
 
void setSymbolizer (std::size_t i, Symbolizer *s)
 
void setSymbolizers (const std::vector< Symbolizer * > &symbs)
 
const std::vector< Symbolizer * > & getSymbolizers () const
 
const SymbolizergetSymbolizer (std::size_t i) const
 
void removeSymbolizer (std::size_t i)
 
void clearSymbolizers ()
 
Ruleclone () const
 It creates a new copy of this object. More...
 

Detailed Description

A Rule is used to attach property/scale conditions to and group the individual symbols used for rendering.

Rules are used to group rendering instructions by feature-property conditions and map scales. Rule definitions are placed immediately inside of featuretype- or coverage-style definitions. If a rule has no Filter element, the interpretation is that the rule condition is always true, i.e., all features are accepted and styled by the rule. The ElseFilter has a more complicated interpretation than the Filter element, and is interpreted as follows. The nominal scale of the map to be portrayed is computed (as described in the previous subclause) and all rules for scale ranges that do not include the computed nominal scale are discarded from further processing. Then, the specific condition for the ElseFilter is computed by "or-ing" together all of the other filter conditions and take the global "not" of that condition.

See also
FeatureTypeStyle, CoverageStyle, Description, Graphic, Symbolizer, te::fe::Filter

Definition at line 76 of file Rule.h.

Constructor & Destructor Documentation

◆ Rule()

te::se::Rule::Rule ( )

It initializes a new Rule.

◆ ~Rule()

te::se::Rule::~Rule ( )

Destructor.

Member Function Documentation

◆ clearSymbolizers()

void te::se::Rule::clearSymbolizers ( )

◆ clone()

Rule * te::se::Rule::clone ( ) const

It creates a new copy of this object.

◆ disableElseFilter()

void te::se::Rule::disableElseFilter ( )

◆ enableElseFilter()

void te::se::Rule::enableElseFilter ( )
Note
The filter must be NULL in order to call this method.

◆ getDescription()

const Description * te::se::Rule::getDescription ( ) const

◆ getFilter()

const te::fe::Filter * te::se::Rule::getFilter ( ) const

◆ getLegendGraphic()

const Graphic * te::se::Rule::getLegendGraphic ( ) const

◆ getMaxScaleDenominator()

const double & te::se::Rule::getMaxScaleDenominator ( ) const

◆ getMinScaleDenominator()

const double & te::se::Rule::getMinScaleDenominator ( ) const

◆ getName()

const std::string * te::se::Rule::getName ( ) const

◆ getSymbolizer()

const Symbolizer * te::se::Rule::getSymbolizer ( std::size_t  i) const

◆ getSymbolizers()

const std::vector< Symbolizer * > & te::se::Rule::getSymbolizers ( ) const

◆ hasElseFilter()

bool te::se::Rule::hasElseFilter ( ) const

◆ push_back()

void te::se::Rule::push_back ( Symbolizer s)

◆ removeLegendGraphic()

void te::se::Rule::removeLegendGraphic ( )

◆ removeSymbolizer()

void te::se::Rule::removeSymbolizer ( std::size_t  i)

◆ setDescription()

void te::se::Rule::setDescription ( Description d)

◆ setFilter()

void te::se::Rule::setFilter ( te::fe::Filter f)
Note
The ElseFilter must be false in order to set a filter.

Referenced by te::map::GroupingByEqualSteps(), te::map::GroupingByQuantil(), and te::map::GroupingByStdDeviation().

◆ setLegendGraphic()

void te::se::Rule::setLegendGraphic ( Graphic legendGraphic)

◆ setMaxScaleDenominator()

void te::se::Rule::setMaxScaleDenominator ( const double &  maxScaleDenominator)

◆ setMinScaleDenominator()

void te::se::Rule::setMinScaleDenominator ( const double &  minScaleDenominator)

◆ setName()

void te::se::Rule::setName ( std::string *  name)

◆ setSymbolizer()

void te::se::Rule::setSymbolizer ( std::size_t  i,
Symbolizer s 
)

◆ setSymbolizers()

void te::se::Rule::setSymbolizers ( const std::vector< Symbolizer * > &  symbs)

Member Data Documentation

◆ m_description

Description* te::se::Rule::m_description
private

It gives the familiar short title for display lists and longer description for the rule. (Optional)

Definition at line 162 of file Rule.h.

◆ m_elseFilter

bool te::se::Rule::m_elseFilter
private

It allows rules to be specified that are activated for features that are not selected by any other rule in a feature-type style. Default: false. If true, this is a Else filter rule. (Optional)

Definition at line 165 of file Rule.h.

◆ m_filter

te::fe::Filter* te::se::Rule::m_filter
private

It allows the selection of features in rules to be controlled by attribute conditions. (Optional)

Definition at line 164 of file Rule.h.

◆ m_legendGraphic

Graphic* te::se::Rule::m_legendGraphic
private

It allows an optional explicit Graphic Symbolizer to be displayed in a legend for this rule. (Optional)

Definition at line 163 of file Rule.h.

◆ m_maxScaleDenominator

double te::se::Rule::m_maxScaleDenominator
private

It defines the range of map-rendering scales for which the rule should be applied. Default: TE_DOUBLE_INFINITY. (Optional)

Definition at line 167 of file Rule.h.

◆ m_minScaleDenominator

double te::se::Rule::m_minScaleDenominator
private

It defines the range of map-rendering scales for which the rule should be applied. Default: 0.0. (Optional)

Definition at line 166 of file Rule.h.

◆ m_name

std::string* te::se::Rule::m_name
private

It allows the rule to be referenced externally, which is needed in some methods of SE usage. (Optional)

Definition at line 161 of file Rule.h.

◆ m_symbolizers

std::vector<Symbolizer*> te::se::Rule::m_symbolizers
private

A Symbolizer describes how a feature/coverage is to appear on a map. (Mandatory)

Definition at line 168 of file Rule.h.


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