MapLink Pro 11.2
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLIsochrone Class Reference

Detailed Description

This class provides the functionality to generate Isochrones given the following:

  • a Source Optimized Network
  • a Target Location (starting point)
  • a Cost Object
  • a set of Target Costs
  • an enumeration defining the type of Isochrone to generate
  • a buffer distance (Optional. Required only for the Buffered Network Isochrone type)

Usage Guide:

Initially the User should create a TSLIsochrone object, using the static create function, associating an Optimized Network and Cost Object and specifying the desired Isochrone type.

The Isochrone object can then be used to analyse the network specifying a Node as the Target Location (Starting Point) and an array of Target Costs. Once this has been completed the Geometry can be requested by a call to the getGeometry function. This returns a set of geometry objects representing the Isochrone(s) generated.

The User is responsible for destroying all returned objects.

Public Member Functions

bool analyseNetwork (const TSLOptimizedNetwork::const_node_iterator &targetLocation, double *targetCost, int numCosts=1)
 
void destroy ()
 
TSLEntitySetgetGeometry (const long &bufferDistance=0)
 
TSLEntitySetgetGeometry (const double &targetCost, const long &bufferDistance=0)
 
bool linkCount (const double &targetCost, long &result) const
 

Static Public Member Functions

static TSLIsochronecreate (const TSLOptimizedNetwork *nwk, const TSLOptPathCost &cost, TSLIsochroneType type)
 

Member Function Documentation

◆ analyseNetwork()

bool TSLIsochrone::analyseNetwork ( const TSLOptimizedNetwork::const_node_iterator & targetLocation,
double * targetCost,
int numCosts = 1 )

Function that analyses the network and generates the links found within the target costs.

Parameters
targetLocationThe node in the network from which to start.
targetCostAn array of target times (in seconds).
numCostsThe number of times in the target cost array.

◆ create()

static TSLIsochrone * TSLIsochrone::create ( const TSLOptimizedNetwork * nwk,
const TSLOptPathCost & cost,
TSLIsochroneType type )
static

Create a TSLIsochrone object, associating a network and cost object with it. The client is responsible for destroying the object.

NOTE: The TSLIsochrone object does NOT make a copy of the cost object passed to it. Therefore the client must ensure that the cost object remains valid for the lifetime of the TSLIsochrone object.

Parameters
nwkThe optimized network for which routing will be performed.
costThe cost object.
typeThe enumerated type of the Isochrone to be generated.

◆ destroy()

void TSLIsochrone::destroy ( )

Destroy the object.

◆ getGeometry() [1/2]

TSLEntitySet * TSLIsochrone::getGeometry ( const double & targetCost,
const long & bufferDistance = 0 )

Function that returns an Entity Set of either Lines or Polygons representing the Isochrone generated by theTarget Cost.

The Isochrone must have been previously generated by a call to analyse Network, for the given TimeCost.

The Entity ID of the returned Entity Set is set to the Target Cost value (time) represented by the contained area.

The Feature ID of the returned Entity Set is set to the Target Cost index represented by the contained area.

Note: The user is responsible for destroying the returned pointer.

Parameters
bufferDistanceThe distance to apply around the retrieved links (in TMCs). (Only required if Buffered Network type used).

◆ getGeometry() [2/2]

TSLEntitySet * TSLIsochrone::getGeometry ( const long & bufferDistance = 0)

Function that returns an Entity Set containing the geometry of Isochrones generated for the Target Costs.

Each Isochrone is represented as an Entity Set of either Lines or Polygons.

The Isochrone must have been previously generated by a call to analyse Network, for the given TimeCost.

The Entity ID of the returned Entity Set is set to the Target Cost value (time) represented by the contained area.

The Feature ID of the returned Entity Set is set to the Target Cost index represented by the contained area.

Note: The user is responsible for destroying the returned pointer.

Parameters
bufferDistanceThe distance to apply around the retrieved links (in TMCs). (Only required if Buffered Network type used).

◆ linkCount()

bool TSLIsochrone::linkCount ( const double & targetCost,
long & result ) const

Returns the number of links in the isochrone generated for the Target Cost. Includes links with the same geometry but reversed direction. Returns false if Target Cost not found.