shapely 1.2.17__tar.gz → 1.2.18__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.2.17 → Shapely-1.2.18}/CHANGES.txt +8 -0
- {Shapely-1.2.17/Shapely.egg-info → Shapely-1.2.18}/PKG-INFO +90 -62
- {Shapely-1.2.17 → Shapely-1.2.18}/README.rst +26 -6
- {Shapely-1.2.17 → Shapely-1.2.18/Shapely.egg-info}/PKG-INFO +90 -62
- {Shapely-1.2.17 → Shapely-1.2.18}/Shapely.egg-info/SOURCES.txt +2 -0
- Shapely-1.2.18/VERSION.txt +1 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/docs/manual.txt +409 -128
- {Shapely-1.2.17 → Shapely-1.2.18}/setup.py +4 -4
- Shapely-1.2.18/shapely/__init__.py +1 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/affinity.py +25 -21
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/ctypes_declarations.py +4 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/__init__.py +2 -2
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/base.py +15 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/geo.py +2 -2
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/multilinestring.py +1 -1
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/multipolygon.py +7 -4
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geos.py +8 -0
- Shapely-1.2.18/shapely/ops.py +209 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/speedups/_speedups.c +1600 -790
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/MultiPolygon.txt +1 -1
- Shapely-1.2.18/shapely/tests/Operators.txt +18 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/__init__.py +2 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/polygonize.txt +14 -3
- Shapely-1.2.18/shapely/tests/test_emptiness.py +52 -0
- Shapely-1.2.18/shapely/tests/test_transform.py +61 -0
- Shapely-1.2.17/VERSION.txt +0 -1
- Shapely-1.2.17/shapely/__init__.py +0 -1
- Shapely-1.2.17/shapely/ops.py +0 -102
- Shapely-1.2.17/shapely/tests/test_emptiness.py +0 -24
- {Shapely-1.2.17 → Shapely-1.2.18}/CREDITS.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/LICENSE.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/setup.cfg +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/algorithms/__init__.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/algorithms/cga.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/coords.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/examples/__init__.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/examples/dissolve.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/examples/geoms.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/examples/intersect.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/examples/world.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/ftools.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/collection.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/linestring.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/multipoint.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/point.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/polygon.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/geometry/proxy.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/impl.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/iterops.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/linref.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/predicates.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/prepared.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/speedups/__init__.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/Array.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/GeoInterface.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/IterOps.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/LineString.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/MultiLineString.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/MultiPoint.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/Operations.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/Persist.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/Point.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/Polygon.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/Predicates.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/attribute-chains.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/binascii_hex.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/cascaded_union.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/dimensions.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/invalid_intersection.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/linemerge.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_affinity.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_box.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_cga.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_collection.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_delegated.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_dlls.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_doctests.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_equality.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_geomseq.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_getitem.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_linear_referencing.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_mapping.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_ndarrays.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_pickle.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_prepared.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_products_z.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_singularity.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_speedups.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_unary_union.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_validation.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/test_xy.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/threading_test.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/tests/wkt_locale.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/topology.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/validation.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/wkb.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.18}/shapely/wkt.py +0 -0
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
1.2.18 (2013-07-23)
|
|
5
|
+
--------------------
|
|
6
|
+
- Add shapely.ops.transform.
|
|
7
|
+
- Permit empty sequences in collection constructors (#49, #50).
|
|
8
|
+
- Individual polygons in MultiPolygon.__geo_interface__ are changed to tuples
|
|
9
|
+
to match Polygon.__geo_interface__ (#51).
|
|
10
|
+
- Add shapely.ops.polygonize_full (#57).
|
|
11
|
+
|
|
4
12
|
1.2.17 (2013-01-27)
|
|
5
13
|
-------------------
|
|
6
14
|
- Avoid circular import between wkt/wkb and geometry.base by moving calls
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 1.
|
|
1
|
+
Metadata-Version: 1.1
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.18
|
|
4
4
|
Summary: Geometric objects, predicates, and operations
|
|
5
5
|
Home-page: https://github.com/Toblerity/Shapely
|
|
6
6
|
Author: Sean Gillies
|
|
@@ -14,8 +14,8 @@ Description: =======
|
|
|
14
14
|
Pythonistas.
|
|
15
15
|
|
|
16
16
|
.. image:: http://farm3.staticflickr.com/2738/4511827859_b5822043b7_o_d.png
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
:width: 800
|
|
18
|
+
:height: 400
|
|
19
19
|
|
|
20
20
|
Shapely is a BSD-licensed Python package for manipulation and analysis of
|
|
21
21
|
planar geometric objects. It is based on the widely deployed GEOS_ (the engine
|
|
@@ -24,7 +24,6 @@ Description: =======
|
|
|
24
24
|
concerned with data formats or coordinate systems, but can be readily
|
|
25
25
|
integrated with packages that are. For more details, see:
|
|
26
26
|
|
|
27
|
-
* Shapely wiki_
|
|
28
27
|
* Shapely manual_
|
|
29
28
|
* Shapely `example apps`_
|
|
30
29
|
|
|
@@ -43,11 +42,17 @@ Description: =======
|
|
|
43
42
|
GEOS DLL. Other users should acquire libgeos_c by any means, make sure that it
|
|
44
43
|
is on the system library path, and install from the Python package index::
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
$ pip install Shapely
|
|
47
46
|
|
|
48
47
|
or from a source distribution with the setup script::
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
$ python setup.py install
|
|
50
|
+
|
|
51
|
+
.. warning:: Windows users:
|
|
52
|
+
do not under any circumstances use pip (or easy_install) to uninstall
|
|
53
|
+
Shapely versions < 1.2.17. Due to the way Shapely used to install its GEOS
|
|
54
|
+
DLL and a distribute or setuptools bug, your Python installation may be
|
|
55
|
+
broken by an uninstall command. Shapely 1.2.17 will uninstall safely.
|
|
51
56
|
|
|
52
57
|
Usage
|
|
53
58
|
=====
|
|
@@ -55,12 +60,12 @@ Description: =======
|
|
|
55
60
|
Here is the canonical example of building an approximately circular patch by
|
|
56
61
|
buffering a point::
|
|
57
62
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
>>> from shapely.geometry import Point
|
|
64
|
+
>>> patch = Point(0.0, 0.0).buffer(10.0)
|
|
65
|
+
>>> patch
|
|
66
|
+
<shapely.geometry.polygon.Polygon object at 0x...>
|
|
67
|
+
>>> patch.area
|
|
68
|
+
313.65484905459385
|
|
64
69
|
|
|
65
70
|
See the manual_ for comprehensive usage snippets and the dissolve.py and
|
|
66
71
|
intersect.py `example apps`_.
|
|
@@ -72,38 +77,51 @@ Description: =======
|
|
|
72
77
|
using several well known formats and protocols. The shapely.wkb and shapely.wkt
|
|
73
78
|
modules provide dumpers and loaders inspired by Python's pickle module.::
|
|
74
79
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
>>> from shapely.wkt import dumps, loads
|
|
81
|
+
>>> dumps(loads('POINT (0 0)'))
|
|
82
|
+
'POINT (0.0000000000000000 0.0000000000000000)'
|
|
78
83
|
|
|
79
84
|
All linear objects, such as the rings of a polygon (like ``patch`` above),
|
|
80
85
|
provide the Numpy array interface.::
|
|
81
86
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
>>> from numpy import asarray
|
|
88
|
+
>>> ag = asarray(patch.exterior)
|
|
89
|
+
>>> ag
|
|
90
|
+
array([[ 1.00000000e+01, 0.00000000e+00],
|
|
91
|
+
[ 9.95184727e+00, -9.80171403e-01],
|
|
92
|
+
[ 9.80785280e+00, -1.95090322e+00],
|
|
93
|
+
...
|
|
94
|
+
[ 1.00000000e+01, 0.00000000e+00]])
|
|
90
95
|
|
|
91
|
-
That yields a
|
|
96
|
+
That yields a Numpy array of [x, y] arrays. This is not always exactly what one
|
|
92
97
|
wants for plotting shapes with Matplotlib (for example), so Shapely 1.2 adds
|
|
93
98
|
a `xy` property for obtaining separate arrays of coordinate x and y values.::
|
|
94
99
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
>>> x, y = patch.exterior.xy
|
|
101
|
+
>>> ax = asarray(x)
|
|
102
|
+
>>> ax
|
|
103
|
+
array([ 1.00000000e+01, 9.95184727e+00, 9.80785280e+00, ...])
|
|
99
104
|
|
|
100
105
|
Numpy arrays can also be adapted to Shapely linestrings::
|
|
101
106
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
>>> from shapely.geometry import asLineString
|
|
108
|
+
>>> asLineString(ag).length
|
|
109
|
+
62.806623139095073
|
|
110
|
+
>>> asLineString(ag).wkt
|
|
111
|
+
'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
|
|
112
|
+
|
|
113
|
+
Shapely can also integrate with other Python GIS packages using data modeled
|
|
114
|
+
after GeoJSON.
|
|
115
|
+
|
|
116
|
+
.. sourcecode:: pycon
|
|
117
|
+
|
|
118
|
+
>>> import json
|
|
119
|
+
>>> from shapely.geometry import mapping, shape
|
|
120
|
+
>>> s = shape(json.loads('{"type": "Point", "coordinates": [0.0, 0.0]}'))
|
|
121
|
+
>>> s
|
|
122
|
+
<shapely.geometry.point.Point object at 0x...>
|
|
123
|
+
>>> print(json.dumps(mapping(s)))
|
|
124
|
+
{"type": "Point", "coordinates": [0.0, 0.0]}
|
|
107
125
|
|
|
108
126
|
Testing
|
|
109
127
|
=======
|
|
@@ -111,7 +129,7 @@ Description: =======
|
|
|
111
129
|
Shapely uses a Zope-stye suite of unittests and doctests, exercised via
|
|
112
130
|
setup.py.::
|
|
113
131
|
|
|
114
|
-
|
|
132
|
+
$ python setup.py test
|
|
115
133
|
|
|
116
134
|
Nosetests won't run the tests properly; Zope doctest suites are not currently
|
|
117
135
|
supported well by nose.
|
|
@@ -119,15 +137,17 @@ Description: =======
|
|
|
119
137
|
Support
|
|
120
138
|
=======
|
|
121
139
|
|
|
122
|
-
|
|
140
|
+
Please discuss Shapely with us at
|
|
141
|
+
http://lists.gispython.org/mailman/listinfo/community.
|
|
142
|
+
|
|
143
|
+
Bugs may be reported at https://github.com/Toblerity/Shapely.
|
|
123
144
|
|
|
124
145
|
|
|
125
146
|
|
|
126
147
|
.. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
|
|
127
148
|
.. _PostGIS: http://postgis.org
|
|
128
149
|
.. _GEOS: http://trac.osgeo.org/geos/
|
|
129
|
-
.. _example apps:
|
|
130
|
-
.. _wiki: http://trac.gispython.org/lab/wiki/Shapely
|
|
150
|
+
.. _example apps: https://github.com/sgillies/shapely/tree/master/shapely/examples
|
|
131
151
|
.. _manual: http://toblerity.github.com/shapely/manual.html
|
|
132
152
|
.. _Pleiades: http://pleiades.stoa.org
|
|
133
153
|
|
|
@@ -164,16 +184,24 @@ Description: =======
|
|
|
164
184
|
U.S. National Endowment for the Humanities (http://www.neh.gov).
|
|
165
185
|
|
|
166
186
|
.. |eaigue| unicode:: U+00E9
|
|
167
|
-
|
|
187
|
+
:trim:
|
|
168
188
|
.. _Pleiades: http://pleiades.stoa.org
|
|
169
189
|
|
|
170
190
|
Changes
|
|
171
191
|
=======
|
|
172
192
|
|
|
193
|
+
1.2.18 (2013-07-23)
|
|
194
|
+
--------------------
|
|
195
|
+
- Add shapely.ops.transform.
|
|
196
|
+
- Permit empty sequences in collection constructors (#49, #50).
|
|
197
|
+
- Individual polygons in MultiPolygon.__geo_interface__ are changed to tuples
|
|
198
|
+
to match Polygon.__geo_interface__ (#51).
|
|
199
|
+
- Add shapely.ops.polygonize_full (#57).
|
|
200
|
+
|
|
173
201
|
1.2.17 (2013-01-27)
|
|
174
202
|
-------------------
|
|
175
203
|
- Avoid circular import between wkt/wkb and geometry.base by moving calls
|
|
176
|
-
|
|
204
|
+
to GEOS serializers to the latter module.
|
|
177
205
|
- Set _ndim when unpickling (issue #6).
|
|
178
206
|
- Don't install DLLs to Python's DLL directory (#37).
|
|
179
207
|
- Add affinity module of affine transformation (#31).
|
|
@@ -186,32 +214,32 @@ Description: =======
|
|
|
186
214
|
- Add geos_version_string attribute to shapely.geos.
|
|
187
215
|
- Ensure parent is set when child geometry is accessed.
|
|
188
216
|
- Generate _speedups.c using Cython when building from repo when missing,
|
|
189
|
-
|
|
217
|
+
stale, or the build target is "sdist".
|
|
190
218
|
- The is_simple predicate of invalid, self-intersecting linear rings now
|
|
191
|
-
|
|
219
|
+
returns ``False``.
|
|
192
220
|
- Remove VERSION.txt from repo, it's now written by the distutils setup script
|
|
193
|
-
|
|
221
|
+
with value of shapely.__version__.
|
|
194
222
|
|
|
195
223
|
1.2.15 (2012-06-27)
|
|
196
224
|
-------------------
|
|
197
225
|
- Eliminate numerical sensitivity in a method chaining test (Debian bug
|
|
198
|
-
|
|
226
|
+
#663210).
|
|
199
227
|
- Account for cascaded union of random buffered test points being a polygon
|
|
200
|
-
|
|
228
|
+
or multipolygon (Debian bug #666655).
|
|
201
229
|
- Use Cython to build speedups if it is installed.
|
|
202
230
|
- Avoid stumbling over SVN revision numbers in GEOS C API version strings.
|
|
203
231
|
|
|
204
232
|
1.2.14 (2012-01-23)
|
|
205
233
|
-------------------
|
|
206
234
|
- A geometry's coords property is now sliceable, yielding a list of coordinate
|
|
207
|
-
|
|
235
|
+
values.
|
|
208
236
|
- Homogeneous collections are now sliceable, yielding a new collection of the
|
|
209
|
-
|
|
237
|
+
same type.
|
|
210
238
|
|
|
211
239
|
1.2.13 (2011-09-16)
|
|
212
240
|
-------------------
|
|
213
241
|
- Fixed errors in speedups on 32bit systems when GEOS references memory above
|
|
214
|
-
|
|
242
|
+
2GB.
|
|
215
243
|
- Add shapely.__version__ attribute.
|
|
216
244
|
- Update the manual.
|
|
217
245
|
|
|
@@ -256,7 +284,7 @@ Description: =======
|
|
|
256
284
|
1.2.6 (2010-10-21)
|
|
257
285
|
------------------
|
|
258
286
|
- The geoms property of an empty collection yields [] instead of a ValueError
|
|
259
|
-
|
|
287
|
+
(#3).
|
|
260
288
|
- The coords and geometry type sproperties have the same behavior as above.
|
|
261
289
|
- Ensure that z values carry through into products of operations (#4).
|
|
262
290
|
|
|
@@ -270,7 +298,7 @@ Description: =======
|
|
|
270
298
|
- Raise AttributeError when there's no backend support for a method.
|
|
271
299
|
- Raise OSError if libgeos_c.so (or variants) can't be found and loaded.
|
|
272
300
|
- Add geos_c DLL loading support for linux platforms where find_library doesn't
|
|
273
|
-
|
|
301
|
+
work.
|
|
274
302
|
|
|
275
303
|
1.2.3 (2010-08-17)
|
|
276
304
|
------------------
|
|
@@ -310,8 +338,8 @@ Description: =======
|
|
|
310
338
|
1.2b5 (2010-04-09)
|
|
311
339
|
------------------
|
|
312
340
|
- Objects can be constructed from others of the same type, thereby making
|
|
313
|
-
|
|
314
|
-
|
|
341
|
+
copies. Collections can be constructed from sequences of objects, also making
|
|
342
|
+
copies.
|
|
315
343
|
- Collections are now iterators over their component objects.
|
|
316
344
|
- New code for manual figures, using the descartes package.
|
|
317
345
|
|
|
@@ -330,8 +358,8 @@ Description: =======
|
|
|
330
358
|
1.2b1 (2010-02-18)
|
|
331
359
|
------------------
|
|
332
360
|
- Update the README. Remove cruft from setup.py. Add some version 1.2 metadata
|
|
333
|
-
|
|
334
|
-
|
|
361
|
+
regarding required Python version (>=2.5,<3) and external dependency
|
|
362
|
+
(libgeos_c >= 3.1).
|
|
335
363
|
|
|
336
364
|
1.2a6 (2010-02-09)
|
|
337
365
|
------------------
|
|
@@ -342,9 +370,9 @@ Description: =======
|
|
|
342
370
|
1.2a1 (2010-01-20)
|
|
343
371
|
------------------
|
|
344
372
|
- Proper prototyping of WKB writer, and avoidance of errors on 64-bit systems
|
|
345
|
-
|
|
373
|
+
(#191).
|
|
346
374
|
- Prototype libgeos_c functions in a way that lets py2exe apps import shapely
|
|
347
|
-
|
|
375
|
+
(#189).
|
|
348
376
|
|
|
349
377
|
1.2 Branched (2009-09-19)
|
|
350
378
|
|
|
@@ -355,7 +383,7 @@ Description: =======
|
|
|
355
383
|
1.0.11 (2008-11-20)
|
|
356
384
|
-------------------
|
|
357
385
|
- Work around bug in GEOS 2.2.3, GEOSCoordSeq_getOrdinate not exported properly
|
|
358
|
-
|
|
386
|
+
(#178).
|
|
359
387
|
|
|
360
388
|
1.0.10 (2008-11-17)
|
|
361
389
|
-------------------
|
|
@@ -368,7 +396,7 @@ Description: =======
|
|
|
368
396
|
1.0.8 (2008-11-01)
|
|
369
397
|
------------------
|
|
370
398
|
- Fill out GEOS function result and argument types to prevent faults on a
|
|
371
|
-
|
|
399
|
+
64-bit arch.
|
|
372
400
|
|
|
373
401
|
1.0.7 (2008-08-22)
|
|
374
402
|
------------------
|
|
@@ -385,14 +413,14 @@ Description: =======
|
|
|
385
413
|
------------------
|
|
386
414
|
- Added access to GEOS polygonizer function.
|
|
387
415
|
- Raise exception when insufficient coordinate tuples are passed to LinearRing
|
|
388
|
-
|
|
416
|
+
constructor (#164).
|
|
389
417
|
|
|
390
418
|
1.0.4 (2008-05-01)
|
|
391
419
|
------------------
|
|
392
420
|
- Disentangle Python and topological equality (#163).
|
|
393
421
|
- Add shape(), a factory that copies coordinates from a geo interface provider.
|
|
394
|
-
|
|
395
|
-
|
|
422
|
+
To be used instead of asShape() unless you really need to store coordinates
|
|
423
|
+
outside shapely for efficient use in other code.
|
|
396
424
|
- Cache GEOS geometries in adapters (#163).
|
|
397
425
|
|
|
398
426
|
1.0.3 (2008-04-09)
|
|
@@ -407,7 +435,7 @@ Description: =======
|
|
|
407
435
|
1.0.1 (2008-02-08)
|
|
408
436
|
------------------
|
|
409
437
|
- Allow chaining expressions involving coordinate sequences and geometry parts
|
|
410
|
-
|
|
438
|
+
(#151).
|
|
411
439
|
- Protect against abnormal use of coordinate accessors (#152).
|
|
412
440
|
- Coordinate sequences now implement the numpy array protocol (#153).
|
|
413
441
|
|
|
@@ -16,7 +16,6 @@ is traded for the ability to execute with blazing speed. Shapely is not
|
|
|
16
16
|
concerned with data formats or coordinate systems, but can be readily
|
|
17
17
|
integrated with packages that are. For more details, see:
|
|
18
18
|
|
|
19
|
-
* Shapely wiki_
|
|
20
19
|
* Shapely manual_
|
|
21
20
|
* Shapely `example apps`_
|
|
22
21
|
|
|
@@ -41,6 +40,12 @@ or from a source distribution with the setup script::
|
|
|
41
40
|
|
|
42
41
|
$ python setup.py install
|
|
43
42
|
|
|
43
|
+
.. warning:: Windows users:
|
|
44
|
+
do not under any circumstances use pip (or easy_install) to uninstall
|
|
45
|
+
Shapely versions < 1.2.17. Due to the way Shapely used to install its GEOS
|
|
46
|
+
DLL and a distribute or setuptools bug, your Python installation may be
|
|
47
|
+
broken by an uninstall command. Shapely 1.2.17 will uninstall safely.
|
|
48
|
+
|
|
44
49
|
Usage
|
|
45
50
|
=====
|
|
46
51
|
|
|
@@ -57,7 +62,7 @@ buffering a point::
|
|
|
57
62
|
See the manual_ for comprehensive usage snippets and the dissolve.py and
|
|
58
63
|
intersect.py `example apps`_.
|
|
59
64
|
|
|
60
|
-
Integration
|
|
65
|
+
Integration
|
|
61
66
|
===========
|
|
62
67
|
|
|
63
68
|
Shapely does not read or write data files, but it can serialize and deserialize
|
|
@@ -80,7 +85,7 @@ provide the Numpy array interface.::
|
|
|
80
85
|
...
|
|
81
86
|
[ 1.00000000e+01, 0.00000000e+00]])
|
|
82
87
|
|
|
83
|
-
That yields a
|
|
88
|
+
That yields a Numpy array of [x, y] arrays. This is not always exactly what one
|
|
84
89
|
wants for plotting shapes with Matplotlib (for example), so Shapely 1.2 adds
|
|
85
90
|
a `xy` property for obtaining separate arrays of coordinate x and y values.::
|
|
86
91
|
|
|
@@ -97,6 +102,19 @@ Numpy arrays can also be adapted to Shapely linestrings::
|
|
|
97
102
|
>>> asLineString(ag).wkt
|
|
98
103
|
'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
|
|
99
104
|
|
|
105
|
+
Shapely can also integrate with other Python GIS packages using data modeled
|
|
106
|
+
after GeoJSON.
|
|
107
|
+
|
|
108
|
+
.. sourcecode:: pycon
|
|
109
|
+
|
|
110
|
+
>>> import json
|
|
111
|
+
>>> from shapely.geometry import mapping, shape
|
|
112
|
+
>>> s = shape(json.loads('{"type": "Point", "coordinates": [0.0, 0.0]}'))
|
|
113
|
+
>>> s
|
|
114
|
+
<shapely.geometry.point.Point object at 0x...>
|
|
115
|
+
>>> print(json.dumps(mapping(s)))
|
|
116
|
+
{"type": "Point", "coordinates": [0.0, 0.0]}
|
|
117
|
+
|
|
100
118
|
Testing
|
|
101
119
|
=======
|
|
102
120
|
|
|
@@ -111,15 +129,17 @@ supported well by nose.
|
|
|
111
129
|
Support
|
|
112
130
|
=======
|
|
113
131
|
|
|
114
|
-
|
|
132
|
+
Please discuss Shapely with us at
|
|
133
|
+
http://lists.gispython.org/mailman/listinfo/community.
|
|
134
|
+
|
|
135
|
+
Bugs may be reported at https://github.com/Toblerity/Shapely.
|
|
115
136
|
|
|
116
137
|
.. include:: CREDITS.txt
|
|
117
138
|
|
|
118
139
|
.. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
|
|
119
140
|
.. _PostGIS: http://postgis.org
|
|
120
141
|
.. _GEOS: http://trac.osgeo.org/geos/
|
|
121
|
-
.. _example apps:
|
|
122
|
-
.. _wiki: http://trac.gispython.org/lab/wiki/Shapely
|
|
142
|
+
.. _example apps: https://github.com/sgillies/shapely/tree/master/shapely/examples
|
|
123
143
|
.. _manual: http://toblerity.github.com/shapely/manual.html
|
|
124
144
|
.. _Pleiades: http://pleiades.stoa.org
|
|
125
145
|
|