Map matching
The map matching feature provides functions to match raw GPS coordinates and heading information to a certain point and direction on the link of map data model.
The following image shows an overview of map matching:
The map matching feature provides the following capabilities:
-
Map matching of a single GPS coordinate or multiple GPS coordinates.
-
Map matching by using trajectory history.
-
Wrong-way driving detection.
-
Interpolation of matched points between GPS coordinates that are separated by more than a pre-defined distance.
-
Retrieving attributes of the matched points calculated based on Link attributes.
-
Retrieving matching candidate points that are selected during calculation of best matched point on a link.
The map matching is triggered within the Vehicle Data Hub (VDH) automatically when car probe data is uploaded by a moving object. Otherwise, it can be triggered explicitly through the Context Mapping REST API.
Context Mapping REST API
It is possible to process Map matching on the Context mapping component though the Context Mapping REST API. For more information, see GET /mapservice/map/matching2 and POST /mapservice/map/matching2 in Context Mapping REST API document.
Map matching by using trajectory history
With the map matching feature, you can save and use recent reported points such as GPS coordinates. The reported points for each moving object are sorted by the reported time and stored in the trajectory history. The accuracy of raw GPS coordinates can be degraded due to the signal obstacles (tunnels, buildings, mountains, and so on) or the number and the position of visible satellites. In these cases, it is possible to improve the map matching accuracy that considers not only the latest reported point but also the preceding time series reported points in the trajectory history.
The following image shows the map matching history feature:
The map matching feature supports the following options for managing trajectory history:
-
Start history: The existing trajectory history is cleared before the map matching is performed if this option is true. The default false is used if this option is not specified.
-
End history: The existing trajectory history is cleared after the map matching is performed if this option is true. The default false is used if this option is not specified.
-
Use history: The existing trajectory history is used for map matching to infer a true matched point if this option is true. The default false is used if this option is not specified.
-
Save history: The reported point is saved in the trajectory history if this option is true. The default false is used if this option is not specified.
The trajectory history is effective only when Moving object ID is specified. Otherwise, the trajectory history is not saved or used even if the option is enabled. To determine a trajectory of every moving object correctly, the trajectory history is identified by the key. The key is composed of Moving object ID, Tenant ID, Map ID used for map matching, and Trip ID if specified. The trajectory is regarded as different if any of these components are different.
Wrong-way driving detection
The map matching feature can detect if the mobile object is traveling in the opposite direction on a one-way road. When wrong-way driving is detected, the wrongway=1 value is stored in the properties of the matched point.
The following image shows the wrong-way driving detection feature:
Interpolation of matched points
The map matching feature can interpolate between two or more matched points on Link if the distance between them is longer than the set threshold. The interpolated matched point is From Node of Link in between. The following options are available for interpolation:
-
Interpolate: The interpolation is enabled if this option is true. The default false is used when this option is not specified.
-
Interpolation distance threshold: The threshold of distance in meters between matched points over which the interpolation is executed. This option is effective only when the interpolate is true.
The following image shows the interpolation of matched points:
Attributes of matched points
The map matching feature can retrieve attributes of the matched points calculated based on Link attributes. The attribute value is optimized in alignment with the matched point if the value is different in different points on the Link. The following option is available to retrieve the attributes of the matched point:
-
Required attributes: All attributes are returned if all is specified. Otherwise, you can specify the attribute names to be returned, separated by commas. No attributes are returned when this option is not specified.
For more information about link attributes, see Link attribute.
Matching candidate points
During map matching, Links near the GPS coordinates are searched for and a nearest point on each Link is calculated. These points are analyzed as matching candidate points to choose the best matched point. The matching score is calculated for each matching candidate point by considering the distance from the reported point. The connectivity from the previous point, the degree of heading, the road type, and so on. The map matching feature chooses the best matched point by considering comprehensive information that includes the matching score.
The following image shows the use of match candidate points:
Matching candidate points often have the previous candidate point, which is a one of matching candidate points of the previous reported point. The most probable point is selected as a previous candidate point among the points that are connected to the current candidate point through the path of Links.
The map matching feature can retrieve the candidate points out of which the map matching selected the best matched point. The following option is available to retrieve the candidate points with the matched point.
-
Num candidates: The maximum number of matching candidate points that are returned with the map matching results. The matching candidate points are sorted by the distance from the reported point, in ascending order and are returned from the nearest point up to the maximum number. The value 0 is used when this option is not specified.
The matching candidate point has the following information in addition to the information included in the matched point that is selected:
-
Matching score: The matching score, between 0.0 - 100.0, that is calculated by the map matching feature.
-
Previous candidate link ID: The link ID of the candidate point that is selected for matching to the previous GPS coordinates where the mobile object comes from.