developmentseed / supercluster-rs

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

get_leaves appends random points #14

Open vaduga opened 1 month ago

vaduga commented 1 month 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 1 month 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?