shapely 1.2__tar.gz → 1.2b2__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 → Shapely-1.2b2}/CHANGES.txt +0 -37
- Shapely-1.2b2/CREDITS.txt +9 -0
- {Shapely-1.2 → Shapely-1.2b2}/MANIFEST.in +0 -2
- {Shapely-1.2 → Shapely-1.2b2}/PKG-INFO +31 -42
- {Shapely-1.2 → Shapely-1.2b2}/README.txt +28 -39
- {Shapely-1.2 → Shapely-1.2b2}/Shapely.egg-info/PKG-INFO +31 -42
- {Shapely-1.2 → Shapely-1.2b2}/Shapely.egg-info/SOURCES.txt +0 -3
- Shapely-1.2b2/examples/dissolve.py +52 -0
- Shapely-1.2b2/examples/intersect.py +80 -0
- Shapely-1.2b2/setup.cfg +15 -0
- {Shapely-1.2 → Shapely-1.2b2}/setup.py +4 -6
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/base.py +14 -53
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/collection.py +1 -1
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/linestring.py +135 -109
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/multilinestring.py +60 -54
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/multipoint.py +57 -57
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/multipolygon.py +43 -48
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/point.py +91 -85
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/polygon.py +212 -182
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/proxy.py +11 -18
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geos.py +20 -45
- {Shapely-1.2 → Shapely-1.2b2}/shapely/impl.py +4 -3
- {Shapely-1.2 → Shapely-1.2b2}/shapely/prepared.py +3 -3
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/LineString.txt +6 -10
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/MultiLineString.txt +1 -18
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/MultiPoint.txt +1 -17
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/MultiPolygon.txt +1 -17
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/Point.txt +10 -10
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/Polygon.txt +7 -3
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/__init__.py +0 -3
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/test_geomseq.py +5 -2
- Shapely-1.2/._README.txt +0 -0
- Shapely-1.2/CREDITS.txt +0 -24
- Shapely-1.2/examples/dissolve.py +0 -53
- Shapely-1.2/examples/intersect.py +0 -81
- Shapely-1.2/setup.cfg +0 -5
- Shapely-1.2/shapely/tests/cascaded_union.txt +0 -24
- Shapely-1.2/shapely/tests/test_collection.py +0 -10
- Shapely-1.2/shapely/tests/test_emptiness.py +0 -19
- {Shapely-1.2 → Shapely-1.2b2}/LICENSE.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/__init__.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/coords.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/ctypes_declarations.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/__init__.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geometry/geo.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/geoms.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/iterops.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/linref.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/ops.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/predicates.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/Array.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/GeoInterface.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/IterOps.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/Operations.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/Persist.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/Predicates.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/attribute-chains.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/binascii_hex.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/dimensions.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/invalid_intersection.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/linear-referencing.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/linemerge.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/polygonize.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/test_doctests.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/test_equality.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/test_prepared.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/test_xy.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/threading_test.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/tests/wkt_locale.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/topology.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/wkb.py +0 -0
- {Shapely-1.2 → Shapely-1.2b2}/shapely/wkt.py +0 -0
|
@@ -1,42 +1,5 @@
|
|
|
1
1
|
All tickets are children of http://trac.gispython.org/lab/ticket.
|
|
2
2
|
|
|
3
|
-
1.2 (2010-05-27)
|
|
4
|
-
----------------
|
|
5
|
-
- Final release.
|
|
6
|
-
|
|
7
|
-
1.2rc2 (2010-05-26)
|
|
8
|
-
-------------------
|
|
9
|
-
- Add examples and tests to MANIFEST.in.
|
|
10
|
-
- Release candidate 2.
|
|
11
|
-
|
|
12
|
-
1.2rc1 (2010-05-25)
|
|
13
|
-
-------------------
|
|
14
|
-
- Release candidate.
|
|
15
|
-
|
|
16
|
-
1.2b7 (2010-04-22)
|
|
17
|
-
------------------
|
|
18
|
-
- Memory leak associated with new empty geometry state fixed.
|
|
19
|
-
|
|
20
|
-
1.2b6 (2010-04-13)
|
|
21
|
-
------------------
|
|
22
|
-
- Broken GeometryCollection fixed.
|
|
23
|
-
|
|
24
|
-
1.2b5 (2010-04-09)
|
|
25
|
-
------------------
|
|
26
|
-
- Objects can be constructed from others of the same type, thereby making
|
|
27
|
-
copies. Collections can be constructed from sequences of objects, also making
|
|
28
|
-
copies.
|
|
29
|
-
- Collections are now iterators over their component objects.
|
|
30
|
-
- New code for manual figures, using the descartes package.
|
|
31
|
-
|
|
32
|
-
1.2b4 (2010-03-19)
|
|
33
|
-
------------------
|
|
34
|
-
- Adds support for the "sunos5" platform.
|
|
35
|
-
|
|
36
|
-
1.2b3 (2010-02-28)
|
|
37
|
-
------------------
|
|
38
|
-
- Only provide simplification implementations for GEOS C API >= 1.5.
|
|
39
|
-
|
|
40
3
|
1.2b2 (2010-02-19)
|
|
41
4
|
------------------
|
|
42
5
|
- Fix cascaded_union bug introduced in 1.2b1 (#212).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Sean Gillies (Pleiades)
|
|
2
|
+
Howard Butler (Hobu, Inc.)
|
|
3
|
+
Kai Lautaportti (Hexagon IT)
|
|
4
|
+
Frédéric Junod (Camptocamp SA)
|
|
5
|
+
Eric Lemoine (Camptocamp SA)
|
|
6
|
+
Justin Bronn (GeoDjango) for ctypes inspiration
|
|
7
|
+
|
|
8
|
+
Some of this work was supported by a grant from the U.S. National Endowment for
|
|
9
|
+
the Humanities (http://www.neh.gov).
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
Metadata-Version: 1.0
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.2b2
|
|
4
|
+
Summary: Planar geometries, predicates, and operations
|
|
5
5
|
Home-page: http://trac.gispython.org/lab/wiki/Shapely
|
|
6
6
|
Author: Sean Gillies
|
|
7
7
|
Author-email: sean.gillies@gmail.com
|
|
8
8
|
License: BSD
|
|
9
|
-
Description:
|
|
9
|
+
Description:
|
|
10
10
|
Shapely
|
|
11
11
|
=======
|
|
12
12
|
|
|
13
|
-
.. image:: http://
|
|
14
|
-
:width:
|
|
15
|
-
:height:
|
|
13
|
+
.. image:: http://gispython.org/images/shapely-med.png
|
|
14
|
+
:width: 640
|
|
15
|
+
:height: 320
|
|
16
16
|
|
|
17
17
|
Shapely is a BSD-licensed Python package for manipulation and analysis of
|
|
18
|
-
planar
|
|
19
|
-
systems.
|
|
18
|
+
planar geometries. It is not concerned with data formats or coordinate
|
|
19
|
+
systems. It is based on the widely deployed GEOS_ (the engine of PostGIS_) and
|
|
20
20
|
JTS_ (from which GEOS is ported) libraries. This C dependency is traded for the
|
|
21
|
-
ability to
|
|
21
|
+
ability to analyze geometries with blazing speed.
|
|
22
22
|
|
|
23
23
|
In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a
|
|
24
24
|
database using idiomatic Python. For more details, see:
|
|
@@ -27,6 +27,7 @@ Description: =======
|
|
|
27
27
|
* Shapely manual_
|
|
28
28
|
* Shapely `example apps`_
|
|
29
29
|
|
|
30
|
+
|
|
30
31
|
Dependencies
|
|
31
32
|
------------
|
|
32
33
|
|
|
@@ -35,6 +36,7 @@ Description: =======
|
|
|
35
36
|
* Python >=2.5,<3
|
|
36
37
|
* libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
|
|
37
38
|
|
|
39
|
+
|
|
38
40
|
Installation
|
|
39
41
|
------------
|
|
40
42
|
|
|
@@ -48,6 +50,7 @@ Description: =======
|
|
|
48
50
|
|
|
49
51
|
$ python setup.py install
|
|
50
52
|
|
|
53
|
+
|
|
51
54
|
Usage
|
|
52
55
|
-----
|
|
53
56
|
|
|
@@ -64,19 +67,12 @@ Description: =======
|
|
|
64
67
|
See the manual_ for comprehensive usage snippets and the dissolve.py and
|
|
65
68
|
intersect.py `example apps`_.
|
|
66
69
|
|
|
67
|
-
Integration
|
|
68
|
-
-----------
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
modules provide dumpers and loaders inspired by Python's pickle module.::
|
|
71
|
+
Numpy integration
|
|
72
|
+
-----------------
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'POINT (0.0000000000000000 0.0000000000000000)'
|
|
77
|
-
|
|
78
|
-
All linear objects, such as the rings of a polygon (like ``patch`` above),
|
|
79
|
-
provide the Numpy array interface.::
|
|
74
|
+
All linear geometries, such as the rings of a polygon, provide the Numpy array
|
|
75
|
+
interface::
|
|
80
76
|
|
|
81
77
|
>>> from numpy import asarray
|
|
82
78
|
>>> ag = asarray(patch.exterior)
|
|
@@ -87,9 +83,9 @@ Description: =======
|
|
|
87
83
|
...
|
|
88
84
|
[ 1.00000000e+01, 0.00000000e+00]])
|
|
89
85
|
|
|
90
|
-
That yields a numpy array of [x, y] arrays. This is not
|
|
91
|
-
|
|
92
|
-
for getting separate arrays of coordinate x and y values
|
|
86
|
+
That yields a numpy array of [x, y] arrays. This is not exactly what one wants
|
|
87
|
+
for plotting shapes with Matplotlib, so Shapely 1.2 adds a `xy` geometry
|
|
88
|
+
property for getting separate arrays of coordinate x and y values::
|
|
93
89
|
|
|
94
90
|
>>> x, y = patch.exterior.xy
|
|
95
91
|
>>> ax = asarray(x)
|
|
@@ -104,16 +100,14 @@ Description: =======
|
|
|
104
100
|
>>> asLineString(ag).wkt
|
|
105
101
|
'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
|
|
106
102
|
|
|
103
|
+
|
|
107
104
|
Testing
|
|
108
105
|
-------
|
|
109
106
|
|
|
110
|
-
Shapely uses a Zope-stye suite of unittests and doctests, excercised
|
|
111
|
-
setup.py.::
|
|
107
|
+
Shapely uses a Zope-stye suite of unittests and doctests, excercised like::
|
|
112
108
|
|
|
113
109
|
$ python setup.py test
|
|
114
110
|
|
|
115
|
-
Nosetests won't run the tests properly; Zope doctest suites are not currently
|
|
116
|
-
supported well by nose.
|
|
117
111
|
|
|
118
112
|
Support
|
|
119
113
|
-------
|
|
@@ -124,47 +118,42 @@ Description: =======
|
|
|
124
118
|
|
|
125
119
|
http://trac.gispython.org/projects/PCL/wiki/CommunityList
|
|
126
120
|
|
|
121
|
+
|
|
127
122
|
Credits
|
|
128
123
|
-------
|
|
129
124
|
|
|
130
125
|
Shapely is written by:
|
|
131
126
|
|
|
132
|
-
* Sean Gillies
|
|
127
|
+
* Sean Gillies (Pleiades)
|
|
133
128
|
* Aron Bierbaum
|
|
134
|
-
*
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
* Howard Butler (Hobu, Inc.)
|
|
130
|
+
* Kai Lautaportti (Hexagon IT)
|
|
131
|
+
* Fr |eaigue| d |eaigue| ric Junod (Camptocamp SA)
|
|
132
|
+
* Eric Lemoine (Camptocamp SA)
|
|
137
133
|
|
|
138
|
-
|
|
139
|
-
* Fr |eaigue| d |eaigue| ric Junod
|
|
140
|
-
* Eric Lemoine
|
|
141
|
-
* Jonathan Tartley
|
|
142
|
-
* Kristian Thy
|
|
143
|
-
* Oliver Tonnhofer
|
|
144
|
-
|
|
145
|
-
Additional help from:
|
|
134
|
+
with additional help from:
|
|
146
135
|
|
|
147
136
|
* Justin Bronn (GeoDjango) for ctypes inspiration
|
|
148
137
|
* Martin Davis (JTS)
|
|
149
|
-
* Jaakko Salli for the Windows distributions
|
|
150
138
|
* Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
|
|
151
139
|
|
|
152
140
|
Major portions of this work were supported by a grant (for Pleiades_) from the
|
|
153
141
|
U.S. National Endowment for the Humanities (http://www.neh.gov).
|
|
154
142
|
|
|
143
|
+
|
|
155
144
|
.. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
|
|
156
145
|
.. _PostGIS: http://postgis.org
|
|
157
146
|
.. _GEOS: http://trac.osgeo.org/geos/
|
|
158
147
|
.. _example apps: http://trac.gispython.org/lab/wiki/Examples
|
|
159
148
|
.. _wiki: http://trac.gispython.org/lab/wiki/Shapely
|
|
160
|
-
.. _manual: http://gispython.org/shapely/
|
|
149
|
+
.. _manual: http://gispython.org/shapely/manual.html
|
|
161
150
|
.. |eaigue| unicode:: U+00E9
|
|
162
151
|
:trim:
|
|
163
152
|
.. _Pleiades: http://pleiades.stoa.org
|
|
164
153
|
|
|
165
154
|
Keywords: geometry topology gis
|
|
166
155
|
Platform: UNKNOWN
|
|
167
|
-
Classifier: Development Status ::
|
|
156
|
+
Classifier: Development Status :: 4 - Beta
|
|
168
157
|
Classifier: Intended Audience :: Developers
|
|
169
158
|
Classifier: Intended Audience :: Science/Research
|
|
170
159
|
Classifier: License :: OSI Approved :: BSD License
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
Shapely
|
|
3
3
|
=======
|
|
4
4
|
|
|
5
|
-
.. image:: http://
|
|
6
|
-
:width:
|
|
7
|
-
:height:
|
|
5
|
+
.. image:: http://gispython.org/images/shapely-med.png
|
|
6
|
+
:width: 640
|
|
7
|
+
:height: 320
|
|
8
8
|
|
|
9
9
|
Shapely is a BSD-licensed Python package for manipulation and analysis of
|
|
10
|
-
planar
|
|
11
|
-
systems.
|
|
10
|
+
planar geometries. It is not concerned with data formats or coordinate
|
|
11
|
+
systems. It is based on the widely deployed GEOS_ (the engine of PostGIS_) and
|
|
12
12
|
JTS_ (from which GEOS is ported) libraries. This C dependency is traded for the
|
|
13
|
-
ability to
|
|
13
|
+
ability to analyze geometries with blazing speed.
|
|
14
14
|
|
|
15
15
|
In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a
|
|
16
16
|
database using idiomatic Python. For more details, see:
|
|
@@ -19,6 +19,7 @@ database using idiomatic Python. For more details, see:
|
|
|
19
19
|
* Shapely manual_
|
|
20
20
|
* Shapely `example apps`_
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
Dependencies
|
|
23
24
|
------------
|
|
24
25
|
|
|
@@ -27,6 +28,7 @@ Shapely 1.2 depends on:
|
|
|
27
28
|
* Python >=2.5,<3
|
|
28
29
|
* libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
|
|
29
30
|
|
|
31
|
+
|
|
30
32
|
Installation
|
|
31
33
|
------------
|
|
32
34
|
|
|
@@ -40,6 +42,7 @@ or from a source distribution with the setup script::
|
|
|
40
42
|
|
|
41
43
|
$ python setup.py install
|
|
42
44
|
|
|
45
|
+
|
|
43
46
|
Usage
|
|
44
47
|
-----
|
|
45
48
|
|
|
@@ -56,19 +59,12 @@ buffering a point::
|
|
|
56
59
|
See the manual_ for comprehensive usage snippets and the dissolve.py and
|
|
57
60
|
intersect.py `example apps`_.
|
|
58
61
|
|
|
59
|
-
Integration
|
|
60
|
-
-----------
|
|
61
|
-
|
|
62
|
-
Shapely does not read or write data files, but it can serialize and deserialize
|
|
63
|
-
using several well known formats and protocols. The shapely.wkb and shapely.wkt
|
|
64
|
-
modules provide dumpers and loaders inspired by Python's pickle module.::
|
|
65
62
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
'POINT (0.0000000000000000 0.0000000000000000)'
|
|
63
|
+
Numpy integration
|
|
64
|
+
-----------------
|
|
69
65
|
|
|
70
|
-
All linear
|
|
71
|
-
|
|
66
|
+
All linear geometries, such as the rings of a polygon, provide the Numpy array
|
|
67
|
+
interface::
|
|
72
68
|
|
|
73
69
|
>>> from numpy import asarray
|
|
74
70
|
>>> ag = asarray(patch.exterior)
|
|
@@ -79,9 +75,9 @@ provide the Numpy array interface.::
|
|
|
79
75
|
...
|
|
80
76
|
[ 1.00000000e+01, 0.00000000e+00]])
|
|
81
77
|
|
|
82
|
-
That yields a numpy array of [x, y] arrays. This is not
|
|
83
|
-
|
|
84
|
-
for getting separate arrays of coordinate x and y values
|
|
78
|
+
That yields a numpy array of [x, y] arrays. This is not exactly what one wants
|
|
79
|
+
for plotting shapes with Matplotlib, so Shapely 1.2 adds a `xy` geometry
|
|
80
|
+
property for getting separate arrays of coordinate x and y values::
|
|
85
81
|
|
|
86
82
|
>>> x, y = patch.exterior.xy
|
|
87
83
|
>>> ax = asarray(x)
|
|
@@ -96,16 +92,14 @@ Numpy arrays can also be adapted to Shapely linestrings::
|
|
|
96
92
|
>>> asLineString(ag).wkt
|
|
97
93
|
'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
|
|
98
94
|
|
|
95
|
+
|
|
99
96
|
Testing
|
|
100
97
|
-------
|
|
101
98
|
|
|
102
|
-
Shapely uses a Zope-stye suite of unittests and doctests, excercised
|
|
103
|
-
setup.py.::
|
|
99
|
+
Shapely uses a Zope-stye suite of unittests and doctests, excercised like::
|
|
104
100
|
|
|
105
101
|
$ python setup.py test
|
|
106
102
|
|
|
107
|
-
Nosetests won't run the tests properly; Zope doctest suites are not currently
|
|
108
|
-
supported well by nose.
|
|
109
103
|
|
|
110
104
|
Support
|
|
111
105
|
-------
|
|
@@ -116,40 +110,35 @@ If you have questions, please consider joining our community list:
|
|
|
116
110
|
|
|
117
111
|
http://trac.gispython.org/projects/PCL/wiki/CommunityList
|
|
118
112
|
|
|
113
|
+
|
|
119
114
|
Credits
|
|
120
115
|
-------
|
|
121
116
|
|
|
122
117
|
Shapely is written by:
|
|
123
118
|
|
|
124
|
-
* Sean Gillies
|
|
119
|
+
* Sean Gillies (Pleiades)
|
|
125
120
|
* Aron Bierbaum
|
|
126
|
-
*
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
* Howard Butler (Hobu, Inc.)
|
|
122
|
+
* Kai Lautaportti (Hexagon IT)
|
|
123
|
+
* Fr |eaigue| d |eaigue| ric Junod (Camptocamp SA)
|
|
124
|
+
* Eric Lemoine (Camptocamp SA)
|
|
129
125
|
|
|
130
|
-
|
|
131
|
-
* Fr |eaigue| d |eaigue| ric Junod
|
|
132
|
-
* Eric Lemoine
|
|
133
|
-
* Jonathan Tartley
|
|
134
|
-
* Kristian Thy
|
|
135
|
-
* Oliver Tonnhofer
|
|
136
|
-
|
|
137
|
-
Additional help from:
|
|
126
|
+
with additional help from:
|
|
138
127
|
|
|
139
128
|
* Justin Bronn (GeoDjango) for ctypes inspiration
|
|
140
129
|
* Martin Davis (JTS)
|
|
141
|
-
* Jaakko Salli for the Windows distributions
|
|
142
130
|
* Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
|
|
143
131
|
|
|
144
132
|
Major portions of this work were supported by a grant (for Pleiades_) from the
|
|
145
133
|
U.S. National Endowment for the Humanities (http://www.neh.gov).
|
|
146
134
|
|
|
135
|
+
|
|
147
136
|
.. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
|
|
148
137
|
.. _PostGIS: http://postgis.org
|
|
149
138
|
.. _GEOS: http://trac.osgeo.org/geos/
|
|
150
139
|
.. _example apps: http://trac.gispython.org/lab/wiki/Examples
|
|
151
140
|
.. _wiki: http://trac.gispython.org/lab/wiki/Shapely
|
|
152
|
-
.. _manual: http://gispython.org/shapely/
|
|
141
|
+
.. _manual: http://gispython.org/shapely/manual.html
|
|
153
142
|
.. |eaigue| unicode:: U+00E9
|
|
154
143
|
:trim:
|
|
155
144
|
.. _Pleiades: http://pleiades.stoa.org
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
Metadata-Version: 1.0
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.2b2
|
|
4
|
+
Summary: Planar geometries, predicates, and operations
|
|
5
5
|
Home-page: http://trac.gispython.org/lab/wiki/Shapely
|
|
6
6
|
Author: Sean Gillies
|
|
7
7
|
Author-email: sean.gillies@gmail.com
|
|
8
8
|
License: BSD
|
|
9
|
-
Description:
|
|
9
|
+
Description:
|
|
10
10
|
Shapely
|
|
11
11
|
=======
|
|
12
12
|
|
|
13
|
-
.. image:: http://
|
|
14
|
-
:width:
|
|
15
|
-
:height:
|
|
13
|
+
.. image:: http://gispython.org/images/shapely-med.png
|
|
14
|
+
:width: 640
|
|
15
|
+
:height: 320
|
|
16
16
|
|
|
17
17
|
Shapely is a BSD-licensed Python package for manipulation and analysis of
|
|
18
|
-
planar
|
|
19
|
-
systems.
|
|
18
|
+
planar geometries. It is not concerned with data formats or coordinate
|
|
19
|
+
systems. It is based on the widely deployed GEOS_ (the engine of PostGIS_) and
|
|
20
20
|
JTS_ (from which GEOS is ported) libraries. This C dependency is traded for the
|
|
21
|
-
ability to
|
|
21
|
+
ability to analyze geometries with blazing speed.
|
|
22
22
|
|
|
23
23
|
In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a
|
|
24
24
|
database using idiomatic Python. For more details, see:
|
|
@@ -27,6 +27,7 @@ Description: =======
|
|
|
27
27
|
* Shapely manual_
|
|
28
28
|
* Shapely `example apps`_
|
|
29
29
|
|
|
30
|
+
|
|
30
31
|
Dependencies
|
|
31
32
|
------------
|
|
32
33
|
|
|
@@ -35,6 +36,7 @@ Description: =======
|
|
|
35
36
|
* Python >=2.5,<3
|
|
36
37
|
* libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
|
|
37
38
|
|
|
39
|
+
|
|
38
40
|
Installation
|
|
39
41
|
------------
|
|
40
42
|
|
|
@@ -48,6 +50,7 @@ Description: =======
|
|
|
48
50
|
|
|
49
51
|
$ python setup.py install
|
|
50
52
|
|
|
53
|
+
|
|
51
54
|
Usage
|
|
52
55
|
-----
|
|
53
56
|
|
|
@@ -64,19 +67,12 @@ Description: =======
|
|
|
64
67
|
See the manual_ for comprehensive usage snippets and the dissolve.py and
|
|
65
68
|
intersect.py `example apps`_.
|
|
66
69
|
|
|
67
|
-
Integration
|
|
68
|
-
-----------
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
modules provide dumpers and loaders inspired by Python's pickle module.::
|
|
71
|
+
Numpy integration
|
|
72
|
+
-----------------
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'POINT (0.0000000000000000 0.0000000000000000)'
|
|
77
|
-
|
|
78
|
-
All linear objects, such as the rings of a polygon (like ``patch`` above),
|
|
79
|
-
provide the Numpy array interface.::
|
|
74
|
+
All linear geometries, such as the rings of a polygon, provide the Numpy array
|
|
75
|
+
interface::
|
|
80
76
|
|
|
81
77
|
>>> from numpy import asarray
|
|
82
78
|
>>> ag = asarray(patch.exterior)
|
|
@@ -87,9 +83,9 @@ Description: =======
|
|
|
87
83
|
...
|
|
88
84
|
[ 1.00000000e+01, 0.00000000e+00]])
|
|
89
85
|
|
|
90
|
-
That yields a numpy array of [x, y] arrays. This is not
|
|
91
|
-
|
|
92
|
-
for getting separate arrays of coordinate x and y values
|
|
86
|
+
That yields a numpy array of [x, y] arrays. This is not exactly what one wants
|
|
87
|
+
for plotting shapes with Matplotlib, so Shapely 1.2 adds a `xy` geometry
|
|
88
|
+
property for getting separate arrays of coordinate x and y values::
|
|
93
89
|
|
|
94
90
|
>>> x, y = patch.exterior.xy
|
|
95
91
|
>>> ax = asarray(x)
|
|
@@ -104,16 +100,14 @@ Description: =======
|
|
|
104
100
|
>>> asLineString(ag).wkt
|
|
105
101
|
'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
|
|
106
102
|
|
|
103
|
+
|
|
107
104
|
Testing
|
|
108
105
|
-------
|
|
109
106
|
|
|
110
|
-
Shapely uses a Zope-stye suite of unittests and doctests, excercised
|
|
111
|
-
setup.py.::
|
|
107
|
+
Shapely uses a Zope-stye suite of unittests and doctests, excercised like::
|
|
112
108
|
|
|
113
109
|
$ python setup.py test
|
|
114
110
|
|
|
115
|
-
Nosetests won't run the tests properly; Zope doctest suites are not currently
|
|
116
|
-
supported well by nose.
|
|
117
111
|
|
|
118
112
|
Support
|
|
119
113
|
-------
|
|
@@ -124,47 +118,42 @@ Description: =======
|
|
|
124
118
|
|
|
125
119
|
http://trac.gispython.org/projects/PCL/wiki/CommunityList
|
|
126
120
|
|
|
121
|
+
|
|
127
122
|
Credits
|
|
128
123
|
-------
|
|
129
124
|
|
|
130
125
|
Shapely is written by:
|
|
131
126
|
|
|
132
|
-
* Sean Gillies
|
|
127
|
+
* Sean Gillies (Pleiades)
|
|
133
128
|
* Aron Bierbaum
|
|
134
|
-
*
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
* Howard Butler (Hobu, Inc.)
|
|
130
|
+
* Kai Lautaportti (Hexagon IT)
|
|
131
|
+
* Fr |eaigue| d |eaigue| ric Junod (Camptocamp SA)
|
|
132
|
+
* Eric Lemoine (Camptocamp SA)
|
|
137
133
|
|
|
138
|
-
|
|
139
|
-
* Fr |eaigue| d |eaigue| ric Junod
|
|
140
|
-
* Eric Lemoine
|
|
141
|
-
* Jonathan Tartley
|
|
142
|
-
* Kristian Thy
|
|
143
|
-
* Oliver Tonnhofer
|
|
144
|
-
|
|
145
|
-
Additional help from:
|
|
134
|
+
with additional help from:
|
|
146
135
|
|
|
147
136
|
* Justin Bronn (GeoDjango) for ctypes inspiration
|
|
148
137
|
* Martin Davis (JTS)
|
|
149
|
-
* Jaakko Salli for the Windows distributions
|
|
150
138
|
* Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
|
|
151
139
|
|
|
152
140
|
Major portions of this work were supported by a grant (for Pleiades_) from the
|
|
153
141
|
U.S. National Endowment for the Humanities (http://www.neh.gov).
|
|
154
142
|
|
|
143
|
+
|
|
155
144
|
.. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
|
|
156
145
|
.. _PostGIS: http://postgis.org
|
|
157
146
|
.. _GEOS: http://trac.osgeo.org/geos/
|
|
158
147
|
.. _example apps: http://trac.gispython.org/lab/wiki/Examples
|
|
159
148
|
.. _wiki: http://trac.gispython.org/lab/wiki/Shapely
|
|
160
|
-
.. _manual: http://gispython.org/shapely/
|
|
149
|
+
.. _manual: http://gispython.org/shapely/manual.html
|
|
161
150
|
.. |eaigue| unicode:: U+00E9
|
|
162
151
|
:trim:
|
|
163
152
|
.. _Pleiades: http://pleiades.stoa.org
|
|
164
153
|
|
|
165
154
|
Keywords: geometry topology gis
|
|
166
155
|
Platform: UNKNOWN
|
|
167
|
-
Classifier: Development Status ::
|
|
156
|
+
Classifier: Development Status :: 4 - Beta
|
|
168
157
|
Classifier: Intended Audience :: Developers
|
|
169
158
|
Classifier: Intended Audience :: Science/Research
|
|
170
159
|
Classifier: License :: OSI Approved :: BSD License
|
|
@@ -51,15 +51,12 @@ shapely/tests/Predicates.txt
|
|
|
51
51
|
shapely/tests/__init__.py
|
|
52
52
|
shapely/tests/attribute-chains.txt
|
|
53
53
|
shapely/tests/binascii_hex.txt
|
|
54
|
-
shapely/tests/cascaded_union.txt
|
|
55
54
|
shapely/tests/dimensions.txt
|
|
56
55
|
shapely/tests/invalid_intersection.txt
|
|
57
56
|
shapely/tests/linear-referencing.txt
|
|
58
57
|
shapely/tests/linemerge.txt
|
|
59
58
|
shapely/tests/polygonize.txt
|
|
60
|
-
shapely/tests/test_collection.py
|
|
61
59
|
shapely/tests/test_doctests.py
|
|
62
|
-
shapely/tests/test_emptiness.py
|
|
63
60
|
shapely/tests/test_equality.py
|
|
64
61
|
shapely/tests/test_geomseq.py
|
|
65
62
|
shapely/tests/test_prepared.py
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# dissolve.py
|
|
2
|
+
#
|
|
3
|
+
# Demonstrate how Shapely can be used to build up a collection of patches by
|
|
4
|
+
# dissolving circular regions and how Shapely supports plotting of the results.
|
|
5
|
+
|
|
6
|
+
from functools import partial
|
|
7
|
+
import random
|
|
8
|
+
|
|
9
|
+
import pylab
|
|
10
|
+
|
|
11
|
+
from shapely.geometry import Point
|
|
12
|
+
from shapely.ops import cascaded_union
|
|
13
|
+
|
|
14
|
+
# Use a partial function to make 100 points uniformly distributed in a 40x40
|
|
15
|
+
# box centered on 0,0.
|
|
16
|
+
r = partial(random.uniform, -20.0, 20.0)
|
|
17
|
+
points = [Point(r(), r()) for i in range(100)]
|
|
18
|
+
|
|
19
|
+
# Buffer the points, producing 100 polygon spots
|
|
20
|
+
spots = [p.buffer(2.5) for p in points]
|
|
21
|
+
|
|
22
|
+
# Perform a cascaded union of the polygon spots, dissolving them into a
|
|
23
|
+
# collection of polygon patches
|
|
24
|
+
patches = cascaded_union(spots)
|
|
25
|
+
|
|
26
|
+
# Illustrate the results using matplotlib's pylab interface
|
|
27
|
+
pylab.figure(num=None, figsize=(4, 4), dpi=180)
|
|
28
|
+
|
|
29
|
+
for patch in patches.geoms:
|
|
30
|
+
assert patch.geom_type in ['Polygon']
|
|
31
|
+
assert patch.is_valid
|
|
32
|
+
|
|
33
|
+
# Fill and outline each patch
|
|
34
|
+
x, y = patch.exterior.xy
|
|
35
|
+
pylab.fill(x, y, color='#cccccc', aa=True)
|
|
36
|
+
pylab.plot(x, y, color='#666666', aa=True, lw=1.0)
|
|
37
|
+
|
|
38
|
+
# Do the same for the holes of the patch
|
|
39
|
+
for hole in patch.interiors:
|
|
40
|
+
x, y = hole.xy
|
|
41
|
+
pylab.fill(x, y, color='#ffffff', aa=True)
|
|
42
|
+
pylab.plot(x, y, color='#999999', aa=True, lw=1.0)
|
|
43
|
+
|
|
44
|
+
# Plot the original points
|
|
45
|
+
pylab.plot([p.x for p in points], [p.y for p in points], 'b,', alpha=0.75)
|
|
46
|
+
|
|
47
|
+
# Write the number of patches and the total patch area to the figure
|
|
48
|
+
pylab.text(-25, 25,
|
|
49
|
+
"Patches: %d, total area: %.2f" % (len(patches.geoms), patches.area))
|
|
50
|
+
|
|
51
|
+
pylab.savefig('dissolve.png')
|
|
52
|
+
|