Compute the most probable route through an actually driven trace
HERE Route Matching v8 computes the (most probably driven) route through a given GPS trace. Typical GPS inaccuracies are taken into account, and arbitrary gaps are handled appropriately. For information on input data, see GPS trace formats and accuracy.
Often, the map matched trace shall be enriched with HERE map attributes, like speed limits, slope, curvature, motorway / inside city, number of lanes, traffic / weather situation. These can be directly included in the route match response.
Another use case is learning the driver's daily commute paths by HERE Route Matching v8, storing the cornerstones of these routes, and then every day sending this route path to the HERE Routing API to obtain the driving time under current traffic situation as well as incidents along this route.
So drivers get alerted when they should depart earlier than usual, or that everything is as usual.
Code
The following is a sample request.
https://routematching.hereapi.com/v8/match/routelinks?routeMatch=1&mode=fastest;car;traffic:disabled&legal=access,oneway,thrutraf,turn&attributes=LINK_FCn(REF_NODE_NEIGHBOR_LINKS,NONREF_NODE_NEIGHBOR_LINKS)&file=undefined&apiKey={YOUR_API_KEY}
As a response, the route calculated by the Route Matching API from the trace will be displayed in green. The route calculated by the Routing API will be displayed underneath it in red together with live traffic or guidance information.
The response will include a list of specific warnings at route links. A sample response might be "Gate traversal onto link 786918237".
Note
There is no strict limitation on the number of waypoints per request. The computational effort depends on the number of kilometers that the GPS trace traverses. If the computation time for a waypoint request exceeds ~ 50 sec, the request will be cancelled.
Procedure
You can provide the input data by the request above. Alternatively, you can provide a trace file directly to the interface. Open the example https://demo.support.here.com/examples/v3/rme_daily_commute. A list of points and speed limits at those points can be provided and the Route Matching API will calculate a route through them. The trace data is inserted using a trace file in the formats CSV, GPX or NMEA. The trace file contains data such as coordinates, elevation or speed. For more information on input formats, see GPS trace formats and accuracy. You can also insert trace data by directly clicking onto points in the map.
Result
As a response, the route calculated by the HERE Route Matching v8 from the trace will be displayed in green. The route calculated by the Routing API will be displayed underneath it in red together, potentially then showing live traffic impact information (not displayed in this example).
The POST request returns a list of warnings at specific route links. For more information on output formats, see GPS trace formats and accuracy .