shapely 1.0.15__tar.gz → 1.2__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.
Files changed (113) hide show
  1. Shapely-1.2/._README.txt +0 -0
  2. {Shapely-1.0.15 → Shapely-1.2}/CHANGES.txt +79 -5
  3. Shapely-1.2/CREDITS.txt +24 -0
  4. Shapely-1.2/MANIFEST.in +5 -0
  5. Shapely-1.2/PKG-INFO +173 -0
  6. Shapely-1.2/README.txt +155 -0
  7. Shapely-1.2/Shapely.egg-info/PKG-INFO +173 -0
  8. Shapely-1.2/Shapely.egg-info/SOURCES.txt +68 -0
  9. Shapely-1.2/examples/dissolve.py +53 -0
  10. Shapely-1.2/examples/intersect.py +81 -0
  11. Shapely-1.2/setup.py +51 -0
  12. Shapely-1.2/shapely/__init__.py +1 -0
  13. Shapely-1.2/shapely/coords.py +165 -0
  14. {Shapely-1.0.15 → Shapely-1.2}/shapely/ctypes_declarations.py +79 -18
  15. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/__init__.py +12 -0
  16. Shapely-1.2/shapely/geometry/base.py +580 -0
  17. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/collection.py +10 -6
  18. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/geo.py +4 -4
  19. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/linestring.py +129 -128
  20. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/multilinestring.py +68 -92
  21. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/multipoint.py +74 -81
  22. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/multipolygon.py +72 -81
  23. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/point.py +115 -130
  24. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/polygon.py +223 -227
  25. {Shapely-1.0.15 → Shapely-1.2}/shapely/geometry/proxy.py +19 -13
  26. Shapely-1.2/shapely/geoms.py +77 -0
  27. Shapely-1.2/shapely/geos.py +373 -0
  28. Shapely-1.2/shapely/impl.py +81 -0
  29. {Shapely-1.0.15 → Shapely-1.2}/shapely/iterops.py +6 -5
  30. Shapely-1.2/shapely/linref.py +26 -0
  31. Shapely-1.2/shapely/ops.py +81 -0
  32. Shapely-1.2/shapely/predicates.py +24 -0
  33. Shapely-1.2/shapely/prepared.py +54 -0
  34. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/LineString.txt +10 -6
  35. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/MultiLineString.txt +18 -1
  36. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/MultiPoint.txt +17 -1
  37. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/MultiPolygon.txt +17 -1
  38. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/Operations.txt +16 -0
  39. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/Point.txt +10 -10
  40. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/Polygon.txt +3 -7
  41. Shapely-1.2/shapely/tests/__init__.py +16 -0
  42. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/attribute-chains.txt +12 -4
  43. Shapely-1.2/shapely/tests/cascaded_union.txt +24 -0
  44. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/invalid_intersection.txt +3 -3
  45. Shapely-1.2/shapely/tests/linear-referencing.txt +58 -0
  46. Shapely-1.2/shapely/tests/linemerge.txt +61 -0
  47. Shapely-1.2/shapely/tests/test_collection.py +10 -0
  48. Shapely-1.2/shapely/tests/test_doctests.py +35 -0
  49. Shapely-1.2/shapely/tests/test_emptiness.py +19 -0
  50. Shapely-1.2/shapely/tests/test_equality.py +30 -0
  51. Shapely-1.2/shapely/tests/test_geomseq.py +11 -0
  52. Shapely-1.2/shapely/tests/test_prepared.py +15 -0
  53. Shapely-1.2/shapely/tests/test_xy.py +14 -0
  54. Shapely-1.2/shapely/tests/threading_test.py +37 -0
  55. Shapely-1.2/shapely/topology.py +62 -0
  56. Shapely-1.2/shapely/wkb.py +39 -0
  57. {Shapely-1.0.15 → Shapely-1.2}/shapely/wkt.py +7 -13
  58. Shapely-1.0.15/._CHANGES.txt +0 -0
  59. Shapely-1.0.15/._CREDITS.txt +0 -0
  60. Shapely-1.0.15/._HISTORY.txt +0 -0
  61. Shapely-1.0.15/._LICENSE.txt +0 -0
  62. Shapely-1.0.15/._MANIFEST.in +0 -0
  63. Shapely-1.0.15/._README.txt +0 -0
  64. Shapely-1.0.15/CREDITS.txt +0 -9
  65. Shapely-1.0.15/GEOS-C-API.txt +0 -55
  66. Shapely-1.0.15/HISTORY.txt +0 -24
  67. Shapely-1.0.15/MANIFEST.in +0 -2
  68. Shapely-1.0.15/PKG-INFO +0 -176
  69. Shapely-1.0.15/README.txt +0 -158
  70. Shapely-1.0.15/Shapely.egg-info/PKG-INFO +0 -176
  71. Shapely-1.0.15/Shapely.egg-info/SOURCES.txt +0 -54
  72. Shapely-1.0.15/Shapely.egg-info/requires.txt +0 -1
  73. Shapely-1.0.15/examples/._geoms.py +0 -0
  74. Shapely-1.0.15/examples/._world.py +0 -0
  75. Shapely-1.0.15/examples/geoms.py +0 -51
  76. Shapely-1.0.15/examples/world.py +0 -21
  77. Shapely-1.0.15/manual/manual.txt +0 -875
  78. Shapely-1.0.15/setup.py +0 -36
  79. Shapely-1.0.15/shapely/.___init__.py +0 -0
  80. Shapely-1.0.15/shapely/._ctypes_declarations.py +0 -0
  81. Shapely-1.0.15/shapely/._iterops.py +0 -0
  82. Shapely-1.0.15/shapely/._ops.py +0 -0
  83. Shapely-1.0.15/shapely/._predicates.py +0 -0
  84. Shapely-1.0.15/shapely/._topology.py +0 -0
  85. Shapely-1.0.15/shapely/._wkb.py +0 -0
  86. Shapely-1.0.15/shapely/__init__.py +0 -1
  87. Shapely-1.0.15/shapely/geometry/._base.py +0 -0
  88. Shapely-1.0.15/shapely/geometry/._linestring.py +0 -0
  89. Shapely-1.0.15/shapely/geometry/base.py +0 -508
  90. Shapely-1.0.15/shapely/geos.py +0 -126
  91. Shapely-1.0.15/shapely/ops.py +0 -29
  92. Shapely-1.0.15/shapely/predicates.py +0 -65
  93. Shapely-1.0.15/shapely/topology.py +0 -74
  94. Shapely-1.0.15/shapely/wkb.py +0 -42
  95. Shapely-1.0.15/tests/._Array.txt +0 -0
  96. Shapely-1.0.15/tests/._GeoInterface.txt +0 -0
  97. Shapely-1.0.15/tests/._Persist.txt +0 -0
  98. Shapely-1.0.15/tests/._Point.txt +0 -0
  99. Shapely-1.0.15/tests/._Predicates.txt +0 -0
  100. Shapely-1.0.15/tests/._binascii_hex.txt +0 -0
  101. {Shapely-1.0.15 → Shapely-1.2}/LICENSE.txt +0 -0
  102. {Shapely-1.0.15 → Shapely-1.2}/Shapely.egg-info/dependency_links.txt +0 -0
  103. {Shapely-1.0.15 → Shapely-1.2}/Shapely.egg-info/top_level.txt +0 -0
  104. {Shapely-1.0.15 → Shapely-1.2}/setup.cfg +0 -0
  105. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/Array.txt +0 -0
  106. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/GeoInterface.txt +0 -0
  107. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/IterOps.txt +0 -0
  108. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/Persist.txt +0 -0
  109. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/Predicates.txt +0 -0
  110. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/binascii_hex.txt +0 -0
  111. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/dimensions.txt +0 -0
  112. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/polygonize.txt +0 -0
  113. {Shapely-1.0.15 → Shapely-1.2/shapely}/tests/wkt_locale.txt +0 -0
