OverpassQL - Why does the query work like that?

26 views Asked by At

I'm new to the OverpassQL world and have been working my way through several tutorials today. I would say that I already understand the basics quite well.

However, I have a question about one particular query because I don't understand the result.

I want to find bridges in the "Dresden" area that have at least one other bridge within a radius of 10 meters.
In other words: Two bridges next to each other that are not more than 10 meters apart.

My first idea - the problem

My first approach was as follows:

area[name=Dresden];

way[bridge](area);
way[bridge](around: 10);

(._;>;);
out meta;

However, this does not show me the expected result, but simply ALL bridges in Dresden.

The solution - but why?

If I now add "(area)" to the second "way" query, I get exactly the result I wanted!

area[name=Dresden];

way[bridge](area);
way[bridge](around: 10)(area);

(._;>;);
out meta;

Why does the "(area)" in the second "way" query make a difference? Shouldn't it be based on the results of the first query either way? I can't wrap my head around this :/

Many thanks in advance!
- Christian

0

There are 0 answers