NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the 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

janzamoy
1111
accept rate: 0%

edited 15 Sep '14, 12:33

SK53's gravatar image

SK53 ♦
28.1k48268433

1

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

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

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 ♦
1

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

stephan75
12.6k556210
accept rate: 6%

Follow this question

By Email:

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

By RSS:

Answers

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:

×290
×235
×223

question asked: 14 Sep '14, 23:10

question was seen: 10,333 times

last updated: 22 Sep '14, 18:55

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum