te::se::Categorize Class Referenceabstract

The transformation of continuous values to distinct values (Categorize function). More...

#include <Categorize.h>

Inheritance diagram for te::se::Categorize:
te::se::Function te::fe::Expression te::common::BaseVisitable< Visitor >

Public Types

typedef void ReturnType
 
enum  ThresholdsBelongToType { NONE, SUCCEEDING, PRECEDING }
 It controls the interval order. More...
 
typedef Visitor VisitorType
 

Public Member Functions

virtual ReturnType accept (VisitorType &guest) const =0
 It call the visit method from the guest object. More...
 
void addThreshold (ParameterValue *v)
 
void addValue (ParameterValue *v)
 
const std::string & getFallbackValue () const
 
ParameterValuegetLookupValue () const
 
const std::vector< ParameterValue * > & getThresholds () const
 
const ThresholdsBelongToTypegetThresholdsBelongTo () const
 
const std::vector< ParameterValue * > & getThresholdValues () const
 
ParameterValuegetValue () const
 
void setFallbackValue (const std::string &v)
 
void setLookupValue (ParameterValue *v)
 
void setThresholdsBelongTo (ThresholdsBelongToType t)
 
void setValue (ParameterValue *v)
 
Initializer Methods

Methods related to instantiation and destruction.

 Categorize ()
 It initializes a new Categorize. More...
 
 Categorize (const Categorize &rhs)
 Copy constructor. More...
 
 ~Categorize ()
 Destructor. More...
 
virtual Categorizeclone () const
 It returns a clone of this object. More...
 

Protected Attributes

std::string m_fallbackValue
 The value of the fallbackValue attribute is used as a default value, if the SE implementation does not support the function. If the implementation supports the function, then the result value is determined by executing the function. (Mandatory) More...
 

Private Attributes

ParameterValuem_lookupValue
 Mandatory. More...
 
ThresholdsBelongToType m_threshholdsBelongTo
 (Optional) More...
 
std::vector< ParameterValue * > m_thresholds
 A vector of threshold. (Optional) More...
 
std::vector< ParameterValue * > m_thresholdValues
 A vector of threshold values. (Optional) More...
 
ParameterValuem_value
 Mandatory. More...
 

Detailed Description

The transformation of continuous values to distinct values (Categorize function).

The Symbology encoding specification defines three pre-defined functions for transforming raw data:

  • Categorization: The transformation of continuous values to distinct values. This is for example needed to generate choropleth maps from continuous attributes. Another example would be the stepwise selection of different text heights or line widths in dependence from such an attribute;
  • Interpolation: Transformation of continuous values by a function defined on a number of nodes. This is used to adjust the value distribution of an attribute to the desired distribution of a continuous symbolization control variable (like size, width, color, etc);
  • Recoding: Transformation of discrete values to any other values. This is needed when integers have to be translated into text or, reversely, text contents into other texts or numeric values or colors.


The Thresholds have to be specified in ascending order and (like the LookupValue) have to be of a uniform and orderable type. The value of the function is determined by looking up into which interval between two thresholds the LookupValue falls. The first interval ranges from -Infinity to the first given threshold and the last one accordingly from the last threshold to +Infinity. In case the Categorize (or Interpolate) function is used inside a RasterSymbolizer as a ColorMap, the LookupValue is set to the fixed value "Rasterdata". The Values can be of any type, dependent on which symbolization context the function is employed. Color values (like #00ffff) or numeric values are typical. Whether the Threshold values themselves belong to the preceding or the succeeding interval can be controlled by the attribute thresholdsBelongTo= with the possible values "preceding" and "succeeding" the latter being the default.

See also
Function, ParameterValue

Definition at line 90 of file Categorize.h.

Member Typedef Documentation

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

Definition at line 58 of file BaseVisitable.h.

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

Definition at line 57 of file BaseVisitable.h.

Member Enumeration Documentation

It controls the interval order.

Enumerator
NONE 
SUCCEEDING 
PRECEDING 

Definition at line 99 of file Categorize.h.

Constructor & Destructor Documentation

te::se::Categorize::Categorize ( )

It initializes a new Categorize.

te::se::Categorize::Categorize ( const Categorize rhs)

Copy constructor.

Parameters
rhsThe other Categorize.
te::se::Categorize::~Categorize ( )

Destructor.

Member Function Documentation

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.
void te::se::Categorize::addThreshold ( ParameterValue v)
void te::se::Categorize::addValue ( ParameterValue v)
virtual Categorize* te::se::Categorize::clone ( ) const
virtual

It returns a clone of this object.

Returns
A clone of this object.

Implements te::fe::Expression.

const std::string& te::se::Function::getFallbackValue ( ) const
inherited
ParameterValue* te::se::Categorize::getLookupValue ( ) const
inline

Definition at line 135 of file Categorize.h.

const std::vector<ParameterValue*>& te::se::Categorize::getThresholds ( ) const
const ThresholdsBelongToType& te::se::Categorize::getThresholdsBelongTo ( ) const
inline

Definition at line 147 of file Categorize.h.

const std::vector<ParameterValue*>& te::se::Categorize::getThresholdValues ( ) const
ParameterValue* te::se::Categorize::getValue ( ) const
inline

Definition at line 139 of file Categorize.h.

void te::se::Function::setFallbackValue ( const std::string &  v)
inherited
void te::se::Categorize::setLookupValue ( ParameterValue v)
void te::se::Categorize::setThresholdsBelongTo ( ThresholdsBelongToType  t)
void te::se::Categorize::setValue ( ParameterValue v)

Member Data Documentation

std::string te::se::Function::m_fallbackValue
protectedinherited

The value of the fallbackValue attribute is used as a default value, if the SE implementation does not support the function. If the implementation supports the function, then the result value is determined by executing the function. (Mandatory)

Definition at line 88 of file Function.h.

ParameterValue* te::se::Categorize::m_lookupValue
private

Mandatory.

Definition at line 155 of file Categorize.h.

ThresholdsBelongToType te::se::Categorize::m_threshholdsBelongTo
private

(Optional)

Definition at line 159 of file Categorize.h.

std::vector<ParameterValue*> te::se::Categorize::m_thresholds
private

A vector of threshold. (Optional)

Definition at line 157 of file Categorize.h.

std::vector<ParameterValue*> te::se::Categorize::m_thresholdValues
private

A vector of threshold values. (Optional)

Definition at line 158 of file Categorize.h.

ParameterValue* te::se::Categorize::m_value
private

Mandatory.

Definition at line 156 of file Categorize.h.


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