shapely 1.5.6__tar.gz → 1.5.8__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.5.6 → Shapely-1.5.8}/CHANGES.txt +11 -0
- {Shapely-1.5.6/Shapely.egg-info → Shapely-1.5.8}/PKG-INFO +12 -1
- {Shapely-1.5.6 → Shapely-1.5.8/Shapely.egg-info}/PKG-INFO +12 -1
- {Shapely-1.5.6 → Shapely-1.5.8}/Shapely.egg-info/SOURCES.txt +1 -0
- Shapely-1.5.8/VERSION.txt +1 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/setup.py +1 -1
- Shapely-1.5.8/shapely/__init__.py +1 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/ctypes_declarations.py +25 -6
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/base.py +4 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geos.py +50 -15
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/impl.py +6 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/prepared.py +32 -4
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/speedups/_speedups.c +125 -135
- Shapely-1.5.8/tests/test_geos_err_handler.py +33 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_predicates.py +2 -0
- Shapely-1.5.8/tests/test_prepared.py +51 -0
- Shapely-1.5.6/VERSION.txt +0 -1
- Shapely-1.5.6/shapely/__init__.py +0 -1
- Shapely-1.5.6/tests/test_prepared.py +0 -31
- {Shapely-1.5.6 → Shapely-1.5.8}/CREDITS.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/LICENSE.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/README.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/docs/design.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/docs/index.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/docs/manual.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/docs/project.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/setup.cfg +2 -2
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/_geos.pxi +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/affinity.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/algorithms/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/algorithms/cga.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/coords.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/examples/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/examples/dissolve.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/examples/geoms.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/examples/intersect.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/ftools.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/collection.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/geo.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/linestring.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/multilinestring.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/multipoint.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/multipolygon.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/point.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/polygon.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/geometry/proxy.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/iterops.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/linref.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/ops.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/predicates.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/speedups/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/speedups/_speedups.pyx +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/strtree.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/topology.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/validation.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/vectorized/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/vectorized/_vectorized.pyx +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/wkb.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/shapely/wkt.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/binascii_hex.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/conftest.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_affinity.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_box.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_cga.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_collection.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_coords.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_delaunay.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_delegated.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_dlls.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_doctests.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_emptiness.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_equality.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_geointerface.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_geomseq.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_getitem.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_hash.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_invalid_geometries.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_iterops.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_linear_referencing.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_linemerge.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_linestring.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_locale.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_mapping.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_multilinestring.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_multipoint.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_multipolygon.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_ndarrays.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_nearest.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_operations.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_operators.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_persist.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_pickle.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_point.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_polygon.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_polygonize.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_products_z.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_singularity.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_snap.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_strtree.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_styles.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_svg.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_transform.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_union.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_validation.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_vectorized.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/test_xy.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.8}/tests/threading_test.py +0 -0
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
1.5.8 (2015-04-29)
|
|
5
|
+
------------------
|
|
6
|
+
- Setup file encoding bug fix (#254).
|
|
7
|
+
- Support for pyinstaller (#261).
|
|
8
|
+
- Major prepared geometry operation fix for Windows (#268, #269).
|
|
9
|
+
- Major fix for OS X binary wheel (#262).
|
|
10
|
+
|
|
11
|
+
1.5.7 (2015-03-16)
|
|
12
|
+
------------------
|
|
13
|
+
- Test and fix buggy error and notice handlers (#249).
|
|
14
|
+
|
|
4
15
|
1.5.6 (2015-02-02)
|
|
5
16
|
------------------
|
|
6
17
|
- Fix setup regression (#232, #234).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.8
|
|
4
4
|
Summary: Geometric objects, predicates, and operations
|
|
5
5
|
Home-page: https://github.com/Toblerity/Shapely
|
|
6
6
|
Author: Sean Gillies
|
|
@@ -215,6 +215,17 @@ Description: =======
|
|
|
215
215
|
Changes
|
|
216
216
|
=======
|
|
217
217
|
|
|
218
|
+
1.5.8 (2015-04-29)
|
|
219
|
+
------------------
|
|
220
|
+
- Setup file encoding bug fix (#254).
|
|
221
|
+
- Support for pyinstaller (#261).
|
|
222
|
+
- Major prepared geometry operation fix for Windows (#268, #269).
|
|
223
|
+
- Major fix for OS X binary wheel (#262).
|
|
224
|
+
|
|
225
|
+
1.5.7 (2015-03-16)
|
|
226
|
+
------------------
|
|
227
|
+
- Test and fix buggy error and notice handlers (#249).
|
|
228
|
+
|
|
218
229
|
1.5.6 (2015-02-02)
|
|
219
230
|
------------------
|
|
220
231
|
- Fix setup regression (#232, #234).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.8
|
|
4
4
|
Summary: Geometric objects, predicates, and operations
|
|
5
5
|
Home-page: https://github.com/Toblerity/Shapely
|
|
6
6
|
Author: Sean Gillies
|
|
@@ -215,6 +215,17 @@ Description: =======
|
|
|
215
215
|
Changes
|
|
216
216
|
=======
|
|
217
217
|
|
|
218
|
+
1.5.8 (2015-04-29)
|
|
219
|
+
------------------
|
|
220
|
+
- Setup file encoding bug fix (#254).
|
|
221
|
+
- Support for pyinstaller (#261).
|
|
222
|
+
- Major prepared geometry operation fix for Windows (#268, #269).
|
|
223
|
+
- Major fix for OS X binary wheel (#262).
|
|
224
|
+
|
|
225
|
+
1.5.7 (2015-03-16)
|
|
226
|
+
------------------
|
|
227
|
+
- Test and fix buggy error and notice handlers (#249).
|
|
228
|
+
|
|
218
229
|
1.5.6 (2015-02-02)
|
|
219
230
|
------------------
|
|
220
231
|
- Fix setup regression (#232, #234).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.5.8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.5.8"
|
|
@@ -14,7 +14,7 @@ class allocated_c_char_p(c_char_p):
|
|
|
14
14
|
'''char pointer return type'''
|
|
15
15
|
pass
|
|
16
16
|
|
|
17
|
-
EXCEPTION_HANDLER_FUNCTYPE = CFUNCTYPE(None, c_char_p,
|
|
17
|
+
EXCEPTION_HANDLER_FUNCTYPE = CFUNCTYPE(None, c_char_p, c_void_p)
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
def prototype(lgeos, geos_version):
|
|
@@ -249,6 +249,9 @@ def prototype(lgeos, geos_version):
|
|
|
249
249
|
lgeos.GEOSOverlaps.restype = c_byte
|
|
250
250
|
lgeos.GEOSOverlaps.argtypes = [c_void_p, c_void_p]
|
|
251
251
|
|
|
252
|
+
lgeos.GEOSCovers.restype = c_byte
|
|
253
|
+
lgeos.GEOSCovers.argtypes = [c_void_p, c_void_p]
|
|
254
|
+
|
|
252
255
|
lgeos.GEOSEquals.restype = c_byte
|
|
253
256
|
lgeos.GEOSEquals.argtypes = [c_void_p, c_void_p]
|
|
254
257
|
|
|
@@ -306,17 +309,33 @@ def prototype(lgeos, geos_version):
|
|
|
306
309
|
lgeos.GEOSPreparedGeom_destroy.restype = None
|
|
307
310
|
lgeos.GEOSPreparedGeom_destroy.argtypes = [c_void_p]
|
|
308
311
|
|
|
309
|
-
lgeos.
|
|
312
|
+
lgeos.GEOSPreparedDisjoint.restype = c_byte
|
|
313
|
+
lgeos.GEOSPreparedDisjoint.argtypes = [c_void_p, c_void_p]
|
|
314
|
+
|
|
315
|
+
lgeos.GEOSPreparedTouches.restype = c_byte
|
|
316
|
+
lgeos.GEOSPreparedTouches.argtypes = [c_void_p, c_void_p]
|
|
317
|
+
|
|
318
|
+
lgeos.GEOSPreparedIntersects.restype = c_byte
|
|
319
|
+
lgeos.GEOSPreparedIntersects.argtypes = [c_void_p, c_void_p]
|
|
320
|
+
|
|
321
|
+
lgeos.GEOSPreparedCrosses.restype = c_byte
|
|
322
|
+
lgeos.GEOSPreparedCrosses.argtypes = [c_void_p, c_void_p]
|
|
323
|
+
|
|
324
|
+
lgeos.GEOSPreparedWithin.restype = c_byte
|
|
325
|
+
lgeos.GEOSPreparedWithin.argtypes = [c_void_p, c_void_p]
|
|
326
|
+
|
|
327
|
+
lgeos.GEOSPreparedContains.restype = c_byte
|
|
310
328
|
lgeos.GEOSPreparedContains.argtypes = [c_void_p, c_void_p]
|
|
311
329
|
|
|
312
|
-
lgeos.GEOSPreparedContainsProperly.restype =
|
|
330
|
+
lgeos.GEOSPreparedContainsProperly.restype = c_byte
|
|
313
331
|
lgeos.GEOSPreparedContainsProperly.argtypes = [c_void_p, c_void_p]
|
|
314
332
|
|
|
315
|
-
lgeos.
|
|
333
|
+
lgeos.GEOSPreparedOverlaps.restype = c_byte
|
|
334
|
+
lgeos.GEOSPreparedOverlaps.argtypes = [c_void_p, c_void_p]
|
|
335
|
+
|
|
336
|
+
lgeos.GEOSPreparedCovers.restype = c_byte
|
|
316
337
|
lgeos.GEOSPreparedCovers.argtypes = [c_void_p, c_void_p]
|
|
317
338
|
|
|
318
|
-
lgeos.GEOSPreparedIntersects.restype = c_int
|
|
319
|
-
lgeos.GEOSPreparedIntersects.argtypes = [c_void_p, c_void_p]
|
|
320
339
|
|
|
321
340
|
'''
|
|
322
341
|
Geometry info
|
|
@@ -616,6 +616,10 @@ class BaseGeometry(object):
|
|
|
616
616
|
(string)"""
|
|
617
617
|
return self.impl['relate'](self, other)
|
|
618
618
|
|
|
619
|
+
def covers(self, other):
|
|
620
|
+
"""Returns True if the geometry covers the other, else False"""
|
|
621
|
+
return bool(self.impl['covers'](self, other))
|
|
622
|
+
|
|
619
623
|
def contains(self, other):
|
|
620
624
|
"""Returns True if the geometry contains the other, else False"""
|
|
621
625
|
return bool(self.impl['contains'](self, other))
|
|
@@ -8,7 +8,8 @@ import sys
|
|
|
8
8
|
import atexit
|
|
9
9
|
import logging
|
|
10
10
|
import threading
|
|
11
|
-
from ctypes import CDLL, cdll, pointer,
|
|
11
|
+
from ctypes import CDLL, cdll, pointer, string_at, cast, POINTER
|
|
12
|
+
from ctypes import c_void_p, c_size_t, c_char_p, c_int, c_float
|
|
12
13
|
from ctypes.util import find_library
|
|
13
14
|
|
|
14
15
|
from . import ftools
|
|
@@ -67,9 +68,13 @@ elif sys.platform == 'darwin':
|
|
|
67
68
|
_lgeos = CDLL(geos_whl_dylib)
|
|
68
69
|
else:
|
|
69
70
|
if hasattr(sys, 'frozen'):
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
try:
|
|
72
|
+
# .app file from py2app
|
|
73
|
+
alt_paths = [os.path.join(os.environ['RESOURCEPATH'],
|
|
74
|
+
'..', 'Frameworks', 'libgeos_c.dylib')]
|
|
75
|
+
except KeyError:
|
|
76
|
+
# binary from pyinstaller
|
|
77
|
+
alt_paths = [os.path.join(sys.executable, 'libgeos_c.dylib')]
|
|
73
78
|
else:
|
|
74
79
|
alt_paths = [
|
|
75
80
|
# The Framework build from Kyng Chaos
|
|
@@ -184,19 +189,33 @@ class TopologicalError(Exception):
|
|
|
184
189
|
class PredicateError(Exception):
|
|
185
190
|
pass
|
|
186
191
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
192
|
+
# While this function can take any number of positional arguments when
|
|
193
|
+
# called from Python and GEOS expects its error handler to accept any
|
|
194
|
+
# number of arguments (like printf), I'm unable to get ctypes to make
|
|
195
|
+
# a callback object from this function that will accept any number of
|
|
196
|
+
# arguments.
|
|
197
|
+
#
|
|
198
|
+
# At the moment, functions in the GEOS C API only pass 0 or 1 arguments
|
|
199
|
+
# to the error handler. We can deal with this, but when if that changes,
|
|
200
|
+
# Shapely may break.
|
|
201
|
+
|
|
202
|
+
def handler(level):
|
|
203
|
+
def callback(fmt, *args):
|
|
190
204
|
fmt = fmt.decode('ascii')
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
205
|
+
conversions = re.findall(r'%.', fmt)
|
|
206
|
+
log_vals = []
|
|
207
|
+
for spec, arg in zip(conversions, args):
|
|
208
|
+
if spec == '%s' and arg is not None:
|
|
209
|
+
log_vals.append(string_at(arg).decode('ascii'))
|
|
210
|
+
else:
|
|
211
|
+
LOG.error("An error occurred, but the format string "
|
|
212
|
+
"'%s' could not be converted.", fmt)
|
|
213
|
+
return
|
|
214
|
+
getattr(LOG, level)(fmt, *log_vals)
|
|
215
|
+
return callback
|
|
194
216
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
fmt = fmt.decode('ascii')
|
|
198
|
-
args = args.decode('ascii')
|
|
199
|
-
LOG.warning(fmt, args)
|
|
217
|
+
error_handler = handler('error')
|
|
218
|
+
notice_handler = handler('warning')
|
|
200
219
|
|
|
201
220
|
error_h = EXCEPTION_HANDLER_FUNCTYPE(error_handler)
|
|
202
221
|
notice_h = EXCEPTION_HANDLER_FUNCTYPE(notice_handler)
|
|
@@ -627,8 +646,18 @@ class LGEOS310(LGEOSBase):
|
|
|
627
646
|
self.GEOSWithin,
|
|
628
647
|
self.GEOSContains,
|
|
629
648
|
self.GEOSOverlaps,
|
|
649
|
+
self.GEOSCovers,
|
|
630
650
|
self.GEOSEquals,
|
|
631
651
|
self.GEOSEqualsExact,
|
|
652
|
+
self.GEOSPreparedDisjoint,
|
|
653
|
+
self.GEOSPreparedTouches,
|
|
654
|
+
self.GEOSPreparedCrosses,
|
|
655
|
+
self.GEOSPreparedWithin,
|
|
656
|
+
self.GEOSPreparedOverlaps,
|
|
657
|
+
self.GEOSPreparedContains,
|
|
658
|
+
self.GEOSPreparedContainsProperly,
|
|
659
|
+
self.GEOSPreparedCovers,
|
|
660
|
+
self.GEOSPreparedIntersects,
|
|
632
661
|
self.GEOSisEmpty,
|
|
633
662
|
self.GEOSisValid,
|
|
634
663
|
self.GEOSisSimple,
|
|
@@ -659,6 +688,7 @@ class LGEOS310(LGEOSBase):
|
|
|
659
688
|
self.methods['within'] = self.GEOSWithin
|
|
660
689
|
self.methods['contains'] = self.GEOSContains
|
|
661
690
|
self.methods['overlaps'] = self.GEOSOverlaps
|
|
691
|
+
self.methods['covers'] = self.GEOSCovers
|
|
662
692
|
self.methods['equals'] = self.GEOSEquals
|
|
663
693
|
self.methods['equals_exact'] = self.GEOSEqualsExact
|
|
664
694
|
self.methods['relate'] = self.GEOSRelate
|
|
@@ -666,10 +696,15 @@ class LGEOS310(LGEOSBase):
|
|
|
666
696
|
self.methods['symmetric_difference'] = self.GEOSSymDifference
|
|
667
697
|
self.methods['union'] = self.GEOSUnion
|
|
668
698
|
self.methods['intersection'] = self.GEOSIntersection
|
|
699
|
+
self.methods['prepared_disjoint'] = self.GEOSPreparedDisjoint
|
|
700
|
+
self.methods['prepared_touches'] = self.GEOSPreparedTouches
|
|
669
701
|
self.methods['prepared_intersects'] = self.GEOSPreparedIntersects
|
|
702
|
+
self.methods['prepared_crosses'] = self.GEOSPreparedCrosses
|
|
703
|
+
self.methods['prepared_within'] = self.GEOSPreparedWithin
|
|
670
704
|
self.methods['prepared_contains'] = self.GEOSPreparedContains
|
|
671
705
|
self.methods['prepared_contains_properly'] = \
|
|
672
706
|
self.GEOSPreparedContainsProperly
|
|
707
|
+
self.methods['prepared_overlaps'] = self.GEOSPreparedOverlaps
|
|
673
708
|
self.methods['prepared_covers'] = self.GEOSPreparedCovers
|
|
674
709
|
self.methods['simplify'] = self.GEOSSimplify
|
|
675
710
|
self.methods['topology_preserve_simplify'] = \
|
|
@@ -83,6 +83,7 @@ IMPL300 = {
|
|
|
83
83
|
'overlaps': (BinaryPredicate, 'overlaps'),
|
|
84
84
|
'touches': (BinaryPredicate, 'touches'),
|
|
85
85
|
'within': (BinaryPredicate, 'within'),
|
|
86
|
+
'covers': (BinaryPredicate, 'covers'),
|
|
86
87
|
'equals_exact': (BinaryPredicate, 'equals_exact'),
|
|
87
88
|
|
|
88
89
|
# First pure Python implementation
|
|
@@ -93,6 +94,11 @@ IMPL310 = {
|
|
|
93
94
|
'simplify': (UnaryTopologicalOp, 'simplify'),
|
|
94
95
|
'topology_preserve_simplify':
|
|
95
96
|
(UnaryTopologicalOp, 'topology_preserve_simplify'),
|
|
97
|
+
'prepared_disjoint': (BinaryPredicate, 'prepared_disjoint'),
|
|
98
|
+
'prepared_touches': (BinaryPredicate, 'prepared_touches'),
|
|
99
|
+
'prepared_crosses': (BinaryPredicate, 'prepared_crosses'),
|
|
100
|
+
'prepared_within': (BinaryPredicate, 'prepared_within'),
|
|
101
|
+
'prepared_overlaps': (BinaryPredicate, 'prepared_overlaps'),
|
|
96
102
|
'prepared_intersects': (BinaryPredicate, 'prepared_intersects'),
|
|
97
103
|
'prepared_contains': (BinaryPredicate, 'prepared_contains'),
|
|
98
104
|
'prepared_contains_properly':
|
|
@@ -37,23 +37,51 @@ class PreparedGeometry(object):
|
|
|
37
37
|
@property
|
|
38
38
|
def _geom(self):
|
|
39
39
|
return self.__geom__
|
|
40
|
-
|
|
41
|
-
@delegated
|
|
42
|
-
def intersects(self, other):
|
|
43
|
-
return bool(self.impl['prepared_intersects'](self, other))
|
|
44
40
|
|
|
45
41
|
@delegated
|
|
46
42
|
def contains(self, other):
|
|
43
|
+
"""Returns True if the geometry contains the other, else False"""
|
|
47
44
|
return bool(self.impl['prepared_contains'](self, other))
|
|
48
45
|
|
|
49
46
|
@delegated
|
|
50
47
|
def contains_properly(self, other):
|
|
48
|
+
"""Returns True if the geometry properly contains the other, else False"""
|
|
51
49
|
return bool(self.impl['prepared_contains_properly'](self, other))
|
|
52
50
|
|
|
53
51
|
@delegated
|
|
54
52
|
def covers(self, other):
|
|
53
|
+
"""Returns True if the geometry covers the other, else False"""
|
|
55
54
|
return bool(self.impl['prepared_covers'](self, other))
|
|
56
55
|
|
|
56
|
+
@delegated
|
|
57
|
+
def crosses(self, other):
|
|
58
|
+
"""Returns True if the geometries cross, else False"""
|
|
59
|
+
return bool(self.impl['prepared_crosses'](self, other))
|
|
60
|
+
|
|
61
|
+
@delegated
|
|
62
|
+
def disjoint(self, other):
|
|
63
|
+
"""Returns True if geometries are disjoint, else False"""
|
|
64
|
+
return bool(self.impl['prepared_disjoint'](self, other))
|
|
65
|
+
|
|
66
|
+
@delegated
|
|
67
|
+
def intersects(self, other):
|
|
68
|
+
"""Returns True if geometries intersect, else False"""
|
|
69
|
+
return bool(self.impl['prepared_intersects'](self, other))
|
|
70
|
+
|
|
71
|
+
@delegated
|
|
72
|
+
def overlaps(self, other):
|
|
73
|
+
"""Returns True if geometries overlap, else False"""
|
|
74
|
+
return bool(self.impl['prepared_overlaps'](self, other))
|
|
75
|
+
|
|
76
|
+
@delegated
|
|
77
|
+
def touches(self, other):
|
|
78
|
+
"""Returns True if geometries touch, else False"""
|
|
79
|
+
return bool(self.impl['prepared_touches'](self, other))
|
|
80
|
+
|
|
81
|
+
@delegated
|
|
82
|
+
def within(self, other):
|
|
83
|
+
"""Returns True if geometry is within the other, else False"""
|
|
84
|
+
return bool(self.impl['prepared_within'](self, other))
|
|
57
85
|
|
|
58
86
|
def prep(ob):
|
|
59
87
|
"""Creates and returns a prepared geometric object."""
|