Last modified: 2012-08-30 16:33:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41476, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39476 - coords 0, 0 used for monuments without coordinates
coords 0, 0 used for monuments without coordinates
Status: RESOLVED FIXED
Product: WikiLoves Monuments Mobile
Classification: Unclassified
Browse (Other open bugs)
unspecified
All All
: High major
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 39540
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-19 07:08 UTC by Raul Kern
Modified: 2012-08-30 16:33 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Raul Kern 2012-08-19 07:08:49 UTC
Monuments without coordinates are placed at coordinates 0, 0 in campaign lists sorted by distance.
Comment 1 Maarten Dammers 2012-08-21 19:32:09 UTC
In the database we have very few records with lat=lon=0:

mysql> SELECT COUNT(*) FROM monuments_all WHERE lat=0 AND lon=0;
+----------+
| COUNT(*) |
+----------+
|      136 |
+----------+
1 row in set (37.19 sec)

We do have a lot of records where it is unknown, see for example Russia: http://toolserver.org/~erfgoed/api/api.php?action=search&format=json&srcountry=ru&srlang=ru

If I look up the first is in the database:

mysql> SELECT lat,lon FROM monuments_all WHERE lang='ru' AND country='ru' AND id=7800000000;
+------+------+
| lat  | lon  |
+------+------+
| NULL | NULL |
+------+------+
1 row in set (0.03 sec)

So the JSON incorrectly outputs this as 0 instead of NULL. Api bug should be filed to fix this.
Comment 2 Brion Vibber 2012-08-21 19:34:24 UTC
This might be due to forcing the numbers to be numeric instead of strings; if we can check for null and pass it through straight, the json encoder should encode them as null...

Of course we can just special-case 0,0 since it's in the middle of the ocean and there are no real monuments there. ;)
Comment 3 Jon 2012-08-28 21:04:00 UTC
Talking with Tomasz we should be fixing the data to not send 0,0.
Comment 4 Jon 2012-08-30 00:55:37 UTC
Max fixed this api side
https://github.com/wikimedia/WLMMobile/pull/213 should take care of client
Comment 5 Maarten Dammers 2012-08-30 11:31:56 UTC
Is this fixed now?
Comment 6 Jon 2012-08-30 16:32:23 UTC
Yes
Comment 7 Jon 2012-08-30 16:33:27 UTC
Although saying that - we *Still* need to fix the data so that monuments are not registered at 0,0 but this is lower priority.

I guess we need to remove the coordinates from any monuments in the data which are located at 0,0.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links