Page MenuHomePhabricator

Add a parser function to Kartographer to pull OSM object identifiers using Wikidata QIDs
Open, LowPublic

Description

Currently {{#property:P402}} can pull some OSM relations from Wikidata. It is only possible to do so for ways within Kartographer's maplink and mapframe tags. We should have a parser function (e.g. {{#osm:\d+}}) and/or Lua function returning an OSM object ID or multiple IDs in plaintext (e.g. (node|way|relation)/\d+(;(node|way|relation)/\d+)*) for template use (such as in the French Wikipedia template Bases géographiques).


OSM objects with Wikidata tag (11 Nov 2018)

all1,199,542
nodes593,392
ways302,556
relations303,594

Event Timeline

Jc86035 created this task.Jan 22 2017, 7:47 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 22 2017, 7:47 AM

See also @Abbe98's osm.js, which links to the first object found using overpass turbo.

Abbe98 removed a subscriber: Abbe98.Jan 22 2017, 6:29 PM
Zache added a subscriber: Zache.Feb 28 2017, 6:53 AM
Zache added a comment.Feb 28 2017, 7:34 AM

It would be nice to get information of OSM link to SPARQL too. Value like Wikidata id can be found in OSM (true/false) value should be enough.

Poor man's solution could be that there is property in Wikidata for OSM wikidata -tag value which value should be unique and same as the Wikidata item's id.

@Zache The "poor man's solution" probably isn't viable, as properties for nodes and ways have been rejected due to the fluidity of OSM data, and the OSM relation property is currently nominated for deletion (my fault). I did start a Wikidata bot request proposing the automatic updating of the relation property, but it would be a lot of botop work for very little benefit. The issue with the relation property being deleted is that there are several dozen Wikipedia articles which use the property, and there would be no replacement for it under the current situation.

I don't think true/false would be enough, as the Wikipedia articles link to the OSM objects.

Zache added a comment.Mar 6 2017, 9:31 AM

@Jc86035, i meant that Wikidata property would point to OSM tag which would be more stable in context of permanent linking than using id:s directly. In this case i meant to use the wikidata id as a suitable tag.

However currently it is not possible to add OSM tags to single objects (see https://www.wikidata.org/wiki/Property_talk:P1282) . Also this would need some bot work too.

Anyway, do you have some example where linking via tags and overpass isn't enough for Wikipedia articles?

Tpt added a subscriber: 0x010C.May 20 2017, 8:19 AM
Mholloway triaged this task as Low priority.Oct 9 2018, 3:24 PM
Mholloway moved this task from Unsorted to Feature requests on the Maps (Kartographer) board.
Jc86035 updated the task description. (Show Details)Nov 11 2018, 5:36 PM
Jc86035 updated the task description. (Show Details)