logo separator

[mkgmap-dev] [PATCH v4] - Code around highway shield crap when sorting labels

From Felix Hartmann extremecarver at googlemail.com on Sun Mar 21 12:17:02 GMT 2010

On 21.03.2010 10:52, Mark Burton wrote:
> Felix,
>
>    
>>> Sorry, once again, I am nonplussed by the style syntax, what does the
>>> 6:4 mean in the above?
>>>
>>>
>>>        
>> This means 6 characters maximum, or 4 non numeric characters maximum if
>> I remember it correctly. Default is 7:5 if I remember correctly.
>>      
> OK - thanks.
>
>    
>>> Well, the 0x2f and 0x2e are the 6-bit encodings of the Oval and Box
>>> shields so at least one of those matches what your doing above but I
>>> can't see how the Oval code is getting in there. Do you have some other
>>> rule that adds an Oval shield?
>>>
>>>        
>> No, the full rules for the highway shields are as follows (I don't think
>> there is a bug inside on my part):
>>
>> ( extremecarver=mr | route=mtb )&  ref=*                             {
>> set name='${ref|hig00002f4b | 01 38 00                | 3 byte stream
>>      
> hway-symbol:hbox:6:4} ${name}' |
>    
>> '${ref|highway-symbol:hbox:6:4}'; add display_name='${name}'}
>>
>> extremecarver5=bike&  ref=*&  extremecarver!=mr&  route!=mtb
>> { set name='${ref|highway-symbol:box:6:4} ${name}' |
>> '${ref|highway-symbol:box:6:4}'; add display_name='${name}'}
>>
>> highway=*&  ref=*&  extremcaver5!=bike&  extremecarver!=mr&  route!=mtb
>> { set name='${ref|highway-symbol:oval:6:4} ${name}' |
>> '${ref|highway-symbol:oval:6:4}'; add display_name='${name}'}
>>      
> Yes, you do have another rule that adds an oval shield (the last one
> above). So what's happening is that two of the rules are matching and
> you are getting both a box and an oval shield added to the name - and
> that's badness.
>    
Well that has not been the problem. I rather think that "set name" does 
not work for highway shields. I now changed the lines to:

( extremecarver=mr | route=mtb ) & ref=*                             
{name '${ref|highway-symbol:hbox:6:4} ${name}' | 
'${ref|highway-symbol:hbox:6:4}' | '${name}'; add display_name='${name}'}
( extremecarver5=bike & ref=* ) & extremecarver!=mr & route!=mtb        
{name '${ref|highway-symbol:box:6:4} ${name}'  | 
'${ref|highway-symbol:box:6:4}'  | '${name}'; add display_name='${name}'}
highway=* & ref=* & extremcaver5!=bike & extremecarver!=mr & route!=mtb 
{name '${ref|highway-symbol:oval:6:4} ${name}' | 
'${ref|highway-symbol:oval:6:4}' | '${name}'; add display_name='${name}'}

Which works very well - even though the result should in theory be 
identical.
>    
>>> So I wonder if the problem is that your ending up with a highway shield
>>> code embedded in the name rather than being a prefix. Perhaps, it
>>> can only cope with prefix shields.
>>>
>>>        
>> I don't understand what you mean with /being a prefix/.
>>      
> What I mean is that the highway shield code has to prefix (go at the
> front) of the name and not be embedded within the name string.
>    
Okay, now I understand. However the highway shield always prefixed the 
name. I do know that it is not possible to add the ref to the end of the 
name if displaying highway-shields. (except for display_name)
> Mark
> _______________________________________________
> 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