![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
A track aggregator which dynamically aggregates co-located tracks of the same type within a gridded layout
This aggregator uses a dynamic configuration based on track attributes and a grid layout.
To configure this aggregator the application must:
Classes | |
struct | AggregationRule |
struct | ZoomLevel |
Public Member Functions | |
TSLTrackAggregatorDensity (const char *attribName) | |
virtual | ~TSLTrackAggregatorDensity () |
Destructor. | |
void | attributeName (const char *attribName) |
const char * | attributeName () const |
uint32_t | numZoomLevels () const |
ZoomLevel * | addZoomLevel (double triggerLevel, uint32_t gridX, uint32_t gridY) |
void | removeZoomLevel (uint32_t index) |
ZoomLevel * | queryZoomLevel (uint32_t index) const |
ZoomLevel * | operator[] (uint32_t index) const |
virtual TSLTrackAggregator::AggregatorType | type () const |
virtual void | preProcess () |
virtual TSLTrackBase * | aggregateTrack (TSLTrackBase *track, const TSLRenderingInterface *renderingInterface) |
virtual void | postProcess () |
virtual uint32_t | numAdditionalTracks () const |
Query the number of additional tracks provided by this aggregator. | |
virtual TSLTrackBase * | getAdditionalTrack (uint32_t index) const |
Query an additional track provided by this aggregator. | |
![]() | |
virtual | ~TSLTrackAggregator () |
Destructor. | |
Additional Inherited Members | |
![]() | |
enum | AggregatorType { AggregatorCustom , AggregatorByEchelon , AggregatorByDensity } |
The types of aggregator provided by the MapLink API. More... | |
![]() | |
TSLTrackAggregator () | |
TSLTrackAggregatorDensity::TSLTrackAggregatorDensity | ( | const char * | attribName | ) |
Constructor
The density aggregator must be provided with an attribute name. During aggregation the value of this attribute will be queried by calling TSLTrackBase::getAttributeValue( attribName ). Any tracks which do not have a valid value for this attribute will be ignored by the aggregator.
attribName | The name of the track attribute to use |
|
virtual |
Destructor.
ZoomLevel * TSLTrackAggregatorDensity::addZoomLevel | ( | double | triggerLevel, |
uint32_t | gridX, | ||
uint32_t | gridY ) |
Configure/add a new ZoomLevel
triggerLevel | The resolution for the zoom level, in Map Units Per Pixel |
gridX | The number of horizontal cells (columns) within the aggregation grid |
gridY | The number of vertical cells (rows) within the aggregation grid |
|
virtual |
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:
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.
track | The input track |
renderingInterface | The current rendering interface |
Implements TSLTrackAggregator.
const char * TSLTrackAggregatorDensity::attributeName | ( | ) | const |
Query the attribute name used by the aggregation calculation
void TSLTrackAggregatorDensity::attributeName | ( | const char * | attribName | ) |
Set the attribute name for the aggregation calculation
The value of this attribute will be queried from any tracks passed to the aggregator, and will be used to select aggregation rules
attribName | The name of the attribute |
|
virtual |
Query an additional track provided by this aggregator.
Reimplemented from TSLTrackAggregator.
|
virtual |
Query the number of additional tracks provided by this aggregator.
Reimplemented from TSLTrackAggregator.
uint32_t TSLTrackAggregatorDensity::numZoomLevels | ( | ) | const |
Query the number of ZoomLevels configured for the aggregator
ZoomLevel * TSLTrackAggregatorDensity::operator[] | ( | uint32_t | index | ) | const |
Array operator - Will query zoom levels within the aggregator
|
virtual |
Perform any required post processing
This method is called by the track manager during each draw
The aggregator uses this method to determine whether there are sufficient tracks stored from the aggregateTrack function i.e. those that are in the required area at the current zoom level of the same type to meet the minimum number for the current rule to form a trackgroup. Any tracks not meeting this criteria are added to the list to be drawn. If a trackgroup is formed then that is also added to the additional track list.
Reimplemented from TSLTrackAggregator.
|
virtual |
Reset the aggregator and perform any required pre processing
This method will be called by the track manager at the start of each draw to allow the aggregator to perform any setup or reset operations required.
Reimplemented from TSLTrackAggregator.
ZoomLevel * TSLTrackAggregatorDensity::queryZoomLevel | ( | uint32_t | index | ) | const |
Query a ZoomLevel
The application may modify the returned object however must not delete it
index | The index of the level to query |
void TSLTrackAggregatorDensity::removeZoomLevel | ( | uint32_t | index | ) |
Remove a ZoomLevel
index | The index of the level to remove |
|
virtual |