shapely 1.6.1__tar.gz → 1.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. {Shapely-1.6.1 → Shapely-1.6.2}/CHANGES.txt +10 -0
  2. {Shapely-1.6.1/Shapely.egg-info → Shapely-1.6.2}/PKG-INFO +12 -1
  3. {Shapely-1.6.1 → Shapely-1.6.2/Shapely.egg-info}/PKG-INFO +12 -1
  4. Shapely-1.6.2/VERSION.txt +1 -0
  5. {Shapely-1.6.1 → Shapely-1.6.2}/docs/manual.rst +6 -1
  6. Shapely-1.6.2/shapely/__init__.py +1 -0
  7. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/ops.py +13 -10
  8. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/speedups/_speedups.c +760 -339
  9. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_split.py +18 -10
  10. Shapely-1.6.1/VERSION.txt +0 -1
  11. Shapely-1.6.1/shapely/__init__.py +0 -1
  12. {Shapely-1.6.1 → Shapely-1.6.2}/CREDITS.txt +0 -0
  13. {Shapely-1.6.1 → Shapely-1.6.2}/LICENSE.txt +0 -0
  14. {Shapely-1.6.1 → Shapely-1.6.2}/README.rst +0 -0
  15. {Shapely-1.6.1 → Shapely-1.6.2}/Shapely.egg-info/SOURCES.txt +0 -0
  16. {Shapely-1.6.1 → Shapely-1.6.2}/Shapely.egg-info/dependency_links.txt +0 -0
  17. {Shapely-1.6.1 → Shapely-1.6.2}/Shapely.egg-info/requires.txt +1 -1
  18. {Shapely-1.6.1 → Shapely-1.6.2}/Shapely.egg-info/top_level.txt +0 -0
  19. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/__init__.py +0 -0
  20. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/packaging/__about__.py +0 -0
  21. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/packaging/__init__.py +0 -0
  22. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/packaging/_compat.py +0 -0
  23. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/packaging/_structures.py +0 -0
  24. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/packaging/markers.py +0 -0
  25. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/packaging/requirements.py +0 -0
  26. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/packaging/specifiers.py +0 -0
  27. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/packaging/utils.py +0 -0
  28. {Shapely-1.6.1 → Shapely-1.6.2}/_vendor/packaging/version.py +0 -0
  29. {Shapely-1.6.1 → Shapely-1.6.2}/docs/design.rst +0 -0
  30. {Shapely-1.6.1 → Shapely-1.6.2}/docs/index.rst +0 -0
  31. {Shapely-1.6.1 → Shapely-1.6.2}/docs/project.rst +0 -0
  32. {Shapely-1.6.1 → Shapely-1.6.2}/setup.cfg +0 -0
  33. {Shapely-1.6.1 → Shapely-1.6.2}/setup.py +0 -0
  34. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/_buildcfg.py +0 -0
  35. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/_geos.pxi +0 -0
  36. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/affinity.py +0 -0
  37. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/algorithms/__init__.py +0 -0
  38. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/algorithms/cga.py +0 -0
  39. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/algorithms/polylabel.py +0 -0
  40. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/coords.py +0 -0
  41. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/ctypes_declarations.py +0 -0
  42. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/errors.py +0 -0
  43. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/examples/__init__.py +0 -0
  44. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/examples/dissolve.py +0 -0
  45. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/examples/geoms.py +0 -0
  46. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/examples/intersect.py +0 -0
  47. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/ftools.py +0 -0
  48. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/__init__.py +0 -0
  49. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/base.py +0 -0
  50. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/collection.py +0 -0
  51. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/geo.py +0 -0
  52. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/linestring.py +0 -0
  53. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/multilinestring.py +0 -0
  54. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/multipoint.py +0 -0
  55. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/multipolygon.py +0 -0
  56. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/point.py +0 -0
  57. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/polygon.py +0 -0
  58. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geometry/proxy.py +0 -0
  59. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/geos.py +0 -0
  60. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/impl.py +0 -0
  61. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/iterops.py +0 -0
  62. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/linref.py +0 -0
  63. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/predicates.py +0 -0
  64. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/prepared.py +0 -0
  65. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/speedups/__init__.py +0 -0
  66. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/speedups/_speedups.pyx +0 -0
  67. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/strtree.py +0 -0
  68. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/topology.py +0 -0
  69. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/validation.py +0 -0
  70. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/vectorized/__init__.py +0 -0
  71. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/vectorized/_vectorized.pyx +0 -0
  72. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/wkb.py +0 -0
  73. {Shapely-1.6.1 → Shapely-1.6.2}/shapely/wkt.py +0 -0
  74. {Shapely-1.6.1 → Shapely-1.6.2}/tests/__init__.py +0 -0
  75. {Shapely-1.6.1 → Shapely-1.6.2}/tests/binascii_hex.txt +0 -0
  76. {Shapely-1.6.1 → Shapely-1.6.2}/tests/conftest.py +0 -0
  77. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_affinity.py +0 -0
  78. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_box.py +0 -0
  79. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_cga.py +0 -0
  80. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_collection.py +0 -0
  81. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_coords.py +0 -0
  82. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_default_impl.py +0 -0
  83. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_delaunay.py +0 -0
  84. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_delegated.py +0 -0
  85. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_dlls.py +0 -0
  86. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_doctests.py +0 -0
  87. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_emptiness.py +0 -0
  88. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_empty_polygons.py +0 -0
  89. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_equality.py +0 -0
  90. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_geointerface.py +0 -0
  91. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_geomseq.py +0 -0
  92. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_geos_err_handler.py +0 -0
  93. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_getitem.py +0 -0
  94. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_hash.py +0 -0
  95. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_invalid_geometries.py +0 -0
  96. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_iterops.py +0 -0
  97. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_linear_referencing.py +0 -0
  98. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_linemerge.py +0 -0
  99. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_linestring.py +0 -0
  100. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_locale.py +0 -0
  101. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_mapping.py +0 -0
  102. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_minimum_rotated_rectangle.py +0 -0
  103. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_multi.py +0 -0
  104. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_multilinestring.py +0 -0
  105. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_multipoint.py +0 -0
  106. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_multipolygon.py +0 -0
  107. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_ndarrays.py +0 -0
  108. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_nearest.py +0 -0
  109. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_operations.py +0 -0
  110. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_operators.py +0 -0
  111. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_parallel_offset.py +0 -0
  112. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_persist.py +0 -0
  113. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_pickle.py +0 -0
  114. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_point.py +0 -0
  115. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_polygon.py +0 -0
  116. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_polygonize.py +0 -0
  117. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_polylabel.py +0 -0
  118. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_predicates.py +0 -0
  119. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_prepared.py +0 -0
  120. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_products_z.py +0 -0
  121. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_shared_paths.py +0 -0
  122. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_singularity.py +0 -0
  123. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_snap.py +0 -0
  124. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_strtree.py +0 -0
  125. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_styles.py +0 -0
  126. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_svg.py +0 -0
  127. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_transform.py +0 -0
  128. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_union.py +0 -0
  129. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_validation.py +0 -0
  130. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_vectorized.py +0 -0
  131. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_wkt.py +0 -0
  132. {Shapely-1.6.1 → Shapely-1.6.2}/tests/test_xy.py +0 -0
  133. {Shapely-1.6.1 → Shapely-1.6.2}/tests/threading_test.py +0 -0
