[OSM-dev] Extracting just national boundaries

marqqs at gmx.eu marqqs at gmx.eu
Fri Aug 5 14:24:20 BST 2011


Hi Curt,

> But as far as I understand, those
> relations will have other relations as their members. If these other
> relations do *not* have the above mentioned tags, they will *not* be in the
> output file (but they should).

Unfortunately, because of my lack in experience I cannot speak for Osmosis/Osmembrane. Igor or Frederik will certainly help.

Using osmfilter, members of members of members (and so on, up to 12 hierarchy layers) will be included too. I would expect Osmosis behaving the same way. Hence, don't worry, just try it. :-)

Markus

-------- Original-Nachricht --------
> Datum: Fri, 5 Aug 2011 08:57:53 +0200
> Von: Curt Nowak <nowak at bwl.uni-hildesheim.de>
> An: "\'marqqs at gmx.eu\'" <marqqs at gmx.eu>, "\'igor.podolskiy at vwi-stuttgart.de\'" <igor.podolskiy at vwi-stuttgart.de>
> CC: "\'dev at openstreetmap.org\'" <dev at openstreetmap.org>
> Betreff: AW: [OSM-dev] Extracting just national boundaries

> Maybe I'm (still) doing it wrong: On second thought neither solution seems
> to work because both suggest to only keep relations with
> "boundary=administrative" and "admin_level=2 (or 3)" tags. But as far as I understand, those
> relations will have other relations as their members. If these other
> relations do *not* have the above mentioned tags, they will *not* be in the
> output file (but they should).
> 
> Obviously, the --used-node and --used-way approach is not enough here. I'd
> rather need something like "--used-reference" with some sort of parameter
> "master_realtion_id=XY".
> 
> Any ideas?
> 
> Curt
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: marqqs at gmx.eu [mailto:marqqs at gmx.eu]
> Gesendet: Donnerstag, 4. August 2011 19:34
> An: Curt Nowak; igor.podolskiy at vwi-stuttgart.de
> Cc: dev at openstreetmap.org
> Betreff: Re: [OSM-dev] Extracting just national boundaries
> 
> 
> Should work, yes. I too would suggest using Osmembrane for complex tasks
> like this.
> 
> If you want to try an alternative way (example):
> 
> ./osmconvert bayern.osm.pbf --out-o5m >bayern.o5m
> 
> ./osmfilter bayern.o5m --keep="all boundary=administrative admin_level=2
> =3" >borders.osm
> 
> Works fine too.
> 
> Markus
> 
> 
> -------- Original-Nachricht --------
> > Datum: Thu, 4 Aug 2011 11:02:01 +0200
> > Von: Curt Nowak <nowak at bwl.uni-hildesheim.de>
> > An: \'Igor Podolskiy\' <igor.podolskiy at vwi-stuttgart.de>
> > CC: "\'dev at openstreetmap.org\'" <dev at openstreetmap.org>
> > Betreff: Re: [OSM-dev] Extracting just national boundaries
> 
> > Thanks for the fast pointer.
> > Looks like that should do.
> >
> > Curt
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Igor Podolskiy [mailto:igor.podolskiy at vwi-stuttgart.de]
> > Gesendet: Donnerstag, 4. August 2011 10:32
> > An: Curt Nowak
> > Cc: 'dev at openstreetmap.org'
> > Betreff: Re: [OSM-dev] Extracting just national boundaries
> >
> >
> > Hi Curt,
> >
> > > is there an easy way to extract only national boundaries from an
> > > osm/pbf file? Running osmosis with "--tag-filter accept-relation
> > > boundary=administrative" and then
> > > "--tag-filter accept-relation admin_level=2"
> > > won't work because this will filter away members of "admin_level=2"
> > > relations that are in turn different relations.
> > luckily, you're not the first one with this problem. Here's the
> > answer:
> >
> > http://lists.openstreetmap.org/pipermail/dev/2011-April/022394.html
> >
> > and the followup:
> > http://lists.openstreetmap.org/pipermail/dev/2011-April/022397.html
> >
> > Hope that helps
> > Igor
> >
> > _______________________________________________
> > dev mailing list
> > dev at openstreetmap.org http://lists.openstreetmap.org/listinfo/dev




More information about the dev mailing list