I've implemented clone this way:
const newTree = rbush();
newTree.fromJSON(JSON.parse(JSON.stringify(tree.toJSON())));
but I imagine there might be a faster way for rbush itself to do this.
(My use case is that I'd like to create a new version of the tree with a few additional locations added.)
I've implemented clone this way:
but I imagine there might be a faster way for rbush itself to do this.
(My use case is that I'd like to create a new version of the tree with a few additional locations added.)