[OSM-talk] Osmosis question

Karl Newman siliconfiend at gmail.com
Sat Jan 5 22:57:41 GMT 2008


On Jan 5, 2008 12:08 PM, Stefan Baebler <stefan at baebler.net> wrote:
> You need to use --tee option to split the input into several pipes.
> See the first example on
> http://wiki.openstreetmap.org/index.php/Osmosis/Examples
>
> good luck,
> Stefan
>
>
> Jeremy Adams wrote:
> > The syntax is wrong on the command below.  I meant something like this:
> >
> > osmosis --read-xml file="planet-latest.osm" Outpipe.0="mypipe" --bounding-
> > polygon file="united_states2pts.txt" Inpipe.0="mypipe" --write-xml
> > file="usa.osm" --bounding-polygon file="new_york2pts.txt" Inpipe.0="mypipe" --
> > write-xml file="newyork.osm"
> >
> > -Jeremy
> >
> > Original Message -----------------------
> > It is possible to read in the planet file and process multiple bounding polygons into multiple files with osmosis?
> >
> > As an example, say I wanted to extract data from the latest planet for the entire united states as well as several states.  Do I have to run osmosis for each file I want to create, or can it do one run through the planet while dumping the appropriate data into each file?
> >
> > Something like this maybe?
> >
> > osmosis --read-xml file="planet-latest.osm" Outpipe.0="mypipe" --bounding-polygon file="united_states2pts.txt" Inpipe.0="mypipe" --write-xml file="usa.osm" --bounding-polygon file="new_york2pts.txt" file="newyork.osm" Inpipe.0="mypipe"
> >
> > and so on for each area I want exported.

Use caution if you are trying to use the completeWays option. It's not
a good mix with the "tee" command right now because it makes temporary
files which store the entire dataset. It will do this once for each
"tee", so it could quickly chew up your disk space. Brett is working
on some changes which  will make this type of operation more practical
and only require one data set copy.




More information about the talk mailing list