paleobiodb / navigator

Graphical user interface for exploring space, time, and taxa in the PBDB
https://paleobiodb.org/navigator
Creative Commons Zero v1.0 Universal
41 stars 14 forks source link

Collections plot with wrong longitude #81

Closed mclapham closed 7 years ago

mclapham commented 7 years ago

This is more of an API bug, which affects Navigator. I was entering collections from Malaysia and for some reason all collections with longitude 118.xxx show up in the data service and Navigator having the initial zeros stripped from the decimal degrees. For example, collection 185839 has longitude 118.013, but the data service records the longitude as 118.129997 (https://paleobiodb.org/data1.2/colls/list.txt?id=185839). Collection 185856 has longitude 118.009 but the data service outputs 118.900002 (https://paleobiodb.org/data1.2/colls/list.txt?id=185856). As a result, those collections appear in incorrect places (the long line in the ocean here https://paleobiodb.org/navigator/#/c56c7831).

mclapham commented 7 years ago

It looks like it's a way that the decimal degree field is being treated by the API, because the same thing happens to latitude for collection 185858 (goes from 13.085 to 13.85).

mmcclenn commented 7 years ago

I have just looked at this, and it is actually a bug in the Classic code. The collection entry code is generating the latitude and longitude incorrectly from the degrees and decimal-degrees fields. I am working on a fix now.

mmcclenn commented 7 years ago

Looking further, this is actually a bug I caused! Unfortunately, I caused this while fixing potential SQL injection holes last week. The bug is now fixed, and I am looking through the rest of the changes I made to make sure I didn't inadvertently cause other errors.

mmcclenn commented 7 years ago

The bug is now fixed, and I have updated the 32 collections that had bad coordinates computed between when the bug was introduced and when it was fixed.