MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLFeatureClassifierCategorised Class Reference
Inheritance diagram for TSLFeatureClassifierCategorised:

Detailed Description

A simple classification definition.

This definition will result in a new child feature for each unique value of the specified attribute. Use of this definition will require data to be analysed in order to determine the possible values of an attribute.

See also
TSLAttributeValues

The new child features will be named according to the corresponding attribute values. For example:

  • Original feature name: 'roads'
  • Simple categorisation on attribute: 'type'
  • Resulting features:
    • 'roads.primary'
    • 'roads.secondary'
    • 'roads.tertiary'

This classification definition does not define rendering attributes for the new child features. Applications using this class will need to set appropriate rendering feature/rendering attribute definitions to the TSLFeatureList.

Public Member Functions

TSLFeatureClassifierCategorisedoperator= (const TSLFeatureClassifierCategorised &other)
 Assignment operator.
 
bool operator== (const TSLFeatureClassifierCategorised &other) const
 Equality operator.
 
const char * attributeName () const
 
void attributeName (const char *attribute)
 
virtual TSLFeatureClassifierclone () const
 
virtual bool getClassifiedFeatures (TSLFeature *rootFeature, unsigned int classificationLevel, bool caseSensitive) const
 
virtual bool classifyFeature (const TSLMUGeometry *geometry, TSLRenderingAttributes &renderingAttribs, TSLSimpleString &childFeatureName) const
 
- Public Member Functions inherited from TSLFeatureClassifier
void destroy ()
 Delete this object.
 
TSLFeatureClassifier::ClassifierType type () const
 

Static Public Member Functions

static TSLFeatureClassifierCategorisedcreate (const char *attribute=NULL)
 Constructor.
 

Additional Inherited Members

- Public Types inherited from TSLFeatureClassifier
enum  ClassifierType { ClassifierTypeCategorised , ClassifierTypeGraduated , ClassifierTypeCustom }
 The type of a classification definition. More...
 

Member Function Documentation

◆ attributeName() [1/2]

const char * TSLFeatureClassifierCategorised::attributeName ( ) const

Query the attribute name which this classification definition applies to.

Returns
The attribute name as a string.

◆ attributeName() [2/2]

void TSLFeatureClassifierCategorised::attributeName ( const char * attribute)

Set the attribute name which this classification definition applies to.

Parameters
attributeA string containing the attribute name.

◆ classifyFeature()

virtual bool TSLFeatureClassifierCategorised::classifyFeature ( const TSLMUGeometry * geometry,
TSLRenderingAttributes & renderingAttribs,
TSLSimpleString & childFeatureName ) const
virtual

Query the feature name for a given geometry

Parameters
geometryThe geometry to classify
renderingAttribsThe given TSLRenderingAttributes object will be set to the rendering attributes (if any) of the feature. Not all classifier definitions can specify rendering attributes.
childFeatureNameReturned name of the child feature for this geometry
Returns
'true' if childFeatureName was populated, false if the classification could not be determined.

Implements TSLFeatureClassifier.

◆ clone()

virtual TSLFeatureClassifier * TSLFeatureClassifierCategorised::clone ( ) const
virtual

Clone this sub-class definition.

Returns
A clone of this object.

Implements TSLFeatureClassifier.

◆ create()

static TSLFeatureClassifierCategorised * TSLFeatureClassifierCategorised::create ( const char * attribute = NULL)
static

Constructor.

◆ getClassifiedFeatures()

virtual bool TSLFeatureClassifierCategorised::getClassifiedFeatures ( TSLFeature * rootFeature,
unsigned int classificationLevel,
bool caseSensitive ) const
virtual

Process the classification definition and add child features to the hierarchy.

Returns false, since this classifier is fully dependent upon instance attribute values

Parameters
rootFeatureThe top-level feature (TSLFeature) in the hierarchy the sub-classing should be applied to.
classificationLevelThe level of this sub-class, starting at 0.
caseSensitiveWhether the identification of existing classifications should be case sensitive or not.
Returns
true if any new features were created, false otherwise.

Implements TSLFeatureClassifier.

◆ operator=()

TSLFeatureClassifierCategorised & TSLFeatureClassifierCategorised::operator= ( const TSLFeatureClassifierCategorised & other)

Assignment operator.

◆ operator==()

bool TSLFeatureClassifierCategorised::operator== ( const TSLFeatureClassifierCategorised & other) const

Equality operator.