[Wikidata-bugs] [Maniphest] [Commented On] T174414: WDQS incorrectly calculates geof:distance

2017-08-30 Thread gerritbot
gerritbot added a comment. Change 374654 merged by jenkins-bot: [wikidata/query/rdf@master] Make distance between very close points equal to 0 https://gerrit.wikimedia.org/r/374654TASK DETAILhttps://phabricator.wikimedia.org/T174414EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T174414: WDQS incorrectly calculates geof:distance

2017-08-29 Thread gerritbot
gerritbot added a comment. Change 374654 had a related patch set uploaded (by Smalyshev; owner: Smalyshev): [wikidata/query/rdf@master] Make distance between very close points equal to 0 https://gerrit.wikimedia.org/r/374654TASK DETAILhttps://phabricator.wikimedia.org/T174414EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T174414: WDQS incorrectly calculates geof:distance

2017-08-29 Thread Smalyshev
Smalyshev added a comment. The calculations are already done with doubles. However, standard arccos formula is not good for small distances even with doubles - the value inside arccos can become >1 due to rounding errors, which produces the NaN. Haversine formula is said to behave better, but I'm

[Wikidata-bugs] [Maniphest] [Commented On] T174414: WDQS incorrectly calculates geof:distance

2017-08-29 Thread Yurik
Yurik added a comment. Float is good enough to store longitude and latitude - precision 1-2 meters at worst. The calculations on the other hand would need to be done with doubles - most trigonometry functions use them anyway.TASK DETAILhttps://phabricator.wikimedia.org/T174414EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T174414: WDQS incorrectly calculates geof:distance

2017-08-29 Thread Smalyshev
Smalyshev added a comment. @Nikki the results you're getting are because of difference of precisions between Getty and our data. Those seem to be the same points, just with different precision. I wonder if we shouldn't limit precision of the data for the purposes of distance calculation.TASK

[Wikidata-bugs] [Maniphest] [Commented On] T174414: WDQS incorrectly calculates geof:distance

2017-08-29 Thread Smalyshev
Smalyshev added a comment. Looks like the points that produce NaN are pretty close... May be a precision thing.TASK DETAILhttps://phabricator.wikimedia.org/T174414EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: SmalyshevCc: Nikki, Smalyshev, Aklapper, Yurik,

[Wikidata-bugs] [Maniphest] [Commented On] T174414: WDQS incorrectly calculates geof:distance

2017-08-29 Thread Nikki
Nikki added a comment. I got NaN for the distance recently too, with something similar to this query (only includes the affected items, to make it faster).TASK DETAILhttps://phabricator.wikimedia.org/T174414EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: