Why not ask your question on the new OpenStreetMap Community Forum?

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.

asked 14 Sep '14, 23:10

janzamoy's gravatar image

accept rate: 0%

edited 15 Sep '14, 12:33

SK53's gravatar image

SK53 ♦


The OSM API is used for uploading data to OSM, not for displaying it.

(14 Sep '14, 23:21) SomeoneElse ♦

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.

(15 Sep '14, 08:42) scai ♦

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)

(15 Sep '14, 13:19) Pieren

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.

permanent link

answered 22 Sep '14, 18:55

stephan75's gravatar image

accept rate: 6%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Sep '14, 23:10

question was seen: 9,796 times

last updated: 22 Sep '14, 18:55

powered by OSQA