Changes
=======
1.8rc2 (2021-10-19)
-------------------
Build:
A pyproject.toml file has been added to specify build dependencies for the
_vectorized and _speedups modules (#1128). To install shapely without these
build dependencies, use the features of your build tool that disable PEP 517
and 518 support.
Bug fixes:
- Part of PR #1042, which added a new primary GEOS library name to be searched
for, has been reverted by PR #1201.
1.8rc1 (2021-10-04)
-------------------
Deprecations:
The almost_exact() method of BaseGeometry has been deprecated. It is confusing
and will be removed in 2.0.0. The equals_exact() method is to be used instead.
Bug fixes:
- We ensure that the _speedups module is always imported before _vectorized to
avoid an unexplained condition on Windows with Python 3.8 and 3.9 (#1184).
1.8a3 (2021-08-24)
------------------
Deprecations:
The STRtree class deprecation warnings have been removed. The class in 2.0.0
will be backwards compatible with the class in 1.8.0.
Bug fixes:
- The __array_interface__ raises only AttributeError, all other exceptions are
deprecated starting with Numpy 1.21 (#1173).
- The STRtree class now uses a pair of item, geom sequences internally instead
of a dict (#1177).
1.8a2 (2021-07-15)
------------------
Python version support:
Shapely 1.8 will support only Python versions >= 3.6.
New features:
- The STRtree nearest*() methods now take an optional argument that
specifies exclusion of the input geometry from results (#1115).
- A GeometryTypeError has been added to shapely.errors and is consistently
raised instead of TypeError or ValueError as in version 1.7. For backwards
compatibility, the new exception will derive from TypeError and Value error
until version 2.0 (#1099).
- The STRtree class constructor now takes an optional second argument, a
sequence of objects to be stored in the tree. If not provided, the sequence
indices of the geometries will be stored, as before (#1112).
- The STRtree class has new query_geoms(), query_items(), nearest_geom(), and
nearest_item() methods (#1112). The query() and nearest() methods remain as
aliases for query_geoms() and nearest_geom().
Bug fixes:
- We no longer attempt to load libc to get the free function on Linux, but get
it from the global symbol table.
- GEOS error messages printed when GEOS_getCoordSeq() is passed an empty
geometry are avoided by never passing an empty geometry (#1134).
- Python's builtin super() is now used only as described in PEP 3135 (#1109).
- Only load conda GEOS dll if it exists (on Windows) (#1108).
- Add /opt/homebrew/lib to the list of directories to be searched for the GEOS
shared library.
- Added new library search path to assist app creation with cx_Freeze.
1.8a1 (2021-03-03)
------------------
Shapely 1.8.0 will be a transitional version. There are a few bug fixes and new
features, but it is mainly about warning of the upcoming changes in 2.0.0.
Several more pre-releases before 1.8.0 are expected. See the migration guide
to Shapely 1.8 / 2.0 for more details on how to update your code
(https://shapely.readthedocs.io/en/latest/migration.html).
Python version support:
Shapely 1.8 will support only Python versions >= 3.5 (#884).
Deprecations:
The following functions and geometry attributes and methods will be removed in
version 2.0.0.
- ops.cascaded_union
- geometry .empty()
- geometry .ctypes and .__array_interface__
- multi-part geometry .__len__
- setting custom attributes on geometry objects
Geometry objects will become immutable in version 2.0.0.
The STRtree class will be entirely changed in 2.0.0. The exact future API is
not yet decided, but will be decided before 1.8.0 is released.
Deprecation warnings will be emitted in 1.8a1 when any of these features are
used.
The deprecated .to_wkb() and .to_wkt() methods on the geometry objects have
been removed.
New features:
- Add a normalize() method to geometry classes, exposing the GEOSNormalize
algorithm (#1090).
- Initialize STRtree with a capacity of 10 items per node (#1070).
- Load libraries relocated to shapely/.libs by auditwheel versions < 3.1 or
relocated to Shapely.libs by auditwheel versions >= 3.1.
- shapely.ops.voronoi_diagram() computes the Voronoi Diagram of a geometry or
geometry collection (#833, #851).
- shapely.validation.make_valid() fixes invalid geometries (#883)
Bug fixes:
- For pyinstaller we now handle the case of more than one GEOS library in the
environment, such as when fiona and rasterio wheels are co-installed with
shapely (#1071).
- The ops.split function now splits on touch to eliminate confusing
discrepancies between results using multi and single part splitters (#1034).
- Several issues with duplication and order of vertices in ops.substring have
been fixed (#1008).
Packaging:
- The wheels uploaded to PyPI will include GEOS 3.9.1.
1.7.1 (2020-08-20)
------------------
- ``STRtree`` now safely implements the pickle protocol (#915).
- Documentation has been added for ``minimum_clearance`` (#875, #874).
- In ``STRtree.__del__()`` we guard against calling ``GEOSSTRtree_destroy``
when the lgeos module has already been torn down on exit (#897, #830).
- Documentation for the ``overlaps()`` method has been corrected (#920).
- Correct the test in ``shapely.geometry.base.BaseGeometry.empty()`` to
eliminate memory leaks like the one reported in #745.
- Get free() not from libc but from the processes global symbols (#891),
fixing a bug that manifests on OS X 10.15 and 10.16.
- Extracting substrings from complex lines has been made more correct (#848,
#849).
- Splitting of complex geometries has been sped up by preparing the input
geometry (#871).
- Fix bug in concatenation of function argtypes (#866).
- Improved documentation of STRtree usage (#857).
- Improved handling for empty list or list of lists in GeoJSON coordinates
(#852).
- The polylabel algorithm now accounts for polygon holes (#851, #817).
1.7.0 (2020-01-28)
------------------
This is the final 1.7.0 release. There have been no changes since 1.7b1.
1.7b1 (2020-01-13)
------------------
First beta release.
1.7a3 (2019-12-31)
------------------
New features:
- The buffer operation can now be single-sides (#806, #727).
Bug fixes:
- Add /usr/local/lib to the list of directories to be searched for the GEOS
shared library (#795).
- ops.substring now returns a line with coords in end-to-front order when given
a start position that is greater than the end position (#628).
- Implement ``__bool__()`` for geometry base classes so that ``bool(geom)``
returns the logical complement of ``geom.is_empty`` (#754).
- Remove assertion on the number of version-like strings found in the GEOS
version string. It could be 2 or 3.
1.7a2 (2019-06-21)
------------------
- Nearest neighbor search has been added to STRtree (#668).
- Disallow sequences of MultiPolygons as arguments to the MultiPolygon
constructor, resolving #588.
- Removed vendorized `functools` functions previously used to support
Python 2.5.
Bug fixes:
- Avoid reloading the GEOS shared library when using an installed binary wheel
on OS X (#735), resolving issue #553.
- The shapely.ops.orient function can now orient multi polygons and geometry
collections as well as polygons (#733).
- Polygons can now be constructed from sequences of point objects as well as
sequences of x, y sequences (#732).
- The exterior of an empty polygon is now equal to an empty linear ring (#731).
- The bounds property of an empty point object now returns an empty tuple,
consistent with other geometry types (#723).
- Segmentation faults when non-string values are passed to the WKT loader are
avoided by #700.
- Failure of ops.substring when the sub linestring coincides with the beginning
of the linestring has been fixed (#658).
- Segmentation faults from interpolating on an empty linestring are prevented
by #655.
- A missing special case for rectangular polyg