logo separator

[mkgmap-dev] version 2718 and construction {name '${name} text'|'text'} not work

From Maks Vasilev max at stranger-team.ru on Sat Oct 12 07:56:20 BST 2013

Hi Steve!

That sample only little part of big problem with actions in rules.

If i try write a global rename for all object like a name=* {any action},
now it work only in tag-of-object=* {actions }. But if i need 2 global
rules with name, now i need to increse*2 all action block for all affected
object. If i need to 50 global actions? Very long and hard action block in
any string. Bad way.

Second trable with block to more that one time operate to tag in selector
in action: i need to rename all address tags to  normalized state. If i
have global rules "addr:street=* {normalized action }" then address search
rules after that rules.

Solution: add to style file "preprocessor". This file work first, before
any other, and have only tag selector and action block without block [...].
And any action in this file don't block action in other style files.

Preprocessor make mkgmap more configurable and like to production tools and
it's possible to simplify manypulation in action rules.

Wbr, Maks
 29.09.2013 2:47 пользователь "Steve Ratcliffe" <steve at parabola.me.uk>
написал:

>
> Hi
>
> On 27/09/13 12:53, Maks Vasilev wrote:
> > name=* {name '${name|subst:text1=> txt1|subst:text2=> txt2}' }
>
> > After this line any action with name not work. I can't insert
> > [continue with_actions] without garmin code of object type.
>
> Yes that is the way it works - the first call to 'name' sets the
> name of the object and it can not be set again.
>
> It is not always necessary to use the name action, but if you are
> using it then the rules must be arranged so that the name action is
> only called when you definitely want to set the name.
>
> Alternatively you could set the name tag
>    {set name '${name|subst:text1=> txt1|subst:text2=> txt2}' }
>
> or set a temporary tag first to be used in a later name action.
>    { set a_name '...'
>
> So in your github example you could try:
>
>         #1 - try to enable/disable this line
>         highway=* & name ~ '.*(street).*' {set name
> '${name|subst:street=>} str.'}
>
>         #2
>         highway=* {name '${name} ${ref|highway-symbol:box}' |
> '${ref|highway-symbol:box}' | '${name}'} [0x03 resolution 19]
>
>         #3 Not needed
>         ## highway=* [0x03 resolution 19]
>
> Best wishes
>
> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20131012/7612d01d/attachment.html 


More information about the mkgmap-dev mailing list