geoarrow-c provides Python bindings to the GeoArrow C and C++ implementation, enabling a geospatial type system and generic coordinate-shuffling. It supports Well-Known Binary (WKB), Well-Known Text (ISO), and GeoArrow encodings as Arrow extension types. The library is currently at version 0.3.1 and primarily serves as a low-level dependency for higher-level Python libraries like `geoarrow-python`. Its release cadence follows updates to the GeoArrow specification and its underlying C/C++ implementation.
pip install geoarrow-cVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the recommended way to interact with GeoArrow data in Python using `geoarrow-pyarrow`, which leverages `geoarrow-c` internally. It includes a basic example of reading GeoArrow-encoded data. It also shows a minimal direct import of `geoarrow.c.lib` for low-level access, which is generally not needed by most users.
Prefer `pip install geoarrow-pyarrow` and `import geoarrow.pyarrow as ga` for most use cases.
Ensure all GeoArrow-related libraries in your ecosystem (e.g., `geoarrow-python`, `geoarrow-c`) are updated to versions that support the same GeoArrow specification (preferably 0.2 or newer) to ensure compatibility and correct interpretation of data structures and metadata. Refer to the GeoArrow specification changelog.
For standard installation, use `pip install geoarrow-c` to leverage pre-built wheels. For development builds, consult the `geoarrow-c` GitHub repository's build instructions and ensure all submodules and dependencies are correctly fetched and configured with CMake. The internal vendored copies of geoarrow-c and nanoarrow are updated in `geoarrow 0.4.0`.
Run `pip install geoarrow-c`.
Install `geoarrow-pyarrow` (`pip install geoarrow-pyarrow`) and use `import geoarrow.pyarrow as ga` for operations like reading GeoParquet, converting to GeoPandas, or performing computations.
Direct interaction with `geoarrow.c.lib` requires a deep understanding of the Arrow C Data interface. It is highly recommended to use higher-level Python libraries like `pyarrow` and `geoarrow-pyarrow` that safely manage these low-level details. If direct interaction is unavoidable, meticulously follow the Arrow C Data interface specification and `geoarrow-c`'s C/C++ examples for correct memory management.