shapely 1.2.16__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.16 → Shapely-1.2.18}/CHANGES.txt +17 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/CREDITS.txt +2 -0
- {Shapely-1.2.16/Shapely.egg-info → Shapely-1.2.18}/PKG-INFO +104 -65
- {Shapely-1.2.16 → Shapely-1.2.18}/README.rst +30 -10
- {Shapely-1.2.16 → Shapely-1.2.18/Shapely.egg-info}/PKG-INFO +104 -65
- {Shapely-1.2.16 → Shapely-1.2.18}/Shapely.egg-info/SOURCES.txt +5 -0
- Shapely-1.2.18/VERSION.txt +1 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/docs/manual.txt +411 -130
- {Shapely-1.2.16 → Shapely-1.2.18}/setup.py +21 -14
- Shapely-1.2.18/shapely/__init__.py +1 -0
- Shapely-1.2.18/shapely/affinity.py +252 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/ctypes_declarations.py +4 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/__init__.py +2 -2
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/base.py +54 -7
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/geo.py +2 -2
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/multilinestring.py +1 -1
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/multipolygon.py +7 -4
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/proxy.py +1 -3
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geos.py +9 -1
- Shapely-1.2.18/shapely/ops.py +209 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/speedups/_speedups.c +1600 -790
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/MultiPolygon.txt +1 -1
- Shapely-1.2.18/shapely/tests/Operators.txt +18 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/__init__.py +5 -1
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/polygonize.txt +14 -3
- Shapely-1.2.18/shapely/tests/test_affinity.py +239 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_dlls.py +1 -1
- Shapely-1.2.18/shapely/tests/test_emptiness.py +52 -0
- Shapely-1.2.18/shapely/tests/test_pickle.py +15 -0
- Shapely-1.2.18/shapely/tests/test_transform.py +61 -0
- Shapely-1.2.18/shapely/wkb.py +24 -0
- Shapely-1.2.18/shapely/wkt.py +24 -0
- Shapely-1.2.16/VERSION.txt +0 -1
- Shapely-1.2.16/shapely/__init__.py +0 -1
- Shapely-1.2.16/shapely/ops.py +0 -102
- Shapely-1.2.16/shapely/tests/test_emptiness.py +0 -19
- Shapely-1.2.16/shapely/wkb.py +0 -38
- Shapely-1.2.16/shapely/wkt.py +0 -34
- {Shapely-1.2.16 → Shapely-1.2.18}/LICENSE.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/setup.cfg +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/algorithms/__init__.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/algorithms/cga.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/coords.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/examples/__init__.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/examples/dissolve.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/examples/geoms.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/examples/intersect.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/examples/world.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/ftools.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/collection.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/linestring.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/multipoint.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/point.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/geometry/polygon.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/impl.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/iterops.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/linref.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/predicates.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/prepared.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/speedups/__init__.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/Array.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/GeoInterface.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/IterOps.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/LineString.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/MultiLineString.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/MultiPoint.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/Operations.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/Persist.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/Point.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/Polygon.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/Predicates.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/attribute-chains.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/binascii_hex.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/cascaded_union.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/dimensions.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/invalid_intersection.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/linemerge.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_box.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_cga.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_collection.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_delegated.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_doctests.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_equality.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_geomseq.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_getitem.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_linear_referencing.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_mapping.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_ndarrays.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_prepared.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_products_z.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_singularity.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_speedups.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_unary_union.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_validation.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/test_xy.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/threading_test.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/tests/wkt_locale.txt +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/topology.py +0 -0
- {Shapely-1.2.16 → Shapely-1.2.18}/shapely/validation.py +0 -0
|
@@ -1,6 +1,23 @@
|
|
|
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
|
+
|
|
12
|
+
1.2.17 (2013-01-27)
|
|
13
|
+
-------------------
|
|
14
|
+
- Avoid circular import between wkt/wkb and geometry.base by moving calls
|
|
15
|
+
to GEOS serializers to the latter module.
|
|
16
|
+
- Set _ndim when unpickling (issue #6).
|
|
17
|
+
- Don't install DLLs to Python's DLL directory (#37).
|
|
18
|
+
- Add affinity module of affine transformation (#31).
|
|
19
|
+
- Fix NameError that blocked installation with PyPy (#40, #41).
|
|
20
|
+
|
|
4
21
|
1.2.16 (2012-09-18)
|
|
5
22
|
-------------------
|
|
6
23
|
- Add ops.unary_union function.
|
|
@@ -1,21 +1,21 @@
|
|
|
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
|
|
7
7
|
Author-email: sean.gillies@gmail.com
|
|
8
8
|
License: BSD
|
|
9
|
-
Description:
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Description: =======
|
|
10
|
+
Shapely
|
|
11
|
+
=======
|
|
12
12
|
|
|
13
13
|
PostGIS-ish operations outside a database context for Pythoneers and
|
|
14
14
|
Pythonistas.
|
|
15
15
|
|
|
16
|
-
.. image::
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
.. image:: http://farm3.staticflickr.com/2738/4511827859_b5822043b7_o_d.png
|
|
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
|
|
|
@@ -150,6 +170,8 @@ Description: ======
|
|
|
150
170
|
* Jonathan Tartley
|
|
151
171
|
* Kristian Thy
|
|
152
172
|
* Mike Toews (https://github.com/mwtoews)
|
|
173
|
+
* Phil Elson (https://github.com/pelson)
|
|
174
|
+
* Jeethu Rao (https://github.com/jeethu)
|
|
153
175
|
|
|
154
176
|
Additional help from:
|
|
155
177
|
|
|
@@ -162,12 +184,29 @@ Description: ======
|
|
|
162
184
|
U.S. National Endowment for the Humanities (http://www.neh.gov).
|
|
163
185
|
|
|
164
186
|
.. |eaigue| unicode:: U+00E9
|
|
165
|
-
|
|
187
|
+
:trim:
|
|
166
188
|
.. _Pleiades: http://pleiades.stoa.org
|
|
167
189
|
|
|
168
190
|
Changes
|
|
169
191
|
=======
|
|
170
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
|
+
|
|
201
|
+
1.2.17 (2013-01-27)
|
|
202
|
+
-------------------
|
|
203
|
+
- Avoid circular import between wkt/wkb and geometry.base by moving calls
|
|
204
|
+
to GEOS serializers to the latter module.
|
|
205
|
+
- Set _ndim when unpickling (issue #6).
|
|
206
|
+
- Don't install DLLs to Python's DLL directory (#37).
|
|
207
|
+
- Add affinity module of affine transformation (#31).
|
|
208
|
+
- Fix NameError that blocked installation with PyPy (#40, #41).
|
|
209
|
+
|
|
171
210
|
1.2.16 (2012-09-18)
|
|
172
211
|
-------------------
|
|
173
212
|
- Add ops.unary_union function.
|
|
@@ -175,32 +214,32 @@ Description: ======
|
|
|
175
214
|
- Add geos_version_string attribute to shapely.geos.
|
|
176
215
|
- Ensure parent is set when child geometry is accessed.
|
|
177
216
|
- Generate _speedups.c using Cython when building from repo when missing,
|
|
178
|
-
|
|
217
|
+
stale, or the build target is "sdist".
|
|
179
218
|
- The is_simple predicate of invalid, self-intersecting linear rings now
|
|
180
|
-
|
|
219
|
+
returns ``False``.
|
|
181
220
|
- Remove VERSION.txt from repo, it's now written by the distutils setup script
|
|
182
|
-
|
|
221
|
+
with value of shapely.__version__.
|
|
183
222
|
|
|
184
223
|
1.2.15 (2012-06-27)
|
|
185
224
|
-------------------
|
|
186
225
|
- Eliminate numerical sensitivity in a method chaining test (Debian bug
|
|
187
|
-
|
|
226
|
+
#663210).
|
|
188
227
|
- Account for cascaded union of random buffered test points being a polygon
|
|
189
|
-
|
|
228
|
+
or multipolygon (Debian bug #666655).
|
|
190
229
|
- Use Cython to build speedups if it is installed.
|
|
191
230
|
- Avoid stumbling over SVN revision numbers in GEOS C API version strings.
|
|
192
231
|
|
|
193
232
|
1.2.14 (2012-01-23)
|
|
194
233
|
-------------------
|
|
195
234
|
- A geometry's coords property is now sliceable, yielding a list of coordinate
|
|
196
|
-
|
|
235
|
+
values.
|
|
197
236
|
- Homogeneous collections are now sliceable, yielding a new collection of the
|
|
198
|
-
|
|
237
|
+
same type.
|
|
199
238
|
|
|
200
239
|
1.2.13 (2011-09-16)
|
|
201
240
|
-------------------
|
|
202
241
|
- Fixed errors in speedups on 32bit systems when GEOS references memory above
|
|
203
|
-
|
|
242
|
+
2GB.
|
|
204
243
|
- Add shapely.__version__ attribute.
|
|
205
244
|
- Update the manual.
|
|
206
245
|
|
|
@@ -245,7 +284,7 @@ Description: ======
|
|
|
245
284
|
1.2.6 (2010-10-21)
|
|
246
285
|
------------------
|
|
247
286
|
- The geoms property of an empty collection yields [] instead of a ValueError
|
|
248
|
-
|
|
287
|
+
(#3).
|
|
249
288
|
- The coords and geometry type sproperties have the same behavior as above.
|
|
250
289
|
- Ensure that z values carry through into products of operations (#4).
|
|
251
290
|
|
|
@@ -259,7 +298,7 @@ Description: ======
|
|
|
259
298
|
- Raise AttributeError when there's no backend support for a method.
|
|
260
299
|
- Raise OSError if libgeos_c.so (or variants) can't be found and loaded.
|
|
261
300
|
- Add geos_c DLL loading support for linux platforms where find_library doesn't
|
|
262
|
-
|
|
301
|
+
work.
|
|
263
302
|
|
|
264
303
|
1.2.3 (2010-08-17)
|
|
265
304
|
------------------
|
|
@@ -299,8 +338,8 @@ Description: ======
|
|
|
299
338
|
1.2b5 (2010-04-09)
|
|
300
339
|
------------------
|
|
301
340
|
- Objects can be constructed from others of the same type, thereby making
|
|
302
|
-
|
|
303
|
-
|
|
341
|
+
copies. Collections can be constructed from sequences of objects, also making
|
|
342
|
+
copies.
|
|
304
343
|
- Collections are now iterators over their component objects.
|
|
305
344
|
- New code for manual figures, using the descartes package.
|
|
306
345
|
|
|
@@ -319,8 +358,8 @@ Description: ======
|
|
|
319
358
|
1.2b1 (2010-02-18)
|
|
320
359
|
------------------
|
|
321
360
|
- Update the README. Remove cruft from setup.py. Add some version 1.2 metadata
|
|
322
|
-
|
|
323
|
-
|
|
361
|
+
regarding required Python version (>=2.5,<3) and external dependency
|
|
362
|
+
(libgeos_c >= 3.1).
|
|
324
363
|
|
|
325
364
|
1.2a6 (2010-02-09)
|
|
326
365
|
------------------
|
|
@@ -331,9 +370,9 @@ Description: ======
|
|
|
331
370
|
1.2a1 (2010-01-20)
|
|
332
371
|
------------------
|
|
333
372
|
- Proper prototyping of WKB writer, and avoidance of errors on 64-bit systems
|
|
334
|
-
|
|
373
|
+
(#191).
|
|
335
374
|
- Prototype libgeos_c functions in a way that lets py2exe apps import shapely
|
|
336
|
-
|
|
375
|
+
(#189).
|
|
337
376
|
|
|
338
377
|
1.2 Branched (2009-09-19)
|
|
339
378
|
|
|
@@ -344,7 +383,7 @@ Description: ======
|
|
|
344
383
|
1.0.11 (2008-11-20)
|
|
345
384
|
-------------------
|
|
346
385
|
- Work around bug in GEOS 2.2.3, GEOSCoordSeq_getOrdinate not exported properly
|
|
347
|
-
|
|
386
|
+
(#178).
|
|
348
387
|
|
|
349
388
|
1.0.10 (2008-11-17)
|
|
350
389
|
-------------------
|
|
@@ -357,7 +396,7 @@ Description: ======
|
|
|
357
396
|
1.0.8 (2008-11-01)
|
|
358
397
|
------------------
|
|
359
398
|
- Fill out GEOS function result and argument types to prevent faults on a
|
|
360
|
-
|
|
399
|
+
64-bit arch.
|
|
361
400
|
|
|
362
401
|
1.0.7 (2008-08-22)
|
|
363
402
|
------------------
|
|
@@ -374,14 +413,14 @@ Description: ======
|
|
|
374
413
|
------------------
|
|
375
414
|
- Added access to GEOS polygonizer function.
|
|
376
415
|
- Raise exception when insufficient coordinate tuples are passed to LinearRing
|
|
377
|
-
|
|
416
|
+
constructor (#164).
|
|
378
417
|
|
|
379
418
|
1.0.4 (2008-05-01)
|
|
380
419
|
------------------
|
|
381
420
|
- Disentangle Python and topological equality (#163).
|
|
382
421
|
- Add shape(), a factory that copies coordinates from a geo interface provider.
|
|
383
|
-
|
|
384
|
-
|
|
422
|
+
To be used instead of asShape() unless you really need to store coordinates
|
|
423
|
+
outside shapely for efficient use in other code.
|
|
385
424
|
- Cache GEOS geometries in adapters (#163).
|
|
386
425
|
|
|
387
426
|
1.0.3 (2008-04-09)
|
|
@@ -396,7 +435,7 @@ Description: ======
|
|
|
396
435
|
1.0.1 (2008-02-08)
|
|
397
436
|
------------------
|
|
398
437
|
- Allow chaining expressions involving coordinate sequences and geometry parts
|
|
399
|
-
|
|
438
|
+
(#151).
|
|
400
439
|
- Protect against abnormal use of coordinate accessors (#152).
|
|
401
440
|
- Coordinate sequences now implement the numpy array protocol (#153).
|
|
402
441
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
=======
|
|
2
|
+
Shapely
|
|
3
|
+
=======
|
|
4
4
|
|
|
5
5
|
PostGIS-ish operations outside a database context for Pythoneers and
|
|
6
6
|
Pythonistas.
|
|
7
7
|
|
|
8
|
-
.. image::
|
|
8
|
+
.. image:: http://farm3.staticflickr.com/2738/4511827859_b5822043b7_o_d.png
|
|
9
9
|
:width: 800
|
|
10
10
|
:height: 400
|
|
11
11
|
|
|
@@ -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
|
|