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

Public Member Functions

virtual TSLFeatureClassifierclone () const
 
TSLFeatureClassifierGraduatedoperator= (const TSLFeatureClassifierGraduated &other)
 
const char * attributeName () const
 
void attributeName (const char *attribute)
 
unsigned int numOperations () const
 
void addOperation (const TSLAttributeValueOperation &operation)
 
const TSLAttributeValueOperationqueryOperation (unsigned int index) const
 
const TSLAttributeValueOperationoperator[] (unsigned int index) const
 
bool removeOperation (unsigned int index)
 
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 TSLFeatureClassifierGraduatedcreate (const char *attributeName=NULL)
 

Additional Inherited Members

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

Member Function Documentation

◆ addOperation()

void TSLFeatureClassifierGraduated::addOperation ( const TSLAttributeValueOperation & operation)

Add a classification operation.

Parameters
operationThe operation to add.

◆ attributeName() [1/2]

const char * TSLFeatureClassifierGraduated::attributeName ( ) const

Query the attribute name which this classification definition applies to.

Returns
The attribute name as a string.

◆ attributeName() [2/2]

void TSLFeatureClassifierGraduated::attributeName ( const char * attribute)

Set the attribute name which this classification definition applies to.

Parameters
attributeA string containing the attribute name.

◆ classifyFeature()

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

Query the feature name for a given geometry

The value of the target attribute will be compared against each of the TSLAttributeValueOperations until a match is found. If no match is found this method will return null. If required, the operations should be setup such that the last operation acts as an else clause.

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 * TSLFeatureClassifierGraduated::clone ( ) const
virtual

Clone this classification definition.

Returns
A clone of this object.

Implements TSLFeatureClassifier.

◆ create()

static TSLFeatureClassifierGraduated * TSLFeatureClassifierGraduated::create ( const char * attributeName = NULL)
static

Constructor

Parameters
attributeNamethe attribute to use when classifying.
Returns
A new instance of this object

◆ getClassifiedFeatures()

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

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

A child feature will be created for each TSLAttributeValueOperation within this definition if required. If the feature already exists it will not be modified. Any existing rendering attributes will be unaffected.

Child features will be added to below the root feature. The classificationLevel parameter determines how far down the feature hierarchy to traverse before performing the classification. If multiple classification definitions are defined for a feature they should be applied in order, with classificationLevel counting from 0...n.

If multiple operations would create the same feature the first operation in the list will take priority.

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.

◆ numOperations()

unsigned int TSLFeatureClassifierGraduated::numOperations ( ) const

Query the number of classification operations.

Returns
The number of classification operations in this definition.

◆ operator=()

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

Assignment operator.

Parameters
otherthe feature classifier to assign from.
Returns
reference to this feature.

◆ operator[]()

const TSLAttributeValueOperation * TSLFeatureClassifierGraduated::operator[] ( unsigned int index) const

Array operator.

See also
queryOperation

◆ queryOperation()

const TSLAttributeValueOperation * TSLFeatureClassifierGraduated::queryOperation ( unsigned int index) const

Query a classification operation.

Parameters
indexThe index of the operation to query.
Returns
The requested operation, or null on error.

◆ removeOperation()

bool TSLFeatureClassifierGraduated::removeOperation ( unsigned int index)

Remove a classification operation.

Parameters
indexThe index of the operation to remove.
Returns
true if the operation was removed, false otherwise.