draw-priority – influence rendering order of two maps on a device

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, one of our customers bought a propietary Garmin map (Topo Adria Pro) for his outdoor GPS reciever (GPSmap 62) and would like to have a secondary map on top of that map which shows some geometries (a boundary and a few POIs) we digitized from a paper map [1]. I successfully build a Garmin map using mkgmap which contains the boundary. If I load the map on the microSD card which already contains the propietary map, the map gets rendered but *below* the propietary map . I tried the following to get the additional map to be drawn on top: - - Rename the file by adding "aaa" at the beginning of the file name. - - Insert "aaa" at the beginning of the description (--description option of mkgmap). - - Insert "aaa" at the beginning of the family name (--family-name option ). - - Reduce number of --mapname option (I tried --mapname=10000000). - - Try different draw priorities using --draw-priority. I tried 999, 30 and 48 without any success. - - Build one gmapsupp.img containing both the Garmin Topo map and the additional map. java -jar mkgmap.jar --output-dir=../merged/ --gmapsupp ../input/garmin-topo.img ../output/additional.img Even if I change the order (additional.img before garmin-topo.img), nothing changes. Do you know at which location inside a gmapsupp.img file I can find the draw priority of the Garmin Topo map? If I know that draw priority, I can use a higher priority. Btw, I use mkgmap 3909. Best regards Michael [1] not for redistribution and not containing any OSM data - -- Michael Reichert www.geofabrik.de Geofabrik GmbH Handelsregister: HRB Mannheim 703657 Amalienstr. 44 Geschaeftsfuehrung: C. Karch, F. Ramm 76133 Karlsruhe Tel: 0721-1803560-3 reichert@geofabrik.de Fax: 0721-1803560-9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY/zcQAAoJEExHr+dZu6EUFdoP/AxOOKjpWlKJl/DoXHczEkfU 82js6patFDw8/6NH+gT2gEJh1aB1AEHzQEvFbENjnzC/jDdYv0clSm4cFIStWQFA YjrDVMmWm8g7KSH4w0eY8LieXA05k9MwNbYChgBVvylmwfRIP7yvQqvc3euWkxOj Cxa0hXVFuSrLYI8z+XRqcngTkbtJityQTHR+BV2/JZ2zlRl/kYFup4LFmuucT+qZ UZae+yziCBMCnCeADUa21WcBsxhxMMOGUH5pTwsG5R9Kfg8R/NFK1kSgFyXkGaSw vN4ACTBPRyP2BrPPEOvkyGTTtV38Vxq2UeQhYhSyHmvEv0d6tlaPgRAKjCzZlbIQ 3cPyvx9ydH9I4BaEP5QTqG/C/9hI8ieZ8a+U9u7AZS0mZBtWLQxIqGnAb+ZqiE34 fZBWx6SYjLQNy3G6d5Ux1o/gzWdwucKfnueJNR+pI7L0LmyKF2CvTv4eif/fXgCv QKXgw0BC+7KVcaS9OXSsGKrOnw+oOz7Djrn/G2jDGLhLiQAFQLoIvcnmHqM7mz8L ej1BbwRthpQJLQhdLmyEswuqueJmmi+/xtvj/P4XPncEiaUDFkRWaio8nPuKIq/R an4z5cjNJGHPTkVePYMDyIYdqIX0uYxi7eEVak0bII61GlfO6NzzoJWxOKCrxzPm 5oVt/zSdJ8Z1OUUzJMSv =Oegl -----END PGP SIGNATURE-----

