Skip to content

Add array type for storing coordinate values to allow improving accuracy for small radius#244

Open
ewelinaBS wants to merge 1 commit intomapbox:mainfrom
ewelinaBS:main
Open

Add array type for storing coordinate values to allow improving accuracy for small radius#244
ewelinaBS wants to merge 1 commit intomapbox:mainfrom
ewelinaBS:main

Conversation

@ewelinaBS
Copy link

@ewelinaBS ewelinaBS commented Jan 5, 2024

For small radius <~50cm, the clustering is not accurate. (Probably the accuracy will be different depending on the latitude.) The problem originates from rounding the coordinates to float32.

Work done

Enable arrayType argument for supercluster constructor to determine in what format store the coordinates values.
Default Float32Array value will work the same as before.

@andrewharvey
Copy link
Contributor

I've added a unit test for this in #249

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants