OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2011-02-28 20:37:50

user_6635
Member
Registered: 2010-06-16
Posts: 20
Website

Gmaptool - the Sendmap20 alternative

greencaps wrote:

But I would not use it in the context we are talking about as sendmap20 would do all so much easier. Moreover I'm focussing on users who only want to generate a gmapsupp.img where you want them to be able to all kind of things with mapsource.

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.

Last edited by user_6635 (2011-02-28 20:39:54)


popej

Offline

#2 2011-02-28 22:15:11

greencaps
Member
Registered: 2009-10-05
Posts: 423

Re: Gmaptool - the Sendmap20 alternative

user_6635 wrote:

May I suggest to look at my Gmaptool? It can create gmapsupp.img from tiles. Command line version for Windows is about 70kB

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?

Edit.

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-).

Last edited by greencaps (2011-02-28 23:13:18)

Offline

#3 2011-03-01 23:03:16

greencaps
Member
Registered: 2009-10-05
Posts: 423

Re: Gmaptool - the Sendmap20 alternative

user_6635 wrote:

May I suggest to look at my Gmaptool?

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!

omweg3.jpg omweg2.png omweg1.jpg omweg4.jpg

I do not understand the shadowed areas on some screenshots.

Offline

#4 2011-03-01 23:36:16

user_6635
Member
Registered: 2010-06-16
Posts: 20
Website

Re: Gmaptool - the Sendmap20 alternative

greencaps wrote:

    gmt -j -o s:\garmin\gmapsupp.img -m "SD Card" *.img

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

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

greencaps wrote:

I do not understand that -m parameter.

-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.

greencaps wrote:

You realise that now the tiles cannot be in a directory with for instance a russian or japanese name.

Sorry, no support for UTF.

greencaps wrote:

The gmapsupp.img files had the same size. (with another test with far less tiles the resulting files were unequal in size.

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

greencaps wrote:

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

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.

greencaps wrote:

I do not understand the shadowed areas on some screenshots.

It looks like tiles area.


popej

Offline

#5 2011-03-06 11:38:36

greencaps
Member
Registered: 2009-10-05
Posts: 423

Re: Gmaptool - the Sendmap20 alternative

user_6635 wrote:

-m is mapset name, text that is displayed in GPS menu as a map that can be selected.

Ok. Will have a look at that.

When building gmapsupp.img you should set mapset name and FID/PID values. There is option -f for FID and PID.

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?

Offline

#6 2011-03-06 13:07:06

user_6635
Member
Registered: 2010-06-16
Posts: 20
Website

Re: Gmaptool - the Sendmap20 alternative

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.


popej

Offline

#7 2011-03-06 16:59:40

ligfietser
Moderator
Registered: 2008-10-09
Posts: 5,087
Website

Re: Gmaptool - the Sendmap20 alternative

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?

Last edited by ligfietser (2011-03-06 17:00:18)

Offline

#8 2011-03-06 22:46:24

user_6635
Member
Registered: 2010-06-16
Posts: 20
Website

Re: Gmaptool - the Sendmap20 alternative

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.


popej

Offline

#9 2011-03-07 09:29:11

ligfietser
Moderator
Registered: 2008-10-09
Posts: 5,087
Website

Re: Gmaptool - the Sendmap20 alternative

user_6635 wrote:

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

Thanks, this is exactly what I was looking for!

Can I have your permission to add gmt.exe to my gmapsupp.zip  files on www.openfietsmap.nl?

Offline

#10 2011-03-07 16:43:21

user_6635
Member
Registered: 2010-06-16
Posts: 20
Website

Re: Gmaptool - the Sendmap20 alternative

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.


popej

Offline

#11 2011-03-07 17:51:45

ligfietser
Moderator
Registered: 2008-10-09
Posts: 5,087
Website

Re: Gmaptool - the Sendmap20 alternative

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!

Offline

Board footer

Powered by FluxBB