NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Greetings -

I'm trying to write an Overpass-QL query to find all roads crossing a motorway/freeway - both on bridges above and bridged below. The above-the-road part is easy, but below is proving difficult. Is there syntax to use 'around(0)' to find something that FOO way is crossing above, but filtering out FOO itself? I tried using a ["ref"!~"FOO"] argument to filter it out, but that's not working.
I've been looking at this for too long, and my brain is mush. Help? Someone...?

Here's what I have:

[out:json][timeout:30][bbox:{{bbox}}];

way["ref"~"FOO"]->.road;
way(around.road:0)[bridge]["highway"~"^((primary|secondary|tertiary|trunk|motorway)(_link)?|service|residential|unclassified)"]->.xbridges;
way.road[bridge]->.br;
way(around.br:0)["highway"~"^((primary|secondary|tertiary|trunk|motorway)(_link)?|service|residential|unclassified)"]["ref"!~"FOO"]->.xways;
(.xways;
 .xbridges;);
out geom;

Thanks so much....

asked 01 Mar '22, 19:19

GregRetro's gravatar image

GregRetro
3547917
accept rate: 50%

Could you supply a link to a functioning example of your routine covering an area which contains examples of the objects you want returned. Provide a specific link to an object that doesn't get returned.

(09 Mar '22, 19:56) DaveF

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

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:

×228
×167
×66
×65
×41

question asked: 01 Mar '22, 19:19

question was seen: 2,166 times

last updated: 09 Mar '22, 19:56

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum