NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum


i have to merge a lot of small *.osm files together.

The first try was to create a windows .bat file but the command line was longer than supported from windows.

Now i wrote 2 groovy scripts and call osmosis directly. Unfortunately it looks like it can't find/load plugins: org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task type fast-read-xml

There are the groovy files: merge.groovy String localDirectory = new File(getClass().protectionDomain.codeSource.location.path).parent String urlBase = "file:/" + localDirectory + "osmosis-0.39\lib\default\"; URL[] urls = [new URL(urlBase + "plexus-classworlds-2.2.2.jar")]; ClassLoader classLoader = new URLClassLoader(urls, getClass().getClassLoader()); GroovyShell myGroovyShell4Merge = new GroovyShell(classLoader, binding); processErrorStatus = myGroovyShell4Merge.evaluate(new File(localDirectory, "/innerMergeCall.groovy"))

innerMergeCall.groovy String localDirectory = new File(getClass().protectionDomain.codeSource.location.path).parent File dir = new File("tmp/osm_parts"); if(dir.isDirectory()) { List argsList = new ArrayList() String[] subFiles = dir.list() long count = 0; for(String fileStr : subFiles) { argsList.add("--fast-read-xml " + new File(dir, fileStr).canonicalPath) count++ } for(int ii = 1; ii < count; ii++) { argsList.add("--merge") } argsList.add("--wx " + new File(localDirectory, "tmp/osm/merged.osm")) String[] args = new String[argsList.size()] args = argsList.toArray(args) String myAppHome = new File(localDirectory, "osmosis-0.39").canonicalPath System.setProperty("app.home", myAppHome) System.setProperty("classworlds.conf", myAppHome + "/config/plexus.conf") org.codehaus.classworlds.Launcher.main(args) }

Does anyone have an idea what going wrong?

Yours RĂ¼diger

asked 14 Sep '11, 11:31

rgubler's gravatar image

accept rate: 0%

closed 14 Sep '11, 16:49

Pieren's gravatar image



This help website is not relevant for such software issues. Please contact the or mailing lists where you might have a better chance to get an answer.

(14 Sep '11, 16:52) Pieren

... or ask at

(15 Sep '11, 17:25) stephan75

The question has been closed for the following reason "Question is off-topic or not relevant" by Pieren 14 Sep '11, 16:49

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Sep '11, 11:31

question was seen: 2,126 times

last updated: 15 Sep '11, 17:25

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum