I have streams of GPS points that are transmitted from a device aboard a bus in real time. I would like to use these points to infer which route the bus is following. I have routes stored as GPS point of bus stops, with a path shape which I have interpolated points every 20 meters. Currently I use the incoming points to narrow down the possible routes the vehicle is on using a finite state machine, by indicating a vehicle as possibly being on a route if it is within 50m of any point on the route.

The value of 50m is required due to the inaccuracy of the GPS unit. I therefore figured it would be better if I used map-matching to snap the incoming GPS coordinate to a road first so that I could use a smaller value of say 10m. It then occurred to me that instead of matching to a general road network, I could match to a map of just bus routes.

In the case of bus routes however, several routes follow the same road. I figured I could thus possibly use a map-matcher to solve my whole problem.

  • Can any map-matching algorithm match to more than one road simultaneously?

  • I am writing my algorithm in C#. Does anyone know of any open-source C# implementation of a map-matcher I can tinker with?

closed as too broad by PolyGeo Aug 21 at 11:24

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


Restricting your road network to the bus paths will dramatically increase the performance of any map-matching algorithm. Keep in mind that bus drivers can make mistakes/service trips though:) Instead of matching a road with a single point, match the entire trip to remove ambiguities.

Not the answer you're looking for? Browse other questions tagged or ask your own question.