Gmaptool - the Sendmap20 alternative

May I suggest to look at my Gmaptool? It can create gmapsupp.img from tiles. Command line version for Windows is about 70kB, Linux and Mac executable are bigger.

One note: it all works nice until the map have no index file. For map with search index probably the best solution is to use Mapsource or Mapinstall.

I did that. But where I was only interested in 70 kB I had to download a GmapToolSetup059a.exe of 1.091 kB which expanded to 2 MB. Well…

From the readme.txt

  • Join all img from a directory and create a mapset on SD card (drive S:):
    gmt -j -o s:\garmin\gmapsupp.img -m “SD Card” *.img

From which directory that would be? How to tell it from which directory?


Ok that would be:

  • Join all img’s from directory c:\tiles and create a gmapsupp.img file
    gmt -j -o s:\garmin\gmapsupp.img c:\tiles*.img

I got an error using -m “SD Card” that FileOpen failed on SD Card so omitted that.
-m - mapset name

I do not understand that -m parameter.

Also a list of .img files summarised in a .txt file worked
gmt -j -o s:\garmin\gmapsupp.img -@ tileslist.txt

I had saved the .txt file first in utf-8 but gmt.exe immediately complaned about the BOM (the first three
bytes at the start of the file). So then I used ascii. You realise that now the tiles cannot
be in a directory with for instance a russian or japanese name. As their names cannot be saved with
ansi. (Well sendmap20 cannot either handle such names I already knew. But it can handle a utf-8 file -to no avail-).

I did and I am impressed. The GUI version accepts dropped files too. So also here (like with sendmap20.exe) after downloading the tiles the user only has to drag drop them and there you are a gmapsupp.img file.

The gmt.exe version (used from my own gui) is even more flexible that that of sendmap. For instance the output path and output filename can be precisely specified.

I did a test where I let both programs join 154 tiles. The gmapsupp.img files had the same size. (with another test with far less tiles the resulting files were unequal in size.

The gmapsupp’s behaved the same in my Garmin.

I let it calculate a route from halfway Poland to south of Moskow. See pictures: quite a detour!

I do not understand the shadowed areas on some screenshots.

In that case from current directory. Just general rules for file names in command line programs.

-m is mapset name, text that is displayed in GPS menu as a map that can be selected.
When building gmapsupp.img you should set mapset name and FID/PID values. There is option -f for FID and PID.

Sorry, no support for UTF.

Files size can depend on block size. Gmaptool is trying to optimize block size to get smallest img. You can set block size manually.

I believe Gmaptool doesn’t change anything in routing capability of a map. It doesn’t modify maps, only assemble a container for all tiles.

It looks like tiles area.

Ok. Will have a look at that.

As your GUI does not force the user to supply FID/PID values I did not bother either. My Garmin does not complain about missing FID/PID’s. So that would only be needed when installing in Mapsource?

Gmaptool uses FID=0 and PID=0, which is kind of suspicious value.
You need FID/PID to distinguish multiple maps in GPS, to bind maps to TYP file, to install map properly to Maposurce.

Hi Popej

I don’t know if it is possible, but can gmaptool/gmt.exe send two Typ files / FID’s in the gmapsupp for one mapset?
I have one mapset and I like to switch between two different layouts on the GPS, for instance one with low contrast and one with high contrast.

Or if this is not possible, can I use gmt.exe to rename one of those Typ files with a small script. I want to provide one gmapsupp.img with two typ files to choose from.
With a small script the user can choose which typ file he wants on the gmapsupp (because there is a big difference between older gps and newer gps models).
Is that possible with gmt without using mapsource?

The straight way would be to replace TYP in gmapsupp.img. With GMT it would be like that:

gmt -w -x my_typ.typ gmapsupp.img

This assume that gmapsupp.img already contains a TYP for a map and my_typ.typ has the same FID/PID as a TYP that it replaces.

You can create gmapsupp with double TYP files, but they shouldn’t have the same FID. Map will use TYP which has FID like the map itself.

To change FID/PID for TYP inside gmapsupp.img you need to run command like that:

gmt -w -f 500,1 -y 501,1

For command -w option -f means, that gmt should correct only map (TYP file in this case) with FID=500,1, option -y sets new FID for TYP. You will need some fiddling to selectively change FID/PID for 2 TYPs inside gmapsupp.img.

Thanks, this is exactly what I was looking for!

Can I have your permission to add gmt.exe to my files on

Yes, you can add gmt to your maps from OpenFietsmap.

Check first if it works for you, there are some limitation for TYP swapping, like equal FID and enough place in gmapsupp.img.

Works pretty well on my old Etrex. For users for older GPS models it might better to choose a typ file with thin, light borderlines, for other models like Oregon / Dakota and Nuvis, as well as Mapsource thicker borders are better. So for those users who don’t use Mapsource, I’ll put a small batch file together with gmt.exe and the alternative typ file to change the default TYP file in the gmapsupp.img, thanks!