1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
Making maps for Garmin GPS units
================================
The goal of the project is to take the map data from
OpenStreetMap <http://www.openstreetmap.org>
and to generate a map in the Garmin .img file format so
that it can be loaded onto GPS units.
The original motivation was to help plan mapping sessions, but now the
maps are becoming useful in their own right.
Using
=====
This program requires Java 1.5 or above to run.
Producing a map is simple. Save OpenStreetMap data from JOSM
or by any other method to a file and copy it to the mkgmap
directory. In the following examples this file is called data.osm.
Run the command:
java -jar mkgmap.jar data.osm
This will produce a file called 63240001.img.
You can copy the map to your Garmin GPS unit in any way you know how. On my
Legend Cx connected to a Linux system I put the unit into USB mass storage
mode, mount the filesystem on the memory card, and copy the map to
Garmin/gmapsupp.img Note that this will replace any other map you have on
there. Another way would be to use a USB memory card writer.
Another convenient way is to use the sendmap program.
You should (depending on the particular Garmin model) see a OSM copyright message
on starting up, and the map name 'OSM Street map' should appear
in the map setup section.
For more help see: http://wiki.openstreetmap.org/index.php/Mkgmap/help
Options
-------
Most of the default names mentioned in the previous section can be altered
by suitable options. Example:
java -jar mkgmap.jar --mapname=11225502 --charset=latin1 data.osm
-n <name>
--mapname=<name>
This option is followed by the name of the map. This must be an
eight digit number. The default if this option is ommited is 63240001
for no particularly good reason. The name is used inside the map
it isn't enough to just rename the file.
--description=<text>
Set the description of the map that is stored inside the map itself. By
default it is 'OSM Street map'
--map-features=file
Supply another map features file. See http://wiki.openstreetmap.org/index.php/Mkgmap/help/custom
--levels=<levels>
Set the levels within the map. See http://wiki.openstreetmap.org/index.php/Mkgmap/help/custom
--charset={latin1|ascii|simple8}
Sets the encoding for the labels.
--latin1
Same as --charset=latin1
--input-file=<file>
This is another way of specifying an osm file to process.
Processing more than one file at a time
---------------------------------------
It is usual to split Garmin maps up into smaller tiles. This is because
older GPS units (before large SD cards were cheap) had a limited amount of memory
for maps, and secondly because there are limits within the map format
itself.
You can give more than one .osm file on the command line at a time and they
will each be converted to a separate garmin map tile. There will also
be two other files created: 1) a file ending in .tdb and an overview .img
map.
Acknowledgements
================
This project is almost entirely based on the file format specification
document written by John Mechalas at the SourceForge project at
http://sourceforge.net/projects/garmin-img. The 'imgdecode' program
from the same source was also very important in checking that I was
on the right lines to producing a good file. Thanks.
Steve <sr at parabola me uk>
|