shapely 1.3.1__tar.gz → 1.3.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 (94) hide show
  1. {Shapely-1.3.1 → Shapely-1.3.2}/CHANGES.txt +4 -0
  2. {Shapely-1.3.1 → Shapely-1.3.2}/CREDITS.txt +1 -0
  3. {Shapely-1.3.1/Shapely.egg-info → Shapely-1.3.2}/PKG-INFO +7 -2
  4. {Shapely-1.3.1 → Shapely-1.3.2}/README.rst +1 -1
  5. {Shapely-1.3.1 → Shapely-1.3.2/Shapely.egg-info}/PKG-INFO +7 -2
  6. Shapely-1.3.2/VERSION.txt +1 -0
  7. Shapely-1.3.2/shapely/__init__.py +1 -0
  8. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/linestring.py +10 -2
  9. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/speedups/_speedups.c +1 -1
  10. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_linestring.py +11 -1
  11. Shapely-1.3.1/VERSION.txt +0 -1
  12. Shapely-1.3.1/shapely/__init__.py +0 -1
  13. {Shapely-1.3.1 → Shapely-1.3.2}/LICENSE.txt +0 -0
  14. {Shapely-1.3.1 → Shapely-1.3.2}/Shapely.egg-info/SOURCES.txt +0 -0
  15. {Shapely-1.3.1 → Shapely-1.3.2}/Shapely.egg-info/dependency_links.txt +0 -0
  16. {Shapely-1.3.1 → Shapely-1.3.2}/Shapely.egg-info/top_level.txt +0 -0
  17. {Shapely-1.3.1 → Shapely-1.3.2}/docs/manual.txt +0 -0
  18. {Shapely-1.3.1 → Shapely-1.3.2}/setup.cfg +0 -0
  19. {Shapely-1.3.1 → Shapely-1.3.2}/setup.py +0 -0
  20. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/affinity.py +0 -0
  21. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/algorithms/__init__.py +0 -0
  22. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/algorithms/cga.py +0 -0
  23. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/coords.py +0 -0
  24. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/ctypes_declarations.py +0 -0
  25. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/examples/__init__.py +0 -0
  26. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/examples/dissolve.py +0 -0
  27. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/examples/geoms.py +0 -0
  28. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/examples/intersect.py +0 -0
  29. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/examples/world.py +0 -0
  30. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/ftools.py +0 -0
  31. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/__init__.py +0 -0
  32. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/base.py +0 -0
  33. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/collection.py +0 -0
  34. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/geo.py +0 -0
  35. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/multilinestring.py +0 -0
  36. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/multipoint.py +0 -0
  37. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/multipolygon.py +0 -0
  38. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/point.py +0 -0
  39. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/polygon.py +0 -0
  40. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geometry/proxy.py +0 -0
  41. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/geos.py +0 -0
  42. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/impl.py +0 -0
  43. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/iterops.py +0 -0
  44. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/linref.py +0 -0
  45. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/ops.py +0 -0
  46. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/predicates.py +0 -0
  47. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/prepared.py +0 -0
  48. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/speedups/__init__.py +0 -0
  49. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/__init__.py +0 -0
  50. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/binascii_hex.txt +0 -0
  51. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_affinity.py +0 -0
  52. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_box.py +0 -0
  53. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_cga.py +0 -0
  54. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_collection.py +0 -0
  55. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_delegated.py +0 -0
  56. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_dlls.py +0 -0
  57. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_doctests.py +0 -0
  58. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_emptiness.py +0 -0
  59. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_equality.py +0 -0
  60. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_geointerface.py +0 -0
  61. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_geomseq.py +0 -0
  62. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_getitem.py +0 -0
  63. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_invalid_geometries.py +0 -0
  64. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_iterops.py +0 -0
  65. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_linear_referencing.py +0 -0
  66. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_linemerge.py +0 -0
  67. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_locale.py +0 -0
  68. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_mapping.py +0 -0
  69. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_multilinestring.py +0 -0
  70. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_multipoint.py +0 -0
  71. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_multipolygon.py +0 -0
  72. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_ndarrays.py +0 -0
  73. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_operations.py +0 -0
  74. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_operators.py +0 -0
  75. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_persist.py +0 -0
  76. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_pickle.py +0 -0
  77. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_point.py +0 -0
  78. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_polygon.py +0 -0
  79. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_polygonize.py +0 -0
  80. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_predicates.py +0 -0
  81. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_prepared.py +0 -0
  82. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_products_z.py +0 -0
  83. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_singularity.py +0 -0
  84. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_speedups.py +0 -0
  85. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_styles.py +0 -0
  86. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_transform.py +0 -0
  87. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_union.py +0 -0
  88. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_validation.py +0 -0
  89. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/test_xy.py +0 -0
  90. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/tests/threading_test.py +0 -0
  91. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/topology.py +0 -0
  92. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/validation.py +0 -0
  93. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/wkb.py +0 -0
  94. {Shapely-1.3.1 → Shapely-1.3.2}/shapely/wkt.py +0 -0
