New Python bindings / RFC proposal for Shapely 2.0

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

New Python bindings / RFC proposal for Shapely 2.0

Joris Van den Bossche
Hi all,

This email is not directly related to GEOS development itself, so excuse my interruption here. But it is about Python bindings to GEOS, so I assumed this would be of interest to some of the people following this list. And if not, you can skip the rest of the message ;)

Background: we have been working on a new set of Python bindings to GEOS in the PyGEOS package ( The initial focus was to make it easier and more performant to work with arrays of geometries (where Shapely is now focused on scalar geometries). In its core, PyGEOS provides two things: a Python extension type coded in C that wraps a GEOS geometry pointer in a PyObject (which gives us memory management from the Python side), and a set of vectorized functions exposing GEOS' spatial operations making use of numpy's ufunc API ("universal function", element-wise array functions with broadcasting). See for some more details.

While this separate package made it easier to experiment (and which we are still doing), on the long term, it's not ideal to have two incompatible GEOS wrappers in the Python ecosystem. Therefore, there is now a proposal to upstream the work being done in PyGEOS to Shapely, along with some API changes in Shapely: "RFC 1: Roadmap for Shapely 2.0" (

Given that this are some profound changes to Shapely, feedback from Shapely users would be very much appreciated! 
(feedback on the details how we are wrapping GEOS in PyGEOS is of course also welcome)


geos-devel mailing list
[hidden email]