Question for possibility to use clustering on x, y, z coordinates
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.
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.
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.