shapely 1.0b3__tar.gz → 1.0rc1__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 (57) hide show
  1. Shapely-1.0rc1/CREDITS.txt +10 -0
  2. Shapely-1.0rc1/HISTORY.txt +5 -0
  3. {Shapely-1.0b3 → Shapely-1.0rc1}/PKG-INFO +37 -11
  4. {Shapely-1.0b3 → Shapely-1.0rc1}/README.txt +39 -13
  5. {Shapely-1.0b3 → Shapely-1.0rc1}/Shapely.egg-info/PKG-INFO +37 -11
  6. {Shapely-1.0b3 → Shapely-1.0rc1}/Shapely.egg-info/SOURCES.txt +1 -0
  7. {Shapely-1.0b3 → Shapely-1.0rc1}/Shapely.egg-info/dependency_links.txt +0 -0
  8. {Shapely-1.0b3 → Shapely-1.0rc1}/Shapely.egg-info/requires.txt +0 -0
  9. {Shapely-1.0b3 → Shapely-1.0rc1}/Shapely.egg-info/top_level.txt +0 -0
  10. {Shapely-1.0b3 → Shapely-1.0rc1}/manual/manual.txt +79 -5
  11. {Shapely-1.0b3 → Shapely-1.0rc1}/setup.py +2 -2
  12. Shapely-1.0rc1/setup_windows.py +39 -0
  13. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/base.py +68 -11
  14. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/linestring.py +13 -7
  15. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/multilinestring.py +8 -6
  16. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/multipoint.py +12 -7
  17. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/multipolygon.py +8 -6
  18. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/point.py +26 -9
  19. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/polygon.py +26 -11
  20. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geos.py +16 -6
  21. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/iterops.py +9 -7
  22. Shapely-1.0rc1/shapely/predicates.py +58 -0
  23. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/topology.py +4 -0
  24. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/wkb.py +8 -3
  25. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/wkt.py +9 -2
  26. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/LineString.txt +20 -1
  27. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/MultiPoint.txt +0 -2
  28. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/Point.txt +25 -0
  29. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/Polygon.txt +20 -1
  30. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/Predicates.txt +1 -1
  31. Shapely-1.0b3/CREDITS.txt +0 -6
  32. Shapely-1.0b3/HISTORY.txt +0 -0
  33. Shapely-1.0b3/shapely/predicates.py +0 -50
  34. {Shapely-1.0b3 → Shapely-1.0rc1}/CHANGES.txt +0 -0
  35. {Shapely-1.0b3 → Shapely-1.0rc1}/LICENSE.txt +0 -0
  36. {Shapely-1.0b3 → Shapely-1.0rc1}/examples/geoms.py +0 -0
  37. {Shapely-1.0b3 → Shapely-1.0rc1}/examples/world.py +0 -0
  38. {Shapely-1.0b3 → Shapely-1.0rc1}/manual/style.css +0 -0
  39. {Shapely-1.0b3 → Shapely-1.0rc1}/setup.cfg +0 -0
  40. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/__init__.py +0 -0
  41. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/__init__.py +0 -0
  42. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/collection.py +0 -0
  43. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/geometry/geo.py +0 -0
  44. {Shapely-1.0b3 → Shapely-1.0rc1}/shapely/kml.py +0 -0
  45. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/Array.txt +0 -0
  46. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/GeoInterface.txt +0 -0
  47. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/IterOps.txt +0 -0
  48. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/MultiLineString.txt +0 -0
  49. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/MultiPolygon.txt +0 -0
  50. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/Operations.txt +0 -0
  51. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/Persist.txt +0 -0
  52. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/__init__.py +0 -0
  53. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/binascii_hex.txt +0 -0
  54. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/invalid_intersection.txt +0 -0
  55. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/rungrind.dist +0 -0
  56. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/test_doctests.py +0 -0
  57. {Shapely-1.0b3 → Shapely-1.0rc1}/tests/valgrind-python.supp +0 -0
