Version 0.25 (August 8, 2025)#

This version contains a lot of maintenance work and updating internal portions of the code to use more modern Python features and methods. There was a lot of work done in path transformations to provide more robust Shapely to Matplotlib Path and vice versa transformations. Additionally, there are several new projections that were added in this release.

The new minimum supported versions of dependencies that have been updated are:

  • Shapely 2.0

🎉 Features#

  • Ruth Comer introduced shapely_to_path and path_to_shapely which map a single Shapely geometry or collection to a single Matplotlib path and vice versa. (PR #2455)

  • The Orthographic projection now supports a rotation keyword argument that applies azimuthal rotation to the projection. Thanks Ken Hirata for this work. (PR #2504)

  • The Spilhaus projection was added by Wenrui Jiang (requires PROJ 9.6+). (PR #2529)

🐛 Bug Fixes#

  • Greg Lucas fixed the image transform code to add a half-pixel shift to the y coordinate (the x coordinate was already shifted a half-pixel). (PR #2461)

  • Ruth Comer fixed cases where a single inverted polygon was being projected incorrectly. (PR #2470)

  • Transforming multipolygons with holes was improved by Ruth Comer to avoid some libgeos errors. (PR #2521)

  • Greg Lucas fixed gridline handling of offset central longitudes. The gridlines now extend to the edges of the maps. (PR #2489)

  • Romain Jolivet fixed a potential initialization error when downloading with a PosixPath. (PR #2500)

📚 Documentation#

🛠️ Maintenance#

  • Greg Lucas changed all internal function calls to prefer the (lon, lat) ordering for all inputs and outputs to provide more consistency. (PR #2453)

  • Greg Lucas replaced the deprecated utcnow() calls.

  • Miroslav Šedivý updated path and math functions with modern replacements. (PR #2508 and PR #2509)

  • Mattias Cuntz updated the French WFS server addresses for tests. (PR #2524)

  • Katelyn Fitzgerald updated the Cython code to use libc.math instead of numpy.math. (PR #2528)

  • Bill Little updated the license and license-file fields to conform with PEP 639. (PR #2526)

🚫 Deprecations and Removals#

  • The cartopy.mpl.clip_path module is deprecated without replacement. Please vendor these functions if you need them.

  • path_to_geos and geos_to_path are deprecated. Use path_to_shapely and shapely_to_path instead.

  • path_segments is deprecated without replacement. The implementation is simply

    pth = path.cleaned(**kwargs)
    return pth.vertices[:-1, :], pth.codes[:-1]