shapely 1.8a3__tar.gz → 1.8rc2__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 (148) hide show
  1. {Shapely-1.8a3 → Shapely-1.8rc2}/CHANGES.txt +38 -2
  2. {Shapely-1.8a3/Shapely.egg-info → Shapely-1.8rc2}/PKG-INFO +40 -4
  3. {Shapely-1.8a3 → Shapely-1.8rc2/Shapely.egg-info}/PKG-INFO +40 -4
  4. {Shapely-1.8a3 → Shapely-1.8rc2}/Shapely.egg-info/SOURCES.txt +2 -0
  5. Shapely-1.8rc2/VERSION.txt +1 -0
  6. {Shapely-1.8a3 → Shapely-1.8rc2}/docs/index.rst +1 -0
  7. {Shapely-1.8a3 → Shapely-1.8rc2}/docs/manual.rst +2 -0
  8. Shapely-1.8rc2/docs/migration.rst +348 -0
  9. Shapely-1.8rc2/shapely/__init__.py +1 -0
  10. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/_buildcfg.py +3 -1
  11. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/base.py +102 -13
  12. Shapely-1.8rc2/shapely/geometry/conftest.py +10 -0
  13. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/geo.py +3 -1
  14. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/proxy.py +5 -0
  15. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geos.py +8 -4
  16. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/vectorized/__init__.py +2 -0
  17. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/conftest.py +2 -0
  18. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_affinity.py +16 -16
  19. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_dlls.py +3 -2
  20. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_emptiness.py +10 -0
  21. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_equality.py +12 -4
  22. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_geointerface.py +12 -1
  23. Shapely-1.8rc2/tests/test_geometry_base.py +36 -0
  24. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_polylabel.py +1 -1
  25. Shapely-1.8a3/VERSION.txt +0 -1
  26. Shapely-1.8a3/shapely/__init__.py +0 -1
  27. Shapely-1.8a3/tests/test_geometry_base.py +0 -17
  28. {Shapely-1.8a3 → Shapely-1.8rc2}/CREDITS.txt +0 -0
  29. {Shapely-1.8a3 → Shapely-1.8rc2}/LICENSE.txt +0 -0
  30. {Shapely-1.8a3 → Shapely-1.8rc2}/README.rst +0 -0
  31. {Shapely-1.8a3 → Shapely-1.8rc2}/Shapely.egg-info/dependency_links.txt +0 -0
  32. {Shapely-1.8a3 → Shapely-1.8rc2}/Shapely.egg-info/requires.txt +0 -0
  33. {Shapely-1.8a3 → Shapely-1.8rc2}/Shapely.egg-info/top_level.txt +0 -0
  34. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/__init__.py +0 -0
  35. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/packaging/__about__.py +0 -0
  36. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/packaging/__init__.py +0 -0
  37. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/packaging/_compat.py +0 -0
  38. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/packaging/_structures.py +0 -0
  39. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/packaging/markers.py +0 -0
  40. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/packaging/requirements.py +0 -0
  41. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/packaging/specifiers.py +0 -0
  42. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/packaging/utils.py +0 -0
  43. {Shapely-1.8a3 → Shapely-1.8rc2}/_vendor/packaging/version.py +0 -0
  44. {Shapely-1.8a3 → Shapely-1.8rc2}/docs/design.rst +0 -0
  45. {Shapely-1.8a3 → Shapely-1.8rc2}/docs/project.rst +0 -0
  46. {Shapely-1.8a3 → Shapely-1.8rc2}/setup.cfg +0 -0
  47. {Shapely-1.8a3 → Shapely-1.8rc2}/setup.py +0 -0
  48. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/_geos.pxi +0 -0
  49. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/affinity.py +0 -0
  50. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/algorithms/__init__.py +0 -0
  51. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/algorithms/cga.py +0 -0
  52. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/algorithms/polylabel.py +0 -0
  53. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/coords.py +0 -0
  54. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/ctypes_declarations.py +0 -0
  55. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/errors.py +0 -0
  56. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/examples/__init__.py +0 -0
  57. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/examples/dissolve.py +0 -0
  58. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/examples/geoms.py +0 -0
  59. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/examples/intersect.py +0 -0
  60. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/__init__.py +0 -0
  61. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/collection.py +0 -0
  62. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/linestring.py +0 -0
  63. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/multilinestring.py +0 -0
  64. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/multipoint.py +0 -0
  65. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/multipolygon.py +0 -0
  66. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/point.py +0 -0
  67. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/geometry/polygon.py +0 -0
  68. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/impl.py +0 -0
  69. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/iterops.py +0 -0
  70. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/linref.py +0 -0
  71. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/ops.py +0 -0
  72. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/predicates.py +0 -0
  73. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/prepared.py +0 -0
  74. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/speedups/__init__.py +0 -0
  75. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/speedups/_speedups.c +0 -0
  76. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/speedups/_speedups.pyx +0 -0
  77. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/strtree.py +0 -0
  78. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/topology.py +0 -0
  79. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/validation.py +0 -0
  80. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/vectorized/_vectorized.pyx +0 -0
  81. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/wkb.py +0 -0
  82. {Shapely-1.8a3 → Shapely-1.8rc2}/shapely/wkt.py +0 -0
  83. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/__init__.py +0 -0
  84. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_binascii_hex.txt +0 -0
  85. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_box.py +0 -0
  86. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_buffer.py +0 -0
  87. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_cga.py +0 -0
  88. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_clip_by_rect.py +0 -0
  89. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_collection.py +0 -0
  90. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_coords.py +0 -0
  91. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_create_inconsistent_dimensionality.py +0 -0
  92. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_default_impl.py +0 -0
  93. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_delaunay.py +0 -0
  94. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_delegated.py +0 -0
  95. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_doctests.py +0 -0
  96. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_empty_polygons.py +0 -0
  97. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_geometry_geo.py +0 -0
  98. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_geomseq.py +0 -0
  99. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_geos_err_handler.py +0 -0
  100. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_getitem.py +0 -0
  101. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_hash.py +0 -0
  102. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_invalid_geometries.py +0 -0
  103. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_iterops.py +0 -0
  104. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_linear_referencing.py +0 -0
  105. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_linemerge.py +0 -0
  106. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_linestring.py +0 -0
  107. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_locale.py +0 -0
  108. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_make_valid.py +0 -0
  109. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_mapping.py +0 -0
  110. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_minimum_clearance.py +0 -0
  111. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_minimum_rotated_rectangle.py +0 -0
  112. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_multi.py +0 -0
  113. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_multilinestring.py +0 -0
  114. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_multipoint.py +0 -0
  115. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_multipolygon.py +0 -0
  116. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_ndarrays.py +0 -0
  117. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_nearest.py +0 -0
  118. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_operations.py +0 -0
  119. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_operators.py +0 -0
  120. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_orient.py +0 -0
  121. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_parallel_offset.py +0 -0
  122. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_persist.py +0 -0
  123. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_pickle.py +0 -0
  124. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_point.py +0 -0
  125. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_polygon.py +0 -0
  126. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_polygonize.py +0 -0
  127. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_predicates.py +0 -0
  128. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_prepared.py +0 -0
  129. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_products_z.py +0 -0
  130. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_shape.py +0 -0
  131. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_shared_paths.py +0 -0
  132. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_singularity.py +0 -0
  133. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_snap.py +0 -0
  134. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_split.py +0 -0
  135. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_strtree.py +0 -0
  136. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_styles.py +0 -0
  137. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_substring.py +0 -0
  138. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_svg.py +0 -0
  139. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_transform.py +0 -0
  140. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_union.py +0 -0
  141. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_validation.py +0 -0
  142. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_vectorized.py +0 -0
  143. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_voronoi_diagram.py +0 -0
  144. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_wkb.py +0 -0
  145. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_wkt.py +0 -0
  146. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/test_xy.py +0 -0
  147. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/threading_test.py +0 -0
  148. {Shapely-1.8a3 → Shapely-1.8rc2}/tests/unpickle-strtree.py +0 -0
