TransportPositioner (Class)

Namespace: Wrld.Transport

Allows a coordinate to be matched to a point on a transport network.


void SetInputCoordinates (double latitudeDegrees, double longitudeDegrees)

Set the input coordinate.

Argument Type Description
latitudeDegrees double Input latitude, in degrees.
longitudeDegrees double Input longitude, in degrees.

void SetInputHeading (double headingDegrees)

Set the optional input heading.

Argument Type Description
headingDegrees double Input heading angle, as clockwise degrees from North.

void ClearInputHeading ()

Clear the optional input heading.

bool IsMatched ()

Query whether this object currently has a matched point on the transport network. See GetPointOnGraph() for reasons why IsMatched() may return false.

Returns: True if a match has been found, else false.

TransportPositionerPointOnGraph GetPointOnGraph ()

Get results of the currently best-matched point on the transport network, if any. For a successful match to be made, the following constraints must be fulfilled by the currently streamed-in set for the specified transport network:
A point on the network can be found that is less than or equal to MaxDistanceToMatchedPointMeters from the input coordinate.
If a heading was specified (HasInputHeading is true), the angle between the input heading, and the tangential heading of the way at the candiate match point is less than or equal to MaxHeadingDeviationToMatchedPointDegrees.

Returns: A TransportPositionerPointOnGraph result object.

void Discard ()

Destroys this TransportPositioner.


int Id

Uniquely identifies this object instance.

int Id { get; private set; } 

double InputLatitudeDegrees

Input latitude coordinate in degrees.

double InputLatitudeDegrees { get; private set; } 

double InputLongitudeDegrees

Input longitude coordinate in degrees.

double InputLongitudeDegrees { get; private set; } 

bool HasInputHeading

True if optional input heading is set.

bool HasInputHeading { get; private set; } 

double InputHeadingDegrees

Optional input heading angle in degrees clockwise from North.

double InputHeadingDegrees { get; private set; } 

double MaxHeadingDeviationToMatchedPointDegrees

Constraint threshold for the maximum allowed difference between InputHeadingDegrees and the tangent direction of a candidate on a TransportDirectedEdge, in degrees.

double MaxHeadingDeviationToMatchedPointDegrees { get; private set; } 

double MaxDistanceToMatchedPointMeters

Constraint threshold for the maximum allowed distance between the input coordinates and a candidate point on a TransportDirectedEdge, in meters.

double MaxDistanceToMatchedPointMeters { get; private set; } 

TransportNetworkType TransportNetworkType

The transport network on which to attempt to find a matching point.

TransportNetworkType TransportNetworkType { get; private set; } 


Action OnPointOnGraphChanged

Notfication that the matched point on the transport graph has changed. This may be due to the input of this object changing, or due to transport network resources streaming in and out.