[OSM-talk] new Wikidata+OSM data in one RDF database
Yuri Astrakhan
yuriastrakhan at gmail.com
Fri May 12 16:03:52 UTC 2017
TLDR: A SPARQL (rdf) database with both OSM and Wikidata data is up for
testing. Allows massive cross-referenced queries between two datasets. The
service is a test, and needs a permanent home to stay alive.
Overpass Turbo is awesome, but sadly it does not have data from Wikidata,
nor does it support some SQL-like conditions. I have setup a temporary RDF
database that has both OSM & Wikidata. You can use SPARQL queries to find:
* All OSM objects with wikidata tag that references a Wikipedia
disambiguation page. Get the name of the page in first available language
ru, fr, de, en. http://tinyurl.com/mzlfb26
* OSM relations with wikidata tag pointing to a person (also tries multiple
language fallbacks). http://tinyurl.com/m6fh3wx
* OSM relations with duplicate Wikidata IDs http://tinyurl.com/mvhhogx
== OSM data structure ==
osmnode, osmway, osmrel - OSM object prefix, e.g. osmnode:1234
osmt - tag, e.g. osmt:name:en (only has tags with latin chars, -, _, :,
digits
osmm - meta data about the object -- type, isClosed, version.
I try to preserve OSM data without much changes. Every tag's value is
stored as a string, except for wikidata and wikipedia tags which are
converted to a URL, the same format as stored in Wikidata.
osmway:29453885
osmt:name "Samina";
osmt:waterway "river";
osmt:wikidata wd:Q156065;
osmt:wikipedia <https://de.wikipedia.org/wiki/Samina>;
osmm:type "w"; #### could be "r", "w", and "n"
osmm:isClosed false; #### this meta property is only for OSM ways
osmm:version 24.
Wikidata data structure is identical to https://query.wikidata.org (see
help)
== Current limitations ==
* Only includes OSM objects with either "wikidata" or "wikipedia" tags
* The OSM data only contains tags with only Latin letters, digits and
symbols - : _
* OSM geometry info is not imported, e.g. no center point or bounding box,
except for osmm:isClosed (true/false) property for ways.
* Does not include OSM object inheritance data - e.g. cannot query for
"find a node that is part of a way which is part of a relation that has
wikidata tag that ..."
* Wikidata is updated every second, but OSM does not yet update at all,
imported from a full db dump as of a few days ago.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20170512/c644485e/attachment.html>
More information about the talk
mailing list