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

Overpass Turbo: extract all ways of a set

1

A short question: I would like to extract all ways that are included in a set consisting of both ways and relations. How can I do that?

Assume the set is called "x", then, I tried:

  • way(w.x);
  • way(.x);

all without success because recurse is not defined for way-way and a bit overkill. Feels like there must be a simple solution, I just cannot see it ;)

Thanks for a hint!

asked 09 Sep '21, 11:32

G%C3%A5seborg's gravatar image

Gåseborg
31171016
accept rate: 50%


One Answer:

2

Sorry, it is explained in the wiki:

"To read elements from a set, append . and the set name to the command.

 node.a[amenity=foo];

will return all nodes in the named set a that have the key amenity with the value foo."

So, in my case, it boild down to: node.x;

answered 09 Sep '21, 11:55

G%C3%A5seborg's gravatar image

Gåseborg
31171016
accept rate: 50%

edited 09 Sep '21, 11:56

This answer describes what solved my problem. Unfortunately, I cannot mark it as "accepted answer"; could one of the admins please do so, thanks! I hope that marking this question as "answered" can help others that have the same problem and spare those that want to help solving a problem to have to look at this one. Thanks!

(30 Sep '21, 12:39) Gåseborg
1

I have marked it as accepted.

(30 Sep '21, 13:20) SomeoneElse ♦

Source code available on GitHub .