question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getClusters returns 0 or 1 points when given 2

See original GitHub issue

I am trying to represent random points on a map using superclusters and mapbox.

I ran into an issue while testing for the two points: [ -60.44, -1.77] and [-55.44, -5.77]; running getClusters with a supercluster instance set up as follows:

const index = new Supercluster({
  log: true,
  radius: 20,
  extent: 256,
  maxZoom: 3
})

Returns a single point (not cluster of 2) at zoom > 5

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Wimmindcommented, May 6, 2022

Nope @mikeslinkman , I wasn’t able to get a fix for this. and had to switch to a different lib.

what is the library?

Like I’ve just said, I haven’t switched libraries. Still using the ones mentioned above.

In regard to your question about the zoom levels I would not know either since I’m pretty sure I don’t have that issue

sorry , accidentally pinged the wrong person 2 times

0reactions
Wimmindcommented, May 6, 2022

@AsnelChristian what is the library?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clustering millions of points on a map with Supercluster
Hierarchical greedy clustering​​ It works like this: Start with any point from the dataset. Find all points within a certain radius around that...
Read more >
cluster points after KMeans clustering (scikit learn)
This attribute provides the clusters. See a complete example below: import matplotlib.pyplot as plt from sklearn.cluster import MiniBatchKMeans, ...
Read more >
supercluster - npm
getLeaves(clusterId, limit = 10, offset = 0). Returns all the points of a cluster (given its cluster_id ), with pagination support: limit is...
Read more >
Definitive Guide to Hierarchical Clustering with Python and ...
Form a cluster by joining the two closest data points resulting in K-1 clusters. Form more clusters by joining the two closest clusters ......
Read more >
k-means clustering - MATLAB kmeans - MathWorks
[ idx , C , sumd , D ] = kmeans(___) returns distances from each point to every ... load fisheriris X =...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found