Skip to content

Commit d1ad37c

Browse files
committed
Merge branch 'maint-1.7'
2 parents 210e71b + 4f16c56 commit d1ad37c

6 files changed

Lines changed: 51 additions & 13 deletions

File tree

.mailmap

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<allan.m.adair@gmail.com> <allan@rfspot.com>
2+
Aron Bierbaum <aronbierbaum@gmail.com> aronbierbaum <aronbierbaum@b426a367-1105-0410-b9ff-cdf4ab011145>
3+
Filipe Fernandes <ocefpaf@gmail.com>
4+
Sean Gillies <sean.gillies@gmail.com>
5+
Sean Gillies <sean.gillies@gmail.com> Sean Gillies <sean@mapbox.com>
6+
Sean Gillies <sean.gillies@gmail.com> Sean C. Gillies <sean@mapbox.com>
7+
Sean Gillies <sean.gillies@gmail.com> Sean Gillies <seang@krusty-2.local>
8+
Sean Gillies <sean.gillies@gmail.com> seang <seang@b426a367-1105-0410-b9ff-cdf4ab011145>
9+
Mike Taves <mwtoews@gmail.com>
10+
Mike Taves <mwtoews@gmail.com> Mike Toews <mwtoews@debian.(none)>
11+
Frédéric Junod <frederic.junod@camptocamp.com>
12+
Kai Lautaportti <dokai@b426a367-1105-0410-b9ff-cdf4ab011145>
13+
<wursterk@gmail.com> <kevin@skytruth.org>
14+
<kveretennicov@gmail.com> <kveretennicov+github@gmail.com>

CHANGES.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@ Changes
66

77
New features:
88

