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

how can we get the details surrounding the road segment and connectivity from OSM ? For example, how can I know road A is connected to road B? Is there any attributes about these segments or nodes like speeds, number of lanes, etc? If so, where is this detail in OSM?

asked 05 Jan '14, 01:31

systemjim's gravatar image

systemjim
11112
accept rate: 0%


Not sure about all of your question nor how you are getting the data from OSM. But for knowing if road A is connected to road B, each road or way has a list of node IDs. If the two ways (roads) have node IDs in common then they connect. And they might connect in multiple places and thus have multiple node IDs in common.

On the ways themselves (actually any object which includes individual points/nodes) are an arbitrarily long list of key=value pairs. If the way is marked as highway=* then there are defined key value pairs for things like maxspeed, lanes, etc.

If you download a OSM file for a small area you will see that it is just an XML file with a pretty obvious schema. If you are getting any of the other types of downloads available and loading it into a GIS database, then the data will look different and you'll have to look at the tools that populate your database and what your schema is to see what is loaded.

permanent link

answered 05 Jan '14, 02:40

n76's gravatar image

n76
10.8k1082172
accept rate: 17%

Type "graph" in the search box above and read some of the responses to similar questions.

permanent link

answered 05 Jan '14, 12:02

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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:

×223
×18
×3

question asked: 05 Jan '14, 01:31

question was seen: 42,707 times

last updated: 05 Jan '14, 12:02

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