[GIS] Identify OSM road ids based on coordinates

map-matchingopen-source-routing-machineopenstreetmap

I have a trace of GPS coordinates. I would like to get the OSM road ids of the roads that lie on the route defined by the coordinates.

I've used OSRM match service to match the coordinates to the road network. From the result I can get the individual node ids using annotations=true, but not the road ids. Should I somehow use the node id's to get the road ids, or is there some other way to achieve this?

Best Answer

You can use route-annotator, which was developed for use with OSRM, to look up way data given a set of OSRM-generated coordinates: https://github.com/mapbox/route-annotator

Related Question