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

Hello everyone.

Can I get using OSM Api the location and bounds of street by lat lon ( the point is near or on the street) and draw a curve on it? Should I use some geo services or route DB(like geoserver.org)?

asked 27 Nov '11, 21:46

zzzzteph's gravatar image

zzzzteph
30557
accept rate: 0%


You can use the API to request a "way", which is a line/polygon feature. You can then calculate its bounds fairly easily by requesting its components with the /full call (or requesting each individually). From there you can do simple math on the nodes to see the way's bounds.

As for the second part of your question "The point is near or on the street"- if the point in mention is an existing node in OSM, then you can request if the node is a component of the way.

Since streets in OSM are stored as lines and not areas, unless your point has the exact same location as an existing node, then it would be a bit of a guess (even if it's an extrapolated one) whether it's on a street.

permanent link

answered 28 Nov '11, 12:37

emacsen's gravatar image

emacsen
1.2k1623
accept rate: 13%

Your answer
toggle preview

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:

×44

question asked: 27 Nov '11, 21:46

question was seen: 4,725 times

last updated: 28 Nov '11, 12:37

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