Binary file
@@ -1,15 +1,69 @@
1
1
  All tickets are children of http://trac.gispython.org/lab/ticket.
2
2
 
3
- 1.0.14 (2009-10-05)
3
+ 1.2 (2010-05-27)
4
+ ----------------
5
+ - Final release.
6
+
7
+ 1.2rc2 (2010-05-26)
4
8
  -------------------
5
- - Proper prototyping of WKB writer, and avoidance of errors on 64-bit systems
6
- (#191).
9
+ - Add examples and tests to MANIFEST.in.
10
+ - Release candidate 2.
7
11
 
8
- 1.0.13 (2009-09-29)
12
+ 1.2rc1 (2010-05-25)
9
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
+ 1.2b1 (2010-02-18)
45
+ ------------------
46
+ - Update the README. Remove cruft from setup.py. Add some version 1.2 metadata
47
+ regarding required Python version (>=2.5,<3) and external dependency
48
+ (libgeos_c >= 3.1).
49
+
50
+ 1.2a6 (2010-02-09)
51
+ ------------------
52
+ - Add accessor for separate arrays of X and Y values (#210).
53
+
54
+ TODO: fill gap here
55
+
56
+ 1.2a1 (2010-01-20)
57
+ ------------------
58
+ - Proper prototyping of WKB writer, and avoidance of errors on 64-bit systems
59
+ (#191).
10
60
  - Prototype libgeos_c functions in a way that lets py2exe apps import shapely
11
61
  (#189).
12
-
62
+
63
+ =========================
64
+ 1.2 Branched (2009-09-19)
65
+ =========================
66
+
13
67
  1.0.12 (2009-04-09)
14
68
  -------------------
15
69
  - Fix for references held by topology and predicate descriptors.
@@ -65,3 +119,23 @@ All tickets are children of http://trac.gispython.org/lab/ticket.
65
119
  1.0.2 (2008-02-26)
66
120
  ------------------
67
121
  - Fix loss of dimensionality in polygon rings (#155).
122
+
123
+ 1.0.1 (2008-02-08)
124
+ ------------------
125
+ - Allow chaining expressions involving coordinate sequences and geometry parts
126
+ (#151).
127
+ - Protect against abnormal use of coordinate accessors (#152).
128
+ - Coordinate sequences now implement the numpy array protocol (#153).
129
+
130
+ 1.0 (2008-01-18)
131
+ ----------------
132
+ - Final release.
133
+
134
+ 1.0 RC2 (2008-01-16)
135
+ --------------------
136
+ - Added temporary solution for #149.
137
+
138
+ 1.0 RC1 (2008-01-14)
139
+ --------------------
140
+ - First release candidate
141
+
@@ -0,0 +1,24 @@
1
+ Shapely is written by:
2
+
3
+ * Sean Gillies
4
+ * Aron Bierbaum
5
+ * Kai Lautaportti
6
+
7
+ Patches contributed by:
8
+
9
+ * Howard Butler
10
+ * Fr |eaigue| d |eaigue| ric Junod
11
+ * Eric Lemoine
12
+ * Jonathan Tartley
13
+ * Kristian Thy
14
+ * Oliver Tonnhofer
15
+
16
+ Additional help from:
17
+
18
+ * Justin Bronn (GeoDjango) for ctypes inspiration
19
+ * Martin Davis (JTS)
20
+ * Jaakko Salli for the Windows distributions
21
+ * Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
22
+
23
+ Major portions of this work were supported by a grant (for Pleiades_) from the
24
+ U.S. National Endowment for the Humanities (http://www.neh.gov).
@@ -0,0 +1,5 @@
1
+ exclude *.txt
2
+ recursive-exclude manual *
3
+ include CHANGES.txt CREDITS.txt LICENSE.txt README.txt
4
+ recursive-include shapely/tests *.py *.txt
5
+ recursive-include shapely/examples *.py
Shapely-1.2/PKG-INFO ADDED
@@ -0,0 +1,173 @@
1
+ Metadata-Version: 1.0
2
+ Name: Shapely
3
+ Version: 1.2
4
+ Summary: Geometric objects, predicates, and operations
5
+ Home-page: http://trac.gispython.org/lab/wiki/Shapely
6
+ Author: Sean Gillies
7
+ Author-email: sean.gillies@gmail.com
8
+ License: BSD
9
+ Description: =======
10
+ Shapely
11
+ =======
12
+
13
+ .. image:: http://farm3.static.flickr.com/2738/4511827859_b5822043b7_o_d.png
14
+ :width: 800
15
+ :height: 400
16
+
17
+ Shapely is a BSD-licensed Python package for manipulation and analysis of
18
+ planar geometric objects. 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
+ JTS_ (from which GEOS is ported) libraries. This C dependency is traded for the
21
+ ability to execute with blazing speed.
22
+
23
+ In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a
24
+ database using idiomatic Python. For more details, see:
25
+
26
+ * Shapely wiki_
27
+ * Shapely manual_
28
+ * Shapely `example apps`_
29
+
30
+ Dependencies
31
+ ------------
32
+
33
+ Shapely 1.2 depends on:
34
+
35
+ * Python >=2.5,<3
36
+ * libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
37
+
38
+ Installation
39
+ ------------
40
+
41
+ Windows users should use the executable installer, which contains the required
42
+ GEOS DLL. Other users should acquire libgeos_c by any means, make sure that it
43
+ is on the system library path, and install from the Python package index::
44
+
45
+ $ pip install Shapely
46
+
47
+ or from a source distribution with the setup script::
48
+
49
+ $ python setup.py install
50
+
51
+ Usage
52
+ -----
53
+
54
+ Here is the canonical example of building an approximately circular patch by
55
+ buffering a point::
56
+
57
+ >>> from shapely.geometry import Point
58
+ >>> patch = Point(0.0, 0.0).buffer(10.0)
59
+ >>> patch
60
+ <shapely.geometry.polygon.Polygon object at 0x...>
61
+ >>> patch.area
62
+ 313.65484905459385
63
+
64
+ See the manual_ for comprehensive usage snippets and the dissolve.py and
65
+ intersect.py `example apps`_.
66
+
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
+ >>> from shapely.wkt import dumps, loads
75
+ >>> dumps(loads('POINT (0 0)'))
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.::
80
+
81
+ >>> from numpy import asarray
82
+ >>> ag = asarray(patch.exterior)
83
+ >>> ag
84
+ array([[ 1.00000000e+01, 0.00000000e+00],
85
+ [ 9.95184727e+00, -9.80171403e-01],
86
+ [ 9.80785280e+00, -1.95090322e+00],
87
+ ...
88
+ [ 1.00000000e+01, 0.00000000e+00]])
89
+
90
+ That yields a numpy array of [x, y] arrays. This is not always exactly what one
91
+ wants for plotting shapes with Matplotlib, so Shapely 1.2 adds a `xy` property
92
+ for getting separate arrays of coordinate x and y values.::
93
+
94
+ >>> x, y = patch.exterior.xy
95
+ >>> ax = asarray(x)
96
+ >>> ax
97
+ array([ 1.00000000e+01, 9.95184727e+00, 9.80785280e+00, ...])
98
+
99
+ Numpy arrays can also be adapted to Shapely linestrings::
100
+
101
+ >>> from shapely.geometry import asLineString
102
+ >>> asLineString(ag).length
103
+ 62.806623139095073
104
+ >>> asLineString(ag).wkt
105
+ 'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
106
+
107
+ Testing
108
+ -------
109
+
110
+ Shapely uses a Zope-stye suite of unittests and doctests, excercised via
111
+ setup.py.::
112
+
113
+ $ python setup.py test
114
+
115
+ Nosetests won't run the tests properly; Zope doctest suites are not currently
116
+ supported well by nose.
117
+
118
+ Support
119
+ -------
120
+
121
+ For current information about this project, see the wiki_.
122
+
123
+ If you have questions, please consider joining our community list:
124
+
125
+ http://trac.gispython.org/projects/PCL/wiki/CommunityList
126
+
127
+ Credits
128
+ -------
129
+
130
+ Shapely is written by:
131
+
132
+ * Sean Gillies
133
+ * Aron Bierbaum
134
+ * Kai Lautaportti
135
+
136
+ Patches contributed by:
137
+
138
+ * Howard Butler
139
+ * Fr |eaigue| d |eaigue| ric Junod
140
+ * Eric Lemoine
141
+ * Jonathan Tartley
142
+ * Kristian Thy
143
+ * Oliver Tonnhofer
144
+
145
+ Additional help from:
146
+
147
+ * Justin Bronn (GeoDjango) for ctypes inspiration
148
+ * Martin Davis (JTS)
149
+ * Jaakko Salli for the Windows distributions
150
+ * Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
151
+
152
+ Major portions of this work were supported by a grant (for Pleiades_) from the
153
+ U.S. National Endowment for the Humanities (http://www.neh.gov).
154
+
155
+ .. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
156
+ .. _PostGIS: http://postgis.org
157
+ .. _GEOS: http://trac.osgeo.org/geos/
158
+ .. _example apps: http://trac.gispython.org/lab/wiki/Examples
159
+ .. _wiki: http://trac.gispython.org/lab/wiki/Shapely
160
+ .. _manual: http://gispython.org/shapely/docs/1.2
161
+ .. |eaigue| unicode:: U+00E9
162
+ :trim:
163
+ .. _Pleiades: http://pleiades.stoa.org
164
+
165
+ Keywords: geometry topology gis
166
+ Platform: UNKNOWN
167
+ Classifier: Development Status :: 5 - Production/Stable
168
+ Classifier: Intended Audience :: Developers
169
+ Classifier: Intended Audience :: Science/Research
170
+ Classifier: License :: OSI Approved :: BSD License
171
+ Classifier: Operating System :: OS Independent
172
+ Classifier: Programming Language :: Python
173
+ Classifier: Topic :: Scientific/Engineering :: GIS
Shapely-1.2/README.txt ADDED
@@ -0,0 +1,155 @@
1
+ =======
2
+ Shapely
3
+ =======
4
+
5
+ .. image:: http://farm3.static.flickr.com/2738/4511827859_b5822043b7_o_d.png
6
+ :width: 800
7
+ :height: 400
8
+
9
+ Shapely is a BSD-licensed Python package for manipulation and analysis of
10
+ planar geometric objects. 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
+ JTS_ (from which GEOS is ported) libraries. This C dependency is traded for the
13
+ ability to execute with blazing speed.
14
+
15
+ In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a
16
+ database using idiomatic Python. For more details, see:
17
+
18
+ * Shapely wiki_
19
+ * Shapely manual_
20
+ * Shapely `example apps`_
21
+
22
+ Dependencies
23
+ ------------
24
+
25
+ Shapely 1.2 depends on:
26
+
27
+ * Python >=2.5,<3
28
+ * libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
29
+
30
+ Installation
31
+ ------------
32
+
33
+ Windows users should use the executable installer, which contains the required
34
+ GEOS DLL. Other users should acquire libgeos_c by any means, make sure that it
35
+ is on the system library path, and install from the Python package index::
36
+
37
+ $ pip install Shapely
38
+
39
+ or from a source distribution with the setup script::
40
+
41
+ $ python setup.py install
42
+
43
+ Usage
44
+ -----
45
+
46
+ Here is the canonical example of building an approximately circular patch by
47
+ buffering a point::
48
+
49
+ >>> from shapely.geometry import Point
50
+ >>> patch = Point(0.0, 0.0).buffer(10.0)
51
+ >>> patch
52
+ <shapely.geometry.polygon.Polygon object at 0x...>
53
+ >>> patch.area
54
+ 313.65484905459385
55
+
56
+ See the manual_ for comprehensive usage snippets and the dissolve.py and
57
+ intersect.py `example apps`_.
58
+
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
+
66
+ >>> from shapely.wkt import dumps, loads
67
+ >>> dumps(loads('POINT (0 0)'))
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.::
72
+
73
+ >>> from numpy import asarray
74
+ >>> ag = asarray(patch.exterior)
75
+ >>> ag
76
+ array([[ 1.00000000e+01, 0.00000000e+00],
77
+ [ 9.95184727e+00, -9.80171403e-01],
78
+ [ 9.80785280e+00, -1.95090322e+00],
79
+ ...
80
+ [ 1.00000000e+01, 0.00000000e+00]])
81
+
82
+ That yields a numpy array of [x, y] arrays. This is not always exactly what one
83
+ wants for plotting shapes with Matplotlib, so Shapely 1.2 adds a `xy` property
84
+ for getting separate arrays of coordinate x and y values.::
85
+
86
+ >>> x, y = patch.exterior.xy
87
+ >>> ax = asarray(x)
88
+ >>> ax
89
+ array([ 1.00000000e+01, 9.95184727e+00, 9.80785280e+00, ...])
90
+
91
+ Numpy arrays can also be adapted to Shapely linestrings::
92
+
93
+ >>> from shapely.geometry import asLineString
94
+ >>> asLineString(ag).length
95
+ 62.806623139095073
96
+ >>> asLineString(ag).wkt
97
+ 'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
98
+
99
+ Testing
100
+ -------
101
+
102
+ Shapely uses a Zope-stye suite of unittests and doctests, excercised via
103
+ setup.py.::
104
+
105
+ $ python setup.py test
106
+
107
+ Nosetests won't run the tests properly; Zope doctest suites are not currently
108
+ supported well by nose.
109
+
110
+ Support
111
+ -------
112
+
113
+ For current information about this project, see the wiki_.
114
+
115
+ If you have questions, please consider joining our community list:
116
+
117
+ http://trac.gispython.org/projects/PCL/wiki/CommunityList
118
+
119
+ Credits
120
+ -------
121
+
122
+ Shapely is written by:
123
+
124
+ * Sean Gillies
125
+ * Aron Bierbaum
126
+ * Kai Lautaportti
127
+
128
+ Patches contributed by:
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:
138
+
139
+ * Justin Bronn (GeoDjango) for ctypes inspiration
140
+ * Martin Davis (JTS)
141
+ * Jaakko Salli for the Windows distributions
142
+ * Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
143
+
144
+ Major portions of this work were supported by a grant (for Pleiades_) from the
145
+ U.S. National Endowment for the Humanities (http://www.neh.gov).
146
+
147
+ .. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
148
+ .. _PostGIS: http://postgis.org
149
+ .. _GEOS: http://trac.osgeo.org/geos/
150
+ .. _example apps: http://trac.gispython.org/lab/wiki/Examples
151
+ .. _wiki: http://trac.gispython.org/lab/wiki/Shapely
152
+ .. _manual: http://gispython.org/shapely/docs/1.2
153
+ .. |eaigue| unicode:: U+00E9
154
+ :trim:
155
+ .. _Pleiades: http://pleiades.stoa.org
@@ -0,0 +1,173 @@
1
+ Metadata-Version: 1.0
2
+ Name: Shapely
3
+ Version: 1.2
4
+ Summary: Geometric objects, predicates, and operations
5
+ Home-page: http://trac.gispython.org/lab/wiki/Shapely
6
+ Author: Sean Gillies
7
+ Author-email: sean.gillies@gmail.com
8
+ License: BSD
9
+ Description: =======
10
+ Shapely
11
+ =======
12
+
13
+ .. image:: http://farm3.static.flickr.com/2738/4511827859_b5822043b7_o_d.png
14
+ :width: 800
15
+ :height: 400
16
+
17
+ Shapely is a BSD-licensed Python package for manipulation and analysis of
18
+ planar geometric objects. 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
+ JTS_ (from which GEOS is ported) libraries. This C dependency is traded for the
21
+ ability to execute with blazing speed.
22
+
23
+ In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a
24
+ database using idiomatic Python. For more details, see:
25
+
26
+ * Shapely wiki_
27
+ * Shapely manual_
28
+ * Shapely `example apps`_
29
+
30
+ Dependencies
31
+ ------------
32
+
33
+ Shapely 1.2 depends on:
34
+
35
+ * Python >=2.5,<3
36
+ * libgeos_c >=3.1 (3.0 and below have not been tested, YMMV)
37
+
38
+ Installation
39
+ ------------
40
+
41
+ Windows users should use the executable installer, which contains the required
42
+ GEOS DLL. Other users should acquire libgeos_c by any means, make sure that it
43
+ is on the system library path, and install from the Python package index::
44
+
45
+ $ pip install Shapely
46
+
47
+ or from a source distribution with the setup script::
48
+
49
+ $ python setup.py install
50
+
51
+ Usage
52
+ -----
53
+
54
+ Here is the canonical example of building an approximately circular patch by
55
+ buffering a point::
56
+
57
+ >>> from shapely.geometry import Point
58
+ >>> patch = Point(0.0, 0.0).buffer(10.0)
59
+ >>> patch
60
+ <shapely.geometry.polygon.Polygon object at 0x...>
61
+ >>> patch.area
62
+ 313.65484905459385
63
+
64
+ See the manual_ for comprehensive usage snippets and the dissolve.py and
65
+ intersect.py `example apps`_.
66
+
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
+ >>> from shapely.wkt import dumps, loads
75
+ >>> dumps(loads('POINT (0 0)'))
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.::
80
+
81
+ >>> from numpy import asarray
82
+ >>> ag = asarray(patch.exterior)
83
+ >>> ag
84
+ array([[ 1.00000000e+01, 0.00000000e+00],
85
+ [ 9.95184727e+00, -9.80171403e-01],
86
+ [ 9.80785280e+00, -1.95090322e+00],
87
+ ...
88
+ [ 1.00000000e+01, 0.00000000e+00]])
89
+
90
+ That yields a numpy array of [x, y] arrays. This is not always exactly what one
91
+ wants for plotting shapes with Matplotlib, so Shapely 1.2 adds a `xy` property
92
+ for getting separate arrays of coordinate x and y values.::
93
+
94
+ >>> x, y = patch.exterior.xy
95
+ >>> ax = asarray(x)
96
+ >>> ax
97
+ array([ 1.00000000e+01, 9.95184727e+00, 9.80785280e+00, ...])
98
+
99
+ Numpy arrays can also be adapted to Shapely linestrings::
100
+
101
+ >>> from shapely.geometry import asLineString
102
+ >>> asLineString(ag).length
103
+ 62.806623139095073
104
+ >>> asLineString(ag).wkt
105
+ 'LINESTRING (10.0000000000000000 0.0000000000000000, ...)'
106
+
107
+ Testing
108
+ -------
109
+
110
+ Shapely uses a Zope-stye suite of unittests and doctests, excercised via
111
+ setup.py.::
112
+
113
+ $ python setup.py test
114
+
115
+ Nosetests won't run the tests properly; Zope doctest suites are not currently
116
+ supported well by nose.
117
+
118
+ Support
119
+ -------
120
+
121
+ For current information about this project, see the wiki_.
122
+
123
+ If you have questions, please consider joining our community list:
124
+
125
+ http://trac.gispython.org/projects/PCL/wiki/CommunityList
126
+
127
+ Credits
128
+ -------
129
+
130
+ Shapely is written by:
131
+
132
+ * Sean Gillies
133
+ * Aron Bierbaum
134
+ * Kai Lautaportti
135
+
136
+ Patches contributed by:
137
+
138
+ * Howard Butler
139
+ * Fr |eaigue| d |eaigue| ric Junod
140
+ * Eric Lemoine
141
+ * Jonathan Tartley
142
+ * Kristian Thy
143
+ * Oliver Tonnhofer
144
+
145
+ Additional help from:
146
+
147
+ * Justin Bronn (GeoDjango) for ctypes inspiration
148
+ * Martin Davis (JTS)
149
+ * Jaakko Salli for the Windows distributions
150
+ * Sandro Santilli, Mateusz Loskot, Paul Ramsey, et al (GEOS Project)
151
+
152
+ Major portions of this work were supported by a grant (for Pleiades_) from the
153
+ U.S. National Endowment for the Humanities (http://www.neh.gov).
154
+
155
+ .. _JTS: http://www.vividsolutions.com/jts/jtshome.htm
156
+ .. _PostGIS: http://postgis.org
157
+ .. _GEOS: http://trac.osgeo.org/geos/
158
+ .. _example apps: http://trac.gispython.org/lab/wiki/Examples
159
+ .. _wiki: http://trac.gispython.org/lab/wiki/Shapely
160
+ .. _manual: http://gispython.org/shapely/docs/1.2
161
+ .. |eaigue| unicode:: U+00E9
162
+ :trim:
163
+ .. _Pleiades: http://pleiades.stoa.org
164
+
165
+ Keywords: geometry topology gis
166
+ Platform: UNKNOWN
167
+ Classifier: Development Status :: 5 - Production/Stable
168
+ Classifier: Intended Audience :: Developers
169
+ Classifier: Intended Audience :: Science/Research
170
+ Classifier: License :: OSI Approved :: BSD License
171
+ Classifier: Operating System :: OS Independent
172
+ Classifier: Programming Language :: Python
173
+ Classifier: Topic :: Scientific/Engineering :: GIS
@@ -0,0 +1,68 @@
1
+ CHANGES.txt
2
+ CREDITS.txt
3
+ LICENSE.txt
4
+ MANIFEST.in
5
+ README.txt
6
+ setup.cfg
7
+ setup.py
8
+ Shapely.egg-info/PKG-INFO
9
+ Shapely.egg-info/SOURCES.txt
10
+ Shapely.egg-info/dependency_links.txt
11
+ Shapely.egg-info/top_level.txt
12
+ examples/dissolve.py
13
+ examples/intersect.py
14
+ shapely/__init__.py
15
+ shapely/coords.py
16
+ shapely/ctypes_declarations.py
17
+ shapely/geoms.py
18
+ shapely/geos.py
19
+ shapely/impl.py
20
+ shapely/iterops.py
21
+ shapely/linref.py
22
+ shapely/ops.py
23
+ shapely/predicates.py
24
+ shapely/prepared.py
25
+ shapely/topology.py
26
+ shapely/wkb.py
27
+ shapely/wkt.py
28
+ shapely/geometry/__init__.py
29
+ shapely/geometry/base.py
30
+ shapely/geometry/collection.py
31
+ shapely/geometry/geo.py
32
+ shapely/geometry/linestring.py
33
+ shapely/geometry/multilinestring.py
34
+ shapely/geometry/multipoint.py
35
+ shapely/geometry/multipolygon.py
36
+ shapely/geometry/point.py
37
+ shapely/geometry/polygon.py
38
+ shapely/geometry/proxy.py
39
+ shapely/tests/Array.txt
40
+ shapely/tests/GeoInterface.txt
41
+ shapely/tests/IterOps.txt
42
+ shapely/tests/LineString.txt
43
+ shapely/tests/MultiLineString.txt
44
+ shapely/tests/MultiPoint.txt
45
+ shapely/tests/MultiPolygon.txt
46
+ shapely/tests/Operations.txt
47
+ shapely/tests/Persist.txt
48
+ shapely/tests/Point.txt
49
+ shapely/tests/Polygon.txt
50
+ shapely/tests/Predicates.txt
51
+ shapely/tests/__init__.py
52
+ shapely/tests/attribute-chains.txt
53
+ shapely/tests/binascii_hex.txt
54
+ shapely/tests/cascaded_union.txt
55
+ shapely/tests/dimensions.txt
56
+ shapely/tests/invalid_intersection.txt
57
+ shapely/tests/linear-referencing.txt
58
+ shapely/tests/linemerge.txt
59
+ shapely/tests/polygonize.txt
60
+ shapely/tests/test_collection.py
61
+ shapely/tests/test_doctests.py
62
+ shapely/tests/test_emptiness.py
63
+ shapely/tests/test_equality.py
64
+ shapely/tests/test_geomseq.py
65
+ shapely/tests/test_prepared.py
66
+ shapely/tests/test_xy.py
67
+ shapely/tests/threading_test.py
68
+ shapely/tests/wkt_locale.txt