From OpenStreetMap Wiki
Jump to: navigation, search

Discussion of different possibilities to create contour lines for a Garmin-GPS from SRTM-data

To start, you should read this page: Topographic maps for garmin devices
There are three possibilites to get topographic maps on your device:

Using Srtm2Osm

Documentation about this can be found on the Srtm2osm page.
+ You get tiles with names that are similar to the User:Computerteddy tiles.
+ Processing is rather easy and well documentated
- normal SRTM-data is used, so you get data voids
- on tiles with mountaineous regions, mkgmap that is used to convert the .osm-files into .img-format gets into trouble and you will have to split the tiles.

Using Groundtruth

Documentation about this can be found on the Groundtruth page. Groundtruth comes from the same author as Srtm2osm and is its successor.
+ it deals well with mountaineous tiles
+ it is easy to use
- normal SRTM-data is used, so you get data voids
- tiles will have names that do not correspond to the User:Computerteddy tilenames.

Using hole filled elevation data by CGIAR-CSI

The CGIAR-CSI data has been processed to fill data voids.
+ you get a nice map without data voids
- you need to install many little tools
- the process is not to well documentated, except on this page: How_to_Make_Custom_TOPO_Maps_for_Your_Garmin_Mapping_GPS

Tutorial to make countour lines from CGIAR-CSI data


Step by step

coming someday, when time permits ... in the meantime, please refer to the link above

How to get it all together

First, you have to install some little tools, as we are going to use a batch-script which needs them. The batch-script will automatically download the tiles you want and will combine it with the elevation data to a ready-to-use gmapsupp.img-file.
Create a new folder and install these tools into this folder. I suggest this, because the calling of the tools in the script will be much shorter.
1) wget.exe - this tool is used by the script to retrieve the tiles from the server. Download it from here.
2) 7za.exe - this is a commandline-version of 7zip. You can get it from the 7zip-page.
Interesting documentation can be found here.
3) gmaptool - this is used to combine the tiles and the elevation data. It was already used when making the contour lines. So if you haven't done it yet, get it from here an install it.

Now create a subfolder for your new tiles. I named it "New_tiles". I would recommend not to use any spaces, this simplifies the script.
Now go to this page and get the tilenames of your region. Copy-paste them to a text editor.
Copy your Hole_filled_Elevation.img-file to the "New_tiles"-folder.
You are now ready to adapt the following script to your needs. Save it as "download_and_combine.bat" and call it from the console.
The gmapsupp.img will appear in your "New_tiles"-folder.

REM First we will download all the needed tiles from the server.
wget\bin\wget.exe -P "New_tiles"
wget\bin\wget.exe -P "New_tiles"

REM Then we will decompress the compressed files. Attention: No space between the -O and the destination-foldername
7za.exe e "D:\GPS\OSM\New_tiles\*.gz" -ONew_tiles -y

REM We can now delete the compressed files.
del "D:\GPS\OSM\New_tiles\*.gz"

REM Combine the Computerteddy's-tiles to a map named OSM-Streets.
Gmaptool\gmt\gmt.exe -j -f 248,1 -o "New_tiles\OSM-Streets.img" -m OSM "New_tiles\6*.img"

REM Combine the streetmap with the elevation-data. It seems that the OSM-data must appear before the elevation-data in the commandline!
Gmaptool\gmt\gmt.exe -j -o "New_tiles\GMAPSUPP.IMG" "New_tiles\OSM-Streets.img" "New_tiles\Hole_filled_Elevation.img"

REM Now we can delete all the decompressed tiles.
del "New_tiles\6*.img"