I wanted to make my own contour maps for my Garmin eTrex Vista HCx GPS using data from the Shuttle Radar Topography Mission. I tried using dem2topo, but because I got an out of memory error, I searched an utility to split GeoTIFF files. I found one in the Geospatial Data Abstraction Library (GDAL). In this way I discovered that there is a GDAL utility to make contour maps too. This utility produces shapefiles, but fortunately GPSMapEdit can import shapefiles and export the Polish Map files that cGPSmapper requires.
To make things easier I wrote software to automate the complete process. The software takes a GeoTIFF file as input, splits it into smaller tiles, generates contours, simplifies contours, converts shapefiles into Polish Map files and calls cGPSmapper for the conversion to Garmin format. This makes it very easy to make contour maps, even for inexperienced users. I am sharing this software here under the GNU General Public License.
To make your own contour map, follow these steps:
- Download and unzip Tif2mp
- Download and install Microsoft .NET Framework 3.5
- Download and install FWTools
- Download and unzip cGPSmapper
- Download and unzip MapSetToolKit
- Download and unzip pre-processed data of your choice from CGIAR-CSI or ASTER
- Start Tiff2mp (double click the .exe file)
- Select the unzipped .tif file
- Select the cGPSmapper executable
- Select the ‘Convert!’ button and have patience
- Create a directory to install the map into (usually C:\Garmin\…)
- Start MapSetToolKit (double click the .exe file)
- Select ‘Select IMG’ and select the folder where you unzipped the GeoTIFF file
- Highlight the .img file and select the ‘Add –>’ button
- Select the ‘…’ button after ‘Mapset directory’ and select the install directory
- Type a ‘Mapset name’
- Type a ‘Family ID’
- Select ‘cgpsmapper/cpreview folder’ and select the correct directory
- Check ‘Install in MapSource’
- Select the ‘START’ button
- Start MapSource, select the new map and transfer it like usual
The generated maps will have five levels, one for minor, intermediate and major contour lines, one with a single POI in the middle of the map with the id of the map and one empty level.
The default settings should be okay for most uses, but it is possible to alter the contour intervals and associated zoom levels. It is also possible to adjust in how many parts the GeoTIFF will be split. The default value is 5×5, which results in 25 tiles of 1° (about 100 km2). Furthermore it is possible to adjust the simplify accuracy of the Ramer-Douglas-Peucker algorithm. The default value will be set to half of the minor contour interval. You can easily check what the result of the simplification process is, by making a map again with the simplification accuracy set to zero and ‘Depth contours’ checked (this results in another colour contour lines). Open one of the maps in GPSMapEdit and add the other one to see the differences.
Tif2mp was written using Microsoft Visual Studio 2008 in the C# language. You can download the entire project here.
Comments, corrections and remarks are very welcome, also if you just succeeded making your own map.
Change log
Version 1.6
- Added multiple select for batch conversion
- Changed way identifiers are generated
Version 1.5
- Added option to override/specify tile size
- Modified zoom levels
Version 1.4
- Added support for ASTER data
Version 1.3
- Changed ‘GDAL Tools’ into ‘FWTools’
- Increased all zoom levels by one
Version 1.2
- Workaround WPF scroll bug
- Added ‘Current tile’
Version 1.1
- Replaced Shapefile C Library by a modified C# class from this article
- Default simplify factor for cGPSmapper
Version 1.0
- Initial version