Hi Michel, you can use gmaptool to display this info: gmt -i gmapsupp.img See http://www.gmaptool.eu/en Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Michael Reichert <michael.reichert@geofabrik.de> Gesendet: Dienstag, 25. April 2017 13:46:24 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] draw-priority – influence rendering order of two maps on a device -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, one of our customers bought a propietary Garmin map (Topo Adria Pro) for his outdoor GPS reciever (GPSmap 62) and would like to have a secondary map on top of that map which shows some geometries (a boundary and a few POIs) we digitized from a paper map [1]. I successfully build a Garmin map using mkgmap which contains the boundary. If I load the map on the microSD card which already contains the propietary map, the map gets rendered but *below* the propietary map . I tried the following to get the additional map to be drawn on top: - - Rename the file by adding "aaa" at the beginning of the file name. - - Insert "aaa" at the beginning of the description (--description option of mkgmap). - - Insert "aaa" at the beginning of the family name (--family-name option ). - - Reduce number of --mapname option (I tried --mapname=10000000). - - Try different draw priorities using --draw-priority. I tried 999, 30 and 48 without any success. - - Build one gmapsupp.img containing both the Garmin Topo map and the additional map. java -jar mkgmap.jar --output-dir=../merged/ --gmapsupp ../input/garmin-topo.img ../output/additional.img Even if I change the order (additional.img before garmin-topo.img), nothing changes. Do you know at which location inside a gmapsupp.img file I can find the draw priority of the Garmin Topo map? If I know that draw priority, I can use a higher priority. Btw, I use mkgmap 3909. Best regards Michael [1] not for redistribution and not containing any OSM data - -- Michael Reichert www.geofabrik.de Geofabrik GmbH Handelsregister: HRB Mannheim 703657 Amalienstr. 44 Geschaeftsfuehrung: C. Karch, F. Ramm 76133 Karlsruhe Tel: 0721-1803560-3 reichert@geofabrik.de Fax: 0721-1803560-9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY/zcQAAoJEExHr+dZu6EUFdoP/AxOOKjpWlKJl/DoXHczEkfU 82js6patFDw8/6NH+gT2gEJh1aB1AEHzQEvFbENjnzC/jDdYv0clSm4cFIStWQFA YjrDVMmWm8g7KSH4w0eY8LieXA05k9MwNbYChgBVvylmwfRIP7yvQqvc3euWkxOj Cxa0hXVFuSrLYI8z+XRqcngTkbtJityQTHR+BV2/JZ2zlRl/kYFup4LFmuucT+qZ UZae+yziCBMCnCeADUa21WcBsxhxMMOGUH5pTwsG5R9Kfg8R/NFK1kSgFyXkGaSw vN4ACTBPRyP2BrPPEOvkyGTTtV38Vxq2UeQhYhSyHmvEv0d6tlaPgRAKjCzZlbIQ 3cPyvx9ydH9I4BaEP5QTqG/C/9hI8ieZ8a+U9u7AZS0mZBtWLQxIqGnAb+ZqiE34 fZBWx6SYjLQNy3G6d5Ux1o/gzWdwucKfnueJNR+pI7L0LmyKF2CvTv4eif/fXgCv QKXgw0BC+7KVcaS9OXSsGKrOnw+oOz7Djrn/G2jDGLhLiQAFQLoIvcnmHqM7mz8L ej1BbwRthpQJLQhdLmyEswuqueJmmi+/xtvj/P4XPncEiaUDFkRWaio8nPuKIq/R an4z5cjNJGHPTkVePYMDyIYdqIX0uYxi7eEVak0bII61GlfO6NzzoJWxOKCrxzPm 5oVt/zSdJ8Z1OUUzJMSv =Oegl -----END PGP SIGNATURE----- _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi, Am 25.04.2017 um 14:02 schrieb Gerd Petermann:
Hi Michel,
you can use gmaptool to display this info: gmt -i gmapsupp.img
gmaptool says with the -v option (extract of the full output):
I1019FB0 GMP 2AC00h 6409070 map 1019fb0 (16883632) PID 1, FID 3268, region 0,0 date 30.09.2014 15:19:02 priority 31, parameters 1 4 23 5, locked, signed N: 45.230927, S: 44.499993, W: 15.723581, E: 16.500006 Topo Adria Pro Copyright 1995-2014 by GARMIN Corporation. CP 1252, Western European DEM layers: 4, N: 45.231330, W: 15.723198
All tiles of the large Topo map have a priority of 31and their mapname is consecutive, starting with 1019f6d (16883565) and ending with 1019fb4 (16883636). According to that, my map should be rendered on top but my Garmin Dakota 20 (my testing device) doesn't – neither using a priority above 31 (48) nor below (20). I tried to use a different mapname for my overlay map using the --mapname=16883700 option but that seems not to work. If I read my overlay map using gmaptool, it outputs (full listing): gmt v0.8.220.853b CC BY-SA (C) 2011-2015 AP www.gmaptool.eu Input file: ../output-garmin/overlay.img. File: ../output-garmin/overlay.img, length 11776 Header: 25.04.2017 15:14:59, DSKIMG, XOR 00, V 1.00, Ms 0 Mapset: Jagdgebiet fat: 400h - 600h - 1000h, block 512 maps: 3, sub-files 5 Sub-file fat length MAKEGMAP MPS 600h 91 63240001 RGN 800h 4302 63240001 TRE A00h 709 map 3c4f741 (63240001) date 25.04.2017 15:14:59 priority 25, parameters 1 3 17 0 levels [17,18,20,22,24], zoom [84,3,2,1,0] N: 45.544188, S: 45.375381, W: 14.523518, E: 14.703698 Map data (c) OpenStreetMap and its contributors http://www.openstreetmap.org/copyright This map data is made available under the Open Database License: http://opendatacommons.org/licenses/odbl/1.0/ Any rights in individual contents of the database are licensed under the Database Contents License: http://opendatacommons.org/licenses/dbcl/1.0/ Map created with mkgmap-r3909 Program released under the GPL 63240001 LBL C00h 313 CP 0, ASCII 7-bit sort 00006324 SRT E00h 879 Map length s-f CP prio PID FID name MAKEGMAP MPS 91 1 63240001 MPC 5324 3 25 1 6324 OSM street map
Area 63240001 >series name 00006324 SRT 879 1
Data MPS L: PID 1, FID 6324, map 3C4F741, (63240001 0), OSM street map >Area 63240001 >series name F: PID 1, FID 6324, OSM map V: OSM map set (0) Best regards Michael -- Michael Reichert www.geofabrik.de Geofabrik GmbH Handelsregister: HRB Mannheim 703657 Amalienstr. 44 Geschaeftsfuehrung: C. Karch, F. Ramm 76133 Karlsruhe Tel: 0721-1803560-3 reichert@geofabrik.de Fax: 0721-1803560-9