@@ -1,6 +1,34 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ 1.8rc2 (2021-10-19)
5
+ -------------------
6
+
7
+ Build:
8
+
9
+ A pyproject.toml file has been added to specify build dependencies for the
10
+ _vectorized and _speedups modules (#1128). To install shapely without these
11
+ build dependencies, use the features of your build tool that disable PEP 517
12
+ and 518 support.
13
+
14
+ Bug fixes:
15
+
16
+ - Part of PR #1042, which added a new primary GEOS library name to be searched
17
+ for, has been reverted by PR #1201.
18
+
19
+ 1.8rc1 (2021-10-04)
20
+ -------------------
21
+
22
+ Deprecations:
23
+
24
+ The almost_exact() method of BaseGeometry has been deprecated. It is confusing
25
+ and will be removed in 2.0.0. The equals_exact() method is to be used instead.
26
+
27
+ Bug fixes:
28
+
29
+ - We ensure that the _speedups module is always imported before _vectorized to
30
+ avoid an unexplained condition on Windows with Python 3.8 and 3.9 (#1184).
31
+
4
32
  1.8a3 (2021-08-24)
5
33
  ------------------
6
34
 
@@ -47,13 +75,18 @@ Bug fixes:
47
75
  geometry are avoided by never passing an empty geometry (#1134).
48
76
  - Python's builtin super() is now used only as described in PEP 3135 (#1109).
49
77
  - Only load conda GEOS dll if it exists (on Windows) (#1108).
78
+ - Add /opt/homebrew/lib to the list of directories to be searched for the GEOS
79
+ shared library.
80
+ - Added new library search path to assist app creation with cx_Freeze.
50
81
 
51
82
  1.8a1 (2021-03-03)
52
83
  ------------------
53
84
 
54
85
  Shapely 1.8.0 will be a transitional version. There are a few bug fixes and new
55
86
  features, but it is mainly about warning of the upcoming changes in 2.0.0.
56
- Several more pre-releases before 1.8.0 are expected.
87
+ Several more pre-releases before 1.8.0 are expected. See the migration guide
88
+ to Shapely 1.8 / 2.0 for more details on how to update your code
89
+ (https://shapely.readthedocs.io/en/latest/migration.html).
57
90
 
58
91
  Python version support:
59
92
 
@@ -66,9 +99,9 @@ version 2.0.0.
66
99
 
67
100
  - ops.cascaded_union
68
101
  - geometry .empty()
69
- - geometry .to_wkb() and .to_wkt()
70
102
  - geometry .ctypes and .__array_interface__
71
103
  - multi-part geometry .__len__
104
+ - setting custom attributes on geometry objects
72
105
 
73
106
  Geometry objects will become immutable in version 2.0.0.
74
107
 
@@ -78,6 +111,9 @@ not yet decided, but will be decided before 1.8.0 is released.
78
111
  Deprecation warnings will be emitted in 1.8a1 when any of these features are
79
112
  used.
80
113
 
114
+ The deprecated .to_wkb() and .to_wkt() methods on the geometry objects have
115
+ been removed.
116
+
81
117
  New features:
82
118
 
83
119
  - Add a normalize() method to geometry classes, exposing the GEOSNormalize
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Shapely
3
- Version: 1.8a3
3
+ Version: 1.8rc2
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/Toblerity/Shapely
6
6
  Author: Sean Gillies
@@ -296,6 +296,34 @@ Description: =======
296
296
  Changes
297
297
  =======
298
298
 
299
+ 1.8rc2 (2021-10-19)
300
+ -------------------
301
+
302
+ Build:
303
+
304
+ A pyproject.toml file has been added to specify build dependencies for the
305
+ _vectorized and _speedups modules (#1128). To install shapely without these
306
+ build dependencies, use the features of your build tool that disable PEP 517
307
+ and 518 support.
308
+
309
+ Bug fixes:
310
+
311
+ - Part of PR #1042, which added a new primary GEOS library name to be searched
312
+ for, has been reverted by PR #1201.
313
+
314
+ 1.8rc1 (2021-10-04)
315
+ -------------------
316
+
317
+ Deprecations:
318
+
319
+ The almost_exact() method of BaseGeometry has been deprecated. It is confusing
320
+ and will be removed in 2.0.0. The equals_exact() method is to be used instead.
321
+
322
+ Bug fixes:
323
+
324
+ - We ensure that the _speedups module is always imported before _vectorized to
325
+ avoid an unexplained condition on Windows with Python 3.8 and 3.9 (#1184).
326
+
299
327
  1.8a3 (2021-08-24)
300
328
  ------------------
301
329
 
@@ -342,13 +370,18 @@ Description: =======
342
370
  geometry are avoided by never passing an empty geometry (#1134).
343
371
  - Python's builtin super() is now used only as described in PEP 3135 (#1109).
344
372
  - Only load conda GEOS dll if it exists (on Windows) (#1108).
373
+ - Add /opt/homebrew/lib to the list of directories to be searched for the GEOS
374
+ shared library.
375
+ - Added new library search path to assist app creation with cx_Freeze.
345
376
 
346
377
  1.8a1 (2021-03-03)
347
378
  ------------------
348
379
 
349
380
  Shapely 1.8.0 will be a transitional version. There are a few bug fixes and new
350
381
  features, but it is mainly about warning of the upcoming changes in 2.0.0.
351
- Several more pre-releases before 1.8.0 are expected.
382
+ Several more pre-releases before 1.8.0 are expected. See the migration guide
383
+ to Shapely 1.8 / 2.0 for more details on how to update your code
384
+ (https://shapely.readthedocs.io/en/latest/migration.html).
352
385
 
353
386
  Python version support:
354
387
 
@@ -361,9 +394,9 @@ Description: =======
361
394
 
362
395
  - ops.cascaded_union
363
396
  - geometry .empty()
364
- - geometry .to_wkb() and .to_wkt()
365
397
  - geometry .ctypes and .__array_interface__
366
398
  - multi-part geometry .__len__
399
+ - setting custom attributes on geometry objects
367
400
 
368
401
  Geometry objects will become immutable in version 2.0.0.
369
402
 
@@ -373,6 +406,9 @@ Description: =======
373
406
  Deprecation warnings will be emitted in 1.8a1 when any of these features are
374
407
  used.
375
408
 
409
+ The deprecated .to_wkb() and .to_wkt() methods on the geometry objects have
410
+ been removed.
411
+
376
412
  New features:
377
413
 
378
414
  - Add a normalize() method to geometry classes, exposing the GEOSNormalize
@@ -1126,6 +1162,6 @@ Classifier: Programming Language :: Python :: 3.8
1126
1162
  Classifier: Programming Language :: Python :: 3.9
1127
1163
  Classifier: Topic :: Scientific/Engineering :: GIS
1128
1164
  Requires-Python: >=3.6
1129
- Provides-Extra: test
1130
1165
  Provides-Extra: all
1166
+ Provides-Extra: test
1131
1167
  Provides-Extra: vectorized
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Shapely
3
- Version: 1.8a3
3
+ Version: 1.8rc2
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/Toblerity/Shapely
6
6
  Author: Sean Gillies
@@ -296,6 +296,34 @@ Description: =======
296
296
  Changes
297
297
  =======
298
298
 
299
+ 1.8rc2 (2021-10-19)
300
+ -------------------
301
+
302
+ Build:
303
+
304
+ A pyproject.toml file has been added to specify build dependencies for the
305
+ _vectorized and _speedups modules (#1128). To install shapely without these
306
+ build dependencies, use the features of your build tool that disable PEP 517
307
+ and 518 support.
308
+
309
+ Bug fixes:
310
+
311
+ - Part of PR #1042, which added a new primary GEOS library name to be searched
312
+ for, has been reverted by PR #1201.
313
+
314
+ 1.8rc1 (2021-10-04)
315
+ -------------------
316
+
317
+ Deprecations:
318
+
319
+ The almost_exact() method of BaseGeometry has been deprecated. It is confusing
320
+ and will be removed in 2.0.0. The equals_exact() method is to be used instead.
321
+
322
+ Bug fixes:
323
+
324
+ - We ensure that the _speedups module is always imported before _vectorized to
325
+ avoid an unexplained condition on Windows with Python 3.8 and 3.9 (#1184).
326
+
299
327
  1.8a3 (2021-08-24)
300
328
  ------------------
301
329
 
@@ -342,13 +370,18 @@ Description: =======
342
370
  geometry are avoided by never passing an empty geometry (#1134).
343
371
  - Python's builtin super() is now used only as described in PEP 3135 (#1109).
344
372
  - Only load conda GEOS dll if it exists (on Windows) (#1108).
373
+ - Add /opt/homebrew/lib to the list of directories to be searched for the GEOS
374
+ shared library.
375
+ - Added new library search path to assist app creation with cx_Freeze.
345
376
 
346
377
  1.8a1 (2021-03-03)
347
378
  ------------------
348
379
 
349
380
  Shapely 1.8.0 will be a transitional version. There are a few bug fixes and new
350
381
  features, but it is mainly about warning of the upcoming changes in 2.0.0.
351
- Several more pre-releases before 1.8.0 are expected.
382
+ Several more pre-releases before 1.8.0 are expected. See the migration guide
383
+ to Shapely 1.8 / 2.0 for more details on how to update your code
384
+ (https://shapely.readthedocs.io/en/latest/migration.html).
352
385
 
353
386
  Python version support:
354
387
 
@@ -361,9 +394,9 @@ Description: =======
361
394
 
362
395
  - ops.cascaded_union
363
396
  - geometry .empty()
364
- - geometry .to_wkb() and .to_wkt()
365
397
  - geometry .ctypes and .__array_interface__
366
398
  - multi-part geometry .__len__
399
+ - setting custom attributes on geometry objects
367
400
 
368
401
  Geometry objects will become immutable in version 2.0.0.
369
402
 
@@ -373,6 +406,9 @@ Description: =======
373
406
  Deprecation warnings will be emitted in 1.8a1 when any of these features are
374
407
  used.
375
408
 
409
+ The deprecated .to_wkb() and .to_wkt() methods on the geometry objects have
410
+ been removed.
411
+
376
412
  New features:
377
413
 
378
414
  - Add a normalize() method to geometry classes, exposing the GEOSNormalize
@@ -1126,6 +1162,6 @@ Classifier: Programming Language :: Python :: 3.8
1126
1162
  Classifier: Programming Language :: Python :: 3.9
1127
1163
  Classifier: Topic :: Scientific/Engineering :: GIS
1128
1164
  Requires-Python: >=3.6
1129
- Provides-Extra: test
1130
1165
  Provides-Extra: all
1166
+ Provides-Extra: test
1131
1167
  Provides-Extra: vectorized
@@ -23,6 +23,7 @@ _vendor/packaging/version.py
23
23
  docs/design.rst
24
24
  docs/index.rst
25
25
  docs/manual.rst
26
+ docs/migration.rst
26
27
  docs/project.rst
27
28
  shapely/__init__.py
28
29
  shapely/_buildcfg.py
@@ -53,6 +54,7 @@ shapely/examples/intersect.py
53
54
  shapely/geometry/__init__.py
54
55
  shapely/geometry/base.py
55
56
  shapely/geometry/collection.py
57
+ shapely/geometry/conftest.py
56
58
  shapely/geometry/geo.py
57
59
  shapely/geometry/linestring.py
58
60
  shapely/geometry/multilinestring.py
@@ -0,0 +1 @@
1
+ 1.8rc2
@@ -11,6 +11,7 @@ Documentation Contents
11
11
  The Project <project>
12
12
  User Manual <manual>
13
13
  API Documentation <modules>
14
+ migration
14
15
 
15
16
  Indices and tables
16
17
  ==================
@@ -2787,6 +2787,8 @@ All of Shapely's geometry types are supported by these functions.
2787
2787
  >>> wkt.dumps(pt, trim=True)
2788
2788
  'POINT (0 0)'
2789
2789
 
2790
+ .. _array-interface:
2791
+
2790
2792
  Numpy and Python Arrays
2791
2793
  -----------------------
2792
2794
 
@@ -0,0 +1,348 @@
1
+ .. _migration:
2
+
3
+ ==============================
4
+ Migrating to Shapely 1.8 / 2.0
5
+ ==============================
6
+
7
+ Shapely 1.8.0 is a transitional version introducing several warnings in
8
+ preparation of the upcoming changes in 2.0.0.
9
+
10
+ Shapely 2.0.0 will be a major release with a refactor of the internals with
11
+ considerable performance improvements (based on the developments in the
12
+ `PyGEOS <https://github.com/pygeos/pygeos>`__ package), along with several
13
+ breaking changes.
14
+
15
+ This guide gives an overview of the most important changes with details
16
+ on what will change in 2.0.0, how we warn for this in 1.8.0, and how
17
+ you can update your code to be future-proof.
18
+
19
+ For more background, see
20
+ `RFC 1: Roadmap for Shapely 2.0 <https://github.com/shapely/shapely-rfc/pull/1>`__.
21
+
22
+ .. contents:: Table of Contents
23
+ :backlinks: none
24
+ :local:
25
+
26
+
27
+ Geometry objects will become immutable
28
+ ======================================
29
+
30
+ Geometry objects will become immutable in version 2.0.0.
31
+
32
+ In Shapely 1.x, some of the geometry classes are mutable, meaning that you
33
+ can change their coordinates in-place. Illustrative code::
34
+
35
+ >>> from shapely.geometry import LineString
36
+ >>> line = LineString([(0,0), (2, 2)])
37
+ >>> print(line)
38
+ LINESTRING (0 0, 2 2)
39
+
40
+ >>> line.coords = [(0, 0), (10, 0), (10, 10)]
41
+ >>> print(line)
42
+ LINESTRING (0 0, 10 0, 10 10)
43
+
44
+ In Shapely 1.8, this will start raising a warning::
45
+
46
+ >>> line.coords = [(0, 0), (10, 0), (10, 10)]
47
+ ShapelyDeprecationWarning: Setting the 'coords' to mutate a Geometry
48
+ in place is deprecated, and will not be possible any more in Shapely 2.0
49
+
50
+ and starting with version 2.0.0, all geometry objects will become immutable.
51
+ As a consequence, they will also become hashable and therefore usable as, for
52
+ example, dictionary keys.
53
+
54
+ **How do I update my code?** There is no direct alternative for mutating the
55
+ coordinates of an existing geometry, except for creating a new geometry
56
+ object with the new coordinates.
57
+
58
+
59
+ Setting custom attributes
60
+ -------------------------
61
+
62
+ Another consequence of the geometry objects becoming immutable is that
63
+ assigning custom attributes, which currently works, will no longer be possible.
64
+
65
+ Currently you can do::
66
+
67
+ >>> line.name = "my_geometry"
68
+ >>> line.name
69
+ 'my_geometry'
70
+
71
+ In Shapely 1.8, this will start raising a warning, and will raise an
72
+ AttributeError in Shapely 2.0.
73
+
74
+ **How do I update my code?** There is no direct alternative for adding custom
75
+ attributes to geometry objects. You can use other Python data structures such as
76
+ (GeoJSON-like) dictionaries or GeoPandas' GeoDataFrames to store attributes
77
+ alongside geometry features.
78
+
79
+ Multi-part geometries will no longer be "sequences" (length, iterable, indexable)
80
+ =================================================================================
81
+
82
+ In Shapely 1.x, multi-part geometries (MultiPoint, MultiLineString,
83
+ MultiPolygon and GeometryCollection) implement a part of the "sequence"
84
+ python interface (making them list-like). This means you can iterate through
85
+ the object to get the parts, index into the object to get a specific part,
86
+ and ask for the number of parts with the ``len()`` method.
87
+
88
+ Some examples of this with Shapely 1.x:
89
+
90
+ >>> from shapely.geometry import Point, MultiPoint
91
+ >>> mp = MultiPoint([(1, 1), (2, 2), (3, 3)])
92
+ >>> print(mp)
93
+ MULTIPOINT (1 1, 2 2, 3 3)
94
+ >>> for part in mp:
95
+ ... print(part)
96
+ POINT (1 1)
97
+ POINT (2 2)
98
+ POINT (3 3)
99
+ >>> print(mp[1])
100
+ POINT (2 2)
101
+ >>> len(mp)
102
+ 3
103
+ >>> list(mp)
104
+ [<shapely.geometry.point.Point at 0x7f2e0912bf10>,
105
+ <shapely.geometry.point.Point at 0x7f2e09fed820>,
106
+ <shapely.geometry.point.Point at 0x7f2e09fed4c0>]
107
+
108
+ Starting with Shapely 1.8, all the examples above will start raising a
109
+ deprecation warning. For example:
110
+
111
+ >>> for part in mp:
112
+ ... print(part)
113
+ ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated
114
+ and will be removed in Shapely 2.0. Use the `geoms` property to access the
115
+ constituent parts of a multi-part geometry.
116
+ POINT (1 1)
117
+ POINT (2 2)
118
+ POINT (3 3)
119
+
120
+ In Shapely 2.0, all those examples will raise an error.
121
+
122
+ **How do I update my code?** To access the geometry parts of a multi-part
123
+ geometry, you can use the ``.geoms`` attribute, as the warning indicates.
124
+
125
+ The examples above can be updated to::
126
+
127
+ >>> for part in mp.geoms:
128
+ ... print(part)
129
+ POINT (1 1)
130
+ POINT (2 2)
131
+ POINT (3 3)
132
+ >>> print(mp.geoms[1])
133
+ POINT (2 2)
134
+ >>> len(mp.geoms)
135
+ 3
136
+ >>> list(mp.geoms)
137
+ [<shapely.geometry.point.Point at 0x7f2e0912bf10>,
138
+ <shapely.geometry.point.Point at 0x7f2e09fed820>,
139
+ <shapely.geometry.point.Point at 0x7f2e09fed4c0>]
140
+
141
+ The single-part geometries (Point, LineString, Polygon) already didn't
142
+ support those features, and for those classes there is no change in behaviour
143
+ for this aspect.
144
+
145
+
146
+ Interopability with NumPy and the array interface
147
+ =================================================
148
+
149
+ Conversion of the coordinates to (NumPy) arrays
150
+ -----------------------------------------------
151
+
152
+ Shapely provides an array interface to have easy access to the coordinates as,
153
+ for example, NumPy arrays (:ref:`manual section <array-interface>`).
154
+
155
+ A small example::
156
+
157
+ >>> line = LineString([(0, 0), (1, 1), (2, 2)])
158
+ >>> import numpy as np
159
+ >>> np.asarray(line)
160
+ array([[0., 0.],
161
+ [1., 1.],
162
+ [2., 2.]])
163
+
164
+ In addition, there are also the explicit ``array_interface()`` method and
165
+ ``ctypes`` attribute to get access to the coordinates as array data:
166
+
167
+ >>> line.ctypes
168
+ <shapely.geometry.linestring.c_double_Array_6 at 0x7f75261eb740>
169
+ >>> line.array_interface()
170
+ {'version': 3,
171
+ 'typestr': '<f8',
172
+ 'data': <shapely.geometry.linestring.c_double_Array_6 at 0x7f752664ae40>,
173
+ 'shape': (3, 2)}
174
+
175
+ This functionality is available for Point, LineString, LinearRing and MultiPoint.
176
+
177
+ For more robust interoperability with NumPy, this array interface will be removed
178
+ from those geometry classes, and limited to the ``coords``.
179
+
180
+ Starting with Shapely 1.8, converting a geometry object to a NumPy array
181
+ directly will start raising a warning::
182
+
183
+ >>> np.asarray(line)
184
+ ShapelyDeprecationWarning: The array interface is deprecated and will no longer
185
+ work in Shapely 2.0. Convert the '.coords' to a NumPy array instead.
186
+ array([[0., 0.],
187
+ [1., 1.],
188
+ [2., 2.]])
189
+
190
+ **How do I update my code?** To convert a geometry to a NumPy array, you can
191
+ convert the ``.coords`` attribute instead::
192
+
193
+ >>> line.coords
194
+ <shapely.coords.CoordinateSequence at 0x7f2e09e88d60>
195
+ >>> np.array(line.coords)
196
+ array([[0., 0.],
197
+ [1., 1.],
198
+ [2., 2.]])
199
+
200
+ The ``array_interface()`` method and ``ctypes`` attribute will be removed in
201
+ Shapely 2.0, but since Shapely will start requiring NumPy as a dependency,
202
+ you can use NumPy or its array interface directly. Check the NumPy docs on
203
+ the :py:attr:`ctypes <numpy:numpy.ndarray.ctypes>` attribute
204
+ or the :ref:`array interface <numpy:arrays.interface>` for more details.
205
+
206
+ Creating NumPy arrays of geometry objects
207
+ -----------------------------------------
208
+
209
+ Shapely geometry objects can be stored in NumPy arrays using the ``object``
210
+ dtype. In general, one could create such an array from a list of geometries
211
+ as follows::
212
+
213
+ >>> from shapely.geometry import Point
214
+ >>> arr = np.array([Point(0, 0), Point(1, 1), Point(2, 2)])
215
+ >>> arr
216
+ array([<shapely.geometry.point.Point object at 0x7fb798407cd0>,
217
+ <shapely.geometry.point.Point object at 0x7fb7982831c0>,
218
+ <shapely.geometry.point.Point object at 0x7fb798283b80>],
219
+ dtype=object)
220
+
221
+ The above works for point geometries, but because in Shapely 1.x, some
222
+ geometry types are sequence-like (see above), NumPy can try to "unpack" them
223
+ when creating an array. Therefore, for more robust creation of a NumPy array
224
+ from a list of geometries, it's generally recommended to this in a two-step
225
+ way (first creating an empty array and then filling it)::
226
+
227
+ geoms = [Point(0, 0), Point(1, 1), Point(2, 2)]
228
+ arr = np.empty(len(geoms), dtype="object")
229
+ arr[:] = geoms
230
+
231
+ This code snippet results in the same array as the example above, and works
232
+ for all geometry types and Shapely/NumPy versions.
233
+
234
+ However, starting with Shapely 1.8, the above code will show deprecation
235
+ warnings that cannot be avoided (depending on the geometry type, NumPy tries
236
+ to access the array interface of the objects or check if an object is
237
+ iterable or has a length, and those operations are all deprecated now. The
238
+ end result is still correct, but the warnings appear nonetheless).
239
+ Specifically in this case, it is fine to ignore those warnings (and the only
240
+ way to make them go away)::
241
+
242
+ import warnings
243
+ from shapely.errors import ShapelyDeprecationWarning
244
+
245
+ geoms = [Point(0, 0), Point(1, 1), Point(2, 2)]
246
+ arr = np.empty(len(geoms), dtype="object")
247
+
248
+ with warnings.catch_warnings():
249
+ warnings.filterwarnings("ignore", category=ShapelyDeprecationWarning)
250
+ arr[:] = geoms
251
+
252
+ In Shapely 2.0, the geometry objects will no longer be sequence like and
253
+ those deprecation warnings will be removed (and thus the ``filterwarnings``
254
+ will no longer be necessary), and creation of NumPy arrays will generally be
255
+ more robust.
256
+
257
+ If you maintain code that depends on Shapely, and you want to have it work
258
+ with multiple versions of Shapely, the above code snippet provides a context
259
+ manager that can be copied into your project::
260
+
261
+ import contextlib
262
+ import shapely
263
+ import warnings
264
+ from distutils.version import LooseVersion
265
+
266
+ SHAPELY_GE_20 = str(shapely.__version__) >= LooseVersion("2.0")
267
+
268
+ try:
269
+ from shapely.errors import ShapelyDeprecationWarning as shapely_warning
270
+ except ImportError:
271
+ shapely_warning = None
272
+
273
+ if shapely_warning is not None and not SHAPELY_GE_20:
274
+ @contextlib.contextmanager
275
+ def ignore_shapely2_warnings():
276
+ with warnings.catch_warnings():
277
+ warnings.filterwarnings("ignore", category=shapely_warning)
278
+ yield
279
+ else:
280
+ @contextlib.contextmanager
281
+ def ignore_shapely2_warnings():
282
+ yield
283
+
284
+ This can then be used when creating NumPy arrays (be careful to *only* use it
285
+ for this specific purpose, and not generally suppress those warnings)::
286
+
287
+ geoms = [...]
288
+ arr = np.empty(len(geoms), dtype="object")
289
+ with ignore_shapely2_warnings():
290
+ arr[:] = geoms
291
+
292
+
293
+ Consistent creation of empty geometries
294
+ =======================================
295
+
296
+ Shapely 1.x is inconsistent in creating empty geometries between various
297
+ creation methods. A small example for an empty Polygon geometry:
298
+
299
+ .. code-block:: python
300
+
301
+ # Using an empty constructor results in a GeometryCollection
302
+ >>> from shapely.geometry import Polygon
303
+ >>> g1 = Polygon()
304
+ >>> type(g1)
305
+ <class 'shapely.geometry.polygon.Polygon'>
306
+ >>> g1.wkt
307
+ GEOMETRYCOLLECTION EMPTY
308
+
309
+ # Converting from WKT gives a correct empty polygon
310
+ >>> from shapely import wkt
311
+ >>> g2 = wkt.loads("POLYGON EMPTY")
312
+ >>> type(g2)
313
+ <class 'shapely.geometry.polygon.Polygon'>
314
+ >>> g2.wkt
315
+ POLYGON EMPTY
316
+
317
+ Shapely 1.8 does not yet change this inconsistent behaviour, but starting
318
+ with Shapely 2.0, the different methods will always consistently give an
319
+ empty geometry object of the correct type, instead of using an empty
320
+ GeometryCollection as "generic" empty geometry object.
321
+
322
+ **How do I update my code?** Those cases that will change don't raise a
323
+ warning, but you will need to update your code if you rely on the fact that
324
+ empty geometry objects are of the GeometryCollection type. Use the
325
+ ``.is_empty`` attribute for robustly checking if a geometry object is an
326
+ empty geometry.
327
+
328
+ In addition, the WKB serialization methods will start supporting empty
329
+ Points (using ``"POINT (NaN NaN)"`` to represent an empty point).
330
+
331
+
332
+ Other deprecated functionality
333
+ ==============================
334
+
335
+ There are some other various functions and methods deprecated in Shapely 1.8
336
+ as well:
337
+
338
+ - The adapters to create geometry-like proxy objects with coordinates stored
339
+ outside Shapely geometries are deprecated and will be removed in Shapely
340
+ 2.0 (e.g. created using ``asShape()``). They have little to no benefit
341
+ compared to the normal geometry classes, as thus you can convert to your
342
+ data to a normal geometry object instead. Use the ``shape()`` function
343
+ instead to convert a GeoJSON-like dict to a Shapely geometry.
344
+
345
+ - The ``empty()`` method on a geometry object is deprecated.
346
+
347
+ - The ``shapely.ops.cascaded_union`` function is deprecated. Use
348
+ ``shapely.ops.unary_union`` instead, which internally already uses a cascaded union operation for better performance.
@@ -0,0 +1 @@
1
+ __version__ = "1.8rc2"
@@ -181,8 +181,10 @@ elif sys.platform == 'darwin':
181
181
  "/Library/Frameworks/GEOS.framework/Versions/Current/GEOS",
182
182
  # macports
183
183
  '/opt/local/lib/libgeos_c.dylib',
184
- # homebrew
184
+ # homebrew Intel
185
185
  '/usr/local/lib/libgeos_c.dylib',
186
+ # homebrew Apple Silicon
187
+ '/opt/homebrew/lib/libgeos_c.dylib',
186
188
  ]
187
189
  lgeos = load_dll('geos_c', fallbacks=alt_paths)
188
190