vibespatial.spatial.query_types

Attributes

Classes

SpatialQueryExecution

RegularGridPointIndex

DeviceSpatialJoinResult

Device-resident spatial join index pairs (Phase 2 zero-copy overlay).

SpatialJoinIndices

ADR-0042: Typed contract for low-level spatial kernel index output.

Module Contents

vibespatial.spatial.query_types.SUPPORTED_GEOM_TYPES
class vibespatial.spatial.query_types.SpatialQueryExecution
requested: vibespatial.runtime.ExecutionMode
selected: vibespatial.runtime.ExecutionMode
implementation: str
reason: str
class vibespatial.spatial.query_types.RegularGridPointIndex
origin_x: float
origin_y: float
cell_width: float
cell_height: float
cols: int
rows: int
size: int
class vibespatial.spatial.query_types.DeviceSpatialJoinResult

Device-resident spatial join index pairs (Phase 2 zero-copy overlay).

Holds left and right index arrays as CuPy int32 device arrays, eliminating the D->H->D round-trip when both sides of an overlay have owned (device-resident) geometry backing.

Use to_host() when host-side numpy arrays are needed (e.g., for pandas attribute assembly or Shapely fallback paths).

d_left_idx: Any
d_right_idx: Any
to_host() tuple[numpy.ndarray, numpy.ndarray]

Copy index arrays to host as numpy int32 arrays.

property size: int

Number of index pairs.

class vibespatial.spatial.query_types.SpatialJoinIndices

ADR-0042: Typed contract for low-level spatial kernel index output.

Device-native workflows may carry richer result objects, but the low-level spatial-query seam still uses integer index arrays. This frozen dataclass enforces that dtype invariant at construction time.

left: numpy.ndarray
right: numpy.ndarray
classmethod from_raw(left, right) SpatialJoinIndices

Validate and coerce raw arrays into the canonical index form.