Apply a change to .osm file problem

View: New views
3 Messages — Rating Filter:   Alert me  

Apply a change to .osm file problem

by Vladislav Shikhov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all.

I tried to apply a change to .osm file (not a planet but russia only)
and got an axception:

./osmosis-0.31/bin/osmosis -v --read-xml file="rf.osm"
--read-xml-change-0.6 file="20091031-20091101.osc" --write-xml
file="new-rf.osm"
Nov 8, 2009 2:12:18 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.31
Nov 8, 2009 2:12:19 PM org.openstreetmap.osmosis.core.TaskRegistrar
loadJPFPlugins
FINE: Searching for JPF plugins.
Nov 8, 2009 2:12:19 PM org.openstreetmap.osmosis.core.TaskRegistrar
loadJPFPlugins
FINE: Registering the core plugin.
Nov 8, 2009 2:12:19 PM org.openstreetmap.osmosis.core.TaskRegistrar
loadJPFPlugins
FINE: Registering the extension plugins.
Nov 8, 2009 2:12:19 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Nov 8, 2009 2:12:19 PM
org.openstreetmap.osmosis.core.pipeline.common.Pipeline prepare
FINE: Building tasks.
Nov 8, 2009 2:12:19 PM
org.openstreetmap.osmosis.core.pipeline.common.Pipeline buildTasks
FINE: Created task "1-read-xml"
Nov 8, 2009 2:12:19 PM
org.openstreetmap.osmosis.core.pipeline.common.Pipeline buildTasks
FINE: Created task "2-read-xml-change-0.6"
Nov 8, 2009 2:12:19 PM
org.openstreetmap.osmosis.core.pipeline.common.Pipeline buildTasks
FINE: Created task "3-write-xml"
Nov 8, 2009 2:12:19 PM
org.openstreetmap.osmosis.core.pipeline.common.Pipeline prepare
FINE: Connecting tasks.
Nov 8, 2009 2:12:19 PM
org.openstreetmap.osmosis.core.pipeline.common.PipeTasks putTask
FINE: Task "1-read-xml" produced unnamed pipe stored at level 1 in the
default pipe stack.
Nov 8, 2009 2:12:19 PM
org.openstreetmap.osmosis.core.pipeline.common.Pipeline connectTasks
FINE: Connected task "1-read-xml"
Nov 8, 2009 2:12:19 PM
org.openstreetmap.osmosis.core.pipeline.common.PipeTasks putTask
FINE: Task "2-read-xml-change-0.6" produced unnamed pipe stored at
level 2 in the default pipe stack.
Nov 8, 2009 2:12:19 PM
org.openstreetmap.osmosis.core.pipeline.common.Pipeline connectTasks
FINE: Connected task "2-read-xml-change-0.6"
Nov 8, 2009 2:12:19 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task
3-write-xml does not support data provided by default pipe stored at
level 2 in the default pipe stack.
        at org.openstreetmap.osmosis.core.pipeline.common.PipeTasks.retrieveTask(PipeTasks.java:157)
        at org.openstreetmap.osmosis.core.pipeline.common.TaskManager.getInputTask(TaskManager.java:165)
        at org.openstreetmap.osmosis.core.pipeline.v0_6.SinkManager.connect(SinkManager.java:50)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.connectTasks(Pipeline.java:74)
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:116)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:79)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)

./osmosis-0.31/bin/osmosis -v --read-xml file="rf.osm" --write-xml
file="new-rf.osm" works fine.
What's wrong? Can anybody help me?

_______________________________________________
dev mailing list
dev@...
http://lists.openstreetmap.org/listinfo/dev

Re: Apply a change to .osm file problem

by Lennard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Vladislav Shikhov wrote:

> I tried to apply a change to .osm file (not a planet but russia only)
> and got an axception:
>
> ./osmosis-0.31/bin/osmosis -v --read-xml file="rf.osm"
> --read-xml-change-0.6 file="20091031-20091101.osc" --write-xml
> file="new-rf.osm"

You forgot --apply-change, and osmosis expects to read the changefile first:

osmosis -v --rxc 20091031-20091101.osc --rx rf.osm --ac --wx new-rf.osm

--
Lennard

_______________________________________________
dev mailing list
dev@...
http://lists.openstreetmap.org/listinfo/dev

Parent Message unknown Re: Apply a change to .osm file problem

by Lennard-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Vladislav Shikhov wrote:
> Lot of thanx. :)

Keep in mind that after this diff has applied, you will then have
objects outside of Russia in your new-rf.osm. If you do not want that,
you need another task (--bounding-polygon):

osmosis -v --rxc 20091031-20091101.osc --rx rf.osm --ac --bp file=<your
russia polygon.poly> --wx new-rf.osm

Or, in case rf.osm was created with a simple bbox, the appropriate
--bounding-box task.


--
Lennard

_______________________________________________
dev mailing list
dev@...
http://lists.openstreetmap.org/listinfo/dev