shapely 1.0b4__py2.4.egg → 1.0rc2__py2.4.egg
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.
- EGG-INFO/PKG-INFO +42 -11
- EGG-INFO/SOURCES.txt +1 -0
- shapely/geos.py +14 -6
- shapely/geos.pyc +0 -0
- /EGG-INFO/{zip-safe → not-zip-safe} +0 -0
EGG-INFO/PKG-INFO
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.0
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.0rc2
|
|
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
|
|
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,6 +20,7 @@ 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
|
|
|
@@ -28,10 +29,13 @@ Description: Shapely
|
|
|
28
29
|
|
|
29
30
|
.. _ctypes: http://pypi.python.org/pypi/ctypes/
|
|
30
31
|
|
|
32
|
+
|
|
31
33
|
Installation
|
|
32
34
|
------------
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
Windows users should use the executable installer, which contains the required
|
|
37
|
+
GEOS DLL. Other users should acquire libgeos_c by any means, make sure that it
|
|
38
|
+
is on the system library path, and install from the Python package index::
|
|
35
39
|
|
|
36
40
|
$ sudo easy_install Shapely
|
|
37
41
|
|
|
@@ -39,26 +43,29 @@ Description: Shapely
|
|
|
39
43
|
|
|
40
44
|
$ sudo python setup.py install
|
|
41
45
|
|
|
42
|
-
or by using the development buildout, which also provides libgeos_c::
|
|
46
|
+
or by using the development buildout on Linux, which also provides libgeos_c::
|
|
43
47
|
|
|
44
48
|
$ svn co http://svn.gispython.org/svn/gispy/buildout/shapely.buildout/trunk shapely.buildout
|
|
45
49
|
$ cd shapely.buildout
|
|
46
50
|
$ python bootstrap.py
|
|
47
51
|
$ ./bin/buildout
|
|
48
52
|
|
|
53
|
+
|
|
49
54
|
Usage
|
|
50
55
|
-----
|
|
51
56
|
|
|
52
|
-
|
|
57
|
+
To buffer a point::
|
|
53
58
|
|
|
54
59
|
>>> from shapely.geometry import Point
|
|
55
60
|
>>> point = Point(-106.0, 40.0) # longitude, latitude
|
|
56
61
|
>>> point.buffer(10.0)
|
|
57
62
|
<shapely.geometry.polygon.Polygon object at ...>
|
|
58
63
|
|
|
59
|
-
See
|
|
60
|
-
|
|
61
|
-
LineString.txt, etc for
|
|
64
|
+
See the manual_ for comprehensive examples of usage. See also Operations.txt
|
|
65
|
+
and Predicates.txt under tests/ for more examples of the spatial operations and
|
|
66
|
+
predicates provided by Shapely. See also Point.txt, LineString.txt, etc for
|
|
67
|
+
examples of the geometry APIs.
|
|
68
|
+
|
|
62
69
|
|
|
63
70
|
Numpy integration
|
|
64
71
|
-----------------
|
|
@@ -80,6 +87,7 @@ Description: Shapely
|
|
|
80
87
|
>>> line.wkt
|
|
81
88
|
'LINESTRING (1.0000000000000000 2.0000000000000000, 3.0000000000000000 4.0000000000000000)'
|
|
82
89
|
|
|
90
|
+
|
|
83
91
|
Python Geo Interface
|
|
84
92
|
--------------------
|
|
85
93
|
|
|
@@ -107,6 +115,7 @@ Description: Shapely
|
|
|
107
115
|
See http://trac.gispython.org/projects/PCL/wiki/PythonGeoInterface for more
|
|
108
116
|
details on the interface.
|
|
109
117
|
|
|
118
|
+
|
|
110
119
|
Testing
|
|
111
120
|
-------
|
|
112
121
|
|
|
@@ -116,7 +125,11 @@ Description: Shapely
|
|
|
116
125
|
$ python point.py
|
|
117
126
|
|
|
118
127
|
There are also two test runners under tests/. test_doctests.py requires
|
|
119
|
-
zope.testing. runalldoctests.py does not.
|
|
128
|
+
zope.testing. runalldoctests.py does not. Perhaps the easiest way to run the
|
|
129
|
+
tests is::
|
|
130
|
+
|
|
131
|
+
$ python setup.py test
|
|
132
|
+
|
|
120
133
|
|
|
121
134
|
Support
|
|
122
135
|
-------
|
|
@@ -131,9 +144,27 @@ Description: Shapely
|
|
|
131
144
|
http://trac.gispython.org/projects/PCL/wiki/CommunityList
|
|
132
145
|
|
|
133
146
|
|
|
147
|
+
Credits
|
|
148
|
+
-------
|
|
149
|
+
|
|
150
|
+
* Sean Gillies (Pleiades)
|
|
151
|
+
* Howard Butler (Hobu, Inc.)
|
|
152
|
+
* Kai Lautaportti (Hexagon IT)
|
|
153
|
+
* Fr |eaigue| d |eaigue| ric Junod (Camptocamp SA)
|
|
154
|
+
* Eric Lemoine (Camptocamp SA)
|
|
155
|
+
* Justin Bronn (GeoDjango) for ctypes inspiration
|
|
156
|
+
* Artem Pavlenko (Mapnik) for help with GEOS DLLs
|
|
157
|
+
|
|
158
|
+
.. |eaigue| unicode:: U+00E9
|
|
159
|
+
:trim:
|
|
160
|
+
|
|
161
|
+
Major portions of this work were supported by a grant (to Pleiades) from the
|
|
162
|
+
U.S. National Endowment for the Humanities (http://www.neh.gov).
|
|
163
|
+
|
|
164
|
+
|
|
134
165
|
Keywords: geometry topology
|
|
135
166
|
Platform: UNKNOWN
|
|
136
|
-
Classifier: Development Status ::
|
|
167
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
137
168
|
Classifier: Intended Audience :: Developers
|
|
138
169
|
Classifier: Intended Audience :: Science/Research
|
|
139
170
|
Classifier: License :: OSI Approved :: BSD License
|
EGG-INFO/SOURCES.txt
CHANGED
shapely/geos.py
CHANGED
|
@@ -5,18 +5,26 @@ Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities.
|
|
|
5
5
|
import atexit
|
|
6
6
|
from ctypes import cdll, CDLL, CFUNCTYPE, c_char_p
|
|
7
7
|
from ctypes.util import find_library
|
|
8
|
+
import os
|
|
8
9
|
import sys
|
|
9
10
|
|
|
11
|
+
import shapely
|
|
12
|
+
|
|
10
13
|
if sys.platform == 'win32':
|
|
11
14
|
try:
|
|
12
|
-
|
|
15
|
+
local_dlls = os.path.abspath(os.__file__ + "../../../DLLs")
|
|
16
|
+
original_path = os.environ['PATH']
|
|
17
|
+
os.environ['PATH'] = "%s;%s" % (local_dlls, original_path)
|
|
18
|
+
lgeos = CDLL("geos.dll")
|
|
13
19
|
except (ImportError, WindowsError):
|
|
14
|
-
# Try GEOS DLL from the Windows PostGIS installer for
|
|
15
|
-
# PostgreSQL 8.2 before failing
|
|
16
|
-
lgeos = CDLL('libgeos_c-1.dll')
|
|
17
|
-
except:
|
|
18
20
|
raise
|
|
19
|
-
|
|
21
|
+
def free(m):
|
|
22
|
+
try:
|
|
23
|
+
cdll.msvcrt.free(m)
|
|
24
|
+
except WindowsError:
|
|
25
|
+
# XXX: See http://trac.gispython.org/projects/PCL/ticket/149
|
|
26
|
+
pass
|
|
27
|
+
|
|
20
28
|
elif sys.platform == 'darwin':
|
|
21
29
|
lgeos = CDLL(find_library('geos_c'))
|
|
22
30
|
free = CDLL(find_library('libc')).free
|
shapely/geos.pyc
CHANGED
|
Binary file
|
|
File without changes
|