Wondering how to write an Overpass query to find ways in cycle route relations that have surface=paved tagged on the way. Here's my best effort, which is doing fine getting ways within cycle relations, but is not filtering for ways tagged surface=paved:
Note: this question came up on GIS StackExchange asked 17 Jun '15, 15:32 neuhausr |
I suggest http://overpass-turbo.eu/s/9Zf instead. Let's also do a walk-through of the above query: The parentheses opening in line 2 and closing in line 6 mean that the input of line 8
are the union of the results in lines 3, 4, and 5. In particular, in line 3 we collect all the relations with "route"="bicycle". Thus, the recurse-down collects all the ways that are members of these relations. In line 9, these resulting ways, along also found nodes from these ways, are printed. To avoid this, you need to remove the parentheses in line 2 and 6. Fruthermore, the parentheses in lines 3, 4, and 5 also have no effect, because there is in each case only a single query inside. The remaining differences are that I have simplified the different set names to always the default set name. Because some relations may have an enormous extent, I have also added a "({{bbox}})" condition to the "way" query to restrict the results to the given bbox. It would work without, but admittedly slower. To speed up without bounding box, you can use
This splits the way query into two steps to enforce that the filtering for relation members is applied first. Please feel free to paste back the content to GIS StackExchange. I consider my answers here as CC0. answered 17 Jun '15, 17:05 Roland Olbricht 1
Thanks so much, especially for the walk-through pointing out where I went wrong!
(18 Jun '15, 14:39)
neuhausr
|