
Just as a note for people so you don't wonder why something does not work: Rules of the follwing type * & ( !=* | !=* ) will not work. and instead allways be enacted. So for example both of the follwing rules match even though neither route=mtb nor route=bicycle is set: tunnel=yes & ( route!=mtb | route!=bicycle ) [0x* resolution *] will show up even on mtb and bicycle routes. tunnel=yes & ( highway!=cycleway | highway!=footway ) [0x* resolution *] will show up even on cycleway and footway. This works however: tunnel=yes & ( highway!=footway ) [0x* resolution *] and rule is not enacted on footways. I'm not sure that the above was really intended to be doable, and for me it's no big point at all, just wanted to point it out so others save themselves the hassle of finding the fault.

Hi On 30/08/09 16:12, Felix Hartmann wrote:
Just as a note for people so you don't wonder why something does not work: Rules of the follwing type *& ( !=* | !=* ) will not work. and instead allways be enacted. So for example both of the follwing rules
They do work, its just that the second clause of your rules can never be false, perhaps you should use 'and' instead of 'or'.
match even though neither route=mtb nor route=bicycle is set: tunnel=yes& ( route!=mtb | route!=bicycle ) [0x* resolution *] will show up even on mtb and bicycle routes.
tunnel=yes & route!=mtb & route!= bicycle That would not show up on bicycle or mtb routes. ..Steve

Steve Ratcliffe wrote:
Hi
On 30/08/09 16:12, Felix Hartmann wrote:
Just as a note for people so you don't wonder why something does not work: Rules of the follwing type *& ( !=* | !=* ) will not work. and instead allways be enacted. So for example both of the follwing rules
They do work, its just that the second clause of your rules can never be false, perhaps you should use 'and' instead of 'or'.
match even though neither route=mtb nor route=bicycle is set: tunnel=yes& ( route!=mtb | route!=bicycle ) [0x* resolution *] will show up even on mtb and bicycle routes.
tunnel=yes & route!=mtb & route!= bicycle
That would not show up on bicycle or mtb routes.
oh so my logic was wrong. I would have thought that the above would not show in case both mtb AND bicycle route is set, and not OR. So how would I do that, a rule that needs all three to be true like this: ( tunnel=yes & route!=mtb & route!= bicycle ) [....] ?
..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi
oh so my logic was wrong. I would have thought that the above would not show in case both mtb AND bicycle route is set, and not OR. So how would I do that, a rule that needs all three to be true like this: ( tunnel=yes & route!=mtb & route!= bicycle ) [....] ?
Yes, that would be true for tunnel=yes and route=abc, but not when route=mtb or route=bicycle, if that is what you wanted to do. The parentheses are not needed. tunnel = yes & route!=mtb & route!=bicycle is the same as: tunnel = yes & !(route = mtb | route = bicycle) which might be a clearer way to write it. This is supposed to be supported but was never completely implemented. I have a fix for that which I will commit in the next few minutes. ..Steve

Steve Ratcliffe wrote:
Hi
oh so my logic was wrong. I would have thought that the above would not show in case both mtb AND bicycle route is set, and not OR. So how would I do that, a rule that needs all three to be true like this: ( tunnel=yes & route!=mtb & route!= bicycle ) [....] ?
Yes, that would be true for tunnel=yes and route=abc, but not when route=mtb or route=bicycle, if that is what you wanted to do. The parentheses are not needed.
tunnel = yes & route!=mtb & route!=bicycle
is the same as:
tunnel = yes & !(route = mtb | route = bicycle)
Ay Caramba. that's looking good.
which might be a clearer way to write it. This is supposed to be supported but was never completely implemented. I have a fix for that which I will commit in the next few minutes.
..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (2)
-
Felix Hartmann
-
Steve Ratcliffe