
Could someone explain to me the correct way and position to use the (!) in the style files. For example, in the current 'default style' the following two lines exist: railway=rail & !(tunnel=yes) [0x14 resolution 21] leisure=track & area!=yes What is the significance of putting the (!) before the open brackets or before the (=) sign. I mean, would there be any difference between the following two statements and would they both work?: railway=rail & !(tunnel=yes) railway=rail & tunnel!=yes Many thanks.

Hi
railway=rail& !(tunnel=yes)
railway=rail& tunnel!=yes
In this particular case they are the same. I would normally prefer the second as being more readable, but something like: !(red=yes | green=yes | blue=yes) may be easier to read than the equivalent: red!=yes & green!=yes & blue!=yes In other cases however you have to consider if the tag exists. So although speed<30 and !(speed>=30) are logically the same, this is only the case if the speed tag exists (and is a number). So if there is no speed tag, both '<' and '>=' would give false against any number and so speed<30 is false and speed>=30 is false and so !(speed>=30) is true ..Steve
participants (2)
-
Bill Lancashire
-
Steve Ratcliffe