Commit: r3393: improve error message when a sub option like floodblocker is

Version mkgmap-r3393 was committed by gerd on Tue, 06 Jan 2015 improve error message when a sub option like floodblocker is used in combination with --precomp-sea

I am trying to use an extended line type for an overlay but I'm not successfull. The following information I found in style-manual.pdf on page 30: 2. If a type is >= 0x010000, it is an extended type, which can be used for points, lines, and polygons. This means, extended types for lines are supported, but I could not find any further description in this document. In the wiki http://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/Polyline_Types I found this information: For use in mkgmap styles the type and subtype of a polyline are simply concatenated: type 0x12 and subtype 0x34 become 0x1234. As the marine types are marked in mkgmap notation by adding 0x10000 to them, so the type 0x12 and subtype 0x34 become 0x11234 as a marine type. I have tried with linetype 0x1901, but I could not address it neither as 0x1901 nor as 0x11901. Does anybody have an example, how extended line types above 0x00-0x3f can be used? Walter

Hi Walter, I am not sure about the marine types, but you may look at Minkos Openfietsmap style and map making procedure here: http://www.openfietsmap.nl/procedure which shows how to use extended types with a type file. I think Marine Devices do not support typ files. Gerd
From: Walter.Schloegl-Resch@aon.at To: mkgmap-dev@lists.mkgmap.org.uk Date: Tue, 6 Jan 2015 13:56:25 +0100 Subject: [mkgmap-dev] How to use extended line types
I am trying to use an extended line type for an overlay but I'm not successfull.
The following information I found in style-manual.pdf on page 30:
2. If a type is >= 0x010000, it is an extended type, which can be used for points, lines, and polygons.
This means, extended types for lines are supported, but I could not find any further description in this document.
In the wiki http://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/Polyline_Types I found this information:
For use in mkgmap styles the type and subtype of a polyline are simply concatenated: type 0x12 and subtype 0x34 become 0x1234. As the marine types are marked in mkgmap notation by adding 0x10000 to them, so the type 0x12 and subtype 0x34 become 0x11234 as a marine type.
I have tried with linetype 0x1901, but I could not address it neither as 0x1901 nor as 0x11901. Does anybody have an example, how extended line types above 0x00-0x3f can be used?
Walter
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Walter,
I have tried with linetype 0x1901, but I could not address it neither as 0x1901 nor as 0x11901.
I think there is no subtypes for line 0x19. Line 0x1901 is probably created as 0x19 (or 0x1900). You can use lines from 0x01 to 0x2b and then from 0x10001 up. Try for example 11901. -- Best regards, Andrzej

Thanks a lot for your help, now it's working fine. Gerd, your tip with this website is very helpful, I will have to read and learn a lot from this description. Andrzej, you got the point. When I switched from 0x1901 to 0x10001 it worked. I think it would be a good idea to document this somewhere (maybe in style-manual.pdf) Walter -----Ursprüngliche Nachricht----- From: Andrzej Popowski Sent: Tuesday, January 06, 2015 2:59 PM To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] How to use extended line types Hi Walter,
I have tried with linetype 0x1901, but I could not address it neither as 0x1901 nor as 0x11901.
I think there is no subtypes for line 0x19. Line 0x1901 is probably created as 0x19 (or 0x1900). You can use lines from 0x01 to 0x2b and then from 0x10001 up. Try for example 11901. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

The following command highway=* & network=e-road works fine, if the tag network=e-road is directly attached to the road. But in most cases it is attached via a relation, and in these cases it is not evaluated. In my relations file there are only rules for type=boundary | type=multipolygon type=route & (route=bus | route=trolleybus | route=ferry | route=subway | route=train | route=tram) type=route & (route=ski) I am not very familier with the relations commands. Is there a way to refer to network=e-road via the relations file? Walter

Hi Walter, I think Minkos style contains samples for that as well: type=route & route=bicycle & network=ncn { apply { set ncn_from_relation=yes; set nname='${name}'; set nref='$(nref)/${ref}' | '${ref}'; } } Gerd
From: Walter.Schloegl-Resch@aon.at To: mkgmap-dev@lists.mkgmap.org.uk Date: Tue, 6 Jan 2015 17:33:39 +0100 Subject: [mkgmap-dev] How to evaluate network=e-road if it's in a relation
The following command
highway=* & network=e-road
works fine, if the tag network=e-road is directly attached to the road. But in most cases it is attached via a relation, and in these cases it is not evaluated.
In my relations file there are only rules for type=boundary | type=multipolygon type=route & (route=bus | route=trolleybus | route=ferry | route=subway | route=train | route=tram) type=route & (route=ski)
I am not very familier with the relations commands. Is there a way to refer to network=e-road via the relations file?
Walter
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, thanks for your help, it’s working. Using mkgmap makes a lot of fun, because it’s a perfect software and because of this premium support. I think it would be worth to add this also to the default style. type=route & route=road { apply { set network='${network}'; set ref='${ref}'; } } Also for route=ski I added a copy of piste:type even if ref and name is missing. But piste seems to be not used in default style. Walter From: Gerd Petermann Sent: Tuesday, January 06, 2015 5:45 PM To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] How to evaluate network=e-road if it's in a relation Hi Walter, I think Minkos style contains samples for that as well: type=route & route=bicycle & network=ncn { apply { set ncn_from_relation=yes; set nname='${name}'; set nref='$(nref)/${ref}' | '${ref}'; } } Gerd
From: Walter.Schloegl-Resch@aon.at To: mkgmap-dev@lists.mkgmap.org.uk Date: Tue, 6 Jan 2015 17:33:39 +0100 Subject: [mkgmap-dev] How to evaluate network=e-road if it's in a relation
The following command
highway=* & network=e-road
works fine, if the tag network=e-road is directly attached to the road. But in most cases it is attached via a relation, and in these cases it is not evaluated.
In my relations file there are only rules for type=boundary | type=multipolygon type=route & (route=bus | route=trolleybus | route=ferry | route=subway | route=train | route=tram) type=route & (route=ski)
I am not very familier with the relations commands. Is there a way to refer to network=e-road via the relations file?
Walter
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------------------------------------------------------------------------- _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

