[mkgmap-dev] Commit r4910: Fix calculation of minimun resolution in overview map: Use same constant as in MapSplitter so that the tile selection polygon 0x4a is not split as this confuses the Garmin P

2023-07-15 Thread svn commit
Version mkgmap-r4910 was committed by gerd on Sun, 16 Jul 2023

Fix calculation of minimun resolution in overview map: Use same constant as in 
MapSplitter so that the tile selection polygon 0x4a is not split as this 
confuses the Garmin PC programs.

http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap=4910
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


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

2023-07-15 Thread Felix Herwegh

Hi Gerd,

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


   felix@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@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@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=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
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  im Auftrag von Felix 
Herwegh
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@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

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

2023-07-15 Thread Gerd Petermann
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=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 
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  im Auftrag von Felix 
Herwegh 
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
Index: src/uk/me/parabola/mkgmap/combiners/FileInfo.java
===
--- src/uk/me/parabola/mkgmap/combiners/FileInfo.java   (revision 4909)
+++ src/uk/me/parabola/mkgmap/combiners/FileInfo.java   (working copy)
@@ -355,7 +355,8 @@
}
 
protected void setKind(FileKind kind) {
-   this.kind = kind;
+   if (this.kind != GMAPSUPP_KIND)
+   this.kind = kind;
}
 
public FileKind getKind() {
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev