![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Public Member Functions | |
virtual TSLFeatureClassifier * | clone () const |
TSLFeatureClassifierGraduated & | operator= (const TSLFeatureClassifierGraduated &other) |
const char * | attributeName () const |
void | attributeName (const char *attribute) |
unsigned int | numOperations () const |
void | addOperation (const TSLAttributeValueOperation &operation) |
const TSLAttributeValueOperation * | queryOperation (unsigned int index) const |
const TSLAttributeValueOperation * | operator[] (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 |
![]() | |
void | destroy () |
Delete this object. | |
TSLFeatureClassifier::ClassifierType | type () const |
Static Public Member Functions | |
static TSLFeatureClassifierGraduated * | create (const char *attributeName=NULL) |
Additional Inherited Members | |
![]() | |
enum | ClassifierType { ClassifierTypeCategorised , ClassifierTypeGraduated , ClassifierTypeCustom } |
The type of a classification definition. More... | |
void TSLFeatureClassifierGraduated::addOperation | ( | const TSLAttributeValueOperation & | operation | ) |
Add a classification operation.
operation | The operation to add. |
const char * TSLFeatureClassifierGraduated::attributeName | ( | ) | const |
Query the attribute name which this classification definition applies to.
void TSLFeatureClassifierGraduated::attributeName | ( | const char * | attribute | ) |
Set the attribute name which this classification definition applies to.
attribute | A string containing the attribute name. |
|
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.
geometry | The geometry to classify |
renderingAttribs | The given TSLRenderingAttributes object will be set to the rendering attributes (if any) of the feature. Not all classifier definitions can specify rendering attributes. |
childFeatureName | Returned name of the child feature for this geometry |
Implements TSLFeatureClassifier.
|
virtual |
Clone this classification definition.
Implements TSLFeatureClassifier.
|
static |
Constructor
attributeName | the attribute to use when classifying. |
|
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.
rootFeature | The top-level feature (TSLFeature) in the hierarchy the sub-classing should be applied to. |
classificationLevel | The level of this sub-class, starting at 0. |
caseSensitive | Whether the identification of existing classifications should be case sensitive or not. |
true
if any new features were created, false
otherwise. Implements TSLFeatureClassifier.
unsigned int TSLFeatureClassifierGraduated::numOperations | ( | ) | const |
Query the number of classification operations.
TSLFeatureClassifierGraduated & TSLFeatureClassifierGraduated::operator= | ( | const TSLFeatureClassifierGraduated & | other | ) |
Assignment operator.
other | the feature classifier to assign from. |
const TSLAttributeValueOperation * TSLFeatureClassifierGraduated::operator[] | ( | unsigned int | index | ) | const |
Array operator.
const TSLAttributeValueOperation * TSLFeatureClassifierGraduated::queryOperation | ( | unsigned int | index | ) | const |
Query a classification operation.
index | The index of the operation to query. |
bool TSLFeatureClassifierGraduated::removeOperation | ( | unsigned int | index | ) |
Remove a classification operation.
index | The index of the operation to remove. |
true
if the operation was removed, false
otherwise.