fastquadtree.PointItem¶
Bases: Item
Lightweight point item wrapper for tracking and as_items results.
Attributes:
| Name | Type | Description |
|---|---|---|
id_ | int | Integer identifier. |
geom | Point | Bounds | The point geometry as (x, y). |
obj | Any | None | The attached Python object if available, else None. |
id_ = id_ instance-attribute ¶
geom = geom instance-attribute ¶
obj = obj instance-attribute ¶
to_dict() ¶
Serialize the item to a dictionary.
Returns:
| Type | Description |
|---|---|
dict[str, Any] | A dictionary with 'id', 'geom', and 'obj' keys. |
from_dict(data) classmethod ¶
Deserialize an item from a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data | dict[str, Any] | A dictionary with 'id', 'geom', and 'obj' keys. | required |
Returns:
| Type | Description |
|---|---|
Item | An Item instance populated with the deserialized data. |