| Crates.io | pyo3-geoarrow |
| lib.rs | pyo3-geoarrow |
| version | 0.7.0 |
| created_at | 2024-10-04 15:01:50.737899+00 |
| updated_at | 2026-01-05 04:01:41.537111+00 |
| description | GeoArrow integration for pyo3. |
| homepage | |
| repository | https://github.com/geoarrow/geoarrow-rs |
| max_upload_size | |
| id | 1396672 |
| size | 142,302 |
PyO3 bindings for GeoArrow types, enabling seamless integration between Rust's GeoArrow implementation and Python.
This crate provides Python-compatible wrappers around GeoArrow data structures, allowing Python code to efficiently work with and share geospatial data in the GeoArrow format through the Arrow C Data Interface (using the Arrow PyCapsule Interface) without data copies.
PyGeoArray]: Python wrapper for GeoArrow geometry arraysPyGeoChunkedArray]: Python wrapper for chunked GeoArrow geometry arraysPyGeoArrayReader]: Python wrapper for streaming array readersPyGeoScalar]: Python wrapper for GeoArrow scalar geometriesPyGeoType]: Python wrapper for GeoArrow data typesPyCrs]: Python wrapper for coordinate reference system representationThis crate is primarily intended for use by Python binding developers who need to interoperate with GeoArrow data in Python. It is also used internally by the geoarrow-rust-* Python packages.
use std::sync::Arc;
use pyo3::prelude::*;
use pyo3_geoarrow::PyGeoArray;
use geoarrow_array::GeoArrowArray;
#[pyfunction]
fn process_geometry(py: Python, array: PyGeoArray) -> PyResult<PyGeoArray> {
// Access the underlying GeoArrow array
let inner: Arc<dyn GeoArrowArray> = array.into_inner();
// Perform operations...
Ok(PyGeoArray::new(inner))
}
This crate implements the Arrow PyCapsule Interface, allowing GeoArrow objects to be exchanged with any Python library that supports Arrow, including:
This crate builds on:
pyo3: Python bindings for Rustpyo3-arrow: Arrow integration for PyO3geoarrow-array: Core GeoArrow array typesgeoarrow-schema: GeoArrow type system and metadata