I want to fetch up to around 10 OSM objects and assign them to a set of hand-picked areas (up to around 20 different areas) in a single Overpass query. Is this possible?
So the desired output is:
- Node/Way tags and center of first object + area the first object is in
- Node/Way tags and center of first object + area the first object is in
- ...
I already got this kind of working with wikidata tags:
[out:json][timeout:10];
(
node(id:3959878839);way(id:162817836);
);
foreach->.d(
(.d;.d >;)->.d;
.d out center;
.d is_in;
area._[wikidata~"(Q14201325|Q16895860)"];
out;
);
>;
This returns the node / way data as well as the area the object is in.
Now I realized I cannot identify all areas needed in the future by wikidata tags and want to use the relation IDs.
The relations are:
For area IDs we have to add 3600000000 to the ID.
So I tried
[out:json][timeout:10];
(
node(id:3959878839);way(id:162817836);
);
foreach->.d(
(.d;.d >;)->.d;
.d out center;
.d is_in;
area._area(3611589457);
out;
);
>;
But this does not output the area any more, and I also don't know how to supply the other area IDs here.