DIY garmin routable map from openstreetmap data into mapsource (win) and roadtrip (mac)

OSM Logo

As promised, here’s my follow-up how-to in making installers of OSM Garmin maps. My previous post outlines the process for making a routable map for Garmin GPS using mkgmap. For this post, I will guide you in how you can view the maps in Garmin’s desktop application MapSource and RoadTrip

Building the Garmin map

The routing functionality is now in the trunk version of mkgmap, so this time, we will use the trunk version. I also made a couple of changes suggested by other mkgmap developers.

Get latest trunk svn snapshot, in the terminal type the following:

mkdir mkgmap
cd mkgmap
svn co http://svn.parabola.me.uk/mkgmap/trunk trunk

Build the source

cd trunk
ant dist
java -jar dist/mkgmap.jar

Build the map
The exact command I use is below (remove the “\” and type the syntax in one line):

java -Xmx512m -jar dist/mkgmap.jar --code-page=1252 --tdbfile --gmapsupp \
--latin1 --country-abbr=PHI --country-name=PHILIPPINES --road-name-pois --add-pois-to-areas \
--no-poi-address --family-id=639 --family-name="OSM_PHIL" --overview-mapname=40000001 \
--route --description="OSM_PHIL" /path/to/your/osm/file/philippines.osm

mkgmap will create several files:

  • 63240001.img – the main map
  • 40000001.img – the overview map
  • 40000001.tdb – tdb file

We will use these files to create an installer for MapSource.

mapsource logo

Installer for Windows MapSource
To be able to view the maps within MapSource, we need to create a custom registry configuration. We will place the maps in c:/osm so the registry should instruct MapSource to read the files from this path.

Handcraft a registry information for MapSource

Open a text editor and paste these lines:

REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Garmin\MapSource\Families\OSM_PHIL]
"ID"=hex:7f,02
[HKEY_LOCAL_MACHINE\SOFTWARE\Garmin\MapSource\Families\OSM_PHIL\1]
"LOC"="C:\\OSM\\"
"BMAP"="C:\\OSM\\40000001.img"
"TDB"="C:\\OSM\\40000001.tdb"

regedit_shot

Save the file as 40000001.reg.

If you already saved your maps to c:\osm, you can double-click the 40000001.reg file to save the registry information.

You can now open MapSource to view the maps.

If you want (like me) to share your maps to other Mapsource users, it would be better to make an executable installer. This way, other users can easily install and view the maps within Mapsource and then upload directly to the GPS units.

Prepare an executable installer
I am using WinRar to create the executable file. The executable archive file simply extracts all the map data into c:/osm and then automatically add the registry information in the 40000001.reg file. The following screenshots explains the procedure (warning XP screenshots below):

Right-click on the directory of you map and click “Add to archive”.

Within WinRar’s “General” tab, select “Create SFX archive”.

winrar 1

In the “Advance” tab, click “SFX options” button.

winrar 2

In the “Advanced SFX options” “General” tab, type c:\osm in the “Path to extract” and in the “Run after extraction”, type c:\osm\40000001.reg

winrar 3

Click “OK” and WinRar will create a file with the “exe” extension.

roadtrip logo
For Mac’s RoadTrip
Garmin also has RoadTrip as a Mac version of MapSource. For adding the maps to Mac’s RoadTrip, you can use a simple Python-based app called Gmapibuilder . Just follow the instructions from the above link.

Here is Makati in RoadTrip (I actually prefer RoadTrip’s simpler interface than Mapsource):

roadtrip

Thanks to jan of phroadguide and the mkgmap users and developers for sharing the tips in this how-to.

UPDATE:
1. Changed svn url for trunk.
2. Revised mkgmap syntax and registry

5 responses to “DIY garmin routable map from openstreetmap data into mapsource (win) and roadtrip (mac)

  1. I really like your blog.. very nice colors & theme.
    Did you design this website yourself or did you hire someone to do it for you?

    Plz answer back as I’m looking to construct my own blog and would like to know where u got this from. many thanks

  2. Currently it sounds like Movable Type is the preferred blogging platform out there right now.

    (from what I’ve read) Is that what you’re using on your blog?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s