Discussion:
[mkgmap-dev] obsolete spaces in tags
Gerd Petermann
2015-10-13 07:36:04 UTC
Permalink
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
Andrzej Popowski
2015-10-13 18:29:23 UTC
Permalink
Hi Gerd,

I would go for a) - only correcting source text form OSM.

I think correct style shouldn't create wrong lables. And author of style
could use double spaces intentionally, in which case there would be
needed an option to disable second correction and proper explanation in
manual. IMHO better keep it simple.
--
Best regards,
Andrzej
Loading...