Page MenuHomePhabricator

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

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

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

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.

@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?

Jc86035 updated the task description. (Show Details)
Aklapper changed the subtype of this task from "Task" to "Feature Request".Nov 15 2023, 5:19 PM