Activity Workshop
 

Mkgmap Gui

Mkgmap (see the wiki page) is a very useful and free command-line utility for making map files for GPS devices. It is discussed in the GPS section for two main functions - converting an Osm file into an Img file (described in the creating maps guide), and combining multiple Img files into one big Img file (described in the combining maps guide). There are lots of other things that mkgmap can do too, including complicated style files and other configuration options, but these two are the functions which I use most.

The tool works great, but it's command line only, so you have to remember the command line switches and if you can't remember them you have to look in the help file. And you can't make a simple shortcut to it because all the filenames have to go in the command. So what you see here on this page is just a front-end to mkgmap, it's just another way to call it. You still need to download a copy of mkgmap separately from this Gui program.

This frontend is based on java, so you'll need a java runtime (at least version 5) in order to run it.

Download

Jar file

Runnable code plus source code (36 kb)
mkgmapgui.jar - Complete Gui including source code (but not including mkgmap itself!)

Installing

There isn't any installation, you just need to download and save this jar file. But you do need to separately download and unpack the mkgmap code, which you can find at the wiki page. You need to extract the file mkgmap.jar and save that somewhere.

Running

You can start this gui from the command line, or you can make a shortcut to it. Note though that in order to run mkgmap properly you need to allocate a lot of memory to it, and because mkgmap gets called by this Gui, you need to allocate a lot of memory to this Gui too. Fortunately you can put this parameter in the shortcut to the Gui so that it becomes automatic. The command to start it looks like this:

java -Xmx512M -jar mkgmapgui.jar downloads/mkgmap

There are four parts to this command, as follows: Firstly you call java, because both this Gui and mkgmap itself use java. Next is the parameter -Xmx512M, which tries to allocate 512 MB of memory to the program. This is a lot, but it's needed by mkgmap to do all the conversions. If you don't do this you may (depending on the map size) get exceptions when the program runs out of memory. Thirdly you need the parameters -jar mkgmapgui.jar to reference where you stored this gui jar file. And lastly you can give the path to where you stored the mkgmap.jar file, as the gui needs to be able to find the main program. You can either give the file itself or the directory it's in. In this example the mkgmap.jar file has been saved in the directory downloads/mkgmap/ so this directory is the last parameter given.

Mkgmapgui screenshot

Screenshot from a Linux system showing the empty gui

Screenshot

This basic screenshot shows the gui and the two options - conversion on the left side and combination on the right side. It allows either a single osm file or a list of img files to be selected, and then the appropriate function to be started. The output file is also selected with a normal file dialog.

Alternative GUIs

Freegeographytools screenshot

Screenshot of freegeographytools gui

There's another partially implemented GUI for mkgmap from freegeographytools.com which allows you to just do the conversion step. However it's rather limited in its functionality, doesn't allow you to select the output file, or warn you of overwriting, or give any feedback whether the process is running or completed, and its resizing behaviour is very primitive. Plus it only runs on windows and is closed source. Still if you want more information it's at freegeographytools.com/2007/converting-openstreetmap-data-into-gpx-or-garmin-img-format.

There was another attempt to start a gui for mkgmap called "DoMyMaps", but according to the openstreetmap.org wiki the creator Lao has withdrawn it and suspended activity.