Help with Osmosis osm conversion

Started by CaLocus, September 07, 2011, 07:15:38

0 Members and 2 Guests are viewing this topic.

CaLocus

Does anyone know how to correct the "SEVERE" errors pasted below that I get when I try to run "osmosis -v --rx file=C:OpenStreetMapMapstest.osm --mapfile-writer file=C:OpenStreetMapMapstest.osm.map" ?
 

    FINE: Waiting for task 1-rx to complete.
    Sep 6, 2011 4:51:01 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTask
    Manager waitForCompletion
    SEVERE: Thread for task 1-rx failed
    java.lang.NullPointerException
            at org.mapsforge.preprocessing.map.osmosis.MapFileWriterTask.release(Map
    FileWriterTask.java:192)
            at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:125)
            at java.lang.Thread.run(Unknown Source)
    Sep 6, 2011 4:51:01 PM org.openstreetmap.osmosis.core.pipeline.common.PassiveTas
    kManager waitForCompletion
    FINE: Task 2-mapfile-writer is passive, no completion wait required.
    Sep 6, 2011 4:51:01 PM org.openstreetmap.osmosis.core.Osmosis main
    SEVERE: Execution aborted.
    org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed
    .
  •  

ymerejo42

#1
I hit the same error, you need to convert your .osm (xml format) file to a .osm.pbf (binary format) file first. Here's the command to do it, assuming your .osm file is named "map.osm".

osmosis --rx map.osm --wb map.osm.pbf
Once you've done that, I think it should work. I'm converting a map of West Virginia right now, I'll let you know when it's done if it worked.
  •  

ymerejo42

#2
Well, I got it converted to the .pbf format, but I can't get the mapwriter plugin to work. It's giving me a different set of errors than you are getting, I'll have to work on it when I get back home later tonight.
  •  

CaLocus

#3
I have also tried pbf files and get different errors.  Now it is tells me I have to use bbox.  When I use bbox definition (e.g. "--mapfile-writer file=<pathfile-name> bbox= minLat,minLon,maxLat,maxLon" ,  I get the "SEVERE" error "Bound element must come before any entities."
  •  

kaare

#4
I also had difficulties using osmosis with pbf maps, and found a way around the problem using the type=hd parameter (instead of default ram) of the mapfile-writer plugin. The full command becomes
osmosis --rb file=input.pbf --mw file=output.map type=hd
  •