shapely 1.2__tar.gz → 1.2b1__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.2b1}/CHANGES.txt +0 -41
- Shapely-1.2b1/CREDITS.txt +9 -0
- {Shapely-1.2 → Shapely-1.2b1}/MANIFEST.in +0 -2
- {Shapely-1.2 → Shapely-1.2b1}/PKG-INFO +35 -42
- {Shapely-1.2 → Shapely-1.2b1}/README.txt +32 -39
- {Shapely-1.2 → Shapely-1.2b1}/Shapely.egg-info/PKG-INFO +35 -42
- {Shapely-1.2 → Shapely-1.2b1}/Shapely.egg-info/SOURCES.txt +0 -3
- Shapely-1.2b1/examples/dissolve.py +52 -0
- Shapely-1.2b1/examples/intersect.py +80 -0
- Shapely-1.2b1/setup.cfg +15 -0
- {Shapely-1.2 → Shapely-1.2b1}/setup.py +4 -6
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/base.py +14 -53
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/collection.py +1 -1
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/linestring.py +135 -109
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/multilinestring.py +60 -54
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/multipoint.py +57 -57
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/multipolygon.py +43 -48
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/point.py +91 -85
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/polygon.py +212 -182
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/proxy.py +11 -18
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geos.py +20 -45
- {Shapely-1.2 → Shapely-1.2b1}/shapely/impl.py +4 -3
- {Shapely-1.2 → Shapely-1.2b1}/shapely/ops.py +1 -2
- {Shapely-1.2 → Shapely-1.2b1}/shapely/prepared.py +3 -3
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/LineString.txt +6 -10
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/MultiLineString.txt +1 -18
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/MultiPoint.txt +1 -17
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/MultiPolygon.txt +1 -17
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/Point.txt +10 -10
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/Polygon.txt +7 -3
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/__init__.py +0 -3
- {Shapely-1.2 → Shapely-1.2b1}/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.2b1}/LICENSE.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/__init__.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/coords.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/ctypes_declarations.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/__init__.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geometry/geo.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/geoms.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/iterops.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/linref.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/predicates.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/Array.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/GeoInterface.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/IterOps.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/Operations.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/Persist.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/Predicates.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/attribute-chains.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/binascii_hex.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/dimensions.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/invalid_intersection.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/linear-referencing.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/linemerge.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/polygonize.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/test_doctests.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/test_equality.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/test_prepared.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/test_xy.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/threading_test.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/tests/wkt_locale.txt +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/topology.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/wkb.py +0 -0
- {Shapely-1.2 → Shapely-1.2b1}/shapely/wkt.py +0 -0
|
@@ -1,46 +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
|
-
1.2b2 (2010-02-19)
|
|
41
|
-
------------------
|
|
42
|
-
- Fix cascaded_union bug introduced in 1.2b1 (#212).
|
|
43
|
-
|
|
44
3
|
1.2b1 (2010-02-18)
|
|
45
4
|
------------------
|
|
46
5
|
- Update the README. Remove cruft from setup.py. Add some version 1.2 metadata
|
|
@@ -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,28 @@
|
|
|
1
1
|
Metadata-Version: 1.0
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.2b1
|
|
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:
|
|
13
|
+
.. image:: http://trac.gispython.org/lab/raw-attachment/wiki/Examples/dissolve.png
|
|
14
|
+
:width: 400
|
|
15
|
+
:height: 400
|
|
16
|
+
|
|
17
|
+
.. image:: http://trac.gispython.org/lab/raw-attachment/wiki/Examples/intersect.png
|
|
18
|
+
:width: 400
|
|
15
19
|
:height: 400
|
|
16
20
|
|
|
17
21
|
Shapely is a BSD-licensed Python package for manipulation and analysis of
|
|
18
|
-
planar
|
|
19
|
-
systems.
|
|
22
|
+
planar geometries. It is not concerned with data formats or coordinate
|
|
23
|
+
systems. It is based on the widely deployed GEOS_ (the engine of PostGIS_) and
|
|
20
24
|
JTS_ (from which GEOS is ported) libraries. This C dependency is traded for the
|
|
21
|
-
ability to
|
|
25
|
+
ability to analyze geometries with blazing speed.
|
|
22
26
|
|
|
23
27
|
In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a
|
|
24
28
|
database using idiomatic Python. For more details, see:
|
|
@@ -27,6 +31,7 @@ Description: =======
|
|
|
27
31
|
* Shapely manual_
|
|
28
32
|
* Shapely `example apps`_
|
|
29
33
|
|
|
34
|
+
|
|
30
35
|
Dependencies
|
|
31
36
|
------------
|
|
32
37
|
|
|
@@ -35,6 +40,7 @@ Description: =======
|
|
|
35
40
|
* Python >=2.5,<3
|
|
36
41
|
* libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
|
|
37
42
|
|
|
43
|
+
|
|
38
44
|
Installation
|
|
39
45
|
------------
|
|
40
46
|
|
|
@@ -48,6 +54,7 @@ Description: =======
|
|
|
48
54
|
|
|
49
55
|
$ python setup.py install
|
|
50
56
|
|
|
57
|
+
|
|
51
58
|
Usage
|
|
52
59
|
-----
|
|
53
60
|
|
|
@@ -64,19 +71,12 @@ Description: =======
|
|
|
64
71
|
See the manual_ for comprehensive usage snippets and the dissolve.py and
|
|
65
72
|
intersect.py `example apps`_.
|
|
66
73
|
|
|
67
|
-
Integration
|
|
68
|
-
-----------
|
|
69
|
-
|
|
70
|
-
Shapely does not read or write data files, but it can serialize and deserialize
|
|
71
|
-
using several well known formats and protocols. The shapely.wkb and shapely.wkt
|
|
72
|
-
modules provide dumpers and loaders inspired by Python's pickle module.::
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'POINT (0.0000000000000000 0.0000000000000000)'
|
|
75
|
+
Numpy integration
|
|
76
|
+
-----------------
|
|
77
77
|
|
|
78
|
-
All linear
|
|
79
|
-
|
|
78
|
+
All linear geometries, such as the rings of a polygon, provide the Numpy array
|
|
79
|
+
interface::
|
|
80
80
|
|
|
81
81
|
>>> from numpy import asarray
|
|
82
82
|
>>> ag = asarray(patch.exterior)
|
|
@@ -87,9 +87,9 @@ Description: =======
|
|
|
87
87
|
...
|
|
88
88
|
[ 1.00000000e+01, 0.00000000e+00]])
|
|
89
89
|
|
|
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
|
|
90
|
+
That yields a numpy array of [x, y] arrays. This is not exactly what one wants
|
|
91
|
+
for plotting shapes with Matplotlib, so Shapely 1.2 adds a `xy` geometry
|
|
92
|
+
property for getting separate arrays of coordinate x and y values::
|
|
93
93
|
|
|
94
94
|
>>> x, y = patch.exterior.xy
|
|
95
95
|
>>> ax = asarray(x)
|
|
@@ -104,16 +104,14 @@ Description: =======
|
|
|
104
104
|
>>> asLineString(ag).wkt
|
|
105
105
|
'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
|
|
106
106
|
|
|
107
|
+
|
|
107
108
|
Testing
|
|
108
109
|
-------
|
|
109
110
|
|
|
110
|
-
Shapely uses a Zope-stye suite of unittests and doctests, excercised
|
|
111
|
-
setup.py.::
|
|
111
|
+
Shapely uses a Zope-stye suite of unittests and doctests, excercised like::
|
|
112
112
|
|
|
113
113
|
$ python setup.py test
|
|
114
114
|
|
|
115
|
-
Nosetests won't run the tests properly; Zope doctest suites are not currently
|
|
116
|
-
supported well by nose.
|
|
117
115
|
|
|
118
116
|
Support
|
|
119
117
|
-------
|
|
@@ -124,47 +122,42 @@ Description: =======
|
|
|
124
122
|
|
|
125
123
|
http://trac.gispython.org/projects/PCL/wiki/CommunityList
|
|
126
124
|
|
|
125
|
+
|
|
127
126
|
Credits
|
|
128
127
|
-------
|
|
129
128
|
|
|
130
129
|
Shapely is written by:
|
|
131
130
|
|
|
132
|
-
* Sean Gillies
|
|
131
|
+
* Sean Gillies (Pleiades)
|
|
133
132
|
* Aron Bierbaum
|
|
134
|
-
*
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
* Howard Butler (Hobu, Inc.)
|
|
134
|
+
* Kai Lautaportti (Hexagon IT)
|
|
135
|
+
* Fr |eaigue| d |eaigue| ric Junod (Camptocamp SA)
|
|
136
|
+
* Eric Lemoine (Camptocamp SA)
|
|
137
137
|
|
|
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:
|
|
138
|
+
with additional help from:
|
|
146
139
|
|
|
147
140
|
* Justin Bronn (GeoDjango) for ctypes inspiration
|
|
148
141
|
* Martin Davis (JTS)
|
|
149
|
-
* Jaakko Salli for the Windows distributions
|
|
150
142
|
* Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
|
|
151
143
|
|
|
152
144
|
Major portions of this work were supported by a grant (for Pleiades_) from the
|
|
153
145
|
U.S. National Endowment for the Humanities (http://www.neh.gov).
|
|
154
146
|
|
|
147
|
+
|
|
155
148
|
.. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
|
|
156
149
|
.. _PostGIS: http://postgis.org
|
|
157
150
|
.. _GEOS: http://trac.osgeo.org/geos/
|
|
158
151
|
.. _example apps: http://trac.gispython.org/lab/wiki/Examples
|
|
159
|
-
.. _wiki: http://trac.gispython.org/
|
|
160
|
-
.. _manual: http://gispython.org/shapely/
|
|
152
|
+
.. _wiki: http://trac.gispython.org/projects/PCL/wiki/Shapely
|
|
153
|
+
.. _manual: http://gispython.org/shapely/manual.html
|
|
161
154
|
.. |eaigue| unicode:: U+00E9
|
|
162
155
|
:trim:
|
|
163
156
|
.. _Pleiades: http://pleiades.stoa.org
|
|
164
157
|
|
|
165
158
|
Keywords: geometry topology gis
|
|
166
159
|
Platform: UNKNOWN
|
|
167
|
-
Classifier: Development Status ::
|
|
160
|
+
Classifier: Development Status :: 4 - Beta
|
|
168
161
|
Classifier: Intended Audience :: Developers
|
|
169
162
|
Classifier: Intended Audience :: Science/Research
|
|
170
163
|
Classifier: License :: OSI Approved :: BSD License
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
Shapely
|
|
3
3
|
=======
|
|
4
4
|
|
|
5
|
-
.. image:: http://
|
|
6
|
-
:width:
|
|
5
|
+
.. image:: http://trac.gispython.org/lab/raw-attachment/wiki/Examples/dissolve.png
|
|
6
|
+
:width: 400
|
|
7
|
+
:height: 400
|
|
8
|
+
|
|
9
|
+
.. image:: http://trac.gispython.org/lab/raw-attachment/wiki/Examples/intersect.png
|
|
10
|
+
:width: 400
|
|
7
11
|
:height: 400
|
|
8
12
|
|
|
9
13
|
Shapely is a BSD-licensed Python package for manipulation and analysis of
|
|
10
|
-
planar
|
|
11
|
-
systems.
|
|
14
|
+
planar geometries. It is not concerned with data formats or coordinate
|
|
15
|
+
systems. It is based on the widely deployed GEOS_ (the engine of PostGIS_) and
|
|
12
16
|
JTS_ (from which GEOS is ported) libraries. This C dependency is traded for the
|
|
13
|
-
ability to
|
|
17
|
+
ability to analyze geometries with blazing speed.
|
|
14
18
|
|
|
15
19
|
In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a
|
|
16
20
|
database using idiomatic Python. For more details, see:
|
|
@@ -19,6 +23,7 @@ database using idiomatic Python. For more details, see:
|
|
|
19
23
|
* Shapely manual_
|
|
20
24
|
* Shapely `example apps`_
|
|
21
25
|
|
|
26
|
+
|
|
22
27
|
Dependencies
|
|
23
28
|
------------
|
|
24
29
|
|
|
@@ -27,6 +32,7 @@ Shapely 1.2 depends on:
|
|
|
27
32
|
* Python >=2.5,<3
|
|
28
33
|
* libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
|
|
29
34
|
|
|
35
|
+
|
|
30
36
|
Installation
|
|
31
37
|
------------
|
|
32
38
|
|
|
@@ -40,6 +46,7 @@ or from a source distribution with the setup script::
|
|
|
40
46
|
|
|
41
47
|
$ python setup.py install
|
|
42
48
|
|
|
49
|
+
|
|
43
50
|
Usage
|
|
44
51
|
-----
|
|
45
52
|
|
|
@@ -56,19 +63,12 @@ buffering a point::
|
|
|
56
63
|
See the manual_ for comprehensive usage snippets and the dissolve.py and
|
|
57
64
|
intersect.py `example apps`_.
|
|
58
65
|
|
|
59
|
-
Integration
|
|
60
|
-
-----------
|
|
61
66
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
modules provide dumpers and loaders inspired by Python's pickle module.::
|
|
67
|
+
Numpy integration
|
|
68
|
+
-----------------
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
'POINT (0.0000000000000000 0.0000000000000000)'
|
|
69
|
-
|
|
70
|
-
All linear objects, such as the rings of a polygon (like ``patch`` above),
|
|
71
|
-
provide the Numpy array interface.::
|
|
70
|
+
All linear geometries, such as the rings of a polygon, provide the Numpy array
|
|
71
|
+
interface::
|
|
72
72
|
|
|
73
73
|
>>> from numpy import asarray
|
|
74
74
|
>>> ag = asarray(patch.exterior)
|
|
@@ -79,9 +79,9 @@ provide the Numpy array interface.::
|
|
|
79
79
|
...
|
|
80
80
|
[ 1.00000000e+01, 0.00000000e+00]])
|
|
81
81
|
|
|
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
|
|
82
|
+
That yields a numpy array of [x, y] arrays. This is not exactly what one wants
|
|
83
|
+
for plotting shapes with Matplotlib, so Shapely 1.2 adds a `xy` geometry
|
|
84
|
+
property for getting separate arrays of coordinate x and y values::
|
|
85
85
|
|
|
86
86
|
>>> x, y = patch.exterior.xy
|
|
87
87
|
>>> ax = asarray(x)
|
|
@@ -96,16 +96,14 @@ Numpy arrays can also be adapted to Shapely linestrings::
|
|
|
96
96
|
>>> asLineString(ag).wkt
|
|
97
97
|
'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
|
|
98
98
|
|
|
99
|
+
|
|
99
100
|
Testing
|
|
100
101
|
-------
|
|
101
102
|
|
|
102
|
-
Shapely uses a Zope-stye suite of unittests and doctests, excercised
|
|
103
|
-
setup.py.::
|
|
103
|
+
Shapely uses a Zope-stye suite of unittests and doctests, excercised like::
|
|
104
104
|
|
|
105
105
|
$ python setup.py test
|
|
106
106
|
|
|
107
|
-
Nosetests won't run the tests properly; Zope doctest suites are not currently
|
|
108
|
-
supported well by nose.
|
|
109
107
|
|
|
110
108
|
Support
|
|
111
109
|
-------
|
|
@@ -116,40 +114,35 @@ If you have questions, please consider joining our community list:
|
|
|
116
114
|
|
|
117
115
|
http://trac.gispython.org/projects/PCL/wiki/CommunityList
|
|
118
116
|
|
|
117
|
+
|
|
119
118
|
Credits
|
|
120
119
|
-------
|
|
121
120
|
|
|
122
121
|
Shapely is written by:
|
|
123
122
|
|
|
124
|
-
* Sean Gillies
|
|
123
|
+
* Sean Gillies (Pleiades)
|
|
125
124
|
* Aron Bierbaum
|
|
126
|
-
*
|
|
125
|
+
* Howard Butler (Hobu, Inc.)
|
|
126
|
+
* Kai Lautaportti (Hexagon IT)
|
|
127
|
+
* Fr |eaigue| d |eaigue| ric Junod (Camptocamp SA)
|
|
128
|
+
* Eric Lemoine (Camptocamp SA)
|
|
127
129
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
* Howard Butler
|
|
131
|
-
* Fr |eaigue| d |eaigue| ric Junod
|
|
132
|
-
* Eric Lemoine
|
|
133
|
-
* Jonathan Tartley
|
|
134
|
-
* Kristian Thy
|
|
135
|
-
* Oliver Tonnhofer
|
|
136
|
-
|
|
137
|
-
Additional help from:
|
|
130
|
+
with additional help from:
|
|
138
131
|
|
|
139
132
|
* Justin Bronn (GeoDjango) for ctypes inspiration
|
|
140
133
|
* Martin Davis (JTS)
|
|
141
|
-
* Jaakko Salli for the Windows distributions
|
|
142
134
|
* Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
|
|
143
135
|
|
|
144
136
|
Major portions of this work were supported by a grant (for Pleiades_) from the
|
|
145
137
|
U.S. National Endowment for the Humanities (http://www.neh.gov).
|
|
146
138
|
|
|
139
|
+
|
|
147
140
|
.. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
|
|
148
141
|
.. _PostGIS: http://postgis.org
|
|
149
142
|
.. _GEOS: http://trac.osgeo.org/geos/
|
|
150
143
|
.. _example apps: http://trac.gispython.org/lab/wiki/Examples
|
|
151
|
-
.. _wiki: http://trac.gispython.org/
|
|
152
|
-
.. _manual: http://gispython.org/shapely/
|
|
144
|
+
.. _wiki: http://trac.gispython.org/projects/PCL/wiki/Shapely
|
|
145
|
+
.. _manual: http://gispython.org/shapely/manual.html
|
|
153
146
|
.. |eaigue| unicode:: U+00E9
|
|
154
147
|
:trim:
|
|
155
148
|
.. _Pleiades: http://pleiades.stoa.org
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
Metadata-Version: 1.0
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.2b1
|
|
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:
|
|
13
|
+
.. image:: http://trac.gispython.org/lab/raw-attachment/wiki/Examples/dissolve.png
|
|
14
|
+
:width: 400
|
|
15
|
+
:height: 400
|
|
16
|
+
|
|
17
|
+
.. image:: http://trac.gispython.org/lab/raw-attachment/wiki/Examples/intersect.png
|
|
18
|
+
:width: 400
|
|
15
19
|
:height: 400
|
|
16
20
|
|
|
17
21
|
Shapely is a BSD-licensed Python package for manipulation and analysis of
|
|
18
|
-
planar
|
|
19
|
-
systems.
|
|
22
|
+
planar geometries. It is not concerned with data formats or coordinate
|
|
23
|
+
systems. It is based on the widely deployed GEOS_ (the engine of PostGIS_) and
|
|
20
24
|
JTS_ (from which GEOS is ported) libraries. This C dependency is traded for the
|
|
21
|
-
ability to
|
|
25
|
+
ability to analyze geometries with blazing speed.
|
|
22
26
|
|
|
23
27
|
In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a
|
|
24
28
|
database using idiomatic Python. For more details, see:
|
|
@@ -27,6 +31,7 @@ Description: =======
|
|
|
27
31
|
* Shapely manual_
|
|
28
32
|
* Shapely `example apps`_
|
|
29
33
|
|
|
34
|
+
|
|
30
35
|
Dependencies
|
|
31
36
|
------------
|
|
32
37
|
|
|
@@ -35,6 +40,7 @@ Description: =======
|
|
|
35
40
|
* Python >=2.5,<3
|
|
36
41
|
* libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
|
|
37
42
|
|
|
43
|
+
|
|
38
44
|
Installation
|
|
39
45
|
------------
|
|
40
46
|
|
|
@@ -48,6 +54,7 @@ Description: =======
|
|
|
48
54
|
|
|
49
55
|
$ python setup.py install
|
|
50
56
|
|
|
57
|
+
|
|
51
58
|
Usage
|
|
52
59
|
-----
|
|
53
60
|
|
|
@@ -64,19 +71,12 @@ Description: =======
|
|
|
64
71
|
See the manual_ for comprehensive usage snippets and the dissolve.py and
|
|
65
72
|
intersect.py `example apps`_.
|
|
66
73
|
|
|
67
|
-
Integration
|
|
68
|
-
-----------
|
|
69
|
-
|
|
70
|
-
Shapely does not read or write data files, but it can serialize and deserialize
|
|
71
|
-
using several well known formats and protocols. The shapely.wkb and shapely.wkt
|
|
72
|
-
modules provide dumpers and loaders inspired by Python's pickle module.::
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'POINT (0.0000000000000000 0.0000000000000000)'
|
|
75
|
+
Numpy integration
|
|
76
|
+
-----------------
|
|
77
77
|
|
|
78
|
-
All linear
|
|
79
|
-
|
|
78
|
+
All linear geometries, such as the rings of a polygon, provide the Numpy array
|
|
79
|
+
interface::
|
|
80
80
|
|
|
81
81
|
>>> from numpy import asarray
|
|
82
82
|
>>> ag = asarray(patch.exterior)
|
|
@@ -87,9 +87,9 @@ Description: =======
|
|
|
87
87
|
...
|
|
88
88
|
[ 1.00000000e+01, 0.00000000e+00]])
|
|
89
89
|
|
|
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
|
|
90
|
+
That yields a numpy array of [x, y] arrays. This is not exactly what one wants
|
|
91
|
+
for plotting shapes with Matplotlib, so Shapely 1.2 adds a `xy` geometry
|
|
92
|
+
property for getting separate arrays of coordinate x and y values::
|
|
93
93
|
|
|
94
94
|
>>> x, y = patch.exterior.xy
|
|
95
95
|
>>> ax = asarray(x)
|
|
@@ -104,16 +104,14 @@ Description: =======
|
|
|
104
104
|
>>> asLineString(ag).wkt
|
|
105
105
|
'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
|
|
106
106
|
|
|
107
|
+
|
|
107
108
|
Testing
|
|
108
109
|
-------
|
|
109
110
|
|
|
110
|
-
Shapely uses a Zope-stye suite of unittests and doctests, excercised
|
|
111
|
-
setup.py.::
|
|
111
|
+
Shapely uses a Zope-stye suite of unittests and doctests, excercised like::
|
|
112
112
|
|
|
113
113
|
$ python setup.py test
|
|
114
114
|
|
|
115
|
-
Nosetests won't run the tests properly; Zope doctest suites are not currently
|
|
116
|
-
supported well by nose.
|
|
117
115
|
|
|
118
116
|
Support
|
|
119
117
|
-------
|
|
@@ -124,47 +122,42 @@ Description: =======
|
|
|
124
122
|
|
|
125
123
|
http://trac.gispython.org/projects/PCL/wiki/CommunityList
|
|
126
124
|
|
|
125
|
+
|
|
127
126
|
Credits
|
|
128
127
|
-------
|
|
129
128
|
|
|
130
129
|
Shapely is written by:
|
|
131
130
|
|
|
132
|
-
* Sean Gillies
|
|
131
|
+
* Sean Gillies (Pleiades)
|
|
133
132
|
* Aron Bierbaum
|
|
134
|
-
*
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
* Howard Butler (Hobu, Inc.)
|
|
134
|
+
* Kai Lautaportti (Hexagon IT)
|
|
135
|
+
* Fr |eaigue| d |eaigue| ric Junod (Camptocamp SA)
|
|
136
|
+
* Eric Lemoine (Camptocamp SA)
|
|
137
137
|
|
|
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:
|
|
138
|
+
with additional help from:
|
|
146
139
|
|
|
147
140
|
* Justin Bronn (GeoDjango) for ctypes inspiration
|
|
148
141
|
* Martin Davis (JTS)
|
|
149
|
-
* Jaakko Salli for the Windows distributions
|
|
150
142
|
* Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
|
|
151
143
|
|
|
152
144
|
Major portions of this work were supported by a grant (for Pleiades_) from the
|
|
153
145
|
U.S. National Endowment for the Humanities (http://www.neh.gov).
|
|
154
146
|
|
|
147
|
+
|
|
155
148
|
.. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
|
|
156
149
|
.. _PostGIS: http://postgis.org
|
|
157
150
|
.. _GEOS: http://trac.osgeo.org/geos/
|
|
158
151
|
.. _example apps: http://trac.gispython.org/lab/wiki/Examples
|
|
159
|
-
.. _wiki: http://trac.gispython.org/
|
|
160
|
-
.. _manual: http://gispython.org/shapely/
|
|
152
|
+
.. _wiki: http://trac.gispython.org/projects/PCL/wiki/Shapely
|
|
153
|
+
.. _manual: http://gispython.org/shapely/manual.html
|
|
161
154
|
.. |eaigue| unicode:: U+00E9
|
|
162
155
|
:trim:
|
|
163
156
|
.. _Pleiades: http://pleiades.stoa.org
|
|
164
157
|
|
|
165
158
|
Keywords: geometry topology gis
|
|
166
159
|
Platform: UNKNOWN
|
|
167
|
-
Classifier: Development Status ::
|
|
160
|
+
Classifier: Development Status :: 4 - Beta
|
|
168
161
|
Classifier: Intended Audience :: Developers
|
|
169
162
|
Classifier: Intended Audience :: Science/Research
|
|
170
163
|
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
|
+
|