9-
- shapely.ops.voronoi_diagram() computes the Voronoi Diagram of a geometry or geometry collection (#833, #851).
9+
- shapely.ops.voronoi_diagram() computes the Voronoi Diagram of a geometry or
10+
geometry collection (#833, #851).
1011
- shapely.validation.make_valid() fixes invalid geometries (#883)
1112

12-
1.7.1 (TBD)
13-
-----------
13+
1.7.1 (2020-08-20)
14+
------------------
1415

16+
- ``STRtree`` now safely implements the pickle protocol (#915).
17+
- Documentation has been added for ``minimum_clearance`` (#875, #874).
18+
- In ``STRtree.__del__()`` we guard against calling ``GEOSSTRtree_destroy``
19+
when the lgeos module has already been torn down on exit (#897, #830).
20+
- Documentation for the ``overlaps()`` method has been corrected (#920).
21+
- Correct the test in ``shapely.geometry.base.BaseGeometry.empty()`` to
22+
eliminate memory leaks like the one reported in #745.
1523
- Get free() not from libc but from the processes global symbols (#891),
1624
fixing a bug that manifests on OS X 10.15 and 10.16.
1725
- Extracting substrings from complex lines has been made more correct (#848,
@@ -22,6 +30,7 @@ New features:
2230
- Improved documentation of STRtree usage (#857).
2331
- Improved handling for empty list or list of lists in GeoJSON coordinates
2432
(#852).
33+
- The polylabel algorithm now accounts for polygon holes (#851, #817).
2534

2635
1.7.0 (2020-01-28)
2736
------------------

CREDITS.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Shapely is written by:
88
* Andy Freeland <andy@andyfreeland.net>
99
* Ariel Kadouri <ariel@arielsartistry.com>
1010
* Aron Bierbaum <aronbierbaum@gmail.com>
11+
* Bart Broere <2715782+bartbroere@users.noreply.github.com>
1112
* Bas Couwenberg <sebastic@xs4all.nl>
1213
* Benjamin Root <ben.v.root@gmail.com>
1314
* BertrandGervais <bertrand.gervais.pro@gmail.com>
@@ -16,6 +17,7 @@ Shapely is written by:
1617
* Chad Hawkins <cwh@chadwhawkins.com>
1718
* Christian Prior <cprior@gmail.com>
1819
* Christian Quest <github@cquest.org>
20+
* Christophe Pradal <christophe.pradal@inria.fr>
1921
* Daniele Esposti <expobrain@users.noreply.github.com>
2022
* Dave Collins <dave@hopest.net>
2123
* David Baumgold <david@davidbaumgold.com>
@@ -24,6 +26,7 @@ Shapely is written by:
2426
* Erwin Sterrenburg <e.w.sterrenburg@gmail.com>
2527
* Felix Yan <felixonmars@archlinux.org>
2628
* Filipe Fernandes <ocefpaf@gmail.com>
29+
* Frédéric Junod <frederic.junod@camptocamp.com>
2730
* Gabi Davar <grizzly.nyo@gmail.com>
2831
* Gerrit Holl <gerrit.holl@dwd.de>
2932
* Hannes <kannes@users.noreply.github.com>
@@ -40,22 +43,28 @@ Shapely is written by:
4043
* Jamie Hall <jamie1212@gmail.com>
4144
* Jason Sanford <jason.sanford@mapmyfitness.com>
4245
* Jeethu Rao <jeethu@jeethurao.com>
46+
* Jeremiah England <34973839+Jeremiah-England@users.noreply.github.com>
4347
* Jinkun Wang <mejkunw@gmail.com>
4448
* Johan Euphrosine <proppy@aminche.com>
4549
* Johannes Schönberger <jschoenberger@demuc.de>
4650
* Jonathan Schoonhoven <jschoonhoven@lyft.com>
4751
* Joris Van den Bossche <jorisvandenbossche@gmail.com>
4852
* Joshua Arnott <josh@snorfalorpagus.net>
4953
* Juan Luis Cano Rodríguez <juanlu@satellogic.com>
54+
* Kai Lautaportti <dokai@b426a367-1105-0410-b9ff-cdf4ab011145>
5055
* Kelsey Jordahl <kjordahl@enthought.com>
5156
* Kevin Wurster <wursterk@gmail.com>
57+
* Konstantin Veretennicov <kveretennicov@gmail.com>
58+
* Koshy Thomas <koshy1123@gmail.com>
5259
* Kristian Evers <kristianevers@gmail.com>
60+
* Kyle Barron <kylebarron2@gmail.com>
5361
* Leandro Lima <leandro@limaesilva.com.br>
5462
* Lukasz <uhho@users.noreply.github.com>
5563
* Luke Lee <durdenmisc@gmail.com>
5664
* Maarten Vermeyen <maarten.vermeyen@rwo.vlaanderen.be>
5765
* Marc Jansen <jansen@terrestris.de>
5866
* Marco De Nadai <me@marcodena.it>
67+
* Mathieu <mathieu.nivel@gmail.com>
5968
* Matt Amos <matt.amos@mapzen.com>
6069
* Michel Blancard <michel.blancard@data.gouv.fr>
6170
* Mike Taves <mwtoews@gmail.com>
@@ -67,6 +76,7 @@ Shapely is written by:
6776
* Phil Elson <pelson.pub@gmail.com>
6877
* Pierre PACI <villerupt@gmail.com>
6978
* Ricardo Zilleruelo <51384295+zetaatlyft@users.noreply.github.com>
79+
* S Murthy <sr-murthy@users.noreply.github.com>
7080
* Sampo Syrjanen <sampo.syrjanen@here.com>
7181
* Samuel Chin <samuelchin91@gmail.com>
7282
* Sean Gillies <sean.gillies@gmail.com>
@@ -76,17 +86,15 @@ Shapely is written by:
7686
* Taro Matsuzawa aka. btm <btm@tech.email.ne.jp>
7787
* Thibault Deutsch <thibault.deutsch@gmail.com>
7888
* Thomas Kluyver <takowl@gmail.com>
79-
* Tom Caruso <carusot42@gmail.com>
8089
* Tobias Sauerwein <tobias.sauerwein@camptocamp.com>
90+
* Tom Caruso <carusot42@gmail.com>
8191
* Tom Clancy <17627475+clncy@users.noreply.github.com>
8292
* WANG Aiyong <gepcelway@gmail.com>
8393
* Will May <williamcmay@live.com>
8494
* Zachary Ware <zachary.ware@gmail.com>
8595
* cclauss <cclauss@me.com>
8696
* clefrks <33859587+clefrks@users.noreply.github.com>
8797
* davidh-ssec <david.hoese@ssec.wisc.edu>
88-
* dokai <dokai@b426a367-1105-0410-b9ff-cdf4ab011145>
89-
* fredj <frederic.junod@camptocamp.com>
9098
* georgeouzou <geothrock@gmail.com>
9199
* giumas <gmasetti@ccom.unh.edu>
92100
* joelostblom <joelostblom@users.noreply.github.com>

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cython==0.29.14
1+
cython==0.29.21
22
descartes==1.0.1
33
matplotlib
44
numpy>=1.4.1

shapely/geometry/base.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from binascii import a2b_hex
1010
from ctypes import pointer, c_size_t, c_char_p, c_void_p
1111
from itertools import islice
12+
import logging
1213
import math
1314
import sys
1415
from warnings import warn
@@ -22,6 +23,7 @@
2223
from shapely.geos import lgeos
2324
from shapely.impl import DefaultImplementation, delegated
2425

26+
log = logging.getLogger(__name__)
2527

2628
try:
2729
import numpy as np
@@ -213,13 +215,13 @@ class BaseGeometry(object):
213215
_lgeos = lgeos
214216

215217
def empty(self, val=EMPTY):
216-
# TODO: defer cleanup to the implementation. We shouldn't be
217-
# explicitly calling a lgeos method here.
218-
if not self._is_empty and not self._other_owned and self.__geom__:
218+
if not self._other_owned and self.__geom__ and self.__geom__ != EMPTY:
219219
try:
220220
self._lgeos.GEOSGeom_destroy(self.__geom__)
221221
except (AttributeError, TypeError):
222-
pass # _lgeos might be empty on shutdown
222+
# _lgeos might be empty on shutdown
223+
log.exception("Failed to delete GEOS geom")
224+
223225
self._is_empty = True
224226
self.__geom__ = val
225227

shapely/geos.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ def exists_conda_env():
6464
if sys.platform.startswith('linux'):
6565
# Test to see if we have a wheel repaired by 'auditwheel' containing its
6666
# own libgeos_c
67-
geos_whl_so = glob.glob(os.path.abspath(os.path.join(os.path.dirname(
68-
__file__), '.libs/libgeos_c-*.so.*')))
67+
geos_whl_so = glob.glob(
68+
os.path.abspath(
69+
os.path.join(
70+
os.path.dirname(__file__), ".libs/libgeos_c-*.so.*"
71+
)
72+
)
73+
)
6974
if len(geos_whl_so) == 1:
7075
_lgeos = CDLL(geos_whl_so[0])
7176
LOG.debug("Found GEOS DLL: %r, using it.", _lgeos)

0 commit comments

Comments
 (0)