I am writing software that is trying to find off ramps along the highways. To do this I find ways with a highway value of motorway_link or secondary. I then go through all of the motorway_link ways and see if any of the nd ref="XXXX" are in common with the secondary ways.

This works pretty well, but it doesn't seem to work for all intersections/off-ramps. Here are two examples that don't work:

  1. http://www.openstreetmap.org/#map=17/43.42071/-80.28191
  2. http://www.openstreetmap.org/#map=17/43.44879/-80.17669

And here are two examples that do:

  1. http://www.openstreetmap.org/#map=17/43.45355/-80.12442
  2. http://www.openstreetmap.org/#map=17/43.49124/-79.98727

Can some one explain why the two I listed don't work? Any tricks or steps I need to add to my algorithm to make them work?

EDIT: Here is a HTML file (that uses google maps) that shows all the intersections that I detect: http://pastie.org/private/wnakelvwdkndpgeafwdg

As you can see my algorithm does well, but not not as well as i would like.

asked 25 Sep '13, 14:28

pag11123's gravatar image

accept rate: 0%

closed 25 Sep '13, 15:45

Pieren's gravatar image



Your examples seem to be correct in OSM. Maybe you should check again your code. Or publish it for peer review. Perhaps the problem is that some of the intersections are on a first or last node on the way...

(25 Sep '13, 15:30) Pieren

The question has been closed for the following reason "Other" by Pieren 25 Sep '13, 15:45

I found the problem, I was ignoring ways without a name.

permanent link

answered 25 Sep '13, 15:43

pag11123's gravatar image

accept rate: 0%

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: 25 Sep '13, 14:28

question was seen: 1,812 times

last updated: 25 Sep '13, 15:45

powered by OSQA