Page MenuHomePhabricator

Coordinate nodes w/ multiple wikibase:geoPrecision values
Open, Needs TriagePublic


When analyzing the difference between a SPARQL query using "wdt" and one using "p" user @Larske noticed strange duplicate datasets in the "p" result:

When analyzing it further, he was able to narrow the problem down to the geoPrecision value in the coordinate node: It seems some coordinate nodes have multiple values (0 and some other value) for wikibase:geoPrecision:

#some coordinate values seem to have multiple values for wikibase:geoPrecision
SELECT ?item ?coord ?geoprecision WHERE {
 VALUES ?item { wd:Q41427943 wd:Q41411330 }
 ?item p:P625 ?p625 .
 ?p625 ps:P625 ?coord .
 ?p625 psv:P625 [ wikibase:geoPrecision ?geoprecision ]
ORDER BY ?item

This seems to be very common, here are some 8,800 coordinates for Kirche (Q16970) in Frankreich (Q142) with this "multiple precision problem":

SELECT ?item ?coord ?geoprecision1 ?geoprecision2 WHERE {
 ?item wdt:P31 wd:Q16970 .
 ?item wdt:P17 wd:Q142 .
 ?item p:P625 ?p625 .
 ?p625 ps:P625 ?coord .
 ?p625 psv:P625 ?psv625 .
 ?psv625 wikibase:geoPrecision ?geoprecision1 .
 ?psv625 wikibase:geoPrecision ?geoprecision2 .
ORDER BY ?item

He also noticed that the JSON API only returns one value for "precision" for Krankenhausbau zum Sebastian-Spital gehörig (Q41427943) when Wikidata Query reports two as per the query above, so we're not even sure whether it's a database or a query problem.

Event Timeline

The queries here seem fine now, so I think this was the same issue as T198078.