I need to find intersection by searching name of 2 streets; I found overpass API to query on osm data; the way I found was to find a node near a way; but the problem is all nodes don't have name and in most cases the answer isn't accurate, is there a better way?


2 Answers 2


You could use the following approach:

way[highway][name="6th Avenue"];node(w)->.n1;
way[highway][name="West 23rd Street"];node(w)->.n2;
out meta;

Try it on overpass turbo: http://overpass-turbo.eu/s/6Pb

Edit: node.n1.n2; calculates the intersection of input set .n1 and .n2. Please check the documentation for details.

  • Thank's that helped so much. but what does node.n1.n2 do? how can i see all possible answer and not just one?
    – Nazila
    Commented Jan 4, 2015 at 10:44
  • 1
    It's the just intersection of all nodes in inputset .n1 and .n2. You will always get ALL possible answers in the area you specify: just remove the [bbox:{{bbox}}] in the first line to get 3 of those intersection worldwide (all of them in the US).
    – mmd
    Commented Jan 4, 2015 at 10:47
  • Thank you I did and yet I didn't get the correct intersection, I guess it's because of limitation of map data, Iran osm map isn't complete
    – Nazila
    Commented Jan 4, 2015 at 10:50
  • overpass-turbo.eu/s/6Pf It just finds 2 node in Iran and of course not the one i mean
    – Nazila
    Commented Jan 4, 2015 at 10:58
  • 1
    You could check if both ways are in your result: overpass-turbo.eu/s/6Pg Also, it is important that both ways technically share at least one node. If they just intersect but don't have that common node, you would have to look into the around filter instead.
    – mmd
    Commented Jan 4, 2015 at 11:02

Works fine for me. Could be enhance.

    (.n1; - ._;)->.n2;


It keeps crossing, if you don't need it, just substract the set of crossing to the intersection node (node.n3.n2).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.