GPS Trace and Route Matching

Matching GPS Traces and Route Data to Roads

Matching GPS Traces and Route Data to Roads

We provide support for the automatically matching provided routes to nodes in the navigation graphs used for the platform road and rail networks

In this section:

Why use Route Matching?

Route matching may be beneficial for routes which are intended to represent roads or railway lines. Enabling matching on such a route will, for each route vertex, attempt to find the closest vertex on the transport network navigation graph, and will snap the position of the route vertex to the position of the navigation graph vertex. The match will also amend the route segment width to match that of the navigation graph segment. The effect of this is to enhance the visual association between the route visualisation and the transport visualisation (such as the 3D road or railway line).

How to enable Route Matching

To construct a route with navigation graph matching enabled, pass a parameter to the CreateRoute method of RouteService, indicating that matching is desired. This is an immutable property of the route, so if matching is required to be toggled the route can be destroyed and recreated.

Vertex Classification

In addition to enabling or disabling matching for a route, matching can be controlled at the level of the individual route vertices. Each route vertex has a RouteVertexClassification, which can take the value of Road, Rail or Pedestrian. Vertices classified as Road will be matched to the road navigation graph nodes, vertices classified as Rail wil be matched to the rail navigation graph nodes, and vertices classified as Pedestrian will not be matched at all.

Accuracy Considerations

Depending on the resolution of the raw route data, the route matching process may not yield a result which visually matches the road. For example, if the raw route data represents a curved road with a vertex at the roads start and end point, this will not be sufficient to generate a route mesh which follows the curve of the road; rather, the start and end points will be matched and linearly interpolated (i.e, a straight line will drawn between them). In general, the more detailed the raw route data, the better the matching results will be.

Examples

RouteMatchingExample – This example illustrates how to enable route matching, and demonstrates the effects of route matching on a series of example routes in San Francisco. The example routes contain data at different elevations, and include routes with different segment classifications to demonstrate non-matched pedestrian sections. The route matching can be toggled via a button, so the modifications to the raw route data can be observed.

The example is available here.