Page MenuHomePhabricator

RDF export produces weird literals when geocoordinate precision is null
Closed, ResolvedPublic

Description

If the geocoordinate value has null precision, like here: https://www.wikidata.org/wiki/Special:EntityData/Q5939824.json

then the data would look like:

<http://www.wikidata.org/value/1128fdf1ce224da4a418d03048273dea> <http://wikiba.se/ontology#geoPrecision> ""^^<http://www.w3.org/2001/XMLSchema#decimal> .

which is not a good literal - while formally correct on syntax level, semantically "" is not decimal. So we should either drop that triple or have some sensible value there.

See also T106928: [Story] auto precision may lead to unintended effects

Event Timeline

Smalyshev claimed this task.
Smalyshev raised the priority of this task from to Medium.
Smalyshev updated the task description. (Show Details)
Smalyshev subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Smalyshev added a subscriber: daniel.
Smalyshev added a subscriber: aude.

We have 32383 values in 32899 items with precision as "", so I guess we need to address them, it seems to be a common occurrence.

Change 263680 had a related patch set uploaded (by Smalyshev):
Prevent RDF builder from generating broken decimals if geo-precision is not specified

https://gerrit.wikimedia.org/r/263680

Change 264851 had a related patch set uploaded (by Smalyshev):
Fix broken decimal literals

https://gerrit.wikimedia.org/r/264851

Change 263680 merged by jenkins-bot:
Prevent RDF builder from generating broken decimals if geo-precision is not specified

https://gerrit.wikimedia.org/r/263680