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

Detailed Description

The base class for feature classification definitions.

For an existing feature definition, each TSLFeatureClassifier defines a level of classification based on the attributes of a feature instance. Additional features may be created by combining the original feature definition, the classifier definitions, and the attribute values present in any processed data.

Public Types

enum  ClassifierType { ClassifierTypeCategorised , ClassifierTypeGraduated , ClassifierTypeCustom }
 The type of a classification definition. More...
 

Public Member Functions

void destroy ()
 Delete this object.
 
TSLFeatureClassifier::ClassifierType type () const
 
virtual TSLFeatureClassifierclone () const =0
 
virtual bool getClassifiedFeatures (TSLFeature *rootFeature, unsigned int classificationLevel, bool caseSensitive) const =0
 
virtual bool classifyFeature (const TSLMUGeometry *geometry, TSLRenderingAttributes &renderingAttribs, TSLSimpleString &childFeatureName) const =0
 

Member Enumeration Documentation

◆ ClassifierType

The type of a classification definition.

Enumerator
ClassifierTypeCategorised 

A new child feature will be created for each unique attribute value. Equivalent to simple sub-classing in MapLink Studio.

ClassifierTypeGraduated 

Child features will be created based on the specified ranges and attribute values. Equivalent to Range Based sub-classing in MapLink Studio.

ClassifierTypeCustom 

Child features will be determined by application code.

Member Function Documentation

◆ classifyFeature()

virtual bool TSLFeatureClassifier::classifyFeature ( const TSLMUGeometry * geometry,
TSLRenderingAttributes & renderingAttribs,
TSLSimpleString & childFeatureName ) const
pure 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.

Implemented in TSLFeatureClassifierCategorised, TSLFeatureClassifierCustom, and TSLFeatureClassifierGraduated.

◆ clone()

virtual TSLFeatureClassifier * TSLFeatureClassifier::clone ( ) const
pure virtual

Clone this classification definition.

Returns
A clone of this object.

Implemented in TSLFeatureClassifierCategorised, TSLFeatureClassifierCustom, and TSLFeatureClassifierGraduated.

◆ destroy()

void TSLFeatureClassifier::destroy ( )

Delete this object.

◆ getClassifiedFeatures()

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

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

This method is called during a 'preprocess' phase in order to determine the pre-defined feature classes that may be returned by this classifier.

Where the contents are solely dependent upon attribute values of a geometry instance, then this method should return false. Where the contents are wholly or partially defined within the classifier itself, such as a rule-based classifier, then the method should add additional entries to the rootFeature and return true.

Parameters
rootFeatureThe top-level feature (TSLFeature) in the hierarchy the sub-classing should be applied to.
classificationLevelThe level of this classification, 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.

Implemented in TSLFeatureClassifierCategorised, TSLFeatureClassifierCustom, and TSLFeatureClassifierGraduated.

◆ type()

TSLFeatureClassifier::ClassifierType TSLFeatureClassifier::type ( ) const

Query the type of this classification definition.

Returns
The classification definition type as a TSLFeatureClassifier::ClassifierType enumeration value.