[OSM-talk] Osmosis error with multiple bouding boxes

Lambertus osm at na1400.info
Thu Oct 25 11:57:03 BST 2007


Thanks for answering so quickly. I have had some advice on the IRC from TomH 
and Bobkare and others to use the tee utility with an adapted version of the 
planetosm-excerpt-area.pl script (that can handle stdin data). So far that 
seems to work alright (haven't seen the actual results yet though) but it 
looks promising. However, let that not stop you from implementing the tee 
functionality in Osmosis, because that would e.g. allow Windows users to 
have the same functionality. I might also change back to Osmosis when 
tee-ing is possible.

If you implement the tee functionality please allow for an 'unlimited' 
number of consumers as in my current setup I need already 150+ and that 
number can easilly grow :)

----- Original Message ----- 
From: "Brett Henderson" <brett at bretth.com>
To: "OSM Talk" <talk at openstreetmap.org>
Sent: Thursday, October 25, 2007 12:19
Subject: Re: [OSM-talk] Osmosis error with multiple bouding boxes


The pipe connection documentation is a little vague.  It doesn't quite
work that way.  Once a task reads a pipe, the pipe is consumed, multiple
tasks can't read the same pipe.

What you need is a new "tee" task that will allow you to send data to
two destination tasks.  Won't take much effort to write, just hasn't
been needed yet :-)  I'll try to knock it up over the next few hours.

Lambertus wrote:
> The way I want to use Osmosis is to read the planet file once and pipe the
> output to different outputs (bounding boxes) which write their outcome to
> separate files. In my understanding of the wiki page this should be 
> possible
> with e.g. the following command (where two bounding boxes are given):
>
> ~/jre/bin/java -jar utils/osmosis/osmosis.jar --read-xml
> file="planet-latest.osm" outPipe.0="planet" --bounding-box 
> inPipe.0="planet"
> left=3.25 bottom=50.75 top=51 right=3.5 outPipe.0="63240001" --write-xml
> inPipe="63240001" file="planet/63240001.osm" --bounding-box
> inPipe.0="planet" left=3.25 bottom=51 top=51.25 right=3.5
> outPipe.0="63240002" --write-xml inPipe="63240002"
> file="planet/63240002.osm"
>
> I hope to get two files from this (planet/63240001.osm and
> planet/63240002.osm) but instead I get the following error:
>
> Oct 25, 2007 11:40:48 AM com.bretth.osmosis.core.Osmosis main
> INFO: Osmosis Version 0.20
> Oct 25, 2007 11:40:48 AM com.bretth.osmosis.core.Osmosis main
> INFO: Preparing pipeline.
> Oct 25, 2007 11:40:48 AM com.bretth.osmosis.core.Osmosis main
> SEVERE: Main thread aborted.
> com.bretth.osmosis.core.OsmosisRuntimeException: No pipe named planet is
> available as input for task 4-bounding-box.
>         at
> com.bretth.osmosis.core.pipeline.common.PipeTasks.retrieveTask(PipeTasks.java:100)
>         at
> com.bretth.osmosis.core.pipeline.common.TaskManager.getInputTask(TaskManager.java:161)
>         at
> com.bretth.osmosis.core.pipeline.v0_5.SinkSourceManager.connect(SinkSourceManager.java:50)
>         at
> com.bretth.osmosis.core.pipeline.common.Pipeline.connectTasks(Pipeline.java:73)
>         at
> com.bretth.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:111)
>         at com.bretth.osmosis.core.Osmosis.main(Osmosis.java:48)
>
> When I provide only a single bounding box Osmosis produces the correct
> output file but, as said, failes when providing more.
>
> How can this be solved? Any ideas?
>
>
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>


_______________________________________________
talk mailing list
talk at openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk






More information about the talk mailing list