Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization #16

Open
davidepaci opened this issue Oct 10, 2024 · 2 comments
Open

Serialization #16

davidepaci opened this issue Oct 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@davidepaci
Copy link

Is there a way to serialize and unserialize a Quadtree? Or is the best strategy currently just to stringy, parse and recreate the Quadtree? Thanks in advance

@timohausmann
Copy link
Owner

Interesting, can you explain your use case? Currently there is no custom way to do so.

JSON.stringify(tree) gives results, but I wonder how useful this is.
I would recommend only storing the object data, positions etc. and recreate and reinsert the objects each time.

@davidepaci
Copy link
Author

Interesting, can you explain your use case? Currently there is no custom way to do so.

JSON.stringify(tree) gives results, but I wonder how useful this is. I would recommend only storing the object data, positions etc. and recreate and reinsert the objects each time.

I'm using a quadtree to spatially index a graph to find edges more efficiently. I also need to store the quadtree to MongoDB in the same doc as the graph

@timohausmann timohausmann added the enhancement New feature or request label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants