[OSM-talk] Osmosis error with multiple bouding boxes

Brett Henderson brett at bretth.com
Thu Oct 25 11:19:47 BST 2007


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
>   





More information about the talk mailing list