What's the best way to search for/geocode the intersection of two roads? EDIT: I am asking for a user-facing tool, like MapQuest Open or Nominatim. asked 01 Jan '14, 06:25 mattflaschen |
I'm not sure if it's the best way, but AFAIK a common solution is:
Please keep in mind, that this isn't robust against 'dirty' OSM tagging. Here roads can be splitted in very creative ways, intersections don't have to contain traffic lights (at the expected positions), ... In the end a appropriate solution depends on the requirements of your usecase. answered 01 Jan '14, 08:52 iii Er, would you care to elaborate about how to "compare both lists of nodes and return equal nodes"?
(01 Jan '14, 12:51)
AlaskaDave
You generate a list of node IDs per way segment and add them to a collection per Road. After that you compare the ID collections and select that nodes that are in both road collections.
(01 Jan '14, 13:01)
iii
@iii, thanks for your rapid reply, but I'm still in the dark. I'm not trying to be difficult but how do you generate those lists of node ids? And for the comparison, do you simply eyeball the two lists or is there a way to do it computationally, e.g., put the lists into a spreadsheet, or whatever? Can you try to be very specific?
(01 Jan '14, 13:09)
AlaskaDave
iii is talking about a mechanical mechanism, i.e. a script or program. Of course you can do this all manually but it will take some time and is prone to errors.
(01 Jan '14, 15:09)
scai ♦
The algorithm seems generally good (of course, elaborations and refinements would probably be helpful). However, I was asking from and end-user perspective. In other words, are there are any tools like MapQuest Open or Nominatim (the web interface) that do this?
(01 Jan '14, 22:02)
mattflaschen
|
This should be possible using the Overpass API and the around keyword with a radius of 0. However I'm not skilled enough with the Overpass API to show you an example query. The maxheight map uses a similar mechanism and especially detects roads crossing each other without sharing nodes.