Hello, would it be possible with OSM API, to magnet point, based on gps coordinates, to the closest road? So simply, how to determine closest car position on the road, based on gps coordinates which shows off-road position. |
There are some routing applications on smartphones that can display your GPS position on an OSM based map, and you can enable "snap-to-road" feature. See for example Osmand for android devices ... it is open source and has an own mailing list. answered 22 Sep '14, 18:55 stephan75 |
The OSM API is used for uploading data to OSM, not for displaying it.
Furthermore the API doesn't provide a snap-to-road feature. But of course you can implement it yourself with the help of OSM data.
In other words, you can use OSM data from various sources (like the planet or from planet extracts), keep only the roads data (and possibly simply them), then develop your own algorythm to find the nearest road based on lat/lon coordinates (with a certain velocity to avoid wrong streets determination at e.g. junctions)