[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 PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Nikki, Smalyshev, Aklapper, Yurik, Lordiis, Lucas_Werkmeister_WMDE, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, EBjune, merbst, Avner, Lewizho99, Maathavan, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331, Krenair___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[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 PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Nikki, Smalyshev, Aklapper, Yurik, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331, Krenair___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[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 not sure what its accuracy limits either.TASK DETAILhttps://phabricator.wikimedia.org/T174414EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: SmalyshevCc: Nikki, Smalyshev, Aklapper, Yurik, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[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 PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: YurikCc: Nikki, Smalyshev, Aklapper, Yurik, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[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 DETAILhttps://phabricator.wikimedia.org/T174414EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: SmalyshevCc: Nikki, Smalyshev, Aklapper, Yurik, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[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, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[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: NikkiCc: Nikki, Smalyshev, Aklapper, Yurik, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, Izno, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs