The new c_geom_p type caused a regression and has been removed (#1487).
The STRtree class will be changed in 2.0.0 and will not be compatible with the class in versions 1.8.x. This change obsoletes the deprecation announcement in 1.8a3 (below).
Wheels for 1.8.3 published on PyPI include GEOS 3.10.3.
The signature for GEOSMinimumClearance has been corrected, fixing an issue affecting aarch64-darwin (#1480)
Return and arg types have been corrected and made more strict for area, length, and distance properties.
A new c_geom_p type has been created to replace c_void_p when calling GEOS functions (#1479).
An incorrect polygon-line intersection (#1427) has been fixed in GEOS 3.10.3, which will be included in wheels published to PyPI.
GEOS buffer parameters are now destroyed, fixing a memory leak (#1440).
Make Polygons and MultiPolygons closed by definition, like LinearRings. Resolves #1246.
Perform frozen app check for GEOS before conda env check on macos as we already do on linux (#1301).
Fix leak of GEOS coordinate sequence in nearest_points reported in #1098.
This post-release addresses a defect in the 1.8.1 source distribution. No .c files are included in the 1.8.1.post1 sdist and Cython is required to build and install from source.
Wheels for 1.8.1 published on PyPI include GEOS 3.10.2. This version is the best version of GEOS yet. Discrepancies in behavior compared to previous versions are considered to be improvements.
For the first time, we will publish wheels for macos_arm64 (see PR #1310).
Python version support:
Shapely 1.8.1 works with Pythons 3.6-3.10.
Require Cython >= 0.29.24 to support Python 3.10 (#1224).
Fix array_interface_base (#1235).
This is the final 1.8.0 release. There have been no changes since 1.8rc2.
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.
Part of PR #1042, which added a new primary GEOS library name to be searched for, has been reverted by PR #1201.
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.
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).
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.
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).
Python version support:
Shapely 1.8 will support only Python versions >= 3.6.
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().
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.
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).
The following functions and geometry attributes and methods will be removed in version 2.0.0.
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.
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)
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).
The wheels uploaded to PyPI will include GEOS 3.9.1.
STRtreenow safely implements the pickle protocol (#915).
Documentation has been added for
STRtree.__del__()we guard against calling
GEOSSTRtree_destroywhen 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).
This is the final 1.7.0 release. There have been no changes since 1.7b1.
First beta release.
The buffer operation can now be single-sides (#806, #727).
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).
__bool__()for geometry base classes so that
bool(geom)returns the logical complement of
Remove assertion on the number of version-like strings found in the GEOS version string. It could be 2 or 3.
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.
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 polygons has been added to the polylabel algorithm (#644).
LinearRing can be created from a LineString (#638).
The prepared geometry validation condition has been tightened in #632 to fix the bug reported in #631.
Attempting to interpolate an empty geometry no longer results in a segmentation fault, raising ValueError instead (#653).
A Python version check is made by the package setup script. Shapely 1.7 supports only Python versions 2.7 and 3.4+ (#610).
Added a new EmptyGeometry class to support GeoPandas (#514).
Added new shapely.ops.substring function (#459).
Added new shapely.ops.clip_by_rect function (#583).
Use DLLs indicated in sys._MEIPASS’ to support PyInstaller frozen apps (#523).
shapely.wkb.dumps now accepts an srid integer keyword argument to write WKB data including a spatial reference ID in the output data (#593).
shapely.geometry.shape can now marshal empty GeoJSON representations (#573).
An exception is raised when an attempt is made to prepare a PreparedGeometry (#577, #595).
Keyword arguments have been removed from a geometry object’s wkt property getter (#581, #594).
Fix broken markup in this change log, which restores our nicely formatted readme on PyPI.
TypeErrorthat can occur when geometries are torn down (#473, #528).
AttributeError is no longer raised when accessing __geo_interface__ of an empty polygon (#450).
asShapenow handles empty coordinates in mappings as
shapedoes (#542). Please note that
asShapeis likely to be deprecated in a future version of Shapely.
Check for length of LineString coordinates in speed mode, preventing crashes when using LineStrings with only one coordinate (#546).
A 1.6.2.post1 release has been made to fix a problem with macosx wheels uploaded to PyPI.
Splitting a linestring by one of its end points will now succeed instead of failing with a
Missing documentation of a geometry’s
overlapspredicate has been added (#522).
STRTreecrashes due to dangling references (#505) by maintaining references to added geometries.
Reduce log level to debug when reporting on calls to ctypes
CDLL()that don’t succeed and are retried (#515).
Clarification: applications like GeoPandas that need an empty geometry object should use
EmptyGeometryclass has been added in the master development branch and will be available in the next non-bugfix release.
Shapely 1.6.0 adds new attributes to existing geometry classes and new
polylabel()) to the shapely.ops module.
Exceptions are consolidated in a shapely.errors module and logging practices
have been improved. Shapely’s optional features depending on Numpy are now
gathered into a requirements set named “vectorized” and these may be installed
pip install shapely[vectorized].
Much of the work on 1.6.0 was aimed to improve the project’s build and packaging scripts and to minimize run-time dependencies. Shapely now vendorizes packaging to use during builds only and never again invokes the geos-config utility at run-time.
In addition to the changes listed under the alpha and beta pre-releases below, the following change has been made to the project:
Project documentation is now hosted at https://shapely.readthedocs.io/en/latest/.
Thank you all for using, promoting, and contributing to the Shapely project.
Passing a single coordinate to
LineString()with speedups disabled now raises a ValueError as happens with speedups enabled. This resolves #509.
Isolate vendorized packaging in a _vendor directory, remove obsolete dist-info, and remove packaging from project requirements (resolves #468).
Level for log messages originating from the GEOS notice handler reduced from WARNING to INFO (#447).
Permit speedups to be imported again without Numpy (#444).
Add support for GeometryCollection to shape and asShape functions (#422).
Implemented __array_interface__ for empty Points and LineStrings (#403).
Remove accidental hard requirement of Numpy (#431).
Put Numpy in an optional requirement set named “vectorized” (#431).
Shapely no longer configures logging in
Consolidation of exceptions in
UnsupportedGEOSVersionErroris raised when GEOS < 3.3.0 (#407).
Added new library search paths to assist Anaconda (#413).
geos-config will now be bypassed when NO_GEOS_CONFIG env var is set. This allows configuration of Shapely builds on Linux systems that for whatever reasons do not include the geos-config program (#322).
A new error derived from NotImplementedError, with a more useful message, is raised when the GEOS backend doesn’t support a called method (#216).
project()method of LineString has been extended to LinearRing geometries (#286).
minimum_rotated_rectangleattribute has been added to the base geometry class (#354).
shapely.ops.polylabel()function has been added. It computes a point suited for labeling concave polygons (#395).
shapely.ops.split()function has been added. It splits a geometry by another geometry of lesser dimension: polygon by line, line by point (#293, #371).
Polygon.from_bounds()constructs a Polygon from bounding coordinates (#392).
Support for testing with Numpy 1.4.1 has been added (#301).
Support creating all kinds of empty geometries from empty lists of Python objects (#397, #404).
OffsetCurve()for GEOS >= 3.3 (#270).
Cython speedups are now enabled by default (#252).
Packaging 16.7, a setup dependency, is vendorized (#314).
Infrastructure for building manylinux1 wheels has been added (#391).
geos-configprogram is now only checked when
setup.pyis executed, never during normal use of the module (#244).
Added new library search paths to assist PyInstaller (#382) and Windows (#343).
Bug fix: eliminate memory leak in geom_factory() (#408).
Bug fix: remove mention of negative distances in parallel_offset and note that vertices of right hand offset lines are reversed (#284).
Bug fix: eliminate memory leak when unpickling geometry objects (#384, #385).
Bug fix: prevent crashes when attempting to pickle a prepared geometry, raising
Packaging: extension modules in the OS X wheels uploaded to PyPI link only libgeos_c.dylib now (you can verify and compare to previous releases with
otool -L shapely/vectorized/_vectorized.so).
Bug fix: use uintptr_t to store pointers instead of long in _geos.pxi, preventing an overflow error (#372, #373). Note that this bug fix was erroneously reported to have been made in 1.5.14, but was not.
Bug fix: use
isinstance()when evaluating geometry equality, preventing instances of base and derived classes from being mistaken for equals (#317).
Bug fix: ensure that empty geometries are created when constructors have no args (#332, #333).
Bug fix: support app “freezing” better on Windows by not relying on the
__file__attribute (#342, #377).
Bug fix: ensure that empty polygons evaluate to be
Bug fix: filter out empty geometries that can cause segfaults when creating and loading STRtrees (#345, #348).
Bug fix: no longer attempt to reuse GEOS DLLs already loaded by Rasterio or Fiona on OS X (#374, #375).
Restore setup and runtime discovery and loading of GEOS shared library to state at version 1.5.9 (#326).
On OS X we try to reuse any GEOS shared library that may have been loaded via import of Fiona or Rasterio in order to avoid a bug involving the GEOS AbstractSTRtree (#324, #327).
Remove configuration of root logger from libgeos.py (#312).
Skip test_fallbacks on Windows (#308).
Call setlocale(locale.LC_ALL, “”) instead of resetlocale() on Windows when tearing down the locale test (#308).
Fix for Sphinx warnings (#309).
Addition of .cache, .idea, .pyd, .pdb to .gitignore (#310).
Remove packaging module requirement added in 1.5.10 (#305). Distutils can’t parse versions using ‘rc’, but if we stick to ‘a’ and ‘b’ we will be fine.
Monkey patch affinity module by absolute reference (#299).
Raise TopologicalError in relate() instead of crashing (#294, #295, #303).
Fix for 64 bit speedups compatibility (#274).
Setup file encoding bug fix (#254).
Support for pyinstaller (#261).
Major prepared geometry operation fix for Windows (#268, #269).
Major fix for OS X binary wheel (#262).
Test and fix buggy error and notice handlers (#249).
Fix setup regression (#232, #234).
SVG representation improvements (#233, #237).
MANIFEST changes to restore _geox.pxi (#231).
Fixed OS X binary wheel library load path (#224).
Fixed ownership and potential memory leak in polygonize (#223).
Wider release of binary wheels for OS X.
Fail installation if GEOS dependency is not met, preventing update breakage (#218, #219).
Restore geometry hashing (#209).
Affine transformation speedups (#197).
New == rich comparison (#195).
Geometry collection constructor (#200).
ops.snap() backed by GEOSSnap (#201).
Clearer exceptions in cases of topological invalidity (#203).
Proper conversion of numpy float32 vals to coords (#186).
Fix for endianness bug in WKB writer (#174).
Fix bungled 1.4.1 release (#176).
Return of support for GEOS 3.2 (#176, #178).
SVG representations for IPython’s inline image protocol.
Efficient and fast vectorized contains().
Change mitre_limit default to 5.0; raise ValueError with 0.0 (#139).
Allow mix of tuples and Points in sped-up LineString ctor (#152).
New STRtree class (#73).
Add ops.nearest_points() (#147).
Faster creation of geometric objects from others (cloning) (#165).
Removal of tests from package.
Allow single-part geometries as argument to ops.cacaded_union() (#135).
Support affine transformations of LinearRings (#112).
Let LineString() take a sequence of Points (#130).
More reliable proxy cleanup on exit (#106).
More robust DLL loading on all platforms (#114).
Include support for Python 3.2 and 3.3 (#56), minimum version is now 2.6.
Switch to GEOS WKT/WKB Reader/Writer API, with defaults changed to enable 3D output dimensions, and to ‘trim’ WKT output for GEOS >=3.3.0.
Use GEOS version instead of GEOS C API version to determine library capabilities (#65).
Add buffering style options (#55).
Permit empty sequences in collection constructors (#49, #50).
Individual polygons in MultiPolygon.__geo_interface__ are changed to tuples to match Polygon.__geo_interface__ (#51).
Add shapely.ops.polygonize_full (#57).
Avoid circular import between wkt/wkb and geometry.base by moving calls to GEOS serializers to the latter module.
Set _ndim when unpickling (issue #6).
Don’t install DLLs to Python’s DLL directory (#37).
Add affinity module of affine transformation (#31).
Fix NameError that blocked installation with PyPy (#40, #41).
Add ops.unary_union function.
Alias ops.cascaded_union to ops.unary_union when GEOS CAPI >= (1,7,0).
Add geos_version_string attribute to shapely.geos.
Ensure parent is set when child geometry is accessed.
Generate _speedups.c using Cython when building from repo when missing, stale, or the build target is “sdist”.
The is_simple predicate of invalid, self-intersecting linear rings now returns
Remove VERSION.txt from repo, it’s now written by the distutils setup script with value of shapely.__version__.
Eliminate numerical sensitivity in a method chaining test (Debian bug #663210).
Account for cascaded union of random buffered test points being a polygon or multipolygon (Debian bug #666655).
Use Cython to build speedups if it is installed.
Avoid stumbling over SVN revision numbers in GEOS C API version strings.
A geometry’s coords property is now sliceable, yielding a list of coordinate values.
Homogeneous collections are now sliceable, yielding a new collection of the same type.
Fixed errors in speedups on 32bit systems when GEOS references memory above 2GB.
Add shapely.__version__ attribute.
Update the manual.
Build Windows distributions with VC7 or VC9 as appropriate.
More verbose report on failure to speed up.
Fix for prepared geometries broken in 1.2.11.
DO NOT INSTALL 1.2.11
Ignore AttributeError during exit.
PyPy 1.5 support.
Prevent operation on prepared geometry crasher (#12).
Optional Cython speedups for Windows.
Linux 3 platform support.
Add optional Cython speedups.
Add is_cww predicate to LinearRing.
Add function that forces orientation of Polygons.
Disable build of speedups on Windows pending packaging work.
Remove extra glob import.
Move examples to shapely.examples.
Add box() constructor for rectangular polygons.
Fix extraneous imports.
New parallel_offset method (#6).
Support for Python 2.4.
Support for Windows eggs.
The geoms property of an empty collection yields  instead of a ValueError (#3).
The coords and geometry type sproperties have the same behavior as above.
Ensure that z values carry through into products of operations (#4).
Stop distributing docs/_build.
Include library fallbacks in test_dlls.py for linux platform.
Raise AttributeError when there’s no backend support for a method.
Raise OSError if libgeos_c.so (or variants) can’t be found and loaded.
Add geos_c DLL loading support for linux platforms where find_library doesn’t work.
Add mapping function.
Fix problem with GEOSisValidReason symbol for GEOS < 3.1.
Add representative_point method.
Fixed bounds of singular polygons.
Added shapely.validation.explain_validity function (#226).
Add examples and tests to MANIFEST.in.
Release candidate 2.
Memory leak associated with new empty geometry state fixed.
Broken GeometryCollection fixed.
Objects can be constructed from others of the same type, thereby making copies. Collections can be constructed from sequences of objects, also making copies.
Collections are now iterators over their component objects.
New code for manual figures, using the descartes package.
Adds support for the “sunos5” platform.
Only provide simplification implementations for GEOS C API >= 1.5.
Fix cascaded_union bug introduced in 1.2b1 (#212).
Update the README. Remove cruft from setup.py. Add some version 1.2 metadata regarding required Python version (>=2.5,<3) and external dependency (libgeos_c >= 3.1).
Add accessor for separate arrays of X and Y values (#210).
TODO: fill gap here
Proper prototyping of WKB writer, and avoidance of errors on 64-bit systems (#191).
Prototype libgeos_c functions in a way that lets py2exe apps import shapely (#189).
1.2 Branched (2009-09-19)
Fix for references held by topology and predicate descriptors.
Work around bug in GEOS 2.2.3, GEOSCoordSeq_getOrdinate not exported properly (#178).
Fixed compatibility with GEOS 2.2.3 that was broken in 1.0.8 release (#176).
Find and load MacPorts libgeos.
Fill out GEOS function result and argument types to prevent faults on a 64-bit arch.
Polygon rings now have the same dimensions as parent (#168).
Eliminated reference cycles in polygons (#169).
Fixed adaptation of multi polygon data.
Raise exceptions earlier from binary predicates.
Beginning distributing new windows DLLs (#166).
Added access to GEOS polygonizer function.
Raise exception when insufficient coordinate tuples are passed to LinearRing constructor (#164).
Disentangle Python and topological equality (#163).
Add shape(), a factory that copies coordinates from a geo interface provider. To be used instead of asShape() unless you really need to store coordinates outside shapely for efficient use in other code.
Cache GEOS geometries in adapters (#163).
Do not release GIL when calling GEOS functions (#158).
Prevent faults when chaining multiple GEOS operators (#159).
Fix loss of dimensionality in polygon rings (#155).
Allow chaining expressions involving coordinate sequences and geometry parts (#151).
Protect against abnormal use of coordinate accessors (#152).
Coordinate sequences now implement the numpy array protocol (#153).
1.0 RC2 (2008-01-16)#
Added temporary solution for #149.
1.0 RC1 (2008-01-14)#
First release candidate