Page MenuHomePhabricator

WDQS returns reduced precision for coordinate values
Closed, DuplicatePublic


Within the last month or so, it seems WDQS is returning reduced precision for the coordinate values (lat and lon).

Please refer to the following query to demonstrate the problem:

Expected result:

Point(121.59183 14.02578)14.02578121.59183

Actual result:

Point(121.5918 14.0258)14.0258121.5918

The Wikidata item in the query has the following value stored:

Latitude = 14.025777777778
Longitude = 121.59183333333
Precision = 1.0E-5 (or 0.00001)

Note: This seems to only affect recently-edited items (even if none of the coordinate values for the item has been touched). Old items give the correct precision but newly-edited items have the reduced precision.

Event Timeline

I think this is the direct and intended effect of T174504: Coordinates are exported into RDF with excessive precision. Not sure if we should continue discussing it here or there.

4 digits is 11m precision, 5 digits is 1m precisions. We could bump the max to 5 digits I presume, but I am not sure which coordinates really have that many significant digits and whether these coordinates indeed are precise within meter or just claim to be so. But changing it wouldn't be very hard - just change COORDINATE_PRECISION in GlobeCoordinateRdfBuilder from 4 to 5.

Please do not just change the COORDINATE_PRECISION value. The coordinates are stored in Wikidata together with a precision value. These precision values can represent decimal-degree precision (like 0.01 for ~kilometer-precision or 0.00001 for ~meter-precision or 0.00000001 for ~millimeter precision). If you really must round down, then please round down considering this stored precision value and not using a global constant value.

@seav Please explain the case for millimeter-precision coordinates. Which objects in Wikidata have locations known with millimeter precision?

I can't think of any items right now that need to have millimeter-precision coordinates. But there are certainly objects that can have sub-meter precision. For example, there are at least a couple of geodetic survey markers in Finland (Q10684553 and Q10682441) that have a stored precision of 0.000001 (decimeter-level). And somebody could survey the locations and coordinates of the existing Arago medallions found in Paris that marks the Paris meridian and add them all to Wikidata and these should have sub-meter precision. Sure, these coordinates may become outdated because we are assuming the WGS84 datum and plate tectonics is a thing, but these coordinates could be qualified with a point-in-time qualifier.

@seav: You also reopened T174504 - wondering how is that task different from T232984?

@Aklapper: Hmmm. I actually have no idea what the expected protocol for this is. I created this task because I wasn't aware of T232984. It might be better to consolidate both into just 1 ticket, probably the earlier one since that was what prompted this ticket.