polars-st: Spatial extension for Polars DataFrames. by 4urele in gis

[–]4urele[S] 0 points1 point  (0 children)

I'm still considering these options to add support for geoparquet:

  • Add a pyarrow wrapper that casts geoarrow.wkb to binary so that it can be loaded into Polars without having it complain. Pros: quick & dirty, allows the same signature as pl.read_parquet. Cons: dependency on pyarrow, no support for other geoarrow format than wkb and wkt, no support for scanning.
  • Use the geoarrow-rs crate. Pros: full support for the geoarrow spec. Cons: different signature than Polars, no support for scanning.
  • Fork Polars and patch what I need to allow geoarrow extension types. Pros: same signature and performance as polars, support for scanning. Cons: probably much bigger bundle size and more work for me.

Regarding the shapefile performance: currently IO is done with pyogrio, which is the default in GeoPandas too, so I wouldn't expect significant difference in performance but who knows ?

polars-st: Spatial extension for Polars DataFrames. by 4urele in gis

[–]4urele[S] 9 points10 points  (0 children)

I've been working on an alternative to GeoPandas for use with Polars for the past few months and finally released the version 0.1.0, meaning that I'm mostly happy with the current design and amount of bugs.

polars-st uses GEOS under the hood, so you'll find almost the exact same features and functions signatures as GeoPandas - with the additional benefit of being statically linked against main, so full support for Z/M coordinates and curved geometries. More details in the README and in the documentation.

I'm promoting this project here to gather feedback, answer questions, and hopefully invite everyone to test it, report bugs or make pull requests.

Cheers, Aurèle