shapely 2.0.6__cp313-cp313-win32.whl

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 (139) hide show
  1. shapely/__init__.py +45 -0
  2. shapely/_enum.py +23 -0
  3. shapely/_geometry.py +875 -0
  4. shapely/_geometry_helpers.cp313-win32.pyd +0 -0
  5. shapely/_geos.cp313-win32.pyd +0 -0
  6. shapely/_geos.pxd +51 -0
  7. shapely/_pygeos_api.pxd +35 -0
  8. shapely/_ragged_array.py +453 -0
  9. shapely/_version.py +21 -0
  10. shapely/affinity.py +266 -0
  11. shapely/algorithms/__init__.py +0 -0
  12. shapely/algorithms/_oriented_envelope.py +58 -0
  13. shapely/algorithms/cga.py +24 -0
  14. shapely/algorithms/polylabel.py +139 -0
  15. shapely/constructive.py +1070 -0
  16. shapely/coordinates.py +198 -0
  17. shapely/coords.py +67 -0
  18. shapely/creation.py +555 -0
  19. shapely/decorators.py +82 -0
  20. shapely/errors.py +81 -0
  21. shapely/geometry/__init__.py +28 -0
  22. shapely/geometry/base.py +1023 -0
  23. shapely/geometry/collection.py +58 -0
  24. shapely/geometry/conftest.py +10 -0
  25. shapely/geometry/geo.py +135 -0
  26. shapely/geometry/linestring.py +188 -0
  27. shapely/geometry/multilinestring.py +93 -0
  28. shapely/geometry/multipoint.py +95 -0
  29. shapely/geometry/multipolygon.py +126 -0
  30. shapely/geometry/point.py +145 -0
  31. shapely/geometry/polygon.py +355 -0
  32. shapely/geos.py +8 -0
  33. shapely/io.py +372 -0
  34. shapely/lib.cp313-win32.pyd +0 -0
  35. shapely/linear.py +203 -0
  36. shapely/measurement.py +326 -0
  37. shapely/ops.py +738 -0
  38. shapely/plotting.py +217 -0
  39. shapely/predicates.py +1155 -0
  40. shapely/prepared.py +77 -0
  41. shapely/set_operations.py +509 -0
  42. shapely/speedups.py +36 -0
  43. shapely/strtree.py +544 -0
  44. shapely/testing.py +204 -0
  45. shapely/tests/__init__.py +0 -0
  46. shapely/tests/common.py +125 -0
  47. shapely/tests/geometry/__init__.py +0 -0
  48. shapely/tests/geometry/test_collection.py +82 -0
  49. shapely/tests/geometry/test_coords.py +102 -0
  50. shapely/tests/geometry/test_decimal.py +117 -0
  51. shapely/tests/geometry/test_emptiness.py +98 -0
  52. shapely/tests/geometry/test_equality.py +237 -0
  53. shapely/tests/geometry/test_format.py +116 -0
  54. shapely/tests/geometry/test_geometry_base.py +246 -0
  55. shapely/tests/geometry/test_hash.py +28 -0
  56. shapely/tests/geometry/test_linestring.py +213 -0
  57. shapely/tests/geometry/test_multi.py +11 -0
  58. shapely/tests/geometry/test_multilinestring.py +78 -0
  59. shapely/tests/geometry/test_multipoint.py +78 -0
  60. shapely/tests/geometry/test_multipolygon.py +134 -0
  61. shapely/tests/geometry/test_point.py +188 -0
  62. shapely/tests/geometry/test_polygon.py +463 -0
  63. shapely/tests/legacy/__init__.py +10 -0
  64. shapely/tests/legacy/conftest.py +21 -0
  65. shapely/tests/legacy/test_affinity.py +311 -0
  66. shapely/tests/legacy/test_box.py +20 -0
  67. shapely/tests/legacy/test_buffer.py +172 -0
  68. shapely/tests/legacy/test_cga.py +51 -0
  69. shapely/tests/legacy/test_clip_by_rect.py +120 -0
  70. shapely/tests/legacy/test_create_inconsistent_dimensionality.py +214 -0
  71. shapely/tests/legacy/test_delaunay.py +32 -0
  72. shapely/tests/legacy/test_empty_polygons.py +22 -0
  73. shapely/tests/legacy/test_equality.py +32 -0
  74. shapely/tests/legacy/test_geointerface.py +118 -0
  75. shapely/tests/legacy/test_invalid_geometries.py +28 -0
  76. shapely/tests/legacy/test_linear_referencing.py +72 -0
  77. shapely/tests/legacy/test_linemerge.py +44 -0
  78. shapely/tests/legacy/test_locale.py +56 -0
  79. shapely/tests/legacy/test_make_valid.py +18 -0
  80. shapely/tests/legacy/test_mapping.py +14 -0
  81. shapely/tests/legacy/test_minimum_clearance.py +40 -0
  82. shapely/tests/legacy/test_ndarrays.py +42 -0
  83. shapely/tests/legacy/test_nearest.py +18 -0
  84. shapely/tests/legacy/test_operations.py +122 -0
  85. shapely/tests/legacy/test_operators.py +60 -0
  86. shapely/tests/legacy/test_orient.py +64 -0
  87. shapely/tests/legacy/test_parallel_offset.py +60 -0
  88. shapely/tests/legacy/test_persist.py +51 -0
  89. shapely/tests/legacy/test_pickle.py +84 -0
  90. shapely/tests/legacy/test_polygonize.py +44 -0
  91. shapely/tests/legacy/test_polylabel.py +97 -0
  92. shapely/tests/legacy/test_predicates.py +99 -0
  93. shapely/tests/legacy/test_prepared.py +62 -0
  94. shapely/tests/legacy/test_products_z.py +13 -0
  95. shapely/tests/legacy/test_shape.py +48 -0
  96. shapely/tests/legacy/test_shared_paths.py +45 -0
  97. shapely/tests/legacy/test_singularity.py +15 -0
  98. shapely/tests/legacy/test_snap.py +25 -0
  99. shapely/tests/legacy/test_split.py +249 -0
  100. shapely/tests/legacy/test_substring.py +220 -0
  101. shapely/tests/legacy/test_svg.py +213 -0
  102. shapely/tests/legacy/test_transform.py +80 -0
  103. shapely/tests/legacy/test_union.py +70 -0
  104. shapely/tests/legacy/test_validation.py +9 -0
  105. shapely/tests/legacy/test_vectorized.py +105 -0
  106. shapely/tests/legacy/test_voronoi_diagram.py +146 -0
  107. shapely/tests/legacy/test_wkb.py +193 -0
  108. shapely/tests/legacy/test_wkt.py +61 -0
  109. shapely/tests/legacy/threading_test.py +44 -0
  110. shapely/tests/test_constructive.py +1008 -0
  111. shapely/tests/test_coordinates.py +266 -0
  112. shapely/tests/test_creation.py +594 -0
  113. shapely/tests/test_creation_indices.py +418 -0
  114. shapely/tests/test_geometry.py +738 -0
  115. shapely/tests/test_io.py +735 -0
  116. shapely/tests/test_linear.py +212 -0
  117. shapely/tests/test_measurement.py +355 -0
  118. shapely/tests/test_misc.py +195 -0
  119. shapely/tests/test_plotting.py +103 -0
  120. shapely/tests/test_predicates.py +331 -0
  121. shapely/tests/test_ragged_array.py +399 -0
  122. shapely/tests/test_set_operations.py +444 -0
  123. shapely/tests/test_strtree.py +1986 -0
  124. shapely/tests/test_testing.py +103 -0
  125. shapely/validation.py +55 -0
  126. shapely/vectorized/__init__.py +75 -0
  127. shapely/wkb.py +64 -0
  128. shapely/wkt.py +87 -0
  129. shapely-2.0.6.dist-info/DELVEWHEEL +2 -0
  130. shapely-2.0.6.dist-info/LICENSE.txt +29 -0
  131. shapely-2.0.6.dist-info/LICENSE_GEOS +509 -0
  132. shapely-2.0.6.dist-info/LICENSE_win32 +26 -0
  133. shapely-2.0.6.dist-info/METADATA +213 -0
  134. shapely-2.0.6.dist-info/RECORD +139 -0
  135. shapely-2.0.6.dist-info/WHEEL +5 -0
  136. shapely-2.0.6.dist-info/top_level.txt +1 -0
  137. shapely.libs/geos-a3a05dc983163e2b8353063560e3ca73.dll +0 -0
  138. shapely.libs/geos_c-8ccb72d2f97740c7d67333b351476cca.dll +0 -0
  139. shapely.libs/msvcp140-1b8ff212448d9fd66140c074af59e52c.dll +0 -0
