A Rule is used to attach property/scale conditions to and group the individual symbols used for rendering. More...
#include <Rule.h>
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... | |
Description * | m_description |
It gives the familiar short title for display lists and longer description for the rule. (Optional) More... | |
Graphic * | m_legendGraphic |
It allows an optional explicit Graphic Symbolizer to be displayed in a legend for this rule. (Optional) More... | |
te::fe::Filter * | m_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 Description * | getDescription () const |
void | setLegendGraphic (Graphic *legendGraphic) |
const Graphic * | getLegendGraphic () const |
void | removeLegendGraphic () |
void | setFilter (te::fe::Filter *f) |
const te::fe::Filter * | getFilter () 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 Symbolizer * | getSymbolizer (std::size_t i) const |
void | removeSymbolizer (std::size_t i) |
void | clearSymbolizers () |
Rule * | clone () const |
It creates a new copy of this object. More... | |
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.
te::se::Rule::Rule | ( | ) |
It initializes a new Rule.
te::se::Rule::~Rule | ( | ) |
Destructor.
void te::se::Rule::clearSymbolizers | ( | ) |
Rule * te::se::Rule::clone | ( | ) | const |
It creates a new copy of this object.
void te::se::Rule::disableElseFilter | ( | ) |
void te::se::Rule::enableElseFilter | ( | ) |
const Description * te::se::Rule::getDescription | ( | ) | const |
const te::fe::Filter * te::se::Rule::getFilter | ( | ) | const |
const Graphic * te::se::Rule::getLegendGraphic | ( | ) | const |
const double & te::se::Rule::getMaxScaleDenominator | ( | ) | const |
const double & te::se::Rule::getMinScaleDenominator | ( | ) | const |
const std::string * te::se::Rule::getName | ( | ) | const |
const Symbolizer * te::se::Rule::getSymbolizer | ( | std::size_t | i | ) | const |
const std::vector< Symbolizer * > & te::se::Rule::getSymbolizers | ( | ) | const |
bool te::se::Rule::hasElseFilter | ( | ) | const |
void te::se::Rule::push_back | ( | Symbolizer * | s | ) |
void te::se::Rule::removeLegendGraphic | ( | ) |
void te::se::Rule::removeSymbolizer | ( | std::size_t | i | ) |
void te::se::Rule::setDescription | ( | Description * | d | ) |
void te::se::Rule::setFilter | ( | te::fe::Filter * | f | ) |
Referenced by te::map::GroupingByEqualSteps(), te::map::GroupingByQuantil(), and te::map::GroupingByStdDeviation().
void te::se::Rule::setLegendGraphic | ( | Graphic * | legendGraphic | ) |
void te::se::Rule::setMaxScaleDenominator | ( | const double & | maxScaleDenominator | ) |
void te::se::Rule::setMinScaleDenominator | ( | const double & | minScaleDenominator | ) |
void te::se::Rule::setName | ( | std::string * | name | ) |
Referenced by te::map::GroupingByEqualSteps(), te::map::GroupingByQuantil(), and te::map::GroupingByStdDeviation().
void te::se::Rule::setSymbolizer | ( | std::size_t | i, |
Symbolizer * | s | ||
) |
void te::se::Rule::setSymbolizers | ( | const std::vector< Symbolizer * > & | symbs | ) |
|
private |
|
private |
|
private |
|
private |
It allows an optional explicit Graphic Symbolizer to be displayed in a legend for this rule. (Optional)
|
private |
|
private |
|
private |
|
private |
A Symbolizer describes how a feature/coverage is to appear on a map. (Mandatory)