@@ -1,6 +1,10 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ 1.3.2 (2014-05-13)
5
+ ------------------
6
+ - Let LineString() take a sequence of Points (#130).
7
+
4
8
  1.3.1 (2014-04-22)
5
9
  ------------------
6
10
  - More reliable proxy cleanup on exit (#106).
@@ -20,6 +20,7 @@ Patches contributed by:
20
20
  * Kelsey Jordahl (https://github.com/kjordahl)
21
21
  * Fr |eaigue| d |eaigue| ric Junod
22
22
  * Thomas Kluyver (https://github.com/takluyver)
23
+ * William Kyngesburye (https://github.com/kyngchaos)
23
24
  * Eric Lemoine
24
25
  * Naveen Michaud-Agrawal (https://github.com/nmichaud)
25
26
  * psagers https://github.com/psagers
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: Shapely
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/Toblerity/Shapely
6
6
  Author: Sean Gillies
@@ -149,7 +149,7 @@ Description: =======
149
149
 
150
150
  Bugs may be reported at https://github.com/Toblerity/Shapely.
151
151
 
152
- .. include:: ../CREDITS.txt
152
+
153
153
 
154
154
  .. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
155
155
  .. _PostGIS: http://postgis.org
@@ -181,6 +181,7 @@ Description: =======
181
181
  * Kelsey Jordahl (https://github.com/kjordahl)
182
182
  * Fr |eaigue| d |eaigue| ric Junod
183
183
  * Thomas Kluyver (https://github.com/takluyver)
184
+ * William Kyngesburye (https://github.com/kyngchaos)
184
185
  * Eric Lemoine
185
186
  * Naveen Michaud-Agrawal (https://github.com/nmichaud)
186
187
  * psagers https://github.com/psagers
@@ -212,6 +213,10 @@ Description: =======
212
213
  Changes
213
214
  =======
214
215
 
216
+ 1.3.2 (2014-05-13)
217
+ ------------------
218
+ - Let LineString() take a sequence of Points (#130).
219
+
215
220
  1.3.1 (2014-04-22)
216
221
  ------------------
217
222
  - More reliable proxy cleanup on exit (#106).
@@ -141,7 +141,7 @@ http://lists.gispython.org/mailman/listinfo/community.
141
141
 
142
142
  Bugs may be reported at https://github.com/Toblerity/Shapely.
143
143
 
144
- .. include:: ../CREDITS.txt
144
+ .. include:: CREDITS.txt
145
145
 
146
146
  .. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
147
147
  .. _PostGIS: http://postgis.org
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: Shapely
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/Toblerity/Shapely
6
6
  Author: Sean Gillies
@@ -149,7 +149,7 @@ Description: =======
149
149
 
150
150
  Bugs may be reported at https://github.com/Toblerity/Shapely.
151
151
 
152
- .. include:: ../CREDITS.txt
152
+
153
153
 
154
154
  .. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
155
155
  .. _PostGIS: http://postgis.org
@@ -181,6 +181,7 @@ Description: =======
181
181
  * Kelsey Jordahl (https://github.com/kjordahl)
182
182
  * Fr |eaigue| d |eaigue| ric Junod
183
183
  * Thomas Kluyver (https://github.com/takluyver)
184
+ * William Kyngesburye (https://github.com/kyngchaos)
184
185
  * Eric Lemoine
185
186
  * Naveen Michaud-Agrawal (https://github.com/nmichaud)
186
187
  * psagers https://github.com/psagers
@@ -212,6 +213,10 @@ Description: =======
212
213
  Changes
213
214
  =======
214
215
 
216
+ 1.3.2 (2014-05-13)
217
+ ------------------
218
+ - Let LineString() take a sequence of Points (#130).
219
+
215
220
  1.3.1 (2014-04-22)
216
221
  ------------------
217
222
  - More reliable proxy cleanup on exit (#106).
@@ -0,0 +1 @@
1
+ 1.3.2
@@ -0,0 +1 @@
1
+ __version__ = "1.3.2"
@@ -12,6 +12,7 @@ from shapely.coords import required
12
12
  from shapely.geos import lgeos, TopologicalError
13
13
  from shapely.geometry.base import BaseGeometry, geom_factory, JOIN_STYLE
14
14
  from shapely.geometry.proxy import CachingGeometryProxy
15
+ from shapely.geometry.point import Point
15
16
 
16
17
  __all__ = ['LineString', 'asLineString']
17
18
 
@@ -221,8 +222,15 @@ def geos_linestring_from_py(ob, update_geom=None, update_ndim=0):
221
222
  if m < 2:
222
223
  raise ValueError(
223
224
  "LineStrings must have at least 2 coordinate tuples")
225
+
226
+ def _coords(o):
227
+ if isinstance(o, Point):
228
+ return o.coords[0]
229
+ else:
230
+ return o
231
+
224
232
  try:
225
- n = len(ob[0])
233
+ n = len(_coords(ob[0]))
226
234
  except TypeError:
227
235
  raise ValueError(
228
236
  "Input %s is the wrong shape for a LineString" % str(ob))
@@ -240,7 +248,7 @@ def geos_linestring_from_py(ob, update_geom=None, update_ndim=0):
240
248
 
241
249
  # add to coordinate sequence
242
250
  for i in range(m):
243
- coords = ob[i]
251
+ coords = _coords(ob[i])
244
252
  # Because of a bug in the GEOS C API,
245
253
  # always set X before Y
246
254
  lgeos.GEOSCoordSeq_setX(cs, i, coords[0])
@@ -1,4 +1,4 @@
1
- /* Generated by Cython 0.20 on Tue Apr 22 10:32:38 2014 */
1
+ /* Generated by Cython 0.20 on Tue May 13 08:23:58 2014 */
2
2
 
3
3
  #define PY_SSIZE_T_CLEAN
4
4
  #ifndef CYTHON_USE_PYLONG_INTERNALS
@@ -1,5 +1,5 @@
1
1
  from . import unittest, numpy
2
- from shapely.geometry import LineString, asLineString
2
+ from shapely.geometry import LineString, asLineString, Point
3
3
 
4
4
 
5
5
  class LineStringTestCase(unittest.TestCase):
@@ -11,6 +11,16 @@ class LineStringTestCase(unittest.TestCase):
11
11
  self.assertEqual(len(line.coords), 2)
12
12
  self.assertEqual(line.coords[:], [(1.0, 2.0), (3.0, 4.0)])
13
13
 
14
+ # From Points
15
+ line2 = LineString((Point(1.0, 2.0), Point(3.0, 4.0)))
16
+ self.assertEqual(len(line2.coords), 2)
17
+ self.assertEqual(line2.coords[:], [(1.0, 2.0), (3.0, 4.0)])
18
+
19
+ # From mix of tuples and Points
20
+ line3 = LineString((Point(1.0, 2.0), (2.0, 3.0), Point(3.0, 4.0)))
21
+ self.assertEqual(len(line3.coords), 3)
22
+ self.assertEqual(line3.coords[:], [(1.0, 2.0), (2.0, 3.0), (3.0, 4.0)])
23
+
14
24
  # From lines
15
25
  copy = LineString(line)
16
26
  self.assertEqual(len(copy.coords), 2)
Shapely-1.3.1/VERSION.txt DELETED
@@ -1 +0,0 @@
1
- 1.3.1
@@ -1 +0,0 @@
1
- __version__ = "1.3.1"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes