developmentseed / supercluster-rs

Rust implementation of Supercluster for fast hierarchical point clustering
MIT License
24 stars 1 forks source link

get_leaves appends random points #14

Open vaduga opened 4 months ago

vaduga commented 4 months ago

hi! thanks for the great geolibs in rust which i'm currently porting my js app into.

i've encountered that get_leaves appends points from completely alien clusters. This happens only when the observed cluster can unroll into several nested clusters. At the max-zoom level it appends points fine. Look like data indexes get messed up. Would be greatfull for any thoughts how to fix this

supercluster-rs / js demo: hull

btw, the porting of map/reduce from supercluster-js is also a cool feature to have: https://github.com/developmentseed/supercluster-rs/pull/13#issuecomment-2266354666

kylebarron commented 3 months ago

Hi! Thanks for the issue.

At a glance I'm not exactly sure what's going wrong, but perhaps I made a mistake while porting from the upstream JS version. Do you happen to have a reproducible example for this?