Some questions regarding rule expressions

Hi, I have the following questions regarding the rule expressions: 1. Is the expression key=* also matching with tags created in action blocks of previous rules? Example (nonsense, but representative): highway=residential { add test=yes; } test=* [0x06 resolution 22] <-- not working test~'.*' [0x06 resolution 22] <-- not working test=yes [0x06 resolution 22] <-- working test!=no [0x06 resolution 22] <-- not working highway=* & test=* [0x06 resolution 22] <-- working So, in general, the expression key=* is working for key highway and others keys/tags defined in the input osm file. The expression is also working as expected within the combination of highway=* and test=*, only highways with a tag test=* are matching. But if test=* is the only expression in the rule, the tag which is introduced some rules before seems to be ignored. This happens also if there is only the regex expression, which should work since r2297: Allow a style rule to consist of just a regular expression. Is this considered as expected or is this a bug? If this is correct behaviour, please add a hint to the style-manual. 2. Sometimes i have observed that if the expression key!=value is the only expression in a rule, the rule seems to be ignored by mkgmap (see example above). If i remember correctly, there were some discussions about fixing that behaviour. Is this still relevant/in progress? Please, add any hint to the style-manual. 3. Shouldn't style-manual be updated like discussed in http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2010q1/007957.html ? Thank you. Greetings -- View this message in context: http://gis.19327.n5.nabble.com/Some-questions-regarding-rule-expressions-tp5... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi
I have the following questions regarding the rule expressions:
1. Is the expression key=* also matching with tags created in action blocks of previous rules?
Example (nonsense, but representative): highway=residential { add test=yes; } test=* [0x06 resolution 22] <-- not working
But if test=* is the only expression in the rule, the tag which is
Thanks, that is a bug, the test=* should match. I will look into fixing it.
2. Sometimes i have observed that if the expression key!=value is the only expression in a rule, the rule seems to be ignored by mkgmap (see example above). If i remember correctly, there were some discussions about fixing that behaviour. Is this still relevant/in progress? Please, add any hint to the style-manual.
It should work in other cases. The bug you discovered is a special case where the tag is added when not present in the OSM input file. If you find a case where it doesn't work when it is in the input file, then let me know.
3. Shouldn't style-manual be updated like discussed in http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2010q1/007957.html ?
Thanks, this is now fixed in the doc source. The PDF should update automatically overnight. Best wishes ..Steve

Steve Ratcliffe wrote
1. Is the expression key=* also matching with tags created in action blocks of previous rules?
Example (nonsense, but representative): highway=residential { add test=yes; } test=* [0x06 resolution 22] <-- not working
But if test=* is the only expression in the rule, the tag which is
Thanks, that is a bug, the test=* should match.
I will look into fixing it.
Thank you. I'm looking forward to test it after it was fixed ;-) Steve Ratcliffe wrote
2. Sometimes i have observed that if the expression key!=value is the only expression in a rule, the rule seems to be ignored by mkgmap (see example above). If i remember correctly, there were some discussions about fixing that behaviour. Is this still relevant/in progress? Please, add any hint to the style-manual.
It should work in other cases. The bug you discovered is a special case where the tag is added when not present in the OSM input file. If you find a case where it doesn't work when it is in the input file, then let me know.
The other cases seem to work as expected. Steve Ratcliffe wrote
3. Shouldn't style-manual be updated like discussed in http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2010q1/007957.html ?
Thanks, this is now fixed in the doc source. The PDF should update automatically overnight.
Thank you. Greetings -- View this message in context: http://gis.19327.n5.nabble.com/Some-questions-regarding-rule-expressions-tp5... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi, it's me again :-) I've another question regarding the rule expressions: What about the concatenation of expressions key!=value and key~'regex'? Example: highway!=cycleway & cycleway~'opposite.*' { ... } [ ... ] Result: Error in style: Error: (lines:139): Invalid rule expression: (highway!=cycleway&(cycleway~'opposite.*')) I know, the following rule makes more sense and is working as expected, but why is the rule expression above invalid? highway=* & highway!=cycleway & cycleway~'opposite.*' { ... } [ ... ] Thank you. -- View this message in context: http://gis.19327.n5.nabble.com/Some-questions-regarding-rule-expressions-tp5... Sent from the Mkgmap Development mailing list archive at Nabble.com.
participants (2)
-
littlehelper
-
Steve Ratcliffe