Hi Michael, seems you have created your map with the default value of 25, maybe because you gave the option at the wrong place. Make sure to use --draw-priority=40 (or whatever you like) before specifying the input files, not after, like that: java -jar mkgmap.jar ... --draw-priority=40 mydata.osm Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Michael Reichert <michael.reichert@geofabrik.de> Gesendet: Dienstag, 25. April 2017 15:36:16 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] draw-priority – influence rendering order of two maps on a device Hi, Am 25.04.2017 um 14:02 schrieb Gerd Petermann:
Hi Michel,
you can use gmaptool to display this info: gmt -i gmapsupp.img
gmaptool says with the -v option (extract of the full output):
I1019FB0 GMP 2AC00h 6409070 map 1019fb0 (16883632) PID 1, FID 3268, region 0,0 date 30.09.2014 15:19:02 priority 31, parameters 1 4 23 5, locked, signed N: 45.230927, S: 44.499993, W: 15.723581, E: 16.500006 Topo Adria Pro Copyright 1995-2014 by GARMIN Corporation. CP 1252, Western European DEM layers: 4, N: 45.231330, W: 15.723198
All tiles of the large Topo map have a priority of 31and their mapname is consecutive, starting with 1019f6d (16883565) and ending with 1019fb4 (16883636). According to that, my map should be rendered on top but my Garmin Dakota 20 (my testing device) doesn't – neither using a priority above 31 (48) nor below (20). I tried to use a different mapname for my overlay map using the --mapname=16883700 option but that seems not to work. If I read my overlay map using gmaptool, it outputs (full listing): gmt v0.8.220.853b CC BY-SA (C) 2011-2015 AP www.gmaptool.eu Input file: ../output-garmin/overlay.img. File: ../output-garmin/overlay.img, length 11776 Header: 25.04.2017 15:14:59, DSKIMG, XOR 00, V 1.00, Ms 0 Mapset: Jagdgebiet fat: 400h - 600h - 1000h, block 512 maps: 3, sub-files 5 Sub-file fat length MAKEGMAP MPS 600h 91 63240001 RGN 800h 4302 63240001 TRE A00h 709 map 3c4f741 (63240001) date 25.04.2017 15:14:59 priority 25, parameters 1 3 17 0 levels [17,18,20,22,24], zoom [84,3,2,1,0] N: 45.544188, S: 45.375381, W: 14.523518, E: 14.703698 Map data (c) OpenStreetMap and its contributors http://www.openstreetmap.org/copyright This map data is made available under the Open Database License: http://opendatacommons.org/licenses/odbl/1.0/ Any rights in individual contents of the database are licensed under the Database Contents License: http://opendatacommons.org/licenses/dbcl/1.0/ Map created with mkgmap-r3909 Program released under the GPL 63240001 LBL C00h 313 CP 0, ASCII 7-bit sort 00006324 SRT E00h 879 Map length s-f CP prio PID FID name MAKEGMAP MPS 91 1 63240001 MPC 5324 3 25 1 6324 OSM street map
Area 63240001 >series name 00006324 SRT 879 1
Data MPS L: PID 1, FID 6324, map 3C4F741, (63240001 0), OSM street map >Area 63240001 >series name F: PID 1, FID 6324, OSM map V: OSM map set (0) Best regards Michael -- Michael Reichert www.geofabrik.de Geofabrik GmbH Handelsregister: HRB Mannheim 703657 Amalienstr. 44 Geschaeftsfuehrung: C. Karch, F. Ramm 76133 Karlsruhe Tel: 0721-1803560-3 reichert@geofabrik.de Fax: 0721-1803560-9