shapely/__init__.py ADDED
@@ -0,0 +1,45 @@
1
+ """""" # start delvewheel patch
2
+ def _delvewheel_patch_1_8_0():
3
+ import os
4
+ libs_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'shapely.libs'))
5
+ if os.path.isdir(libs_dir):
6
+ os.add_dll_directory(libs_dir)
7
+
8
+
9
+ _delvewheel_patch_1_8_0()
10
+ del _delvewheel_patch_1_8_0
11
+ # end delvewheel patch
12
+
13
+ from shapely.lib import GEOSException # NOQA
14
+ from shapely.lib import Geometry # NOQA
15
+ from shapely.lib import geos_version, geos_version_string # NOQA
16
+ from shapely.lib import geos_capi_version, geos_capi_version_string # NOQA
17
+ from shapely.errors import setup_signal_checks # NOQA
18
+ from shapely._geometry import * # NOQA
19
+ from shapely.creation import * # NOQA
20
+ from shapely.constructive import * # NOQA
21
+ from shapely.predicates import * # NOQA
22
+ from shapely.measurement import * # NOQA
23
+ from shapely.set_operations import * # NOQA
24
+ from shapely.linear import * # NOQA
25
+ from shapely.coordinates import * # NOQA
26
+ from shapely.strtree import * # NOQA
27
+ from shapely.io import * # NOQA
28
+
29
+ # Submodule always needs to be imported to ensure Geometry subclasses are registered
30
+ from shapely.geometry import ( # NOQA
31
+ Point,
32
+ LineString,
33
+ Polygon,
34
+ MultiPoint,
35
+ MultiLineString,
36
+ MultiPolygon,
37
+ GeometryCollection,
38
+ LinearRing,
39
+ )
40
+
41
+ from shapely import _version
42
+
43
+ __version__ = _version.get_versions()["version"]
44
+
45
+ setup_signal_checks()
shapely/_enum.py ADDED
@@ -0,0 +1,23 @@
1
+ from enum import IntEnum
2
+
3
+
4
+ class ParamEnum(IntEnum):
5
+ """Wraps IntEnum to provide validation of a requested item.
6
+
7
+ Intended for enums used for function parameters.
8
+
9
+ Use enum.get_value(item) for this behavior instead of builtin enum[item].
10
+ """
11
+
12
+ @classmethod
13
+ def get_value(cls, item):
14
+ """Validate incoming item and raise a ValueError with valid options if not present."""
15
+ try:
16
+ return cls[item].value
17
+ except KeyError:
18
+ valid_options = {e.name for e in cls}
19
+ raise ValueError(
20
+ "'{}' is not a valid option, must be one of '{}'".format(
21
+ item, "', '".join(valid_options)
22
+ )
23
+ )