probably dumb question about style type

Hi, I feel like I'm missing something obvious… so sorry in advance… I'm new to this program. Starting from this https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/POI_Types, I wanted to set points with tags 0x0050, 0x0051 etc, in a style For instance a line in the "points" file of the style to draw speed cameras... highway=speed_camera | enforcement=maxspeed | enforcement=traffic_signals [0x0052 resolution 24] When trying to add this line, I get Error in style: Error: invalid type 0x0052 for POINT in style file points, line 300 I'm using r4240 version. The command is mkgmap --dem=srtm --max-jobs --tdbfile --nsis --output-dir=target_dir --mapname=OSM_FRANCE_light --country-name="FRANCE" --family-id=6324 --family-name="OSM_light france" --series-name="OSM france map" --area-name="France" --country-abbr="FRA" --style-file=./road_only --precomp-sea=sea.zip --generate-sea --route --drive-on=detect,right --process-destination --process-exits --index --bounds=bounds.zip --location-autofill=is_in,nearest --x-split-name-index --housenumbers --remove-ovm-work-files --verbose -c ./template.args Regards Marc

Hi Marc, The style manuals says: If the type is not extended, it must be >= 0x0100 for a point, < 0x3f for a line, and < 0x7f for a polygon. This suggests that single byte values are not valid for points. If you change it to 0x0152 it should work. Regards, Mike -----Original Message----- From: Marc Cousin [mailto:cousinmarc@gmail.com] Sent: 18 September 2018 09:15 To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] probably dumb question about style type Hi, I feel like I'm missing something obvious… so sorry in advance… I'm new to this program. Starting from this https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/POI_Types, I wanted to set points with tags 0x0050, 0x0051 etc, in a style For instance a line in the "points" file of the style to draw speed cameras... highway=speed_camera | enforcement=maxspeed | enforcement=traffic_signals [0x0052 resolution 24] When trying to add this line, I get Error in style: Error: invalid type 0x0052 for POINT in style file points, line 300 I'm using r4240 version. The command is mkgmap --dem=srtm --max-jobs --tdbfile --nsis --output-dir=target_dir --mapname=OSM_FRANCE_light --country-name="FRANCE" --family-id=6324 --family-name="OSM_light france" --series-name="OSM france map" --area-name="France" --country-abbr="FRA" --style-file=./road_only --precomp-sea=sea.zip --generate-sea --route --drive-on=detect,right --process-destination --process-exits --index --bounds=bounds.zip --location-autofill=is_in,nearest --x-split-name-index --housenumbers --remove-ovm-work-files --verbose -c ./template.args Regards Marc

So, yes it was a dumb question but it still doesn't work… Error in style: Error: invalid type 0x0152 for POINT in style file points, line 300 It must be something very close to this, but there is still a detail missing :/ On 9/18/18 5:50 PM, Mike Baggaley wrote:
Hi Marc,
The style manuals says:
If the type is not extended, it must be >= 0x0100 for a point, < 0x3f for a line, and < 0x7f for a polygon.
This suggests that single byte values are not valid for points. If you change it to 0x0152 it should work.
Regards, Mike
-----Original Message----- From: Marc Cousin [mailto:cousinmarc@gmail.com] Sent: 18 September 2018 09:15 To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] probably dumb question about style type
Hi,
I feel like I'm missing something obvious… so sorry in advance… I'm new to this program.
Starting from this https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/POI_Types, I wanted to set points with tags 0x0050, 0x0051 etc, in a style
For instance a line in the "points" file of the style to draw speed cameras...
highway=speed_camera | enforcement=maxspeed | enforcement=traffic_signals [0x0052 resolution 24]
When trying to add this line, I get
Error in style: Error: invalid type 0x0052 for POINT in style file points, line 300
I'm using r4240 version.
The command is mkgmap --dem=srtm --max-jobs --tdbfile --nsis --output-dir=target_dir --mapname=OSM_FRANCE_light --country-name="FRANCE" --family-id=6324 --family-name="OSM_light france" --series-name="OSM france map" --area-name="France" --country-abbr="FRA" --style-file=./road_only --precomp-sea=sea.zip --generate-sea --route --drive-on=detect,right --process-destination --process-exits --index --bounds=bounds.zip --location-autofill=is_in,nearest --x-split-name-index --housenumbers --remove-ovm-work-files --verbose -c ./template.args
Regards
Marc
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

The sub type value 52 is too high. Not sure if 0x1f or 0x2f is the limit. Ciao Gerd ---- Marc Cousin schrieb ---- So, yes it was a dumb question but it still doesn't work… Error in style: Error: invalid type 0x0152 for POINT in style file points, line 300 It must be something very close to this, but there is still a detail missing :/ On 9/18/18 5:50 PM, Mike Baggaley wrote:
Hi Marc,
The style manuals says:
If the type is not extended, it must be >= 0x0100 for a point, < 0x3f for a line, and < 0x7f for a polygon.
This suggests that single byte values are not valid for points. If you change it to 0x0152 it should work.
Regards, Mike
-----Original Message----- From: Marc Cousin [mailto:cousinmarc@gmail.com] Sent: 18 September 2018 09:15 To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] probably dumb question about style type
Hi,
I feel like I'm missing something obvious… so sorry in advance… I'm new to this program.
Starting from this https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/POI_Types, I wanted to set points with tags 0x0050, 0x0051 etc, in a style
For instance a line in the "points" file of the style to draw speed cameras...
highway=speed_camera | enforcement=maxspeed | enforcement=traffic_signals [0x0052 resolution 24]
When trying to add this line, I get
Error in style: Error: invalid type 0x0052 for POINT in style file points, line 300
I'm using r4240 version.
The command is mkgmap --dem=srtm --max-jobs --tdbfile --nsis --output-dir=target_dir --mapname=OSM_FRANCE_light --country-name="FRANCE" --family-id=6324 --family-name="OSM_light france" --series-name="OSM france map" --area-name="France" --country-abbr="FRA" --style-file=./road_only --precomp-sea=sea.zip --generate-sea --route --drive-on=detect,right --process-destination --process-exits --index --bounds=bounds.zip --location-autofill=is_in,nearest --x-split-name-index --housenumbers --remove-ovm-work-files --verbose -c ./template.args
Regards
Marc
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Limit of subtype is &1f. Marc, you should try 0X51 this is the same as 0x5100 Nick On 18/09/2018 17:27, Gerd Petermann wrote:
The sub type value 52 is too high. Not sure if 0x1f or 0x2f is the limit. Ciao Gerd
---- Marc Cousin schrieb ----
So, yes it was a dumb question
but it still doesn't work…
Error in style: Error: invalid type 0x0152 for POINT in style file points, line 300
It must be something very close to this, but there is still a detail missing :/
On 9/18/18 5:50 PM, Mike Baggaley wrote:
Hi Marc,
The style manuals says:
If the type is not extended, it must be >= 0x0100 for a point, < 0x3f for a line, and < 0x7f for a polygon.
This suggests that single byte values are not valid for points. If you change it to 0x0152 it should work.
Regards, Mike
-----Original Message----- From: Marc Cousin [mailto:cousinmarc@gmail.com] Sent: 18 September 2018 09:15 To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] probably dumb question about style type
Hi,
I feel like I'm missing something obvious… so sorry in advance… I'm new to this program.
Starting from this https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/POI_Types, I wanted to set points with tags 0x0050, 0x0051 etc, in a style
For instance a line in the "points" file of the style to draw speed cameras...
highway=speed_camera | enforcement=maxspeed | enforcement=traffic_signals [0x0052 resolution 24]
When trying to add this line, I get
Error in style: Error: invalid type 0x0052 for POINT in style file points, line 300
I'm using r4240 version.
The command is mkgmap --dem=srtm --max-jobs --tdbfile --nsis --output-dir=target_dir --mapname=OSM_FRANCE_light --country-name="FRANCE" --family-id=6324 --family-name="OSM_light france" --series-name="OSM france map" --area-name="France" --country-abbr="FRA" --style-file=./road_only --precomp-sea=sea.zip --generate-sea --route --drive-on=detect,right --process-destination --process-exits --index --bounds=bounds.zip --location-autofill=is_in,nearest --x-split-name-index --housenumbers --remove-ovm-work-files --verbose -c ./template.args
Regards
Marc
_______________________________________________ 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

From the code, I think 0x1f. I still don't get what I'm supposted to use in my style though to display those non extended values :) On 9/18/18 6:27 PM, Gerd Petermann wrote:
The sub type value 52 is too high. Not sure if 0x1f or 0x2f is the limit. Ciao Gerd
---- Marc Cousin schrieb ----
So, yes it was a dumb question
but it still doesn't work…
Error in style: Error: invalid type 0x0152 for POINT in style file points, line 300
It must be something very close to this, but there is still a detail missing :/
On 9/18/18 5:50 PM, Mike Baggaley wrote:
Hi Marc,
The style manuals says:
If the type is not extended, it must be >= 0x0100 for a point, < 0x3f for a line, and < 0x7f for a polygon.
This suggests that single byte values are not valid for points. If you change it to 0x0152 it should work.
Regards, Mike
-----Original Message----- From: Marc Cousin [mailto:cousinmarc@gmail.com] Sent: 18 September 2018 09:15 To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] probably dumb question about style type
Hi,
I feel like I'm missing something obvious… so sorry in advance… I'm new to this program.
Starting from this https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/POI_Types, I wanted to set points with tags 0x0050, 0x0051 etc, in a style
For instance a line in the "points" file of the style to draw speed cameras...
highway=speed_camera | enforcement=maxspeed | enforcement=traffic_signals [0x0052 resolution 24]
When trying to add this line, I get
Error in style: Error: invalid type 0x0052 for POINT in style file points, line 300
I'm using r4240 version.
The command is mkgmap --dem=srtm --max-jobs --tdbfile --nsis --output-dir=target_dir --mapname=OSM_FRANCE_light --country-name="FRANCE" --family-id=6324 --family-name="OSM_light france" --series-name="OSM france map" --area-name="France" --country-abbr="FRA" --style-file=./road_only --precomp-sea=sea.zip --generate-sea --route --drive-on=detect,right --process-destination --process-exits --index --bounds=bounds.zip --location-autofill=is_in,nearest --x-split-name-index --housenumbers --remove-ovm-work-files --verbose -c ./template.args
Regards
Marc
_______________________________________________ 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

Hi Marc
From the code, I think 0x1f. I still don't get what I'm supposted to use in my style though to display those non extended values:)
In my opinion the way you wrote it is correct, and mkgmap should not be giving an error for it. That should be fixed, but in the mean time, everything in the first table with type 0x00 at https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/POI_Types should be regarded as having a type with no subtype. So column "Sub-type" in that table is better thought of as being the type and 0xYY can be written as 0xYY00. So you can write 0x5200 instead of 0x0052. They (should) mean exactly the same thing to mkgmap. Removing the check allows both to be used and give the same results. I'm not sure what the correct check is, perhaps: if (type >= 0x100) { // This a type and sub-type. Check max sub-type of 0x2f (or 1f?) if ((type & 0xff) > 0x2f) return false; } else if (type > 0x7f) { // But, perhaps all types are allowed and this // is not needed? return false; } Best wishes, ..Steve

@Steve [Check max sub-type of 0x2f (or 1f?)] The way multiple types with the same draworder in a TYP file are saved relies on subtypes being no higher than 1f. In other words, if sub types were given a value >1f then typ files are unable to give accurate draworders for types with the same draworder. Extra pois (as found in city navitgator & NT maps) do not have this restriction and and can have a 4byte value. HTH Nick On 19/09/2018 13:47, Steve Ratcliffe wrote:
Hi Marc
From the code, I think 0x1f. I still don't get what I'm supposted to use in my style though to display those non extended values:)
In my opinion the way you wrote it is correct, and mkgmap should not be giving an error for it.
That should be fixed, but in the mean time, everything in the first table with type 0x00 at https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/POI_Types should be regarded as having a type with no subtype. So column "Sub-type" in that table is better thought of as being the type and 0xYY can be written as 0xYY00.
So you can write 0x5200 instead of 0x0052. They (should) mean exactly the same thing to mkgmap. Removing the check allows both to be used and give the same results.
I'm not sure what the correct check is, perhaps:
if (type >= 0x100) { // This a type and sub-type. Check max sub-type of 0x2f (or 1f?) if ((type & 0xff) > 0x2f) return false; } else if (type > 0x7f) { // But, perhaps all types are allowed and this // is not needed? return false; }
Best wishes, ..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Nick
[Check max sub-type of 0x2f (or 1f?)]
The way multiple types with the same draworder in a TYP file are saved relies on subtypes being no higher than 1f.
The POI types wiki page I was looking at claimed sub-types up to 2f, but I am sure you are right and that 0x1f is the correct maximum. ..Steve
In other words, if sub types were given a value >1f then typ files are unable to give accurate draworders for types with the same draworder.
Extra pois (as found in city navitgator & NT maps) do not have this restriction and and can have a 4byte value.
HTH
Nick

Hi, I think that safe limit for subtype is 0x1F, but for many types values up to 0x3F can be used. I have creates some test maps and found that following values work: POI_type_start, POI_type_end, subtype_less_than 0x01, 0x11, 1 0x14, 0x15, 0x40 0x16, 0x1D, 0x20 0x1E, 0x1E, 0x40 0x20, 0x28, 0x40 0x2A, 0x30, 0x20 0x40, 0x59, 0x40 0x5D, 0x5E, 0x40 0x62, 0x63, 0x40 0x64, 0x66, 0x40 0x67, 0xFF, 0x40 0x100, 0x100, 0x20 0x101, 0x109, 0x20 // 0x10A doesn't work 0x10B, 0x13F, 0x20 // range 140-1FF is displayed For marine map it is a bit more limited. Marine types are in range 0x101 to 0x1FE, but cGPSmapper adds internally 0x100, so in a mp source, these are values 0x01 - 0xFE. Here values in cGPSmapper convention: POI_type_start, POI_type_end, subtype_less_than, attributes // 0x00 doesn't work 0x01, 0x01, 0x20, light_color | light_type | note 0x02, 0x02, 0x20, foundation_color | light_type | note 0x03, 0x04, 0x20, depth 0x05, 0x05, 0x20, color 0x06, 0x06, 0x20 0x07, 0x07, 0x0D // 0x070E display error 0x08, 0x08, 0x20 0x09, 0x09, 0x20, facility | text // 0x0A doesn't work 0x0B, 0x11, 0x20 0x12, 0x12, 0x20, web_page 0x13, 0xFE, 0x20 -- Best regards, Andrzej

I managed to get a camera icon using 0x5201 No idea why it works though… I tried every not-completely-silly combination until I got something :) On 9/20/18 11:09 PM, Steve Ratcliffe wrote:
Hi Andrzej
I think that safe limit for subtype is 0x1F, but for many types values up to 0x3F can be used.
Are the ones above 0x1f different though? Or is it just ignoring the top bits?
Is 0x3f a different icon to 0x1f for example?
Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Well, no, this is silly, 0x52xx are for attractions, so yes I get a camera, but probably not the correct one :( On 9/21/18 9:11 AM, Marc Cousin wrote:
I managed to get a camera icon using 0x5201
No idea why it works though… I tried every not-completely-silly combination until I got something :)
On 9/20/18 11:09 PM, Steve Ratcliffe wrote:
Hi Andrzej
I think that safe limit for subtype is 0x1F, but for many types values up to 0x3F can be used.
Are the ones above 0x1f different though? Or is it just ignoring the top bits?
Is 0x3f a different icon to 0x1f for example?
Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Marc
I managed to get a camera icon using 0x5201
No idea why it works though… I tried every not-completely-silly combination until I got something:)
Does that mean you do not get a camera with 0x5200? I do get a camera on (an old) mapsource. It is possible that 0x52 with no sub-type and 0x52 with subtype 0x00 are different to Garmin devices. Although I believed that they were the same, or that a sub-type of zero was not allowed or useful when I wrote the code, perhaps incorrectly. Steve

Hi Steve,
Are the ones above 0x1f different though? Or is it just ignoring the top bits?
When a typ file is attached, then icons are repeated, icon for subtyp 0x00 is the same as for subtyp 0x20. I can't create icon for subtyp greater than 0x1F in TYPViewr, is there a limit in typ structure? In BaseCamp there are some default icons, for example for POI 0x5904, 0x640E, 0x6616. These icons aren't repeated with higher subtyp values. -- Best regards, Andrzej

Hi Andrzej is there a limit in typ structure? All I can say is that polygons can't have subfiles>1F as a consequence of the way draworders are 'zipped' in a TYP file when several polygons share the same draworder . The result of a polygon having a subtype of say 20 will create inaccurate draworders. This is why TYPviewer /TYPwiz etc restrict subtypes to a max of 1f. Does cgpsmapper enable you to create subtypes >1f? r Nick On 21/09/2018 12:25, Andrzej Popowski wrote:
is there a limit in typ structure?
participants (6)
-
Andrzej Popowski
-
Gerd Petermann
-
Marc Cousin
-
Mike Baggaley
-
osm@pinns
-
Steve Ratcliffe