Hi Andrzej, thanks for the patch. I agree about the null values, but I am not so sure about the trailing separators, as it is documented (if my understanding is right) I am waiting for feedback from the original authors Franco Bez and Enrico Liboni, as I have no idea why they coded it like this. Of course any other feedback is also welcomed.
Gerd ________________________________________ Von: mkgmap-dev <[email protected]> im Auftrag von Andrzej Popowski <[email protected]> Gesendet: Mittwoch, 30. März 2016 20:31 An: [email protected] Betreff: [mkgmap-dev] patch for "part" filter Hi, I have tried to use substitution filter "part" and have found, that it worked differently, than I expected. Some operation results in adding trailing separator while others don't. Some filters return null, others return "", which breaks evaluating formulas with "|". I have attached a patch, that should change behavior of following filters: "A1;A2;A3" "part:;<3" -> old "A3;", patched "A3" "A1;A2" "part:;<3" -> old null, patched "A1;A2" "A1" "part:;>-2" -> old null, patched "A1" "A1;A2;A3" "part:;>3" -> old "", patched null "A1;A2" "part:;<-2" -> old "", patched null I have attached example data and style for testing the filter. I'm not sure, what would be preferred result for following filters: "A1" "part:;<3" -> result null or "A1"? "A1" "part:;>-3" -> result null or "A1"? Both, current version and patched, return null. I think result "A1" could be useful. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
