[OSM-dev] Extracting national boundaries

Colin Smale colin.smale at xs4all.nl
Mon Aug 30 11:33:51 BST 2010

  Pieren, you are right, it looks like I should be able to work with the 
data for France.

Specific countries (with the top level relations) that are definitely 
giving challenges right now are:
*    Slovakia (#14296)
*    Luxembourg (#28711)
*    Czech Republic (#51684)
*    Switzerland (#51701)
*    Lithuania (#72596)
*    Spain (#92863)

Current roadblock is that the country relation contains subrelations 
which contain subrelations. I dived a bit deeper into Spain. It has a 
top-level relation #92863 at admin_level=2 which includes relation 
#349042 (Basque Country) at admin_level=4. This contains a whole load of 
ways, plus some subrelations e.g. #349011 (Araba / Álava) which is at 
admin_level=6. This, in turn, contains many relations for individual 
towns such as #339581 (Kuartango) at admin_level=8 which thankfully only 
contains ways. So in order to build up the outer boundary of Spain, I 
have to query for the boundary of every single town in Spain, and then 
collect all the ways together and work out which ones are internal (not 
relevant to the outer border which is what I am trying to get to) 
including handling enclaves and exclaves. This nesting of administrative 
areas works OK for the area, as the area covered by a country is equal 
to the sum of the areas covered by its consituent parts, but it's a 
right PITA if you are trying to work with the boundaries as lines and 

Thanks again for any assistance!


On 30/08/2010 11:30, Pieren wrote:
> On Mon, Aug 30, 2010 at 11:05 AM, Colin Smale <colin.smale at xs4all.nl 
> <mailto:colin.smale at xs4all.nl>> wrote:
>     But France and Slovakia for example don't seem to have a single
>     relation as a starting point.
> There is the one for France (land_area):
> http://www.openstreetmap.org/browse/relation/11980
> It's a relation of relations otherwise the amount of ways is simply 
> too big to manage (it's the sum of all municipalities external 
> boundaries - shared with other countries or coastline).
> Pieren

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100830/799057d1/attachment.html>

More information about the dev mailing list