Creating Background Maps for Garmin™ GPS

By Odilon Ferreira Junior - Author of GPS TrackMaker®
This article was kindly revised by
Doug Adomatis of Travel by GPS (

GPSII+ with custom maps
The present article shows the Author's personal experience with the MAPDEKODE program together with GPS TrackMaker® and MapSource® for creation of complete background maps for Garmin™ GPS receivers. In spite of the emphasis on Latin American countries, the techniques shown here can be applied to any other part of the word.

Questions about this article?


The use of background maps by GPS users in Latin America always has presented difficulties because of the lack of available digital maps. For developing countries, the main source of cartographic data are the government agencies that often don't possess structure and budget to provide the maps that the market demands. GPS manufacturers have had to resort to public domain maps supplied by the government of the United States, through US Defense Mapping Agency. These maps possess a low level of detail but cover all the World.

GPSIII+ screenThe side picture shows the level of detail of the map of Belo Horizonte City (where I live) in GPS III+. In spite of the fact that Belo Horizonte is the third largest Brazilian city with more than 2.1 million inhabitants, the map only shows some main highways and the simplified border of the urban area.

The pictures below show the city of Belo Horizonte respectively in the Garmin MapSource®, Lowrance MapCreate® and Magellan MapSend®. Note that in all, there are no significant details that help with GPS navigation.

Garmin Mapsource
MapSource WorldMap (Garmin™)
Lowrance Map Create 6
MapCreate 6 (Lowrance™)
Magellan MapSend
MapSend Streets(Magellan™)

Since 1998 I have receive hundreds of e-mails complaining about the level of map detail provided by Garmin™, Magellan™, and others.To their credit, this limitation is not exclusively the manufacturers's fault - obtaining digital maps of developing countries is an almost impossible task.

You can't imagine the difficulty that I have had obtaining a digital map of my city. I tried to acquire municipal maps from the City Hall in AutoCad-DXF format, but they said the maps would cost US$10,000.00. I also contacted some companies that specialize in cartography, who offered me street maps for US$1,200.00, with restriction for any redistribution. If the cost of the maps for a single city is so expensive, imagine the cost of detailed maps of a whole country with more than 5500 cities, like Brazil!

Grand CanyonIf you think that the lack of detailed maps is only a problem of the developing countries, you are wrong. Many areas of special interest are not adequately mapped for GPS use. Even trails in such places as Grand Canyon National Park (USA) are not properly mapped.

The Policy of the GPS Manufacturers

Up to now it is possible to obtain maps with a good detail level for countries in North America, Europe and a dozen of other countries. The GPS manufacturers pay a premium for the digital maps, passing the cost on to the consumer. To impede the unauthorized copy of the maps, each company creates its own encrypted system or a system of binary files with indefinite structure to protect their data.

Unfortunately, this policy restricts other people from creating their own GPS maps in each manufacturer's proprietary format. If the format of the maps is binary with difficult interpretation or encrypted, it is almost impossible for a normal user to create their own maps.

Example of a simplified map created with Tracklogs and WaypointsAt the time this article was concluded (07-Nov-2002), there were no GPS units available that allowed the consumer to create their own background maps. Consumers must use Tracklogs, Waypoints and Routes to create only simplified maps. For GPS users in countries with inadequate digital maps, much of the GPS map memory (1.44MB, 8MB, 16MB, 24MB,...) is wasted!

Certainly there is demand for GPS hardware and software that allows users to create background maps with whatever level of detail is desired. Imagine the following situations:

- A big national park located in Canada wishes to purchase 100 GPS devices to rent to the visitors, with maps of the trails and tourist points already defined inside the GPS.

- A big delivery company wishes to purchase 500 GPS devices to create their own maps inside of the GPS, to aid the delivery vehicles.

These are real applications that have not been developed because of the difficulties involved in creating customized maps for GPS.

Creating your own Maps for Garmin™ GPS

Because Garmin™ has seemingly ignored the demand for software tools that allow consumers to create their own maps, some talented European developers have written programs that can produce un-encrypted MapSource® IMG files - IMG files are the actual map files that are downloaded to Garmin GPS units. Two examples of these programs are MapDekode created by the Austrian Peter and GPSMap. The present article treats of the use of the Mapdekode program.

These use of these programs does not violate Garmin's copyrights since users create maps starting with their own data (waypoints, routes and tracklogs) and the resulting IMG files are read by Garmin's own MapSource program.

The creation of maps for the Garmin™ GPS follows the model below:

(1) GPS TrackMaker® - (2) MapDekode - (3) MapSource® - (4) Garmin GPS with support for maps or POIs

Creating Step-by-Step a Background Map for Garmin™ GPS

Notice: The Author does not provide technical support for questions relating to the creation of maps.
Please, post your questions in

To create your own background map for Garmin™ GPS, you will need:

- GPS TrackMaker® #11.8 or GTM PRO® 3.5 (or above)
- MapDekode Program
- A licensed copy of Garmin MapSource®
- A Garmin™ GPS with support for maps or POIs

The following software versions were used in writing this article:

- GPS TrackMaker #11.8 Free
- MapDekode 4.4.4
- MapSource 4.08 WorldMap Licenced

Before you begin, take a look at the document below:
Document of Compatibility GPS TrackMaker® - MapDekode

General View of the Structure of a Map

The maps of MapSource® have two great divisions:
General Map: there is only one in each project. It possesses a wider level of zoom, with few details. The General Map is simply an index for locating the Detail Maps. It is not sent to the GPS.
Details Maps: are the maps with all the cartographic details that can be sent to the GPS. Only the detail Maps are sent to the GPS.

Example: Map of Brazilian Highways between Belo Horizonte - Uberaba - Ribeirao Preto

We will create an example of a map that shows each curve of the main highways in full detail between the Brazilian cities of Belo Horizonte, Uberaba and Ribeirao Preto.
The main file used to start the works is: highways.gz
We will also add some avenues and streets of Belo Horizonte:bh_avenues.gz

The Trackologs and Waypoints of the first file were obtained with a GPS III+. The second file was created starting from the maps of the Yellow Pages of Belo Horizonte.


Before getting started, create two directories on your computer to store the maps. The first will store the General Map, and the second will store the Detail Maps:


A good idea is to configure the GPS TrackMaker® program to show the number of points in the Tracklog when the mouse is closed. This will let you know if the Tracklog has more than 255 points (limit allowed by MapSource®).

Step 1 - Creating the General Map

- Click here to download the file highways.gz and save it to the C:Maps directory.

- Open highways.gz in the GPS TrackMaker®

- Eliminate all Waypoints, only leaving the Waypoints of Belo Horizonte, Uberaba and Ribeirao Preto.

- Modify the Waypoints of these cities for "City Large"

- It is important that each Tracklog has less than 256 points. To reduce them, use the Tracklog Reducer tool with the option Cut Tracklog if exceeds... . A reasonable value is 230 points.

- Select all Tracklogs and apply the Paved Street format

- Create a Tracklog around the whole map, rename it to Example and apply the Yellow Map Background style. Press the Send to Back button to send the Tracklog behind the other Tracklogs. The Yellow Map Background style will inform Mapdekode the limits of the map.

-Create the borders of the Detail Maps that will be used later. For that, make eight Tracklogs in form of rectangles and apply the Green Map Borderstyle, which informs Mapdekode the limits of the Detail Maps. Rename the eight Tracklogs to the names of the future IMGs that will be created. Each IMG must have names with 8 numbers inserted in the tag . In the example, the names were:

Tables without border:
Map1 Map 2 Map 3 Map 4
Map 5 Map 6 Map 7 Map 8

- Each Green Map Border should have a small overlap on the others so that there is not discontinuity of maps.

- After the modifications, the file will have the following format:



- The modified file is available to download in highways1.gz

Step 2 - Compiling the General Map in the MapDekode Program

The next step is to create the IMG file of the General Map using the MapDekode program:

- In the GPS TrackMaker® program, export the highways1.gz to the DBX format of MapDekode.
To do that, click in: Files - Save as... - MapDekode TXT File (*.dbx).
Save the highways1.dbx file in the C:MapsGeneral directory.

- The DBX file created starting from highways1.gz is available for download in

- Open MapDekode and click in Map Create - Overview-map from DB (*.DBX -> *.img)

- A window called Parameters for IMG construction will be opened. The following parameters will be shown:

Use Old DBn Leave unselected
Optimize Lines Leave selected
Block= XXXXX The block size doesn't need to be modified if there is not error message in the compilation.
It defines the maximum size of an IMG in bytes.
Zf = 18, 17, 16 ... 11 The Zoom Factor acts on the accuracy with that each point is stored (more accuracy = more memory). For a general map of USA, Canada or Brazil, for instance, a ZF=11 is more than good. For a map of a small area, a ZF=11 can introduce inconvenient deformations. ZF defines the grid on which will be all waypoints and lines. With ZF=11, the smallest distance between two points will be 305m, while with ZF=18 we will have 2.4m.

- Choose Zf = 15 (5.6th; 19m) and press OK. With this parameter, the smallest detail of the General Map will have 19m turning a simplified map, exactly as we want for the General Map.

- Open the file named highways1.dbx

- After the compilation, a file named highway1.img will be created in the same directory

* * You have just created the IMG of the General Map! * *

Step 3 - Creating the Detail Maps

Eight borders of Detail Maps were created on the General Map with the "Green Map Border" Tracklog style. Now we need to create each one of the eight Detail Maps that can be loaded in the GPS through the MapSource® program.

- Open the highways1.gz file (General Map) in the GPS TrackMaker® program

- Double click on the Tracklog of the 40000001.img map and press CTRL C to copy it.

- Create a new file and paste the border of the 40000001.img map pressing CTRL V

- Change the Tracklog style to Yellow Map Background and change its name to Map 1

- Using the Merge File tool, add the highways.gz file to the current file

- Remove the part of the map that is out of the Yellow Map background Tracklog

- Press CTRL A to select all Tracklogs and use the Fragment Tracklog tool to fragment the Tracklogs that cut the Yellow Map background. Later, delete the excesses.

Shown at left: a Tracklog that cuts the limits of a Detail Map can be fragmented in two parts by the "Fragment Tracklog" tool. After the fragmentation, the segment outside of the map can be deleted easily.

- After eliminating the excesses, use again the Merge File tool to add the main avenues of Belo Horizonte city contained in bh_avenues.gz

- Use the Tracklog Reducer tool with the Cut Tracklog if exceeds... option to reduce the Tracklogs to less than 256 points. A reasonable value for the Tracklog size is 230 points.

Brief comments on the Level of Zoom

The definition of the scale is important in the Detail Map, because it eliminates the excess and the confusion of data in larger scales. The definition of the scale can be made directly in the window of Edition of Tracklogs and in the window of Edition of Waypoint Styles.

Scale in KM Predefined Scales of TrackMaker Level of Zoom of MapDekode
0 Permanent 5
=< 3 From Street to Neighborhood 0
=< 10 Urban area 1
=< 30 Metropolitan area 2
=< 70 Small city 3
=< 100 Medium city 4
> 100 From Big city to Country 5

Instead of using the predefined scales of the GPS TrackMaker®, you can also use the notation after the name of the Tracklog or after the comments of the Waypoint. The result will be the same.

Comments of Waypoint: Rio de Janeiro City
Name of Tracklog: BR-262

For the present example, zoom levels were introduced among 0 to 3 for streets and avenues of Belo Horizonte. For the rest, the level of Zoom was maintained to 0 or Permanent.

Tip: Level of Zoom for Waypoints in the free version

Users of the free version of GPS TrackMaker® can use the tag to define the zoom level but possibly will have difficulties configuring the 6 levels of Zoom for the Styles of Waypoints, because only the Professional version allows the creation of new styles of Waypoints.

To get around this limitation, open any DBX file generated by MapDekode before starting a map. Every time that GPS TrackMaker® imports a DBX file, automatically 6 new Styles of Zoom for Waypoints are created and they can be selected from the window of Edition of Waypoint. See the illustration:

New Style #1 = Level 0
New Style #2 = Level 1
New Style #3 = Level 2
New Style #4 = Level 3
New Style #5 = Level 4
New Style #6 = Level 5

Step 4 - Creating the Eight Files of the Detail Maps

The procedure described in the Step 3 must be repeated for each Detail Map. Each map should be recorded with 8 numbers in the name and with the same suitable name in Green Map Boder of the General Map.

The eight Detail Maps in the TrackMaker format are shown below:


Step 5 - Compiling the Eight Detail Maps to the MapSource® Format

The next step is to create the IMG files of the Detail Maps that can be sent to the GPS as background maps.

- Using GPS TrackMaker®, export the 40000001.gz file to the DBX format of Mapdekode.
To do that, click in: Files - Save as... - MapDekode TXT File (*.dbx).

- Save the 40000001.dbx file in C:MapsDetails

- Open Mapdekode and click in Map Create - Detail-map from DB (*.DBX -> *.img)

- The window named Parameters for IMG construction will appear with the following parameters:

Use Old DBn Leave unselected
Optimize Lines Leave selected
Block=XXXXX" The block size doesn't need to be modified
Zf=18,17,16...11 Choose Zf = 17 (1.4º ; 4.8m)

- Choose Zf = 17 (1.4º ; 4.8m) and press OK. With these parameters, the smallest detail of each Detail Map will be 4.8 m, giving a reasonable resolution on the GPS screen.

- After the compilation, a file called 40000001.img will be created.

- Repeat the procedure for the other files.

-The eight Detail Maps in MapDekode format are shown below:

Step 6 - Registering the new IMG files in MapSource®

Up to now, you created one file for the General Map and eight files of the Detail Maps that were recorded in two directories as shown below:

C:MapsGeneral C:MapsDetails
highway1.img 40000001.img 40000002.img
40000003.img 40000004.img
40000005.img 40000006.img
40000007.img 40000008.img

The last step is to inform MapSource® that a new map was created and the directories where are the files of the map. That is done with the Mapdekode program:

- Open Mapdekode and click in Project

- The window called Project will appear with the following parameters:

Project nr. Each group of General Map/Detail Maps possesses a number of project identification. Any number can be used since there is not other project with the same number
Insert: 41 in the left box and 100 in the right box
Project Name Type Highways Brazil in the both boxes
Name TDB Choose a directory and a name for the catalog file (TDB) used by MapSource®.
In the present example, the catalog file was created in the directory: C:Maps
Type C:Mapshighways1.tdb
Overview Map Double click on the text Box and choose the directory and name of the General Map file
In the present example: C:MapsGeneralhighway1.img
Path *.imgs Double click on the text Box and choose the directory where the Detail Maps are stored
In the present example: C:MapsDetails

- Register the project clicking on: TDB - Save TDB and make Reg-entry

- After registering, it is time to add the Detail Map to the project.

Click in: MapList - Add map to list

- Select the files 40000001.img to 400000008.img of the Detail Maps and press OK

- Save again the project clicking on:
TDB - Save TDB and make Reg-entry

Ready! A new map for MapSource® was just created!
You can send to the GPS any one of the eight Detail Maps!

MapSource® with the new "Highways Brazil" map