osm combiner error


I would like to combine several tiles of maps but i always recieve the following error when i push on start to become to entire map. Could somebody tell me what i’m doing not correct.

Time started: Wed Apr 01 22:51:21 CEST 2015
Exception in thread “main” java.lang.IndexOutOfBoundsException: Index: 12416, Size: 1714
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:413)
at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.(LBLFileReader.java:74)
at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326)
at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313)
at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259)
at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152)
at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:525)
at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128)
at uk.me.parabola.mkgmap.main.Main.main(Main.java:119)
Er is een fout opgetreden. Controleer onderstaande log.


Your error message includes “mkgmap” so presumably you’re asking about creating maps for Garmin handhelds. I’d ask over in the forum for that http://forum.openstreetmap.org/viewforum.php?id=26 , but I’d also try adding a bit more information - what exactly (full command lines) are you doing before the error occurs?

Which mapsets are your trying to combine exactly?
It needs to be from the same date from garmin.openstreetmap.nl otherwise you would get problems when those mapsets are compiled with different versions of mkgmap, different planet extracts etc. Also you need plenty of memory to do this with big mapsets.

Hmm, same error here. Just downloaded 4 MAPS from garmin.openstreetmap.org: Netherlands, Germany, Belgium and Luxembourg. Downloaded all maps in parallel, so definitely the same date, unless of course maps on the server are not aligned…

Ok, thanks for reporting, maybe the mkgmap version of the maps are not compatible anymore with the mkgmap version that is provided with osm combiner. Osm combiner is not longer maintained by Javawa so we have to find another way to fix this. You can try to download a more recent mkgmap.jar from mkgmap to see if the problem is fixed, http://www.mkgmap.org.uk/download/mkgmap.html.

Just tested two mapsets (Belgium and Luxemburg, osm_generic_new_tiles.zip) and no errors occur.
Did you combine the tiles.zip files? Which map (generic, generic new or openfietsmap?).

I downloaded and tried to combine the IMG-files. I’ll try with the tiles. I’ll also try your other suggestion (downloading the newer version of mkgmap).

Thanks for your support.

btw: If OSM combiner is not maintained/supported anymore, do you have any other suggestions for merging maps?

You can’t use the custom map selection of garmin.openstreetmap.nl for a bigger area?

Tried the tiles.zip, instead of downloading the img’s. Didn’t work (same error). Updated the mkgmap in OSM by simply replacing the jar, that seems to have solved the issue. I have a merged IMG now. Will check this weekend if it actually works, but at least I got no errors or warnings.

Btw: Yes, I can use the map selection feature of garmin.osm, but: it’s easier to just download the countries I want, instead of selecting an area on the map (it’s fidly and I’m bound to be missing some border piece or another of a country whenever I’m in that country). Also, downloading pre-compiled maps lessens the load on the OSM servers. But I have tested it, and it does work, so it’s a viable alternative.

Would be great if garmin.osm also had other precompiled mapsets, for example for full europe, west-europe and east-europe.

Thanks again for your help.

Thanks for testing whoolwerf, I’ll ask Javawa if he could update the osm combiner tool with a recent mkgmap version.
If anyone else is willling to help updating and compiling the source file, it can be found here:

@kh53 and whoolwerf
I uploaded a new version of OSM Combiner (thanks Javawa!)

Please test it and report your findings here.

downloaded and installed the new version (fully uninstalled the old version first, to be sure) and it works just fine now.

It seems the current version of OSM Combiner (1.7) cannot deal with the latest generated img’s anymore.
If the combining tool fails, please update the mkgmap version in the install directory with mkgmap-r3650 or later (http://www.mkgmap.org.uk/download/mkgmap.html).

A new version is on its way to ligfietser…

Thanks Javawa! The latest version 1.8 is available for download now.

Unfortunately the new OSM Combiner 1.8 did not solve the problem for me.
I dowloaded a fresh set of osm_generic_tiles.zip files for the Netherlands, Belgium and France and tried to combine them with OSM combiner 1.8 but consistently get an error message (see below). All steps up to “Start” work, the final step fails and gives the error message.
I use MacOS 10.11.3 with the latest Java installed and allocated 5gb of memory to Java, disk space is plenty.

What am I doing wrong?

Thank you!

— Error message:

Exception in thread “main” java.lang.UnsupportedClassVersionError: uk/me/parabola/mkgmap/main/Main : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Er is een fout opgetreden. Controleer onderstaande log.

Thanks for reporting Eenzame, maybe OSM Combiner has an out-of-date version of mkgmap and needs an upgrade, I’ll check it out.

Eenzame Fietser, which version of Java are you using?
Please note that Java 6 or lower is not supported anymore.

I just installed Java 8. But what I did find out in the mean time is that the MacOS keeps loading version 6 as well. Probably that is not what OSM Combiner likes.
Problem is that I still need Java 6 for Photoshop to function (really? yes, really! Adobe and Apple are not good friends I guess). But even aside from that, I could not get Java 6 removed. Thursday I have a day off and will experiment some more. Unless someone here has a better understanding of what is going on.
I’ll keep you posted.

Apparently installing Java 8 on a Mac that has Java 6 installed does not automatically replace 6 with 8.
The solution is to open terminal and run:
export PATH=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin:$PATH

Then log out and back in. OSM Combiner is then directed to use Java 8. And the good thing is that Photoshop runs simultaneously using Java 6, no need to switch back to Java 6 manually.
NOTE: If you need Java 6 on a Mac, please make sure you use the Java 6 from the Apple site. I understand that that is a version of Java with all internet connection possibilities disabled for security reasons, making it perfectly safe to use.

Happy mapmaking!