I have to find the nearest node (the id) of a geo-spatial point in OpenStreetMap
I can use the official demo api
https://router.project-osrm.org/nearest/v1/foot/13.388860,52.517037
and I have this very nice output:
// 20170831155106
// https://router.project-osrm.org/nearest/v1/foot/13.388860,52.517037
{
"waypoints": [
{
"hint": "DB0KgLNSo4oUAAAAIAAAAAcAAAAAAAAACgAAABAAAAAEAAAAAAAAAK7aAAAATMwAqVghAzxMzACtWCEDAQAPAN1tFXI=",
"distance": 4.085341,
"location": [
13.3888,
52.517033
],
"name": "Friedrichstra\u00c3\u0178e"
}
],
"code": "Ok"
}
but that doesn't give me the nearest OSM node id and I can't use "?annotations=true" because I receive this message
{'code': 'InvalidQuery',
'message': 'Query string malformed close to position 37'}
This feature is currently being worked on. The PR looks good, but needs some fixes around the edges.