shapely 1.8.1__tar.gz → 1.8.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. {Shapely-1.8.1 → Shapely-1.8.2}/CHANGES.txt +16 -0
  2. {Shapely-1.8.1/Shapely.egg-info → Shapely-1.8.2}/PKG-INFO +17 -1
  3. {Shapely-1.8.1 → Shapely-1.8.2/Shapely.egg-info}/PKG-INFO +17 -1
  4. {Shapely-1.8.1 → Shapely-1.8.2}/Shapely.egg-info/SOURCES.txt +0 -1
  5. Shapely-1.8.2/VERSION.txt +1 -0
  6. Shapely-1.8.2/shapely/__init__.py +1 -0
  7. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/base.py +1 -1
  8. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geos.py +34 -27
  9. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/ops.py +13 -8
  10. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_predicates.py +17 -2
  11. Shapely-1.8.1/VERSION.txt +0 -1
  12. Shapely-1.8.1/shapely/__init__.py +0 -1
  13. Shapely-1.8.1/shapely/speedups/_speedups.c +0 -15087
  14. {Shapely-1.8.1 → Shapely-1.8.2}/CREDITS.txt +0 -0
  15. {Shapely-1.8.1 → Shapely-1.8.2}/LICENSE.txt +0 -0
  16. {Shapely-1.8.1 → Shapely-1.8.2}/README.rst +0 -0
  17. {Shapely-1.8.1 → Shapely-1.8.2}/Shapely.egg-info/dependency_links.txt +0 -0
  18. {Shapely-1.8.1 → Shapely-1.8.2}/Shapely.egg-info/requires.txt +0 -0
  19. {Shapely-1.8.1 → Shapely-1.8.2}/Shapely.egg-info/top_level.txt +0 -0
  20. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/__init__.py +0 -0
  21. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/packaging/__about__.py +0 -0
  22. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/packaging/__init__.py +0 -0
  23. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/packaging/_compat.py +0 -0
  24. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/packaging/_structures.py +0 -0
  25. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/packaging/markers.py +0 -0
  26. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/packaging/requirements.py +0 -0
  27. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/packaging/specifiers.py +0 -0
  28. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/packaging/utils.py +0 -0
  29. {Shapely-1.8.1 → Shapely-1.8.2}/_vendor/packaging/version.py +0 -0
  30. {Shapely-1.8.1 → Shapely-1.8.2}/docs/design.rst +0 -0
  31. {Shapely-1.8.1 → Shapely-1.8.2}/docs/index.rst +0 -0
  32. {Shapely-1.8.1 → Shapely-1.8.2}/docs/manual.rst +0 -0
  33. {Shapely-1.8.1 → Shapely-1.8.2}/docs/migration.rst +0 -0
  34. {Shapely-1.8.1 → Shapely-1.8.2}/docs/project.rst +0 -0
  35. {Shapely-1.8.1 → Shapely-1.8.2}/pyproject.toml +0 -0
  36. {Shapely-1.8.1 → Shapely-1.8.2}/setup.cfg +0 -0
  37. {Shapely-1.8.1 → Shapely-1.8.2}/setup.py +0 -0
  38. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/_buildcfg.py +0 -0
  39. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/_geos.pxi +0 -0
  40. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/affinity.py +0 -0
  41. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/algorithms/__init__.py +0 -0
  42. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/algorithms/cga.py +0 -0
  43. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/algorithms/polylabel.py +0 -0
  44. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/coords.py +0 -0
  45. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/ctypes_declarations.py +0 -0
  46. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/errors.py +0 -0
  47. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/examples/__init__.py +0 -0
  48. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/examples/dissolve.py +0 -0
  49. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/examples/geoms.py +0 -0
  50. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/examples/intersect.py +0 -0
  51. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/__init__.py +0 -0
  52. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/collection.py +0 -0
  53. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/conftest.py +0 -0
  54. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/geo.py +0 -0
  55. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/linestring.py +0 -0
  56. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/multilinestring.py +0 -0
  57. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/multipoint.py +0 -0
  58. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/multipolygon.py +0 -0
  59. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/point.py +0 -0
  60. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/polygon.py +0 -0
  61. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/geometry/proxy.py +0 -0
  62. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/impl.py +0 -0
  63. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/iterops.py +0 -0
  64. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/linref.py +0 -0
  65. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/predicates.py +0 -0
  66. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/prepared.py +0 -0
  67. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/speedups/__init__.py +0 -0
  68. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/speedups/_speedups.pyx +0 -0
  69. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/strtree.py +0 -0
  70. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/topology.py +0 -0
  71. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/validation.py +0 -0
  72. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/vectorized/__init__.py +0 -0
  73. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/vectorized/_vectorized.pyx +0 -0
  74. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/wkb.py +0 -0
  75. {Shapely-1.8.1 → Shapely-1.8.2}/shapely/wkt.py +0 -0
  76. {Shapely-1.8.1 → Shapely-1.8.2}/tests/__init__.py +0 -0
  77. {Shapely-1.8.1 → Shapely-1.8.2}/tests/conftest.py +0 -0
  78. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_affinity.py +0 -0
  79. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_binascii_hex.txt +0 -0
  80. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_box.py +0 -0
  81. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_buffer.py +0 -0
  82. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_cga.py +0 -0
  83. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_clip_by_rect.py +0 -0
  84. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_collection.py +0 -0
  85. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_coords.py +0 -0
  86. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_create_inconsistent_dimensionality.py +0 -0
  87. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_default_impl.py +0 -0
  88. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_delaunay.py +0 -0
  89. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_delegated.py +0 -0
  90. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_dlls.py +0 -0
  91. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_doctests.py +0 -0
  92. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_emptiness.py +0 -0
  93. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_empty_polygons.py +0 -0
  94. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_equality.py +0 -0
  95. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_geointerface.py +0 -0
  96. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_geometry_base.py +0 -0
  97. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_geomseq.py +0 -0
  98. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_geos_err_handler.py +0 -0
  99. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_getitem.py +0 -0
  100. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_hash.py +0 -0
  101. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_invalid_geometries.py +0 -0
  102. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_iterops.py +0 -0
  103. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_linear_referencing.py +0 -0
  104. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_linemerge.py +0 -0
  105. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_linestring.py +0 -0
  106. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_locale.py +0 -0
  107. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_make_valid.py +0 -0
  108. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_mapping.py +0 -0
  109. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_minimum_clearance.py +0 -0
  110. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_minimum_rotated_rectangle.py +0 -0
  111. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_multi.py +0 -0
  112. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_multilinestring.py +0 -0
  113. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_multipoint.py +0 -0
  114. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_multipolygon.py +0 -0
  115. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_ndarrays.py +0 -0
  116. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_nearest.py +0 -0
  117. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_operations.py +0 -0
  118. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_operators.py +0 -0
  119. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_orient.py +0 -0
  120. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_parallel_offset.py +0 -0
  121. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_persist.py +0 -0
  122. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_pickle.py +0 -0
  123. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_point.py +0 -0
  124. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_polygon.py +0 -0
  125. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_polygonize.py +0 -0
  126. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_polylabel.py +0 -0
  127. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_prepared.py +0 -0
  128. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_products_z.py +0 -0
  129. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_shape.py +0 -0
  130. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_shared_paths.py +0 -0
  131. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_singularity.py +0 -0
  132. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_snap.py +0 -0
  133. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_split.py +0 -0
  134. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_strtree.py +0 -0
  135. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_styles.py +0 -0
  136. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_substring.py +0 -0
  137. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_svg.py +0 -0
  138. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_transform.py +0 -0
  139. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_union.py +0 -0
  140. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_validation.py +0 -0
  141. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_vectorized.py +0 -0
  142. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_voronoi_diagram.py +0 -0
  143. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_wkb.py +0 -0
  144. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_wkt.py +0 -0
  145. {Shapely-1.8.1 → Shapely-1.8.2}/tests/test_xy.py +0 -0
  146. {Shapely-1.8.1 → Shapely-1.8.2}/tests/threading_test.py +0 -0
  147. {Shapely-1.8.1 → Shapely-1.8.2}/tests/unpickle-strtree.py +0 -0
