shapely 1.3.2__tar.gz → 1.4.0__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 (110) hide show
  1. {Shapely-1.3.2 → Shapely-1.4.0}/CHANGES.txt +21 -0
  2. {Shapely-1.3.2 → Shapely-1.4.0}/CREDITS.txt +4 -0
  3. {Shapely-1.3.2/Shapely.egg-info → Shapely-1.4.0}/PKG-INFO +86 -30
  4. {Shapely-1.3.2 → Shapely-1.4.0}/README.rst +60 -29
  5. {Shapely-1.3.2 → Shapely-1.4.0/Shapely.egg-info}/PKG-INFO +86 -30
  6. Shapely-1.4.0/Shapely.egg-info/SOURCES.txt +101 -0
  7. Shapely-1.4.0/VERSION.txt +1 -0
  8. Shapely-1.4.0/docs/design.rst +30 -0
  9. Shapely-1.4.0/docs/index.rst +19 -0
  10. Shapely-1.3.2/docs/manual.txt → Shapely-1.4.0/docs/manual.rst +218 -123
  11. Shapely-1.4.0/docs/project.rst +6 -0
  12. {Shapely-1.3.2 → Shapely-1.4.0}/setup.py +55 -54
  13. Shapely-1.4.0/shapely/__init__.py +1 -0
  14. Shapely-1.4.0/shapely/_geos.pxi +58 -0
  15. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/affinity.py +1 -1
  16. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/coords.py +7 -2
  17. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/ctypes_declarations.py +38 -1
  18. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/base.py +72 -12
  19. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/linestring.py +34 -4
  20. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/multilinestring.py +34 -8
  21. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/multipoint.py +34 -6
  22. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/multipolygon.py +39 -7
  23. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/point.py +26 -3
  24. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/polygon.py +35 -3
  25. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/proxy.py +3 -3
  26. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geos.py +19 -1
  27. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/impl.py +1 -0
  28. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/ops.py +72 -12
  29. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/speedups/__init__.py +10 -0
  30. Shapely-1.4.0/shapely/speedups/_speedups.c +8214 -0
  31. Shapely-1.4.0/shapely/strtree.py +59 -0
  32. Shapely-1.4.0/shapely/vectorized/__init__.py +3 -0
  33. Shapely-1.4.0/shapely/vectorized/_vectorized.c +20100 -0
  34. Shapely-1.4.0/shapely/vectorized/_vectorized.pyx +120 -0
  35. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/wkt.py +2 -2
  36. Shapely-1.4.0/tests/__init__.py +25 -0
  37. Shapely-1.4.0/tests/conftest.py +16 -0
  38. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_affinity.py +4 -0
  39. Shapely-1.4.0/tests/test_delaunay.py +43 -0
  40. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_linestring.py +22 -6
  41. Shapely-1.4.0/tests/test_nearest.py +22 -0
  42. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_polygon.py +30 -1
  43. Shapely-1.4.0/tests/test_strtree.py +23 -0
  44. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_transform.py +6 -0
  45. Shapely-1.4.0/tests/test_vectorized.py +107 -0
  46. Shapely-1.3.2/Shapely.egg-info/SOURCES.txt +0 -90
  47. Shapely-1.3.2/VERSION.txt +0 -1
  48. Shapely-1.3.2/shapely/__init__.py +0 -1
  49. Shapely-1.3.2/shapely/examples/world.py +0 -21
  50. Shapely-1.3.2/shapely/speedups/_speedups.c +0 -5507
  51. Shapely-1.3.2/shapely/tests/__init__.py +0 -81
  52. Shapely-1.3.2/shapely/tests/test_speedups.py +0 -39
  53. {Shapely-1.3.2 → Shapely-1.4.0}/LICENSE.txt +0 -0
  54. {Shapely-1.3.2 → Shapely-1.4.0}/Shapely.egg-info/dependency_links.txt +0 -0
  55. {Shapely-1.3.2 → Shapely-1.4.0}/Shapely.egg-info/top_level.txt +0 -0
  56. {Shapely-1.3.2 → Shapely-1.4.0}/setup.cfg +0 -0
  57. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/algorithms/__init__.py +0 -0
  58. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/algorithms/cga.py +0 -0
  59. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/examples/__init__.py +0 -0
  60. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/examples/dissolve.py +0 -0
  61. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/examples/geoms.py +0 -0
  62. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/examples/intersect.py +0 -0
  63. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/ftools.py +0 -0
  64. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/__init__.py +0 -0
  65. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/collection.py +0 -0
  66. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/geometry/geo.py +0 -0
  67. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/iterops.py +0 -0
  68. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/linref.py +0 -0
  69. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/predicates.py +0 -0
  70. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/prepared.py +0 -0
  71. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/topology.py +0 -0
  72. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/validation.py +0 -0
  73. {Shapely-1.3.2 → Shapely-1.4.0}/shapely/wkb.py +0 -0
  74. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/binascii_hex.txt +0 -0
  75. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_box.py +0 -0
  76. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_cga.py +0 -0
  77. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_collection.py +0 -0
  78. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_delegated.py +0 -0
  79. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_dlls.py +0 -0
  80. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_doctests.py +0 -0
  81. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_emptiness.py +0 -0
  82. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_equality.py +0 -0
  83. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_geointerface.py +0 -0
  84. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_geomseq.py +0 -0
  85. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_getitem.py +0 -0
  86. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_invalid_geometries.py +0 -0
  87. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_iterops.py +0 -0
  88. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_linear_referencing.py +0 -0
  89. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_linemerge.py +0 -0
  90. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_locale.py +0 -0
  91. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_mapping.py +0 -0
  92. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_multilinestring.py +0 -0
  93. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_multipoint.py +0 -0
  94. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_multipolygon.py +0 -0
  95. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_ndarrays.py +0 -0
  96. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_operations.py +0 -0
  97. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_operators.py +0 -0
  98. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_persist.py +0 -0
  99. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_pickle.py +0 -0
  100. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_point.py +0 -0
  101. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_polygonize.py +0 -0
  102. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_predicates.py +0 -0
  103. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_prepared.py +0 -0
  104. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_products_z.py +0 -0
  105. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_singularity.py +0 -0
  106. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_styles.py +0 -0
  107. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_union.py +0 -0
  108. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_validation.py +0 -0
  109. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/test_xy.py +0 -0
  110. {Shapely-1.3.2/shapely → Shapely-1.4.0}/tests/threading_test.py +0 -0
