shapely 1.0.12__tar.gz → 1.0.13__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 (86) hide show
  1. Shapely-1.0.13/._CHANGES.txt +0 -0
  2. Shapely-1.0.13/._CREDITS.txt +0 -0
  3. Shapely-1.0.13/._HISTORY.txt +0 -0
  4. Shapely-1.0.13/._MANIFEST.in +0 -0
  5. Shapely-1.0.13/._README.txt +0 -0
  6. Shapely-1.0.13/._setup.py +0 -0
  7. {Shapely-1.0.12 → Shapely-1.0.13}/CHANGES.txt +5 -0
  8. {Shapely-1.0.12 → Shapely-1.0.13}/CREDITS.txt +2 -2
  9. Shapely-1.0.13/MANIFEST.in +2 -0
  10. {Shapely-1.0.12 → Shapely-1.0.13}/PKG-INFO +7 -14
  11. {Shapely-1.0.12 → Shapely-1.0.13}/README.txt +6 -13
  12. {Shapely-1.0.12 → Shapely-1.0.13}/Shapely.egg-info/PKG-INFO +7 -14
  13. {Shapely-1.0.12 → Shapely-1.0.13}/Shapely.egg-info/SOURCES.txt +2 -8
  14. {Shapely-1.0.12 → Shapely-1.0.13}/setup.py +1 -1
  15. Shapely-1.0.13/shapely/.___init__.py +0 -0
  16. Shapely-1.0.13/shapely/._ctypes_declarations.py +0 -0
  17. Shapely-1.0.13/shapely/._geos.py +0 -0
  18. Shapely-1.0.13/shapely/._iterops.py +0 -0
  19. Shapely-1.0.13/shapely/._ops.py +0 -0
  20. Shapely-1.0.13/shapely/._predicates.py +0 -0
  21. Shapely-1.0.13/shapely/._topology.py +0 -0
  22. Shapely-1.0.13/shapely/._wkb.py +0 -0
  23. Shapely-1.0.13/shapely/ctypes_declarations.py +208 -0
  24. Shapely-1.0.13/shapely/geometry/._linestring.py +0 -0
  25. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geos.py +8 -6
  26. Shapely-1.0.13/tests/._Array.txt +0 -0
  27. Shapely-1.0.13/tests/._GeoInterface.txt +0 -0
  28. Shapely-1.0.13/tests/._Persist.txt +0 -0
  29. Shapely-1.0.13/tests/._Point.txt +0 -0
  30. Shapely-1.0.13/tests/._Predicates.txt +0 -0
  31. Shapely-1.0.13/tests/._binascii_hex.txt +0 -0
  32. Shapely-1.0.13/tests/._wkt_locale.txt +0 -0
  33. {Shapely-1.0.12 → Shapely-1.0.13}/tests/wkt_locale.txt +5 -3
  34. Shapely-1.0.12/manual/style.css +0 -231
  35. Shapely-1.0.12/setup_windows.py +0 -37
  36. Shapely-1.0.12/shapely/ctypes_declarations.py +0 -204
  37. Shapely-1.0.12/tests/__init__.py +0 -2
  38. Shapely-1.0.12/tests/rungrind.dist +0 -4
  39. Shapely-1.0.12/tests/test_doctests.py +0 -35
  40. Shapely-1.0.12/tests/test_threads.py +0 -33
  41. Shapely-1.0.12/tests/valgrind-python.supp +0 -240
  42. {Shapely-1.0.12 → Shapely-1.0.13}/GEOS-C-API.txt +0 -0
  43. {Shapely-1.0.12 → Shapely-1.0.13}/HISTORY.txt +0 -0
  44. {Shapely-1.0.12 → Shapely-1.0.13}/LICENSE.txt +0 -0
  45. {Shapely-1.0.12 → Shapely-1.0.13}/Shapely.egg-info/dependency_links.txt +0 -0
  46. {Shapely-1.0.12 → Shapely-1.0.13}/Shapely.egg-info/requires.txt +0 -0
  47. {Shapely-1.0.12 → Shapely-1.0.13}/Shapely.egg-info/top_level.txt +0 -0
  48. {Shapely-1.0.12 → Shapely-1.0.13}/examples/geoms.py +0 -0
  49. {Shapely-1.0.12 → Shapely-1.0.13}/examples/world.py +0 -0
  50. {Shapely-1.0.12 → Shapely-1.0.13}/manual/manual.txt +0 -0
  51. {Shapely-1.0.12 → Shapely-1.0.13}/setup.cfg +0 -0
  52. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/__init__.py +0 -0
  53. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/__init__.py +0 -0
  54. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/base.py +0 -0
  55. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/collection.py +0 -0
  56. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/geo.py +0 -0
  57. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/linestring.py +0 -0
  58. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/multilinestring.py +0 -0
  59. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/multipoint.py +0 -0
  60. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/multipolygon.py +0 -0
  61. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/point.py +0 -0
  62. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/polygon.py +0 -0
  63. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/geometry/proxy.py +0 -0
  64. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/iterops.py +0 -0
  65. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/ops.py +0 -0
  66. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/predicates.py +0 -0
  67. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/topology.py +0 -0
  68. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/wkb.py +0 -0
  69. {Shapely-1.0.12 → Shapely-1.0.13}/shapely/wkt.py +0 -0
  70. {Shapely-1.0.12 → Shapely-1.0.13}/tests/Array.txt +0 -0
  71. {Shapely-1.0.12 → Shapely-1.0.13}/tests/GeoInterface.txt +0 -0
  72. {Shapely-1.0.12 → Shapely-1.0.13}/tests/IterOps.txt +0 -0
  73. {Shapely-1.0.12 → Shapely-1.0.13}/tests/LineString.txt +0 -0
  74. {Shapely-1.0.12 → Shapely-1.0.13}/tests/MultiLineString.txt +0 -0
  75. {Shapely-1.0.12 → Shapely-1.0.13}/tests/MultiPoint.txt +0 -0
  76. {Shapely-1.0.12 → Shapely-1.0.13}/tests/MultiPolygon.txt +0 -0
  77. {Shapely-1.0.12 → Shapely-1.0.13}/tests/Operations.txt +0 -0
  78. {Shapely-1.0.12 → Shapely-1.0.13}/tests/Persist.txt +0 -0
  79. {Shapely-1.0.12 → Shapely-1.0.13}/tests/Point.txt +0 -0
  80. {Shapely-1.0.12 → Shapely-1.0.13}/tests/Polygon.txt +0 -0
  81. {Shapely-1.0.12 → Shapely-1.0.13}/tests/Predicates.txt +0 -0
  82. {Shapely-1.0.12 → Shapely-1.0.13}/tests/attribute-chains.txt +0 -0
  83. {Shapely-1.0.12 → Shapely-1.0.13}/tests/binascii_hex.txt +0 -0
  84. {Shapely-1.0.12 → Shapely-1.0.13}/tests/dimensions.txt +0 -0
  85. {Shapely-1.0.12 → Shapely-1.0.13}/tests/invalid_intersection.txt +0 -0
  86. {Shapely-1.0.12 → Shapely-1.0.13}/tests/polygonize.txt +0 -0
