How do I find the link of a road network that coordinate is on? (Map Matching)

1.6k views Asked by At

I am using the osmnx library (python) to extract the road network of a city. I also have a separate data source that corresponds to GPS coordinates being sent by vehicles as they traverse the aforementioned road network. My issue is that I only have the GPS coordinates but I wish to also know which road they correspond to. I.e. I want to input a set of longitude, latitude coordinates and get the corresponding street on which that GPS coordinate lies. I believe the term for this is Map Matching.

What is the best way to do this? Preferably the solution would be using osmnx but other solutions would also be appreciated.

Note that the GPS coordinates may be noisy.

2

There are 2 answers

2
gboeing On

You can do map matching with OSMnx. See the nearest_nodes and nearest_edges functions in the OSMnx documentation: https://osmnx.readthedocs.io/

0
Debjit Bhowmick On

My suggestion woud be to use the leuvenmapmatching package. You will get the details in the documentation of the package itself.

https://github.com/wannesm/LeuvenMapMatching