vibespatial.constructive.extract_unique_points

GPU-accelerated extract_unique_points: per-geometry coordinate deduplication.

For each geometry row, extracts all coordinates, deduplicates (x, y) pairs, and returns a MultiPoint containing only the unique coordinates.

ADR-0033 tiers:

Tier 1 NVRTC - row-family count/scatter, unique marking, capacity scatter Tier 3a CCCL - segmented_sort and exclusive_sum Tier 2 CuPy - capacity allocation and device metadata transforms

ADR-0002: CONSTRUCTIVE class - fp64 uniform precision. Coordinates are exact subsets of input (no arithmetic), so the precision plan is wired through for observability but stays fp64.

ADR-0034: NVRTC and CCCL warmup registered at module scope.

Attributes

cp

Functions

degenerate_line_centroids_owned_capacity(...)

Reduce collapsed line parts to exact row-aligned centroid points.

extract_unique_points_owned(...)

Extract unique coordinates from each geometry as MultiPoint.

extract_unique_points_native_tabular_result(owned, *)

Module Contents

vibespatial.constructive.extract_unique_points.cp = None
vibespatial.constructive.extract_unique_points.degenerate_line_centroids_owned_capacity(owned: vibespatial.geometry.owned.OwnedGeometryArray, active_mask) vibespatial.geometry.owned.OwnedGeometryArray

Reduce collapsed line parts to exact row-aligned centroid points.

A zero-length LineString contributes its first coordinate. A zero-length MultiLineString contributes the first coordinate of every nonempty part, deduplicates those points per row, then averages the unique points. This is the GEOS-compatible repair semantics previously expressed through sparse extract_unique_points plus generic centroid dispatch.

vibespatial.constructive.extract_unique_points.extract_unique_points_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO, precision: vibespatial.runtime.precision.PrecisionMode | str = PrecisionMode.AUTO) vibespatial.geometry.owned.OwnedGeometryArray

Extract unique coordinates from each geometry as MultiPoint.

For each row, flattens all coordinates, deduplicates (x, y) pairs, and returns a MultiPoint containing the unique coordinates.

Parameters

ownedOwnedGeometryArray

Input geometries (any family).

dispatch_modeExecutionMode or str, default AUTO

Execution mode hint.

precisionPrecisionMode or str, default AUTO

Precision mode. CONSTRUCTIVE class stays fp64 per ADR-0002; wired for observability.

Returns

OwnedGeometryArray

MultiPoint geometries with unique coordinates per row.

vibespatial.constructive.extract_unique_points.extract_unique_points_native_tabular_result(owned: vibespatial.geometry.owned.OwnedGeometryArray, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO, precision: vibespatial.runtime.precision.PrecisionMode | str = PrecisionMode.AUTO, crs=None, geometry_name: str = 'geometry', source_rows=None, source_tokens: tuple[str, Ellipsis] = (), attrs: dict[str, object] | None = None)