Skip to main content

cuSpatial: GPU-Accelerated Spatial and Trajectory Data Management and Analytics Library

Project description

 cuSpatial - GPU-Accelerated Vector Geospatial Data Analysis

Note

cuSpatial depends on cuDF and RMM from RAPIDS.

cuProj - GPU-accelerated Coordinate Reference System (CRS) Transformations

cuProj is a new RAPIDS library housed within the cuSpatial repo that provides GPU-accelerated transformations of coordinates between coordinate reference systems (CRS). cuProj is available as of release 23.10 with support for transformations of WGS84 coordinates to and from Universal Transverse Mercator (UTM) :globe_with_meridians:.

To learn more about cuProj, see the Python cuProj README or the c++ libcuproj README.

Resources

Overview

cuSpatial accelerates vector geospatial operations through GPU parallelization. As part of the RAPIDS libraries, cuSpatial is inherently connected to cuDF, cuML, and cuGraph, enabling GPU acceleration across entire workflows.

cuSpatial represents data in GeoArrow format, which enables compatibility with the Apache Arrow ecosystem.

cuSpatial's Python API is closely matched to GeoPandas and data can seamlessly transition between the two:

import geopandas
from shapely.geometry import Polygon
import cuspatial

p1 = Polygon([(0, 0), (1, 0), (1, 1)])
p2 = Polygon([(0, 0), (1, 0), (1, 1), (0, 1)])
geoseries = geopandas.GeoSeries([p1, p2])

cuspatial_geoseries = cuspatial.from_geopandas(geoseries)
print(cuspatial_geoseries)

Output:

0    POLYGON ((0 0, 1 0, 1 1, 0 0))
1    POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))

For additional examples, browse the complete API documentation, or check out more detailed notebooks. the NYC Taxi and Weather notebooks make use of cuSpatial.

Supported Geospatial Operations

cuSpatial is constantly working on new features! Check out the epics for a high-level view of our development, or the roadmap for the details!

Core Spatial Functions

Indexing and Join Functions

Trajectory Functions

What if operations I need aren't supported?

Thanks to the from_geopandas and to_geopandas functions you can accelerate what cuSpatial supports, and leave the rest of the workflow in place.

---
title: Integrating into Existing Workflows
---
%%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'showBranches': false},
            'themeVariables': {'commitLabelColor': '#000000',
            'commitLabelBackground': '#ffffff',
            'commitLabelFontSize': '14px'}} }%%
gitGraph
   commit id: "Existing Workflow Start"
   commit id: "GeoPandas IO"
   commit id: "Geospatial Analytics"
   branch a
   checkout a
   commit id: "from_geopandas"
   commit id: "cuSpatial GPU Acceleration"
   branch b
   checkout b
   commit id: "cuDF"
   commit id: "cuML"
   commit id: "cuGraph"
   checkout a
   merge b
   commit id: "to_geopandas"
   checkout main
   merge a
   commit id: "Continue Work"

Using cuSpatial

CUDA/GPU requirements

Quick start: Docker

Use the RAPIDS Release Selector, selecting Docker as the installation method. All RAPIDS Docker images contain cuSpatial.

An example command from the Release Selector:

docker run --gpus all --pull always --rm -it \
    --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
    -p 8888:8888 -p 8787:8787 -p 8786:8786 \
    nvcr.io/nvidia/rapidsai/notebooks:24.10-cuda11.8-py3.10

Install with Conda

To install via conda:

Note cuSpatial is supported only on Linux or through WSL, and with Python versions 3.10, 3.11, and 3.12.

cuSpatial can be installed with conda (miniconda, or the full Anaconda distribution) from the rapidsai channel:

conda install -c rapidsai -c conda-forge -c nvidia \
    cuspatial=24.10 python=3.12 cudatoolkit=11.8

We also provide nightly Conda packages built from the HEAD of our latest development branch.

See the RAPIDS installation documentation for more OS and version info.

Install with pip

To install via pip:

Note cuSpatial is supported only on Linux or through WSL, and with Python versions 3.10, 3.11, and 3.12.

The cuSpatial pip packages can be installed from NVIDIA's PyPI index. pip installations require using the matching wheel to the system's installed CUDA toolkit.

  • For CUDA 11 toolkits, install the -cu11 wheels
  • For CUDA 12 toolkits install the -cu12 wheels
  • If your installation has a CUDA 12 driver but a CUDA 11 toolkit, use the -cu11 wheels.
pip install cuspatial-cu12 --extra-index-url=https://pypi.nvidia.com
pip install cuspatial-cu11 --extra-index-url=https://pypi.nvidia.com

Build/Install from source

To build and install cuSpatial from source please see the build documentation.

Citing cuSpatial

If you find cuSpatial useful in your published work, please consider citing the repository.

@misc{cuspatial:24.10,
    author = {{NVIDIA Corporation}},
    title = {cuSpatial: GPU-Accelerated Geospatial and Spatiotemporal Algorithms},
    year = {2023},
    publisher = {NVIDIA},
    howpublished = {\url{https://github.com/rapidsai/cuspatial}},
    note = {Software available from github.com},
}

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

cuspatial_cu11-24.10.0.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file cuspatial_cu11-24.10.0.tar.gz.

File metadata

  • Download URL: cuspatial_cu11-24.10.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for cuspatial_cu11-24.10.0.tar.gz
Algorithm Hash digest
SHA256 b705185e1d9b7d79c89a901f6b8824de49a98ad0411daee6ec0bcc1247f4765b
MD5 d5744ca7ed773a28788864b02933b733
BLAKE2b-256 95700384675cbb9e76590e99e743251b2d577cdb0419001ca92c59383a7e5520

See more details on using hashes here.

Supported by

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