2

I have Ubuntu 14.10. I've installed osmosis from apt. I downloaded mapfile-writer from here

http://repo.typesafe.com/typesafe/simple/sonatype-snapshots-cache/org/mapsforge/mapsforge-map-writer/0.4.0-SNAPSHOT/mapsforge-map-writer-0.4.0-20140127.161606-1.jar

I put mapwriter to /usr/bin and /home/.openstreetmap/osmosis/plugins (just in case)

But when I run following command I get an error

/usr/bin/osmosis --read-xml file=UA.osm  --mapfile-writer file=dnipropetrovsk.map bbox=47.45,32.94,49.19,36.94 type=hd

:

SEVERE: Execution aborted. org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task type mapfile-writer doesn't exist.
    at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactoryRegister.getInstance(TaskManagerFactoryRegister.java:60)
    at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pipeline.java:50)
    at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:112)
    at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:86)
    at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:328)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
  • Does stackoverflow.com/questions/10684179/… help? – BradHards Jan 22 '15 at 1:24
  • No. Because In my system there is no $OSMOSIS_HOME variable. – algot Feb 11 '15 at 13:23
  • There is an implicit OSMOSIS_HOME, depending on how it got installed. I don't know which repo you used, but there could be a osmosis-plugins.conf somewhere already. In any case, the osmosis config is somewhere on your system. – BradHards Feb 11 '15 at 19:55
  • I have installed osmosis by apt. ~$ apt-cache show osmosis Package:osmosis Depends: default-jre-headless|java6-runtime-headless, libcommons-codec-java, libcommons-compress-java (>= 1.4.1), libcommons-dbcp-java, libjpf-java, libmysql-java, libnetty-java, libpostgis-java, libpostgresql-jdbc-java, libspring-beans-java, libspring-context-java, libspring-core-java, libspring-jdbc-java, libspring-transaction-java, libplexus-classworlds-java, libprotobuf-java, libosmpbf-java, libbatik-java, libcommons-pool-java, libxerces2-java, libxz-java Filename: pool/universe/o/osmosis/osmosis_0.43.1-1_all.deb – algot Feb 11 '15 at 21:59
  • And I can't find any osmosis-plugins.conf file in my system. Looks like standard installation of osmosis doesn't have such conf file. – algot Feb 11 '15 at 22:02
1

With regards to your own comment:

as written here, you have to create the $OSMOSIS_HOME/config/osmosis-plugins.conf if necessary.

  • I wanted to create it but I don't have $OSMOSIS_HOME after installing osmosis by apt. Should I reinstall osmosis manually without using apt? – algot Mar 27 '15 at 11:47
  • 1
    You have to manually set $OSMOSIS_HOME as a Linux variable, as described here: stackoverflow.com/questions/234742/… . In my installation, the value (path of osmosis) is /opt/osmosis-0.43 . – philburns Apr 1 '15 at 6:41
0

sudo dpkg -L osmosis will show you all the files and folder changed by the package installer. See if there is a .conf file created which will be your configuration file and see if there if a folder with lots of .jar files which will be your plugin directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.