https://github.com/pola-rs/geopolars
Geospatial extensions for Polars
https://github.com/pola-rs/geopolars
apache-arrow geospatial polars pyo3 python rust
Last synced: about 1 month ago
JSON representation
Geospatial extensions for Polars
- Host: GitHub
- URL: https://github.com/pola-rs/geopolars
- Owner: pola-rs
- License: mit
- Created: 2022-05-24T03:31:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-12-10T21:37:24.000Z (7 months ago)
- Last Synced: 2026-04-04T05:37:32.892Z (3 months ago)
- Topics: apache-arrow, geospatial, polars, pyo3, python, rust
- Language: Python
- Homepage: https://geopolars.org
- Size: 5.97 MB
- Stars: 875
- Watchers: 42
- Forks: 26
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GeoPolars
Geospatial DataFrames for Rust and Python
> Update (December 2025): GeoPolars _had been_ [blocked](https://github.com/pola-rs/polars/issues/1830#issuecomment-2218102856) on Polars supporting [Arrow extension types](https://github.com/pola-rs/polars/issues/9112), but as of November 2025, Polars has now [added support for Arrow extension types](https://github.com/pola-rs/polars/pull/25322).
>
> This project will now move forward, subject to time constraints. See [issue
> thread
> here](https://github.com/pola-rs/geopolars/issues/245#issuecomment-3568363838)
> for more information. If you'd like to contribute, for the time being, feel
> free to comment on that thread. Soon we'll have better contributor
> documentation.
## Summary
GeoPolars extends the [Polars][polars] DataFrame library for use with geospatial data.
- Uses [GeoArrow][geo-arrow-spec] as the internal memory model.
- Written in Rust
- Bindings to Python
- Multithreading capable
At this point, GeoPolars is a **prototype** and should not be considered production-ready.
## Use from..
### Rust
GeoPolars is [published to crates.io](https://crates.io/crates/geopolars) under the name `geopolars`.
Documentation is available at [docs.rs/geopolars](https://docs.rs/geopolars).
### Python
An early alpha (`v0.1.0-alpha.4`) is published to PyPI:
```
pip install --pre geopolars
```
The publishing processs includes binary wheels for many platforms, so it should be easy to install, without needing to compile the underlying Rust code from source.
### WebAssembly
Polars itself does not yet exist in WebAssembly, though there has been discussion about adding bindings for it. The long-term goal of GeoPolars is to have a WebAssembly API as well.
## Comparison with GeoPandas
Imitation is the sincerest form of flattery! GeoPandas — and its underlying libraries of `shapely` and `GEOS` — is an incredible production-ready tool.
GeoPolars is nowhere near the functionality or stability of GeoPandas, but competition is good and, due to its pure-Rust core, GeoPolars will be much easier to use in WebAssembly.
## Future work
The biggest pieces of future work are:
- Store geometries in the efficient Arrow-native format, rather than as WKB buffers (as the prototype currently does). This is blocked on Polars, which doesn't currently support Arrow `FixedSizeList` data types, but they've recently [expressed openness](https://github.com/pola-rs/polars/issues/4014#issuecomment-1212376538) to adding minimal `FixedSizeList` support.
- Enable `georust/geo` algorithms to access Arrow data with zero copy. The prototype currently copies WKB geometries into `geo` structs on each geometry operation, which is expensive.
This is blocked on adding support to the `geo` library for geometry access traits, which is a large undertaking. See [georust/geo/discussions/838](https://github.com/georust/geo/discussions/838). I've started exploration on this
- Implement GeoArrow extension types for seamless handling of CRS metadata in Rust, rather than in the Python wrapper.
[polars]: https://github.com/pola-rs/polars
[geo-arrow-spec]: https://github.com/geoarrow/geoarrow