shapely 1.0.7__tar.gz → 1.0.11__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.7 → Shapely-1.0.11}/CHANGES.txt +18 -0
- Shapely-1.0.11/GEOS-C-API.txt +55 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/PKG-INFO +1 -1
- {Shapely-1.0.7 → Shapely-1.0.11}/Shapely.egg-info/PKG-INFO +1 -1
- {Shapely-1.0.7 → Shapely-1.0.11}/Shapely.egg-info/SOURCES.txt +2 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/setup.py +1 -1
- {Shapely-1.0.7 → Shapely-1.0.11}/setup_windows.py +1 -1
- Shapely-1.0.11/shapely/ctypes_declarations.py +204 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geos.py +12 -9
- {Shapely-1.0.7 → Shapely-1.0.11}/CREDITS.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/HISTORY.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/LICENSE.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/README.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/Shapely.egg-info/requires.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/examples/geoms.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/examples/world.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/manual/manual.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/manual/style.css +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/setup.cfg +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/__init__.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/__init__.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/base.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/collection.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/geo.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/linestring.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/multilinestring.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/multipoint.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/multipolygon.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/point.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/polygon.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/geometry/proxy.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/iterops.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/kml.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/ops.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/predicates.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/topology.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/wkb.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/shapely/wkt.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/Array.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/GeoInterface.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/IterOps.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/LineString.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/MultiLineString.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/MultiPoint.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/MultiPolygon.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/Operations.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/Persist.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/Point.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/Polygon.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/Predicates.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/__init__.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/attribute-chains.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/binascii_hex.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/dimensions.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/invalid_intersection.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/polygonize.txt +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/rungrind.dist +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/test_doctests.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/test_threads.py +0 -0
- {Shapely-1.0.7 → Shapely-1.0.11}/tests/valgrind-python.supp +0 -0
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
All tickets are children of http://trac.gispython.org/lab/ticket.
|
|
2
2
|
|
|
3
|
+
1.0.11 (2008-11-20)
|
|
4
|
+
-------------------
|
|
5
|
+
- Work around bug in GEOS 2.2.3, GEOSCoordSeq_getOrdinate not exported properly
|
|
6
|
+
(#178).
|
|
7
|
+
|
|
8
|
+
1.0.10 (2008-11-17)
|
|
9
|
+
-------------------
|
|
10
|
+
- Fixed compatibility with GEOS 2.2.3 that was broken in 1.0.8 release (#176).
|
|
11
|
+
|
|
12
|
+
1.0.9 (2008-11-16)
|
|
13
|
+
------------------
|
|
14
|
+
- Find and load MacPorts libgeos.
|
|
15
|
+
|
|
16
|
+
1.0.8 (2008-11-01)
|
|
17
|
+
------------------
|
|
18
|
+
- Fill out GEOS function result and argument types to prevent faults on a
|
|
19
|
+
64-bit arch.
|
|
20
|
+
|
|
3
21
|
1.0.7 (2008-08-22)
|
|
4
22
|
------------------
|
|
5
23
|
- Polygon rings now have the same dimensions as parent (#168).
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Ctypes declarations for functions present in GEOS C API 1.4, but not present in
|
|
2
|
+
1.3, are listed below:
|
|
3
|
+
|
|
4
|
+
lgeos.GEOS_getWKBOutputDims.restype = ctypes.c_int
|
|
5
|
+
lgeos.GEOS_getWKBByteOrder.restype = ctypes.c_int
|
|
6
|
+
lgeos.GEOS_setWKBByteOrder.restype = ctypes.c_int
|
|
7
|
+
lgeos.GEOS_setWKBByteOrder.argtypes = [ctypes.c_int]
|
|
8
|
+
lgeos.GEOSGeomFromHEX_buf.restype = ctypes.c_void_p
|
|
9
|
+
lgeos.GEOSGeomFromHEX_buf.argtypes = [ctypes.c_void_p, ctypes.c_size_t]
|
|
10
|
+
lgeos.GEOSSimplify.restype = ctypes.c_void_p
|
|
11
|
+
lgeos.GEOSSimplify.argtypes = [ctypes.c_void_p, ctypes.c_double]
|
|
12
|
+
lgeos.GEOSTopologyPreserveSimplify.restype = ctypes.c_void_p
|
|
13
|
+
lgeos.GEOSTopologyPreserveSimplify.argtypes = [ctypes.c_void_p, ctypes.c_double]
|
|
14
|
+
lgeos.GEOSEqualsExact.restype = ctypes.c_int
|
|
15
|
+
lgeos.GEOSEqualsExact.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_double]
|
|
16
|
+
lgeos.GEOSNormalize.restype = ctypes.c_int
|
|
17
|
+
lgeos.GEOSNormalize.argtypes = [ctypes.c_void_p]
|
|
18
|
+
lgeos.GEOSWKTReader_create.restype = ctypes.c_void_p
|
|
19
|
+
lgeos.GEOSWKTReader_destroy.restype = None
|
|
20
|
+
lgeos.GEOSWKTReader_destroy.argtypes = [ctypes.c_void_p]
|
|
21
|
+
lgeos.GEOSWKTReader_read.restype = ctypes.c_void_p
|
|
22
|
+
lgeos.GEOSWKTReader_read.argtypes = [ctypes.c_void_p, ctypes.c_char_p]
|
|
23
|
+
lgeos.GEOSWKTWriter_create.restype = ctypes.c_void_p
|
|
24
|
+
lgeos.GEOSWKTWriter_destroy.restype = None
|
|
25
|
+
lgeos.GEOSWKTWriter_destroy.argtypes = [ctypes.c_void_p]
|
|
26
|
+
lgeos.GEOSWKTWriter_write.restype = ctypes.c_char_p
|
|
27
|
+
lgeos.GEOSWKTWriter_write.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
28
|
+
lgeos.GEOSWKBReader_create.restype = ctypes.c_void_p
|
|
29
|
+
lgeos.GEOSWKBReader_destroy.restype = None
|
|
30
|
+
lgeos.GEOSWKBReader_destroy.argtypes = [ctypes.c_void_p]
|
|
31
|
+
lgeos.GEOSWKBReader_read.restype = ctypes.c_void_p
|
|
32
|
+
lgeos.GEOSWKBReader_read.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_size_t]
|
|
33
|
+
lgeos.GEOSWKBReader_readHEX.restype = ctypes.c_void_p
|
|
34
|
+
lgeos.GEOSWKBReader_readHEX.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_size_t]
|
|
35
|
+
lgeos.GEOSWKBWriter_create.restype = ctypes.c_void_p
|
|
36
|
+
lgeos.GEOSWKBWriter_destroy.restype = None
|
|
37
|
+
lgeos.GEOSWKBWriter_destroy.argtypes = [ctypes.c_void_p]
|
|
38
|
+
lgeos.GEOSWKBWriter_getOutputDimension.restype = ctypes.c_int
|
|
39
|
+
lgeos.GEOSWKBWriter_getOutputDimension.argtypes = [ctypes.c_void_p]
|
|
40
|
+
lgeos.GEOSWKBWriter_setOutputDimension.restype = None
|
|
41
|
+
lgeos.GEOSWKBWriter_setOutputDimension.argtypes = [ctypes.c_void_p, ctypes.c_int]
|
|
42
|
+
lgeos.GEOSWKBWriter_getByteOrder.restype = ctypes.c_int
|
|
43
|
+
lgeos.GEOSWKBWriter_getByteOrder.argtypes = [ctypes.c_void_p]
|
|
44
|
+
lgeos.GEOSWKBWriter_setByteOrder.restype = None
|
|
45
|
+
lgeos.GEOSWKBWriter_setByteOrder.argtypes = [ctypes.c_void_p, ctypes.c_int]
|
|
46
|
+
lgeos.GEOSWKBWriter_getIncludeSRID.restype = ctypes.c_char
|
|
47
|
+
lgeos.GEOSWKBWriter_getIncludeSRID.argtypes = [ctypes.c_void_p]
|
|
48
|
+
lgeos.GEOSWKBWriter_setIncludeSRID.restype = None
|
|
49
|
+
lgeos.GEOSWKBWriter_setIncludeSRID.argtypes = [ctypes.c_void_p, ctypes.c_char]
|
|
50
|
+
|
|
51
|
+
Furthermore, the following unneeded declarations are removed to avoid problems
|
|
52
|
+
with Debian's 2.2.3 package:
|
|
53
|
+
|
|
54
|
+
lgeos.GEOSCoordSeq_getOrdinate.restype = ctypes.c_int
|
|
55
|
+
lgeos.GEOSCoordSeq_getOrdinate.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ctypes.c_void_p]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
CHANGES.txt
|
|
2
2
|
CREDITS.txt
|
|
3
|
+
GEOS-C-API.txt
|
|
3
4
|
HISTORY.txt
|
|
4
5
|
LICENSE.txt
|
|
5
6
|
README.txt
|
|
@@ -15,6 +16,7 @@ examples/world.py
|
|
|
15
16
|
manual/manual.txt
|
|
16
17
|
manual/style.css
|
|
17
18
|
shapely/__init__.py
|
|
19
|
+
shapely/ctypes_declarations.py
|
|
18
20
|
shapely/geos.py
|
|
19
21
|
shapely/iterops.py
|
|
20
22
|
shapely/kml.py
|
|
@@ -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.11',
|
|
14
14
|
description = 'Geospatial geometries, predicates, and operations',
|
|
15
15
|
license = 'BSD',
|
|
16
16
|
keywords = 'geometry topology',
|
|
@@ -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.11',
|
|
14
14
|
description = 'Geospatial geometries, predicates, and operations',
|
|
15
15
|
license = 'BSD',
|
|
16
16
|
keywords = 'geometry topology',
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import ctypes
|
|
2
|
+
|
|
3
|
+
lgeos = lgeos # reduce pyflakes complaints
|
|
4
|
+
|
|
5
|
+
lgeos.initGEOS.restype = None
|
|
6
|
+
|
|
7
|
+
lgeos.finishGEOS.restype = None
|
|
8
|
+
|
|
9
|
+
lgeos.GEOSversion.restype = ctypes.c_char_p
|
|
10
|
+
|
|
11
|
+
lgeos.GEOSGeomFromWKT.restype = ctypes.c_void_p
|
|
12
|
+
lgeos.GEOSGeomFromWKT.argtypes = [ctypes.c_char_p]
|
|
13
|
+
|
|
14
|
+
lgeos.GEOSGeomToWKT.restype = ctypes.c_char_p
|
|
15
|
+
lgeos.GEOSGeomToWKT.argtypes = [ctypes.c_void_p]
|
|
16
|
+
|
|
17
|
+
lgeos.GEOS_setWKBOutputDims.restype = ctypes.c_int
|
|
18
|
+
lgeos.GEOS_setWKBOutputDims.argtypes = [ctypes.c_int]
|
|
19
|
+
|
|
20
|
+
lgeos.GEOSGeomFromWKB_buf.restype = ctypes.c_void_p
|
|
21
|
+
lgeos.GEOSGeomFromWKB_buf.argtypes = [ctypes.c_void_p, ctypes.c_size_t]
|
|
22
|
+
|
|
23
|
+
lgeos.GEOSCoordSeq_create.restype = ctypes.c_void_p
|
|
24
|
+
lgeos.GEOSCoordSeq_create.argtypes = [ctypes.c_uint, ctypes.c_uint]
|
|
25
|
+
|
|
26
|
+
lgeos.GEOSCoordSeq_clone.restype = ctypes.c_void_p
|
|
27
|
+
lgeos.GEOSCoordSeq_clone.argtypes = [ctypes.c_void_p]
|
|
28
|
+
|
|
29
|
+
lgeos.GEOSCoordSeq_destroy.restype = None
|
|
30
|
+
lgeos.GEOSCoordSeq_destroy.argtypes = [ctypes.c_void_p]
|
|
31
|
+
|
|
32
|
+
lgeos.GEOSCoordSeq_setX.restype = ctypes.c_int
|
|
33
|
+
lgeos.GEOSCoordSeq_setX.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_double]
|
|
34
|
+
|
|
35
|
+
lgeos.GEOSCoordSeq_setY.restype = ctypes.c_int
|
|
36
|
+
lgeos.GEOSCoordSeq_setY.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_double]
|
|
37
|
+
|
|
38
|
+
lgeos.GEOSCoordSeq_setZ.restype = ctypes.c_int
|
|
39
|
+
lgeos.GEOSCoordSeq_setZ.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_double]
|
|
40
|
+
|
|
41
|
+
lgeos.GEOSCoordSeq_setOrdinate.restype = ctypes.c_int
|
|
42
|
+
lgeos.GEOSCoordSeq_setOrdinate.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ctypes.c_double]
|
|
43
|
+
|
|
44
|
+
lgeos.GEOSCoordSeq_getX.restype = ctypes.c_int
|
|
45
|
+
lgeos.GEOSCoordSeq_getX.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_void_p]
|
|
46
|
+
|
|
47
|
+
lgeos.GEOSCoordSeq_getY.restype = ctypes.c_int
|
|
48
|
+
lgeos.GEOSCoordSeq_getY.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_void_p]
|
|
49
|
+
|
|
50
|
+
lgeos.GEOSCoordSeq_getZ.restype = ctypes.c_int
|
|
51
|
+
lgeos.GEOSCoordSeq_getZ.argtypes = [ctypes.c_void_p, ctypes.c_uint, ctypes.c_void_p]
|
|
52
|
+
|
|
53
|
+
lgeos.GEOSCoordSeq_getSize.restype = ctypes.c_int
|
|
54
|
+
lgeos.GEOSCoordSeq_getSize.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
55
|
+
|
|
56
|
+
lgeos.GEOSCoordSeq_getDimensions.restype = ctypes.c_int
|
|
57
|
+
lgeos.GEOSCoordSeq_getDimensions.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
58
|
+
|
|
59
|
+
lgeos.GEOSGeom_createPoint.restype = ctypes.c_void_p
|
|
60
|
+
lgeos.GEOSGeom_createPoint.argtypes = [ctypes.c_void_p]
|
|
61
|
+
|
|
62
|
+
lgeos.GEOSGeom_createLinearRing.restype = ctypes.c_void_p
|
|
63
|
+
lgeos.GEOSGeom_createLinearRing.argtypes = [ctypes.c_void_p]
|
|
64
|
+
|
|
65
|
+
lgeos.GEOSGeom_createLineString.restype = ctypes.c_void_p
|
|
66
|
+
lgeos.GEOSGeom_createLineString.argtypes = [ctypes.c_void_p]
|
|
67
|
+
|
|
68
|
+
lgeos.GEOSGeom_createPolygon.restype = ctypes.c_void_p
|
|
69
|
+
lgeos.GEOSGeom_createPolygon.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint]
|
|
70
|
+
|
|
71
|
+
lgeos.GEOSGeom_createCollection.restype = ctypes.c_void_p
|
|
72
|
+
lgeos.GEOSGeom_createCollection.argtypes = [ctypes.c_int, ctypes.c_void_p, ctypes.c_uint]
|
|
73
|
+
|
|
74
|
+
lgeos.GEOSGeom_clone.restype = ctypes.c_void_p
|
|
75
|
+
lgeos.GEOSGeom_clone.argtypes = [ctypes.c_void_p]
|
|
76
|
+
|
|
77
|
+
lgeos.GEOSGeom_destroy.restype = None
|
|
78
|
+
lgeos.GEOSGeom_destroy.argtypes = [ctypes.c_void_p]
|
|
79
|
+
|
|
80
|
+
lgeos.GEOSEnvelope.restype = ctypes.c_void_p
|
|
81
|
+
lgeos.GEOSEnvelope.argtypes = [ctypes.c_void_p]
|
|
82
|
+
|
|
83
|
+
lgeos.GEOSIntersection.restype = ctypes.c_void_p
|
|
84
|
+
lgeos.GEOSIntersection.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
85
|
+
|
|
86
|
+
lgeos.GEOSBuffer.restype = ctypes.c_void_p
|
|
87
|
+
lgeos.GEOSBuffer.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.c_int]
|
|
88
|
+
|
|
89
|
+
lgeos.GEOSConvexHull.restype = ctypes.c_void_p
|
|
90
|
+
lgeos.GEOSConvexHull.argtypes = [ctypes.c_void_p]
|
|
91
|
+
|
|
92
|
+
lgeos.GEOSDifference.restype = ctypes.c_void_p
|
|
93
|
+
lgeos.GEOSDifference.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
94
|
+
|
|
95
|
+
lgeos.GEOSSymDifference.restype = ctypes.c_void_p
|
|
96
|
+
lgeos.GEOSSymDifference.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
97
|
+
|
|
98
|
+
lgeos.GEOSBoundary.restype = ctypes.c_void_p
|
|
99
|
+
lgeos.GEOSBoundary.argtypes = [ctypes.c_void_p]
|
|
100
|
+
|
|
101
|
+
lgeos.GEOSUnion.restype = ctypes.c_void_p
|
|
102
|
+
lgeos.GEOSUnion.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
103
|
+
|
|
104
|
+
lgeos.GEOSPointOnSurface.restype = ctypes.c_void_p
|
|
105
|
+
lgeos.GEOSPointOnSurface.argtypes = [ctypes.c_void_p]
|
|
106
|
+
|
|
107
|
+
lgeos.GEOSGetCentroid.restype = ctypes.c_void_p
|
|
108
|
+
lgeos.GEOSGetCentroid.argtypes = [ctypes.c_void_p]
|
|
109
|
+
|
|
110
|
+
lgeos.GEOSRelate.restype = ctypes.c_char_p
|
|
111
|
+
lgeos.GEOSRelate.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
112
|
+
|
|
113
|
+
lgeos.GEOSPolygonize.restype = ctypes.c_void_p
|
|
114
|
+
lgeos.GEOSPolygonize.argtypes = [ctypes.c_void_p, ctypes.c_uint]
|
|
115
|
+
|
|
116
|
+
lgeos.GEOSLineMerge.restype = ctypes.c_void_p
|
|
117
|
+
lgeos.GEOSLineMerge.argtypes = [ctypes.c_void_p]
|
|
118
|
+
|
|
119
|
+
lgeos.GEOSRelatePattern.restype = ctypes.c_char
|
|
120
|
+
lgeos.GEOSRelatePattern.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_char_p]
|
|
121
|
+
|
|
122
|
+
lgeos.GEOSDisjoint.restype = ctypes.c_int
|
|
123
|
+
lgeos.GEOSDisjoint.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
124
|
+
|
|
125
|
+
lgeos.GEOSTouches.restype = ctypes.c_int
|
|
126
|
+
lgeos.GEOSTouches.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
127
|
+
|
|
128
|
+
lgeos.GEOSIntersects.restype = ctypes.c_int
|
|
129
|
+
lgeos.GEOSIntersects.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
130
|
+
|
|
131
|
+
lgeos.GEOSCrosses.restype = ctypes.c_int
|
|
132
|
+
lgeos.GEOSCrosses.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
133
|
+
|
|
134
|
+
lgeos.GEOSWithin.restype = ctypes.c_int
|
|
135
|
+
lgeos.GEOSWithin.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
136
|
+
|
|
137
|
+
lgeos.GEOSContains.restype = ctypes.c_int
|
|
138
|
+
lgeos.GEOSContains.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
139
|
+
|
|
140
|
+
lgeos.GEOSOverlaps.restype = ctypes.c_int
|
|
141
|
+
lgeos.GEOSOverlaps.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
142
|
+
|
|
143
|
+
lgeos.GEOSEquals.restype = ctypes.c_int
|
|
144
|
+
lgeos.GEOSEquals.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
145
|
+
|
|
146
|
+
lgeos.GEOSisEmpty.restype = ctypes.c_int
|
|
147
|
+
lgeos.GEOSisEmpty.argtypes = [ctypes.c_void_p]
|
|
148
|
+
|
|
149
|
+
lgeos.GEOSisValid.restype = ctypes.c_int
|
|
150
|
+
lgeos.GEOSisValid.argtypes = [ctypes.c_void_p]
|
|
151
|
+
|
|
152
|
+
lgeos.GEOSisSimple.restype = ctypes.c_int
|
|
153
|
+
lgeos.GEOSisSimple.argtypes = [ctypes.c_void_p]
|
|
154
|
+
|
|
155
|
+
lgeos.GEOSisRing.restype = ctypes.c_int
|
|
156
|
+
lgeos.GEOSisRing.argtypes = [ctypes.c_void_p]
|
|
157
|
+
|
|
158
|
+
lgeos.GEOSHasZ.restype = ctypes.c_int
|
|
159
|
+
lgeos.GEOSHasZ.argtypes = [ctypes.c_void_p]
|
|
160
|
+
|
|
161
|
+
lgeos.GEOSGeomType.restype = ctypes.c_char_p
|
|
162
|
+
lgeos.GEOSGeomType.argtypes = [ctypes.c_void_p]
|
|
163
|
+
|
|
164
|
+
lgeos.GEOSGeomTypeId.restype = ctypes.c_int
|
|
165
|
+
lgeos.GEOSGeomTypeId.argtypes = [ctypes.c_void_p]
|
|
166
|
+
|
|
167
|
+
lgeos.GEOSGetSRID.restype = ctypes.c_int
|
|
168
|
+
lgeos.GEOSGetSRID.argtypes = [ctypes.c_void_p]
|
|
169
|
+
|
|
170
|
+
lgeos.GEOSSetSRID.restype = None
|
|
171
|
+
lgeos.GEOSSetSRID.argtypes = [ctypes.c_void_p, ctypes.c_int]
|
|
172
|
+
|
|
173
|
+
lgeos.GEOSGetNumGeometries.restype = ctypes.c_int
|
|
174
|
+
lgeos.GEOSGetNumGeometries.argtypes = [ctypes.c_void_p]
|
|
175
|
+
|
|
176
|
+
lgeos.GEOSGetGeometryN.restype = ctypes.c_void_p
|
|
177
|
+
lgeos.GEOSGetGeometryN.argtypes = [ctypes.c_void_p, ctypes.c_int]
|
|
178
|
+
|
|
179
|
+
lgeos.GEOSGetNumInteriorRings.restype = ctypes.c_int
|
|
180
|
+
lgeos.GEOSGetNumInteriorRings.argtypes = [ctypes.c_void_p]
|
|
181
|
+
|
|
182
|
+
lgeos.GEOSGetInteriorRingN.restype = ctypes.c_void_p
|
|
183
|
+
lgeos.GEOSGetInteriorRingN.argtypes = [ctypes.c_void_p, ctypes.c_int]
|
|
184
|
+
|
|
185
|
+
lgeos.GEOSGetExteriorRing.restype = ctypes.c_void_p
|
|
186
|
+
lgeos.GEOSGetExteriorRing.argtypes = [ctypes.c_void_p]
|
|
187
|
+
|
|
188
|
+
lgeos.GEOSGetNumCoordinates.restype = ctypes.c_int
|
|
189
|
+
lgeos.GEOSGetNumCoordinates.argtypes = [ctypes.c_void_p]
|
|
190
|
+
|
|
191
|
+
lgeos.GEOSGeom_getCoordSeq.restype = ctypes.c_void_p
|
|
192
|
+
lgeos.GEOSGeom_getCoordSeq.argtypes = [ctypes.c_void_p]
|
|
193
|
+
|
|
194
|
+
lgeos.GEOSGeom_getDimensions.restype = ctypes.c_int
|
|
195
|
+
lgeos.GEOSGeom_getDimensions.argtypes = [ctypes.c_void_p]
|
|
196
|
+
|
|
197
|
+
lgeos.GEOSArea.restype = ctypes.c_double
|
|
198
|
+
lgeos.GEOSArea.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
199
|
+
|
|
200
|
+
lgeos.GEOSLength.restype = ctypes.c_int
|
|
201
|
+
lgeos.GEOSLength.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
|
|
202
|
+
|
|
203
|
+
lgeos.GEOSDistance.restype = ctypes.c_int
|
|
204
|
+
lgeos.GEOSDistance.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
|
|
@@ -3,12 +3,10 @@ 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, PyDLL, CFUNCTYPE, c_char_p
|
|
7
|
-
from ctypes.util import find_library
|
|
8
6
|
import os
|
|
9
7
|
import sys
|
|
10
|
-
|
|
11
|
-
import
|
|
8
|
+
from ctypes import cdll, CDLL, PyDLL, CFUNCTYPE, c_char_p
|
|
9
|
+
from ctypes.util import find_library
|
|
12
10
|
|
|
13
11
|
if sys.platform == 'win32':
|
|
14
12
|
try:
|
|
@@ -31,13 +29,15 @@ elif sys.platform == 'darwin':
|
|
|
31
29
|
lib_paths = [
|
|
32
30
|
# The Framework build from Kyng Chaos:
|
|
33
31
|
"/Library/Frameworks/GEOS.framework/Versions/Current/GEOS",
|
|
32
|
+
# macports
|
|
33
|
+
'/opt/local/lib/libgeos_c.dylib',
|
|
34
34
|
]
|
|
35
35
|
for path in lib_paths:
|
|
36
36
|
if os.path.exists(path):
|
|
37
37
|
lib = path
|
|
38
38
|
break
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
if lib is None:
|
|
40
|
+
raise ImportError, "Could not find geos_c library"
|
|
41
41
|
lgeos = PyDLL(lib)
|
|
42
42
|
free = CDLL(find_library('libc')).free
|
|
43
43
|
else:
|
|
@@ -51,6 +51,10 @@ else:
|
|
|
51
51
|
free = CDLL('libc.so.6').free
|
|
52
52
|
|
|
53
53
|
|
|
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
|
+
|
|
54
58
|
class allocated_c_char_p(c_char_p):
|
|
55
59
|
pass
|
|
56
60
|
|
|
@@ -83,10 +87,9 @@ notice_h = CFUNCTYPE(None, c_char_p, c_char_p)(notice_handler)
|
|
|
83
87
|
# Register a cleanup function
|
|
84
88
|
|
|
85
89
|
def cleanup():
|
|
86
|
-
lgeos
|
|
90
|
+
if lgeos is not None:
|
|
91
|
+
lgeos.finishGEOS()
|
|
87
92
|
|
|
88
93
|
atexit.register(cleanup)
|
|
89
94
|
|
|
90
95
|
lgeos.initGEOS(notice_h, error_h)
|
|
91
|
-
|
|
92
|
-
|
|
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
|