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

(overpass turbo) Children relations missing.

0

Why don't all showing here:

[out:csv(::type, ::id, name, admin_level, parent_id)];
rel(148838)->.c;
.c map_to_area;
rel(area)[admin_level="4"][boundary=administrative][type!=multilinestring];
out;

show here:

[out:csv(::type, ::id, name, admin_level, parent_id)];
rel(148838)->.c;
.c map_to_area;
rel(area)[admin_level="2"][boundary=administrative][type!=multilinestring];
foreach(
  out ids;
  rel(r); //children
  out;
);

asked 30 Jul '18, 22:43

andrefrsilva's gravatar image

andrefrsilva
11335
accept rate: 0%


One Answer:

0

I guess that not all admin_level=4 relations added as children to the admin_level=2 relation. Juust being mapped as nested boundary relations is not enough. The admin_level=4 boundaries should be explicitly added to the admin_level=2 relation.

AFAIK, it is not common practice to do this. I even thought that the wiki adviced against it, but I cannot find a reference for that now.

answered 31 Jul '18, 04:13

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

So what should I do instead to get the children relations of each relation?

(31 Jul '18, 11:55) andrefrsilva

Source code available on GitHub .