Hallo und guten Tag,
ich hab einen interessanten Ansatz gefunden - für eine Overpass-Abfrage:
**Die Ausgangsfrage war **: … how to extract a list of churches from OSM with their name, their coordinates and the name of
the lower administrative division they belong to. I managed to get the first ones with:
**Antwort: ** I suggest to search for amenity=place_of_worship as well. There are 864226 of them (nodes and ways), while building=church only has 200886. For the admin division, you have to look into admin_level. It depends on your study area how deep they are detailed. –
btw: Similar to an example in the Overpass by Example library, I’d suggest to use the following query:
Church building ways in an area : When applying this technique to ways, one has to keep in mind that the is_in statement only works on nodes. For this reason, we first have to determine all nodes for a way.
try it in overpass-turbo
**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, and one with an is_in entry but without geometry. At this time, you have to manually merge those two ways. In a later version of Overpass API this will change, though, returning only one single result including geometry.
The line containing georeferencing information looks as follows:
results: in csv gist.github.com/mmd-osm/10e867cfcfbe15fcef65867e64b6630e
Das sieht alles sehr sehr interessant aus - und vielversprechend. Aber diese drei Zeilen hier, die verstehe ich nicht richtig.
Ich habe Schwierigkeiten hier konkrete Daten & Werte einzusetzen. Kann hier jemand ggf. aushelfen mit einem konkreten Beispile.l
vgl. auch hier: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example#Adding_Georeference_details_to_village_nodes_.28since_0.7.54.29