shapely 1.2.17__tar.gz → 1.2.19__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.19}/CHANGES.txt +12 -0
- {Shapely-1.2.17/Shapely.egg-info → Shapely-1.2.19}/PKG-INFO +94 -62
- {Shapely-1.2.17 → Shapely-1.2.19}/README.rst +26 -6
- {Shapely-1.2.17 → Shapely-1.2.19/Shapely.egg-info}/PKG-INFO +94 -62
- {Shapely-1.2.17 → Shapely-1.2.19}/Shapely.egg-info/SOURCES.txt +3 -0
- Shapely-1.2.19/VERSION.txt +1 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/docs/manual.txt +450 -133
- {Shapely-1.2.17 → Shapely-1.2.19}/setup.py +4 -4
- Shapely-1.2.19/shapely/__init__.py +1 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/affinity.py +25 -21
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/ctypes_declarations.py +12 -3
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/__init__.py +4 -4
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/base.py +59 -2
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/geo.py +2 -2
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/linestring.py +20 -19
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/multilinestring.py +1 -1
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/multipolygon.py +7 -4
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/polygon.py +5 -3
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geos.py +16 -2
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/impl.py +8 -5
- Shapely-1.2.19/shapely/ops.py +209 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/speedups/_speedups.c +1736 -906
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/MultiPolygon.txt +1 -1
- Shapely-1.2.19/shapely/tests/Operators.txt +18 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/__init__.py +3 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/polygonize.txt +14 -3
- Shapely-1.2.19/shapely/tests/test_emptiness.py +52 -0
- Shapely-1.2.19/shapely/tests/test_styles.py +17 -0
- Shapely-1.2.19/shapely/tests/test_transform.py +61 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_unary_union.py +13 -4
- 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.19}/CREDITS.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/LICENSE.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/setup.cfg +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/algorithms/__init__.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/algorithms/cga.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/coords.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/examples/__init__.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/examples/dissolve.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/examples/geoms.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/examples/intersect.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/examples/world.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/ftools.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/collection.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/multipoint.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/point.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/geometry/proxy.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/iterops.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/linref.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/predicates.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/prepared.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/speedups/__init__.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/Array.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/GeoInterface.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/IterOps.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/LineString.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/MultiLineString.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/MultiPoint.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/Operations.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/Persist.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/Point.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/Polygon.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/Predicates.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/attribute-chains.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/binascii_hex.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/cascaded_union.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/dimensions.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/invalid_intersection.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/linemerge.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_affinity.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_box.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_cga.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_collection.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_delegated.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_dlls.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_doctests.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_equality.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_geomseq.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_getitem.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_linear_referencing.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_mapping.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_ndarrays.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_pickle.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_prepared.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_products_z.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_singularity.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_speedups.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_validation.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/test_xy.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/threading_test.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/tests/wkt_locale.txt +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/topology.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/validation.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/wkb.py +0 -0
- {Shapely-1.2.17 → Shapely-1.2.19}/shapely/wkt.py +0 -0
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
1.2.19 (2013-12-30)
|
|
5
|
+
-------------------
|
|
6
|
+
- Add buffering style options (#55).
|
|
7
|
+
|
|
8
|
+
1.2.18 (2013-07-23)
|
|
9
|
+
--------------------
|
|
10
|
+
- Add shapely.ops.transform.
|
|
11
|
+
- Permit empty sequences in collection constructors (#49, #50).
|
|
12
|
+
- Individual polygons in MultiPolygon.__geo_interface__ are changed to tuples
|
|
13
|
+
to match Polygon.__geo_interface__ (#51).
|
|
14
|
+
- Add shapely.ops.polygonize_full (#57).
|
|
15
|
+
|
|
4
16
|
1.2.17 (2013-01-27)
|
|
5
17
|
-------------------
|
|
6
18
|
- 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.19
|
|
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,28 @@ 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.19 (2013-12-30)
|
|
194
|
+
-------------------
|
|
195
|
+
- Add buffering style options (#55).
|
|
196
|
+
|
|
197
|
+
1.2.18 (2013-07-23)
|
|
198
|
+
--------------------
|
|
199
|
+
- Add shapely.ops.transform.
|
|
200
|
+
- Permit empty sequences in collection constructors (#49, #50).
|
|
201
|
+
- Individual polygons in MultiPolygon.__geo_interface__ are changed to tuples
|
|
202
|
+
to match Polygon.__geo_interface__ (#51).
|
|
203
|
+
- Add shapely.ops.polygonize_full (#57).
|
|
204
|
+
|
|
173
205
|
1.2.17 (2013-01-27)
|
|
174
206
|
-------------------
|
|
175
207
|
- Avoid circular import between wkt/wkb and geometry.base by moving calls
|
|
176
|
-
|
|
208
|
+
to GEOS serializers to the latter module.
|
|
177
209
|
- Set _ndim when unpickling (issue #6).
|
|
178
210
|
- Don't install DLLs to Python's DLL directory (#37).
|
|
179
211
|
- Add affinity module of affine transformation (#31).
|
|
@@ -186,32 +218,32 @@ Description: =======
|
|
|
186
218
|
- Add geos_version_string attribute to shapely.geos.
|
|
187
219
|
- Ensure parent is set when child geometry is accessed.
|
|
188
220
|
- Generate _speedups.c using Cython when building from repo when missing,
|
|
189
|
-
|
|
221
|
+
stale, or the build target is "sdist".
|
|
190
222
|
- The is_simple predicate of invalid, self-intersecting linear rings now
|
|
191
|
-
|
|
223
|
+
returns ``False``.
|
|
192
224
|
- Remove VERSION.txt from repo, it's now written by the distutils setup script
|
|
193
|
-
|
|
225
|
+
with value of shapely.__version__.
|
|
194
226
|
|
|
195
227
|
1.2.15 (2012-06-27)
|
|
196
228
|
-------------------
|
|
197
229
|
- Eliminate numerical sensitivity in a method chaining test (Debian bug
|
|
198
|
-
|
|
230
|
+
#663210).
|
|
199
231
|
- Account for cascaded union of random buffered test points being a polygon
|
|
200
|
-
|
|
232
|
+
or multipolygon (Debian bug #666655).
|
|
201
233
|
- Use Cython to build speedups if it is installed.
|
|
202
234
|
- Avoid stumbling over SVN revision numbers in GEOS C API version strings.
|
|
203
235
|
|
|
204
236
|
1.2.14 (2012-01-23)
|
|
205
237
|
-------------------
|
|
206
238
|
- A geometry's coords property is now sliceable, yielding a list of coordinate
|
|
207
|
-
|
|
239
|
+
values.
|
|
208
240
|
- Homogeneous collections are now sliceable, yielding a new collection of the
|
|
209
|
-
|
|
241
|
+
same type.
|
|
210
242
|
|
|
211
243
|
1.2.13 (2011-09-16)
|
|
212
244
|
-------------------
|
|
213
245
|
- Fixed errors in speedups on 32bit systems when GEOS references memory above
|
|
214
|
-
|
|
246
|
+
2GB.
|
|
215
247
|
- Add shapely.__version__ attribute.
|
|
216
248
|
- Update the manual.
|
|
217
249
|
|
|
@@ -256,7 +288,7 @@ Description: =======
|
|
|
256
288
|
1.2.6 (2010-10-21)
|
|
257
289
|
------------------
|
|
258
290
|
- The geoms property of an empty collection yields [] instead of a ValueError
|
|
259
|
-
|
|
291
|
+
(#3).
|
|
260
292
|
- The coords and geometry type sproperties have the same behavior as above.
|
|
261
293
|
- Ensure that z values carry through into products of operations (#4).
|
|
262
294
|
|
|
@@ -270,7 +302,7 @@ Description: =======
|
|
|
270
302
|
- Raise AttributeError when there's no backend support for a method.
|
|
271
303
|
- Raise OSError if libgeos_c.so (or variants) can't be found and loaded.
|
|
272
304
|
- Add geos_c DLL loading support for linux platforms where find_library doesn't
|
|
273
|
-
|
|
305
|
+
work.
|
|
274
306
|
|
|
275
307
|
1.2.3 (2010-08-17)
|
|
276
308
|
------------------
|
|
@@ -310,8 +342,8 @@ Description: =======
|
|
|
310
342
|
1.2b5 (2010-04-09)
|
|
311
343
|
------------------
|
|
312
344
|
- Objects can be constructed from others of the same type, thereby making
|
|
313
|
-
|
|
314
|
-
|
|
345
|
+
copies. Collections can be constructed from sequences of objects, also making
|
|
346
|
+
copies.
|
|
315
347
|
- Collections are now iterators over their component objects.
|
|
316
348
|
- New code for manual figures, using the descartes package.
|
|
317
349
|
|
|
@@ -330,8 +362,8 @@ Description: =======
|
|
|
330
362
|
1.2b1 (2010-02-18)
|
|
331
363
|
------------------
|
|
332
364
|
- Update the README. Remove cruft from setup.py. Add some version 1.2 metadata
|
|
333
|
-
|
|
334
|
-
|
|
365
|
+
regarding required Python version (>=2.5,<3) and external dependency
|
|
366
|
+
(libgeos_c >= 3.1).
|
|
335
367
|
|
|
336
368
|
1.2a6 (2010-02-09)
|
|
337
369
|
------------------
|
|
@@ -342,9 +374,9 @@ Description: =======
|
|
|
342
374
|
1.2a1 (2010-01-20)
|
|
343
375
|
------------------
|
|
344
376
|
- Proper prototyping of WKB writer, and avoidance of errors on 64-bit systems
|
|
345
|
-
|
|
377
|
+
(#191).
|
|
346
378
|
- Prototype libgeos_c functions in a way that lets py2exe apps import shapely
|
|
347
|
-
|
|
379
|
+
(#189).
|
|
348
380
|
|
|
349
381
|
1.2 Branched (2009-09-19)
|
|
350
382
|
|
|
@@ -355,7 +387,7 @@ Description: =======
|
|
|
355
387
|
1.0.11 (2008-11-20)
|
|
356
388
|
-------------------
|
|
357
389
|
- Work around bug in GEOS 2.2.3, GEOSCoordSeq_getOrdinate not exported properly
|
|
358
|
-
|
|
390
|
+
(#178).
|
|
359
391
|
|
|
360
392
|
1.0.10 (2008-11-17)
|
|
361
393
|
-------------------
|
|
@@ -368,7 +400,7 @@ Description: =======
|
|
|
368
400
|
1.0.8 (2008-11-01)
|
|
369
401
|
------------------
|
|
370
402
|
- Fill out GEOS function result and argument types to prevent faults on a
|
|
371
|
-
|
|
403
|
+
64-bit arch.
|
|
372
404
|
|
|
373
405
|
1.0.7 (2008-08-22)
|
|
374
406
|
------------------
|
|
@@ -385,14 +417,14 @@ Description: =======
|
|
|
385
417
|
------------------
|
|
386
418
|
- Added access to GEOS polygonizer function.
|
|
387
419
|
- Raise exception when insufficient coordinate tuples are passed to LinearRing
|
|
388
|
-
|
|
420
|
+
constructor (#164).
|
|
389
421
|
|
|
390
422
|
1.0.4 (2008-05-01)
|
|
391
423
|
------------------
|
|
392
424
|
- Disentangle Python and topological equality (#163).
|
|
393
425
|
- Add shape(), a factory that copies coordinates from a geo interface provider.
|
|
394
|
-
|
|
395
|
-
|
|
426
|
+
To be used instead of asShape() unless you really need to store coordinates
|
|
427
|
+
outside shapely for efficient use in other code.
|
|
396
428
|
- Cache GEOS geometries in adapters (#163).
|
|
397
429
|
|
|
398
430
|
1.0.3 (2008-04-09)
|
|
@@ -407,7 +439,7 @@ Description: =======
|
|
|
407
439
|
1.0.1 (2008-02-08)
|
|
408
440
|
------------------
|
|
409
441
|
- Allow chaining expressions involving coordinate sequences and geometry parts
|
|
410
|
-
|
|
442
|
+
(#151).
|
|
411
443
|
- Protect against abnormal use of coordinate accessors (#152).
|
|
412
444
|
- Coordinate sequences now implement the numpy array protocol (#153).
|
|
413
445
|
|
|
@@ -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
|
|