vibespatial.io.geojson_gpu¶
GPU byte-classification GeoJSON parser.
Parses GeoJSON FeatureCollection files on GPU using NVRTC kernels for byte classification, structural scanning, coordinate extraction, and ASCII-to-float64 parsing. Property extraction stays on CPU (hybrid design per vibeSpatial GPU memory policy).
Supports homogeneous and mixed Point, LineString, Polygon, MultiPoint, MultiLineString, and MultiPolygon files. GeometryCollection and chunked processing for files exceeding GPU memory are deferred.
Shared parsing primitives (quote parity, bracket depth, number boundary
detection, ASCII float parsing, span masking) are imported from
vibespatial.io.gpu_parse. GeoJSON-specific kernels (coordinate key
search, type detection, ring counting, offset scattering, feature
boundaries) remain in this module.
Attributes¶
Classes¶
Functions¶
|
Parse a GeoJSON file using GPU byte-classification pipeline. |
Module Contents¶
- vibespatial.io.geojson_gpu.cp = None¶
- vibespatial.io.geojson_gpu.KERNEL_PARAM_I64¶
- vibespatial.io.geojson_gpu.KERNEL_PARAM_I8¶
- class vibespatial.io.geojson_gpu.GeoJSONGpuResult¶
-
- n_features: int¶
- path: pathlib.Path | None¶
- source_nbytes: int¶
- source_mtime_ns: int | None¶
- host_bytes: numpy.ndarray | None¶
- feature_starts: numpy.ndarray | None = None¶
- feature_ends: numpy.ndarray | None = None¶
- device_feature_starts: object | None = None¶
- device_feature_ends: object | None = None¶
- property_starts: numpy.ndarray | None = None¶
- property_ends: numpy.ndarray | None = None¶
- device_property_starts: object | None = None¶
- device_property_ends: object | None = None¶
- properties_loader() collections.abc.Callable[[], list[dict[str, object]]]¶
- extract_properties_dataframe()¶
- vibespatial.io.geojson_gpu.read_geojson_gpu(source: str | bytes | bytearray | memoryview | pathlib.Path, *, target_crs: str | None = None, capture_feature_boundaries: bool = True) GeoJSONGpuResult¶
Parse a GeoJSON file using GPU byte-classification pipeline.
Parameters¶
- sourcePath | str | bytes | bytearray | memoryview
GeoJSON FeatureCollection source. Path-like inputs read from the filesystem; string or bytes inputs parse directly from in-memory RFC 7946 payload bytes.
- target_crsstr, optional
Target CRS to reproject coordinates into (e.g.
"EPSG:3857"). GeoJSON is EPSG:4326 by spec (RFC 7946). When provided, a fused GPU coordinate transform runs between parsing and geometry assembly, with zero host round-trips.
Returns a GeoJSONGpuResult with device-resident OwnedGeometryArray and host data for lazy CPU property extraction.