Gerd Petermann
2015-10-13 07:36:04 UTC
Hi all,
see also
http://gis.19327.n5.nabble.com/address-search-in-Canada-tp5856816.html
I see several ways to implement the preparation proposed by Andrzej.
I think about implementing a method that removes
a) trailing + leading spaces from tag values and
b) all doubled spaces within the tag value
Examples:
" abc" -> "abc"
"abc " -> "abc"
"abc def" -> "abc def"
" x y z " -> "x y z"
Now, this can be done
a) with all (evaluated) tags before style rules are processed
pro: style rules do not have to care about these cases
contra: extra spaces produced by the style actions are not catched
b) after style processing
pro: style can handle these special cases (e.g. use echotags),
extra spaces produced by style actions are handled
contra: style rules may not match, e.g. if an element
has the tag highway="primary "
c) two times a) + b)
I think option c) is the best, presuming that it doesn't involve
an unacceptable performance impact.
I am not sure if anybody uses these spaces willingly?
Do we need an option to configure this?
Gerd
see also
http://gis.19327.n5.nabble.com/address-search-in-Canada-tp5856816.html
I see several ways to implement the preparation proposed by Andrzej.
I think about implementing a method that removes
a) trailing + leading spaces from tag values and
b) all doubled spaces within the tag value
Examples:
" abc" -> "abc"
"abc " -> "abc"
"abc def" -> "abc def"
" x y z " -> "x y z"
Now, this can be done
a) with all (evaluated) tags before style rules are processed
pro: style rules do not have to care about these cases
contra: extra spaces produced by the style actions are not catched
b) after style processing
pro: style can handle these special cases (e.g. use echotags),
extra spaces produced by style actions are handled
contra: style rules may not match, e.g. if an element
has the tag highway="primary "
c) two times a) + b)
I think option c) is the best, presuming that it doesn't involve
an unacceptable performance impact.
I am not sure if anybody uses these spaces willingly?
Do we need an option to configure this?
Gerd