TSLTrackAggregatorEchelon Class Reference
Inheritance diagram for TSLTrackAggregatorEchelon:

Detailed Description

A track aggregator which uses a hierarchy of tracks, typically mirroring their real-world relationships

To configure this aggregator the application must:

  • Create an instance of the aggregator
  • Create a hierarchy of TSLTracks and TSLTrackGroups as needed, ensuring that the hierarchyLevel of each track is set
  • Set the aggregator on any tracks which will be aggregated
  • Add rules to the aggregator to specify when/how aggregation should be performed


struct  AggregationRule

Public Member Functions

 TSLTrackAggregatorEchelon ()
 Constructor. More...
virtual ~TSLTrackAggregatorEchelon ()
 Destructor. More...
virtual TSLTrackAggregator::AggregatorType type () const
virtual TSLTrackBaseaggregateTrack (TSLTrackBase *track, const TSLRenderingInterface *renderingInterface)
uint32_t numRules () const
void addRule (const TSLTrackAggregatorEchelon::AggregationRule &rule)
void removeRule (uint32_t index)
TSLTrackAggregatorEchelon::AggregationRule queryRule (uint32_t index) const
TSLTrackAggregatorEchelon::AggregationRule operator[] (uint32_t index) const
- Public Member Functions inherited from TSLTrackAggregator
virtual void preProcess ()
virtual void postProcess ()
virtual uint32_t numAdditionalTracks () const
virtual TSLTrackBasegetAdditionalTrack (uint32_t index) const
virtual ~TSLTrackAggregator ()
 Destructor. More...

Additional Inherited Members

- Public Types inherited from TSLTrackAggregator
enum  AggregatorType { AggregatorCustom , AggregatorByEchelon , AggregatorByDensity }
 The types of aggregator provided by the MapLink API. More...
- Protected Member Functions inherited from TSLTrackAggregator
 TSLTrackAggregator ()

Constructor & Destructor Documentation

◆ TSLTrackAggregatorEchelon()

TSLTrackAggregatorEchelon::TSLTrackAggregatorEchelon ( )


◆ ~TSLTrackAggregatorEchelon()

virtual TSLTrackAggregatorEchelon::~TSLTrackAggregatorEchelon ( )


Member Function Documentation

◆ addRule()

void TSLTrackAggregatorEchelon::addRule ( const TSLTrackAggregatorEchelon::AggregationRule rule)

Add an aggregation rule

ruleThe rule to add

◆ aggregateTrack()

virtual TSLTrackBase * TSLTrackAggregatorEchelon::aggregateTrack ( TSLTrackBase track,
const TSLRenderingInterface renderingInterface 

This method will be called by the track manager to check whether a track is aggregated or not. The implementation of the aggregator performs its algorithm to determine this, and return the correct TSLTrackBase instance which should be rendered. If null is returned the provided track will not be rendered by the track manager

The algorithm will return null if no rules are set. The algorithm will return the input track if it has aggregation disabled. Otherwise the algorithm determines the rule that applies by checking the minimum resolution and zoom level. It then traverses up the track hierarchy tree to find the matching hierarchy level for the rule. The TrackGroup for that hierarchy level is returned.

The rendering interface is required to allow the aggregator access to draw-specific settings such as the extent of the drawing surface, or the zoom level of the display.

trackThe input track
renderingInterfaceThe current rendering interface
the TSLTrackBase instance to be rendered.

Implements TSLTrackAggregator.

◆ numRules()

uint32_t TSLTrackAggregatorEchelon::numRules ( ) const

Query the number of configured AggregationRules

The number of aggregation rules

◆ operator[]()

TSLTrackAggregatorEchelon::AggregationRule TSLTrackAggregatorEchelon::operator[] ( uint32_t  index) const

Array operator - Will query rules within the aggregator

See also

◆ queryRule()

TSLTrackAggregatorEchelon::AggregationRule TSLTrackAggregatorEchelon::queryRule ( uint32_t  index) const

Query an aggregation rule

indexThe index of the rule to query
The requested rule, or NULL on error

◆ removeRule()

void TSLTrackAggregatorEchelon::removeRule ( uint32_t  index)

Remove an aggregation rule

indexThe index of the rule to remove

◆ type()

virtual TSLTrackAggregator::AggregatorType TSLTrackAggregatorEchelon::type ( ) const

Query the type of the aggregator

The type of the aggregator

Implements TSLTrackAggregator.