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.
- {shapely-2.0.5 → shapely-2.0.6}/CHANGES.txt +9 -0
- {shapely-2.0.5 → shapely-2.0.6}/CITATION.cff +2 -2
- {shapely-2.0.5 → shapely-2.0.6}/PKG-INFO +1 -1
- {shapely-2.0.5 → shapely-2.0.6}/shapely/_version.py +3 -3
- {shapely-2.0.5 → shapely-2.0.6}/shapely/creation.py +4 -4
- {shapely-2.0.5 → shapely-2.0.6}/shapely/set_operations.py +6 -2
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_operations.py +6 -2
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_predicates.py +10 -2
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_strtree.py +20 -8
- {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/PKG-INFO +1 -1
- {shapely-2.0.5 → shapely-2.0.6}/CREDITS.txt +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/LICENSE.txt +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/README.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/constructive.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/coordinates.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/creation.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/design.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/geometry.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/index.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/installation.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/io.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/linear.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/manual.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/measurement.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/migration.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/migration_pygeos.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/predicates.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/properties.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/release.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/set_operations.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/strtree.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/docs/testing.rst +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/pyproject.toml +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/setup.cfg +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/setup.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/__init__.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/_enum.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/_geometry.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/_geometry_helpers.pyx +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/_geos.pxd +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/_geos.pyx +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/_pygeos_api.pxd +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/_ragged_array.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/affinity.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/algorithms/__init__.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/algorithms/_oriented_envelope.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/algorithms/cga.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/algorithms/polylabel.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/constructive.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/coordinates.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/coords.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/decorators.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/errors.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/__init__.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/base.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/collection.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/conftest.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/geo.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/linestring.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/multilinestring.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/multipoint.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/multipolygon.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/point.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geometry/polygon.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/geos.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/io.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/linear.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/measurement.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/ops.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/plotting.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/predicates.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/prepared.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/speedups.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/strtree.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/testing.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/__init__.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/common.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/__init__.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_collection.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_coords.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_decimal.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_emptiness.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_equality.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_format.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_geometry_base.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_hash.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_linestring.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_multi.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_multilinestring.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_multipoint.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_multipolygon.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_point.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/geometry/test_polygon.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/__init__.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/conftest.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_affinity.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_box.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_buffer.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_cga.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_clip_by_rect.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_create_inconsistent_dimensionality.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_delaunay.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_empty_polygons.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_equality.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_geointerface.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_invalid_geometries.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_linear_referencing.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_linemerge.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_locale.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_make_valid.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_mapping.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_minimum_clearance.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_ndarrays.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_nearest.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_operators.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_orient.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_parallel_offset.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_persist.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_pickle.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_polygonize.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_polylabel.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_prepared.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_products_z.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_shape.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_shared_paths.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_singularity.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_snap.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_split.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_substring.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_svg.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_transform.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_union.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_validation.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_vectorized.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_voronoi_diagram.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_wkb.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/test_wkt.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/legacy/threading_test.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_constructive.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_coordinates.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_creation.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_creation_indices.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_geometry.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_io.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_linear.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_measurement.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_misc.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_plotting.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_predicates.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_ragged_array.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_set_operations.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/tests/test_testing.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/validation.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/vectorized/__init__.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/wkb.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely/wkt.py +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/SOURCES.txt +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/dependency_links.txt +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/requires.txt +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/shapely.egg-info/top_level.txt +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/c_api.c +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/c_api.h +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/coords.c +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/coords.h +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/fast_loop_macros.h +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/geos.c +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/geos.h +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/kvec.h +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/lib.c +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/pygeom.c +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/pygeom.h +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/strtree.c +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/strtree.h +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/ufuncs.c +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/ufuncs.h +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/vector.c +0 -0
- {shapely-2.0.5 → shapely-2.0.6}/src/vector.h +0 -0
- {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.
|
|
6
|
-
date-released: "2024-
|
|
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
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-
|
|
11
|
+
"date": "2024-08-19T23:29:00+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.0.
|
|
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(
|
|
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(
|
|
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
|
-
|
|
83
|
-
|
|
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
|
-
|
|
71
|
-
|
|
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
|
-
|
|
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
|
-
|
|
403
|
-
|
|
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'
|
|
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
|
|
File without changes
|
|
File without changes
|
{shapely-2.0.5 → shapely-2.0.6}/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
|