shapely 1.0.2__tar.gz → 1.0.3__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.0.3/CHANGES.txt +10 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/PKG-INFO +1 -1
- {Shapely-1.0.2 → Shapely-1.0.3}/Shapely.egg-info/PKG-INFO +1 -1
- {Shapely-1.0.2 → Shapely-1.0.3}/Shapely.egg-info/SOURCES.txt +1 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/setup.py +1 -1
- {Shapely-1.0.2 → Shapely-1.0.3}/setup_windows.py +1 -1
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/base.py +3 -1
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geos.py +5 -5
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/topology.py +2 -2
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/attribute-chains.txt +7 -3
- Shapely-1.0.3/tests/test_threads.py +33 -0
- Shapely-1.0.2/CHANGES.txt +0 -7
- {Shapely-1.0.2 → Shapely-1.0.3}/CREDITS.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/HISTORY.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/LICENSE.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/README.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/Shapely.egg-info/requires.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/examples/geoms.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/examples/world.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/manual/manual.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/manual/style.css +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/setup.cfg +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/__init__.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/__init__.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/collection.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/geo.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/linestring.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/multilinestring.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/multipoint.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/multipolygon.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/point.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/geometry/polygon.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/iterops.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/kml.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/predicates.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/wkb.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/shapely/wkt.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/Array.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/GeoInterface.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/IterOps.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/LineString.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/MultiLineString.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/MultiPoint.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/MultiPolygon.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/Operations.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/Persist.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/Point.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/Polygon.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/Predicates.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/__init__.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/binascii_hex.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/invalid_intersection.txt +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/rungrind.dist +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/test_doctests.py +0 -0
- {Shapely-1.0.2 → Shapely-1.0.3}/tests/valgrind-python.supp +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
All tickets are children of http://trac.gispython.org/projects/PCL/ticket/
|
|
2
|
+
|
|
3
|
+
1.0.3 (2008-04-09)
|
|
4
|
+
------------------
|
|
5
|
+
- Do not release GIL when calling GEOS functions (#158).
|
|
6
|
+
- Prevent faults when chaining multiple GEOS operators (#159).
|
|
7
|
+
|
|
8
|
+
1.0.2 (2008-02-26)
|
|
9
|
+
------------------
|
|
10
|
+
- Fix loss of dimensionality in polygon rings (#155).
|
|
@@ -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.0.
|
|
14
|
+
version = '1.0.3',
|
|
15
15
|
description = 'Geospatial geometries, predicates, and operations',
|
|
16
16
|
license = 'BSD',
|
|
17
17
|
keywords = 'geometry topology',
|
|
@@ -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.0.
|
|
14
|
+
version = '1.0.3',
|
|
15
15
|
description = 'Geospatial geometries, predicates, and operations',
|
|
16
16
|
license = 'BSD',
|
|
17
17
|
keywords = 'geometry topology',
|
|
@@ -28,7 +28,7 @@ def geometry_type_name(g):
|
|
|
28
28
|
|
|
29
29
|
# Abstract geometry factory for use with topological methods below
|
|
30
30
|
|
|
31
|
-
def geom_factory(g):
|
|
31
|
+
def geom_factory(g, parent=None):
|
|
32
32
|
if not g:
|
|
33
33
|
raise ValueError, "No Shapely geometry can be created from this null value"
|
|
34
34
|
ob = BaseGeometry()
|
|
@@ -42,6 +42,7 @@ def geom_factory(g):
|
|
|
42
42
|
)
|
|
43
43
|
ob.__class__ = getattr(mod, geom_type)
|
|
44
44
|
ob.__geom__ = g
|
|
45
|
+
ob.__p__ = parent
|
|
45
46
|
ob._ndim = 2 # callers should be all from 2D worlds
|
|
46
47
|
return ob
|
|
47
48
|
|
|
@@ -231,6 +232,7 @@ class BaseGeometry(object):
|
|
|
231
232
|
"""
|
|
232
233
|
|
|
233
234
|
__geom__ = None # See _geom property below
|
|
235
|
+
__p__ = None
|
|
234
236
|
_ctypes_data = None
|
|
235
237
|
_ndim = None
|
|
236
238
|
_crs = None
|
|
@@ -3,7 +3,7 @@ Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import atexit
|
|
6
|
-
from ctypes import cdll, CDLL, CFUNCTYPE, c_char_p
|
|
6
|
+
from ctypes import cdll, CDLL, pydll, PyDLL, CFUNCTYPE, c_char_p
|
|
7
7
|
from ctypes.util import find_library
|
|
8
8
|
import os
|
|
9
9
|
import sys
|
|
@@ -15,7 +15,7 @@ if sys.platform == 'win32':
|
|
|
15
15
|
local_dlls = os.path.abspath(os.__file__ + "../../../DLLs")
|
|
16
16
|
original_path = os.environ['PATH']
|
|
17
17
|
os.environ['PATH'] = "%s;%s" % (local_dlls, original_path)
|
|
18
|
-
lgeos =
|
|
18
|
+
lgeos = PyDLL("geos.dll")
|
|
19
19
|
except (ImportError, WindowsError):
|
|
20
20
|
raise
|
|
21
21
|
def free(m):
|
|
@@ -38,14 +38,14 @@ elif sys.platform == 'darwin':
|
|
|
38
38
|
break
|
|
39
39
|
else:
|
|
40
40
|
raise ImportError, "Could not find geos_c library"
|
|
41
|
-
lgeos =
|
|
41
|
+
lgeos = PyDLL(lib)
|
|
42
42
|
free = CDLL(find_library('libc')).free
|
|
43
43
|
else:
|
|
44
44
|
# Try the major versioned name first, falling back on the unversioned name.
|
|
45
45
|
try:
|
|
46
|
-
lgeos =
|
|
46
|
+
lgeos = PyDLL('libgeos_c.so.1')
|
|
47
47
|
except (OSError, ImportError):
|
|
48
|
-
lgeos =
|
|
48
|
+
lgeos = PyDLL('libgeos_c.so')
|
|
49
49
|
except:
|
|
50
50
|
raise
|
|
51
51
|
free = CDLL('libc.so.6').free
|
|
@@ -38,7 +38,7 @@ class BinaryTopologicalOp(object):
|
|
|
38
38
|
raise TopologicalError, \
|
|
39
39
|
"The operation '%s' produced a null geometry. Likely cause is invalidity of the 'other' geometry %s" % (self.fn.__name__, repr(other))
|
|
40
40
|
|
|
41
|
-
return self.factory(product)
|
|
41
|
+
return self.factory(product, self.context)
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class UnaryTopologicalOp(object):
|
|
@@ -59,7 +59,7 @@ class UnaryTopologicalOp(object):
|
|
|
59
59
|
def __get__(self, obj, objtype=None):
|
|
60
60
|
if obj._geom is None:
|
|
61
61
|
raise ValueError, "Null geometry supports no operations"
|
|
62
|
-
return self.factory(self.fn(obj._geom))
|
|
62
|
+
return self.factory(self.fn(obj._geom), obj)
|
|
63
63
|
|
|
64
64
|
def __set__(self, obj, value=None):
|
|
65
65
|
raise AttributeError, "Attribute is read-only"
|
|
@@ -9,7 +9,7 @@ See also ticket #151.
|
|
|
9
9
|
[(0.0, 0.0), (0.0, 1.0), (-1.0, 1.0), (-1.0, 0.0), (0.0, 0.0)]
|
|
10
10
|
|
|
11
11
|
>>> print list(p.buffer(1).exterior.coords)
|
|
12
|
-
[(
|
|
12
|
+
[(0.0, -1.0), (-1.0, -1.0), ...
|
|
13
13
|
|
|
14
14
|
Test chained access to interiors
|
|
15
15
|
|
|
@@ -22,6 +22,10 @@ Test chained access to interiors
|
|
|
22
22
|
>>> print list(p.interiors[0].coords)
|
|
23
23
|
[(-0.25, 0.25), (-0.25, 0.75), (-0.75, 0.75), (-0.75, 0.25), (-0.25, 0.25)]
|
|
24
24
|
>>> print list(p.interiors[0].buffer(1).exterior.coords)
|
|
25
|
-
[(-0.
|
|
26
|
-
|
|
25
|
+
[(-0.25, -0.75), (-0.75, -0.75), ...
|
|
26
|
+
|
|
27
|
+
Test multiple operators, boundary of a buffer
|
|
28
|
+
|
|
29
|
+
>>> print list(p.buffer(1).boundary.coords)
|
|
30
|
+
[(0.0, -1.0), (-1.0, -1.0), ...
|
|
27
31
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import threading
|
|
2
|
+
|
|
3
|
+
def main():
|
|
4
|
+
num_threads = 4
|
|
5
|
+
use_threads = True
|
|
6
|
+
|
|
7
|
+
if not use_threads:
|
|
8
|
+
# Run core code
|
|
9
|
+
runShapelyBuilding()
|
|
10
|
+
else:
|
|
11
|
+
threads = [threading.Thread(target=runShapelyBuilding) for x in range(num_threads)]
|
|
12
|
+
for t in threads:
|
|
13
|
+
t.start()
|
|
14
|
+
for t in threads:
|
|
15
|
+
t.join()
|
|
16
|
+
|
|
17
|
+
def runShapelyBuilding():
|
|
18
|
+
import shapely.wkt
|
|
19
|
+
import shapely.wkb
|
|
20
|
+
|
|
21
|
+
print "Running shapely tests on wkb"
|
|
22
|
+
|
|
23
|
+
wkb = shapely.wkt.loads("POINT (0 0)").wkb
|
|
24
|
+
|
|
25
|
+
for i in xrange(1000):
|
|
26
|
+
obj = shapely.wkb.loads(wkb)
|
|
27
|
+
|
|
28
|
+
print "Done"
|
|
29
|
+
|
|
30
|
+
# Run main
|
|
31
|
+
if __name__ == '__main__':
|
|
32
|
+
main()
|
|
33
|
+
|
Shapely-1.0.2/CHANGES.txt
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|