Page MenuHomePhabricator

Wikidata items with two coordinates do not show up in geosearch
Open, MediumPublic

Description

Items having two or more values for P625 do not show up in geosearch.

Example: Item https://www.wikidata.org/w/index.php?title=Q1801721&oldid=356360874 has two coordinates set (47.1561, 11.0958 and 47.15, 11.1).
https://www.wikidata.org/w/api.php?action=query&list=geosearch&gsbbox=47.15651|11.09557|47.15570|11.09608 does not contain the item.

I'm aware that according to https://www.wikidata.org/wiki/Property_talk:P625, "Single value: this property generally contains a single value". Multiple coordinates originate from importing coordinates from different Wikipedias or when merging two Wikidata items.

Not taking any coordinate is bad since the item cannot be found via geosearch (or https://www.wikidata.org/wiki/Special:Nearby). I'm not sure whether one should take the first value or all values instead.

I guess this relates to T75482.

Event Timeline

What happens if you set one of them to "preferred value"?

After setting 47.1561, 11.0958 to preferred value, the item appears in the geosearch.

Looks like there are potentially 24.408 such items on Wikidata − although some of that would have a preferred qualifier. Would someone with better SPARQL-fu would be able to do the counts with that in mind?

This logic should be somewhere in here https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/HEAD/repo/includes/ParserOutput/GeoDataDataUpdater.php

It has changed a bit since this report, so maybe it no longer exists ? If i now check that geosearch output, the entry seems present so.
Please close if this is no longer an issue.

TJones triaged this task as Medium priority.Aug 27 2020, 9:27 PM