Skip to main content

GPU-first spatial analytics for Python

Project description

vibeSpatial

vibeSpatial is a GPU-first spatial analytics library for Python. Change one import line and your existing GeoPandas code runs on CUDA — binary predicates, buffer, overlay, dissolve, make-valid, spatial joins, and I/O all dispatch to GPU kernels automatically, with transparent CPU fallback when no GPU is available.

Install

pip install vibespatial

Quick start

import vibespatial as gpd

gdf = gpd.read_file("my_data.gpkg")
buffered = gdf.buffer(100)
joined = gpd.sjoin(gdf, buffered)
gdf.to_parquet("out.parquet")

Real-world example: 7.2 million buildings

Load every building footprint in Florida, reproject to UTM, find all buildings within 1 km of a random pick, and export to GeoParquet. The full script is at examples/nearby_buildings.py.

import vibespatial as gpd

# Read 7.2M buildings from Microsoft US Building Footprints
gdf = gpd.read_file("Florida.geojson")

# Reproject to UTM for metric distances
gdf_utm = gdf.to_crs(gdf.geometry.estimate_utm_crs())

# Pick a random building and find everything within 1 km
seed = gdf_utm.geometry.iloc[random.randrange(len(gdf_utm))]
nearby = gdf_utm[gdf_utm.geometry.dwithin(seed.centroid, 1_000)]

# Export to GeoParquet
nearby.to_crs(epsg=4326).to_parquet("nearby_buildings.parquet")

vibeSpatial is a drop-in replacement for GeoPandas. Here is the only diff:

-import geopandas as gpd
+import vibespatial as gpd

 gdf = gpd.read_file("Florida.geojson")
 gdf_utm = gdf.to_crs(gdf.geometry.estimate_utm_crs())
 seed = gdf_utm.geometry.iloc[random.randrange(len(gdf_utm))]
 nearby = gdf_utm[gdf_utm.geometry.dwithin(seed.centroid, 1_000)]
 nearby.to_crs(epsg=4326).to_parquet("nearby_buildings.parquet")

Performance on 7.2M polygons (RTX 4090 vs GeoPandas on i9-13900k):

Step GeoPandas vibeSpatial Speedup
Read GeoJSON 57.7 s 11.7 s 4.9x
Reproject to UTM 8.2 s 0.4 s 21x
Select within 1 km 0.2 s 0.5 s --
Write GeoParquet 0.2 s 0.1 s 2x
End-to-end 66.3 s 12.7 s 5.2x

GeoJSON reading uses GPU byte-classification: 10 NVRTC kernels parse JSON structure, extract coordinates, and assemble geometry directly on-device in 1.8 s (32x vs pyogrio); property extraction stays on CPU via orjson. Reprojection uses vibeProj fused GPU kernels via transform_buffers() -- no host round-trip. Spatial queries use device-resident bounding-box prefilter + GPU distance kernels.

Tech stack

Layer Technology
GPU kernels NVRTC (runtime-compiled CUDA C via cuda-python)
GPU primitives CCCL (cccl — scan, sort, reduce, select)
GPU arrays CuPy (device memory, element-wise ops, prefix sums)
GPU JSON parse Custom byte-classification kernels (ADR-0038)
GPU projection vibeProj
GPU Parquet/Arrow pylibcudf (WKB decode, GeoArrow codec)
CPU compatibility GeoPandas API (vendored upstream test suite)
JSON parsing orjson (property extraction)
File I/O pyogrio (Shapefile, GPKG, small GeoJSON)
Packaging uv, hatchling

All GPU kernels are pure Python — CUDA C source strings compiled at runtime via NVRTC with background warmup (ADR-0034). No compiled extensions, no nvcc build step.

Documentation

See the documentation for the full API reference, GPU acceleration guide, and I/O format support matrix.


Contributing

uv sync --group dev
uv run python scripts/check_docs.py --refresh
uv run python scripts/vendor_geopandas_tests.py
uv run pytest tests/upstream/geopandas/tests/test_config.py

Dependency groups

  • dev: local development and pytest tooling
  • upstream-optional: heavier I/O and visualization extras for broader coverage
  • gpu-optional: CUDA runtime, CuPy, pylibcudf

Layout

  • src/vibespatial/: package code
  • src/geopandas/: GeoPandas compatibility shim
  • tests/: repo-owned tests
  • tests/upstream/geopandas/: vendored upstream GeoPandas test suite
  • docs/: architecture docs and ADRs
  • examples/: benchmarks and usage examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vibespatial-0.1.0.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vibespatial-0.1.0-py3-none-any.whl (612.8 kB view details)

Uploaded Python 3

File details

Details for the file vibespatial-0.1.0.tar.gz.

File metadata

  • Download URL: vibespatial-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vibespatial-0.1.0.tar.gz
Algorithm Hash digest
SHA256 44148d644d2e21ae4500d150edf36007458dd55e16994ccd0e48cdb830a8c96a
MD5 a66c32314a24dab6aba3a144438e29c5
BLAKE2b-256 a9bba0efb9e9c868e49a2ba785d84fcb9be2e89bc5ef4bb197b12e86bdd04a7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibespatial-0.1.0.tar.gz:

Publisher: publish.yml on jarmak-personal/vibeSpatial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vibespatial-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vibespatial-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 612.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vibespatial-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78b52ae7c880aef82141a6c46e58602864e40ea78ac40a10d4d18db8eae8b10e
MD5 c6cc2c33aa4fc8aa5c75002fad485ca0
BLAKE2b-256 7506d90cb77d6b7f5a2e6b25ec455a1167de5a43e350d85661799031e778fb11

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibespatial-0.1.0-py3-none-any.whl:

Publisher: publish.yml on jarmak-personal/vibeSpatial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page