Binary file
Binary file
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.13 (2009-09-29)
4
+ -------------------
5
+ - Prototype libgeos_c functions in a way that lets py2exe apps import shapely
6
+ (#189).
7
+
3
8
  1.0.12 (2009-04-09)
4
9
  -------------------
5
10
  - Fix for references held by topology and predicate descriptors.
@@ -5,5 +5,5 @@ Frédéric Junod (Camptocamp SA)
5
5
  Eric Lemoine (Camptocamp SA)
6
6
  Justin Bronn (GeoDjango) for ctypes inspiration
7
7
 
8
- Some of this work was supported by a grant from the U.S. National Endowment for
9
- the Humanities (http://www.neh.gov).
8
+ Some of this work was supported by a grant from the U.S. National Endowment
9
+ for the Humanities (http://www.neh.gov).
@@ -0,0 +1,2 @@
1
+ include *.txt
2
+ recursive-include examples *.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: Shapely
3
- Version: 1.0.12
3
+ Version: 1.0.13
4
4
  Summary: Geospatial geometries, predicates, and operations
5
5
  Home-page: http://trac.gispython.org/lab/wiki/Shapely
6
6
  Author: Sean Gillies
@@ -19,7 +19,7 @@ Description: Shapely
19
19
  * Shapely manual_
20
20
 
21
21
  Shapely requires Python 2.4+. (I've also begun to port it to Python 3.0:
22
- http://zcologia.com/news/564/shapely-for-python-3-0/.)
22
+ http://sgillies.net/blog/564/shapely-for-python-3-0/.)
23
23
 
24
24
  .. note::
25
25
  We've switched to Windows GEOS DLLs based on MinGW in versions >= 1.0.6.
@@ -27,8 +27,8 @@ Description: Shapely
27
27
 
28
28
  See also CHANGES.txt_ and HISTORY.txt_.
29
29
 
30
- .. _CHANGES.txt: http://trac.gispython.org/projects/PCL/browser/Shapely/trunk/CHANGES.txt
31
- .. _HISTORY.txt: http://trac.gispython.org/projects/PCL/browser/Shapely/trunk/HISTORY.txt
30
+ .. _CHANGES.txt: http://trac.gispython.org/lab/browser/Shapely/trunk/CHANGES.txt
31
+ .. _HISTORY.txt: http://trac.gispython.org/lab/browser/Shapely/trunk/HISTORY.txt
32
32
  .. _WorldMill: http://pypi.python.org/pypi/WorldMill
33
33
  .. _pyproj: http://pypi.python.org/pypi/pyproj
34
34
 
@@ -51,17 +51,10 @@ Description: Shapely
51
51
 
52
52
  $ sudo easy_install Shapely
53
53
 
54
- with the setup script::
54
+ or with the setup script::
55
55
 
56
56
  $ sudo python setup.py install
57
57
 
58
- or by using the development buildout on Linux, which also provides libgeos_c::
59
-
60
- $ svn co http://svn.gispython.org/svn/gispy/buildout/shapely.buildout/trunk shapely.buildout
61
- $ cd shapely.buildout
62
- $ python bootstrap.py
63
- $ ./bin/buildout
64
-
65
58
 
66
59
  Usage
67
60
  -----
@@ -124,7 +117,7 @@ Description: Shapely
124
117
  >>> tuple(shape.coords)
125
118
  ((0.0, 0.0),)
126
119
 
127
- See http://trac.gispython.org/projects/PCL/wiki/PythonGeoInterface for more
120
+ See http://trac.gispython.org/lab/wiki/PythonGeoInterface for more
128
121
  details on the interface.
129
122
 
130
123
 
@@ -148,7 +141,7 @@ Description: Shapely
148
141
 
149
142
  For current information about this project, see the wiki_.
150
143
 
151
- .. _wiki: http://trac.gispython.org/projects/PCL/wiki/Shapely
144
+ .. _wiki: http://trac.gispython.org/lab/wiki/Shapely
152
145
  .. _manual: http://gispython.org/shapely/manual.html
153
146
 
154
147
  If you have questions, please consider joining our community list:
@@ -11,7 +11,7 @@ to other packages like WorldMill_ and pyproj_. For more information, see:
11
11
  * Shapely manual_
12
12
 
13
13
  Shapely requires Python 2.4+. (I've also begun to port it to Python 3.0:
14
- http://zcologia.com/news/564/shapely-for-python-3-0/.)
14
+ http://sgillies.net/blog/564/shapely-for-python-3-0/.)
15
15
 
16
16
  .. note::
17
17
  We've switched to Windows GEOS DLLs based on MinGW in versions >= 1.0.6.
@@ -19,8 +19,8 @@ http://zcologia.com/news/564/shapely-for-python-3-0/.)
19
19
 
20
20
  See also CHANGES.txt_ and HISTORY.txt_.
21
21
 
22
- .. _CHANGES.txt: http://trac.gispython.org/projects/PCL/browser/Shapely/trunk/CHANGES.txt
23
- .. _HISTORY.txt: http://trac.gispython.org/projects/PCL/browser/Shapely/trunk/HISTORY.txt
22
+ .. _CHANGES.txt: http://trac.gispython.org/lab/browser/Shapely/trunk/CHANGES.txt
23
+ .. _HISTORY.txt: http://trac.gispython.org/lab/browser/Shapely/trunk/HISTORY.txt
24
24
  .. _WorldMill: http://pypi.python.org/pypi/WorldMill
25
25
  .. _pyproj: http://pypi.python.org/pypi/pyproj
26
26
 
@@ -43,17 +43,10 @@ is on the system library path, and install from the Python package index::
43
43
 
44
44
  $ sudo easy_install Shapely
45
45
 
46
- with the setup script::
46
+ or with the setup script::
47
47
 
48
48
  $ sudo python setup.py install
49
49
 
50
- or by using the development buildout on Linux, which also provides libgeos_c::
51
-
52
- $ svn co http://svn.gispython.org/svn/gispy/buildout/shapely.buildout/trunk shapely.buildout
53
- $ cd shapely.buildout
54
- $ python bootstrap.py
55
- $ ./bin/buildout
56
-
57
50
 
58
51
  Usage
59
52
  -----
@@ -116,7 +109,7 @@ geometry with the asShape factory::
116
109
  >>> tuple(shape.coords)
117
110
  ((0.0, 0.0),)
118
111
 
119
- See http://trac.gispython.org/projects/PCL/wiki/PythonGeoInterface for more
112
+ See http://trac.gispython.org/lab/wiki/PythonGeoInterface for more
120
113
  details on the interface.
121
114
 
122
115
 
@@ -140,7 +133,7 @@ Support
140
133
 
141
134
  For current information about this project, see the wiki_.
142
135
 
143
- .. _wiki: http://trac.gispython.org/projects/PCL/wiki/Shapely
136
+ .. _wiki: http://trac.gispython.org/lab/wiki/Shapely
144
137
  .. _manual: http://gispython.org/shapely/manual.html
145
138
 
146
139
  If you have questions, please consider joining our community list:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: Shapely
3
- Version: 1.0.12
3
+ Version: 1.0.13
4
4
  Summary: Geospatial geometries, predicates, and operations
5
5
  Home-page: http://trac.gispython.org/lab/wiki/Shapely
6
6
  Author: Sean Gillies
@@ -19,7 +19,7 @@ Description: Shapely
19
19
  * Shapely manual_
20
20
 
21
21
  Shapely requires Python 2.4+. (I've also begun to port it to Python 3.0:
22
- http://zcologia.com/news/564/shapely-for-python-3-0/.)
22
+ http://sgillies.net/blog/564/shapely-for-python-3-0/.)
23
23
 
24
24
  .. note::
25
25
  We've switched to Windows GEOS DLLs based on MinGW in versions >= 1.0.6.
@@ -27,8 +27,8 @@ Description: Shapely
27
27
 
28
28
  See also CHANGES.txt_ and HISTORY.txt_.
29
29
 
30
- .. _CHANGES.txt: http://trac.gispython.org/projects/PCL/browser/Shapely/trunk/CHANGES.txt
31
- .. _HISTORY.txt: http://trac.gispython.org/projects/PCL/browser/Shapely/trunk/HISTORY.txt
30
+ .. _CHANGES.txt: http://trac.gispython.org/lab/browser/Shapely/trunk/CHANGES.txt
31
+ .. _HISTORY.txt: http://trac.gispython.org/lab/browser/Shapely/trunk/HISTORY.txt
32
32
  .. _WorldMill: http://pypi.python.org/pypi/WorldMill
33
33
  .. _pyproj: http://pypi.python.org/pypi/pyproj
34
34
 
@@ -51,17 +51,10 @@ Description: Shapely
51
51
 
52
52
  $ sudo easy_install Shapely
53
53
 
54
- with the setup script::
54
+ or with the setup script::
55
55
 
56
56
  $ sudo python setup.py install
57
57
 
58
- or by using the development buildout on Linux, which also provides libgeos_c::
59
-
60
- $ svn co http://svn.gispython.org/svn/gispy/buildout/shapely.buildout/trunk shapely.buildout
61
- $ cd shapely.buildout
62
- $ python bootstrap.py
63
- $ ./bin/buildout
64
-
65
58
 
66
59
  Usage
67
60
  -----
@@ -124,7 +117,7 @@ Description: Shapely
124
117
  >>> tuple(shape.coords)
125
118
  ((0.0, 0.0),)
126
119
 
127
- See http://trac.gispython.org/projects/PCL/wiki/PythonGeoInterface for more
120
+ See http://trac.gispython.org/lab/wiki/PythonGeoInterface for more
128
121
  details on the interface.
129
122
 
130
123
 
@@ -148,7 +141,7 @@ Description: Shapely
148
141
 
149
142
  For current information about this project, see the wiki_.
150
143
 
151
- .. _wiki: http://trac.gispython.org/projects/PCL/wiki/Shapely
144
+ .. _wiki: http://trac.gispython.org/lab/wiki/Shapely
152
145
  .. _manual: http://gispython.org/shapely/manual.html
153
146
 
154
147
  If you have questions, please consider joining our community list:
@@ -3,9 +3,9 @@ CREDITS.txt
3
3
  GEOS-C-API.txt
4
4
  HISTORY.txt
5
5
  LICENSE.txt
6
+ MANIFEST.in
6
7
  README.txt
7
8
  setup.py
8
- setup_windows.py
9
9
  Shapely.egg-info/PKG-INFO
10
10
  Shapely.egg-info/SOURCES.txt
11
11
  Shapely.egg-info/dependency_links.txt
@@ -14,7 +14,6 @@ Shapely.egg-info/top_level.txt
14
14
  examples/geoms.py
15
15
  examples/world.py
16
16
  manual/manual.txt
17
- manual/style.css
18
17
  shapely/__init__.py
19
18
  shapely/ctypes_declarations.py
20
19
  shapely/geos.py
@@ -47,14 +46,9 @@ tests/Persist.txt
47
46
  tests/Point.txt
48
47
  tests/Polygon.txt
49
48
  tests/Predicates.txt
50
- tests/__init__.py
51
49
  tests/attribute-chains.txt
52
50
  tests/binascii_hex.txt
53
51
  tests/dimensions.txt
54
52
  tests/invalid_intersection.txt
55
53
  tests/polygonize.txt
56
- tests/rungrind.dist
57
- tests/test_doctests.py
58
- tests/test_threads.py
59
- tests/valgrind-python.supp
60
- tests/wkt_locale.txt
54
+ tests/wkt_locale.txt
@@ -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.12',
13
+ version = '1.0.13',
14
14
  description = 'Geospatial geometries, predicates, and operations',
15
15
  license = 'BSD',
16
16
  keywords = 'geometry topology',
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,208 @@
1
+ # Prototyping of libgeos_c functions, now using a function written by
2
+ # `tartley`: http://trac.gispython.org/lab/ticket/189
3
+
4
+ import ctypes
5
+
6
+ def prototype(lgeos):
7
+
8
+ lgeos.initGEOS.restype = None
9
+
10
+ lgeos.finishGEOS.restype = None
11
+
12
+ lgeos.GEOSversion.restype = ctypes.c_char_p
13
+
14
+ lgeos.GEOSGeomFromWKT.restype = ctypes.c_void_p
15
+ lgeos.GEOSGeomFromWKT.argtypes = [ctypes.c_char_p]
16
+
17
+ lgeos.GEOSGeomToWKT.restype = ctypes.c_char_p
18
+ lgeos.GEOSGeomToWKT.argtypes = [ctypes.c_void_p]
19
+
20
+ lgeos.GEOS_setWKBOutputDims.restype = ctypes.c_int
21
+ lgeos.GEOS_setWKBOutputDims.argtypes = [ctypes.c_int]
22
+
23
+ lgeos.GEOSGeomFromWKB_buf.restype = ctypes.c_void_p
24
+ lgeos.GEOSGeomFromWKB_buf.argtypes = [ctypes.c_void_p, ctypes.c_size_t]
25
+
26
+ lgeos.GEOSCoordSeq_create.restype = ctypes.c_void_p
27
+ lgeos.GEOSCoordSeq_create.argtypes = [ctypes.c_uint, ctypes.c_uint]
28
+
29
+ lgeos.GEOSCoordSeq_clone.restype = ctypes.c_void_p
30
+ lgeos.GEOSCoordSeq_clone.argtypes = [ctypes.c_void_p]
31
+
32
+ lgeos.GEOSCoordSeq_destroy.restype = None
33
+ lgeos.GEOSCoordSeq_destroy.argtypes = [ctypes.c_void_p]
34
+
35
+ lgeos.GEOSCoordSeq_setX.restype = ctypes.c_int
36
+ lgeos.GEOSCoordSeq_setX.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_double]
37
+
38
+ lgeos.GEOSCoordSeq_setY.restype = ctypes.c_int
39
+ lgeos.GEOSCoordSeq_setY.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_double]
40
+
41
+ lgeos.GEOSCoordSeq_setZ.restype = ctypes.c_int
42
+ lgeos.GEOSCoordSeq_setZ.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_double]
43
+
44
+ lgeos.GEOSCoordSeq_setOrdinate.restype = ctypes.c_int
45
+ lgeos.GEOSCoordSeq_setOrdinate.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ctypes.c_double]
46
+
47
+ lgeos.GEOSCoordSeq_getX.restype = ctypes.c_int
48
+ lgeos.GEOSCoordSeq_getX.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_void_p]
49
+
50
+ lgeos.GEOSCoordSeq_getY.restype = ctypes.c_int
51
+ lgeos.GEOSCoordSeq_getY.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_void_p]
52
+
53
+ lgeos.GEOSCoordSeq_getZ.restype = ctypes.c_int
54
+ lgeos.GEOSCoordSeq_getZ.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_void_p]
55
+
56
+ lgeos.GEOSCoordSeq_getSize.restype = ctypes.c_int
57
+ lgeos.GEOSCoordSeq_getSize.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
58
+
59
+ lgeos.GEOSCoordSeq_getDimensions.restype = ctypes.c_int
60
+ lgeos.GEOSCoordSeq_getDimensions.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
61
+
62
+ lgeos.GEOSGeom_createPoint.restype = ctypes.c_void_p
63
+ lgeos.GEOSGeom_createPoint.argtypes = [ctypes.c_void_p]
64
+
65
+ lgeos.GEOSGeom_createLinearRing.restype = ctypes.c_void_p
66
+ lgeos.GEOSGeom_createLinearRing.argtypes = [ctypes.c_void_p]
67
+
68
+ lgeos.GEOSGeom_createLineString.restype = ctypes.c_void_p
69
+ lgeos.GEOSGeom_createLineString.argtypes = [ctypes.c_void_p]
70
+
71
+ lgeos.GEOSGeom_createPolygon.restype = ctypes.c_void_p
72
+ lgeos.GEOSGeom_createPolygon.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint]
73
+
74
+ lgeos.GEOSGeom_createCollection.restype = ctypes.c_void_p
75
+ lgeos.GEOSGeom_createCollection.argtypes = [ctypes.c_int, ctypes.c_void_p, ctypes.c_uint]
76
+
77
+ lgeos.GEOSGeom_clone.restype = ctypes.c_void_p
78
+ lgeos.GEOSGeom_clone.argtypes = [ctypes.c_void_p]
79
+
80
+ lgeos.GEOSGeom_destroy.restype = None
81
+ lgeos.GEOSGeom_destroy.argtypes = [ctypes.c_void_p]
82
+
83
+ lgeos.GEOSEnvelope.restype = ctypes.c_void_p
84
+ lgeos.GEOSEnvelope.argtypes = [ctypes.c_void_p]
85
+
86
+ lgeos.GEOSIntersection.restype = ctypes.c_void_p
87
+ lgeos.GEOSIntersection.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
88
+
89
+ lgeos.GEOSBuffer.restype = ctypes.c_void_p
90
+ lgeos.GEOSBuffer.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.c_int]
91
+
92
+ lgeos.GEOSConvexHull.restype = ctypes.c_void_p
93
+ lgeos.GEOSConvexHull.argtypes = [ctypes.c_void_p]
94
+
95
+ lgeos.GEOSDifference.restype = ctypes.c_void_p
96
+ lgeos.GEOSDifference.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
97
+
98
+ lgeos.GEOSSymDifference.restype = ctypes.c_void_p
99
+ lgeos.GEOSSymDifference.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
100
+
101
+ lgeos.GEOSBoundary.restype = ctypes.c_void_p
102
+ lgeos.GEOSBoundary.argtypes = [ctypes.c_void_p]
103
+
104
+ lgeos.GEOSUnion.restype = ctypes.c_void_p
105
+ lgeos.GEOSUnion.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
106
+
107
+ lgeos.GEOSPointOnSurface.restype = ctypes.c_void_p
108
+ lgeos.GEOSPointOnSurface.argtypes = [ctypes.c_void_p]
109
+
110
+ lgeos.GEOSGetCentroid.restype = ctypes.c_void_p
111
+ lgeos.GEOSGetCentroid.argtypes = [ctypes.c_void_p]
112
+
113
+ lgeos.GEOSRelate.restype = ctypes.c_char_p
114
+ lgeos.GEOSRelate.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
115
+
116
+ lgeos.GEOSPolygonize.restype = ctypes.c_void_p
117
+ lgeos.GEOSPolygonize.argtypes = [ctypes.c_void_p, ctypes.c_uint]
118
+
119
+ lgeos.GEOSLineMerge.restype = ctypes.c_void_p
120
+ lgeos.GEOSLineMerge.argtypes = [ctypes.c_void_p]
121
+
122
+ lgeos.GEOSRelatePattern.restype = ctypes.c_char
123
+ lgeos.GEOSRelatePattern.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_char_p]
124
+
125
+ lgeos.GEOSDisjoint.restype = ctypes.c_int
126
+ lgeos.GEOSDisjoint.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
127
+
128
+ lgeos.GEOSTouches.restype = ctypes.c_int
129
+ lgeos.GEOSTouches.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
130
+
131
+ lgeos.GEOSIntersects.restype = ctypes.c_int
132
+ lgeos.GEOSIntersects.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
133
+
134
+ lgeos.GEOSCrosses.restype = ctypes.c_int
135
+ lgeos.GEOSCrosses.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
136
+
137
+ lgeos.GEOSWithin.restype = ctypes.c_int
138
+ lgeos.GEOSWithin.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
139
+
140
+ lgeos.GEOSContains.restype = ctypes.c_int
141
+ lgeos.GEOSContains.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
142
+
143
+ lgeos.GEOSOverlaps.restype = ctypes.c_int
144
+ lgeos.GEOSOverlaps.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
145
+
146
+ lgeos.GEOSEquals.restype = ctypes.c_int
147
+ lgeos.GEOSEquals.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
148
+
149
+ lgeos.GEOSisEmpty.restype = ctypes.c_int
150
+ lgeos.GEOSisEmpty.argtypes = [ctypes.c_void_p]
151
+
152
+ lgeos.GEOSisValid.restype = ctypes.c_int
153
+ lgeos.GEOSisValid.argtypes = [ctypes.c_void_p]
154
+
155
+ lgeos.GEOSisSimple.restype = ctypes.c_int
156
+ lgeos.GEOSisSimple.argtypes = [ctypes.c_void_p]
157
+
158
+ lgeos.GEOSisRing.restype = ctypes.c_int
159
+ lgeos.GEOSisRing.argtypes = [ctypes.c_void_p]
160
+
161
+ lgeos.GEOSHasZ.restype = ctypes.c_int
162
+ lgeos.GEOSHasZ.argtypes = [ctypes.c_void_p]
163
+
164
+ lgeos.GEOSGeomType.restype = ctypes.c_char_p
165
+ lgeos.GEOSGeomType.argtypes = [ctypes.c_void_p]
166
+
167
+ lgeos.GEOSGeomTypeId.restype = ctypes.c_int
168
+ lgeos.GEOSGeomTypeId.argtypes = [ctypes.c_void_p]
169
+
170
+ lgeos.GEOSGetSRID.restype = ctypes.c_int
171
+ lgeos.GEOSGetSRID.argtypes = [ctypes.c_void_p]
172
+
173
+ lgeos.GEOSSetSRID.restype = None
174
+ lgeos.GEOSSetSRID.argtypes = [ctypes.c_void_p, ctypes.c_int]
175
+
176
+ lgeos.GEOSGetNumGeometries.restype = ctypes.c_int
177
+ lgeos.GEOSGetNumGeometries.argtypes = [ctypes.c_void_p]
178
+
179
+ lgeos.GEOSGetGeometryN.restype = ctypes.c_void_p
180
+ lgeos.GEOSGetGeometryN.argtypes = [ctypes.c_void_p, ctypes.c_int]
181
+
182
+ lgeos.GEOSGetNumInteriorRings.restype = ctypes.c_int
183
+ lgeos.GEOSGetNumInteriorRings.argtypes = [ctypes.c_void_p]
184
+
185
+ lgeos.GEOSGetInteriorRingN.restype = ctypes.c_void_p
186
+ lgeos.GEOSGetInteriorRingN.argtypes = [ctypes.c_void_p, ctypes.c_int]
187
+
188
+ lgeos.GEOSGetExteriorRing.restype = ctypes.c_void_p
189
+ lgeos.GEOSGetExteriorRing.argtypes = [ctypes.c_void_p]
190
+
191
+ lgeos.GEOSGetNumCoordinates.restype = ctypes.c_int
192
+ lgeos.GEOSGetNumCoordinates.argtypes = [ctypes.c_void_p]
193
+
194
+ lgeos.GEOSGeom_getCoordSeq.restype = ctypes.c_void_p
195
+ lgeos.GEOSGeom_getCoordSeq.argtypes = [ctypes.c_void_p]
196
+
197
+ lgeos.GEOSGeom_getDimensions.restype = ctypes.c_int
198
+ lgeos.GEOSGeom_getDimensions.argtypes = [ctypes.c_void_p]
199
+
200
+ lgeos.GEOSArea.restype = ctypes.c_double
201
+ lgeos.GEOSArea.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
202
+
203
+ lgeos.GEOSLength.restype = ctypes.c_int
204
+ lgeos.GEOSLength.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
205
+
206
+ lgeos.GEOSDistance.restype = ctypes.c_int
207
+ lgeos.GEOSDistance.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
208
+
@@ -3,10 +3,13 @@ Exports the libgeos_c shared lib, GEOS-specific exceptions, and utilities.
3
3
  """
4
4
 
5
5
  import atexit
6
- import os
7
- import sys
8
6
  from ctypes import cdll, CDLL, PyDLL, CFUNCTYPE, c_char_p
9
7
  from ctypes.util import find_library
8
+ import os
9
+ import sys
10
+
11
+ from ctypes_declarations import prototype
12
+
10
13
 
11
14
  if sys.platform == 'win32':
12
15
  try:
@@ -50,15 +53,14 @@ else:
50
53
  raise
51
54
  free = CDLL('libc.so.6').free
52
55
 
56
+ # Prototype the libgeos_c functions using new code from `tarley` in
57
+ # http://trac.gispython.org/lab/ticket/189
58
+ prototype(lgeos)
53
59
 
54
- # Load the ctypes restype and argtype declarations for geos_c functions.
55
- _here = os.path.abspath(os.path.dirname(__file__))
56
- execfile(os.path.join(_here, 'ctypes_declarations.py'))
57
60
 
58
61
  class allocated_c_char_p(c_char_p):
59
62
  pass
60
63
 
61
-
62
64
  # Exceptions
63
65
 
64
66
  class ReadingError(Exception):
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -3,9 +3,11 @@ Test locale independence of WKT
3
3
 
4
4
  Set locale to one that uses a comma as decimal seperator`
5
5
 
6
- >>> import locale
7
- >>> locale.setlocale(locale.LC_ALL, 'pt_BR.UTF-8')
8
- 'pt_BR.UTF-8'
6
+ >>> import locale, sys
7
+ >>> if sys.platform == 'win32':
8
+ ... _ = locale.setlocale(locale.LC_ALL, 'portuguese-brazil')
9
+ ... else:
10
+ ... _ = locale.setlocale(locale.LC_ALL, 'pt_BR.UTF-8')
9
11
 
10
12
  Test reading and writing`
11
13