I'm trying to write an Overpass query to get all ways (filtered with a specific tag) which aren't included in a relation (with a specific tag). Here is my query (edited after maxerickson's answer): https://overpass-turbo.eu/s/HXj
I followed this example, it's pretty close of what I want to do but for nodes, so I just changed a few things to get ways instead of nodes. Unfortunately my query doesn't return anything. Do you see anything wrong in my query? Edit after some debugging: here a way that the query should return (has a piste:typenordic tag and isn't part of a piste:type=nordic relation): https://www.openstreetmap.org/way/475719899
Thanks! asked 12 Apr '19, 14:17 billux edited 13 Apr '19, 13:46 |
One Answer:
You need something like
to even have anything in The answered 13 Apr '19, 03:28 maxerickson |
You're right, actually I wanted to use {{bbox}} first, but replaced it with area when I posted my question. I have updated my question with a link to the Overpass query and more information after trying to debug the query.
I'm not sure why, but naming the second result set helps: https://overpass-turbo.eu/s/HXB
That's strange, I don't understand why ._ can't be used in that case. Anyway the query works as expected now. Thanks!
The
.all
in the difference statement has._
as result set. The next statment._
picks that up. Thus, you are subtracting the content of.all
from itself. I'm sorry that the syntax is misleading in this case.