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

Overpass QL: motorway_link without destination tag and coming from motorway_junction node

0

Hi,

I'm trying to find the motorway_link ways coming from a motorway_junction node (and so exiting a motorway) and which don't have a destination=* set.

Here's an example of the current query where it shouldn't return anything:

http://overpass-turbo.eu/s/Dar

And here it should return only two motorway_junction ways:

http://overpass-turbo.eu/s/Dat

Thanks in advance for any help!

asked 28 Oct '18, 11:00

The%20RedBurn's gravatar image

The RedBurn
101237
accept rate: 0%

edited 28 Oct '18, 11:04


One Answer:

1

The node->way recurse filter does exactly what you want:

node[highway=motorway_junction]({{bbox}});
way(bn)["highway"="motorway_link"][!"destination"];
out body;
>;
out skel qt;

http://overpass-turbo.eu/s/DaA

answered 28 Oct '18, 11:26

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

Wow, thanks that's great (and that was fast)! And thanks for the link!

(28 Oct '18, 11:30) The RedBurn

Source code available on GitHub .