logo separator

[mkgmap-dev] [patch] change bus_stop to Transit Service category and add name / operator

From Marko Mäkelä marko.makela at iki.fi on Mon Jul 27 09:56:24 BST 2009

On Fri, Jul 17, 2009 at 11:30:12AM +0300, Marko Mäkelä wrote:
> There will be a combinatorial explosion if there is no way to write
> this kind of rules:
> 
> name += ref
> name += operator

I thought that it would be nice to translate shelter=yes and shelter=no
as well, by appending a '+' or '-' to the name.  This could be useful
when you are bicycling or walking, and you are looking for the nearest
shelter to have a break or to escape from a rain shower.

To avoid messy rules, I tried to introduce two auxiliary variables,
name_ref and name_ref_op:

name=* & ref=* { set name_ref='${name} (${ref})' }
name=* & ref!=* { set name_ref='${name}' }
ref=* & name!=* { set name_ref='${ref}' }
name_ref=* & operator=* { set name_ref_op='${name_ref} - ${operator}' }
name_ref=* & operator!=* { set name_ref_op='${name_ref}' }
operator=* & name_ref!=* { set name_ref_op='${operator}' }

No matter if I use 'set' or 'add', the action { name '${name_ref_op}' }
will be ignored.  Any ideas?

While working on this, I mistyped =!* instead of !=*, and the style parser
threw an exception.

The ugly patch (which does not use any auxiliary variables) is attached.

	Marko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bus_stop_shelter.patch
Type: text/x-diff
Size: 1476 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090727/d3bc913b/attachment.bin 


More information about the mkgmap-dev mailing list