logo separator

[mkgmap-dev] probably dumb question about style type

From osm@pinns osm at pinns.co.uk on Wed Sep 19 14:20:23 BST 2018

@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 at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



More information about the mkgmap-dev mailing list