@@ -1,6 +1,22 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ 1.8.2 (2022-05-03)
5
+ ------------------
6
+
7
+ - Make Polygons and MultiPolygons closed by definition, like LinearRings.
8
+ Resolves #1246.
9
+ - Perform frozen app check for GEOS before conda env check on macos as we
10
+ already do on linux (#1301).
11
+ - Fix leak of GEOS coordinate sequence in nearest_points reported in #1098.
12
+
13
+ 1.8.1.post1 (2022-02-17)
14
+ ------------------------
15
+
16
+ This post-release addresses a defect in the 1.8.1 source distribution. No .c
17
+ files are included in the 1.8.1.post1 sdist and Cython is required to build and
18
+ install from source.
19
+
4
20
  1.8.1 (2022-02-16)
5
21
  ------------------
6
22
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Shapely
3
- Version: 1.8.1
3
+ Version: 1.8.2
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/shapely/shapely
6
6
  Author: Sean Gillies
@@ -332,6 +332,22 @@ U.S. National Endowment for the Humanities (https://www.neh.gov).
332
332
  Changes
333
333
  =======
334
334
 
335
+ 1.8.2 (2022-05-03)
336
+ ------------------
337
+
338
+ - Make Polygons and MultiPolygons closed by definition, like LinearRings.
339
+ Resolves #1246.
340
+ - Perform frozen app check for GEOS before conda env check on macos as we
341
+ already do on linux (#1301).
342
+ - Fix leak of GEOS coordinate sequence in nearest_points reported in #1098.
343
+
344
+ 1.8.1.post1 (2022-02-17)
345
+ ------------------------
346
+
347
+ This post-release addresses a defect in the 1.8.1 source distribution. No .c
348
+ files are included in the 1.8.1.post1 sdist and Cython is required to build and
349
+ install from source.
350
+
335
351
  1.8.1 (2022-02-16)
336
352
  ------------------
337
353
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Shapely
3
- Version: 1.8.1
3
+ Version: 1.8.2
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/shapely/shapely
6
6
  Author: Sean Gillies
@@ -332,6 +332,22 @@ U.S. National Endowment for the Humanities (https://www.neh.gov).
332
332
  Changes
333
333
  =======
334
334
 
335
+ 1.8.2 (2022-05-03)
336
+ ------------------
337
+
338
+ - Make Polygons and MultiPolygons closed by definition, like LinearRings.
339
+ Resolves #1246.
340
+ - Perform frozen app check for GEOS before conda env check on macos as we
341
+ already do on linux (#1301).
342
+ - Fix leak of GEOS coordinate sequence in nearest_points reported in #1098.
343
+
344
+ 1.8.1.post1 (2022-02-17)
345
+ ------------------------
346
+
347
+ This post-release addresses a defect in the 1.8.1 source distribution. No .c
348
+ files are included in the 1.8.1.post1 sdist and Cython is required to build and
349
+ install from source.
350
+
335
351
  1.8.1 (2022-02-16)
336
352
  ------------------
337
353
 
@@ -65,7 +65,6 @@ shapely/geometry/point.py
65
65
  shapely/geometry/polygon.py
66
66
  shapely/geometry/proxy.py
67
67
  shapely/speedups/__init__.py
68
- shapely/speedups/_speedups.c
69
68
  shapely/speedups/_speedups.pyx
70
69
  shapely/vectorized/__init__.py
71
70
  shapely/vectorized/_vectorized.pyx
@@ -0,0 +1 @@
1
+ 1.8.2
@@ -0,0 +1 @@
1
+ __version__ = "1.8.2"
@@ -721,7 +721,7 @@ class BaseGeometry:
721
721
  """True if the geometry is closed, else False
722
722
 
723
723
  Applicable only to 1-D geometries."""
724
- if self.geom_type == 'LinearRing':
724
+ if self.geom_type in {"LinearRing", "Polygon", "MultiPolygon"}:
725
725
  return True
726
726
  elif self.geom_type == 'LineString':
727
727
  if 'is_closed' in self.impl:
@@ -56,11 +56,12 @@ def load_dll(libname, fallbacks=None, mode=DEFAULT_MODE):
56
56
  libname, fallbacks or []))
57
57
 
58
58
  _lgeos = None
59
+
60
+
59
61
  def exists_conda_env():
60
62
  """Does this module exist in a conda environment?"""
61
63
  return os.path.exists(os.path.join(sys.prefix, 'conda-meta'))
62
64
 
63
-
64
65
  if sys.platform.startswith('linux'):
65
66
  # Test to see if we have a wheel repaired by auditwheel which contains its
66
67
  # own libgeos_c. Note: auditwheel 3.1 changed the location of libs.
@@ -127,36 +128,39 @@ elif sys.platform == 'darwin':
127
128
  _lgeos = CDLL(geos_whl_dylib[-1])
128
129
  LOG.debug("Found GEOS DLL: %r, using it.", _lgeos)
129
130
 
131
+ elif hasattr(sys, "frozen"):
132
+ try:
133
+ # .app file from py2app
134
+ alt_paths = [
135
+ os.path.join(
136
+ os.environ["RESOURCEPATH"], "..", "Frameworks", "libgeos_c.dylib"
137
+ )
138
+ ]
139
+ except KeyError:
140
+ alt_paths = [
141
+ # binary from pyinstaller
142
+ os.path.join(sys.executable, "libgeos_c.dylib"),
143
+ # .app from cx_Freeze
144
+ os.path.join(os.path.dirname(sys.executable), "libgeos_c.1.dylib"),
145
+ ]
146
+ if hasattr(sys, "_MEIPASS"):
147
+ alt_paths.append(os.path.join(sys._MEIPASS, "libgeos_c.1.dylib"))
148
+
130
149
  elif exists_conda_env():
131
150
  # conda package.
132
151
  _lgeos = CDLL(os.path.join(sys.prefix, 'lib', 'libgeos_c.dylib'))
152
+
133
153
  else:
134
- if hasattr(sys, 'frozen'):
135
- try:
136
- # .app file from py2app
137
- alt_paths = [os.path.join(
138
- os.environ['RESOURCEPATH'], '..', 'Frameworks',
139
- 'libgeos_c.dylib')]
140
- except KeyError:
141
- alt_paths = [
142
- # binary from pyinstaller
143
- os.path.join(sys.executable, 'libgeos_c.dylib'),
144
- # .app from cx_Freeze
145
- os.path.join(os.path.dirname(sys.executable), 'libgeos_c.1.dylib')]
146
- if hasattr(sys, '_MEIPASS'):
147
- alt_paths.append(
148
- os.path.join(sys._MEIPASS, 'libgeos_c.1.dylib'))
149
- else:
150
- alt_paths = [
151
- # The Framework build from Kyng Chaos
152
- "/Library/Frameworks/GEOS.framework/Versions/Current/GEOS",
153
- # macports
154
- '/opt/local/lib/libgeos_c.dylib',
155
- # homebrew Intel
156
- '/usr/local/lib/libgeos_c.dylib',
157
- # homebrew Apple Silicon
158
- '/opt/homebrew/lib/libgeos_c.dylib',
159
- ]
154
+ alt_paths = [
155
+ # The Framework build from Kyng Chaos
156
+ "/Library/Frameworks/GEOS.framework/Versions/Current/GEOS",
157
+ # macports
158
+ "/opt/local/lib/libgeos_c.dylib",
159
+ # homebrew Intel
160
+ "/usr/local/lib/libgeos_c.dylib",
161
+ # homebrew Apple Silicon
162
+ "/opt/homebrew/lib/libgeos_c.dylib",
163
+ ]
160
164
  _lgeos = load_dll('geos_c', fallbacks=alt_paths)
161
165
 
162
166
  free = CDLL(None).free
@@ -165,8 +169,10 @@ elif sys.platform == 'darwin':
165
169
 
166
170
  elif sys.platform == 'win32':
167
171
  _conda_dll_path = os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll')
172
+
168
173
  if exists_conda_env() and os.path.exists(_conda_dll_path):
169
174
  _lgeos = CDLL(_conda_dll_path)
175
+
170
176
  else:
171
177
  geos_whl_dll = glob.glob(
172
178
  os.path.abspath(
@@ -181,6 +187,7 @@ elif sys.platform == 'win32':
181
187
  # CDLL(geos_whl_so[0])
182
188
  _lgeos = CDLL(geos_whl_dll[-1])
183
189
  LOG.debug("Found GEOS DLL: %r, using it.", _lgeos)
190
+
184
191
  else:
185
192
  try:
186
193
  egg_dlls = os.path.abspath(
@@ -336,14 +336,19 @@ def nearest_points(g1, g2):
336
336
  raise ValueError('The first input geometry is empty')
337
337
  else:
338
338
  raise ValueError('The second input geometry is empty')
339
- x1 = c_double()
340
- y1 = c_double()
341
- x2 = c_double()
342
- y2 = c_double()
343
- lgeos.GEOSCoordSeq_getX(seq, 0, byref(x1))
344
- lgeos.GEOSCoordSeq_getY(seq, 0, byref(y1))
345
- lgeos.GEOSCoordSeq_getX(seq, 1, byref(x2))
346
- lgeos.GEOSCoordSeq_getY(seq, 1, byref(y2))
339
+
340
+ try:
341
+ x1 = c_double()
342
+ y1 = c_double()
343
+ x2 = c_double()
344
+ y2 = c_double()
345
+ lgeos.GEOSCoordSeq_getX(seq, 0, byref(x1))
346
+ lgeos.GEOSCoordSeq_getY(seq, 0, byref(y1))
347
+ lgeos.GEOSCoordSeq_getX(seq, 1, byref(x2))
348
+ lgeos.GEOSCoordSeq_getY(seq, 1, byref(y2))
349
+ finally:
350
+ lgeos._lgeos.GEOSCoordSeq_destroy(seq)
351
+
347
352
  p1 = Point(x1.value, y1.value)
348
353
  p2 = Point(x2.value, y2.value)
349
354
  return (p1, p2)
@@ -1,10 +1,11 @@
1
- """Test GEOS predicates
1
+ """Test GEOS predicates.
2
2
  """
3
3
  from . import unittest
4
- from shapely.geometry import Point, Polygon
4
+ from shapely.geometry import LinearRing, MultiPolygon, Point, Polygon
5
5
  from shapely.geos import TopologicalError, PredicateError
6
6
  import pytest
7
7
 
8
+
8
9
  class PredicatesTestCase(unittest.TestCase):
9
10
 
10
11
  def test_binary_predicates(self):
@@ -64,3 +65,17 @@ class PredicatesTestCase(unittest.TestCase):
64
65
  # an invalid pattern should raise an exception
65
66
  with pytest.raises(PredicateError):
66
67
  g1.relate_pattern(g2, 'fail')
68
+
69
+
70
+ @pytest.mark.parametrize(
71
+ "geom",
72
+ [
73
+ Point(0, 0).buffer(1.0).exterior,
74
+ Point(0, 0).buffer(1.0),
75
+ MultiPolygon([Point(0, 0).buffer(1.0)]),
76
+ ],
77
+ )
78
+ def test_polygon_closed(geom):
79
+ """Polygons and MultiPolygons are closed by definition."""
80
+ # See gh-1246
81
+ assert geom.is_closed
Shapely-1.8.1/VERSION.txt DELETED
@@ -1 +0,0 @@
1
- 1.8.1
@@ -1 +0,0 @@
1
- __version__ = "1.8.1"