@@ -1,6 +1,16 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ 1.6.2 (2017-10-26)
5
+ ------------------
6
+
7
+ - Handle a ``TypeError`` that can occur when geometries are torn down (#473,
8
+ #528).
9
+ - Splitting a linestring by one of its end points will now succeed instead of
10
+ failing with a ``ValueError`` (#524, #533).
11
+ - Missing documentation of a geometry's ``overlaps`` predicate has been added
12
+ (#522).
13
+
4
14
  1.6.1 (2017-09-01)
5
15
  ------------------
6
16
 
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: Shapely
3
- Version: 1.6.1
3
+ Version: 1.6.2
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
8
  License: BSD
9
+ Description-Content-Type: UNKNOWN
9
10
  Description: =======
10
11
  Shapely
11
12
  =======
@@ -241,6 +242,16 @@ Description: =======
241
242
  Changes
242
243
  =======
243
244
 
245
+ 1.6.2 (2017-10-26)
246
+ ------------------
247
+
248
+ - Handle a ``TypeError`` that can occur when geometries are torn down (#473,
249
+ #528).
250
+ - Splitting a linestring by one of its end points will now succeed instead of
251
+ failing with a ``ValueError`` (#524, #533).
252
+ - Missing documentation of a geometry's ``overlaps`` predicate has been added
253
+ (#522).
254
+
244
255
  1.6.1 (2017-09-01)
245
256
  ------------------
246
257
 
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: Shapely
3
- Version: 1.6.1
3
+ Version: 1.6.2
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
8
  License: BSD
9
+ Description-Content-Type: UNKNOWN
9
10
  Description: =======
10
11
  Shapely
11
12
  =======
@@ -241,6 +242,16 @@ Description: =======
241
242
  Changes
242
243
  =======
243
244
 
245
+ 1.6.2 (2017-10-26)
246
+ ------------------
247
+
248
+ - Handle a ``TypeError`` that can occur when geometries are torn down (#473,
249
+ #528).
250
+ - Splitting a linestring by one of its end points will now succeed instead of
251
+ failing with a ``ValueError`` (#524, #533).
252
+ - Missing documentation of a geometry's ``overlaps`` predicate has been added
253
+ (#522).
254
+
244
255
  1.6.1 (2017-09-01)
245
256
  ------------------
246
257
 
@@ -0,0 +1 @@
1
+ 1.6.2
@@ -442,7 +442,7 @@ constructor parameter.
442
442
  Polygons
443
443
  --------
444
444
 
445
- .. class:: Polygon(exterior [,interiors=None])
445
+ .. class:: Polygon(shell [,holes=None])
446
446
 
447
447
  The `Polygon` constructor takes two positional parameters. The first is an
448
448
  ordered sequence of ``(x, y[, z])`` point tuples and is treated exactly as in
@@ -1145,6 +1145,11 @@ This predicate applies to all types and is the inverse of :meth:`intersects`.
1145
1145
  In other words, geometric objects intersect if they have any boundary or
1146
1146
  interior point in common.
1147
1147
 
1148
+ .. method:: object.overlaps(other)
1149
+
1150
+ Returns ``True`` if the objects intersect (see above) but neither contains
1151
+ the other.
1152
+
1148
1153
  .. method:: object.touches(other)
1149
1154
 
1150
1155
  Returns ``True`` if the objects have at least one point in common and their
@@ -0,0 +1 @@
1
+ __version__ = "1.6.2"
@@ -257,7 +257,7 @@ def transform(func, geom):
257
257
 
258
258
  def nearest_points(g1, g2):
259
259
  """Returns the calculated nearest points in the input geometries
260
-
260
+
261
261
  The points are returned in the same order as the input geometries.
262
262
  """
263
263
  seq = lgeos.methods['nearest_points'](g1._geom, g2._geom)
@@ -339,21 +339,21 @@ class SplitOp(object):
339
339
  union = poly.boundary.union(splitter)
340
340
 
341
341
  # some polygonized geometries may be holes, we do not want them
342
- # that's why we test if the original polygon (poly) contains
342
+ # that's why we test if the original polygon (poly) contains
343
343
  # an inner point of polygonized geometry (pg)
344
344
  return [pg for pg in polygonize(union) if poly.contains(pg.representative_point())]
345
345
 
346
346
  @staticmethod
347
347
  def _split_line_with_line(line, splitter):
348
348
  """Split a LineString with another (Multi)LineString or (Multi)Polygon"""
349
-
349
+
350
350
  # if splitter is a polygon, pick it's boundary
351
351
  if splitter.type in ('Polygon', 'MultiPolygon'):
352
352
  splitter = splitter.boundary
353
353
 
354
354
  assert(isinstance(line, LineString))
355
355
  assert(isinstance(splitter, LineString) or isinstance(splitter, MultiLineString))
356
-
356
+
357
357
  if splitter.crosses(line):
358
358
  # The lines cross --> return multilinestring from the split
359
359
  return line.difference(splitter)
@@ -364,7 +364,7 @@ class SplitOp(object):
364
364
  # The lines do not cross --> return collection with identity line
365
365
  return [line]
366
366
 
367
- @staticmethod
367
+ @staticmethod
368
368
  def _split_line_with_point(line, splitter):
369
369
  """Split a LineString with a Point"""
370
370
 
@@ -374,10 +374,13 @@ class SplitOp(object):
374
374
  # check if point is in the interior of the line
375
375
  if not line.relate_pattern(splitter, '0********'):
376
376
  # point not on line interior --> return collection with single identity line
377
- # (REASONING: Returning a list with the input line reference and creating a
378
- # GeometryCollection at the general split function prevents unnecessary copying
377
+ # (REASONING: Returning a list with the input line reference and creating a
378
+ # GeometryCollection at the general split function prevents unnecessary copying
379
379
  # of linestrings in multipoint splitting function)
380
380
  return [line]
381
+ elif line.coords[0] == splitter.coords[0]:
382
+ # if line is a closed ring the previous test doesn't behave as desired
383
+ return [line]
381
384
 
382
385
  # point is on line, get the distance from the first point on line
383
386
  distance_on_line = line.project(splitter)
@@ -388,7 +391,7 @@ class SplitOp(object):
388
391
  pd = line.project(Point(p))
389
392
  if pd == distance_on_line:
390
393
  return [
391
- LineString(coords[:i+1]),
394
+ LineString(coords[:i+1]),
392
395
  LineString(coords[i:])
393
396
  ]
394
397
  elif distance_on_line < pd:
@@ -414,9 +417,9 @@ class SplitOp(object):
414
417
  # add the newly split 2 lines or the same line if not split
415
418
  new_chunks.extend(SplitOp._split_line_with_point(chunk, pt))
416
419
  chunks = new_chunks
417
-
420
+
418
421
  return chunks
419
-
422
+
420
423
  @staticmethod
421
424
  def split(geom, splitter):
422
425
  """