In the past I did not use a background polygon on my Oregon. But since the default green color was not the best, I defined a background with a light beige color. Since this change the blue color for the see is gone. (Lakes are still shown) I’m sure there is a solution to show the see togethere with a background, but all articles I found wer not helpful. The land polygon is defined as 0x4b and it is the only polygon with draw-prio = 1. The sea polygon is defined as 0x32 and it has draw-prio = 2. The last commands in polygons file are natural=sea [0x32 resolution 14] natural=land [0x4b resolution 14] Splitter Option --keep-complete=true mkgmap Option precomp-sea=sea_20141027.zip generate-sea=multipolygon Is there anything else I could check? Walter

I tried now switching the levels, sea with prio 1 and land with prio 2, but still the sea is not shown. From: Walter Schlögl Sent: Tuesday, January 06, 2015 10:50 PM To: Development list for mkgmap Subject: [mkgmap-dev] How to show land and see In the past I did not use a background polygon on my Oregon. But since the default green color was not the best, I defined a background with a light beige color. Since this change the blue color for the see is gone. (Lakes are still shown) I’m sure there is a solution to show the see togethere with a background, but all articles I found wer not helpful. The land polygon is defined as 0x4b and it is the only polygon with draw-prio = 1. The sea polygon is defined as 0x32 and it has draw-prio = 2. The last commands in polygons file are natural=sea [0x32 resolution 14] natural=land [0x4b resolution 14] Splitter Option --keep-complete=true mkgmap Option precomp-sea=sea_20141027.zip generate-sea=multipolygon Is there anything else I could check? Walter -------------------------------------------------------------------------------- _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

The land polygon is defined as 0x4b and it is the only polygon with draw-prio = 1. The sea polygon is defined as 0x32 and it has draw-prio = 2.
I have the opposite, sea prio 1 and land 2, maybe that helps? You could also try another polygon for land, 0x27 or an extended one like 0x10100

Hi Walter,
The last commands in polygons file are natural=sea [0x32 resolution 14] natural=land [0x4b resolution 14]
Don't use object 0x4b in style, mkgmap should create it automatically. Use lowest priority for 0x4b in style or define only color without giving a priority to polygon 0x4b. -- Best regards, Andrzej

Hi Andrzej, I have corrected the errors in my TYP and style, but the sea is still not visible. Here are my last parameters. polygons file natural=sea { echo "mapping natural=sea" } [0x32 resolution 14] # level 1 natural=land [0x10000 resolution 14] # level 2 The echo command is shown in logfile, so natural=sea is available. In TYP file I have deleted Polygon 4b (was used as background) and added Polygon 100/00 with Prio 2. 0x32 (Sea) is the only Polygon with Prio 1. Did you suggest these changes or did I understand you in a wrong way? Best regards, Walter -----Ursprüngliche Nachricht----- From: Andrzej Popowski Sent: Wednesday, January 07, 2015 10:33 AM To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] How to show land and see Hi Walter,
The last commands in polygons file are natural=sea [0x32 resolution 14] natural=land [0x4b resolution 14]
Don't use object 0x4b in style, mkgmap should create it automatically. Use lowest priority for 0x4b in style or define only color without giving a priority to polygon 0x4b. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Walter, some clarifications: object 0x4b is a special kind of polygon, it is used as a map background and covers whole map area. You should not use it in style, because it is created by mkgmap (except for transparent maps). You can use polygon 0x4b in TYP to change background color of a map. Priorities that you set for polygons in TYP actually are draw orders. Polygon with draw order 1 is drawn before polygon with draw order 2. If polygons overlap, then polygon with higher draw order will be visible. I can't guess why you have problems with sea. I suggest that you revert to the solution, which worked for you and then only add polygon 0x4b to TYP file, without draw order or with lowest draw order. -- Best regards, Andrzej

Hi Andrzej, your suggestion to revert back to the last working version brought me directly to the solution. I had 2 maps in the same directory with the same TYP. All changes I made to the TYP of one map where ignored. The device just took the info from the TYP of the other map. The second error I made: When I deleted the prio of the default background 4b, TypViewer automatically gave it the lowest prio again. Now my sea is back, I'm having a custom background via Polygon 0x10000 and one command in Style, natural=land [0x10000 resolution 14] I could not bring it to work with the default Background Polygon 4b, but I don't care about that. It's working and I'm happy. Thanks a lot for your support. Best regards, Walter PS: Now also the overview map is working correct and visible. I am wondering, where mkgmap takes the info about the whole world. -----Ursprüngliche Nachricht----- From: Andrzej Popowski Sent: Wednesday, January 07, 2015 1:02 PM To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] How to show land and see Hi Walter, some clarifications: object 0x4b is a special kind of polygon, it is used as a map background and covers whole map area. You should not use it in style, because it is created by mkgmap (except for transparent maps). You can use polygon 0x4b in TYP to change background color of a map. Priorities that you set for polygons in TYP actually are draw orders. Polygon with draw order 1 is drawn before polygon with draw order 2. If polygons overlap, then polygon with higher draw order will be visible. I can't guess why you have problems with sea. I suggest that you revert to the solution, which worked for you and then only add polygon 0x4b to TYP file, without draw order or with lowest draw order. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (5)
-
Andrzej Popowski
-
Gerd Petermann
-
Minko
-
svn commit
-
Walter Schlögl