![]() |
MapLink Pro 11.2
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class provides the functionality to generate Isochrones given the following:
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 () |
TSLEntitySet * | getGeometry (const long &bufferDistance=0) |
TSLEntitySet * | getGeometry (const double &targetCost, const long &bufferDistance=0) |
bool | linkCount (const double &targetCost, long &result) const |
Static Public Member Functions | |
static TSLIsochrone * | create (const TSLOptimizedNetwork *nwk, const TSLOptPathCost &cost, TSLIsochroneType type) |
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.
targetLocation | The node in the network from which to start. |
targetCost | An array of target times (in seconds). |
numCosts | The number of times in the target cost array. |
|
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.
nwk | The optimized network for which routing will be performed. |
cost | The cost object. |
type | The enumerated type of the Isochrone to be generated. |
void TSLIsochrone::destroy | ( | ) |
Destroy the object.
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.
bufferDistance | The distance to apply around the retrieved links (in TMCs). (Only required if Buffered Network type used). |
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.
bufferDistance | The distance to apply around the retrieved links (in TMCs). (Only required if Buffered Network type used). |
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.