@@ -1,6 +1,27 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ 1.4.0 (2014-09-08)
5
+ ------------------
6
+ - SVG representations for IPython's inline image protocol.
7
+ - Efficient and fast vectorized contains().
8
+ - Change mitre_limit default to 5.0; raise ValueError with 0.0 (#139).
9
+ - Allow mix of tuples and Points in sped-up LineString ctor (#152).
10
+ - New STRtree class (#73).
11
+ - Add ops.nearest_points() (#147).
12
+ - Faster creation of geometric objects from others (cloning) (#165).
13
+ - Removal of tests from package.
14
+
15
+ 1.3.3 (2014-07-23)
16
+ ------------------
17
+ - Allow single-part geometries as argument to ops.cacaded_union() (#135).
18
+ - Support affine transformations of LinearRings (#112).
19
+
20
+ 1.3.3 (2014-07-23)
21
+ ------------------
22
+ - Allow single-part geometries as argument to ops.cacaded_union() (#135).
23
+ - Support affine transformations of LinearRings (#112).
24
+
4
25
  1.3.2 (2014-05-13)
5
26
  ------------------
6
27
  - Let LineString() take a sequence of Points (#130).
@@ -11,6 +11,7 @@ Shapely is written by:
11
11
  Patches contributed by:
12
12
 
13
13
  * Allan Adair (https://github.com/allanadair)
14
+ * Joshua Arnott (https://github.com/snorfalorpagus)
14
15
  * Howard Butler
15
16
  * Gabi Davar (https://github.com/mindw)
16
17
  * Phil Elson (https://github.com/pelson)
@@ -23,6 +24,7 @@ Patches contributed by:
23
24
  * William Kyngesburye (https://github.com/kyngchaos)
24
25
  * Eric Lemoine
25
26
  * Naveen Michaud-Agrawal (https://github.com/nmichaud)
27
+ * om-henners (https://github.com/om-henners)
26
28
  * psagers https://github.com/psagers
27
29
  * Jeethu Rao (https://github.com/jeethu)
28
30
  * Benjamin Root (https://github.com/WeatherGod)
@@ -32,6 +34,8 @@ Patches contributed by:
32
34
  * Kristian Thy
33
35
  * Mike Toews (https://github.com/mwtoews)
34
36
  * Maarten Vermeyen (https://github.com/maarten-vermeyen)
37
+ * Jacob Wasserman (https://github.com/jwass)
38
+ * Brandon Wood (https://github.com/woodb)
35
39
 
36
40
  See also: https://github.com/Toblerity/Shapely/graphs/contributors.
37
41
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: Shapely
3
- Version: 1.3.2
3
+ Version: 1.4.0
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/Toblerity/Shapely
6
6
  Author: Sean Gillies
@@ -12,6 +12,9 @@ Description: =======
12
12
 
13
13
  Manipulation and analysis of geometric objects in the Cartesian plane.
14
14
 
15
+ .. image:: https://travis-ci.org/Toblerity/Shapely.png?branch=master
16
+ :target: https://travis-ci.org/Toblerity/Shapely
17
+
15
18
  .. image:: http://farm3.staticflickr.com/2738/4511827859_b5822043b7_o_d.png
16
19
  :width: 800
17
20
  :height: 400
@@ -28,7 +31,7 @@ Description: =======
28
31
  Requirements
29
32
  ============
30
33
 
31
- Shapely 1.3 requires
34
+ Shapely 1.4 requires
32
35
 
33
36
  * Python >=2.6 (including Python 3.x)
34
37
  * libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
@@ -38,13 +41,14 @@ Description: =======
38
41
 
39
42
  Windows users should use the executable installer, which contains the required
40
43
  GEOS DLL. Other users should acquire libgeos_c by any means, make sure that it
41
- is on the system library path, and install from the Python package index::
44
+ is on the system library path, and install from the Python package index.
42
45
 
43
- $ pip install Shapely
46
+ .. code-block:: console
44
47
 
45
- or from a source distribution with the setup script::
48
+ $ pip install shapely
46
49
 
47
- $ python setup.py install
50
+ Shapely is also provided by popular Python distributions like Enthought Canopy
51
+ and Continuum Analytics Anaconda.
48
52
 
49
53
  .. warning:: Windows users:
50
54
  do not under any circumstances use pip (or easy_install) to uninstall
@@ -56,7 +60,9 @@ Description: =======
56
60
  =====
57
61
 
58
62
  Here is the canonical example of building an approximately circular patch by
59
- buffering a point::
63
+ buffering a point.
64
+
65
+ .. code-block:: pycon
60
66
 
61
67
  >>> from shapely.geometry import Point
62
68
  >>> patch = Point(0.0, 0.0).buffer(10.0)
@@ -73,40 +79,51 @@ Description: =======
73
79
 
74
80
  Shapely does not read or write data files, but it can serialize and deserialize
75
81
  using several well known formats and protocols. The shapely.wkb and shapely.wkt
76
- modules provide dumpers and loaders inspired by Python's pickle module.::
82
+ modules provide dumpers and loaders inspired by Python's pickle module.
83
+
84
+ .. code-block:: pycon
77
85
 
78
86
  >>> from shapely.wkt import dumps, loads
79
87
  >>> dumps(loads('POINT (0 0)'))
80
88
  'POINT (0.0000000000000000 0.0000000000000000)'
81
89
 
82
90
  All linear objects, such as the rings of a polygon (like ``patch`` above),
83
- provide the Numpy array interface.::
91
+ provide the Numpy array interface.
84
92
 
85
- >>> from numpy import asarray
86
- >>> ag = asarray(patch.exterior)
87
- >>> ag
93
+ .. code-block:: pycon
94
+
95
+ >>> import numpy as np
96
+ >>> np.array(patch.exterior)
88
97
  array([[ 1.00000000e+01, 0.00000000e+00],
89
98
  [ 9.95184727e+00, -9.80171403e-01],
90
99
  [ 9.80785280e+00, -1.95090322e+00],
91
100
  ...
92
101
  [ 1.00000000e+01, 0.00000000e+00]])
93
102
 
94
- That yields a Numpy array of [x, y] arrays. This is not always exactly what one
95
- wants for plotting shapes with Matplotlib (for example), so Shapely 1.2 adds
96
- a `xy` property for obtaining separate arrays of coordinate x and y values.::
103
+ That yields a Numpy array of `[x, y]` arrays. This is not always exactly what one
104
+ wants for plotting shapes with Matplotlib (for example), so Shapely adds
105
+ a `xy` property for obtaining separate arrays of coordinate x and y values.
106
+
107
+ .. code-block:: pycon
97
108
 
98
109
  >>> x, y = patch.exterior.xy
99
- >>> ax = asarray(x)
100
- >>> ax
110
+ >>> np.array(x)
101
111
  array([ 1.00000000e+01, 9.95184727e+00, 9.80785280e+00, ...])
102
112
 
103
- Numpy arrays can also be adapted to Shapely linestrings::
113
+ Numpy arrays of `[x, y]` arrays can also be adapted to Shapely linestrings.
104
114
 
105
- >>> from shapely.geometry import asLineString
106
- >>> asLineString(ag).length
115
+ .. code-block:: pycon
116
+
117
+ >>> from shapely.geometry import LineString
118
+ >>> LineString(np.array(patch.exterior)).length
107
119
  62.806623139095073
108
- >>> asLineString(ag).wkt
109
- 'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
120
+
121
+ Numpy arrays of x and y must be transposed.
122
+
123
+ .. code-block::
124
+
125
+ >>> LineString(np.transpose(np.array(patch.exterior.xy))).length
126
+ 62.80662313909507
110
127
 
111
128
  Shapely can also integrate with other Python GIS packages using data modeled
112
129
  after GeoJSON.
@@ -126,20 +143,34 @@ Description: =======
126
143
 
127
144
  Dependencies for developing Shapely are listed in requirements-dev.txt. Cython
128
145
  and Numpy are not required for production installations, only for development.
129
- Use of a virtual environment is strongly recommended.::
146
+ Use of a virtual environment is strongly recommended.
147
+
148
+ .. code-block:: console
130
149
 
131
150
  $ virtualenv .
132
151
  $ source bin/activate
133
152
  (env)$ pip install -r requirements-dev.txt
134
- (env)$ python setup.py develop
153
+ (env)$ pip install -e .
135
154
 
136
- Shapely uses a Zope-stye suite of unittests and doctests, exercised via
137
- setup.py.::
155
+ We use py.test to run Shapely's suite of unittests and doctests.
138
156
 
139
- (env)$ python setup.py test
157
+ .. code-block:: console
140
158
 
141
- Nosetests won't run the tests properly; Zope doctest suites are not currently
142
- supported well by nose.
159
+ (env)$ py.test tests
160
+
161
+ Roadmap and Maintenance
162
+ =======================
163
+
164
+ Shapely 1.2.x is a maintenance-only branch which supports Python 2.4-2.6, but
165
+ not Python 3+. There will be no new features in Shapely 1.2.x and only fixes
166
+ for major bugs.
167
+
168
+ Shapely 1.3.x is a maintenance-only branch supporting Pythons 2.7 and 3+.
169
+
170
+ "Shapely 3000" is the name of the next milestone. New features will include
171
+ vectorized operations, better integration with IPython Notebook, support for
172
+ fixed precision models, and more. Less ctypes and more Cython is another theme
173
+ in this branch. A 1.4 release should come out of this by Summer, 2014.
143
174
 
144
175
  Support
145
176
  =======
@@ -154,7 +185,7 @@ Description: =======
154
185
  .. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
155
186
  .. _PostGIS: http://postgis.org
156
187
  .. _GEOS: http://trac.osgeo.org/geos/
157
- .. _example apps: https://github.com/sgillies/shapely/tree/master/shapely/examples
188
+ .. _example apps: https://github.com/Toblerity/shapely/tree/master/shapely/examples
158
189
  .. _manual: http://toblerity.github.com/shapely/manual.html
159
190
  .. _Pleiades: http://pleiades.stoa.org
160
191
 
@@ -172,6 +203,7 @@ Description: =======
172
203
  Patches contributed by:
173
204
 
174
205
  * Allan Adair (https://github.com/allanadair)
206
+ * Joshua Arnott (https://github.com/snorfalorpagus)
175
207
  * Howard Butler
176
208
  * Gabi Davar (https://github.com/mindw)
177
209
  * Phil Elson (https://github.com/pelson)
@@ -184,6 +216,7 @@ Description: =======
184
216
  * William Kyngesburye (https://github.com/kyngchaos)
185
217
  * Eric Lemoine
186
218
  * Naveen Michaud-Agrawal (https://github.com/nmichaud)
219
+ * om-henners (https://github.com/om-henners)
187
220
  * psagers https://github.com/psagers
188
221
  * Jeethu Rao (https://github.com/jeethu)
189
222
  * Benjamin Root (https://github.com/WeatherGod)
@@ -193,6 +226,8 @@ Description: =======
193
226
  * Kristian Thy
194
227
  * Mike Toews (https://github.com/mwtoews)
195
228
  * Maarten Vermeyen (https://github.com/maarten-vermeyen)
229
+ * Jacob Wasserman (https://github.com/jwass)
230
+ * Brandon Wood (https://github.com/woodb)
196
231
 
197
232
  See also: https://github.com/Toblerity/Shapely/graphs/contributors.
198
233
 
@@ -213,6 +248,27 @@ Description: =======
213
248
  Changes
214
249
  =======
215
250
 
251
+ 1.4.0 (2014-09-08)
252
+ ------------------
253
+ - SVG representations for IPython's inline image protocol.
254
+ - Efficient and fast vectorized contains().
255
+ - Change mitre_limit default to 5.0; raise ValueError with 0.0 (#139).
256
+ - Allow mix of tuples and Points in sped-up LineString ctor (#152).
257
+ - New STRtree class (#73).
258
+ - Add ops.nearest_points() (#147).
259
+ - Faster creation of geometric objects from others (cloning) (#165).
260
+ - Removal of tests from package.
261
+
262
+ 1.3.3 (2014-07-23)
263
+ ------------------
264
+ - Allow single-part geometries as argument to ops.cacaded_union() (#135).
265
+ - Support affine transformations of LinearRings (#112).
266
+
267
+ 1.3.3 (2014-07-23)
268
+ ------------------
269
+ - Allow single-part geometries as argument to ops.cacaded_union() (#135).
270
+ - Support affine transformations of LinearRings (#112).
271
+
216
272
  1.3.2 (2014-05-13)
217
273
  ------------------
218
274
  - Let LineString() take a sequence of Points (#130).
@@ -4,6 +4,9 @@ Shapely
4
4
 
5
5
  Manipulation and analysis of geometric objects in the Cartesian plane.
6
6
 
7
+ .. image:: https://travis-ci.org/Toblerity/Shapely.png?branch=master
8
+ :target: https://travis-ci.org/Toblerity/Shapely
9
+
7
10
  .. image:: http://farm3.staticflickr.com/2738/4511827859_b5822043b7_o_d.png
8
11
  :width: 800
9
12
  :height: 400
@@ -20,7 +23,7 @@ integrated with packages that are. For more details, see:
20
23
  Requirements
21
24
  ============
22
25
 
23
- Shapely 1.3 requires
26
+ Shapely 1.4 requires
24
27
 
25
28
  * Python >=2.6 (including Python 3.x)
26
29
  * libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
@@ -30,13 +33,14 @@ Installation
30
33
 
31
34
  Windows users should use the executable installer, which contains the required
32
35
  GEOS DLL. Other users should acquire libgeos_c by any means, make sure that it
33
- is on the system library path, and install from the Python package index::
36
+ is on the system library path, and install from the Python package index.
34
37
 
35
- $ pip install Shapely
38
+ .. code-block:: console
36
39
 
37
- or from a source distribution with the setup script::
40
+ $ pip install shapely
38
41
 
39
- $ python setup.py install
42
+ Shapely is also provided by popular Python distributions like Enthought Canopy
43
+ and Continuum Analytics Anaconda.
40
44
 
41
45
  .. warning:: Windows users:
42
46
  do not under any circumstances use pip (or easy_install) to uninstall
@@ -48,7 +52,9 @@ Usage
48
52
  =====
49
53
 
50
54
  Here is the canonical example of building an approximately circular patch by
51
- buffering a point::
55
+ buffering a point.
56
+
57
+ .. code-block:: pycon
52
58
 
53
59
  >>> from shapely.geometry import Point
54
60
  >>> patch = Point(0.0, 0.0).buffer(10.0)
@@ -65,40 +71,51 @@ Integration
65
71
 
66
72
  Shapely does not read or write data files, but it can serialize and deserialize
67
73
  using several well known formats and protocols. The shapely.wkb and shapely.wkt
68
- modules provide dumpers and loaders inspired by Python's pickle module.::
74
+ modules provide dumpers and loaders inspired by Python's pickle module.
75
+
76
+ .. code-block:: pycon
69
77
 
70
78
  >>> from shapely.wkt import dumps, loads
71
79
  >>> dumps(loads('POINT (0 0)'))
72
80
  'POINT (0.0000000000000000 0.0000000000000000)'
73
81
 
74
82
  All linear objects, such as the rings of a polygon (like ``patch`` above),
75
- provide the Numpy array interface.::
83
+ provide the Numpy array interface.
84
+
85
+ .. code-block:: pycon
76
86
 
77
- >>> from numpy import asarray
78
- >>> ag = asarray(patch.exterior)
79
- >>> ag
87
+ >>> import numpy as np
88
+ >>> np.array(patch.exterior)
80
89
  array([[ 1.00000000e+01, 0.00000000e+00],
81
90
  [ 9.95184727e+00, -9.80171403e-01],
82
91
  [ 9.80785280e+00, -1.95090322e+00],
83
92
  ...
84
93
  [ 1.00000000e+01, 0.00000000e+00]])
85
94
 
86
- That yields a Numpy array of [x, y] arrays. This is not always exactly what one
87
- wants for plotting shapes with Matplotlib (for example), so Shapely 1.2 adds
88
- a `xy` property for obtaining separate arrays of coordinate x and y values.::
95
+ That yields a Numpy array of `[x, y]` arrays. This is not always exactly what one
96
+ wants for plotting shapes with Matplotlib (for example), so Shapely adds
97
+ a `xy` property for obtaining separate arrays of coordinate x and y values.
98
+
99
+ .. code-block:: pycon
89
100
 
90
101
  >>> x, y = patch.exterior.xy
91
- >>> ax = asarray(x)
92
- >>> ax
102
+ >>> np.array(x)
93
103
  array([ 1.00000000e+01, 9.95184727e+00, 9.80785280e+00, ...])
94
104
 
95
- Numpy arrays can also be adapted to Shapely linestrings::
105
+ Numpy arrays of `[x, y]` arrays can also be adapted to Shapely linestrings.
106
+
107
+ .. code-block:: pycon
96
108
 
97
- >>> from shapely.geometry import asLineString
98
- >>> asLineString(ag).length
109
+ >>> from shapely.geometry import LineString
110
+ >>> LineString(np.array(patch.exterior)).length
99
111
  62.806623139095073
100
- >>> asLineString(ag).wkt
101
- 'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
112
+
113
+ Numpy arrays of x and y must be transposed.
114
+
115
+ .. code-block::
116
+
117
+ >>> LineString(np.transpose(np.array(patch.exterior.xy))).length
118
+ 62.80662313909507
102
119
 
103
120
  Shapely can also integrate with other Python GIS packages using data modeled
104
121
  after GeoJSON.
@@ -118,20 +135,34 @@ Development and Testing
118
135
 
119
136
  Dependencies for developing Shapely are listed in requirements-dev.txt. Cython
120
137
  and Numpy are not required for production installations, only for development.
121
- Use of a virtual environment is strongly recommended.::
138
+ Use of a virtual environment is strongly recommended.
139
+
140
+ .. code-block:: console
122
141
 
123
142
  $ virtualenv .
124
143
  $ source bin/activate
125
144
  (env)$ pip install -r requirements-dev.txt
126
- (env)$ python setup.py develop
145
+ (env)$ pip install -e .
146
+
147
+ We use py.test to run Shapely's suite of unittests and doctests.
148
+
149
+ .. code-block:: console
150
+
151
+ (env)$ py.test tests
152
+
153
+ Roadmap and Maintenance
154
+ =======================
127
155
 
128
- Shapely uses a Zope-stye suite of unittests and doctests, exercised via
129
- setup.py.::
156
+ Shapely 1.2.x is a maintenance-only branch which supports Python 2.4-2.6, but
157
+ not Python 3+. There will be no new features in Shapely 1.2.x and only fixes
158
+ for major bugs.
130
159
 
131
- (env)$ python setup.py test
160
+ Shapely 1.3.x is a maintenance-only branch supporting Pythons 2.7 and 3+.
132
161
 
133
- Nosetests won't run the tests properly; Zope doctest suites are not currently
134
- supported well by nose.
162
+ "Shapely 3000" is the name of the next milestone. New features will include
163
+ vectorized operations, better integration with IPython Notebook, support for
164
+ fixed precision models, and more. Less ctypes and more Cython is another theme
165
+ in this branch. A 1.4 release should come out of this by Summer, 2014.
135
166
 
136
167
  Support
137
168
  =======
@@ -146,7 +177,7 @@ Bugs may be reported at https://github.com/Toblerity/Shapely.
146
177
  .. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
147
178
  .. _PostGIS: http://postgis.org
148
179
  .. _GEOS: http://trac.osgeo.org/geos/
149
- .. _example apps: https://github.com/sgillies/shapely/tree/master/shapely/examples
180
+ .. _example apps: https://github.com/Toblerity/shapely/tree/master/shapely/examples
150
181
  .. _manual: http://toblerity.github.com/shapely/manual.html
151
182
  .. _Pleiades: http://pleiades.stoa.org
152
183
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: Shapely
3
- Version: 1.3.2
3
+ Version: 1.4.0
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/Toblerity/Shapely
6
6
  Author: Sean Gillies
@@ -12,6 +12,9 @@ Description: =======
12
12
 
13
13
  Manipulation and analysis of geometric objects in the Cartesian plane.
14
14
 
15
+ .. image:: https://travis-ci.org/Toblerity/Shapely.png?branch=master
16
+ :target: https://travis-ci.org/Toblerity/Shapely
17
+
15
18
  .. image:: http://farm3.staticflickr.com/2738/4511827859_b5822043b7_o_d.png
16
19
  :width: 800
17
20
  :height: 400
@@ -28,7 +31,7 @@ Description: =======
28
31
  Requirements
29
32
  ============
30
33
 
31
- Shapely 1.3 requires
34
+ Shapely 1.4 requires
32
35
 
33
36
  * Python >=2.6 (including Python 3.x)
34
37
  * libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
@@ -38,13 +41,14 @@ Description: =======
38
41
 
39
42
  Windows users should use the executable installer, which contains the required
40
43
  GEOS DLL. Other users should acquire libgeos_c by any means, make sure that it
41
- is on the system library path, and install from the Python package index::
44
+ is on the system library path, and install from the Python package index.
42
45
 
43
- $ pip install Shapely
46
+ .. code-block:: console
44
47
 
45
- or from a source distribution with the setup script::
48
+ $ pip install shapely
46
49
 
47
- $ python setup.py install
50
+ Shapely is also provided by popular Python distributions like Enthought Canopy
51
+ and Continuum Analytics Anaconda.
48
52
 
49
53
  .. warning:: Windows users:
50
54
  do not under any circumstances use pip (or easy_install) to uninstall
@@ -56,7 +60,9 @@ Description: =======
56
60
  =====
57
61
 
58
62
  Here is the canonical example of building an approximately circular patch by
59
- buffering a point::
63
+ buffering a point.
64
+
65
+ .. code-block:: pycon
60
66
 
61
67
  >>> from shapely.geometry import Point
62
68
  >>> patch = Point(0.0, 0.0).buffer(10.0)
@@ -73,40 +79,51 @@ Description: =======
73
79
 
74
80
  Shapely does not read or write data files, but it can serialize and deserialize
75
81
  using several well known formats and protocols. The shapely.wkb and shapely.wkt
76
- modules provide dumpers and loaders inspired by Python's pickle module.::
82
+ modules provide dumpers and loaders inspired by Python's pickle module.
83
+
84
+ .. code-block:: pycon
77
85
 
78
86
  >>> from shapely.wkt import dumps, loads
79
87
  >>> dumps(loads('POINT (0 0)'))
80
88
  'POINT (0.0000000000000000 0.0000000000000000)'
81
89
 
82
90
  All linear objects, such as the rings of a polygon (like ``patch`` above),
83
- provide the Numpy array interface.::
91
+ provide the Numpy array interface.
84
92
 
85
- >>> from numpy import asarray
86
- >>> ag = asarray(patch.exterior)
87
- >>> ag
93
+ .. code-block:: pycon
94
+
95
+ >>> import numpy as np
96
+ >>> np.array(patch.exterior)
88
97
  array([[ 1.00000000e+01, 0.00000000e+00],
89
98
  [ 9.95184727e+00, -9.80171403e-01],
90
99
  [ 9.80785280e+00, -1.95090322e+00],
91
100
  ...
92
101
  [ 1.00000000e+01, 0.00000000e+00]])
93
102
 
94
- That yields a Numpy array of [x, y] arrays. This is not always exactly what one
95
- wants for plotting shapes with Matplotlib (for example), so Shapely 1.2 adds
96
- a `xy` property for obtaining separate arrays of coordinate x and y values.::
103
+ That yields a Numpy array of `[x, y]` arrays. This is not always exactly what one
104
+ wants for plotting shapes with Matplotlib (for example), so Shapely adds
105
+ a `xy` property for obtaining separate arrays of coordinate x and y values.
106
+
107
+ .. code-block:: pycon
97
108
 
98
109
  >>> x, y = patch.exterior.xy
99
- >>> ax = asarray(x)
100
- >>> ax
110
+ >>> np.array(x)
101
111
  array([ 1.00000000e+01, 9.95184727e+00, 9.80785280e+00, ...])
102
112
 
103
- Numpy arrays can also be adapted to Shapely linestrings::
113
+ Numpy arrays of `[x, y]` arrays can also be adapted to Shapely linestrings.
104
114
 
105
- >>> from shapely.geometry import asLineString
106
- >>> asLineString(ag).length
115
+ .. code-block:: pycon
116
+
117
+ >>> from shapely.geometry import LineString
118
+ >>> LineString(np.array(patch.exterior)).length
107
119
  62.806623139095073
108
- >>> asLineString(ag).wkt
109
- 'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
120
+
121
+ Numpy arrays of x and y must be transposed.
122
+
123
+ .. code-block::
124
+
125
+ >>> LineString(np.transpose(np.array(patch.exterior.xy))).length
126
+ 62.80662313909507
110
127
 
111
128
  Shapely can also integrate with other Python GIS packages using data modeled
112
129
  after GeoJSON.
@@ -126,20 +143,34 @@ Description: =======
126
143
 
127
144
  Dependencies for developing Shapely are listed in requirements-dev.txt. Cython
128
145
  and Numpy are not required for production installations, only for development.
129
- Use of a virtual environment is strongly recommended.::
146
+ Use of a virtual environment is strongly recommended.
147
+
148
+ .. code-block:: console
130
149
 
131
150
  $ virtualenv .
132
151
  $ source bin/activate
133
152
  (env)$ pip install -r requirements-dev.txt
134
- (env)$ python setup.py develop
153
+ (env)$ pip install -e .
135
154
 
136
- Shapely uses a Zope-stye suite of unittests and doctests, exercised via
137
- setup.py.::
155
+ We use py.test to run Shapely's suite of unittests and doctests.
138
156
 
139
- (env)$ python setup.py test
157
+ .. code-block:: console
140
158
 
141
- Nosetests won't run the tests properly; Zope doctest suites are not currently
142
- supported well by nose.
159
+ (env)$ py.test tests
160
+
161
+ Roadmap and Maintenance
162
+ =======================
163
+
164
+ Shapely 1.2.x is a maintenance-only branch which supports Python 2.4-2.6, but
165
+ not Python 3+. There will be no new features in Shapely 1.2.x and only fixes
166
+ for major bugs.
167
+
168
+ Shapely 1.3.x is a maintenance-only branch supporting Pythons 2.7 and 3+.
169
+
170
+ "Shapely 3000" is the name of the next milestone. New features will include
171
+ vectorized operations, better integration with IPython Notebook, support for
172
+ fixed precision models, and more. Less ctypes and more Cython is another theme
173
+ in this branch. A 1.4 release should come out of this by Summer, 2014.
143
174
 
144
175
  Support
145
176
  =======
@@ -154,7 +185,7 @@ Description: =======
154
185
  .. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
155
186
  .. _PostGIS: http://postgis.org
156
187
  .. _GEOS: http://trac.osgeo.org/geos/
157
- .. _example apps: https://github.com/sgillies/shapely/tree/master/shapely/examples
188
+ .. _example apps: https://github.com/Toblerity/shapely/tree/master/shapely/examples
158
189
  .. _manual: http://toblerity.github.com/shapely/manual.html
159
190
  .. _Pleiades: http://pleiades.stoa.org
160
191
 
@@ -172,6 +203,7 @@ Description: =======
172
203
  Patches contributed by:
173
204
 
174
205
  * Allan Adair (https://github.com/allanadair)
206
+ * Joshua Arnott (https://github.com/snorfalorpagus)
175
207
  * Howard Butler
176
208
  * Gabi Davar (https://github.com/mindw)
177
209
  * Phil Elson (https://github.com/pelson)
@@ -184,6 +216,7 @@ Description: =======
184
216
  * William Kyngesburye (https://github.com/kyngchaos)
185
217
  * Eric Lemoine
186
218
  * Naveen Michaud-Agrawal (https://github.com/nmichaud)
219
+ * om-henners (https://github.com/om-henners)
187
220
  * psagers https://github.com/psagers
188
221
  * Jeethu Rao (https://github.com/jeethu)
189
222
  * Benjamin Root (https://github.com/WeatherGod)
@@ -193,6 +226,8 @@ Description: =======
193
226
  * Kristian Thy
194
227
  * Mike Toews (https://github.com/mwtoews)
195
228
  * Maarten Vermeyen (https://github.com/maarten-vermeyen)
229
+ * Jacob Wasserman (https://github.com/jwass)
230
+ * Brandon Wood (https://github.com/woodb)
196
231
 
197
232
  See also: https://github.com/Toblerity/Shapely/graphs/contributors.
198
233
 
@@ -213,6 +248,27 @@ Description: =======
213
248
  Changes
214
249
  =======
215
250
 
251
+ 1.4.0 (2014-09-08)
252
+ ------------------
253
+ - SVG representations for IPython's inline image protocol.
254
+ - Efficient and fast vectorized contains().
255
+ - Change mitre_limit default to 5.0; raise ValueError with 0.0 (#139).
256
+ - Allow mix of tuples and Points in sped-up LineString ctor (#152).
257
+ - New STRtree class (#73).
258
+ - Add ops.nearest_points() (#147).
259
+ - Faster creation of geometric objects from others (cloning) (#165).
260
+ - Removal of tests from package.
261
+
262
+ 1.3.3 (2014-07-23)
263
+ ------------------
264
+ - Allow single-part geometries as argument to ops.cacaded_union() (#135).
265
+ - Support affine transformations of LinearRings (#112).
266
+
267
+ 1.3.3 (2014-07-23)
268
+ ------------------
269
+ - Allow single-part geometries as argument to ops.cacaded_union() (#135).
270
+ - Support affine transformations of LinearRings (#112).
271
+
216
272
  1.3.2 (2014-05-13)
217
273
  ------------------
218
274
  - Let LineString() take a sequence of Points (#130).