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.
Files changed (85) hide show
  1. Shapely-1.0.15/._CHANGES.txt +0 -0
  2. {Shapely-1.0.13 → Shapely-1.0.15}/._CREDITS.txt +0 -0
  3. Shapely-1.0.15/._LICENSE.txt +0 -0
  4. {Shapely-1.0.13 → Shapely-1.0.15}/._MANIFEST.in +0 -0
  5. {Shapely-1.0.13 → Shapely-1.0.15}/CHANGES.txt +5 -0
  6. {Shapely-1.0.13 → Shapely-1.0.15}/PKG-INFO +1 -1
  7. {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/PKG-INFO +1 -1
  8. Shapely-1.0.15/examples/._geoms.py +0 -0
  9. Shapely-1.0.15/examples/._world.py +0 -0
  10. {Shapely-1.0.13 → Shapely-1.0.15}/setup.py +1 -1
  11. Shapely-1.0.15/shapely/._ctypes_declarations.py +0 -0
  12. Shapely-1.0.15/shapely/._wkb.py +0 -0
  13. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/ctypes_declarations.py +4 -0
  14. Shapely-1.0.15/shapely/geometry/._base.py +0 -0
  15. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/base.py +4 -3
  16. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geos.py +48 -19
  17. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/wkb.py +4 -2
  18. {Shapely-1.0.13 → Shapely-1.0.15}/tests/wkt_locale.txt +1 -1
  19. Shapely-1.0.13/._CHANGES.txt +0 -0
  20. Shapely-1.0.13/._setup.py +0 -0
  21. Shapely-1.0.13/shapely/._ctypes_declarations.py +0 -0
  22. Shapely-1.0.13/shapely/._geos.py +0 -0
  23. Shapely-1.0.13/shapely/._wkb.py +0 -0
  24. Shapely-1.0.13/tests/._wkt_locale.txt +0 -0
  25. {Shapely-1.0.13 → Shapely-1.0.15}/._HISTORY.txt +0 -0
  26. {Shapely-1.0.13 → Shapely-1.0.15}/._README.txt +0 -0
  27. {Shapely-1.0.13 → Shapely-1.0.15}/CREDITS.txt +0 -0
  28. {Shapely-1.0.13 → Shapely-1.0.15}/GEOS-C-API.txt +0 -0
  29. {Shapely-1.0.13 → Shapely-1.0.15}/HISTORY.txt +0 -0
  30. {Shapely-1.0.13 → Shapely-1.0.15}/LICENSE.txt +0 -0
  31. {Shapely-1.0.13 → Shapely-1.0.15}/MANIFEST.in +0 -0
  32. {Shapely-1.0.13 → Shapely-1.0.15}/README.txt +0 -0
  33. {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/SOURCES.txt +0 -0
  34. {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/dependency_links.txt +0 -0
  35. {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/requires.txt +0 -0
  36. {Shapely-1.0.13 → Shapely-1.0.15}/Shapely.egg-info/top_level.txt +0 -0
  37. {Shapely-1.0.13 → Shapely-1.0.15}/examples/geoms.py +0 -0
  38. {Shapely-1.0.13 → Shapely-1.0.15}/examples/world.py +0 -0
  39. {Shapely-1.0.13 → Shapely-1.0.15}/manual/manual.txt +0 -0
  40. {Shapely-1.0.13 → Shapely-1.0.15}/setup.cfg +0 -0
  41. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/.___init__.py +0 -0
  42. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/._iterops.py +0 -0
  43. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/._ops.py +0 -0
  44. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/._predicates.py +0 -0
  45. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/._topology.py +0 -0
  46. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/__init__.py +0 -0
  47. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/._linestring.py +0 -0
  48. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/__init__.py +0 -0
  49. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/collection.py +0 -0
  50. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/geo.py +0 -0
  51. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/linestring.py +0 -0
  52. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/multilinestring.py +0 -0
  53. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/multipoint.py +0 -0
  54. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/multipolygon.py +0 -0
  55. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/point.py +0 -0
  56. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/polygon.py +0 -0
  57. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/geometry/proxy.py +0 -0
  58. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/iterops.py +0 -0
  59. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/ops.py +0 -0
  60. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/predicates.py +0 -0
  61. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/topology.py +0 -0
  62. {Shapely-1.0.13 → Shapely-1.0.15}/shapely/wkt.py +0 -0
  63. {Shapely-1.0.13 → Shapely-1.0.15}/tests/._Array.txt +0 -0
  64. {Shapely-1.0.13 → Shapely-1.0.15}/tests/._GeoInterface.txt +0 -0
  65. {Shapely-1.0.13 → Shapely-1.0.15}/tests/._Persist.txt +0 -0
  66. {Shapely-1.0.13 → Shapely-1.0.15}/tests/._Point.txt +0 -0
  67. {Shapely-1.0.13 → Shapely-1.0.15}/tests/._Predicates.txt +0 -0
  68. {Shapely-1.0.13 → Shapely-1.0.15}/tests/._binascii_hex.txt +0 -0
  69. {Shapely-1.0.13 → Shapely-1.0.15}/tests/Array.txt +0 -0
  70. {Shapely-1.0.13 → Shapely-1.0.15}/tests/GeoInterface.txt +0 -0
  71. {Shapely-1.0.13 → Shapely-1.0.15}/tests/IterOps.txt +0 -0
  72. {Shapely-1.0.13 → Shapely-1.0.15}/tests/LineString.txt +0 -0
  73. {Shapely-1.0.13 → Shapely-1.0.15}/tests/MultiLineString.txt +0 -0
  74. {Shapely-1.0.13 → Shapely-1.0.15}/tests/MultiPoint.txt +0 -0
  75. {Shapely-1.0.13 → Shapely-1.0.15}/tests/MultiPolygon.txt +0 -0
  76. {Shapely-1.0.13 → Shapely-1.0.15}/tests/Operations.txt +0 -0
  77. {Shapely-1.0.13 → Shapely-1.0.15}/tests/Persist.txt +0 -0
  78. {Shapely-1.0.13 → Shapely-1.0.15}/tests/Point.txt +0 -0
  79. {Shapely-1.0.13 → Shapely-1.0.15}/tests/Polygon.txt +0 -0
  80. {Shapely-1.0.13 → Shapely-1.0.15}/tests/Predicates.txt +0 -0
  81. {Shapely-1.0.13 → Shapely-1.0.15}/tests/attribute-chains.txt +0 -0
  82. {Shapely-1.0.13 → Shapely-1.0.15}/tests/binascii_hex.txt +0 -0
  83. {Shapely-1.0.13 → Shapely-1.0.15}/tests/dimensions.txt +0 -0
  84. {Shapely-1.0.13 → Shapely-1.0.15}/tests/invalid_intersection.txt +0 -0
  85. {Shapely-1.0.13 → Shapely-1.0.15}/tests/polygonize.txt +0 -0
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: Shapely
3
- Version: 1.0.13
3
+ Version: 1.0.15
4
4
  Summary: Geospatial geometries, predicates, and operations
5
5
  Home-page: http://trac.gispython.org/lab/wiki/Shapely
6
6
  Author: Sean Gillies
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: Shapely
3
- Version: 1.0.13
3
+ Version: 1.0.15
4
4
  Summary: Geospatial geometries, predicates, and operations
5
5
  Home-page: http://trac.gispython.org/lab/wiki/Shapely
6
6
  Author: Sean Gillies
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',
13
+ version = '1.0.15',
14
14
  description = 'Geospatial geometries, predicates, and operations',
15
15
  license = 'BSD',
16
16
  keywords = 'geometry topology',
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
 
@@ -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 = c_int()
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
- if sys.platform == 'win32':
15
- try:
16
- local_dlls = os.path.abspath(os.__file__ + "../../../DLLs")
17
- original_path = os.environ['PATH']
18
- os.environ['PATH'] = "%s;%s" % (local_dlls, original_path)
19
- lgeos = PyDLL("geos.dll")
20
- except (ImportError, WindowsError):
21
- raise
22
- def free(m):
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, "Could not find geos_c library"
38
+ raise ImportError("Could not find geos_c library")
44
39
  lgeos = PyDLL(lib)
45
- free = CDLL(find_library('libc')).free
46
- else:
47
- # Try the major versioned name first, falling back on the unversioned name.
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 = c_int()
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, 'portuguese-brazil')
8
+ ... _ = locale.setlocale(locale.LC_ALL, 'portuguese_brazil')
9
9
  ... else:
10
10
  ... _ = locale.setlocale(locale.LC_ALL, 'pt_BR.UTF-8')
11
11
 
Binary file
Shapely-1.0.13/._setup.py DELETED
Binary file
Binary file
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