[Tagging] Order of parts of keys / Suffix, Prefix, Namespaces

Minh Nguyen minh at nguyen.cincinnati.oh.us
Wed Jan 6 10:32:35 UTC 2021


Vào lúc 10:43 2021-01-03, Jan Michel đã viết:
> Dear all,
> we have quite many prefixes and suffixes for keys that can be added to 
> the main key as necessary to describe objects in more and more detail. 
> Each of these components is documented rather well (some more, some less 
> so) and also the relationship of a suffix to the main key is usually 
> documented, mostly with examples. What we are missing is some general 
> overview that puts the different suffixes in relation to each other.
> 
> Surprisingly, actual tagging is quite consistent in this respect. I 
> tried to compile a list with a general tagging scheme that can be used 
> as a reference to define the order of parts in a composite key:
> 
> https://wiki.openstreetmap.org/wiki/User:Mueschel/OrderOfKeyParts
> 
> I'd like to ask you for some comments as well as more exceptions I 
> failed to identify. I'd also like to compile a list with real-world 
> examples that are actually in use (and meaningful).
> 
> Please note that this is not meant to advocate new and complicated tags, 
> but is just to combine everything we use so far into one document.
> I.e. don't add
> check_date:was:maxweight:hgv:lanes:forward:conditional:2005-2012
> to tag that you checked the fact that one of the lanes of a road had a 
> weight limitation for trucks during peak hours for several years has 
> ended 8 years ago and is still not active any more.

Good idea. This reminds me of adjective order [1], which is apparently a 
staple of English lessons for non-English speakers but which I, as a 
native English speaker, never encountered explicitly in my schooling. 
Now we just need to come up with a catchy mnemonic for MLEKCSVSGLLDCAD.

This documentation would obviously be helpful to mappers manually 
coining new keys, because you can use the lookup table instead of 
painstakingly researching alternatives in taginfo. I certainly will be 
using it the next time I need to tag a vehicle-specific turn lane on a 
two-way road. But it may also be helpful to editors and data consumers 
trying to weigh code complexity versus support for tagging flexibility.

I wonder how major editors and data consumers are using prefixed- and 
suffixed- keys today and what constraints they impose on namespacing 
order. A more clear-cut example is that OSRM, like a lot of data 
consumers, requires :lanes to appear before :forward or :backward. [2] 
But I'm sure there are more ambiguous cases (analogous to the debate 
about shape versus age in English adjective order).

By the way, taginfo's key length report [3] is a great way to find 
complex combinations of prefixes and suffixes.

[1] https://en.wikipedia.org/wiki/Adjective#Order
[2] 
https://github.com/Project-OSRM/osrm-backend/blob/1e98ae7efe1a679de47ad4265e7d4ebdf328e394/profiles/lib/guidance.lua#L165-L166
[3] https://taginfo.openstreetmap.org/reports/key_lengths

-- 
minh at nguyen.cincinnati.oh.us




More information about the Tagging mailing list