Extracting administrative boundary within an area

Hello,

I'm willing to extract administrative boundaries from level 1 to level 11 within a country using Overpass API. I'm using Overpass area object to filter the search. I need help to understand why this query (https://overpass-turbo.eu/s/1HwX) is retrieving the administrative boundary level 2 of Italy and Netherlands while I was expecting to only get the one for France.

asked 19 Feb, 09:34

picote's gravatar image

picote
11112
accept rate: 0%


First, to answer your query - you were getting caught up in duplication:

rel[admin_level=2][name=France];
out geom;

This returns all of France's territories. You may wish to use this relation: https://www.openstreetmap.org/relation/1403916#map=5/44.980/5.537

As you eventually want to return all admin_levels, I recommend downloading from https://osm-boundaries.com/ as direct calls would heavily burden the Overpass server.

permanent link

answered 19 Feb, 12:37

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

Thanks for your answer and for redirecting me to the right tool. By reading more carefuly the documentation (https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#Administrative_boundary_in_case_of_disputes), I now understand that administrative boundaries may overlap due to conflict or agreement to administer area together.

(19 Feb, 23:14) picote