This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

[closed] What is different about these intersections/off-ramps?

0

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. https://www.openstreetmap.org/#map=17/43.42071/-80.28191
  2. https://www.openstreetmap.org/#map=17/43.44879/-80.17669

And here are two examples that do:

  1. https://www.openstreetmap.org/#map=17/43.45355/-80.12442
  2. https://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

pag11123
56227
accept rate: 0%

closed 25 Sep '13, 15:45

Pieren's gravatar image

Pieren
9.8k2083157

1

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


One Answer:

2

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

answered 25 Sep '13, 15:43

pag11123's gravatar image

pag11123
56227
accept rate: 0%

Source code available on GitHub .