[mkgmap-dev] variable substitution in relation members
From Marko Mäkelä marko.makela at iki.fi on Mon Dec 21 08:52:17 GMT 2009
Hi all, Steve Ratcliffe confirmed the existence of this problem to me in a private message. In the next few days, I plan to implement special syntax for variable substitution, because it will allow shorter style rules to be written. See an example of the syntax at the bottom of my original message below. Best regards and sorry for top-posting, Marko On Mon, Dec 14, 2009 at 11:41:05PM +0200, Marko Mäkelä wrote: > The problem is that within apply{}, the variable substitutions on the > right-hand-side of the "set" and "add" action always refer to the tags of > the relation, not to the relation member. Thus, mkgmap:boundary_name > will always be empty, and only one relation name will be copied to it. > > One possible solution is to have a special form of apply{} where > SubAction.performOnSubElements(Relation rel) does not invoke > addTagAction.setValueTags(rel). A patch that introduces the action > apply_local{} is attached. > > An alternative solution would be to have a special form of variable > substitution that refers to the tags of the element itself. One simple > way of implementing that could be to introduce the keywords set_local > and add_local and add another boolean parameter to AddTagAction that > would imply valueTags == null. > > Yet another solution would be to have a special syntax of variable > substitution that would bypass the valueTags, say, $(var) instead of ${var}: > > (type=boundary | type=multipolygon) & boundary=administrative & name=* > { apply > { > set mkgmap:boundary_name='$(mkgmap:boundary_name)/${name}' | '${name}'; > } > }
- Previous message: [mkgmap-dev] Multiple relations per map element ([PATCH] apply_local action (variable substitution in relation members))
- Next message: [mkgmap-dev] variable substitution in relation members
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list