Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on a cluster marker does not always show co-located records #780

Closed
leehart opened this issue Jan 13, 2017 · 3 comments
Closed

Comments

@leehart
Copy link
Collaborator

leehart commented Jan 13, 2017

Sometimes works OK with some locations.

Ag1000G_Selection
Map Composer > {Markers: Samples}
Click on a few of the cluster bubbles, see that the table that opens in the popup is (sometimes) empty.

@leehart leehart self-assigned this Jan 13, 2017
@leehart
Copy link
Collaborator Author

leehart commented Jan 13, 2017

The query to fetch the co-located records depends on matching the latitude and longitude values exactly, but I suspect there might be some troublesome rounding or floating point data types...

For example, the API query:

{"whcClass":"compound","isCompound":true,"isRoot":true,"Components":[{"whcClass":"comparefixed","isCompound":false,"ColName":"Latitude","CompValue":11.890999794006346,"Tpe":"="},{"whcClass":"comparefixed","isCompound":false,"ColName":"Longitude","CompValue":-15.581999778747546,"Tpe":"="}],"Tpe":"AND"}

...will sometimes successfully fetch rows that include....

Latitude: 11.890999794006348
Longitude: -15.581999778747559

Notice there are discrepancies between the query criteria and the returned values.

@leehart leehart removed their assignment Jan 13, 2017
@leehart
Copy link
Collaborator Author

leehart commented Jan 13, 2017

The import logs show that Ag1000G's samples Longitude and Latitude (among others) are stored using the "real" data type, i.e. 32-bit floating point.

I think JavaScript stores all its numbers as 64-bit floats (IEEE-754).

I wonder if using FLOAT(24) or DOUBLE instead of REAL would solve this.

@leehart
Copy link
Collaborator Author

leehart commented Jan 16, 2017

I was barking up the wrong tree! This bug is actually caused by the positions of cluster markers changing due to force layout, and consequently their latitudes and longitudes no longer match database records.
If there is a precision discrepancy, it doesn't actually cause a query mismatch.
A fix is in the pipe...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant