NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm looking for a way or tool to get a list of all type=boundary, boundary=administrative relations and their hierarchical structure (relation A has children B and C and B has children D and E and so on...). So something like: all boroughs of Berlin, Germany and all localities of all the boroughs of Berlin, Germany (Wikipedia).

Basically, I only need the osm_ids.

I tried using the Overpass API (https://overpass-turbo.eu/s/1aVA) but unfortunately it's very slow and I only get the immediate children. Now I could make a request for each of the children and get their children etc, but it takes forever.

Is there any good tool or way to achieve this? I'm sure I'm not the first to need the hierarchical structure of relations.

asked 06 Sep '21, 15:46

foodev's gravatar image

foodev
11112
accept rate: 0%


Have a look at OSM Boundaries. I haven't used it myself do download data but it seems to provide what you are looking for.

permanent link

answered 06 Sep '21, 20:07

TZorn's gravatar image

TZorn
12.3k764225
accept rate: 15%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×236
×83
×14

question asked: 06 Sep '21, 15:46

question was seen: 1,043 times

last updated: 06 Sep '21, 20:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum