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

overpass turbo : how to query all the ways in a relation

1

I'm trying to query the Great Lakes in overpass using the id (https://www.openstreetmap.org/relation/1124369)...is this plausible?

Here is what I have so far.

[out:json][timeout:2500];

(   relation["name"="Great Lakes"][ref=1124369];   way(r);   node(w); );

out skel qt;

asked 25 Apr '17, 00:54

goldfishinriver's gravatar image

goldfishinriver
31337
accept rate: 0%


One Answer:

2

To query by OSM id, do something like rel(1124369);

Once you have that object you need to use the recurse down relations operator:

[out:json][timeout:25];
rel(1124369);
(._;>>;);
out;

It's about 90 megabytes of data.

answered 25 Apr '17, 01:51

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

Thanks! Worked great!

(26 Apr '17, 22:03) goldfishinriver

Source code available on GitHub .