shapely 2.0.6__tar.gz → 2.0.7__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.
- {shapely-2.0.6 → shapely-2.0.7}/CHANGES.txt +12 -0
- {shapely-2.0.6 → shapely-2.0.7}/CITATION.cff +2 -2
- {shapely-2.0.6 → shapely-2.0.7}/PKG-INFO +3 -8
- {shapely-2.0.6 → shapely-2.0.7}/README.rst +0 -6
- {shapely-2.0.6 → shapely-2.0.7}/pyproject.toml +1 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/_version.py +3 -3
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/base.py +6 -2
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_geometry_base.py +38 -3
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_io.py +55 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely.egg-info/PKG-INFO +3 -8
- {shapely-2.0.6 → shapely-2.0.7}/src/pygeom.c +10 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/ufuncs.c +1 -1
- {shapely-2.0.6 → shapely-2.0.7}/CREDITS.txt +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/LICENSE.txt +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/constructive.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/coordinates.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/creation.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/design.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/geometry.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/index.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/installation.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/io.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/linear.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/manual.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/measurement.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/migration.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/migration_pygeos.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/predicates.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/properties.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/release.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/set_operations.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/strtree.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/docs/testing.rst +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/setup.cfg +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/setup.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/__init__.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/_enum.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/_geometry.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/_geometry_helpers.pyx +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/_geos.pxd +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/_geos.pyx +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/_pygeos_api.pxd +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/_ragged_array.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/affinity.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/algorithms/__init__.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/algorithms/_oriented_envelope.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/algorithms/cga.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/algorithms/polylabel.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/constructive.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/coordinates.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/coords.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/creation.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/decorators.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/errors.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/__init__.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/collection.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/conftest.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/geo.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/linestring.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/multilinestring.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/multipoint.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/multipolygon.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/point.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geometry/polygon.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/geos.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/io.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/linear.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/measurement.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/ops.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/plotting.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/predicates.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/prepared.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/set_operations.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/speedups.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/strtree.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/testing.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/__init__.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/common.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/__init__.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_collection.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_coords.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_decimal.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_emptiness.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_equality.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_format.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_hash.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_linestring.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_multi.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_multilinestring.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_multipoint.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_multipolygon.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_point.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/geometry/test_polygon.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/__init__.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/conftest.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_affinity.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_box.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_buffer.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_cga.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_clip_by_rect.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_create_inconsistent_dimensionality.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_delaunay.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_empty_polygons.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_equality.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_geointerface.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_invalid_geometries.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_linear_referencing.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_linemerge.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_locale.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_make_valid.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_mapping.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_minimum_clearance.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_ndarrays.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_nearest.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_operations.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_operators.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_orient.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_parallel_offset.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_persist.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_pickle.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_polygonize.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_polylabel.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_predicates.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_prepared.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_products_z.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_shape.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_shared_paths.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_singularity.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_snap.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_split.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_substring.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_svg.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_transform.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_union.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_validation.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_vectorized.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_voronoi_diagram.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_wkb.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_wkt.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/threading_test.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_constructive.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_coordinates.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_creation.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_creation_indices.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_geometry.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_linear.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_measurement.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_misc.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_plotting.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_predicates.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_ragged_array.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_set_operations.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_strtree.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/tests/test_testing.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/validation.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/vectorized/__init__.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/wkb.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely/wkt.py +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely.egg-info/SOURCES.txt +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely.egg-info/dependency_links.txt +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely.egg-info/requires.txt +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/shapely.egg-info/top_level.txt +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/c_api.c +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/c_api.h +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/coords.c +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/coords.h +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/fast_loop_macros.h +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/geos.c +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/geos.h +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/kvec.h +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/lib.c +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/pygeom.h +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/strtree.c +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/strtree.h +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/ufuncs.h +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/vector.c +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/src/vector.h +0 -0
- {shapely-2.0.6 → shapely-2.0.7}/versioneer.py +0 -0
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
2.0.7 (2025-01-30)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
Bug fixes:
|
|
8
|
+
|
|
9
|
+
- Fix compilation error on certain Linux platforms, such as Alpine (#1945).
|
|
10
|
+
- Fixes crash when reading nonlinear geometry types (CircularString,
|
|
11
|
+
CompoundCurve, MultiCurve, CurvePolygon, MultiSurface) from WKB/WKT with
|
|
12
|
+
GEOS >= 3.13; these types are not yet supported in Shapely and now raise a
|
|
13
|
+
``NotImplementedError`` (#2160)
|
|
14
|
+
- Fix the ``project`` method to return a Python float (#2093).
|
|
15
|
+
|
|
4
16
|
2.0.6 (2024-08-19)
|
|
5
17
|
------------------
|
|
6
18
|
|
|
@@ -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.
|
|
6
|
-
date-released: "
|
|
5
|
+
version: "2.0.7"
|
|
6
|
+
date-released: "2025-01-30"
|
|
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
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: shapely
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: Manipulation and analysis of geometric objects
|
|
5
5
|
Author: Sean Gillies
|
|
6
6
|
Maintainer: Shapely contributors
|
|
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
26
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
26
27
|
Requires-Python: >=3.7
|
|
27
28
|
Description-Content-Type: text/x-rst
|
|
@@ -53,12 +54,6 @@ Shapely
|
|
|
53
54
|
:alt: Github Actions status
|
|
54
55
|
:target: https://github.com/shapely/shapely/actions?query=branch%3Amain
|
|
55
56
|
|
|
56
|
-
.. Travis CI status -- https://travis-ci.com
|
|
57
|
-
|
|
58
|
-
.. image:: https://travis-ci.com/shapely/shapely.svg?branch=main
|
|
59
|
-
:alt: Travis CI status
|
|
60
|
-
:target: https://travis-ci.com/github/shapely/shapely
|
|
61
|
-
|
|
62
57
|
.. PyPI
|
|
63
58
|
|
|
64
59
|
.. image:: https://img.shields.io/pypi/v/shapely.svg
|
|
@@ -14,12 +14,6 @@ Shapely
|
|
|
14
14
|
:alt: Github Actions status
|
|
15
15
|
:target: https://github.com/shapely/shapely/actions?query=branch%3Amain
|
|
16
16
|
|
|
17
|
-
.. Travis CI status -- https://travis-ci.com
|
|
18
|
-
|
|
19
|
-
.. image:: https://travis-ci.com/shapely/shapely.svg?branch=main
|
|
20
|
-
:alt: Travis CI status
|
|
21
|
-
:target: https://travis-ci.com/github/shapely/shapely
|
|
22
|
-
|
|
23
17
|
.. PyPI
|
|
24
18
|
|
|
25
19
|
.. image:: https://img.shields.io/pypi/v/shapely.svg
|
|
@@ -39,6 +39,7 @@ classifiers = [
|
|
|
39
39
|
"Programming Language :: Python :: 3.10",
|
|
40
40
|
"Programming Language :: Python :: 3.11",
|
|
41
41
|
"Programming Language :: Python :: 3.12",
|
|
42
|
+
"Programming Language :: Python :: 3.13",
|
|
42
43
|
"Topic :: Scientific/Engineering :: GIS",
|
|
43
44
|
]
|
|
44
45
|
requires-python = ">=3.7"
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "
|
|
11
|
+
"date": "2025-01-30T18:00:49-0700",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.0.
|
|
14
|
+
"full-revisionid": "341209eebf905ad10d3050b67ab495129963dae8",
|
|
15
|
+
"version": "2.0.7"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -830,7 +830,9 @@ class BaseGeometry(shapely.Geometry):
|
|
|
830
830
|
|
|
831
831
|
Alias of `project`.
|
|
832
832
|
"""
|
|
833
|
-
return
|
|
833
|
+
return _maybe_unpack(
|
|
834
|
+
shapely.line_locate_point(self, other, normalized=normalized)
|
|
835
|
+
)
|
|
834
836
|
|
|
835
837
|
def project(self, other, normalized=False):
|
|
836
838
|
"""Returns the distance along this geometry to a point nearest the
|
|
@@ -841,7 +843,9 @@ class BaseGeometry(shapely.Geometry):
|
|
|
841
843
|
|
|
842
844
|
Alias of `line_locate_point`.
|
|
843
845
|
"""
|
|
844
|
-
return
|
|
846
|
+
return _maybe_unpack(
|
|
847
|
+
shapely.line_locate_point(self, other, normalized=normalized)
|
|
848
|
+
)
|
|
845
849
|
|
|
846
850
|
def line_interpolate_point(self, distance, normalized=False):
|
|
847
851
|
"""Return a point at the specified distance along a linear geometry
|
|
@@ -164,6 +164,10 @@ def test_array_argument_binary_predicates(op):
|
|
|
164
164
|
expected = np.array([getattr(polygon, op)(p) for p in points], dtype=bool)
|
|
165
165
|
np.testing.assert_array_equal(result, expected)
|
|
166
166
|
|
|
167
|
+
# check scalar
|
|
168
|
+
result = getattr(polygon, op)(points[0])
|
|
169
|
+
assert type(result) is bool
|
|
170
|
+
|
|
167
171
|
|
|
168
172
|
@pytest.mark.parametrize(
|
|
169
173
|
"op, kwargs",
|
|
@@ -188,6 +192,10 @@ def test_array_argument_binary_predicates2(op, kwargs):
|
|
|
188
192
|
expected = np.array([getattr(polygon, op)(p, **kwargs) for p in points], dtype=bool)
|
|
189
193
|
np.testing.assert_array_equal(result, expected)
|
|
190
194
|
|
|
195
|
+
# check scalar
|
|
196
|
+
result = getattr(polygon, op)(points[0], **kwargs)
|
|
197
|
+
assert type(result) is bool
|
|
198
|
+
|
|
191
199
|
|
|
192
200
|
@pytest.mark.parametrize(
|
|
193
201
|
"op",
|
|
@@ -207,6 +215,10 @@ def test_array_argument_binary_geo(op):
|
|
|
207
215
|
expected = np.array([getattr(box, op)(g) for g in polygons], dtype=object)
|
|
208
216
|
assert_geometries_equal(result, expected)
|
|
209
217
|
|
|
218
|
+
# check scalar
|
|
219
|
+
result = getattr(box, op)(polygons[0])
|
|
220
|
+
assert isinstance(result, (Polygon, MultiPolygon))
|
|
221
|
+
|
|
210
222
|
|
|
211
223
|
@pytest.mark.parametrize("op", ["distance", "hausdorff_distance"])
|
|
212
224
|
def test_array_argument_float(op):
|
|
@@ -218,23 +230,42 @@ def test_array_argument_float(op):
|
|
|
218
230
|
expected = np.array([getattr(polygon, op)(p) for p in points], dtype="float64")
|
|
219
231
|
np.testing.assert_array_equal(result, expected)
|
|
220
232
|
|
|
233
|
+
# check scalar
|
|
234
|
+
result = getattr(polygon, op)(points[0])
|
|
235
|
+
assert type(result) is float
|
|
221
236
|
|
|
222
|
-
|
|
237
|
+
|
|
238
|
+
@pytest.mark.parametrize("op", ["line_interpolate_point", "interpolate"])
|
|
239
|
+
def test_array_argument_linear_point(op):
|
|
223
240
|
line = LineString([(0, 0), (0, 1), (1, 1)])
|
|
224
241
|
distances = np.array([0, 0.5, 1])
|
|
225
|
-
|
|
242
|
+
|
|
243
|
+
result = getattr(line, op)(distances)
|
|
226
244
|
assert isinstance(result, np.ndarray)
|
|
227
245
|
expected = np.array(
|
|
228
246
|
[line.line_interpolate_point(d) for d in distances], dtype=object
|
|
229
247
|
)
|
|
230
248
|
assert_geometries_equal(result, expected)
|
|
231
249
|
|
|
250
|
+
# check scalar
|
|
251
|
+
result = getattr(line, op)(distances[0])
|
|
252
|
+
assert isinstance(result, Point)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
@pytest.mark.parametrize("op", ["line_locate_point", "project"])
|
|
256
|
+
def test_array_argument_linear_float(op):
|
|
257
|
+
line = LineString([(0, 0), (0, 1), (1, 1)])
|
|
232
258
|
points = shapely.points([(0, 0), (0.5, 0.5), (1, 1)])
|
|
233
|
-
|
|
259
|
+
|
|
260
|
+
result = getattr(line, op)(points)
|
|
234
261
|
assert isinstance(result, np.ndarray)
|
|
235
262
|
expected = np.array([line.line_locate_point(p) for p in points], dtype="float64")
|
|
236
263
|
np.testing.assert_array_equal(result, expected)
|
|
237
264
|
|
|
265
|
+
# check scalar
|
|
266
|
+
result = getattr(line, op)(points[0])
|
|
267
|
+
assert type(result) is float
|
|
268
|
+
|
|
238
269
|
|
|
239
270
|
def test_array_argument_buffer():
|
|
240
271
|
point = Point(1, 1)
|
|
@@ -244,3 +275,7 @@ def test_array_argument_buffer():
|
|
|
244
275
|
assert isinstance(result, np.ndarray)
|
|
245
276
|
expected = np.array([point.buffer(d) for d in distances], dtype=object)
|
|
246
277
|
assert_geometries_equal(result, expected)
|
|
278
|
+
|
|
279
|
+
# check scalar
|
|
280
|
+
result = point.buffer(distances[0])
|
|
281
|
+
assert isinstance(result, Polygon)
|
|
@@ -157,6 +157,31 @@ def test_from_wkt_empty(wkt):
|
|
|
157
157
|
assert shapely.to_wkt(geom) == wkt
|
|
158
158
|
|
|
159
159
|
|
|
160
|
+
# WKT from https://github.com/libgeos/geos/blob/main/tests/unit/io/WKBReaderTest.cpp
|
|
161
|
+
@pytest.mark.parametrize(
|
|
162
|
+
"wkt",
|
|
163
|
+
(
|
|
164
|
+
"CIRCULARSTRING(1 3,2 4,3 1)",
|
|
165
|
+
"COMPOUNDCURVE(CIRCULARSTRING(1 3,2 4,3 1),(3 1,0 0))",
|
|
166
|
+
"CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0,2 1,2 3,4 3),(4 3,4 5,1 4,0 0)),CIRCULARSTRING(1.7 1,1.4 0.4,1.6 0.4,1.6 0.5,1.7 1))", # noqa: E501
|
|
167
|
+
"MULTICURVE((0 0,5 5),COMPOUNDCURVE((-1 -1,0 0),CIRCULARSTRING(0 0,1 1,2 0)),CIRCULARSTRING(4 0,4 4,8 4))", # noqa: E501
|
|
168
|
+
"MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(0 0,4 0,4 4,0 4,0 0),(1 1,3 3,3 1,1 1)),((10 10,14 12,11 10,10 10),(11 11,11.5 11,11 11.5,11 11)))", # noqa: E501
|
|
169
|
+
),
|
|
170
|
+
)
|
|
171
|
+
def test_from_wkt_nonlinear_unsupported(wkt):
|
|
172
|
+
if shapely.geos_version >= (3, 13, 0):
|
|
173
|
+
with pytest.raises(
|
|
174
|
+
NotImplementedError,
|
|
175
|
+
match="Nonlinear geometry types are not currently supported",
|
|
176
|
+
):
|
|
177
|
+
shapely.from_wkt(wkt)
|
|
178
|
+
|
|
179
|
+
else:
|
|
180
|
+
# prior to GEOS 3.13 nonlinear types were rejected by GEOS on read from WKT
|
|
181
|
+
with pytest.raises(shapely.errors.GEOSException, match="Unknown type"):
|
|
182
|
+
shapely.from_wkt(wkt)
|
|
183
|
+
|
|
184
|
+
|
|
160
185
|
def test_from_wkb():
|
|
161
186
|
expected = shapely.points(1, 1)
|
|
162
187
|
actual = shapely.from_wkb(POINT11_WKB)
|
|
@@ -255,6 +280,36 @@ def test_from_wkb_empty(geom):
|
|
|
255
280
|
assert shapely.to_wkb(geom) == wkb
|
|
256
281
|
|
|
257
282
|
|
|
283
|
+
# WKB from https://github.com/libgeos/geos/blob/main/tests/unit/io/WKBReaderTest.cpp
|
|
284
|
+
@pytest.mark.parametrize(
|
|
285
|
+
"wkb",
|
|
286
|
+
(
|
|
287
|
+
# "CIRCULARSTRING(1 3,2 4,3 1)",
|
|
288
|
+
"010800000003000000000000000000F03F0000000000000840000000000000004000000000000010400000000000000840000000000000F03F",
|
|
289
|
+
# "COMPOUNDCURVE(CIRCULARSTRING(1 3,2 4,3 1),(3 1,0 0))",
|
|
290
|
+
"01090000200E16000002000000010800000003000000000000000000F03F0000000000000840000000000000004000000000000010400000000000000840000000000000F03F0102000000020000000000000000000840000000000000F03F00000000000000000000000000000000",
|
|
291
|
+
# "CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0,2 1,2 3,4 3),(4 3,4 5,1 4,0 0)),CIRCULARSTRING(1.7 1,1.4 0.4,1.6 0.4,1.6 0.5,1.7 1))", # noqa: E501
|
|
292
|
+
"010A0000200E1600000200000001090000000200000001080000000500000000000000000000000000000000000000000000000000004000000000000000000000000000000040000000000000F03F00000000000000400000000000000840000000000000104000000000000008400102000000040000000000000000001040000000000000084000000000000010400000000000001440000000000000F03F000000000000104000000000000000000000000000000000010800000005000000333333333333FB3F000000000000F03F666666666666F63F9A9999999999D93F9A9999999999F93F9A9999999999D93F9A9999999999F93F000000000000E03F333333333333FB3F000000000000F03F",
|
|
293
|
+
# "MULTICURVE((0 0,5 5),COMPOUNDCURVE((-1 -1,0 0),CIRCULARSTRING(0 0,1 1,2 0)),CIRCULARSTRING(4 0,4 4,8 4))", # noqa: E501
|
|
294
|
+
"010B000000030000000102000000020000000000000000000000000000000000000000000000000014400000000000001440010900000002000000010200000002000000000000000000F0BF000000000000F0BF0000000000000000000000000000000001080000000300000000000000000000000000000000000000000000000000F03F000000000000F03F00000000000000400000000000000000010800000003000000000000000000104000000000000000000000000000001040000000000000104000000000000020400000000000001040",
|
|
295
|
+
# "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(0 0,4 0,4 4,0 4,0 0),(1 1,3 3,3 1,1 1)),((10 10,14 12,11 10,10 10),(11 11,11.5 11,11 11.5,11 11)))", # noqa: E501
|
|
296
|
+
"010C00000002000000010A000000020000000108000000050000000000000000000000000000000000000000000000000010400000000000000000000000000000104000000000000010400000000000000000000000000000104000000000000000000000000000000000010200000004000000000000000000F03F000000000000F03F000000000000084000000000000008400000000000000840000000000000F03F000000000000F03F000000000000F03F01030000000200000004000000000000000000244000000000000024400000000000002C40000000000000284000000000000026400000000000002440000000000000244000000000000024400400000000000000000026400000000000002640000000000000274000000000000026400000000000002640000000000000274000000000000026400000000000002640",
|
|
297
|
+
),
|
|
298
|
+
)
|
|
299
|
+
def test_from_wkb_nonlinear_unsupported(wkb):
|
|
300
|
+
if shapely.geos_version >= (3, 13, 0):
|
|
301
|
+
with pytest.raises(
|
|
302
|
+
NotImplementedError,
|
|
303
|
+
match="Nonlinear geometry types are not currently supported",
|
|
304
|
+
):
|
|
305
|
+
shapely.from_wkb(wkb)
|
|
306
|
+
|
|
307
|
+
else:
|
|
308
|
+
# prior to GEOS 3.13 nonlinear types were rejected by GEOS on read from WKB
|
|
309
|
+
with pytest.raises(shapely.errors.GEOSException, match="Unknown WKB type"):
|
|
310
|
+
shapely.from_wkb(wkb)
|
|
311
|
+
|
|
312
|
+
|
|
258
313
|
def test_to_wkt():
|
|
259
314
|
point = shapely.points(1, 1)
|
|
260
315
|
actual = shapely.to_wkt(point)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: shapely
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: Manipulation and analysis of geometric objects
|
|
5
5
|
Author: Sean Gillies
|
|
6
6
|
Maintainer: Shapely contributors
|
|
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
26
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
26
27
|
Requires-Python: >=3.7
|
|
27
28
|
Description-Content-Type: text/x-rst
|
|
@@ -53,12 +54,6 @@ Shapely
|
|
|
53
54
|
:alt: Github Actions status
|
|
54
55
|
:target: https://github.com/shapely/shapely/actions?query=branch%3Amain
|
|
55
56
|
|
|
56
|
-
.. Travis CI status -- https://travis-ci.com
|
|
57
|
-
|
|
58
|
-
.. image:: https://travis-ci.com/shapely/shapely.svg?branch=main
|
|
59
|
-
:alt: Travis CI status
|
|
60
|
-
:target: https://travis-ci.com/github/shapely/shapely
|
|
61
|
-
|
|
62
57
|
.. PyPI
|
|
63
58
|
|
|
64
59
|
.. image:: https://img.shields.io/pypi/v/shapely.svg
|
|
@@ -23,6 +23,16 @@ PyObject* GeometryObject_FromGEOS(GEOSGeometry* ptr, GEOSContextHandle_t ctx) {
|
|
|
23
23
|
if (type_id == -1) {
|
|
24
24
|
return NULL;
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
// Nonlinear types (CircularString, CompoundCurve, MultiCurve, CurvePolygon,
|
|
28
|
+
// MultiSurface are not currently supported
|
|
29
|
+
// TODO: this can be removed once these types are added to the type registry
|
|
30
|
+
if (type_id >= 8) {
|
|
31
|
+
PyErr_Format(PyExc_NotImplementedError,
|
|
32
|
+
"Nonlinear geometry types are not currently supported");
|
|
33
|
+
return NULL;
|
|
34
|
+
}
|
|
35
|
+
|
|
26
36
|
PyObject* type_obj = PyList_GET_ITEM(geom_registry[0], type_id);
|
|
27
37
|
if (type_obj == NULL) {
|
|
28
38
|
return NULL;
|
|
@@ -2178,7 +2178,7 @@ static void polygonize_func(char** args, const npy_intp* dimensions, const npy_i
|
|
|
2178
2178
|
|
|
2179
2179
|
GEOS_INIT;
|
|
2180
2180
|
|
|
2181
|
-
GEOSGeometry** geoms = malloc(sizeof(void*) * dimensions[1]);
|
|
2181
|
+
const GEOSGeometry** geoms = malloc(sizeof(void*) * dimensions[1]);
|
|
2182
2182
|
if (geoms == NULL) {
|
|
2183
2183
|
errstate = PGERR_NO_MALLOC;
|
|
2184
2184
|
goto finish;
|
|
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
|
|
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
|
{shapely-2.0.6 → shapely-2.0.7}/shapely/tests/legacy/test_create_inconsistent_dimensionality.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|