Map matching

Map matching algorithm

The map-matching algorithm works incrementally. When a new point of a given trajectory is available, the algorithm retrieves all previous data of the trajectory and rebuilds the map-matched path considering the new point.

The new path can be very different from the old one because it does not simply expand the old path. A score value can be associated to each map-matched trajectory. Each time a new point is taken into account, the algorithm generates N new paths sorted according to the score value. The lower the score value is, the better is the map-matched trajectory.

At each iteration, a new sorted set of best paths is created, expanding all paths stored in the previous sorted set. The expansion of a path consists in exploring the forward star of the last street arc and subsequent arcs. (The stopping criteria of this expansion will be described later.) Each new visited street arc produces a new path that is inserted into the new trajectory sorted set. When all old paths have been expanded, the new sorted set (with only the first N best paths) replaces the old one, and the trajectory is ready to be improved by a new incoming GPS point.

When a trajectory is built for the first time (so when the first GPS point is coming in) the sorted set of trajectory data is filled with all street arcs that are part of the forward star and backward star of all nodes that belong to a circle area centered around the GPS point itself. The score of these starting trajectories is given only by the distance between the GPS point and the corresponding street, so only the contribution is considered (see the following section for details on contributions).

Given a GPS point (red dot) from which a new trajectory has to be created, a circle around this GPS point (blue area) is considered. For all nodes of the graph inside this area (blue dots), every incoming and outgoing street arc (green arrows) is considered for creating the first set of trajectories.