shapely 2.0.5__tar.gz → 2.0.6__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 (178) hide show
  1. {shapely-2.0.5 → shapely-2.0.6}/CHANGES.txt +9 -0
  2. {shapely-2.0.5 → shapely-2.0.6}/CITATION.cff +2 -2
  3. {shapely-2.0.5 → shapely-2.0.6}/PKG-INFO +1 -1
  4. {shapely-2.0.5 → shapely-2.0.6}/shapely/_version.py +3 -3
  5. {shapely-2.0.5 → shapely-2.0.6}/shapely/creation.py +4 -4
  6. {shapely-2.0.5 → shapely-2.0.6}/shapely/set_operations.py +6 -2
  7. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_operations.py +6 -2
  8. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_predicates.py +10 -2
  9. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_strtree.py +20 -8
  10. {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/PKG-INFO +1 -1
  11. {shapely-2.0.5 → shapely-2.0.6}/CREDITS.txt +0 -0
  12. {shapely-2.0.5 → shapely-2.0.6}/LICENSE.txt +0 -0
  13. {shapely-2.0.5 → shapely-2.0.6}/README.rst +0 -0
  14. {shapely-2.0.5 → shapely-2.0.6}/docs/constructive.rst +0 -0
  15. {shapely-2.0.5 → shapely-2.0.6}/docs/coordinates.rst +0 -0
  16. {shapely-2.0.5 → shapely-2.0.6}/docs/creation.rst +0 -0
  17. {shapely-2.0.5 → shapely-2.0.6}/docs/design.rst +0 -0
  18. {shapely-2.0.5 → shapely-2.0.6}/docs/geometry.rst +0 -0
  19. {shapely-2.0.5 → shapely-2.0.6}/docs/index.rst +0 -0
  20. {shapely-2.0.5 → shapely-2.0.6}/docs/installation.rst +0 -0
  21. {shapely-2.0.5 → shapely-2.0.6}/docs/io.rst +0 -0
  22. {shapely-2.0.5 → shapely-2.0.6}/docs/linear.rst +0 -0
  23. {shapely-2.0.5 → shapely-2.0.6}/docs/manual.rst +0 -0
  24. {shapely-2.0.5 → shapely-2.0.6}/docs/measurement.rst +0 -0
  25. {shapely-2.0.5 → shapely-2.0.6}/docs/migration.rst +0 -0
  26. {shapely-2.0.5 → shapely-2.0.6}/docs/migration_pygeos.rst +0 -0
  27. {shapely-2.0.5 → shapely-2.0.6}/docs/predicates.rst +0 -0
  28. {shapely-2.0.5 → shapely-2.0.6}/docs/properties.rst +0 -0
  29. {shapely-2.0.5 → shapely-2.0.6}/docs/release.rst +0 -0
  30. {shapely-2.0.5 → shapely-2.0.6}/docs/set_operations.rst +0 -0
  31. {shapely-2.0.5 → shapely-2.0.6}/docs/strtree.rst +0 -0
  32. {shapely-2.0.5 → shapely-2.0.6}/docs/testing.rst +0 -0
  33. {shapely-2.0.5 → shapely-2.0.6}/pyproject.toml +0 -0
  34. {shapely-2.0.5 → shapely-2.0.6}/setup.cfg +0 -0
  35. {shapely-2.0.5 → shapely-2.0.6}/setup.py +0 -0
  36. {shapely-2.0.5 → shapely-2.0.6}/shapely/__init__.py +0 -0
  37. {shapely-2.0.5 → shapely-2.0.6}/shapely/_enum.py +0 -0
  38. {shapely-2.0.5 → shapely-2.0.6}/shapely/_geometry.py +0 -0
  39. {shapely-2.0.5 → shapely-2.0.6}/shapely/_geometry_helpers.pyx +0 -0
  40. {shapely-2.0.5 → shapely-2.0.6}/shapely/_geos.pxd +0 -0
  41. {shapely-2.0.5 → shapely-2.0.6}/shapely/_geos.pyx +0 -0
  42. {shapely-2.0.5 → shapely-2.0.6}/shapely/_pygeos_api.pxd +0 -0
  43. {shapely-2.0.5 → shapely-2.0.6}/shapely/_ragged_array.py +0 -0
  44. {shapely-2.0.5 → shapely-2.0.6}/shapely/affinity.py +0 -0
  45. {shapely-2.0.5 → shapely-2.0.6}/shapely/algorithms/__init__.py +0 -0
  46. {shapely-2.0.5 → shapely-2.0.6}/shapely/algorithms/_oriented_envelope.py +0 -0
  47. {shapely-2.0.5 → shapely-2.0.6}/shapely/algorithms/cga.py +0 -0
  48. {shapely-2.0.5 → shapely-2.0.6}/shapely/algorithms/polylabel.py +0 -0
  49. {shapely-2.0.5 → shapely-2.0.6}/shapely/constructive.py +0 -0
  50. {shapely-2.0.5 → shapely-2.0.6}/shapely/coordinates.py +0 -0
  51. {shapely-2.0.5 → shapely-2.0.6}/shapely/coords.py +0 -0
  52. {shapely-2.0.5 → shapely-2.0.6}/shapely/decorators.py +0 -0
  53. {shapely-2.0.5 → shapely-2.0.6}/shapely/errors.py +0 -0
  54. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/__init__.py +0 -0
  55. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/base.py +0 -0
  56. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/collection.py +0 -0
  57. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/conftest.py +0 -0
  58. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/geo.py +0 -0
  59. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/linestring.py +0 -0
  60. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/multilinestring.py +0 -0
  61. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/multipoint.py +0 -0
  62. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/multipolygon.py +0 -0
  63. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/point.py +0 -0
  64. {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/polygon.py +0 -0
  65. {shapely-2.0.5 → shapely-2.0.6}/shapely/geos.py +0 -0
  66. {shapely-2.0.5 → shapely-2.0.6}/shapely/io.py +0 -0
  67. {shapely-2.0.5 → shapely-2.0.6}/shapely/linear.py +0 -0
  68. {shapely-2.0.5 → shapely-2.0.6}/shapely/measurement.py +0 -0
  69. {shapely-2.0.5 → shapely-2.0.6}/shapely/ops.py +0 -0
  70. {shapely-2.0.5 → shapely-2.0.6}/shapely/plotting.py +0 -0
  71. {shapely-2.0.5 → shapely-2.0.6}/shapely/predicates.py +0 -0
  72. {shapely-2.0.5 → shapely-2.0.6}/shapely/prepared.py +0 -0
  73. {shapely-2.0.5 → shapely-2.0.6}/shapely/speedups.py +0 -0
  74. {shapely-2.0.5 → shapely-2.0.6}/shapely/strtree.py +0 -0
  75. {shapely-2.0.5 → shapely-2.0.6}/shapely/testing.py +0 -0
  76. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/__init__.py +0 -0
  77. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/common.py +0 -0
  78. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/__init__.py +0 -0
  79. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_collection.py +0 -0
  80. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_coords.py +0 -0
  81. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_decimal.py +0 -0
  82. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_emptiness.py +0 -0
  83. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_equality.py +0 -0
  84. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_format.py +0 -0
  85. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_geometry_base.py +0 -0
  86. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_hash.py +0 -0
  87. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_linestring.py +0 -0
  88. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_multi.py +0 -0
  89. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_multilinestring.py +0 -0
  90. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_multipoint.py +0 -0
  91. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_multipolygon.py +0 -0
  92. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_point.py +0 -0
  93. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_polygon.py +0 -0
  94. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/__init__.py +0 -0
  95. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/conftest.py +0 -0
  96. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_affinity.py +0 -0
  97. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_box.py +0 -0
  98. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_buffer.py +0 -0
  99. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_cga.py +0 -0
  100. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_clip_by_rect.py +0 -0
  101. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_create_inconsistent_dimensionality.py +0 -0
  102. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_delaunay.py +0 -0
  103. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_empty_polygons.py +0 -0
  104. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_equality.py +0 -0
  105. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_geointerface.py +0 -0
  106. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_invalid_geometries.py +0 -0
  107. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_linear_referencing.py +0 -0
  108. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_linemerge.py +0 -0
  109. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_locale.py +0 -0
  110. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_make_valid.py +0 -0
  111. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_mapping.py +0 -0
  112. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_minimum_clearance.py +0 -0
  113. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_ndarrays.py +0 -0
  114. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_nearest.py +0 -0
  115. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_operators.py +0 -0
  116. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_orient.py +0 -0
  117. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_parallel_offset.py +0 -0
  118. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_persist.py +0 -0
  119. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_pickle.py +0 -0
  120. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_polygonize.py +0 -0
  121. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_polylabel.py +0 -0
  122. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_prepared.py +0 -0
  123. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_products_z.py +0 -0
  124. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_shape.py +0 -0
  125. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_shared_paths.py +0 -0
  126. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_singularity.py +0 -0
  127. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_snap.py +0 -0
  128. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_split.py +0 -0
  129. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_substring.py +0 -0
  130. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_svg.py +0 -0
  131. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_transform.py +0 -0
  132. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_union.py +0 -0
  133. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_validation.py +0 -0
  134. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_vectorized.py +0 -0
  135. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_voronoi_diagram.py +0 -0
  136. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_wkb.py +0 -0
  137. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_wkt.py +0 -0
  138. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/threading_test.py +0 -0
  139. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_constructive.py +0 -0
  140. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_coordinates.py +0 -0
  141. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_creation.py +0 -0
  142. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_creation_indices.py +0 -0
  143. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_geometry.py +0 -0
  144. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_io.py +0 -0
  145. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_linear.py +0 -0
  146. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_measurement.py +0 -0
  147. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_misc.py +0 -0
  148. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_plotting.py +0 -0
  149. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_predicates.py +0 -0
  150. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_ragged_array.py +0 -0
  151. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_set_operations.py +0 -0
  152. {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_testing.py +0 -0
  153. {shapely-2.0.5 → shapely-2.0.6}/shapely/validation.py +0 -0
  154. {shapely-2.0.5 → shapely-2.0.6}/shapely/vectorized/__init__.py +0 -0
  155. {shapely-2.0.5 → shapely-2.0.6}/shapely/wkb.py +0 -0
  156. {shapely-2.0.5 → shapely-2.0.6}/shapely/wkt.py +0 -0
  157. {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/SOURCES.txt +0 -0
  158. {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/dependency_links.txt +0 -0
  159. {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/requires.txt +0 -0
  160. {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/top_level.txt +0 -0
  161. {shapely-2.0.5 → shapely-2.0.6}/src/c_api.c +0 -0
  162. {shapely-2.0.5 → shapely-2.0.6}/src/c_api.h +0 -0
  163. {shapely-2.0.5 → shapely-2.0.6}/src/coords.c +0 -0
  164. {shapely-2.0.5 → shapely-2.0.6}/src/coords.h +0 -0
  165. {shapely-2.0.5 → shapely-2.0.6}/src/fast_loop_macros.h +0 -0
  166. {shapely-2.0.5 → shapely-2.0.6}/src/geos.c +0 -0
  167. {shapely-2.0.5 → shapely-2.0.6}/src/geos.h +0 -0
  168. {shapely-2.0.5 → shapely-2.0.6}/src/kvec.h +0 -0
  169. {shapely-2.0.5 → shapely-2.0.6}/src/lib.c +0 -0
  170. {shapely-2.0.5 → shapely-2.0.6}/src/pygeom.c +0 -0
  171. {shapely-2.0.5 → shapely-2.0.6}/src/pygeom.h +0 -0
  172. {shapely-2.0.5 → shapely-2.0.6}/src/strtree.c +0 -0
  173. {shapely-2.0.5 → shapely-2.0.6}/src/strtree.h +0 -0
  174. {shapely-2.0.5 → shapely-2.0.6}/src/ufuncs.c +0 -0
  175. {shapely-2.0.5 → shapely-2.0.6}/src/ufuncs.h +0 -0
  176. {shapely-2.0.5 → shapely-2.0.6}/src/vector.c +0 -0
  177. {shapely-2.0.5 → shapely-2.0.6}/src/vector.h +0 -0
  178. {shapely-2.0.5 → shapely-2.0.6}/versioneer.py +0 -0
@@ -1,6 +1,15 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ 2.0.6 (2024-08-19)
5
+ ------------------
6
+
7
+ Bug fixes:
8
+
9
+ - Fix compatibility with NumPy 2.1.0 (#2099).
10
+
11
+ Wheels are available for Python 3.13 (and still include GEOS 3.11.4).
12
+
4
13
  2.0.5 (2024-07-13)
5
14
  ------------------
6
15
 
@@ -2,8 +2,8 @@ cff-version: 1.2.0
2
2
  message: "Please cite this software using these metadata."
3
3
  type: software
4
4
  title: Shapely
5
- version: "2.0.5"
6
- date-released: "2024-07-13"
5
+ version: "2.0.6"
6
+ date-released: "2024-08-19"
7
7
  doi: 10.5281/zenodo.5597138
8
8
  abstract: "Manipulation and analysis of geometric objects in the Cartesian plane."
9
9
  repository-artifact: https://pypi.org/project/Shapely
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shapely
3
- Version: 2.0.5
3
+ Version: 2.0.6
4
4
  Summary: Manipulation and analysis of geometric objects
5
5
  Author: Sean Gillies
6
6
  Maintainer: Shapely contributors
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-07-13T16:49:25+1200",
11
+ "date": "2024-08-19T23:29:00+0200",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "a4fe42f45db97f264d7ba71671fc9718063a3aa2",
15
- "version": "2.0.5"
14
+ "full-revisionid": "5a4207d2fb74b25d7bb2fb5d04813f68a3a612f4",
15
+ "version": "2.0.6"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -353,7 +353,7 @@ def multipoints(geometries, indices=None, out=None, **kwargs):
353
353
  ):
354
354
  geometries = points(geometries)
355
355
  if indices is None:
356
- return lib.create_collection(geometries, typ, out=out, **kwargs)
356
+ return lib.create_collection(geometries, np.intc(typ), out=out, **kwargs)
357
357
  else:
358
358
  return collections_1d(geometries, indices, typ, out=out)
359
359
 
@@ -390,7 +390,7 @@ def multilinestrings(geometries, indices=None, out=None, **kwargs):
390
390
  geometries = linestrings(geometries)
391
391
 
392
392
  if indices is None:
393
- return lib.create_collection(geometries, typ, out=out, **kwargs)
393
+ return lib.create_collection(geometries, np.intc(typ), out=out, **kwargs)
394
394
  else:
395
395
  return collections_1d(geometries, indices, typ, out=out)
396
396
 
@@ -426,7 +426,7 @@ def multipolygons(geometries, indices=None, out=None, **kwargs):
426
426
  ):
427
427
  geometries = polygons(geometries)
428
428
  if indices is None:
429
- return lib.create_collection(geometries, typ, out=out, **kwargs)
429
+ return lib.create_collection(geometries, np.intc(typ), out=out, **kwargs)
430
430
  else:
431
431
  return collections_1d(geometries, indices, typ, out=out)
432
432
 
@@ -457,7 +457,7 @@ def geometrycollections(geometries, indices=None, out=None, **kwargs):
457
457
  """
458
458
  typ = GeometryType.GEOMETRYCOLLECTION
459
459
  if indices is None:
460
- return lib.create_collection(geometries, typ, out=out, **kwargs)
460
+ return lib.create_collection(geometries, np.intc(typ), out=out, **kwargs)
461
461
  else:
462
462
  return collections_1d(geometries, indices, typ, out=out)
463
463
 
@@ -403,7 +403,9 @@ def union_all(geometries, grid_size=None, axis=None, **kwargs):
403
403
  geometries = np.rollaxis(geometries, axis=axis, start=geometries.ndim)
404
404
 
405
405
  # create_collection acts on the inner axis
406
- collections = lib.create_collection(geometries, GeometryType.GEOMETRYCOLLECTION)
406
+ collections = lib.create_collection(
407
+ geometries, np.intc(GeometryType.GEOMETRYCOLLECTION)
408
+ )
407
409
 
408
410
  if grid_size is not None:
409
411
  if lib.geos_version < (3, 9, 0):
@@ -501,5 +503,7 @@ def coverage_union_all(geometries, axis=None, **kwargs):
501
503
  np.asarray(geometries), axis=axis, start=geometries.ndim
502
504
  )
503
505
  # create_collection acts on the inner axis
504
- collections = lib.create_collection(geometries, GeometryType.GEOMETRYCOLLECTION)
506
+ collections = lib.create_collection(
507
+ geometries, np.intc(GeometryType.GEOMETRYCOLLECTION)
508
+ )
505
509
  return lib.coverage_union(collections, **kwargs)
@@ -3,6 +3,7 @@ import unittest
3
3
  import pytest
4
4
 
5
5
  import shapely
6
+ from shapely import geos_version
6
7
  from shapely.errors import TopologicalError
7
8
  from shapely.geometry import GeometryCollection, LineString, MultiPoint, Point, Polygon
8
9
  from shapely.wkt import loads
@@ -79,8 +80,11 @@ class OperationsTestCase(unittest.TestCase):
79
80
  "POLYGON ((40 100, 80 100, 80 60, 40 60, 40 100), (60 60, 80 60, 80 40, 60 40, 60 60))"
80
81
  )
81
82
  assert not invalid_polygon.is_valid
82
- with pytest.raises((TopologicalError, shapely.GEOSException)):
83
- invalid_polygon.relate(invalid_polygon)
83
+ if geos_version < (3, 13, 0):
84
+ with pytest.raises((TopologicalError, shapely.GEOSException)):
85
+ invalid_polygon.relate(invalid_polygon)
86
+ else: # resolved with RelateNG
87
+ assert invalid_polygon.relate(invalid_polygon) == "2FFF1FFF2"
84
88
 
85
89
  def test_hausdorff_distance(self):
86
90
  point = Point(1, 1)
@@ -5,6 +5,7 @@ import unittest
5
5
  import pytest
6
6
 
7
7
  import shapely
8
+ from shapely import geos_version
8
9
  from shapely.geometry import Point, Polygon
9
10
 
10
11
 
@@ -67,8 +68,15 @@ class PredicatesTestCase(unittest.TestCase):
67
68
  (339, 207),
68
69
  ]
69
70
 
70
- with pytest.raises(shapely.GEOSException):
71
- Polygon(p1).within(Polygon(p2))
71
+ g1 = Polygon(p1)
72
+ g2 = Polygon(p2)
73
+ assert not g1.is_valid
74
+ assert not g2.is_valid
75
+ if geos_version < (3, 13, 0):
76
+ with pytest.raises(shapely.GEOSException):
77
+ g1.within(g2)
78
+ else: # resolved with RelateNG
79
+ assert not g1.within(g2)
72
80
 
73
81
  def test_relate_pattern(self):
74
82
 
@@ -368,39 +368,51 @@ def test_query_with_partially_prepared_inputs(tree):
368
368
 
369
369
 
370
370
  @pytest.mark.parametrize(
371
- "predicate",
371
+ "predicate,expected",
372
372
  [
373
- # intersects is intentionally omitted; it does not raise an exception
373
+ pytest.param(
374
+ "intersects",
375
+ [1],
376
+ marks=pytest.mark.xfail(geos_version < (3, 13, 0), reason="GEOS < 3.13"),
377
+ ),
374
378
  pytest.param(
375
379
  "within",
380
+ [],
376
381
  marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
377
382
  ),
378
383
  pytest.param(
379
384
  "contains",
385
+ [],
380
386
  marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
381
387
  ),
382
- "overlaps",
383
- "crosses",
384
- "touches",
388
+ ("overlaps", []),
389
+ ("crosses", [1]),
390
+ ("touches", []),
385
391
  pytest.param(
386
392
  "covers",
393
+ [],
387
394
  marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
388
395
  ),
389
396
  pytest.param(
390
397
  "covered_by",
398
+ [],
391
399
  marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
392
400
  ),
393
401
  pytest.param(
394
402
  "contains_properly",
403
+ [],
395
404
  marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
396
405
  ),
397
406
  ],
398
407
  )
399
- def test_query_predicate_errors(tree, predicate):
408
+ def test_query_predicate_errors(tree, predicate, expected):
400
409
  with ignore_invalid():
401
410
  line_nan = shapely.linestrings([1, 1], [1, float("nan")])
402
- with pytest.raises(shapely.GEOSException):
403
- tree.query(line_nan, predicate=predicate)
411
+ if geos_version < (3, 13, 0):
412
+ with pytest.raises(shapely.GEOSException):
413
+ tree.query(line_nan, predicate=predicate)
414
+ else:
415
+ assert_array_equal(tree.query(line_nan, predicate=predicate), expected)
404
416
 
405
417
 
406
418
  ### predicate == 'intersects'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shapely
3
- Version: 2.0.5
3
+ Version: 2.0.6
4
4
  Summary: Manipulation and analysis of geometric objects
5
5
  Author: Sean Gillies
6
6
  Maintainer: Shapely contributors
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes