fastquadtree 1.0.0__cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 1.0.2__cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fastquadtree/_item.py +15 -5
- fastquadtree/_native.abi3.so +0 -0
- fastquadtree/pyqtree.py +10 -7
- {fastquadtree-1.0.0.dist-info → fastquadtree-1.0.2.dist-info}/METADATA +1 -1
- {fastquadtree-1.0.0.dist-info → fastquadtree-1.0.2.dist-info}/RECORD +7 -7
- {fastquadtree-1.0.0.dist-info → fastquadtree-1.0.2.dist-info}/WHEEL +0 -0
- {fastquadtree-1.0.0.dist-info → fastquadtree-1.0.2.dist-info}/licenses/LICENSE +0 -0
fastquadtree/_item.py
CHANGED
@@ -23,17 +23,22 @@ class Item:
|
|
23
23
|
__slots__ = ("geom", "id_", "obj")
|
24
24
|
|
25
25
|
def __init__(self, id_: int, geom: Point | Bounds, obj: Any | None = None):
|
26
|
-
self.id_ = id_
|
27
|
-
self.geom = geom
|
28
|
-
self.obj = obj
|
26
|
+
self.id_: int = id_
|
27
|
+
self.geom: Point | Bounds = geom
|
28
|
+
self.obj: Any | None = obj
|
29
29
|
|
30
30
|
|
31
31
|
class PointItem(Item):
|
32
32
|
"""
|
33
33
|
Lightweight point item wrapper for tracking and as_items results.
|
34
|
+
|
35
|
+
Attributes:
|
36
|
+
id_: Integer identifier.
|
37
|
+
geom: The point geometry as (x, y).
|
38
|
+
obj: The attached Python object if available, else None.
|
34
39
|
"""
|
35
40
|
|
36
|
-
__slots__ = ("
|
41
|
+
__slots__ = ("x", "y")
|
37
42
|
|
38
43
|
def __init__(self, id_: int, geom: Point, obj: Any | None = None):
|
39
44
|
super().__init__(id_, geom, obj)
|
@@ -43,9 +48,14 @@ class PointItem(Item):
|
|
43
48
|
class RectItem(Item):
|
44
49
|
"""
|
45
50
|
Lightweight rectangle item wrapper for tracking and as_items results.
|
51
|
+
|
52
|
+
Attributes:
|
53
|
+
id_: Integer identifier.
|
54
|
+
geom: The rectangle geometry as (min_x, min_y, max_x, max_y
|
55
|
+
obj: The attached Python object if available, else None.
|
46
56
|
"""
|
47
57
|
|
48
|
-
__slots__ = ("
|
58
|
+
__slots__ = ("max_x", "max_y", "min_x", "min_y")
|
49
59
|
|
50
60
|
def __init__(self, id_: int, geom: Bounds, obj: Any | None = None):
|
51
61
|
super().__init__(id_, geom, obj)
|
fastquadtree/_native.abi3.so
CHANGED
Binary file
|
fastquadtree/pyqtree.py
CHANGED
@@ -48,14 +48,17 @@ class Index:
|
|
48
48
|
all the quad instances and lets you access their properties.
|
49
49
|
|
50
50
|
Example usage:
|
51
|
+
```python
|
52
|
+
from fastquadtree.pyqtree import Index
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
['duck', 'python']
|
54
|
+
|
55
|
+
spindex = Index(bbox=(0, 0, 100, 100))
|
56
|
+
spindex.insert('duck', (50, 30, 53, 60))
|
57
|
+
spindex.insert('cookie', (10, 20, 15, 25))
|
58
|
+
spindex.insert('python', (40, 50, 95, 90))
|
59
|
+
results = spindex.intersect((51, 51, 86, 86))
|
60
|
+
sorted(results) # ['duck', 'python']
|
61
|
+
```
|
59
62
|
"""
|
60
63
|
|
61
64
|
__slots__ = ("_free", "_item_to_id", "_objects", "_qt")
|
@@ -1,13 +1,13 @@
|
|
1
|
-
fastquadtree-1.0.
|
2
|
-
fastquadtree-1.0.
|
3
|
-
fastquadtree-1.0.
|
1
|
+
fastquadtree-1.0.2.dist-info/METADATA,sha256=9WAl3PbvlWJYBoqyjKexb0M6QPu68n4eR34LCPIgOok,9367
|
2
|
+
fastquadtree-1.0.2.dist-info/WHEEL,sha256=cqfH6P_NujaeOc1olR46J5a7YgoxWJnrr5iZ1_DMqps,129
|
3
|
+
fastquadtree-1.0.2.dist-info/licenses/LICENSE,sha256=pRuvcuqIMtEUBMgvP1Bc4fOHydzeuA61c6DQoQ1pb1w,1071
|
4
4
|
fastquadtree/__init__.py,sha256=rtkveNz7rScRasTRGu1yEqzeoJfLfreJNxg21orPL-U,195
|
5
5
|
fastquadtree/_base_quadtree.py,sha256=tP6pymgV6s29C_1TjCZ6u0XKb6NFq3tQ7tk6REKS020,8576
|
6
|
-
fastquadtree/_item.py,sha256=
|
7
|
-
fastquadtree/_native.abi3.so,sha256
|
6
|
+
fastquadtree/_item.py,sha256=LoTDr7zlsZyUrrKK6Ketzl5fxTcFF8YbcxEXbQ65st4,1679
|
7
|
+
fastquadtree/_native.abi3.so,sha256=-hDkoaTfjuYtJnegru6eUbKyHgs5vD2wyV6sJ8txEAY,470240
|
8
8
|
fastquadtree/_obj_store.py,sha256=vmhZGdzEoTQHvRbFjTne_0X2Z1l48SXyB6I9SAjjbiM,5267
|
9
9
|
fastquadtree/point_quadtree.py,sha256=Pz8ZS7N3kYSYJJYGa3ghKzy7d3JCA1dbi9nfEwwpF_k,5178
|
10
10
|
fastquadtree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
-
fastquadtree/pyqtree.py,sha256=
|
11
|
+
fastquadtree/pyqtree.py,sha256=W5akt9gua7mr51eI-I1hqbZJMRdcNKWzpeaZhlOvhb0,5781
|
12
12
|
fastquadtree/rect_quadtree.py,sha256=7F-JceCHn5RLhztxSYCIJEZ_e2TV-NeobobbrdauJQA,3024
|
13
|
-
fastquadtree-1.0.
|
13
|
+
fastquadtree-1.0.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|