API Reference¶
This page provides a categorized overview of the vibeSpatial public API. Every entry links to the full auto-generated documentation with parameters, return types, and docstrings.
For the complete module-by-module reference, see the full API docs.
Core Classes¶
Class |
Description |
|---|---|
pandas DataFrame with a geometry column backed by GPU-resident storage |
|
pandas Series of geometries with the full set of spatial operations |
|
ExtensionArray wrapping Shapely geometry objects |
|
GPU-resident geometry array with zero-copy device access |
Top-Level Functions¶
I/O¶
Function |
Description |
|---|---|
Read vector file (Shapefile, GeoPackage, GeoJSON, etc.) – aliased as |
|
|
Read GeoParquet file – aliased as |
|
Read Feather file – aliased as |
|
List layers in a vector file – aliased as |
|
Read from PostGIS database – aliased as |
|
Write GeoParquet file |
Write vector file |
Spatial Operations¶
Function |
Description |
|---|---|
Spatial join of two GeoDataFrames |
|
Nearest-neighbor spatial join |
|
Spatial overlay (intersection, union, difference, etc.) |
|
Clip geometries to a mask extent |
|
Create point geometries from x, y (and optional z) coordinates |
Runtime¶
Function |
Description |
|---|---|
Query current GPU/CPU runtime selection |
|
Check if a CUDA GPU is available |
|
Set the execution mode (AUTO, GPU, CPU) |
|
Get the currently requested execution mode |
|
Retrieve the dispatch event log |
|
Clear the dispatch event log |
|
Retrieve the fallback event log |
|
Clear the fallback event log |
|
|
Print package version info |
GeoDataFrame Methods¶
Full class documentation: GeoDataFrame
Constructors¶
Method |
Description |
|---|---|
|
Standard constructor |
|
Construct from dictionary |
|
Construct from vector file |
|
Construct from GeoJSON features |
|
Construct from PostGIS query |
|
Construct from Arrow table |
Geometry Management¶
Method |
Description |
|---|---|
|
Set the active geometry column |
|
Rename a geometry column |
|
Name of the active geometry column |
|
Access the active geometry as a GeoSeries |
|
Coordinate reference system |
Spatial Operations¶
Method |
Description |
|---|---|
|
Dissolve geometries by group with GPU-accelerated union |
|
Explode multi-part geometries to single parts |
|
Spatial join with another GeoDataFrame |
|
Nearest spatial join |
|
Clip geometries by a mask |
|
Spatial overlay operation |
Export¶
Method |
Description |
|---|---|
|
Write to GeoParquet |
|
Write to Feather |
|
Write to vector file (Shapefile, GPKG, GeoJSON, etc.) |
|
Write to PostGIS table |
|
Export to GeoJSON string |
|
Export geometries as WKB |
|
Export geometries as WKT |
|
Export to Arrow table |
|
Reproject geometries to a different CRS |
|
Assign or override CRS |
|
Export as GeoJSON-compatible dict |
GeoSeries Methods¶
Full class documentation: GeoSeries
Constructors¶
Method |
Description |
|---|---|
|
Standard constructor |
|
Construct from WKB binary |
|
Construct from WKT strings |
|
Construct points from coordinate arrays |
|
Construct from vector file |
|
Construct from Arrow array |
Coordinate Access¶
Property |
Description |
|---|---|
|
X coordinate (points only) |
|
Y coordinate (points only) |
|
Z coordinate (if present) |
|
M coordinate (if present) |
Geometry Operations¶
These methods are available on both GeoSeries
and GeoDataFrame via the
GeoPandasBase mixin. See the full class
docs for parameter details.
Properties & Measurements¶
Member |
Description |
|---|---|
Area of each geometry |
|
Length of each geometry |
|
Bounding box (minx, miny, maxx, maxy) per geometry |
|
Total bounding box of all geometries |
|
Geometry type string per geometry |
|
Validity check |
|
Reason for invalidity |
|
Empty check |
|
Simplicity check |
|
Ring check |
|
Closed check |
|
Counter-clockwise winding check |
|
Has Z coordinates |
|
Has M coordinates |
|
Total coordinate count |
|
Sub-geometry count |
|
Interior ring count |
|
Grid precision |
Binary Predicates¶
Method |
Description |
|---|---|
Contains test |
|
Contains properly (excludes boundary) |
|
Covers test |
|
Covered by test |
|
Crosses test |
|
Disjoint test |
|
Intersects test |
|
Overlaps test |
|
Touches test |
|
Within test |
|
Within distance threshold |
|
Geometry equality |
|
Exact equality with tolerance |
|
Identical equality |
|
DE-9IM relationship string |
|
Match a DE-9IM pattern |
Constructive Operations¶
Method |
Description |
|---|---|
Buffer geometries by distance |
|
Centroid point |
|
Convex hull |
|
Concave hull |
|
Minimum bounding rectangle |
|
Minimum rotated bounding rectangle |
|
Minimum bounding circle |
|
Maximum inscribed circle |
|
Minimum bounding radius |
|
Geometry boundary |
|
Exterior ring (polygons) |
|
Interior rings (polygons) |
|
Point guaranteed inside geometry |
|
All unique vertices |
|
Douglas-Peucker simplification |
|
Simplify preserving coverage topology |
|
Repair invalid geometries |
|
Normalize ring direction |
|
Orient polygon rings |
|
Reverse coordinate order |
|
Densify by max segment length |
|
Offset a line by distance |
|
Clip to a rectangle |
|
Merge connected line segments |
|
Remove duplicate vertices |
|
Set coordinate grid precision |
|
Delaunay triangulation |
|
Constrained Delaunay triangulation |
|
Voronoi diagram |
|
Build polygonal area from linework |
|
Polygonize line segments |
|
Random point sampling |
Set Operations¶
Method |
Description |
|---|---|
Set difference |
|
Symmetric difference |
|
Pairwise union |
|
Pairwise intersection |
|
Union all geometries in the series |
|
Intersect all geometries in the series |
Distance & Relationships¶
Method |
Description |
|---|---|
Distance to another geometry |
|
Hausdorff distance |
|
Frechet distance |
|
Shortest line between geometries |
|
Project point onto line |
|
Interpolate point along line |
|
Snap to another geometry |
|
Shared path segments |
Transformations¶
Method |
Description |
|---|---|
Apply affine transformation matrix |
|
Translate by x/y/z offsets |
|
Rotate by angle |
|
Scale by x/y/z factors |
|
Skew by x/y angles |
|
Apply coordinate transformation function |
|
Drop Z/M, force 2D |
|
Add Z coordinate |
Coordinate Access¶
Member |
Description |
|---|---|
Get coordinate arrays |
|
Coordinate-based indexer |
|
Hilbert curve distance for spatial ordering |
|
Get sub-geometry by index |
Spatial Index¶
Member |
Description |
|---|---|
Spatial index (STRtree) |
|
Whether spatial index is built |
|
|
GPU-resident Hilbert R-tree (built via |
GPU-Accelerated File Reading¶
read_file() automatically routes eligible requests to GPU-accelerated
parsers when a GPU is available. No code changes are required; dispatch
selection is transparent to user code and recorded as an observable event.
Supported Formats¶
Format |
Extension |
Native/GPU route |
Compatibility boundary |
|---|---|---|---|
GeoParquet |
|
GeoArrow/WKB decode and GPU scan where available |
pyarrow |
Feather/Arrow |
|
Native GeoArrow codec |
pyarrow |
GeoJSON |
|
Eligible unfiltered reads use GPU byte-classify geometry parse |
pyogrio / fast-json compatibility |
Shapefile |
|
Direct SHP/DBF native path or Arrow + GPU WKB bridge |
pyogrio |
GeoPackage |
|
Shared Arrow + GPU WKB native boundary for supported requests |
pyogrio |
File Geodatabase |
|
Shared Arrow + GPU WKB native boundary for supported requests |
pyogrio |
FlatGeobuf |
|
Direct FlatBuffer GPU decoder for eligible reads |
pyogrio |
CSV/TSV |
|
GPU WKT/WKB decode for detected geometry columns |
pyogrio / pandas |
KML |
|
Direct WKT/native boundary for supported requests |
pyogrio |
GML |
|
Shared Arrow + GPU WKB native boundary for supported requests |
pyogrio |
GPX |
|
Shared Arrow + GPU WKB native boundary for supported requests |
pyogrio |
TopoJSON |
|
Shared Arrow + GPU WKB native boundary for supported requests |
pyogrio |
GeoJSON-Seq |
|
Rewrites eligible records to the GPU GeoJSON parser |
pyogrio |
WKT |
|
GPU WKT parser |
none for supported 2D geometry |
OSM PBF |
|
Native full-data path and parallel supported-layer public reads |
pyogrio for unsupported relation leftovers |
PostGIS |
|
ADBC/WKB bridge when available |
Shapely WKB |
CSV Spatial Column Auto-Detection¶
When reading CSV files, vibeSpatial auto-detects spatial columns by header name (case-insensitive). You can also specify columns explicitly.
Latitude columns (any of):
latitude, lat, y, lat_y, point_y
Longitude columns (any of):
longitude, lon, lng, x, long, lon_x, point_x
Geometry columns (WKT text or hex-encoded WKB, any of):
geometry, geom, wkt, the_geom, shape, wkb
# Auto-detected from column names
gdf = gpd.read_file("data.csv")
# Explicit column override
gdf = gpd.read_file("data.csv", lat_col="custom_lat", lon_col="custom_lon")
When a geometry column is detected, vibeSpatial peeks at the first value to determine the encoding:
Hex WKB: starts with
00or01(byte-order marker), even length, all hex digits → decoded via GPU WKB pipelineWKT text: everything else → parsed via GPU WKT pipeline
Fused Pipelines¶
# Reproject during parse (zero extra passes over coordinate data)
gdf = gpd.read_file("data.geojson", target_crs="EPSG:3857")
# Build GPU Hilbert R-tree spatial index during parse
gdf = gpd.read_file("data.geojson", build_index=True)
gdf.gpu_spatial_index # → GpuSpatialIndex or None
Parameters That Disable GPU¶
The GPU fast path is bypassed when any of these are specified:
bbox, columns, rows, mask, or engine.
Direct GPU Reader Access¶
Power users can import GPU readers directly for fine-grained control:
from vibespatial.io import (
read_wkt_gpu, # WKT bytes → OwnedGeometryArray
read_csv_gpu, # CSV bytes → CsvGpuResult
read_kml_gpu, # KML bytes → KmlGpuResult
read_osm_pbf_nodes, # PBF path → OsmGpuResult
build_spatial_index, # Coordinates → GpuSpatialIndex
)
Execution Modes¶
from vibespatial import ExecutionMode, set_execution_mode
set_execution_mode(ExecutionMode.AUTO) # Default: GPU when available
set_execution_mode(ExecutionMode.GPU) # Force GPU (raises if unavailable)
set_execution_mode(ExecutionMode.CPU) # Force CPU
Environment Variables¶
Variable |
Default |
Effect |
|---|---|---|
|
|
Force execution mode ( |
|
disabled |
Set |
|
disabled |
Set |
|
disabled |
Set |
|
disabled |
Path to write structured dispatch event log |
|
unset |
Limit GPU memory pool size (bytes) |
|
disabled |
Set |
|
disabled |
Set |
|
enabled |
Set |
|
enabled |
Set |
|
enabled |
Set |
|
|
Override CCCL cache directory |
|
|
Override NVRTC cache directory |
|
enabled |
Set |
Projection¶
GeoDataFrame.to_crs() reprojects geometries using
vibeProj for GPU-accelerated coordinate
transforms. See the
vibeSpatial integration guide
for the zero-copy transform_buffers() API.
Raster¶
Install for
GPU raster operations under the vibespatial.raster namespace. See the
for shared module details.