logo separator

[mkgmap-dev] Append Name with general rules via style-file

From Felix Hartmann extremecarver at googlemail.com on Tue Aug 4 19:25:40 BST 2009

Torsten Leistikow wrote:
> Mark Burton schrieb:
>   
>> This is not a comment on your proposed scheme but I do believe that the
>> current handling of name and ref (and the highway shields, etc.) is
>> completely fucked up. IMHO, munging the element name and its refs
>> together in the style file is completely bogus.
>>     
>
> I think the problem (or at least part of it) is the fact, the mkgmap
> rules consist out of three parts:
>
> 1. The pattern part for identifying the applicable rule. This part is
> mandatory.
>
> 2. The action part. This part is optional.
>
> 3. The conversion part. This part again is mandatory.
>
> The name and reference handling in the style file now defines rules,
> consisting out of only the pattern and the action part and leaving out
> the conversion part. This can't be handled my mkgmap, so internally the
> incomplete rule is combined/mixed with some other rules in the style.
>
> In my mail from 31st of July I proposed a fix for this problem, but I
> didn't had the time yet, to implement/test such a modification.
>
> Gruss
> Torsten
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>   
Well I tested a bit more today. The big problem is that the rules don't 
allways work, sometimes they do, sometimes the same rule fails.

This is in my overlays file:
type=route & route=bicycle { apply {set route=bicycle; set name1='CRT 
${name}'} }
type=route & route=mtb { apply { set route=mtb; set name1='MRT ${name}'} }
type=route & route=mountainbike { apply { set route=mtb; set name1='MRT 
${name}'} }
type=route & route=ferry { apply { set route=ferry; set name='Ferry 
${name}'} }
type=route & route=hiking { apply { set route=hiking; set name1='HKRT 
${name}'} }
type=route & route=foot { apply { set route=foot; set name1='FTRT 
${name}'} }

And this is supposed to catch it in the lines file, however it does not 
work every time, sometimes even the road name will be deleted and 
exchanged by the route name, sometimes the other way around. I'm a bit 
clueless why this happens, nearly every time the 
mtb:scale/mtb:scale:uphill part fails, though sometimes it does work 
(the commented try worked even worse.) ......:

Can anyone see a bug in here?

Lines-File:
highway=*  { name '${name} (${ref})' | '${ref}' | '${name}' }
highway=* { name '${name} ${name1}' | '${name1}' | '${name}' }
# highway=* {name '${name} ${name1} (${ref})' | '${name1} ${ref}' | 
'${name1} ${name}' | '${name1}' | '${name} (${ref})' | '${ref}' | '${name}'}

mtb:scale=0  & mtb:scale:uphill=0 & route=mtb { name 'mtbrt00 ${name}' | 
'mtbrt00' }
mtb:scale=0  & mtb:scale:uphill=1 & route=mtb { name 'mtbrt01 ${name}' | 
'mtbrt01' }
mtb:scale=0  & mtb:scale:uphill=2 & route=mtb { name 'mtbrt02 ${name}' | 
'mtbrt02' }
mtb:scale=0  & mtb:scale:uphill=3 & route=mtb { name 'mtbrt03 ${name}' | 
'mtbrt03' }
mtb:scale=0  & mtb:scale:uphill=4 & route=mtb { name 'mtbrt04 ${name}' | 
'mtbrt04' }
mtb:scale=0  & mtb:scale:uphill=5 & route=mtb { name 'mtbrt05 ${name}' | 
'mtbrt05' }
mtb:scale=1  & mtb:scale:uphill=1 & route=mtb { name 'mtbrt11 ${name}' | 
'mtbrt11' }
mtb:scale=1  & mtb:scale:uphill=2 & route=mtb { name 'mtbrt12 ${name}' | 
'mtbrt12' }
mtb:scale=1  & mtb:scale:uphill=3 & route=mtb { name 'mtbrt13 ${name}' | 
'mtbrt13' }
mtb:scale=1  & mtb:scale:uphill=4 & route=mtb { name 'mtbrt14 ${name}' | 
'mtbrt14' }
mtb:scale=1  & mtb:scale:uphill=5 & route=mtb { name 'mtbrt15 ${name}' | 
'mtbrt15' }
mtb:scale=2  & mtb:scale:uphill=2 & route=mtb { name 'mtbrt22 ${name}' | 
'mtbrt22' }
mtb:scale=2  & mtb:scale:uphill=3 & route=mtb { name 'mtbrt23 ${name}' | 
'mtbrt23' }
mtb:scale=2  & mtb:scale:uphill=4 & route=mtb { name 'mtbrt24 ${name}' | 
'mtbrt24' }
mtb:scale=2  & mtb:scale:uphill=5 & route=mtb { name 'mtbrt25 ${name}' | 
'mtbrt25' }
mtb:scale=3  & mtb:scale:uphill=3 & route=mtb { name 'mtbrt33 ${name}' | 
'mtbrt33' }
mtb:scale=3  & mtb:scale:uphill=4 & route=mtb { name 'mtbrt34 ${name}' | 
'mtbrt34' }
mtb:scale=3  & mtb:scale:uphill=5 & route=mtb { name 'mtbrt35 ${name}' | 
'mtbrt35' }
mtb:scale=4  & mtb:scale:uphill=4 & route=mtb { name 'mtbrt44 ${name}' | 
'mtbrt44' }
mtb:scale=4  & mtb:scale:uphill=5 & route=mtb { name 'mtbrt45 ${name}' | 
'mtbrt45' }
mtb:scale=5  & mtb:scale:uphill=5 & route=mtb { name 'mtbrt55 ${name}' | 
'mtbrt55' }

mtb:scale:uphill=0 & route=mtb { name 'mtbrt.0 ${name}' | 'mtbrt.0' }
mtb:scale:uphill=1 & route=mtb { name 'mtbrt.1 ${name}' | 'mtbrt.1' }
mtb:scale:uphill=2 & route=mtb { name 'mtbrt.2 ${name}' | 'mtbrt.2' }
mtb:scale:uphill=3 & route=mtb { name 'mtbrt.3 ${name}' | 'mtbrt.3' }
mtb:scale:uphill=4 & route=mtb { name 'mtbrt.4 ${name}' | 'mtbrt.4' }
mtb:scale:uphill=5 & route=mtb { name 'mtbrt.5 ${name}' | 'mtbrt.5' }

mtb:scale=0 & route=mtb { name 'mtbrt0. ${name}' | 'mtbrt0.' }
mtb:scale=1 & route=mtb { name 'mtbrt1. ${name}' | 'mtbrt1.' }
mtb:scale=2 & route=mtb { name 'mtbrt2. ${name}' | 'mtbrt2.' }
mtb:scale=3 & route=mtb { name 'mtbrt3. ${name}' | 'mtbrt3.' }
mtb:scale=4 & route=mtb { name 'mtbrt4. ${name}' | 'mtbrt4.' }
mtb:scale=5 & route=mtb { name 'mtbrt5. ${name}' | 'mtbrt5.' }

mtb:scale=0  & mtb:scale:uphill=0 { name 'mtb00 ${name}' | 'mtb00' }
mtb:scale=0  & mtb:scale:uphill=1 { name 'mtb01 ${name}' | 'mtb01' }
mtb:scale=0  & mtb:scale:uphill=2 { name 'mtb02 ${name}' | 'mtb02' }
mtb:scale=0  & mtb:scale:uphill=3 { name 'mtb03 ${name}' | 'mtb03' }
mtb:scale=0  & mtb:scale:uphill=4 { name 'mtb04 ${name}' | 'mtb04' }
mtb:scale=0  & mtb:scale:uphill=5 { name 'mtb05 ${name}' | 'mtb05' }
mtb:scale=1  & mtb:scale:uphill=1 { name 'mtb11 ${name}' | 'mtb11' }
mtb:scale=1  & mtb:scale:uphill=2 { name 'mtb12 ${name}' | 'mtb12' }
mtb:scale=1  & mtb:scale:uphill=3 { name 'mtb13 ${name}' | 'mtb13' }
mtb:scale=1  & mtb:scale:uphill=4 { name 'mtb14 ${name}' | 'mtb14' }
mtb:scale=1  & mtb:scale:uphill=5 { name 'mtb15 ${name}' | 'mtb15' }
mtb:scale=2  & mtb:scale:uphill=2 { name 'mtb22 ${name}' | 'mtb22' }
mtb:scale=2  & mtb:scale:uphill=3 { name 'mtb23 ${name}' | 'mtb23' }
mtb:scale=2  & mtb:scale:uphill=4 { name 'mtb24 ${name}' | 'mtb24' }
mtb:scale=2  & mtb:scale:uphill=5 { name 'mtb25 ${name}' | 'mtb25' }
mtb:scale=3  & mtb:scale:uphill=3 { name 'mtb33 ${name}' | 'mtb33' }
mtb:scale=3  & mtb:scale:uphill=4 { name 'mtb34 ${name}' | 'mtb34' }
mtb:scale=3  & mtb:scale:uphill=5 { name 'mtb35 ${name}' | 'mtb35' }
mtb:scale=4  & mtb:scale:uphill=4 { name 'mtb44 ${name}' | 'mtb44' }
mtb:scale=4  & mtb:scale:uphill=5 { name 'mtb45 ${name}' | 'mtb45' }
mtb:scale=5  & mtb:scale:uphill=5 { name 'mtb55 ${name}' | 'mtb55' }

mtb:scale:uphill=0 { name 'mtb.0 ${name}' | 'mtb.0' }
mtb:scale:uphill=1 { name 'mtb.1 ${name}' | 'mtb.1' }
mtb:scale:uphill=2 { name 'mtb.2 ${name}' | 'mtb.2' }
mtb:scale:uphill=3 { name 'mtb.3 ${name}' | 'mtb.3' }
mtb:scale:uphill=4 { name 'mtb.4 ${name}' | 'mtb.4' }
mtb:scale:uphill=5 { name 'mtb.5 ${name}' | 'mtb.5' }

mtb:scale=0 { name 'mtb0. ${name}' | 'mtb0.' }
mtb:scale=1 { name 'mtb1. ${name}' | 'mtb1.' }
mtb:scale=2 { name 'mtb2. ${name}' | 'mtb2.' }
mtb:scale=3 { name 'mtb3. ${name}' | 'mtb3.' }
mtb:scale=4 { name 'mtb4. ${name}' | 'mtb4.' }
mtb:scale=5 { name 'mtb5. ${name}' | 'mtb5.' }

highway=path                             { name '${name} pth' | 'pth' }
highway=footpath                         { set toll=yes; name '${name} 
fp' | 'fp' }
highway=track                             { name '${name} trk' | 'trk' }
highway=unsurfaced                         { name '${name} unsf' | 'unsf' }
highway=unclassified                     { name '${name} uncl' | 'uncl' }
highway=minor                             { name '${name} minr' | 'minr' }
highway=byway                             { name '${name} bywy' | 'bywy' }
highway=bridleway                         { name '${name} brdlwy' | 
'brdlwy' }
highway=cycleway                        { name '${name} cwy' | 'cwy' }
cycleway=lane                             { name '${name} cln' | 'cln' }
cycleway=track                            { name '${name} ctrk' | 'ctrk' }
highway=footway                         { set toll=yes; name '${name} 
ft' | 'ft' }
highway=service & access=yes            { name 'BK ${name} ser' | 'BK ser' }
highway=service & access=no                { name 'XBK ${name} ser' | 
'XBK ser' }
highway=service                         { name '${name} ser' | 'ser' }
highway=construction                    { name 'constrction ${name}' | 
'under construction' }
highway=road                             { name '${name} RD' | 'RD' }


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090804/de5e22eb/attachment.html 


More information about the mkgmap-dev mailing list