logo separator

[mkgmap-dev] Trouble with merging IMG files (for Garmin)

From Gerd Petermann gpetermann_muenchen at hotmail.com on Sat Jul 15 07:46:50 BST 2023

Hi all,

OK, seems I was wrong. Felix Herwegh contacted me in a private mail and he has an example where mkgmap is able to merge two gmapsupp.img files. With his examples mkgmap just writes some warnings about duplicated files:
WARNUNG (global): Could not copy MAKEGMAP.MPS uk.me.parabola.imgfmt.FileExistsException: File MAKEGMAP.MPS already exists
WARNUNG (global): Could not copy MAKEGMAP.MPS uk.me.parabola.imgfmt.FileExistsException: File MAKEGMAP.MPS already exists
WARNUNG (global): Could not copy SAMEORDE.TYP uk.me.parabola.imgfmt.FileExistsException: File SAMEORDE.TYP already exists

So, yes, there is code to read the content of a gmapsupp and copy it to the output gmapsupp, but this code only seems to work well when the last file in the input gmapsupp is the special file MAKEMAP.MPS
I am not sure if this is wanted or just a flaw in the implementation. I am also not sure how well the result really works, and there are also other problems, e.g. the option --index doesn't work.
The code was added in 2009 with r1443: https://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=1443

Attached quick hack shows that it is very easy to change the code in mkgmap to be more tolerant regarding the oder of the files within the gmapsupp, but I have no idea about the restrictions that apply and how to handle the case that the input gmapsupp files contain equally named TYP files with different content or indexes etc.

So, not sure what to do here. Looks like a can of worms...

Gerd



________________________________________
Von: Gerd Petermann <gpetermann_muenchen at hotmail.com>
Gesendet: Donnerstag, 13. Juli 2023 22:41
An: Development list for mkgmap
Betreff: AW: [mkgmap-dev] Trouble with merging IMG files (for Garmin)

What you try is not implement.
You simply have to understand that mkgmap cannot read data in gmapsupp format. All the mentioned files are in gmapsupp format.
So, either use a different tool or maybe split the gmapsupp files first, e.g. with gmaptool.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Felix Herwegh <mlmmduk at herwegh.de>
Gesendet: Donnerstag, 13. Juli 2023 22:19
An: Tamas Gal
Cc: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Trouble with merging IMG files (for Garmin)

Hi,

> so I tried combining [opentopomap] Hungary and Slovenia but then I get again a small 2.5KB file

Same here. My test were on simple maps without routing and DEM only; maybe its that. Sorry.

//Felix
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: detect_gmapsupp_workaround.patch
URL: <https://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20230715/452d1105/attachment.ksh>


More information about the mkgmap-dev mailing list