@@ -0,0 +1,10 @@
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
+ Artem Pavlenko (Mapnik) for help with GEOS DLLs
8
+
9
+ Some of this work was supported by a grant from the U.S. National Endowment for
10
+ the Humanities (http://www.neh.gov).
@@ -0,0 +1,5 @@
1
+ 1.0 RC1: 14 January 2008
2
+ ------------------------
3
+
4
+ - First release candidate
5
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: Shapely
3
- Version: 1.0b3
3
+ Version: 1.0rc1
4
4
  Summary: Geospatial geometries, predicates, and operations
5
5
  Home-page: http://trac.gispython.org/projects/PCL/wiki/Shapely
6
6
  Author: Sean Gillies
@@ -9,8 +9,8 @@ License: BSD
9
9
  Description: Shapely
10
10
  =======
11
11
 
12
- Shapely is a Python package for programming with geospatial geometries. It is
13
- based on GEOS (http://geos.refractions.net). Shapely 1.0 is ignorant about
12
+ Shapely is a Python package for programming with 2D geospatial geometries. It
13
+ is based on GEOS (http://geos.refractions.net). Shapely 1.0 is ignorant about
14
14
  coordinate and reference systems. Projection responsibility is left to specific
15
15
  applications. For more information, see:
16
16
 
@@ -20,14 +20,16 @@ Description: Shapely
20
20
  Shapely requires Python 2.4+. (I've also begun to port it to Python 3.0:
21
21
  http://zcologia.com/news/564/shapely-for-python-3-0/.)
22
22
 
23
+
23
24
  Dependencies
24
25
  ------------
25
26
 
26
- * libgeos_c (2.2.3, also reported to work with 3.0)
27
+ * libgeos_c (2.2.3 or 3.0.0+)
27
28
  * Python ctypes_ (standard in Python 2.5+)
28
29
 
29
30
  .. _ctypes: http://pypi.python.org/pypi/ctypes/
30
31
 
32
+
31
33
  Installation
32
34
  ------------
33
35
 
@@ -39,26 +41,29 @@ Description: Shapely
39
41
 
40
42
  $ sudo python setup.py install
41
43
 
42
- or by using the development buildout, which also provides libgeos_c::
44
+ or by using the development buildout on Linux, which also provides libgeos_c::
43
45
 
44
46
  $ svn co http://svn.gispython.org/svn/gispy/buildout/shapely.buildout/trunk shapely.buildout
45
47
  $ cd shapely.buildout
46
48
  $ python bootstrap.py
47
49
  $ ./bin/buildout
48
50
 
51
+
49
52
  Usage
50
53
  -----
51
54
 
52
- Buffer a point::
55
+ To buffer a point::
53
56
 
54
57
  >>> from shapely.geometry import Point
55
58
  >>> point = Point(-106.0, 40.0) # longitude, latitude
56
59
  >>> point.buffer(10.0)
57
60
  <shapely.geometry.polygon.Polygon object at ...>
58
61
 
59
- See Operations.txt and Predicates.txt under tests/ for more examples of the
60
- spatial operations and predicates provided by Shapely. Also see Point.txt,
61
- LineString.txt, etc for examples of the geometry APIs.
62
+ See the manual_ for comprehensive examples of usage. See also Operations.txt
63
+ and Predicates.txt under tests/ for more examples of the spatial operations and
64
+ predicates provided by Shapely. See also Point.txt, LineString.txt, etc for
65
+ examples of the geometry APIs.
66
+
62
67
 
63
68
  Numpy integration
64
69
  -----------------
@@ -80,6 +85,7 @@ Description: Shapely
80
85
  >>> line.wkt
81
86
  'LINESTRING (1.0000000000000000 2.0000000000000000, 3.0000000000000000 4.0000000000000000)'
82
87
 
88
+
83
89
  Python Geo Interface
84
90
  --------------------
85
91
 
@@ -107,6 +113,7 @@ Description: Shapely
107
113
  See http://trac.gispython.org/projects/PCL/wiki/PythonGeoInterface for more
108
114
  details on the interface.
109
115
 
116
+
110
117
  Testing
111
118
  -------
112
119
 
@@ -116,7 +123,11 @@ Description: Shapely
116
123
  $ python point.py
117
124
 
118
125
  There are also two test runners under tests/. test_doctests.py requires
119
- zope.testing. runalldoctests.py does not.
126
+ zope.testing. runalldoctests.py does not. Perhaps the easiest way to run the
127
+ tests is::
128
+
129
+ $ python setup.py test
130
+
120
131
 
121
132
  Support
122
133
  -------
@@ -131,9 +142,24 @@ Description: Shapely
131
142
  http://trac.gispython.org/projects/PCL/wiki/CommunityList
132
143
 
133
144
 
145
+ Credits
146
+ -------
147
+
148
+ Sean Gillies (Pleiades)
149
+ Howard Butler (Hobu, Inc.)
150
+ Kai Lautaportti (Hexagon IT)
151
+ Frederic Junod (Camptocamp SA)
152
+ Eric Lemoine (Camptocamp SA)
153
+ Justin Bronn (GeoDjango) for ctypes inspiration
154
+ Artem Pavlenko (Mapnik) for help with GEOS DLLs
155
+
156
+ Some of this work was supported by a grant (Pleiades) from the U.S. National
157
+ Endowment for the Humanities (http://www.neh.gov).
158
+
159
+
134
160
  Keywords: geometry topology
135
161
  Platform: UNKNOWN
136
- Classifier: Development Status :: 4 - Beta
162
+ Classifier: Development Status :: 5 - Production/Stable
137
163
  Classifier: Intended Audience :: Developers
138
164
  Classifier: Intended Audience :: Science/Research
139
165
  Classifier: License :: OSI Approved :: BSD License
@@ -1,8 +1,8 @@
1
1
  Shapely
2
2
  =======
3
3
 
4
- Shapely is a Python package for programming with geospatial geometries. It is
5
- based on GEOS (http://geos.refractions.net). Shapely 1.0 is ignorant about
4
+ Shapely is a Python package for programming with 2D geospatial geometries. It
5
+ is based on GEOS (http://geos.refractions.net). Shapely 1.0 is ignorant about
6
6
  coordinate and reference systems. Projection responsibility is left to specific
7
7
  applications. For more information, see:
8
8
 
@@ -12,14 +12,16 @@ applications. For more information, see:
12
12
  Shapely requires Python 2.4+. (I've also begun to port it to Python 3.0:
13
13
  http://zcologia.com/news/564/shapely-for-python-3-0/.)
14
14
 
15
+
15
16
  Dependencies
16
17
  ------------
17
18
 
18
- * libgeos_c (2.2.3, also reported to work with 3.0)
19
+ * libgeos_c (2.2.3 or 3.0.0+)
19
20
  * Python ctypes_ (standard in Python 2.5+)
20
21
 
21
22
  .. _ctypes: http://pypi.python.org/pypi/ctypes/
22
23
 
24
+
23
25
  Installation
24
26
  ------------
25
27
 
@@ -31,26 +33,29 @@ with the setup script::
31
33
 
32
34
  $ sudo python setup.py install
33
35
 
34
- or by using the development buildout, which also provides libgeos_c::
36
+ or by using the development buildout on Linux, which also provides libgeos_c::
37
+
38
+ $ svn co http://svn.gispython.org/svn/gispy/buildout/shapely.buildout/trunk shapely.buildout
39
+ $ cd shapely.buildout
40
+ $ python bootstrap.py
41
+ $ ./bin/buildout
35
42
 
36
- $ svn co http://svn.gispython.org/svn/gispy/buildout/shapely.buildout/trunk shapely.buildout
37
- $ cd shapely.buildout
38
- $ python bootstrap.py
39
- $ ./bin/buildout
40
43
 
41
44
  Usage
42
45
  -----
43
46
 
44
- Buffer a point::
47
+ To buffer a point::
45
48
 
46
49
  >>> from shapely.geometry import Point
47
50
  >>> point = Point(-106.0, 40.0) # longitude, latitude
48
51
  >>> point.buffer(10.0)
49
52
  <shapely.geometry.polygon.Polygon object at ...>
50
53
 
51
- See Operations.txt and Predicates.txt under tests/ for more examples of the
52
- spatial operations and predicates provided by Shapely. Also see Point.txt,
53
- LineString.txt, etc for examples of the geometry APIs.
54
+ See the manual_ for comprehensive examples of usage. See also Operations.txt
55
+ and Predicates.txt under tests/ for more examples of the spatial operations and
56
+ predicates provided by Shapely. See also Point.txt, LineString.txt, etc for
57
+ examples of the geometry APIs.
58
+
54
59
 
55
60
  Numpy integration
56
61
  -----------------
@@ -72,6 +77,7 @@ Numpy arrays can also be adapted to Shapely points and linestrings::
72
77
  >>> line.wkt
73
78
  'LINESTRING (1.0000000000000000 2.0000000000000000, 3.0000000000000000 4.0000000000000000)'
74
79
 
80
+
75
81
  Python Geo Interface
76
82
  --------------------
77
83
 
@@ -99,6 +105,7 @@ geometry with the asShape factory::
99
105
  See http://trac.gispython.org/projects/PCL/wiki/PythonGeoInterface for more
100
106
  details on the interface.
101
107
 
108
+
102
109
  Testing
103
110
  -------
104
111
 
@@ -108,7 +115,11 @@ Several of the modules have docstring doctests::
108
115
  $ python point.py
109
116
 
110
117
  There are also two test runners under tests/. test_doctests.py requires
111
- zope.testing. runalldoctests.py does not.
118
+ zope.testing. runalldoctests.py does not. Perhaps the easiest way to run the
119
+ tests is::
120
+
121
+ $ python setup.py test
122
+
112
123
 
113
124
  Support
114
125
  -------
@@ -122,3 +133,18 @@ If you have questions, please consider joining our community list:
122
133
 
123
134
  http://trac.gispython.org/projects/PCL/wiki/CommunityList
124
135
 
136
+
137
+ Credits
138
+ -------
139
+
140
+ Sean Gillies (Pleiades)
141
+ Howard Butler (Hobu, Inc.)
142
+ Kai Lautaportti (Hexagon IT)
143
+ Frederic Junod (Camptocamp SA)
144
+ Eric Lemoine (Camptocamp SA)
145
+ Justin Bronn (GeoDjango) for ctypes inspiration
146
+ Artem Pavlenko (Mapnik) for help with GEOS DLLs
147
+
148
+ Some of this work was supported by a grant (Pleiades) from the U.S. National
149
+ Endowment for the Humanities (http://www.neh.gov).
150
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: Shapely
3
- Version: 1.0b3
3
+ Version: 1.0rc1
4
4
  Summary: Geospatial geometries, predicates, and operations
5
5
  Home-page: http://trac.gispython.org/projects/PCL/wiki/Shapely
6
6
  Author: Sean Gillies
@@ -9,8 +9,8 @@ License: BSD
9
9
  Description: Shapely
10
10
  =======
11
11
 
12
- Shapely is a Python package for programming with geospatial geometries. It is
13
- based on GEOS (http://geos.refractions.net). Shapely 1.0 is ignorant about
12
+ Shapely is a Python package for programming with 2D geospatial geometries. It
13
+ is based on GEOS (http://geos.refractions.net). Shapely 1.0 is ignorant about
14
14
  coordinate and reference systems. Projection responsibility is left to specific
15
15
  applications. For more information, see:
16
16
 
@@ -20,14 +20,16 @@ Description: Shapely
20
20
  Shapely requires Python 2.4+. (I've also begun to port it to Python 3.0:
21
21
  http://zcologia.com/news/564/shapely-for-python-3-0/.)
22
22
 
23
+
23
24
  Dependencies
24
25
  ------------
25
26
 
26
- * libgeos_c (2.2.3, also reported to work with 3.0)
27
+ * libgeos_c (2.2.3 or 3.0.0+)
27
28
  * Python ctypes_ (standard in Python 2.5+)
28
29
 
29
30
  .. _ctypes: http://pypi.python.org/pypi/ctypes/
30
31
 
32
+
31
33
  Installation
32
34
  ------------
33
35
 
@@ -39,26 +41,29 @@ Description: Shapely
39
41
 
40
42
  $ sudo python setup.py install
41
43
 
42
- or by using the development buildout, which also provides libgeos_c::
44
+ or by using the development buildout on Linux, which also provides libgeos_c::
43
45
 
44
46
  $ svn co http://svn.gispython.org/svn/gispy/buildout/shapely.buildout/trunk shapely.buildout
45
47
  $ cd shapely.buildout
46
48
  $ python bootstrap.py
47
49
  $ ./bin/buildout
48
50
 
51
+
49
52
  Usage
50
53
  -----
51
54
 
52
- Buffer a point::
55
+ To buffer a point::
53
56
 
54
57
  >>> from shapely.geometry import Point
55
58
  >>> point = Point(-106.0, 40.0) # longitude, latitude
56
59
  >>> point.buffer(10.0)
57
60
  <shapely.geometry.polygon.Polygon object at ...>
58
61
 
59
- See Operations.txt and Predicates.txt under tests/ for more examples of the
60
- spatial operations and predicates provided by Shapely. Also see Point.txt,
61
- LineString.txt, etc for examples of the geometry APIs.
62
+ See the manual_ for comprehensive examples of usage. See also Operations.txt
63
+ and Predicates.txt under tests/ for more examples of the spatial operations and
64
+ predicates provided by Shapely. See also Point.txt, LineString.txt, etc for
65
+ examples of the geometry APIs.
66
+
62
67
 
63
68
  Numpy integration
64
69
  -----------------
@@ -80,6 +85,7 @@ Description: Shapely
80
85
  >>> line.wkt
81
86
  'LINESTRING (1.0000000000000000 2.0000000000000000, 3.0000000000000000 4.0000000000000000)'
82
87
 
88
+
83
89
  Python Geo Interface
84
90
  --------------------
85
91
 
@@ -107,6 +113,7 @@ Description: Shapely
107
113
  See http://trac.gispython.org/projects/PCL/wiki/PythonGeoInterface for more
108
114
  details on the interface.
109
115
 
116
+
110
117
  Testing
111
118
  -------
112
119
 
@@ -116,7 +123,11 @@ Description: Shapely
116
123
  $ python point.py
117
124
 
118
125
  There are also two test runners under tests/. test_doctests.py requires
119
- zope.testing. runalldoctests.py does not.
126
+ zope.testing. runalldoctests.py does not. Perhaps the easiest way to run the
127
+ tests is::
128
+
129
+ $ python setup.py test
130
+
120
131
 
121
132
  Support
122
133
  -------
@@ -131,9 +142,24 @@ Description: Shapely
131
142
  http://trac.gispython.org/projects/PCL/wiki/CommunityList
132
143
 
133
144
 
145
+ Credits
146
+ -------
147
+
148
+ Sean Gillies (Pleiades)
149
+ Howard Butler (Hobu, Inc.)
150
+ Kai Lautaportti (Hexagon IT)
151
+ Frederic Junod (Camptocamp SA)
152
+ Eric Lemoine (Camptocamp SA)
153
+ Justin Bronn (GeoDjango) for ctypes inspiration
154
+ Artem Pavlenko (Mapnik) for help with GEOS DLLs
155
+
156
+ Some of this work was supported by a grant (Pleiades) from the U.S. National
157
+ Endowment for the Humanities (http://www.neh.gov).
158
+
159
+
134
160
  Keywords: geometry topology
135
161
  Platform: UNKNOWN
136
- Classifier: Development Status :: 4 - Beta
162
+ Classifier: Development Status :: 5 - Production/Stable
137
163
  Classifier: Intended Audience :: Developers
138
164
  Classifier: Intended Audience :: Science/Research
139
165
  Classifier: License :: OSI Approved :: BSD License
@@ -4,6 +4,7 @@ HISTORY.txt
4
4
  LICENSE.txt
5
5
  README.txt
6
6
  setup.py
7
+ setup_windows.py
7
8
  Shapely.egg-info/PKG-INFO
8
9
  Shapely.egg-info/SOURCES.txt
9
10
  Shapely.egg-info/dependency_links.txt
@@ -9,9 +9,9 @@ The Shapely Manual
9
9
  :revision: 1.0
10
10
  :date: 2 January 2008
11
11
 
12
- :copyright: This work is licensed under a `Creative Commons Attribution-Share Alike 3.0 United States License`__.
12
+ :copyright: This work is licensed under a `Creative Commons Attribution 3.0 United States License`__.
13
13
 
14
- .. __: http://creativecommons.org/licenses/by-sa/3.0/us/
14
+ .. __: http://creativecommons.org/licenses/by/3.0/us/
15
15
 
16
16
  :abstract: This document describes the Shapely Python package for programming with geospatial geometries.
17
17
 
@@ -19,6 +19,7 @@ The Shapely Manual
19
19
 
20
20
  .. contents::
21
21
 
22
+
22
23
  Background
23
24
  ==========
24
25
 
@@ -33,6 +34,7 @@ Package Index record_.
33
34
  .. _record: http://pypi.python.org/pypi/Shapely
34
35
  .. _wiki: http://trac.gispython.org/projects/PCL/wiki/Shapely
35
36
 
37
+
36
38
  Geometries
37
39
  ==========
38
40
 
@@ -44,6 +46,7 @@ collections, and heterogeneous geometry collections. See the JTS illustration_.
44
46
 
45
47
  Shapely 1.0 does not provide circles, arcs, splines or the like.
46
48
 
49
+
47
50
  Factories
48
51
  ---------
49
52
 
@@ -111,6 +114,7 @@ Rings *must* be non-crossing, ordered coordinate sequences. The order may be
111
114
  clockwise or counter-clockwise. The resulting topology is independent of the
112
115
  order.
113
116
 
117
+
114
118
  Multipart Geometry Factories
115
119
  ----------------------------
116
120
 
@@ -156,6 +160,31 @@ holes) makes usage more clear
156
160
  >>> holes = [(b1, ..., bN), ...]
157
161
  >>> lines = MultiPolygon([(shell, holes), ...])
158
162
 
163
+
164
+ Null Geometries
165
+ ---------------
166
+
167
+ Null geometries can be created by calling the factories with no arguments, but
168
+ almost nothing can be done with a null geometry.
169
+
170
+ .. code-block:: python
171
+
172
+ >>> line_null = LineString()
173
+ >>> line_null.length
174
+ Traceback (most recent call last):
175
+ ...
176
+ ValueError: Null geometry supports no operations
177
+
178
+ The coordinates of a null geometry *can* be set (see Section 3), after which
179
+ the geometry is no longer null.
180
+
181
+ .. code-block:: python
182
+
183
+ >>> l_null.coords = [(0, 0), (1, 1)]
184
+ >>> print l_null.length
185
+ 1.414...
186
+
187
+
159
188
  Constructive Spatial Analysis Methods
160
189
  -------------------------------------
161
190
 
@@ -232,7 +261,6 @@ Centroid
232
261
  >>> centroid_point.wkt
233
262
  'POINT (-0.0000000000000000 -0.0000000000000000)'
234
263
 
235
-
236
264
  Convex Hull
237
265
  +++++++++++
238
266
 
@@ -264,6 +292,17 @@ Difference
264
292
  >>> polygon.difference(hull)
265
293
  <shapely.geometry.polygon.Polygon object at ...>
266
294
 
295
+ Envelope
296
+ ++++++++
297
+
298
+ .envelope : geometry
299
+ Returns the geometry's rectangular polygon envelope.
300
+
301
+ .. code-block:: python
302
+
303
+ >>> polygon.envelope
304
+ <shapely.geometry.polygon.Polygon object at ...>
305
+
267
306
  Intersection
268
307
  ++++++++++++
269
308
 
@@ -302,6 +341,7 @@ not:
302
341
  >>> hull.union(polygon)
303
342
  <shapely.geometry.polygon.Polygon object at ...>
304
343
 
344
+
305
345
  Unary Spatial Predicates
306
346
  ------------------------
307
347
 
@@ -350,9 +390,10 @@ Examples
350
390
  >>> polygon.boundary.is_ring
351
391
  True
352
392
  >>> polygon.has_z
353
- True
393
+ False
394
+
395
+ (Note: that last return value exposes a bug in GEOS 2.2.3.)
354
396
 
355
- (Note: that last return value exposes a bug in GEOS 2.2.3. Should be False.)
356
397
 
357
398
  Binary Spatial Predicates
358
399
  -------------------------
@@ -437,6 +478,7 @@ Within
437
478
  .within(other): bool
438
479
  The inverse of *contains*.
439
480
 
481
+
440
482
  General Methods
441
483
  ---------------
442
484
 
@@ -462,6 +504,12 @@ Area
462
504
  Area of the geometry, unitless. Non-zero only for surfaces (polygons,
463
505
  multi-polygons).
464
506
 
507
+ Bounds
508
+ ++++++
509
+
510
+ .bounds : tuple
511
+ The geometry's (minx, miny, maxx, maxy) bounding box.
512
+
465
513
  Length
466
514
  ++++++
467
515
 
@@ -476,6 +524,8 @@ Examples
476
524
 
477
525
  >>> polygon.area
478
526
  4.0
527
+ >>> polygon.bounds
528
+ (-1.0, -1.0, 1.0, 1.0)
479
529
  >>> polygon.length
480
530
  8.0
481
531
  >>> line_r.length
@@ -483,6 +533,7 @@ Examples
483
533
  >>> line_b.length
484
534
  3.9812058474788765
485
535
 
536
+
486
537
  Geometry Parts and Coordinates
487
538
  ==============================
488
539
 
@@ -523,6 +574,7 @@ For line strings:
523
574
  >>> list(line_new.coords)
524
575
  [(1.0, 1.0), (2.0, 2.0)]
525
576
 
577
+
526
578
  Polygon Rings
527
579
  -------------
528
580
 
@@ -539,6 +591,7 @@ attribute of the geometry object.
539
591
  The interior boundaries (or holes) of a polygon can be accessed through the
540
592
  *interiors* attribute, which is a list of rings.
541
593
 
594
+
542
595
  Sub-geometries
543
596
  --------------
544
597
 
@@ -560,6 +613,22 @@ attribute of the geometry object, which is an iterator over the sub-geometries:
560
613
  The coordinate sequences of these sub-geometries can then be accessed as
561
614
  described above.
562
615
 
616
+
617
+ Point Coordinates
618
+ -----------------
619
+
620
+ For the sake of convenience the coordinate values of points can be accessed
621
+ read-only via **x**, **y**, and **z** attributes:
622
+
623
+ .. code-block:: python
624
+
625
+ >>> point = Point(1.0, 1.0)
626
+ >>> point.x
627
+ 1.0
628
+ >>> point.y
629
+ 1.0
630
+
631
+
563
632
  Interoperation
564
633
  ==============
565
634
 
@@ -613,6 +682,7 @@ attribute. New geometries can be created from WKB data using the
613
682
  >>> loads(feature.GetGeometryRef().ExportToWkb())
614
683
  <shapely.geometry.polygon.Polygon object at ...>
615
684
 
685
+
616
686
  Python Sequences
617
687
  ----------------
618
688
 
@@ -652,6 +722,7 @@ used like
652
722
  >>> len(pa.interiors[0].coords)
653
723
  5
654
724
 
725
+
655
726
  Numpy Array Interface
656
727
  ---------------------
657
728
 
@@ -695,6 +766,7 @@ and a N x 2 array can be adapted to a line string
695
766
 
696
767
  There is no Numpy array representation of a polygon.
697
768
 
769
+
698
770
  Python Geo Interface
699
771
  --------------------
700
772
 
@@ -728,6 +800,7 @@ Or a simple placemark-type object:
728
800
 
729
801
  .. _Python geo interface: http://trac.gispython.org/projects/PCL/wiki/PythonGeoInterface
730
802
 
803
+
731
804
  Advanced Features
732
805
  =================
733
806
 
@@ -763,6 +836,7 @@ will be ultimately yielded from *iterops.contains*.
763
836
  >>> list(iterops.contains(polygon, iter((p, p.wkt) for p in points)))
764
837
  ['POINT (0.5000000000000000 0.5000000000000000)']
765
838
 
839
+
766
840
  Credits
767
841
  =======
768
842
 
@@ -11,7 +11,7 @@ if version_info[:2] < (2,5):
11
11
  readme_text = file('README.txt', 'rb').read()
12
12
 
13
13
  setup(name = 'Shapely',
14
- version = '1.0b3',
14
+ version = '1.0rc1',
15
15
  description = 'Geospatial geometries, predicates, and operations',
16
16
  license = 'BSD',
17
17
  keywords = 'geometry topology',
@@ -26,7 +26,7 @@ setup(name = 'Shapely',
26
26
  #tests_require = ['numpy'], -- not working with "tests" command
27
27
  test_suite = 'tests.test_suite',
28
28
  classifiers = [
29
- 'Development Status :: 4 - Beta',
29
+ 'Development Status :: 5 - Production/Stable',
30
30
  'Intended Audience :: Developers',
31
31
  'Intended Audience :: Science/Research',
32
32
  'License :: OSI Approved :: BSD License',
@@ -0,0 +1,39 @@
1
+
2
+ from setuptools import setup, Extension
3
+ from sys import version_info
4
+
5
+ # Require ctypes egg only for Python < 2.5
6
+ install_requires = ['setuptools']
7
+ if version_info[:2] < (2,5):
8
+ install_requires.append('ctypes')
9
+
10
+ # Get text from README.txt
11
+ readme_text = file('README.txt', 'rb').read()
12
+
13
+ setup(name = 'Shapely',
14
+ version = '1.0rc1',
15
+ description = 'Geospatial geometries, predicates, and operations',
16
+ license = 'BSD',
17
+ keywords = 'geometry topology',
18
+ author = 'Sean Gillies',
19
+ author_email = 'sgillies@frii.com',
20
+ maintainer = 'Sean Gillies',
21
+ maintainer_email = 'sgillies@frii.com',
22
+ url = 'http://trac.gispython.org/projects/PCL/wiki/Shapely',
23
+ long_description = readme_text,
24
+ packages = ['shapely', 'shapely.geometry'],
25
+ data_files=[('DLLs', ['DLLs/geos.dll', 'DLLs/geos_c.dll']),],
26
+ install_requires = install_requires,
27
+ #tests_require = ['numpy'], -- not working with "tests" command
28
+ test_suite = 'tests.test_suite',
29
+ classifiers = [
30
+ 'Development Status :: 5 - Production/Stable',
31
+ 'Intended Audience :: Developers',
32
+ 'Intended Audience :: Science/Research',
33
+ 'License :: OSI Approved :: BSD License',
34
+ 'Operating System :: OS Independent',
35
+ 'Programming Language :: Python',
36
+ 'Topic :: Scientific/Engineering :: GIS',
37
+ ],
38
+ )
39
+