shapely 1.7a1__tar.gz → 1.7a2__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-1.7a1 → Shapely-1.7a2}/CHANGES.txt +36 -2
- {Shapely-1.7a1 → Shapely-1.7a2}/CREDITS.txt +1 -0
- {Shapely-1.7a1/Shapely.egg-info → Shapely-1.7a2}/PKG-INFO +44 -4
- {Shapely-1.7a1 → Shapely-1.7a2/Shapely.egg-info}/PKG-INFO +44 -4
- {Shapely-1.7a1 → Shapely-1.7a2}/Shapely.egg-info/SOURCES.txt +3 -1
- Shapely-1.7a2/VERSION.txt +1 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/docs/manual.rst +68 -39
- {Shapely-1.7a1 → Shapely-1.7a2}/setup.cfg +0 -1
- Shapely-1.7a2/shapely/__init__.py +1 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/affinity.py +12 -12
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/algorithms/cga.py +2 -2
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/algorithms/polylabel.py +8 -1
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/ctypes_declarations.py +7 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/examples/dissolve.py +3 -3
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/examples/intersect.py +2 -2
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/base.py +4 -3
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/multipoint.py +1 -1
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/multipolygon.py +17 -5
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/point.py +5 -1
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/polygon.py +21 -8
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geos.py +25 -10
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/impl.py +1 -1
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/ops.py +40 -19
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/prepared.py +11 -7
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/speedups/__init__.py +1 -2
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/speedups/_speedups.c +1877 -1618
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/speedups/_speedups.pyx +16 -5
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/strtree.py +22 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/topology.py +1 -1
- Shapely-1.7a2/shapely/vectorized/_vectorized.c +22895 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_delaunay.py +2 -2
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_geos_err_handler.py +12 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_multipolygon.py +13 -2
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_operations.py +15 -1
- Shapely-1.7a2/tests/test_orient.py +82 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_point.py +6 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_polygon.py +27 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_polylabel.py +12 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_split.py +24 -0
- Shapely-1.7a2/tests/test_strtree_nearest.py +27 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_substring.py +3 -1
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_union.py +1 -1
- Shapely-1.7a1/VERSION.txt +0 -1
- Shapely-1.7a1/shapely/__init__.py +0 -1
- Shapely-1.7a1/shapely/ftools.py +0 -78
- {Shapely-1.7a1 → Shapely-1.7a2}/LICENSE.txt +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/README.rst +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/Shapely.egg-info/requires.txt +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/__init__.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/packaging/__about__.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/packaging/__init__.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/packaging/_compat.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/packaging/_structures.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/packaging/markers.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/packaging/requirements.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/packaging/specifiers.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/packaging/utils.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/_vendor/packaging/version.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/docs/design.rst +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/docs/index.rst +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/docs/project.rst +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/setup.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/_buildcfg.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/_geos.pxi +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/algorithms/__init__.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/coords.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/errors.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/examples/__init__.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/examples/geoms.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/__init__.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/collection.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/geo.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/linestring.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/multilinestring.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/geometry/proxy.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/iterops.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/linref.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/predicates.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/validation.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/vectorized/__init__.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/vectorized/_vectorized.pyx +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/wkb.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/shapely/wkt.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/__init__.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/binascii_hex.txt +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/conftest.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_affinity.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_box.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_cga.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_clip_by_rect.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_collection.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_coords.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_default_impl.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_delegated.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_dlls.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_doctests.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_emptiness.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_empty_polygons.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_equality.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_geointerface.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_geomseq.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_getitem.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_hash.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_invalid_geometries.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_iterops.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_linear_referencing.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_linemerge.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_linestring.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_locale.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_mapping.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_minimum_rotated_rectangle.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_multi.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_multilinestring.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_multipoint.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_ndarrays.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_nearest.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_operators.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_parallel_offset.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_persist.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_pickle.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_polygonize.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_predicates.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_prepared.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_products_z.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_shared_paths.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_singularity.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_snap.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_strtree.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_styles.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_svg.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_transform.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_validation.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_vectorized.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_wkb.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_wkt.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/test_xy.py +0 -0
- {Shapely-1.7a1 → Shapely-1.7a2}/tests/threading_test.py +0 -0
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
1.7a2 (2019-06-21)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
- Nearest neighbor search has been added to STRtree (#668).
|
|
8
|
+
- Disallow sequences of MultiPolygons as arguments to the MultiPolygon
|
|
9
|
+
constructor, resolving #588.
|
|
10
|
+
- Removed vendorized `functools` functions previously used to support
|
|
11
|
+
Python 2.5.
|
|
12
|
+
|
|
13
|
+
Bug fixes:
|
|
14
|
+
|
|
15
|
+
- Avoid reloading the GEOS shared library when using an installed binary wheel
|
|
16
|
+
on OS X (#735), resolving issue #553.
|
|
17
|
+
- The shapely.ops.orient function can now orient multi polygons and geometry
|
|
18
|
+
collections as well as polygons (#733).
|
|
19
|
+
- Polygons can now be constructed from sequences of point objects as well as
|
|
20
|
+
sequences of x, y sequences (#732).
|
|
21
|
+
- The exterior of an empty polygon is now equal to an empty linear ring (#731).
|
|
22
|
+
- The bounds property of an empty point object now returns an empty tuple,
|
|
23
|
+
consistent with other geometry types (#723).
|
|
24
|
+
- Segmentation faults when non-string values are passed to the WKT loader are
|
|
25
|
+
avoided by #700.
|
|
26
|
+
- Failure of ops.substring when the sub linestring coincides with the beginning
|
|
27
|
+
of the linestring has been fixed (#658).
|
|
28
|
+
- Segmentation faults from interpolating on an empty linestring are prevented
|
|
29
|
+
by #655.
|
|
30
|
+
- A missing special case for rectangular polygons has been added to the
|
|
31
|
+
polylabel algorithm (#644).
|
|
32
|
+
- LinearRing can be created from a LineString (#638).
|
|
33
|
+
- The prepared geoemtry validation condition has been tightened in #632 to fix
|
|
34
|
+
the bug reported in #631.
|
|
35
|
+
- Attempting to interpolate an empty geometry no longer results in a
|
|
36
|
+
segmentation fault, raising `ValueError` instead (#653).
|
|
37
|
+
|
|
38
|
+
1.7a1 (2018-07-29)
|
|
39
|
+
------------------
|
|
6
40
|
|
|
7
41
|
New features:
|
|
8
42
|
|
|
@@ -52,6 +52,7 @@ Shapely is written by:
|
|
|
52
52
|
* joelostblom <joelostblom@users.noreply.github.com>
|
|
53
53
|
* Marco De Nadai <me@marcodena.it>
|
|
54
54
|
* Johan Euphrosine <proppy@aminche.com>
|
|
55
|
+
* James Gaboardi <jgaboardi@gmail.com>
|
|
55
56
|
|
|
56
57
|
See also: https://github.com/Toblerity/Shapely/graphs/contributors.
|
|
57
58
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
Metadata-Version:
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7a2
|
|
4
4
|
Summary: Geometric objects, predicates, and operations
|
|
5
5
|
Home-page: https://github.com/Toblerity/Shapely
|
|
6
6
|
Author: Sean Gillies
|
|
7
7
|
Author-email: sean.gillies@gmail.com
|
|
8
|
+
Maintainer: Sean Gillies
|
|
9
|
+
Maintainer-email: sean.gillies@gmail.com
|
|
8
10
|
License: BSD
|
|
9
11
|
Description: =======
|
|
10
12
|
Shapely
|
|
@@ -223,6 +225,7 @@ Description: =======
|
|
|
223
225
|
* joelostblom <joelostblom@users.noreply.github.com>
|
|
224
226
|
* Marco De Nadai <me@marcodena.it>
|
|
225
227
|
* Johan Euphrosine <proppy@aminche.com>
|
|
228
|
+
* James Gaboardi <jgaboardi@gmail.com>
|
|
226
229
|
|
|
227
230
|
See also: https://github.com/Toblerity/Shapely/graphs/contributors.
|
|
228
231
|
|
|
@@ -241,8 +244,42 @@ Description: =======
|
|
|
241
244
|
Changes
|
|
242
245
|
=======
|
|
243
246
|
|
|
244
|
-
|
|
245
|
-
|
|
247
|
+
1.7a2 (2019-06-21)
|
|
248
|
+
------------------
|
|
249
|
+
|
|
250
|
+
- Nearest neighbor search has been added to STRtree (#668).
|
|
251
|
+
- Disallow sequences of MultiPolygons as arguments to the MultiPolygon
|
|
252
|
+
constructor, resolving #588.
|
|
253
|
+
- Removed vendorized `functools` functions previously used to support
|
|
254
|
+
Python 2.5.
|
|
255
|
+
|
|
256
|
+
Bug fixes:
|
|
257
|
+
|
|
258
|
+
- Avoid reloading the GEOS shared library when using an installed binary wheel
|
|
259
|
+
on OS X (#735), resolving issue #553.
|
|
260
|
+
- The shapely.ops.orient function can now orient multi polygons and geometry
|
|
261
|
+
collections as well as polygons (#733).
|
|
262
|
+
- Polygons can now be constructed from sequences of point objects as well as
|
|
263
|
+
sequences of x, y sequences (#732).
|
|
264
|
+
- The exterior of an empty polygon is now equal to an empty linear ring (#731).
|
|
265
|
+
- The bounds property of an empty point object now returns an empty tuple,
|
|
266
|
+
consistent with other geometry types (#723).
|
|
267
|
+
- Segmentation faults when non-string values are passed to the WKT loader are
|
|
268
|
+
avoided by #700.
|
|
269
|
+
- Failure of ops.substring when the sub linestring coincides with the beginning
|
|
270
|
+
of the linestring has been fixed (#658).
|
|
271
|
+
- Segmentation faults from interpolating on an empty linestring are prevented
|
|
272
|
+
by #655.
|
|
273
|
+
- A missing special case for rectangular polygons has been added to the
|
|
274
|
+
polylabel algorithm (#644).
|
|
275
|
+
- LinearRing can be created from a LineString (#638).
|
|
276
|
+
- The prepared geoemtry validation condition has been tightened in #632 to fix
|
|
277
|
+
the bug reported in #631.
|
|
278
|
+
- Attempting to interpolate an empty geometry no longer results in a
|
|
279
|
+
segmentation fault, raising `ValueError` instead (#653).
|
|
280
|
+
|
|
281
|
+
1.7a1 (2018-07-29)
|
|
282
|
+
------------------
|
|
246
283
|
|
|
247
284
|
New features:
|
|
248
285
|
|
|
@@ -887,3 +924,6 @@ Classifier: Programming Language :: Python :: 3.6
|
|
|
887
924
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
888
925
|
Requires: Python (>=2.6)
|
|
889
926
|
Requires: libgeos_c (>=3.3)
|
|
927
|
+
Provides-Extra: test
|
|
928
|
+
Provides-Extra: vectorized
|
|
929
|
+
Provides-Extra: all
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
Metadata-Version:
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7a2
|
|
4
4
|
Summary: Geometric objects, predicates, and operations
|
|
5
5
|
Home-page: https://github.com/Toblerity/Shapely
|
|
6
6
|
Author: Sean Gillies
|
|
7
7
|
Author-email: sean.gillies@gmail.com
|
|
8
|
+
Maintainer: Sean Gillies
|
|
9
|
+
Maintainer-email: sean.gillies@gmail.com
|
|
8
10
|
License: BSD
|
|
9
11
|
Description: =======
|
|
10
12
|
Shapely
|
|
@@ -223,6 +225,7 @@ Description: =======
|
|
|
223
225
|
* joelostblom <joelostblom@users.noreply.github.com>
|
|
224
226
|
* Marco De Nadai <me@marcodena.it>
|
|
225
227
|
* Johan Euphrosine <proppy@aminche.com>
|
|
228
|
+
* James Gaboardi <jgaboardi@gmail.com>
|
|
226
229
|
|
|
227
230
|
See also: https://github.com/Toblerity/Shapely/graphs/contributors.
|
|
228
231
|
|
|
@@ -241,8 +244,42 @@ Description: =======
|
|
|
241
244
|
Changes
|
|
242
245
|
=======
|
|
243
246
|
|
|
244
|
-
|
|
245
|
-
|
|
247
|
+
1.7a2 (2019-06-21)
|
|
248
|
+
------------------
|
|
249
|
+
|
|
250
|
+
- Nearest neighbor search has been added to STRtree (#668).
|
|
251
|
+
- Disallow sequences of MultiPolygons as arguments to the MultiPolygon
|
|
252
|
+
constructor, resolving #588.
|
|
253
|
+
- Removed vendorized `functools` functions previously used to support
|
|
254
|
+
Python 2.5.
|
|
255
|
+
|
|
256
|
+
Bug fixes:
|
|
257
|
+
|
|
258
|
+
- Avoid reloading the GEOS shared library when using an installed binary wheel
|
|
259
|
+
on OS X (#735), resolving issue #553.
|
|
260
|
+
- The shapely.ops.orient function can now orient multi polygons and geometry
|
|
261
|
+
collections as well as polygons (#733).
|
|
262
|
+
- Polygons can now be constructed from sequences of point objects as well as
|
|
263
|
+
sequences of x, y sequences (#732).
|
|
264
|
+
- The exterior of an empty polygon is now equal to an empty linear ring (#731).
|
|
265
|
+
- The bounds property of an empty point object now returns an empty tuple,
|
|
266
|
+
consistent with other geometry types (#723).
|
|
267
|
+
- Segmentation faults when non-string values are passed to the WKT loader are
|
|
268
|
+
avoided by #700.
|
|
269
|
+
- Failure of ops.substring when the sub linestring coincides with the beginning
|
|
270
|
+
of the linestring has been fixed (#658).
|
|
271
|
+
- Segmentation faults from interpolating on an empty linestring are prevented
|
|
272
|
+
by #655.
|
|
273
|
+
- A missing special case for rectangular polygons has been added to the
|
|
274
|
+
polylabel algorithm (#644).
|
|
275
|
+
- LinearRing can be created from a LineString (#638).
|
|
276
|
+
- The prepared geoemtry validation condition has been tightened in #632 to fix
|
|
277
|
+
the bug reported in #631.
|
|
278
|
+
- Attempting to interpolate an empty geometry no longer results in a
|
|
279
|
+
segmentation fault, raising `ValueError` instead (#653).
|
|
280
|
+
|
|
281
|
+
1.7a1 (2018-07-29)
|
|
282
|
+
------------------
|
|
246
283
|
|
|
247
284
|
New features:
|
|
248
285
|
|
|
@@ -887,3 +924,6 @@ Classifier: Programming Language :: Python :: 3.6
|
|
|
887
924
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
888
925
|
Requires: Python (>=2.6)
|
|
889
926
|
Requires: libgeos_c (>=3.3)
|
|
927
|
+
Provides-Extra: test
|
|
928
|
+
Provides-Extra: vectorized
|
|
929
|
+
Provides-Extra: all
|
|
@@ -31,7 +31,6 @@ shapely/affinity.py
|
|
|
31
31
|
shapely/coords.py
|
|
32
32
|
shapely/ctypes_declarations.py
|
|
33
33
|
shapely/errors.py
|
|
34
|
-
shapely/ftools.py
|
|
35
34
|
shapely/geos.py
|
|
36
35
|
shapely/impl.py
|
|
37
36
|
shapely/iterops.py
|
|
@@ -66,6 +65,7 @@ shapely/speedups/__init__.py
|
|
|
66
65
|
shapely/speedups/_speedups.c
|
|
67
66
|
shapely/speedups/_speedups.pyx
|
|
68
67
|
shapely/vectorized/__init__.py
|
|
68
|
+
shapely/vectorized/_vectorized.c
|
|
69
69
|
shapely/vectorized/_vectorized.pyx
|
|
70
70
|
tests/__init__.py
|
|
71
71
|
tests/binascii_hex.txt
|
|
@@ -105,6 +105,7 @@ tests/test_ndarrays.py
|
|
|
105
105
|
tests/test_nearest.py
|
|
106
106
|
tests/test_operations.py
|
|
107
107
|
tests/test_operators.py
|
|
108
|
+
tests/test_orient.py
|
|
108
109
|
tests/test_parallel_offset.py
|
|
109
110
|
tests/test_persist.py
|
|
110
111
|
tests/test_pickle.py
|
|
@@ -120,6 +121,7 @@ tests/test_singularity.py
|
|
|
120
121
|
tests/test_snap.py
|
|
121
122
|
tests/test_split.py
|
|
122
123
|
tests/test_strtree.py
|
|
124
|
+
tests/test_strtree_nearest.py
|
|
123
125
|
tests/test_styles.py
|
|
124
126
|
tests/test_substring.py
|
|
125
127
|
tests/test_svg.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.7a2
|
|
@@ -11,7 +11,7 @@ The Shapely User Manual
|
|
|
11
11
|
This work is licensed under a `Creative Commons Attribution 3.0
|
|
12
12
|
United States License`__.
|
|
13
13
|
|
|
14
|
-
.. __:
|
|
14
|
+
.. __: https://creativecommons.org/licenses/by/3.0/us/
|
|
15
15
|
|
|
16
16
|
:Abstract:
|
|
17
17
|
This document explains how to use the Shapely Python package for
|
|
@@ -107,7 +107,7 @@ The standard data model has additional constraints specific to certain types
|
|
|
107
107
|
of geometric objects that will be discussed in following sections of this
|
|
108
108
|
manual.
|
|
109
109
|
|
|
110
|
-
See also http://www.vividsolutions.com/jts/discussion.htm
|
|
110
|
+
See also https://web.archive.org/web/20160719195511/http://www.vividsolutions.com/jts/discussion.htm
|
|
111
111
|
for more illustrations of this data model.
|
|
112
112
|
|
|
113
113
|
.. _intro-relationships:
|
|
@@ -222,8 +222,9 @@ General Attributes and Methods
|
|
|
222
222
|
.. method:: object.hausdorff_distance(other)
|
|
223
223
|
|
|
224
224
|
Returns the Hausdorff distance (``float``) to the `other` geometric object.
|
|
225
|
-
The Hausdorff distance is the furthest distance
|
|
226
|
-
geometry
|
|
225
|
+
The Hausdorff distance between two geometries is the furthest distance that
|
|
226
|
+
a point on either geometry can be from the nearest point to it on the other
|
|
227
|
+
geometry.
|
|
227
228
|
|
|
228
229
|
`New in Shapely 1.6.0`
|
|
229
230
|
|
|
@@ -1348,7 +1349,7 @@ the square.
|
|
|
1348
1349
|
'0F2FF1FF2'
|
|
1349
1350
|
|
|
1350
1351
|
Further discussion of the DE-9IM matrix is beyond the scope of this manual. See
|
|
1351
|
-
[4]_ and
|
|
1352
|
+
[4]_ and https://pypi.org/project/de9im/.
|
|
1352
1353
|
|
|
1353
1354
|
.. _analysis-methods:
|
|
1354
1355
|
|
|
@@ -1506,7 +1507,7 @@ boundaries.
|
|
|
1506
1507
|
.. note::
|
|
1507
1508
|
|
|
1508
1509
|
:meth:`union` is an expensive way to find the cumulative union
|
|
1509
|
-
of many objects. See :func:`shapely.ops.
|
|
1510
|
+
of many objects. See :func:`shapely.ops.unary_union` for a more effective
|
|
1510
1511
|
method.
|
|
1511
1512
|
|
|
1512
1513
|
Constructive Methods
|
|
@@ -1676,8 +1677,9 @@ linestring feature (right).
|
|
|
1676
1677
|
object on its right or its left side.
|
|
1677
1678
|
|
|
1678
1679
|
Distance must be a positive float value. The side parameter may be 'left' or
|
|
1679
|
-
'right'.
|
|
1680
|
-
|
|
1680
|
+
'right'. Left and right is determined by following the direction of given
|
|
1681
|
+
geometric points of the LineString. The resolution of the offset around
|
|
1682
|
+
each vertex of the object is parameterized as in the buffer method.
|
|
1681
1683
|
|
|
1682
1684
|
The join style is for outside corners between line segments. Accepted integer
|
|
1683
1685
|
values are 1 (round), 2 (mitre), and 3 (bevel). See also
|
|
@@ -1766,13 +1768,21 @@ preserved or supported by 3D affine transformations.
|
|
|
1766
1768
|
which represents the augmented matrix:
|
|
1767
1769
|
|
|
1768
1770
|
.. math::
|
|
1769
|
-
\begin{bmatrix}
|
|
1770
|
-
|
|
1771
|
+
\begin{bmatrix}
|
|
1772
|
+
x' \\
|
|
1773
|
+
y' \\
|
|
1774
|
+
1
|
|
1775
|
+
\end{bmatrix} =
|
|
1771
1776
|
\begin{bmatrix}
|
|
1772
1777
|
a & b & x_\mathrm{off} \\
|
|
1773
1778
|
d & e & y_\mathrm{off} \\
|
|
1774
1779
|
0 & 0 & 1
|
|
1775
1780
|
\end{bmatrix}
|
|
1781
|
+
\begin{bmatrix}
|
|
1782
|
+
x \\
|
|
1783
|
+
y \\
|
|
1784
|
+
1
|
|
1785
|
+
\end{bmatrix}
|
|
1776
1786
|
|
|
1777
1787
|
or the equations for the transformed coordinates:
|
|
1778
1788
|
|
|
@@ -1787,14 +1797,24 @@ preserved or supported by 3D affine transformations.
|
|
|
1787
1797
|
which represents the augmented matrix:
|
|
1788
1798
|
|
|
1789
1799
|
.. math::
|
|
1790
|
-
\begin{bmatrix}
|
|
1791
|
-
|
|
1800
|
+
\begin{bmatrix}
|
|
1801
|
+
x' \\
|
|
1802
|
+
y' \\
|
|
1803
|
+
z' \\
|
|
1804
|
+
1
|
|
1805
|
+
\end{bmatrix} =
|
|
1792
1806
|
\begin{bmatrix}
|
|
1793
1807
|
a & b & c & x_\mathrm{off} \\
|
|
1794
1808
|
d & e & f & y_\mathrm{off} \\
|
|
1795
1809
|
g & h & i & z_\mathrm{off} \\
|
|
1796
1810
|
0 & 0 & 0 & 1
|
|
1797
1811
|
\end{bmatrix}
|
|
1812
|
+
\begin{bmatrix}
|
|
1813
|
+
x \\
|
|
1814
|
+
y \\
|
|
1815
|
+
z \\
|
|
1816
|
+
1
|
|
1817
|
+
\end{bmatrix}
|
|
1798
1818
|
|
|
1799
1819
|
or the equations for the transformed coordinates:
|
|
1800
1820
|
|
|
@@ -2069,45 +2089,54 @@ using functions in the :mod:`shapely.ops` module.
|
|
|
2069
2089
|
<shapely.geometry.linestring.LineString object at 0x...>,
|
|
2070
2090
|
<shapely.geometry.linestring.LineString object at 0x...>]
|
|
2071
2091
|
|
|
2072
|
-
|
|
2092
|
+
Efficient Unions
|
|
2073
2093
|
----------------
|
|
2074
2094
|
|
|
2075
|
-
The :func:`~shapely.ops.
|
|
2095
|
+
The :func:`~shapely.ops.unary_union` function in `shapely.ops` is more
|
|
2076
2096
|
efficient than accumulating with :meth:`union`.
|
|
2077
2097
|
|
|
2078
|
-
.. plot:: code/
|
|
2098
|
+
.. plot:: code/unary_union.py
|
|
2079
2099
|
|
|
2080
|
-
.. function:: shapely.ops.
|
|
2100
|
+
.. function:: shapely.ops.unary_union(geoms)
|
|
2081
2101
|
|
|
2082
2102
|
Returns a representation of the union of the given geometric objects.
|
|
2083
2103
|
|
|
2104
|
+
Areas of overlapping `Polygons` will get merged. `LineStrings` will
|
|
2105
|
+
get fully dissolved and noded. Duplicate `Points` will get merged.
|
|
2106
|
+
|
|
2084
2107
|
.. code-block:: pycon
|
|
2085
2108
|
|
|
2086
|
-
>>> from shapely.ops import
|
|
2109
|
+
>>> from shapely.ops import unary_union
|
|
2087
2110
|
>>> polygons = [Point(i, 0).buffer(0.7) for i in range(5)]
|
|
2088
|
-
>>>
|
|
2111
|
+
>>> unary_union(polygons)
|
|
2089
2112
|
<shapely.geometry.polygon.Polygon object at 0x...>
|
|
2090
2113
|
|
|
2091
|
-
|
|
2114
|
+
Because the union merges the areas of overlapping `Polygons` it can be
|
|
2115
|
+
used in an attempt to fix invalid `MultiPolygons`. As with the zero
|
|
2116
|
+
distance :meth:`buffer` trick, your mileage may vary when using this.
|
|
2092
2117
|
|
|
2093
2118
|
.. code-block:: pycon
|
|
2094
2119
|
|
|
2095
2120
|
>>> m = MultiPolygon(polygons)
|
|
2096
2121
|
>>> m.area
|
|
2097
2122
|
7.6845438018375516
|
|
2098
|
-
>>>
|
|
2123
|
+
>>> m.is_valid
|
|
2124
|
+
False
|
|
2125
|
+
>>> unary_union(m).area
|
|
2099
2126
|
6.6103013551167971
|
|
2127
|
+
>>> unary_union(m).is_valid
|
|
2128
|
+
True
|
|
2100
2129
|
|
|
2101
|
-
|
|
2130
|
+
.. function:: shapely.ops.cascaded_union(geoms)
|
|
2102
2131
|
|
|
2103
|
-
|
|
2104
|
-
:func:`shapely.ops.unary_union` if GEOS 3.2+ is used. The unary union
|
|
2105
|
-
function can operate on different geometry types, not only polygons as is
|
|
2106
|
-
the case for the older cascaded unions.
|
|
2132
|
+
Returns a representation of the union of the given geometric objects.
|
|
2107
2133
|
|
|
2108
|
-
..
|
|
2134
|
+
.. note::
|
|
2109
2135
|
|
|
2110
|
-
|
|
2136
|
+
In 1.2.16 :func:`shapely.ops.cascaded_union` was transparently superseded by
|
|
2137
|
+
:func:`shapely.ops.unary_union` if GEOS 3.3+ is used. The unary union
|
|
2138
|
+
function can operate on different geometry types, not only polygons as is
|
|
2139
|
+
the case for the older cascaded union.
|
|
2111
2140
|
|
|
2112
2141
|
Delaunay triangulation
|
|
2113
2142
|
----------------------
|
|
@@ -2119,7 +2148,7 @@ Delaunay triangulation from a collection of points.
|
|
|
2119
2148
|
|
|
2120
2149
|
.. function:: shapely.ops.triangulate(geom, tolerance=0.0, edges=False)
|
|
2121
2150
|
|
|
2122
|
-
Returns a
|
|
2151
|
+
Returns a Delaunay triangulation of the vertices of the input geometry.
|
|
2123
2152
|
|
|
2124
2153
|
The source may be any geometry type. All vertices of the geometry will be
|
|
2125
2154
|
used as the points of the triangulation.
|
|
@@ -2591,7 +2620,7 @@ GEOS development headers during installation.
|
|
|
2591
2620
|
|
|
2592
2621
|
You can check if the speedups are installed with the :attr:`available`
|
|
2593
2622
|
attribute. To enable the speedups call :func:`enable`. You can revert to the
|
|
2594
|
-
|
|
2623
|
+
slow implementation with :func:`disable`.
|
|
2595
2624
|
|
|
2596
2625
|
.. code-block:: pycon
|
|
2597
2626
|
|
|
@@ -2649,18 +2678,18 @@ References
|
|
|
2649
2678
|
1973, pp. 112-122.
|
|
2650
2679
|
|
|
2651
2680
|
|
|
2652
|
-
.. _GEOS:
|
|
2653
|
-
.. _Java Topology Suite: https://
|
|
2654
|
-
.. _JTS: https://
|
|
2681
|
+
.. _GEOS: https://trac.osgeo.org/geos/
|
|
2682
|
+
.. _Java Topology Suite: https://projects.eclipse.org/projects/locationtech.jts
|
|
2683
|
+
.. _JTS: https://projects.eclipse.org/projects/locationtech.jts
|
|
2655
2684
|
.. _PostGIS: http://postgis.refractions.net
|
|
2656
|
-
.. _record:
|
|
2685
|
+
.. _record: https://pypi.org/project/Shapely/
|
|
2657
2686
|
.. _Open Geospatial Consortium: http://www.opengeospatial.org/
|
|
2658
|
-
.. _Davis:
|
|
2687
|
+
.. _Davis: https://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html
|
|
2659
2688
|
.. _Understanding spatial relations: http://edndoc.esri.com/arcsde/9.1/general_topics/understand_spatial_relations.htm
|
|
2660
|
-
.. _Strobl-PDF:
|
|
2689
|
+
.. _Strobl-PDF: https://giswiki.hsr.ch/images/3/3d/9dem_springer.pdf
|
|
2661
2690
|
.. |Strobl-PDF| replace:: PDF
|
|
2662
|
-
.. _JTS-PDF:
|
|
2691
|
+
.. _JTS-PDF: https://github.com/locationtech/jts/raw/master/doc/JTS%20Technical%20Specs.pdf
|
|
2663
2692
|
.. |JTS-PDF| replace:: PDF
|
|
2664
|
-
.. _frozenset:
|
|
2665
|
-
.. _Sorting HowTo:
|
|
2666
|
-
.. _Python geo interface:
|
|
2693
|
+
.. _frozenset: https://docs.python.org/library/stdtypes.html#frozenset
|
|
2694
|
+
.. _Sorting HowTo: https://wiki.python.org/moin/HowTo/Sorting/
|
|
2695
|
+
.. _Python geo interface: https://gist.github.com/2217756
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.7a2"
|
|
@@ -6,7 +6,7 @@ __all__ = ['affine_transform', 'rotate', 'scale', 'skew', 'translate']
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def affine_transform(geom, matrix):
|
|
9
|
-
"""Returns a transformed geometry using an affine transformation matrix.
|
|
9
|
+
r"""Returns a transformed geometry using an affine transformation matrix.
|
|
10
10
|
|
|
11
11
|
The coefficient matrix is provided as a list or tuple with 6 or 12 items
|
|
12
12
|
for 2D or 3D transformations, respectively.
|
|
@@ -17,9 +17,9 @@ def affine_transform(geom, matrix):
|
|
|
17
17
|
|
|
18
18
|
which represents the augmented matrix::
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
[
|
|
22
|
-
|
|
20
|
+
[x'] / a b xoff \ [x]
|
|
21
|
+
[y'] = | d e yoff | [y]
|
|
22
|
+
[1 ] \ 0 0 1 / [1]
|
|
23
23
|
|
|
24
24
|
or the equations for the transformed coordinates::
|
|
25
25
|
|
|
@@ -32,10 +32,10 @@ def affine_transform(geom, matrix):
|
|
|
32
32
|
|
|
33
33
|
which represents the augmented matrix::
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
[
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
[x'] / a b c xoff \ [x]
|
|
36
|
+
[y'] = | d e f yoff | [y]
|
|
37
|
+
[z'] | g h i zoff | [z]
|
|
38
|
+
[1 ] \ 0 0 0 1 / [1]
|
|
39
39
|
|
|
40
40
|
or the equations for the transformed coordinates::
|
|
41
41
|
|
|
@@ -130,7 +130,7 @@ def interpret_origin(geom, origin, ndim):
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
def rotate(geom, angle, origin='center', use_radians=False):
|
|
133
|
-
"""Returns a rotated geometry on a 2D plane.
|
|
133
|
+
r"""Returns a rotated geometry on a 2D plane.
|
|
134
134
|
|
|
135
135
|
The angle of rotation can be specified in either degrees (default) or
|
|
136
136
|
radians by setting ``use_radians=True``. Positive angles are
|
|
@@ -169,7 +169,7 @@ def rotate(geom, angle, origin='center', use_radians=False):
|
|
|
169
169
|
|
|
170
170
|
|
|
171
171
|
def scale(geom, xfact=1.0, yfact=1.0, zfact=1.0, origin='center'):
|
|
172
|
-
"""Returns a scaled geometry, scaled by factors along each dimension.
|
|
172
|
+
r"""Returns a scaled geometry, scaled by factors along each dimension.
|
|
173
173
|
|
|
174
174
|
The point of origin can be a keyword 'center' for the 2D bounding box
|
|
175
175
|
center (default), 'centroid' for the geometry's 2D centroid, a Point
|
|
@@ -200,7 +200,7 @@ def scale(geom, xfact=1.0, yfact=1.0, zfact=1.0, origin='center'):
|
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
def skew(geom, xs=0.0, ys=0.0, origin='center', use_radians=False):
|
|
203
|
-
"""Returns a skewed geometry, sheared by angles along x and y dimensions.
|
|
203
|
+
r"""Returns a skewed geometry, sheared by angles along x and y dimensions.
|
|
204
204
|
|
|
205
205
|
The shear angle can be specified in either degrees (default) or radians
|
|
206
206
|
by setting ``use_radians=True``.
|
|
@@ -239,7 +239,7 @@ def skew(geom, xs=0.0, ys=0.0, origin='center', use_radians=False):
|
|
|
239
239
|
|
|
240
240
|
|
|
241
241
|
def translate(geom, xoff=0.0, yoff=0.0, zoff=0.0):
|
|
242
|
-
"""Returns a translated geometry shifted by offsets along each dimension.
|
|
242
|
+
r"""Returns a translated geometry shifted by offsets along each dimension.
|
|
243
243
|
|
|
244
244
|
The general 3D affine transformation matrix for translation is:
|
|
245
245
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
def signed_area(ring):
|
|
3
|
-
"""Return the signed area enclosed by a ring in linear time using the
|
|
4
|
-
algorithm at: http://
|
|
3
|
+
"""Return the signed area enclosed by a ring in linear time using the
|
|
4
|
+
algorithm at: https://web.archive.org/web/20080209143651/http://cgafaq.info:80/wiki/Polygon_Area
|
|
5
5
|
"""
|
|
6
6
|
xs, ys = ring.coords.xy
|
|
7
7
|
xs.append(xs[1])
|
|
@@ -87,7 +87,9 @@ def polylabel(polygon, tolerance=1.0):
|
|
|
87
87
|
if not polygon.is_valid:
|
|
88
88
|
raise TopologicalError('Invalid polygon')
|
|
89
89
|
minx, miny, maxx, maxy = polygon.bounds
|
|
90
|
-
|
|
90
|
+
width = maxx - minx
|
|
91
|
+
height = maxy - miny
|
|
92
|
+
cell_size = min(width, height)
|
|
91
93
|
h = cell_size / 2.0
|
|
92
94
|
cell_queue = []
|
|
93
95
|
|
|
@@ -96,6 +98,11 @@ def polylabel(polygon, tolerance=1.0):
|
|
|
96
98
|
x, y = polygon.centroid.coords[0]
|
|
97
99
|
best_cell = Cell(x, y, 0, polygon)
|
|
98
100
|
|
|
101
|
+
# Special case for rectangular polygons avoiding floating point error
|
|
102
|
+
bbox_cell = Cell(minx + width / 2.0, miny + height / 2, 0, polygon)
|
|
103
|
+
if bbox_cell.distance > best_cell.distance:
|
|
104
|
+
best_cell = bbox_cell
|
|
105
|
+
|
|
99
106
|
# build a regular square grid covering the polygon
|
|
100
107
|
x = minx
|
|
101
108
|
while x < maxx:
|
|
@@ -509,3 +509,10 @@ def prototype(lgeos, geos_version):
|
|
|
509
509
|
|
|
510
510
|
lgeos.GEOSSTRtree_destroy.argtypes = [c_void_p]
|
|
511
511
|
lgeos.GEOSSTRtree_destroy.restype = None
|
|
512
|
+
|
|
513
|
+
if geos_version >= (3, 6, 0):
|
|
514
|
+
lgeos.GEOSDistanceCallback = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p, c_void_p)
|
|
515
|
+
|
|
516
|
+
lgeos.GEOSSTRtree_nearest_generic.argtypes = [
|
|
517
|
+
c_void_p, py_object, c_void_p, lgeos.GEOSDistanceCallback, py_object]
|
|
518
|
+
lgeos.GEOSSTRtree_nearest_generic.restype = c_void_p
|
|
@@ -9,7 +9,7 @@ import random
|
|
|
9
9
|
import pylab
|
|
10
10
|
|
|
11
11
|
from shapely.geometry import Point
|
|
12
|
-
from shapely.ops import
|
|
12
|
+
from shapely.ops import unary_union
|
|
13
13
|
|
|
14
14
|
# Use a partial function to make 100 points uniformly distributed in a 40x40
|
|
15
15
|
# box centered on 0,0.
|
|
@@ -19,9 +19,9 @@ points = [Point(r(), r()) for i in range(100)]
|
|
|
19
19
|
# Buffer the points, producing 100 polygon spots
|
|
20
20
|
spots = [p.buffer(2.5) for p in points]
|
|
21
21
|
|
|
22
|
-
# Perform a
|
|
22
|
+
# Perform a unary union of the polygon spots, dissolving them into a
|
|
23
23
|
# collection of polygon patches
|
|
24
|
-
patches =
|
|
24
|
+
patches = unary_union(spots)
|
|
25
25
|
|
|
26
26
|
if __name__ == "__main__":
|
|
27
27
|
# Illustrate the results using matplotlib's pylab interface
|
|
@@ -9,13 +9,13 @@ import random
|
|
|
9
9
|
import pylab
|
|
10
10
|
|
|
11
11
|
from shapely.geometry import LineString, Point
|
|
12
|
-
from shapely.ops import
|
|
12
|
+
from shapely.ops import unary_union
|
|
13
13
|
|
|
14
14
|
# Build patches as in dissolved.py
|
|
15
15
|
r = partial(random.uniform, -20.0, 20.0)
|
|
16
16
|
points = [Point(r(), r()) for i in range(100)]
|
|
17
17
|
spots = [p.buffer(2.5) for p in points]
|
|
18
|
-
patches =
|
|
18
|
+
patches = unary_union(spots)
|
|
19
19
|
|
|
20
20
|
# Represent the following geolocation parameters
|
|
21
21
|
#
|
|
@@ -12,11 +12,11 @@ from itertools import islice
|
|
|
12
12
|
import math
|
|
13
13
|
import sys
|
|
14
14
|
from warnings import warn
|
|
15
|
+
from functools import wraps
|
|
15
16
|
|
|
16
17
|
from shapely.affinity import affine_transform
|
|
17
18
|
from shapely.coords import CoordinateSequence
|
|
18
19
|
from shapely.errors import WKBReadingError, WKTReadingError
|
|
19
|
-
from shapely.ftools import wraps
|
|
20
20
|
from shapely.geos import WKBWriter, WKTWriter
|
|
21
21
|
from shapely.geos import lgeos
|
|
22
22
|
from shapely.impl import DefaultImplementation, delegated
|
|
@@ -565,9 +565,9 @@ class BaseGeometry(object):
|
|
|
565
565
|
3.1415138011443009
|
|
566
566
|
>>> g.buffer(1.0, 3).area # triangle approximation
|
|
567
567
|
3.0
|
|
568
|
-
>>> list(g.buffer(1.0, cap_style=
|
|
568
|
+
>>> list(g.buffer(1.0, cap_style=CAP_STYLE.square).exterior.coords)
|
|
569
569
|
[(1.0, 1.0), (1.0, -1.0), (-1.0, -1.0), (-1.0, 1.0), (1.0, 1.0)]
|
|
570
|
-
>>> g.buffer(1.0, cap_style=
|
|
570
|
+
>>> g.buffer(1.0, cap_style=CAP_STYLE.square).area
|
|
571
571
|
4.0
|
|
572
572
|
"""
|
|
573
573
|
if quadsegs is not None:
|
|
@@ -764,6 +764,7 @@ class BaseGeometry(object):
|
|
|
764
764
|
return op(self, other)
|
|
765
765
|
|
|
766
766
|
@delegated
|
|
767
|
+
@exceptNull
|
|
767
768
|
def interpolate(self, distance, normalized=False):
|
|
768
769
|
"""Return a point at the specified distance along a linear geometry
|
|
769
770
|
|