[Tagging] Extended Conditions - response to votes
osm at tobias-knerr.de
Thu Jul 5 12:25:47 BST 2012
On 05.07.2012 11:59, Martin Vonwald (Imagic) wrote:
> IMO there is only one possibility to completely prevent variable keys and that's a solution no one really likes: <whateverkey>=<value1> <separator> <condition2> ; <value2> <separator> <condition2> ; ....
I don't think this solution is bad at all, in fact it would be my #2
favourite. (With me being the original author of the Extended Conditions
proposal, you can probably guess what idea #1 was.)
Specifically, I would suggest something along those lines:
<key> = <v0>
<key>:conditional = <v1> <sep> <c1> ; <v2> <sep> <c2> ; ....
So we would continue to use the base key with a plain value, which is
the "default" value to be used if none of the listed conditions apply.
The obvious reason to do that is to avoid breaking existing
applications. They would still use a wrong value in those situations
where any conditional value applies - as they do now - but they wouldn't
work any worse than today.
An additional advantage is that it would make the conditional value a
little bit shorter. Of course this doesn't matter much for complex
situations. But in the very common case where there are two values and
one condition to choose between them, the tagging would end up very
similar to Extended Conditions.
And with just one additional key prefix, it doesn't use variable key at
all, not even the identifiers or sequential numbers from other variants.
There could occasionally be an issue with the value length limit, though.
More information about the Tagging