logo separator

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

From Felix Herwegh mlmmduk at herwegh.de on Sat Jul 15 12:11:12 BST 2023

Hi Gerd,

the FileExistsException problems (or their reporting) may have been 
introduced later.

    felix at TCHd:~/Downloads/mergetest/GP$ mkgmap --verbose
    --input-file=osm_deh-to_5402.img --input-file=osm_deh-tw_5401.img
    --gmapsupp
    Using /bin/java to execute mkgmap.
    Time started: Sat Jul 15 12:56:12 CEST 2023
    Number of MapFailedExceptions: 0
    Number of ExitExceptions: 0
    Time finished: Sat Jul 15 12:56:13 CEST 2023
    Total time taken: 1 second

    felix at TCHd:~/Downloads/mergetest/GP$ mkgmap --version
    Using /bin/java to execute mkgmap.
    Time started: Sat Jul 15 13:00:43 CEST 2023
    4262    [oldstable Debian]

    felix at TCHd:~/Downloads/mergetest/GP$ java -jar
    '/home/felix/AA-Poolm/osm/Soft/mkgmap-r4896/mkgmap.jar' --verbose
    --input-file=osm_deh-to_5402.img --input-file=osm_deh-tw_5401.img
    --gmapsupp
    Mkgmap version 4896
    Time started: Sat Jul 15 13:01:43 CEST 2023
    Number of MapFailedExceptions: 0
    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 EDGE_DEH.TYP
    uk.me.parabola.imgfmt.FileExistsException: File EDGE_DEH.TYP already
    exists
    Number of ExitExceptions: 0
    Time finished: Sat Jul 15 13:01:44 CEST 2023
    Total time taken: 739 ms

//Felix

On 15.07.23 08:46, Gerd Petermann wrote:
> 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
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20230715/10b8ea8f/attachment.html>


More information about the mkgmap-dev mailing list