dear community
it took me some time to get the sense of what is admin-level good for.
see here an example:
[out:csv(::id,“name”,::lat,::lon,is_in;false)];
area[“name”=“Berchtesgaden”]->.boundaryarea;
way(area.boundaryarea)[“building”=“church”];
foreach(
node(w)->.n;
.n is_in->.a;
area.a[name][boundary=administrative][admin_level~“$”] → .a;
out center;
convert way ::=::,
::id = id(),
is_in=a.set(“{” + t[“admin_level”] + “:” + t[“name”] + “}”);
out;
);
it gives back the following
see more out of it: https://gis.stackexchange.com/questions/237935/listing-churches-with-their-administrative-location-using-overpass
**
Step-by-step explanation how this query works:**
It iterates over each building=church in your area
determines all nodes for each building
find out in which areas those nodes are (this is the actual georeferencing step)
filter out all areas with boundary=administrative and admin_level between 2 and 8 (you can adjust those if needed).
print out the center point of the church building way
generates an artificial element with the same way id and an additional element is_in, which lists all administrative boundaries the church is in.
prints out artificial element
Note that the query returns two ways for each church, one with a center node,
are there more ideas - that we need to know - for understanding the idea of Admin-level
do you have any idea!?
love to hear from you
Sorry, I’m not quite sure if I’ve entirely understood your question. If you’re just trying to learn more about what the admin_level key means, here’s a couple wiki pages that may be helpful:
https://wiki.openstreetmap.org/wiki/Key:admin_level
https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level.3D.2A_Country_specific_values
Basically the meaning of the value of admin_level depends on which country you’re looking at, and the exact meanings are documented in the second link I provided.