logo separator

[mkgmap-dev] My findings about the crash in MapSource

From Gerd Petermann gpetermann_muenchen at hotmail.com on Sun Feb 4 09:08:43 GMT 2018

Hi all,

maybe you can help:
It seems that the crash is related to the alignment of the tiles, so I try to find out the relation between 
alignment of tile boundaries and DEM.

I only have one routable map with DEM data  (topo 2010 demo ), it is a gmapsupp.img with
several tiles spread over Germany that are not connected.
I used this gmaptool command
gmt -s gmapsupp.img
to split it into various *.img and used display tool to extract the tile boundaries from the TRE file of each img
TreDisplay creates a long report containing lines like this:
00000015 | 8a 67 25                | north boundary 2451338
00000018 | d0 95 07                | east boundary 497104
0000001b | 20 43 25                | south boundary 2442016
0000001e | 20 59 07                | west boundary 481568
         |                         | In degrees lat,lon: 52,4000,10,3333 52,6000,10,6667
I was only interestend in the last line, so I used this one line command:

del bounds && for %i in (*.img) do java -cp d:\display\dist\display.jar;d:\mkgmap\dist\mkgmap.jar test.display.TreDisplay %i  | grep "In degrees" >> bounds

to create this list of tile boundaries in file bounds:
         |                         | In degrees lat,lon: 54,2000,9,0000 54,4000,9,3334
         |                         | In degrees lat,lon: 54,0000,11,3739 54,2069,12,0000
         |                         | In degrees lat,lon: 53,4000,9,6666 53,6000,10,0000
         |                         | In degrees lat,lon: 53,0000,8,6666 53,2000,9,0000
         |                         | In degrees lat,lon: 52,4000,10,3333 52,6000,10,6667
         |                         | In degrees lat,lon: 52,4000,13,0000 52,6000,13,3334
         |                         | In degrees lat,lon: 52,0000,13,6666 52,2000,14,0000
         |                         | In degrees lat,lon: 51,8000,11,6667 52,0000,12,0000
         |                         | In degrees lat,lon: 51,2000,8,0000 51,4000,8,3333
         |                         | In degrees lat,lon: 51,0000,13,0000 51,2000,13,3334
         |                         | In degrees lat,lon: 50,8000,10,6667 51,0000,11,0000
         |                         | In degrees lat,lon: 49,8000,6,6666 50,0000,7,0000
         |                         | In degrees lat,lon: 49,6000,8,3333 49,8000,8,6667
         |                         | In degrees lat,lon: 49,1512,6,5475 49,4000,7,0000
         |                         | In degrees lat,lon: 48,8000,11,6667 49,0000,12,0000
         |                         | In degrees lat,lon: 48,6000,8,3333 48,8000,8,6667

It is obvious that Garmin preferred splits neer 1/5 degrees for lat and 1/3 degrees for lon in this map.
If you have another routable Garmin map with DEM it would be great if you could try this as well and report the results for your maps,
presuming that MapSource doesn't crash with Garmin maps.

I've uploaded the latest display tool binary here:


Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen at hotmail.com>
Gesendet: Samstag, 3. Februar 2018 20:54
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] My findings about the crash in MapSource

Hi Andrzej,

your patch reverts that change that I made r4048 to solve your problems with
empty areas. Maybe it is no longer needed since 4101?



Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej at poczta.onet.pl>
Gesendet: Samstag, 3. Februar 2018 20:39
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] My findings about the crash in MapSource

Hi Gerd,

I have compiled baddem6 and I confirm your observations. I have no idea,
what to do with it.

I have found a minor error, see attached patch. Mkgmap calculates
min/max heights for header using values form tiles, which have bitstream
data. This is wrong for flat surfaces, which have height but no
bitstream and for voids, which have bitstream without real heights.

I also removed bitstream for tiles with all voids, but I don't know the
reason for putting it in first place, so maybe it is wrong change.

Best regards,
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk

More information about the mkgmap-dev mailing list