Problems with creating map files from *.osm.pbf

246 views
Skip to first unread message

Stephan

unread,
Dec 28, 2012, 4:33:21 AM12/28/12
to mapsfo...@googlegroups.com
Good morning everybody,

I used to generate maps for my Garmin device and *.map-files for quite a while now. I worked pretty good until I tried to update my mapfile-writer to generate v0.3 maps. To make a long story short: Generating maps for my Garmin still works, but I cannot generate the *.map files any more. As I tried a lot of things which I found in the web within my osmosis directory I deleted it and started from scratch.

Here is the situation as of now:

  • Java 7 is installed on my PC, which runs on Windows 7, 32bit
  • I downloaded osmosis v0.41 and extracted the files to d:\map
  • I created a folder "plugins" in d:\map and copied "mapsforge-map-writer-0.3.0-jar-with-dependencies.jar" into that folder
  • I created a folder "tmp" in d:\map and copied my example.osm.pbf into that folder. This file war created by downloading a pbf-file from the geofabrik and extracting the area, which I'm interested in. I used this to create a map for my Garmin device. This works without problems.
  • I created a cmd-file (start.cmd) in d:\map which has the following command:
    bin\osmosis --rb file=tmp\example.osm.pbf --mapfile-writer file=tmp\example.map bbox=47.2,11.1,48.3,13.2 type=hd
    The size given in the bounding box is exactly the same which was used to extract the area to create the example.osm.pbf
  • I started my "start.cmd" within cmd.exe, but instead of creating my example.map, I receive the following output

Dez 28, 2012 10:27:37 AM org.openstreetmap.osmosis.core.Osmosis run
INFO
: Osmosis Version 0.41
Dez 28, 2012 10:27:37 AM org.java.plugin.registry.xml.ManifestParser <init>
INFO
: got SAX parser factory - org.apache.xerces.jaxp.SAXParserFactoryImpl@15ee9e3
Dez 28, 2012 10:27:37 AM org.java.plugin.registry.xml.PluginRegistryImpl configure
INFO
: configured, stopOnError=false, isValidating=true
Dez 28, 2012 10:27:37 AM org.java.plugin.registry.xml.PluginRegistryImpl register
INFO
: plug-in and fragment descriptors registered - 1
Dez 28, 2012 10:27:37 AM org.java.plugin.standard.StandardPluginManager activatePlugin
INFO
: plug-in started - org.openstreetmap.osmosis.core.plugin.Core@0.41.0
Dez 28, 2012 10:27:37 AM org.java.plugin.registry.xml.PluginRegistryImpl register
INFO
: plug-in and fragment descriptors registered - 1
Dez 28, 2012 10:27:37 AM org.java.plugin.standard.StandardPluginManager activatePlugin
INFO
: plug-in started - org.mapsforge.map.mapfile-writer@0.3.0
Dez 28, 2012 10:27:37 AM org.openstreetmap.osmosis.core.Osmosis run
INFO
: Preparing pipeline.
Dez 28, 2012 10:27:38 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFO
: mapfile-writer version: mapsforge-map-writer-0.3.0
Dez 28, 2012 10:27:38 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init>
INFO
: mapfile format specification version: 3
Dez 28, 2012 10:27:38 AM org.openstreetmap.osmosis.core.Osmosis run
INFO
: Launching pipeline execution.
Dez 28, 2012 10:27:38 AM org.openstreetmap.osmosis.core.Osmosis run
INFO
: Pipeline executing, waiting for completion.
Dez 28, 2012 10:27:38 AM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE
: Thread for task 1-rb failed
java
.lang.AbstractMethodError: org.mapsforge.map.writer.osmosis.MapFileWriterTask.initialize(Ljava/util/Map;)V
    at crosby
.binary.osmosis.OsmosisReader.run(OsmosisReader.java:43)
    at java
.lang.Thread.run(Unknown Source)

Dez 28, 2012 10:27:38 AM org.openstreetmap.osmosis.core.Osmosis main
SEVERE
: Execution aborted.
org
.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
    at org
.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
    at org
.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
    at org
.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java
.lang.reflect.Method.invoke(Unknown Source)
    at org
.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
    at org
.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
    at org
.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org
.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    at org
.codehaus.classworlds.Launcher.main(Launcher.java:47)


Any ideas what I did wrong here

Cheers,
Stephan

Ludwig

unread,
Dec 28, 2012, 4:36:04 AM12/28/12
to mapsfo...@googlegroups.com
This problem has been on this mailing list a few times, use osmosis 0.4.0 with the 0.3.0 writer or update the writer to the head revision if you need osmosis 0.4.1.


--
 
 

Stephan

unread,
Dec 28, 2012, 8:32:55 AM12/28/12
to mapsfo...@googlegroups.com
Hi, Ludwig,

worst thing that can happen: Searching the web for two days, posting a question and then get a reply "has been on the list for several times" … ;-)

Ok, I exchanged osmosis to 0.4.0 now. The error I get now is

Fehler: Hauptklasse org.codehaus.classworlds.Launcher konnte nicht gefunden oder geladen werden

It is a little surprising for me that this message is in German. I googled a little, but did not find something helpful

Stephan

Ludwig

unread,
Dec 28, 2012, 8:52:04 AM12/28/12
to mapsfo...@googlegroups.com
Not any good idea, apart from saying there is probably something wrong in your installation, could be java version, location of plugins etc, I guess the key error message is somewhere before the message you posted.



--
 
 

Reply all
Reply to author
Forward
0 new messages