osm-without-borders/cosmogony

Read ways

Closed this issue · 7 comments

Ways can also be a boundary of an administration, for instance https://www.openstreetmap.org/way/14375181

This example is not valid : the way is not an admin, but only a part of another admin (which is a relation).

The boundary=administrative and admin_level=* are used both for rendering (on ways) and to group boundary parts to form an admin area (on a relation).

All right, you convinced me.

For the history, here is an overpass request to find those potential ways (by nlehuby)

[out:json];
way({{bbox}})["boundary"="administrative"][admin_level]->.all;

relation({{bbox}})["type"="boundary"];way(r) ->.ok;
( .all; - .ok; );/*added by auto repair*/(._;>;);/*end of auto repair*/out skel;

🤣
I've found a few one mapped as closed way in France:

What about this one ? https://www.openstreetmap.org/way/400014249 ;)

It would not come up with cosmogony with those tags. It’s a bit scary to know that such things are around…

The good news is that libpostal harcodes such things 😁. Hopefully...
https://github.com/openvenues/libpostal/blob/v1.0.0/resources/boundaries/osm/us.yaml#L27

But yes, a more permissive filter is still needed to fetch them the first place.