[OSM-dev] Objects with the same key multiple times?

Andy Allan gravitystorm at gmail.com
Tue Oct 2 14:04:14 BST 2007

On 10/2/07, Robert (Jamie) Munro <rjmunro at arjam.net> wrote:
> Hash: SHA1
> Frederik Ramm wrote:
> > Hi,
> >
> >> The API supports multiple tags with the same key.
> >
> > And always did.
> My opinion is that the current state of putting a ";" in a tag name or
> value causing the system to break is a serious bug that should be fixed
> with some sort of escaping urgently. Alternatively, if a tag value has a
> ";" in it, the api could turn it into 2 tags internally, then turn it
> back when downloaded by JOSM.
> I'm of the opinion that multiple tags with the same key is not to be
> encouraged. If the API didn't support it and converted them all to ;
> separated lists on download, I don't think many things would break.

Whereas I'm of the opinion that semicolon-delineated lists of values
is an abomination, and not to be encouraged. When there are multiple
key/values for a given object (sport=rugby, sport=football on an
area), we should just store the list as separate keys, and consider
clients that don't implement the API fully as broken.

Otherwise, a user-friendly editor needs to unwind the semicolons, and
everyone who types things into the values needs to avoid using a
certain character, or type an escape sequence ('\;'?) or some such.

Not to mention the overhead in dealing with them for rendering - how
do I know when a semicolon in a value in the planet file is actually a
semicolon, or a value delineator? Guesswork?


More information about the dev mailing list