quads icon indicating copy to clipboard operation
quads copied to clipboard

A pure Python Quadtree implementation

Results 8 quads issues
Sort by recently updated
recently updated
newest added

Fixes visualization when QuadNode.ul contains no points by checking for None. fixes #8

When `QuadNode.ul` contains no points visualize fails the render the lines. This happens because ```python if node.ul: draw_lines(node) draw_all_nodes(node.ul) ``` also checks whether `len(node.ul)` is zero.

I've looked through the `QuadTree()` methods but couldn't find anything related to removing a point from an existing quadtree. How would you do this?

Looking through this library. Super legit I love the clarity. Looks like it would be fairly easy to wrap `numba` around your library. Your only import is the `math` module...

def insert(self, point): """ Inserts a `Point` into the quadtree. Args: point (Point|tuple|None): The point to insert. data (any): Optional. Corresponding data for that point. Default is `None`. Returns: bool:...

I've been looking into quads for some spatial indexing I need to do and I think it looks like it will do the job very nicely. One thing I've noticed...

Hi, I use `quads 1.1.0` and want to visualize a dummy dataset with `quads.visualize(tree)`, but the separating lines are not drawn correctly. Setup: MacOS 15.4.1, Python 3.12 and matplotlib 3.10.3...

Title says all. If you have any questions let me know, but basically, without this PR the example with data is broken, data can't be retrieved from the tree