I am trying to use the Overpass Turbo to retrieve from OSM all cemeteries in a given area (say, Carinthia), as well as the municipality (or other administrative unit) each is in.

Getting all cemeteries is easy enough − I made this query (adapted from taginfo) which works fine.

What I am struggling with is to add geocoding details − I want for each cemetery to know the city (or the county, or other adminstrative unit) it is in. I have been trying to draw from examples on the wiki (particularly this one) for this, but could not figure it out.

(Also, if I understood correctly, the is_in operator can only be applied on nodes, and cemeteries can be mapped as nodes, ways or relations)


Building uponh @mmd answer in Listing churches with their administrative location using Overpass, I made this

    .n is_in->.a;
    area.a[name][boundary=administrative][admin_level~"^[2-9]$"] -> .a;
    out center;
    convert way ::=::,
              ::id = id(),
              is_in=a.set("{" + t[admin_level] + ":" + t[name] + "}");
    out body;

This does not process relations correctly yet though.


Simply visit http://overpass-turbo.eu/, open "Wizard", type in

landuse=cemetery in Carinthia

into the field and press execute. A query will be built to search for nodes, ways and relations.

This link should work for you.

| improve this answer | |
  • 1
    Thanks for the answer zehpunktbarron, but that’s not the part I’m struggling with ; indeed this query I linked in my original post is very similar to yours. What I’m struggling with is, in the same query, attaching to each each cemetery the administrative unit it is in. I’ll try to edit my question to clarify that. – JeanFred Jul 25 '17 at 8:18
  • 1
    I previously answered this question here: gis.stackexchange.com/a/238209/37540 – mmd Jul 25 '17 at 8:46
  • @mmd Indeed, I had just discovered that question and have been trying to adapt it as well :) (since your answer does not include relations there is a bit of adaptation to do :-) I’ll post my final query as a comment if/when I’m done. – JeanFred Jul 25 '17 at 9:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.