Changelog¶
Version 0.14 (2022-12-12)¶
Added support for Python 3.11 binary wheels (#458).
Dropped support for Python 3.6 (#458).
Binary wheels now include GEOS 3.10.4 (#458).
Fixed unittests for GEOS 3.11 (#458).
Only use the ‘fast’ path in to/from_shapely when using conda (#459).
Acknowledgments
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Casper van der Wel
Joris Van den Bossche
Version 0.13 (2022-08-25)¶
Distribution
All binary wheels now have GEOS 3.10.3. See https://github.com/libgeos/geos/blob/3.10/NEWS for the changes (#454).
Bug fixes
Fixed the
to_shapelyandfrom_shapelyfunctions for compatibility with the upcoming Shapely 2.0 release (#452)
Acknowledgments
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Casper van der Wel
Joris Van den Bossche
Mike Taves
Version 0.12 (2021-12-03)¶
Distribution
Distribute binary wheels for Apple Silicon architecture (arm64 and universal2) (#427).
Removed 32-bit architecture wheels for Python 3.10 (#427).
All binary wheels now have GEOS 3.10.1. See https://github.com/libgeos/geos/blob/main/NEWS for the changes (#422).
Linux x86_64 and i686 wheels are now built using the manylinux2014 image instead of manylinux2010 (#445).
Major enhancements
Added
pygeos.dwithinfor GEOS >= 3.10 (#417).Added
dwithinpredicate toSTRtreequeryandquery_bulkmethods to find geometries within a search distance for GEOS >= 3.10 (#425).Added GeoJSON input/output capabilities (
pygeos.from_geojson,pygeos.to_geojson) for GEOS >= 3.10 (#413).Performance improvement in constructing LineStrings or LinearRings from numpy arrays for GEOS >= 3.10 (#436)
API Changes
When constructing a linearring through
pygeos.linearringsor a polygon throughpygeos.polygonsthe ring is automatically closed when supplied with 3 coordinates also when the first and last are already equal (#431).
Bug fixes
Raise
GEOSExceptionin the rare case when predicate evalution inSTRtree.queryerrors. Previously, the exceptions were ignored silently and the geometry was added to the result (as if the predicate returnedTrue) (#432).Hide
RuntimeWarningwhen usingtotal_boundson empty geometries, empty arrays, or geometries with NaN coordinates (#441).
Acknowledgments
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Brendan Ward
Casper van der Wel
Joris Van den Bossche
Version 0.11.1 (2021-10-30)¶
Distribution
Distribute binary wheels for Python 3.10 (#416).
All binary wheels now have GEOS 3.10.0. See https://github.com/libgeos/geos/blob/main/NEWS for the changes (#416).
Major enhancements
Optionally output to a user-specified array (
outkeyword argument) when constructing geometries fromindices(#380).Added
pygeos.emptyto create a geometry array pre-filled with None or with empty geometries (#381).Added
pygeos.force_2dandpygeos.force_3dto change the dimensionality of the coordinates in a geometry (#396).Added
pygeos.testing.assert_geometries_equal(#401).
API Changes
The default behaviour of
pygeos.set_precisionis now to always return valid geometries. Before, the default waspreserve_topology=Falsewhich caused confusion because it mapped to GEOS_PREC_NO_TOPO (the new ‘pointwise’). At the same time, GEOS < 3.10 implementation was not entirely correct so that some geometries did and some did not preserve topology with this mode. Now, the newmodeargument controls the behaviour and thepreserve_topologyargument is deprecated (#410).When constructing a linearring through
pygeos.linearringsor a polygon throughpygeos.polygonsnow aValueErroris raised (instead of aGEOSException) if the ring contains less than 4 coordinates including ring closure (#378).Removed deprecated
normalizekeyword argument inpygeos.line_locate_pointandpygeos.line_interpolate_point(#410).
Bug fixes
Return True instead of False for LINEARRING geometries in
is_closed(#379).Fixed the WKB serialization of 3D empty points for GEOS >= 3.9.0 (#392).
Fixed the WKT serialization of single part 3D empty geometries for GEOS >= 3.9.0 (#402).
Fixed the WKT serialization of multipoints with empty points for GEOS >= 3.9.0 (#392).
Fixed a segfault when getting coordinates from empty points in GEOS 3.8.0 (#415).
Acknowledgments
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Brendan Ward
Casper van der Wel
Joris Van den Bossche
Version 0.10.2 (2021-08-23)¶
Distribution
Unittests are now included in the pygeos distribution. Run them by 1) installing
pytest (or pygeos[test]) and 2) invoking pytest --pyargs pygeos.tests.
We started using a new tool for building binary wheels: cibuildwheel. This
resulted into the following improvements in the distributed binary wheels:
Windows binary wheels now contain mangled DLLs, which avoids conflicts with other GEOS versions present on the system (a.k.a. ‘DLL hell’) (#365).
Windows binary wheels now contain the Microsoft Visual C++ Runtime Files (msvcp140.dll) for usage on systems without the C++ redistributable (#365).
Linux x86_64 and i686 wheels are now built using the manylinux2010 image instead of manylinux1 (#365).
Linux aarch64 wheels are now available for Python 3.9 (manylinux2014, #365).
Bug fixes
Fixed operations on geometry arrays containing NULL instead of None. These occur for instance by using
numpy.empty_like(#371)
Acknowledgements
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Brendan Ward
Casper van der Wel
Joris Van den Bossche
Version 0.10.1 (2021-07-06)¶
Bug fixes
Fixed the
boxandset_precisionfunctions with numpy 1.21 (#367).Fixed
STRtreecreation to allow querying the tree in a multi-threaded context (#361).
Acknowledgements
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Brendan Ward
Casper van der Wel
Joris Van den Bossche
Version 0.10 (2021-05-18)¶
Major enhancements
Addition of
nearestandnearest_allfunctions toSTRtreefor GEOS >= 3.6 to find the nearest neighbors (#272).Enable bulk construction of geometries with different number of coordinates by optionally taking index arrays in all creation functions (#230, #322, #326, #346).
Released the GIL in all geometry creation functions (#310, #326).
Added the option to return the geometry index in
get_coordinates(#318).Added the
get_ringsfunction, similar asget_partsbut specifically to extract the rings of Polygon geometries (#342).Updated
boxufunc to use internal C function for creating polygon (about 2x faster) and addedccwparameter to create polygon in counterclockwise (default) or clockwise direction (#308).Added
to_shapelyand improved performance offrom_shapelyin the case GEOS versions are different (#312).
API Changes
STRtree default leaf size is now 10 instead of 5, for somewhat better performance under normal conditions (#286)
Deprecated
VALID_PREDICATESset frompygeos.strtreepackage; these can be constructed in downstream libraries using thepygeos.strtree.BinaryPredicateenum. This will be removed in a future release.points,linestrings,linearrings, andpolygonsnow return aGEOSExceptioninstead of aValueErrororTypeErrorfor invalid input (#310, #326).Addition of
on_invalidparameter tofrom_wkbandfrom_wktto optionally return invalid WKB geometries asNone.Removed the (internal) function
lib.polygons_without_holesand renamedlib.polygons_with_holestolib.polygons(#326).polygonswill now return an empty polygon for None inputs (#346).Removed compatibility with Python 3.5 (#341).
Added GEOS functions
Addition of a
contains_properlyfunction (#267)Addition of a
polygonizefunction (#275)Addition of a
polygonize_fullfunction (#298)Addition of a
segmentizefunction for GEOS >= 3.10 (#299)Addition of
oriented_envelopeandminimum_rotated_rectanglefunctions (#314)Addition of
minimum_bounding_circleandminimum_bounding_radiusfunctions for GEOS >= 3.8 (#315)Addition of a
shortest_line(“nearest points”) function (#334)
Bug fixes
Fixed portability issue for ARM architecture (#293)
Fixed segfault in
linearringsandboxwhen constructing a geometry with nan coordinates (#310).Fixed segfault in
polygons(with holes) when None was provided.Fixed memory leak in
polygonswhen non-linearring input was provided.
Acknowledgments
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Brendan Ward
Casper van der Wel
Joris Van den Bossche
Martin Fleischmann
Mike Taves
Tanguy Ophoff +
James Myatt +
Version 0.9 (2021-01-23)¶
Major enhancements
Addition of
preparefunction that generates a GEOS prepared geometry which is stored on the Geometry object itself. All binary predicates (exceptequals) make use of this. Helper functionsdestroy_preparedandis_preparedare also available. (#92, #252)Use previously prepared geometries within
STRtreequeryandquery_bulkfunctions if available (#246)Official support for Python 3.9 and numpy 1.20 (#278, #279)
Drop support for Python 3.5 (#211)
Added support for pickling to
Geometryobjects (#190)The
applyfunction for coordinate transformations and theset_coordinatesfunction now support geometries with z-coordinates (#131)Addition of Cython and internal PyGEOS C API to enable easier development of internal functions (previously all significant internal functions were developed in C). Added a Cython-implemented
get_partsfunction (#51)
API Changes
Geometry and counting functions (
get_num_coordinates,get_num_geometries,get_num_interior_rings,get_num_points) now return 0 forNoneinput values instead of -1 (#218)intersection_allandsymmetric_difference_allnow ignore None values instead of returning None if any value is None (#249)union_allnow returns None (instead ofGEOMETRYCOLLECTION EMPTY) if all input values are None (#249)The default axis of
union_all,intersection_all,symmetric_difference_all, andcoverage_union_allcan now reduce over multiple axes. The default changed from the first axis (0) to all axes (None) (#266)Argument in
line_interpolate_pointandline_locate_pointwas renamed fromnormalizetonormalized(#209)Addition of
grid_sizeparameter to specify fixed-precision grid fordifference,intersection,symmetric_difference,union, andunion_alloperations for GEOS >= 3.9 (#276)
Added GEOS functions
Release the GIL for
is_geometry(),is_missing(), andis_valid_input()(#207)Addition of a
is_ccw()function for GEOS >= 3.7 (#201)Addition of a
minimum_clearancefunction for GEOS >= 3.6.0 (#223)Addition of a
offset_curvefunction (#229)Addition of a
relate_patternfunction (#245)Addition of a
clip_by_rectfunction (#273)Addition of a
reversefunction for GEOS >= 3.7 (#254)Addition of
get_precisionto get precision of a geometry andset_precisionto set the precision of a geometry (may round and reduce coordinates) (#257)
Bug fixes
Fixed internal GEOS error code detection for
get_dimensionsandget_srid(#218)Limited the length of geometry repr to 80 characters (#189)
Fixed error handling in
line_locate_pointfor incorrect geometry types, now actually requiring line and point geometries (#216)Addition of
get_partsfunction to get individual parts of an array of multipart geometries (#197)Ensure that
python setup.py cleanremoves all previously Cythonized and compiled files (#239)Handle GEOS beta versions (#262)
Acknowledgments
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Brendan Ward
Casper van der Wel
Joris Van den Bossche
Mike Taves
Version 0.8 (2020-09-06)¶
Highlights of this release
Handle multi geometries in
boundary(#188)Handle empty points in to_wkb by conversion to POINT (nan, nan) (#179)
Prevent segfault in to_wkt (and repr) with empty points in multipoints (#171)
Fixed bug in
multilinestrings(), it now accepts linearrings again (#168)Release the GIL to allow for multithreading in functions that do not create geometries (#144) and in the STRtree
query_bulk()method (#174)Addition of a
frechet_distance()function for GEOS >= 3.7 (#144)Addition of
coverage_union()andcoverage_union_all()functions for GEOS >= 3.8 (#142)Fixed segfaults when adding empty geometries to the STRtree (#147)
Addition of
include_z=Truekeyword in theget_coordinates()function to get 3D coordinates (#178)Addition of a
build_area()function for GEOS >= 3.8 (#141)Addition of a
normalize()function (#136)Addition of a
make_valid()function for GEOS >= 3.8 (#107)Addition of a
get_z()function for GEOS >= 3.7 (#175)Addition of a
relate()function (#186)The
get_coordinate_dimensions()function was renamed toget_coordinate_dimension()for consistency with GEOS (#176)Addition of
covers,covered_by,contains_properlypredicates to STRtreequeryandquery_bulk(#157)
Acknowledgments
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Brendan Ward
Casper van der Wel
Joris Van den Bossche
Krishna Chaitanya +
Martin Fleischmann +
Tom Clancy +
Version 0.7 (2020-03-18)¶
Highlights of this release
STRtree improvements for spatial indexing: * Directly include predicate evaluation in
STRtree.query()(#87) * Query multiple input geometries (spatial join style) withSTRtree.query_bulk(#108)Addition of a
total_bounds()function (#107)Geometries are now hashable, and can be compared with
==or!=(#102)Fixed bug in
create_collections()with wrong types (#86)Fixed a reference counting bug in STRtree (#97, #100)
Start of a benchmarking suite using ASV (#96)
This is the first release that will provide wheels!
Acknowledgments
Thanks to everyone who contributed to this release! People with a “+” by their names contributed a patch for the first time.
Brendan Ward +
Casper van der Wel
Joris Van den Bossche
Mike Taves +
Version 0.6 (2020-01-31)¶
Highlights of this release:
Addition of the STRtree class for spatial indexing (#58)
Addition of a
boundsfunction (#69)A new
from_shapelyfunction to convert Shapely geometries to pygeos.Geometry (#61)Reintroduction of the
shared_pathsfunction (#77)
Contributors:
Casper van der Wel
Joris Van den Bossche
mattijn +
Version 0.5 (2019-10-25)¶
Highlights of this release:
Moved to the pygeos GitHub organization.
Addition of functionality to get and transform all coordinates (eg for reprojections or affine transformations) [#44]
Ufuncs for converting to and from the WKT and WKB formats [#45]
equals_exacthas been added [PR #57]
Version 0.4 (2019-09-16)¶
This is a major release of PyGEOS and the first one with actual release notes. Most important features of this release are:
bufferandhaussdorff_distancewere completed [#15]voronoi_polygonsanddelaunay_triangleshave been added [#17]The PyGEOS documentation is now mostly complete and available on http://pygeos.readthedocs.io .
The concepts of “empty” and “missing” geometries have been separated. The
pygeos.Emptyandpygeos.NaGobjects has been removed. Empty geometries are handled the same as normal geometries. Missing geometries are denoted byNoneand are handled by every pygeos function.NaNvalues cannot be used anymore to denote missing geometries. [PR #36]Added
pygeos.__version__andpygeos.geos_version. [PR #43]