Hi, I think that draw priority is limited to 31, I don't know what will happen if you set 40. You could try anyway. Michael, what you need is a transparent map. Instead of changing draw order, use --transparent option in mkgmap. This will draw your map over any other non-transparent. Without transparent option, your map would cover and hide any other map with lower draw order, like currently Topo Adria is hiding your map. -- Best regards, Andrzej

Hi Andrzej, Am 25.04.2017 um 16:35 schrieb Andrzej Popowski:
I think that draw priority is limited to 31, I don't know what will happen if you set 40. You could try anyway.
It is written to the file and gmaptool can read it correctly. I build a map with --transparent --draw-priority=34 and the output of gmaptool is:
Input file: ../output-garmin/63240001.img.
File: ../output-garmin/63240001.img, length 9728 Header: 25.04.2017 16:47:35, DSKIMG, XOR 00, V 0.00, Ms 0 Mapset: Ihr Gebiet fat: 400h - 600h - E00h, block 512 maps: 1, sub-files 3
Sub-file fat length 63240001 RGN 600h 4217 63240001 TRE 800h 707 map 3c4f741 (63240001) date 25.04.2017 16:47:35 priority 34, parameters 1 3 17 2, transparent levels [17,18,20,22,24], zoom [84,3,2,1,0] N: 45.544188, S: 45.375381, W: 14.523518, E: 14.703698 Map data (c) OpenStreetMap and its contributors http://www.openstreetmap.org/copyright This map data is made available under the Open Database License: http://opendatacommons.org/licenses/odbl/1.0/ Any rights in individual contents of the database are licensed under the Database Contents License: http://opendatacommons.org/licenses/dbcl/1.0/ Map created with mkgmap-r3909 Program released under the GPL 63240001 LBL A00h 331 CP 65001, Unicode sort
Map length s-f CP prio PID FID name 63240001 MPC 5255 3 65001 34 T
My Garmin Dakota 20 renders it the same way as it renders a transparent map with a lower draw priority, i.e. it doesn't matter. Am 25.04.2017 um 16:35 schrieb Andrzej Popowski:
Michael, what you need is a transparent map. Instead of changing draw order, use --transparent option in mkgmap. This will draw your map over any other non-transparent.
Without transparent option, your map would cover and hide any other map with lower draw order, like currently Topo Adria is hiding your map.
Thank you very much. --transparent works without setting any draw priority. Best regards Michael -- Michael Reichert www.geofabrik.de Geofabrik GmbH Handelsregister: HRB Mannheim 703657 Amalienstr. 44 Geschaeftsfuehrung: C. Karch, F. Ramm 76133 Karlsruhe Tel: 0721-1803560-3 reichert@geofabrik.de Fax: 0721-1803560-9

Hi Michael, priority is saved on a byte, it can contain values up to 255. I have seen values like 60 on some Garmin's marine maps, but for a typical car or topo maps it is usually less than 31. Cgpsmapper manual limits this value to 31. While you can set higher priority, I would stay within common range, 25 is a good default. -- Best regards, Andrzej
participants (3)
-
Andrzej Popowski
-
Gerd Petermann
-
Michael Reichert