Shapely

Latest version: v2.0.4

Safety actively analyzes 619456 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

3.12

- ``oriented_envelope`` / ``minimum_rotated_rectangle`` changed its implementation
in GEOS 3.12. Be aware that results will change when updating GEOS. Coincidentally
the implemenation is similar to the shapely 1.x approach. (1885)
- ``get_coordinate_dimension`` / ``has_z`` now considers geometries three dimensional if
they have a NaN z coordinate. (1885)
- ``voronoi_polygons`` changed its output from a LINESTRING to a MULTILINESTRING in case
``only_edges=True``. (1885)
- The WKT representation of a MULTIPOINT changed from for example "MULTIPOINT (0 0, 1 1)"
to "MULTIPOINT ((0 0), (1 1))". (1885)

2.1.0

------------------

Bug fixes:

- Prevent crash when serializing a number > 1e100 to WKT with GEOS < 3.13. (1907)

Improvements:

- Require GEOS >= 3.8, NumPy >= 1.16, and Python >= 3.8 (1802, 1885)
- Handle ``Feature`` type in ``shapely.geometry.shape`` (1815)
- Add a ``handle_nan`` parameter to ``shapely.linestrings()`` and ``shapely.linearrings()``
to allow, skip, or error on nonfinite (NaN / Inf) coordinates. The default
behaviour (allow) is backwards compatible (1594).
- Add an ``interleaved`` parameter to ``shapely.transform()`` allowing a transposed call
signature in the ``transformation`` function.
- The ``include_z`` in ``shapely.transform()`` now also allows ``None``, which
lets it automatically detect the dimensionality of each input geometry.
- Add parameters ``method`` and ``keep_collapsed`` to ``shapely.make_valid()`` (1941)
- Upgraded the GEOS version in the binary wheel distributions to 3.12.1.
- The ``voronoi_polygons`` now accepts the ``ordered`` keyword, optionally forcing the
order of polygons within the GeometryCollection to follow the order of input
coordinates. Requires at least GEOS 3.12. (1968)

2.0.4

------------------

Wheels for Python versions >= 3.9 will be compatible with the upcoming NumPy 2.0
release (as well as with supported NumPy 1.x versions).

Bug fixes:

- Fix bug in ``to_wkt`` with multiple empty Z geometries (2012).
- Fix bug in ``to_ragged_array`` for an array of Points with missing values (2034).

2.0.3

------------------

- Fix regression in the ``oriented_envelope`` ufunc to accept array-like input
in case of GEOS<3.12 (1929).
- The binary wheels are not yet compatible with a future NumPy 2.0 release,
therefore a ``numpy<2`` upper pin was added to the requirements (1972).
- Upgraded the GEOS version in the binary wheel distributions to 3.11.3.

2.0.2

------------------

Bug fixes:

- Fix regression in the (in)equality comparison (``geom1 == geom2``) using ``__eq__`` to
not ignore the z-coordinates (1732).
- Fix ``MultiPolygon()`` constructor to accept polygons without holes (1850).
- Fix ``minimum_rotated_rectangle`` (``oriented_envelope``) to always return
the minimum area solution (instead of minimum width). In practice, it will use the
GEOS implementation only for GEOS 3.12+, and for older GEOS versions fall back to the
implementation that was included in Shapely < 2 (1670).
- Fix ``from_ragged_array`` to work with read-only array input (1744).
- Fix the handling of z coordinates ``shapely.ops.substring`` (1699).

Wheels are available for Python 3.12 (and still include GEOS 3.11.2). Building
from source is now compatible with Cython 3.

For a full changelog, see
https://shapely.readthedocs.io/en/latest/release/2.x.html#version-2-0-2

2.0.1

------------------

Bug fixes:

- Fix regression in the ``Polygon()`` constructor taking a sequence of Points (1662).
- Fix regression in the geometry constructors when passing ``decimal.Decimal``
coordinate values (1707).
- Fix ``STRtree()`` to not make the passed geometry array immutable as side-effect of
the constructor (1714).
- Fix the ``directed`` keyword in ``shapely.ops.linemerge()`` (1695).

Improvements:

- Expose the function to get a matplotlib Patch object from a (Multi)Polygon (without
already plotting it) publicly as :func:`shapely.plotting.patch_from_polygon` (1704).

For a full changelog, see
https://shapely.readthedocs.io/en/latest/release/2.x.html#version-2-0-1

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.