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

I have downloaded it, unzipped it and downloaded and installed the required Java platform but when I click on the file "mkgmap", an executable jar file, nothing happens.

Can someone tell what I am doing wrong?

asked 14 Dec '10, 21:50

discus277's gravatar image

discus277
299131522
accept rate: 0%


Mkgmap is a command line program, and doesn't need installing as such. You just have to unzip it, then use Java to run it. Exactly how to do this will depend on what operating system you are using. Something like this from a command line will probably work (running it from the folder you unzipped Mkgmap into):

java -jar  mkgmap.jar

This command won't actually do anything, except output details of how to use Mkgmap. To actually generate a Garmin map, you will have to specify an input file, and probably some other options, depending on what you want to do. eg something like this will generate a map, with routing enabled, and a tdb file for Mapsource:

java -ea -jar mkgmap.jar --tdbfile --route data.osm

There is more details of how to use Mkgmap, and all of the available options, on the Mkgmap wiki page.

permanent link

answered 14 Dec '10, 22:11

Vclaw's gravatar image

Vclaw
9.2k895141
accept rate: 22%

As an example I'll describe what I do - hope it helps! This is on a Windows 7 PC and the paths to things not in the local directory will obviously be different in your case.

(if you haven't already) you'll need to download OSM data for the area that you're interested in. That will typically be as a .osm.bz2 file or a .pbf file. The ".osm" file format is XML (text based) and files in that format are large; with a .osm.bz2 download you'd unzip it with "bunzip2" (which if you haven't already installed you'll need to). The .pbf file format is a binary version of the same data and takes up less space than .osm. Newer versions only (since some time last year) of the mkgmap tools support .pbf format.

In my case (I'm interested in Great Britain) I download great_britain.osm.bz2 from Geofabrik here: http://download.geofabrik.de/osm/europe/ I notice that there are some .pbfs available there for the US that might be suitable for you; also have a look on Cloudmade's site.

I'll then run "splitter" on it. If you haven't got that already it's available from the same place as mkgmap. This is run from the same directory as the (bunzipped) great_britain.osm:

java -Xmx2000m -jar c:\\Doc\\eclipse\\workspace_lenovo\\splitter\\dist\\splitter.jar great_britain.osm --max-nodes=800000

The "2000m" above is the amount of memory to allocate. I find that that vaue works on a Windows machine with 4Gb RAM; you might want to try a smaller number. The next argument is just the full path to "splitter.jar". The max-nodes setting is half the default; I found that I had to use that (to create twice as many tiles as would otherwise be needed) for routing to work.

"splitter" creates lots of .osm.gz files (44 in my case). The next thing that I do is run mkgmap:

java -Xmx2000M -jar c:/Doc/eclipse/workspace_lenovo/mkgmap/dist/mkgmap.jar --style-file=C:\\Users\\SomeoneElse\\Downloads\\mkgmap-r1733\\resources\\styles\\default  --remove-short-arcs --levels="0=24, 1=22, 2=21, 3=19, 4=18, 5=16" --location-autofill=3 --route --gmapsupp *.osm.gz

The style file is part of the mkgmap download. I'd just use the default style to start with. The other arguments are ones that work for me. The final one "*.osm.gz" assumes that there aren't any other .osm.gz files in the current directory other than the ones that splitter has created. The "gmapsupp" argument says "please create a big file made up of all the small ones so I can put it straight on my GPS without messing about".

That creates lots of numbered .img files and these three important ones: gmapsupp.img (the actual map, large) and osmmap.tdb and osmmap.img (the map overview file, small)

Plug the Garmin into your PC and on the garmin go into setup, Interface, and select USB Mass Storage. Copy these three files to the "Garmin" directory on there (which should be visible on your PC). When copied disconnect and press the Garmin "off" button, that'll restart it not in mass storage mode and you should be able to see your new maps.

permanent link

answered 25 Jan '11, 15:11

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 29 Aug '12, 13:01

I typed "java -jar mkgmap.jar" in the command line, while being in the mkgmap-folder (Windows command prompt), and I get the typical 'mkgmao is not recognized (etc)" answer. What am I doing wrong? Where should the commands be typed in, which command line?

permanent link

answered 15 Apr '13, 15:06

MichelBruggeman's gravatar image

MichelBruggeman
111
accept rate: 0%

edited 15 Apr '13, 15:43

Richard's gravatar image

Richard ♦
30.9k44279412

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×535
×309
×275

question asked: 14 Dec '10, 21:50

question was seen: 27,451 times

last updated: 15 Apr '13, 15:43

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