Talk:Order of key parts

From OpenStreetMap Wiki
Latest comment: 3 years ago by Mateusz Konieczny in topic Can we move it into main space?
Jump to navigation Jump to search

Generic Subkeys

What about :signed part? See https://taginfo.openstreetmap.org/search?q=%3Asigned Mateusz Konieczny (talk) 20:52, 3 January 2021 (UTC)Reply

There are several of these, further examples are :wikidata, :wikipedia, :url... Unfortunately it seems these are not documented.
I think I'll add them as 'generic subkeys' after "subkey". --Mueschel (talk) 09:46, 4 January 2021 (UTC)Reply
I edited your page before processing this reply - feel free to revert my edit.

Wiki Page location

Are you planning to move this page into public wiki space? Mateusz Konieczny (talk) 09:50, 4 January 2021 (UTC)Reply

I think we should do this once it is "finished". Let's see how the RFC works out. --Mueschel (talk) 09:56, 4 January 2021 (UTC)Reply

Examples

Maybe give some actual examples of tags? Such as turn:bus:lanes=*? Mateusz Konieczny (talk) 13:44, 4 January 2021 (UTC)Reply

Additional syntaxes

Some additional syntaxes that come to mind:

  • seamark:light:*=* keys are namespaced by an array index, which avoids the situation we have with destination:*=* where destination:ref:lanes=* and destination:lanes=* could be parallel lists of values that could get out of sync. The same approach has been proposed on the tagging list in the past for destination:*=*, but despite significant usage in some regions, it never gained traction on the relevant wiki pages. – Minh Nguyễn 💬 10:31, 6 January 2021 (UTC)Reply
    The seamarks are a good example for my remark on namespaces. Luckily this fits the scheme without modifications. The numbering of entries (up to 20 on one object...) I think is a specialty of this scheme, and not really universal. Sure there are many keys with numbers in them, but which are documented use cases and not just wild tagging? E.g. the use of numbers on multiple name tags is explicitly discouraged. --Mueschel (talk) 13:54, 6 January 2021 (UTC)Reply
    It's related to the controversy over name_1=* etc. but not quite the same. The idea is that foo:1:bar=* and foo:1:baz=* apply to the same foo, and foo:3:bar=* and foo:3:baz=* also apply to the same foo even though foo:2:bar=* has no foo:2:baz=*. It isn't possible to express this situation using semicolon-delimited lists in values, unless we reinterpret the semicolon operator as an ordered operator and allow for consecutive ;; to indicate an empty slot. As far as I can tell, seamarks are the primary user of this numbering scheme (not only seamark:light=* but also seamark:notice=*), but it has been proposed for other schemes like destination=* (where it is endemic to some regions). I guess it's a question of whether we want to encourage or discourage that approach in the future. – Minh Nguyễn 💬 19:42, 6 January 2021 (UTC)Reply
  • When a public transportation station has different names or refs depending on the network, the station is tagged with name:network. (That means the key can be ambiguous in terms of distinguishing one network from another or distinguishing a network from a country.) As with ref=*, this usage can be viewed as either an arbitrarily large set of subkeys or a more general syntax along the lines of :language. – Minh Nguyễn 💬 10:31, 6 January 2021 (UTC)Reply
    I think your example of names given by different organizations is one of the few legitimate use cases of this free-text parts in keys apart from the use in 'ref'. I would like to leave this to the individual tag descriptions (as you suggest as an infinite set of subkeys). I'll add note somewhere. --Mueschel (talk) 13:54, 6 January 2021 (UTC)Reply

Responses ordered by item numbers:

--Mueschel (talk) 13:54, 6 January 2021 (UTC)Reply

@Mueschel: I took the liberty of inlining your responses to keep the discussion clear. – Minh Nguyễn 💬 19:42, 6 January 2021 (UTC)Reply

potential exceptions: the [meta] information seems sometimes set as prefix and sometimes set as suffix

Thanks for the overview. See title, example lists for source / note are:

source note
prefix source:* note:*
suffix *:source *:note

--MalgiK (talk) 14:21, 28 January 2021 (UTC)Reply

I would assume that tiger:source=* is TIGER-quality imported tag, generator:source=* is not meta information, maxspeed:source=* is not meta information (or not meta in this way as source usually is?), plant:source=* - not meta... Mateusz Konieczny (talk) 14:36, 28 January 2021 (UTC)Reply
These are difficult cases. 'source' as a Subkey as in generator and plant tags are clearly not a problem, but the order used for tiger:source, addr:source, mapwithai:source is not easy to cover in this simplified scheme. Apart from noting it as exceptional, we could add source and note to the 'Generic' (and have it in both the Meta and Generic classes). On the other hand - I don't like to promote this order... --Mueschel (talk) 16:20, 7 February 2021 (UTC)Reply

reservation:website <> website:reservation

wonderful analysis ! what's about reservation:website <> website:reservation ? is the key is reservation and with subkeys website phone email ? or the key is website with subkeys reservation map stock ? what could be the rule to determine it ? --Marc marc (talk) 06:33, 17 February 2021 (UTC)Reply

This can get a bit complicated to define globally without a proper definition of the individual tag.
In this special case, I'd say the best key is 'reservation:url', because it follows the same scheme as for example opening_hours:url or lunch:menu:url. --Mueschel (talk) 11:03, 17 February 2021 (UTC)Reply

Can we move it into main space?

Can it be treated as sort-of-ready? I just tried to search it in Order of key parts Key part order Segment order Order of elements in key Mateusz Konieczny (talk) 08:56, 24 July 2022 (UTC)Reply

If you (and others) think this is ready to be made official, feel free to do so. It still contains quite a bit of personal view and preference , which I don't want to press onto others. --Mueschel (talk) 15:26, 24 July 2022 (UTC)Reply
I moved it, with it being in the main space others are more likely to improve it Mateusz Konieczny (talk) 17:57, 24 July 2022 (UTC)Reply

More precise advice on combination

It would be nice to more precisely describe how the key parts may be combined (e.g. after :wikidata no other key suffixes make sense). --Push-f (talk) 14:29, 24 July 2022 (UTC)Reply

Well, if we can define such rules it might be helpful, but I doubt they are easy to define. Actually, we do have several hundred tags like destination:ref:wikidata:lanes=* - and I don't have arguments why this order needs to be changed - it's the wikidata link for the ref.
Actually this pointed me to an error in the list: We do have old_name:-2022:etymology:wikidata=*, which contradicts my order of putting 'Date' last and needs some additional work.--Mueschel (talk) 15:26, 24 July 2022 (UTC)Reply