GeoPython 2023

2023-03-07, 09:15–09:45, Auditorium

Shapely 2.0 has finally arrived! Several years in the works, Shapely 2.0 is a major release, featuring a large refactor and fast, vectorized (element-wise) array operations along with many other improvements.


Shapely 2.0, recently released and several years in the works, is a major release featuring a complete refactor of the internals and new vectorized (element-wise) array operations providing considerable performance improvements, along with several breaking API changes and many feature improvements. As one of the fundamental geospatial libraries in Python, this is an important release for the geospatial ecosystem.

This presentation will highlight the main improvements of the release: the geometry objects (Point, LineString, Polygon, .. classes) are now immutable, hashable and non-iterable objects, making it a lot easier to work with numpy arrays of geometries. And now we can work with arrays of geometries, Shapely 2.0 provides vectorized (element-wise) versions of all spatial functions that: 1) give a considerable performance improvement , 2) release the GIL (allowing multithreading, e.g. in dask-geopandas), and 3) is simply easier than for loops. In addition, many new features from the latest GEOS versions are now exposed (fixed precision overlay functions, distance within, concave hull, ...).

Further, the presentation will provide some background about the release (and the integration of the PyGEOS package into Shapely) and give concrete upgrade tips.