[OSM-dev] Whitespace in tag-keys

Dermot McNally dermotm at gmail.com
Sun Sep 13 22:51:15 BST 2009

2009/9/13 Martin Lesser <ml-osm-dev at bettercom.de>:
> I did not find explicit informations about this issue in the wiki so I'm
> wondering whether whitespace in keys is a "should not" or a "must not".

I think you're in fact addressing two separate issues here. As we can
see, the API will allow you to place whitespace in keys, but IMO this
is certainly a should-not case. Doing so, particularly as leading or
trailing space as in many of your examples, just confuses people.

But onto your examples:

> What's the recommended action if one detects tags like eg.
>  http://www.openstreetmap.org/browse/node/275671906 (k="is in")
>  http://www.openstreetmap.org/browse/node/447654517 (k=" type")
>  http://www.openstreetmap.org/browse/way/38170057 (k="  " v="residential")
>  http://www.openstreetmap.org/browse/way/39240565 (k="" v="Gweyn Hughs Road")

These are just cases of broken data. "Broken" in the sense that all
clearly intend to record data of a kind for which very established
norms exist but that fail, presumably accidentally, to conform to
those norms. In a case like this, the data should be altered. Tools
like the JOSM validator already treat such cases as breakage and flag
them for the user.

These cases are comparable to typos (higway=primary) or failure to
stick to lower-case (Name=High Street). These too will yield
unexpected behaviour and should be fixed.


Iren sind menschlich

More information about the dev mailing list