supercluster icon indicating copy to clipboard operation
supercluster copied to clipboard

Question for possibility to use clustering on x, y, z coordinates

Open sot-tsa opened this issue 5 years ago • 2 comments

We are using CesiumJS (https://cesium.com/cesiumjs) for 3D visualization and we wonder whether it might be possible to use supercluster for clustering of points in 3D space (x, y, z coordinates or lat, long, elevation). Would it be possible to modify supercluster to support this? Please advice.

sot-tsa avatar Jun 26 '20 08:06 sot-tsa

Honestly I don't know. It might get difficult, but you could try by keeping track of the third dimension and adding additional filtering based on 3D distance after the within call in _cluster.

mourner avatar Jun 26 '20 09:06 mourner

I think this is kind of similar to https://github.com/mapbox/supercluster/issues/117

I know k-d trees can operate in 3 dimensions, but this would require fundamental changes to this library, as it only operates in the 2d space. There are also octrees, similar to quadtrees, except they have 2^3 children (allowing for the 3rd dimension).

I'm also interested in a 3d clustering library, specifically for additional segregation within some arbitrary categories. I think that functionality would best live in another library though.

addy avatar May 10 '22 15:05 addy