Being rather new in OSM.... I am wondering how node/edge topology is handled internally in OSM networks. Apparently - in the network that can be down loaded straight away - major roads are continues, i.e. not 'broken up' where minor roads are joining. Accordingly nodes are missing at these 'tributary' locations. How does e.g. shortest path analysis take place, when full node/edge topology is missing? Do OSM apply an alternative algorithm that - in some clever way - can work without topology, or is there a version of the network with all edges split up at junctions? If the latter is the case, can such a data set be downloaded? And if so, how? Cheers Hans Skov-Petersen, Uni. of Copenhagen, DK

asked 24 Sep '11, 21:25

Hans%20SP's gravatar image

Hans SP
accept rate: 0%

If you are to look at the OSM data as a formal graph then a node in OSM is a node in the graph and the OSM way is a path. This is the most logical way to store information about the roads. To find the edges you have to splitt the paths into the edges. Routing software does this when reading the OSM data.

When you think about it the road network is not a planar graph. Roads can cross without there being an intersection. This can happen if one or boath ways is a bridge or a tunnel. Routing engies should not route between ways that cross without a node.

If you find two ways that does not share a node at the intersection in OSM, but there is an intersection there, then this is an error in the data.

permanent link

answered 24 Sep '11, 22:04

Gnonthgol's gravatar image

Gnonthgol ♦
accept rate: 16%

Gnonthgol has given a good answer. But on a broader point, you should bear in mind: OSM data is not optimised for any single use, whether that be routing or rendering or whatever. Rather, you are expected to preprocess it into a form that suits your application's needs.

So, for example, the Mapnik rendering on does not use OSM data directly; rather, it uses an optimised version produced by the program osm2pgsql. Similarly, as Gnonthgol says, you will need to create a graph to route effectively, and there are several pieces of software that do that.

permanent link

answered 26 Sep '11, 19:53

Richard's gravatar image

Richard ♦
accept rate: 19%

Hans, for the specific issue of reconnecting minor roads to major ones, you have at least two tools that allow you to do just this (e. g. simply point them to Copenhagen in your above case): and

They are even capable to detect "suspicious node proximities" and show you the potential "culprits" automatically


permanent link

answered 03 Oct '11, 13:02

Herve5's gravatar image

accept rate: 13%

edited 03 Oct '11, 13:05

Thanks, both of you. I continue with a local version, where I can build the full topology my self. For sure I finde many places (e.g. i Copenhagen) where nodes are not present, where minor meets major roads. I would regard route finding a rather generic application, not 'any single use'. I agree that route finding can take place with only nodes (with node/edge topology build in), but rendering resulting routes will be problematic, without edges being clipped at junctions/nodes. Cheers Hans

permanent link

answered 01 Oct '11, 13:51

Hans%20SP's gravatar image

Hans SP
accept rate: 0%

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]( "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: 24 Sep '11, 21:25

question was seen: 21,202 times

last updated: 03 Oct '11, 13:05

powered by OSQA