OSM Wiki KeyDescription or ValueDescription templates & Taginfo

Posted by MarcoR on 9 June 2022 in English (English). Last updated on 17 June 2022.

In the OSM wiki there are some templates (KeyDescription and ValueDescription) that are used by Taginfo to show some useful informations to the user; since the same information is contained in the Data Item linked to the feature page, some wiki users, in good faith, shorten these templates to their minimum (e.g. “{{KeyDescription}}”), thus preventing Taginfo from fetching the data.

This is what ref:mise on Taginfo currently looks like: taginfo-wiki-description.png

I think that this issue is on Taginfo side but, for the time being, it doesn’t seem to be on their To-do list; for this reason, I believe that we should preserve (or restore if removed) the information stored in these templates (even if this means maintaining the same information in two separate locations, i.e. the Wiki page and the Data Item page).

Here is a sorted list of the OSM Wiki pages (tags or key related) which contain the text “{{KeyDescription}}” or “{{TagDescription}}”:

Please don’t automatically edit the Wiki; I am just a normal Wiki user and OSM mapper :)

The above list has been extracted from the OSM wiki dump file, which I had previously filtered to extract only the last revision of every page, using xmlstarlet:

xmlstarlet sel -N "x=" -t -m '//x:page/x:revision/x:text[contains(text(),"{{KeyDescription}}") or contains(text(),"{{ValueDescription}}")]' -v '../../x:title' -n last_revision_dump.xml 

Watch out: huge xml files (34GB for all revisions and 893MB for only the last one) tend to easily and quickly fill up your RAM pretty easily when read with tools like xmlstarlet or Python



Comment from SomeoneElse on 16 June 2022 at 19:57

Can you explain in a bit more detail why this is a problem?

I’m a fairly regular user of taginfo (I’ve even updated project files so tag consumption information will appear there) but I’ve never been bothered by what is displayed in the description field on e.g - you’re going to need to click on the link anyway to see the page.

I’m mentioning this because someone’s suggested that this diary entry be included in the next WeeklyOSM issue, and the editors there (including me) are scratching their heads about what to say about it.

Comment from MarcoR on 17 June 2022 at 07:15

As an occasional translator, reducing the superfluous work is one of my main objectives, so I’d personally love to just use “{{foobar}}” on a translated Wiki page and let it be automagically expanded to a graphically appealing infobox; in this case however, just simplifying a template, leads to another service being unable to fetch the data and then show it to their users.

Is this a serious problem? Not at all, but since accessing the OSM Wiki is generally (roughly ten times) slower than accessing Taginfo, I think that allowing the latter to properly fetch the data from the Wiki could be quite useful when one just needs to take a look at the main details of a tag/key (what the short description says, whether it can be used on areas, etc.).

In your example, you need to click on the link for because it doesn’t have a full ValueDescription template. For instead, the page shows a short description in every language for which there is a OSM Wiki page, that it can be used only on ways and that its status is “de facto”, “approved” o “In use” depending of the language (obviously the value here should be the same for all the pages but this may indicate that some translations are not updated). You only need to visit the Wiki if you want to read the full page.

Comment from InfosReseaux on 19 June 2022 at 10:42

Hi Marco

Thank you to have noted this problem, not only about taginfo but every consumer of wikicode.

Wikibase and dataitems has been set up in osm ecosystem to solve the exact issue the wikimedia community had before. Translation and lack of consistency between langage pages encourage us to make some information converge.

Discussions already been held around taginfo to add dataitems support with no results so far. Poor quality of editing UI in wikibase dicourage was raised against wide dataitems adoption. Adding support in taginfo would bring additional visibility and would makes us move forward. Not to mention dataitems could completely be NSI 2.0 as well.

I hope we could tackle this supplementary step and stop this strugle with wiki translation in comming months. Dataitems are essential in making osm ontology more visible, usable as a standard data model.

Best regards

Comment from Tigerfell on 20 June 2022 at 09:07

I think it is very sad that the Taginfo maintainer Jochen Topf has effectively decided not to include information from Data Items. Back then I asked him to unlock the discussion again but he did not even reply to my e-mail. Taginfo also can not handle multiple tags or values documented at one page. This is often helpful to compare tag values. It always expects a wiki page named like “Tag:x=y”. As a result, people created almost empty pages and duplicated information on the wiki side. In case the translation extension is added to the wiki, the wiki markup will change even more.

The current consensus among the wiki editors seems to be not to change existing tag documentation pages in either way. So when I create pages, I write “{{KeyDescription}}” but I do not change existing pages.

The wiki recently experienced a huge traffic increase when creased to exist and a redirect to its wiki page was created.

Login to leave a comment