shapely 1.0.13__tar.gz → 1.0.15__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.15/._CHANGES.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/._CREDITS.txt +0 -0
- Shapely-1.0.15/._LICENSE.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/._MANIFEST.in +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/CHANGES.txt +5 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/PKG-INFO +1 -1
- {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/PKG-INFO +1 -1
- Shapely-1.0.15/examples/._geoms.py +0 -0
- Shapely-1.0.15/examples/._world.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/setup.py +1 -1
- Shapely-1.0.15/shapely/._ctypes_declarations.py +0 -0
- Shapely-1.0.15/shapely/._wkb.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/ctypes_declarations.py +4 -0
- Shapely-1.0.15/shapely/geometry/._base.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/base.py +4 -3
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geos.py +48 -19
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/wkb.py +4 -2
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/wkt_locale.txt +1 -1
- Shapely-1.0.13/._CHANGES.txt +0 -0
- Shapely-1.0.13/._setup.py +0 -0
- Shapely-1.0.13/shapely/._ctypes_declarations.py +0 -0
- Shapely-1.0.13/shapely/._geos.py +0 -0
- Shapely-1.0.13/shapely/._wkb.py +0 -0
- Shapely-1.0.13/tests/._wkt_locale.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/._HISTORY.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/._README.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/CREDITS.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/GEOS-C-API.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/HISTORY.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/LICENSE.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/MANIFEST.in +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/README.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/SOURCES.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/requires.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/examples/geoms.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/examples/world.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/manual/manual.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/setup.cfg +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/.___init__.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/._iterops.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/._ops.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/._predicates.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/._topology.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/__init__.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/._linestring.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/__init__.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/collection.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/geo.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/linestring.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/multilinestring.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/multipoint.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/multipolygon.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/point.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/polygon.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/proxy.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/iterops.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/ops.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/predicates.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/topology.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/shapely/wkt.py +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/._Array.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/._GeoInterface.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/._Persist.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/._Point.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/._Predicates.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/._binascii_hex.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/Array.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/GeoInterface.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/IterOps.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/LineString.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/MultiLineString.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/MultiPoint.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/MultiPolygon.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/Operations.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/Persist.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/Point.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/Polygon.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/Predicates.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/attribute-chains.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/binascii_hex.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/dimensions.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/invalid_intersection.txt +0 -0
- {Shapely-1.0.13 → Shapely-1.0.15}/tests/polygonize.txt +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
All tickets are children of http://trac.gispython.org/lab/ticket.
|
|
2
2
|
|
|
3
|
+
1.0.14 (2009-10-05)
|
|
4
|
+
-------------------
|
|
5
|
+
- Proper prototyping of WKB writer, and avoidance of errors on 64-bit systems
|
|
6
|
+
(#191).
|
|
7
|
+
|
|
3
8
|
1.0.13 (2009-09-29)
|
|
4
9
|
-------------------
|
|
5
10
|
- Prototype libgeos_c functions in a way that lets py2exe apps import shapely
|
|
Binary file
|
|
Binary file
|
|
@@ -10,7 +10,7 @@ if version_info[:2] < (2,5):
|
|
|
10
10
|
readme_text = file('README.txt', 'rb').read()
|
|
11
11
|
|
|
12
12
|
setup(name = 'Shapely',
|
|
13
|
-
version = '1.0.
|
|
13
|
+
version = '1.0.15',
|
|
14
14
|
description = 'Geospatial geometries, predicates, and operations',
|
|
15
15
|
license = 'BSD',
|
|
16
16
|
keywords = 'geometry topology',
|
|
Binary file
|
|
Binary file
|
|
@@ -23,6 +23,10 @@ def prototype(lgeos):
|
|
|
23
23
|
lgeos.GEOSGeomFromWKB_buf.restype = ctypes.c_void_p
|
|
24
24
|
lgeos.GEOSGeomFromWKB_buf.argtypes = [ctypes.c_void_p, ctypes.c_size_t]
|
|
25
25
|
|
|
26
|
+
lgeos.GEOSGeomToWKB_buf.restype = ctypes.c_void_p
|
|
27
|
+
lgeos.GEOSGeomToWKB_buf.argtypes = [ctypes.c_void_p , ctypes.POINTER(ctypes.c_size_t)]
|
|
28
|
+
|
|
29
|
+
|
|
26
30
|
lgeos.GEOSCoordSeq_create.restype = ctypes.c_void_p
|
|
27
31
|
lgeos.GEOSCoordSeq_create.argtypes = [ctypes.c_uint, ctypes.c_uint]
|
|
28
32
|
|
|
Binary file
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Base geometry class and utilities.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
from ctypes import string_at, byref, c_int, c_size_t, c_char_p, c_double
|
|
5
|
+
from ctypes import string_at, byref, c_int, c_size_t, c_char_p, c_double, c_void_p
|
|
6
6
|
import sys
|
|
7
7
|
|
|
8
8
|
from shapely.geos import lgeos, free, allocated_c_char_p
|
|
@@ -349,13 +349,14 @@ class BaseGeometry(object):
|
|
|
349
349
|
def to_wkb(self):
|
|
350
350
|
"""Returns a WKB byte string representation of the geometry."""
|
|
351
351
|
func = lgeos.GEOSGeomToWKB_buf
|
|
352
|
-
size =
|
|
352
|
+
size = c_size_t()
|
|
353
353
|
def errcheck(result, func, argtuple):
|
|
354
|
+
if not result: return None
|
|
354
355
|
retval = string_at(result, size.value)[:]
|
|
355
356
|
free(result)
|
|
356
357
|
return retval
|
|
357
358
|
func.errcheck = errcheck
|
|
358
|
-
return func(self._geom, byref(size))
|
|
359
|
+
return func(c_void_p(self._geom), byref(size))
|
|
359
360
|
|
|
360
361
|
@exceptNull
|
|
361
362
|
def to_wkt(self):
|
|
@@ -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, PyDLL, CFUNCTYPE, c_char_p
|
|
6
|
+
from ctypes import cdll, CDLL, PyDLL, CFUNCTYPE, c_char_p, c_void_p
|
|
7
7
|
from ctypes.util import find_library
|
|
8
8
|
import os
|
|
9
9
|
import sys
|
|
@@ -11,20 +11,15 @@ import sys
|
|
|
11
11
|
from ctypes_declarations import prototype
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
try:
|
|
24
|
-
cdll.msvcrt.free(m)
|
|
25
|
-
except WindowsError:
|
|
26
|
-
# XXX: See http://trac.gispython.org/projects/PCL/ticket/149
|
|
27
|
-
pass
|
|
14
|
+
# Find and load the GEOS and C libraries
|
|
15
|
+
# If this ever gets any longer, we'll break it into separate modules
|
|
16
|
+
|
|
17
|
+
if sys.platform == 'linux2':
|
|
18
|
+
lgeos = PyDLL(find_library('geos_c'))
|
|
19
|
+
free = CDLL(find_library('c')).free
|
|
20
|
+
free.argtypes = [c_void_p]
|
|
21
|
+
free.restype = None
|
|
22
|
+
|
|
28
23
|
elif sys.platform == 'darwin':
|
|
29
24
|
lib = find_library('geos_c')
|
|
30
25
|
if lib is None:
|
|
@@ -40,11 +35,43 @@ elif sys.platform == 'darwin':
|
|
|
40
35
|
lib = path
|
|
41
36
|
break
|
|
42
37
|
if lib is None:
|
|
43
|
-
raise ImportError
|
|
38
|
+
raise ImportError("Could not find geos_c library")
|
|
44
39
|
lgeos = PyDLL(lib)
|
|
45
|
-
free = CDLL(find_library('
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
free = CDLL(find_library('c')).free
|
|
41
|
+
free.argtypes = [c_void_p]
|
|
42
|
+
free.restype = None
|
|
43
|
+
|
|
44
|
+
elif sys.platform == 'win32':
|
|
45
|
+
try:
|
|
46
|
+
local_dlls = os.path.abspath(os.__file__ + "../../../DLLs")
|
|
47
|
+
original_path = os.environ['PATH']
|
|
48
|
+
os.environ['PATH'] = "%s;%s" % (local_dlls, original_path)
|
|
49
|
+
lgeos = PyDLL("geos.dll")
|
|
50
|
+
except (ImportError, WindowsError):
|
|
51
|
+
raise
|
|
52
|
+
def free(m):
|
|
53
|
+
try:
|
|
54
|
+
cdll.msvcrt.free(m)
|
|
55
|
+
except WindowsError:
|
|
56
|
+
# XXX: See http://trac.gispython.org/projects/PCL/ticket/149
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
elif sys.platform == 'sunos5':
|
|
60
|
+
# Try the major versioned name first, falling back on the unversioned
|
|
61
|
+
# name.
|
|
62
|
+
try:
|
|
63
|
+
lgeos = PyDLL('libgeos_c.so.1')
|
|
64
|
+
except (OSError, ImportError):
|
|
65
|
+
lgeos = PyDLL('libgeos_c.so')
|
|
66
|
+
except:
|
|
67
|
+
raise
|
|
68
|
+
free = CDLL('libc.so.1').free
|
|
69
|
+
free.argtypes = [c_void_p]
|
|
70
|
+
free.restype = None
|
|
71
|
+
|
|
72
|
+
else: # other *nix systems
|
|
73
|
+
# Try the major versioned name first, falling back on the unversioned
|
|
74
|
+
# name.
|
|
48
75
|
try:
|
|
49
76
|
lgeos = PyDLL('libgeos_c.so.1')
|
|
50
77
|
except (OSError, ImportError):
|
|
@@ -52,6 +79,8 @@ else:
|
|
|
52
79
|
except:
|
|
53
80
|
raise
|
|
54
81
|
free = CDLL('libc.so.6').free
|
|
82
|
+
free.argtypes = [c_void_p]
|
|
83
|
+
free.restype = None
|
|
55
84
|
|
|
56
85
|
# Prototype the libgeos_c functions using new code from `tarley` in
|
|
57
86
|
# http://trac.gispython.org/lab/ticket/189
|
|
@@ -3,6 +3,7 @@ Load/dump geometries using the well-known binary (WKB) format.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from ctypes import byref, c_int, c_size_t, c_char_p, string_at
|
|
6
|
+
from ctypes import c_void_p, c_size_t
|
|
6
7
|
|
|
7
8
|
from shapely.geos import lgeos, free, ReadingError
|
|
8
9
|
from shapely.geometry.base import geom_factory
|
|
@@ -26,13 +27,14 @@ def load(fp):
|
|
|
26
27
|
def dumps(ob):
|
|
27
28
|
"""Dump a WKB representation of a geometry to a byte string."""
|
|
28
29
|
func = lgeos.GEOSGeomToWKB_buf
|
|
29
|
-
size =
|
|
30
|
+
size = c_size_t()
|
|
30
31
|
def errcheck(result, func, argtuple):
|
|
32
|
+
if not result: return None
|
|
31
33
|
retval = string_at(result, size.value)[:]
|
|
32
34
|
free(result)
|
|
33
35
|
return retval
|
|
34
36
|
func.errcheck = errcheck
|
|
35
|
-
return func(ob._geom, byref(size))
|
|
37
|
+
return func(c_void_p(ob._geom), byref(size))
|
|
36
38
|
|
|
37
39
|
def dump(ob, fp):
|
|
38
40
|
"""Dump a geometry to an open file."""
|
|
@@ -5,7 +5,7 @@ Set locale to one that uses a comma as decimal seperator`
|
|
|
5
5
|
|
|
6
6
|
>>> import locale, sys
|
|
7
7
|
>>> if sys.platform == 'win32':
|
|
8
|
-
... _ = locale.setlocale(locale.LC_ALL, '
|
|
8
|
+
... _ = locale.setlocale(locale.LC_ALL, 'portuguese_brazil')
|
|
9
9
|
... else:
|
|
10
10
|
... _ = locale.setlocale(locale.LC_ALL, 'pt_BR.UTF-8')
|
|
11
11
|
|
Shapely-1.0.13/._CHANGES.txt
DELETED
|
Binary file
|
Shapely-1.0.13/._setup.py
DELETED
|
Binary file
|
|
Binary file
|
Shapely-1.0.13/shapely/._geos.py
DELETED
|
Binary file
|
Shapely-1.0.13/shapely/._wkb.py
DELETED
|
Binary file
|
|
Binary file
|
|
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
|
|
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
|