shapely 1.5.6__tar.gz → 1.5.7__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.7}/CHANGES.txt +4 -0
- {Shapely-1.5.6/Shapely.egg-info → Shapely-1.5.7}/PKG-INFO +5 -1
- {Shapely-1.5.6 → Shapely-1.5.7/Shapely.egg-info}/PKG-INFO +5 -1
- {Shapely-1.5.6 → Shapely-1.5.7}/Shapely.egg-info/SOURCES.txt +1 -0
- Shapely-1.5.7/VERSION.txt +1 -0
- Shapely-1.5.7/shapely/__init__.py +1 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/ctypes_declarations.py +1 -1
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geos.py +28 -13
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/speedups/_speedups.c +116 -126
- Shapely-1.5.7/tests/test_geos_err_handler.py +33 -0
- Shapely-1.5.6/VERSION.txt +0 -1
- Shapely-1.5.6/shapely/__init__.py +0 -1
- {Shapely-1.5.6 → Shapely-1.5.7}/CREDITS.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/LICENSE.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/README.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/docs/design.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/docs/index.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/docs/manual.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/docs/project.rst +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/setup.cfg +2 -2
- {Shapely-1.5.6 → Shapely-1.5.7}/setup.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/_geos.pxi +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/affinity.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/algorithms/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/algorithms/cga.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/coords.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/examples/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/examples/dissolve.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/examples/geoms.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/examples/intersect.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/ftools.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/base.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/collection.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/geo.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/linestring.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/multilinestring.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/multipoint.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/multipolygon.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/point.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/polygon.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/geometry/proxy.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/impl.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/iterops.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/linref.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/ops.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/predicates.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/prepared.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/speedups/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/speedups/_speedups.pyx +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/strtree.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/topology.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/validation.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/vectorized/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/vectorized/_vectorized.pyx +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/wkb.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/shapely/wkt.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/__init__.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/binascii_hex.txt +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/conftest.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_affinity.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_box.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_cga.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_collection.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_coords.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_delaunay.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_delegated.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_dlls.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_doctests.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_emptiness.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_equality.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_geointerface.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_geomseq.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_getitem.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_hash.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_invalid_geometries.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_iterops.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_linear_referencing.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_linemerge.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_linestring.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_locale.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_mapping.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_multilinestring.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_multipoint.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_multipolygon.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_ndarrays.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_nearest.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_operations.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_operators.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_persist.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_pickle.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_point.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_polygon.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_polygonize.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_predicates.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_prepared.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_products_z.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_singularity.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_snap.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_strtree.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_styles.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_svg.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_transform.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_union.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_validation.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_vectorized.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/test_xy.py +0 -0
- {Shapely-1.5.6 → Shapely-1.5.7}/tests/threading_test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.7
|
|
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,10 @@ Description: =======
|
|
|
215
215
|
Changes
|
|
216
216
|
=======
|
|
217
217
|
|
|
218
|
+
1.5.6 (2015-03-16)
|
|
219
|
+
------------------
|
|
220
|
+
- Test and fix buggy error and notice handlers (#249).
|
|
221
|
+
|
|
218
222
|
1.5.6 (2015-02-02)
|
|
219
223
|
------------------
|
|
220
224
|
- 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.7
|
|
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,10 @@ Description: =======
|
|
|
215
215
|
Changes
|
|
216
216
|
=======
|
|
217
217
|
|
|
218
|
+
1.5.6 (2015-03-16)
|
|
219
|
+
------------------
|
|
220
|
+
- Test and fix buggy error and notice handlers (#249).
|
|
221
|
+
|
|
218
222
|
1.5.6 (2015-02-02)
|
|
219
223
|
------------------
|
|
220
224
|
- Fix setup regression (#232, #234).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.5.7
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.5.7"
|
|
@@ -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):
|
|
@@ -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
|
|
@@ -184,19 +185,33 @@ class TopologicalError(Exception):
|
|
|
184
185
|
class PredicateError(Exception):
|
|
185
186
|
pass
|
|
186
187
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
# While this function can take any number of positional arguments when
|
|
189
|
+
# called from Python and GEOS expects its error handler to accept any
|
|
190
|
+
# number of arguments (like printf), I'm unable to get ctypes to make
|
|
191
|
+
# a callback object from this function that will accept any number of
|
|
192
|
+
# arguments.
|
|
193
|
+
#
|
|
194
|
+
# At the moment, functions in the GEOS C API only pass 0 or 1 arguments
|
|
195
|
+
# to the error handler. We can deal with this, but when if that changes,
|
|
196
|
+
# Shapely may break.
|
|
197
|
+
|
|
198
|
+
def handler(level):
|
|
199
|
+
def callback(fmt, *args):
|
|
190
200
|
fmt = fmt.decode('ascii')
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
201
|
+
conversions = re.findall(r'%.', fmt)
|
|
202
|
+
log_vals = []
|
|
203
|
+
for spec, arg in zip(conversions, args):
|
|
204
|
+
if spec == '%s' and arg is not None:
|
|
205
|
+
log_vals.append(string_at(arg).decode('ascii'))
|
|
206
|
+
else:
|
|
207
|
+
LOG.error("An error occurred, but the format string "
|
|
208
|
+
"'%s' could not be converted.", fmt)
|
|
209
|
+
return
|
|
210
|
+
getattr(LOG, level)(fmt, *log_vals)
|
|
211
|
+
return callback
|
|
212
|
+
|
|
213
|
+
error_handler = handler('error')
|
|
214
|
+
notice_handler = handler('warning')
|
|
200
215
|
|
|
201
216
|
error_h = EXCEPTION_HANDLER_FUNCTYPE(error_handler)
|
|
202
217
|
notice_h = EXCEPTION_HANDLER_FUNCTYPE(notice_handler)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated by Cython 0.
|
|
1
|
+
/* Generated by Cython 0.22 */
|
|
2
2
|
|
|
3
3
|
#define PY_SSIZE_T_CLEAN
|
|
4
4
|
#ifndef CYTHON_USE_PYLONG_INTERNALS
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
|
|
20
20
|
#error Cython requires Python 2.6+ or Python 3.2+.
|
|
21
21
|
#else
|
|
22
|
-
#define CYTHON_ABI "
|
|
22
|
+
#define CYTHON_ABI "0_22"
|
|
23
23
|
#include <stddef.h>
|
|
24
24
|
#ifndef offsetof
|
|
25
25
|
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
#define CYTHON_COMPILING_IN_PYPY 0
|
|
55
55
|
#define CYTHON_COMPILING_IN_CPYTHON 1
|
|
56
56
|
#endif
|
|
57
|
-
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600
|
|
57
|
+
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
|
|
58
58
|
#define Py_OptimizeFlag 0
|
|
59
59
|
#endif
|
|
60
60
|
#define __PYX_BUILD_PY_SSIZE_T "n"
|
|
@@ -203,11 +203,22 @@ static CYTHON_INLINE float __PYX_NAN() {
|
|
|
203
203
|
return value;
|
|
204
204
|
}
|
|
205
205
|
#endif
|
|
206
|
+
#define __Pyx_void_to_None(void_result) (void_result, Py_INCREF(Py_None), Py_None)
|
|
206
207
|
#ifdef __cplusplus
|
|
207
208
|
template<typename T>
|
|
208
209
|
void __Pyx_call_destructor(T* x) {
|
|
209
210
|
x->~T();
|
|
210
211
|
}
|
|
212
|
+
template<typename T>
|
|
213
|
+
class __Pyx_FakeReference {
|
|
214
|
+
public:
|
|
215
|
+
__Pyx_FakeReference() : ptr(NULL) { }
|
|
216
|
+
__Pyx_FakeReference(T& ref) : ptr(&ref) { }
|
|
217
|
+
T *operator->() { return ptr; }
|
|
218
|
+
operator T&() { return *ptr; }
|
|
219
|
+
private:
|
|
220
|
+
T *ptr;
|
|
221
|
+
};
|
|
211
222
|
#endif
|
|
212
223
|
|
|
213
224
|
|
|
@@ -289,11 +300,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
|
|
|
289
300
|
#endif
|
|
290
301
|
#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
|
|
291
302
|
#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
|
|
292
|
-
#define
|
|
293
|
-
#define
|
|
294
|
-
#define
|
|
295
|
-
#define
|
|
296
|
-
#define
|
|
303
|
+
#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
|
|
304
|
+
#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
|
|
305
|
+
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
|
|
306
|
+
#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
|
|
307
|
+
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
|
|
297
308
|
#if PY_MAJOR_VERSION < 3
|
|
298
309
|
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
|
|
299
310
|
{
|
|
@@ -329,7 +340,7 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) {
|
|
|
329
340
|
const char* default_encoding_c;
|
|
330
341
|
sys = PyImport_ImportModule("sys");
|
|
331
342
|
if (!sys) goto bad;
|
|
332
|
-
default_encoding = PyObject_CallMethod(sys, (char*)
|
|
343
|
+
default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
|
|
333
344
|
Py_DECREF(sys);
|
|
334
345
|
if (!default_encoding) goto bad;
|
|
335
346
|
default_encoding_c = PyBytes_AsString(default_encoding);
|
|
@@ -453,6 +464,8 @@ struct __pyx_obj_7shapely_8speedups_9_speedups___pyx_scope_struct__coordseq_iter
|
|
|
453
464
|
long __pyx_t_1;
|
|
454
465
|
};
|
|
455
466
|
|
|
467
|
+
|
|
468
|
+
/* --- Runtime support code (head) --- */
|
|
456
469
|
#ifndef CYTHON_REFNANNY
|
|
457
470
|
#define CYTHON_REFNANNY 0
|
|
458
471
|
#endif
|
|
@@ -2404,16 +2417,10 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_2geos_linestring_from_py
|
|
|
2404
2417
|
* m = len(ob)
|
|
2405
2418
|
* if m < 2:
|
|
2406
2419
|
*/
|
|
2407
|
-
__pyx_t_19 =
|
|
2420
|
+
__pyx_t_19 = PySequence_List(__pyx_v_ob); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L37_except_error;}
|
|
2408
2421
|
__Pyx_GOTREF(__pyx_t_19);
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
__Pyx_GIVEREF(__pyx_v_ob);
|
|
2412
|
-
__pyx_t_20 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L37_except_error;}
|
|
2413
|
-
__Pyx_GOTREF(__pyx_t_20);
|
|
2414
|
-
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
|
|
2415
|
-
__Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_20);
|
|
2416
|
-
__pyx_t_20 = 0;
|
|
2422
|
+
__Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_19);
|
|
2423
|
+
__pyx_t_19 = 0;
|
|
2417
2424
|
|
|
2418
2425
|
/* "shapely/speedups/_speedups.pyx":124
|
|
2419
2426
|
* except TypeError: # Iterators, e.g. Python 3 zip
|
|
@@ -2516,7 +2523,6 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_2geos_linestring_from_py
|
|
|
2516
2523
|
goto __pyx_L53_try_end;
|
|
2517
2524
|
__pyx_L46_error:;
|
|
2518
2525
|
__Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
|
|
2519
|
-
__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
|
|
2520
2526
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
2521
2527
|
__Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
|
|
2522
2528
|
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
@@ -2543,17 +2549,17 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_2geos_linestring_from_py
|
|
|
2543
2549
|
* assert n == 2 or n == 3
|
|
2544
2550
|
*
|
|
2545
2551
|
*/
|
|
2546
|
-
|
|
2547
|
-
__Pyx_GOTREF(
|
|
2552
|
+
__pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L48_except_error;}
|
|
2553
|
+
__Pyx_GOTREF(__pyx_t_19);
|
|
2548
2554
|
__Pyx_INCREF(__pyx_v_ob);
|
|
2549
|
-
PyTuple_SET_ITEM(
|
|
2555
|
+
PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_v_ob);
|
|
2550
2556
|
__Pyx_GIVEREF(__pyx_v_ob);
|
|
2551
|
-
|
|
2552
|
-
__Pyx_GOTREF(__pyx_t_19);
|
|
2553
|
-
__Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
|
|
2554
|
-
__pyx_t_20 = __Pyx_PyString_Format(__pyx_kp_s_Input_s_is_the_wrong_shape_for_a, __pyx_t_19); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L48_except_error;}
|
|
2557
|
+
__pyx_t_20 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L48_except_error;}
|
|
2555
2558
|
__Pyx_GOTREF(__pyx_t_20);
|
|
2556
2559
|
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
|
|
2560
|
+
__pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_Input_s_is_the_wrong_shape_for_a, __pyx_t_20); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L48_except_error;}
|
|
2561
|
+
__Pyx_GOTREF(__pyx_t_19);
|
|
2562
|
+
__Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
|
|
2557
2563
|
|
|
2558
2564
|
/* "shapely/speedups/_speedups.pyx":138
|
|
2559
2565
|
* n = len(_coords(ob[0]))
|
|
@@ -2562,16 +2568,16 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_2geos_linestring_from_py
|
|
|
2562
2568
|
* "Input %s is the wrong shape for a LineString" % str(ob))
|
|
2563
2569
|
* assert n == 2 or n == 3
|
|
2564
2570
|
*/
|
|
2565
|
-
|
|
2566
|
-
__Pyx_GOTREF(__pyx_t_19);
|
|
2567
|
-
PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_20);
|
|
2568
|
-
__Pyx_GIVEREF(__pyx_t_20);
|
|
2569
|
-
__pyx_t_20 = 0;
|
|
2570
|
-
__pyx_t_20 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L48_except_error;}
|
|
2571
|
+
__pyx_t_20 = PyTuple_New(1); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L48_except_error;}
|
|
2571
2572
|
__Pyx_GOTREF(__pyx_t_20);
|
|
2572
|
-
|
|
2573
|
-
|
|
2573
|
+
PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_19);
|
|
2574
|
+
__Pyx_GIVEREF(__pyx_t_19);
|
|
2575
|
+
__pyx_t_19 = 0;
|
|
2576
|
+
__pyx_t_19 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_20, NULL); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L48_except_error;}
|
|
2577
|
+
__Pyx_GOTREF(__pyx_t_19);
|
|
2574
2578
|
__Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
|
|
2579
|
+
__Pyx_Raise(__pyx_t_19, 0, 0, 0);
|
|
2580
|
+
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
|
|
2575
2581
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L48_except_error;}
|
|
2576
2582
|
}
|
|
2577
2583
|
goto __pyx_L48_except_error;
|
|
@@ -3061,8 +3067,7 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
3061
3067
|
PyObject *__pyx_t_17 = NULL;
|
|
3062
3068
|
PyObject *__pyx_t_18 = NULL;
|
|
3063
3069
|
PyObject *__pyx_t_19 = NULL;
|
|
3064
|
-
|
|
3065
|
-
double __pyx_t_21;
|
|
3070
|
+
double __pyx_t_20;
|
|
3066
3071
|
int __pyx_lineno = 0;
|
|
3067
3072
|
const char *__pyx_filename = NULL;
|
|
3068
3073
|
int __pyx_clineno = 0;
|
|
@@ -4025,16 +4030,10 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4025
4030
|
* m = len(ob)
|
|
4026
4031
|
* n = len(ob[0])
|
|
4027
4032
|
*/
|
|
4028
|
-
__pyx_t_19 =
|
|
4033
|
+
__pyx_t_19 = PySequence_List(__pyx_v_ob); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
|
|
4029
4034
|
__Pyx_GOTREF(__pyx_t_19);
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
__Pyx_GIVEREF(__pyx_v_ob);
|
|
4033
|
-
__pyx_t_20 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
|
|
4034
|
-
__Pyx_GOTREF(__pyx_t_20);
|
|
4035
|
-
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
|
|
4036
|
-
__Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_20);
|
|
4037
|
-
__pyx_t_20 = 0;
|
|
4035
|
+
__Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_19);
|
|
4036
|
+
__pyx_t_19 = 0;
|
|
4038
4037
|
|
|
4039
4038
|
/* "shapely/speedups/_speedups.pyx":287
|
|
4040
4039
|
* except TypeError: # Iterators, e.g. Python 3 zip
|
|
@@ -4314,9 +4313,9 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4314
4313
|
*/
|
|
4315
4314
|
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_coords, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
4316
4315
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4317
|
-
|
|
4316
|
+
__pyx_t_20 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
|
|
4318
4317
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4319
|
-
__pyx_v_dx =
|
|
4318
|
+
__pyx_v_dx = __pyx_t_20;
|
|
4320
4319
|
|
|
4321
4320
|
/* "shapely/speedups/_speedups.pyx":314
|
|
4322
4321
|
* coords = ob[i]
|
|
@@ -4327,9 +4326,9 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4327
4326
|
*/
|
|
4328
4327
|
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_coords, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
4329
4328
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4330
|
-
|
|
4329
|
+
__pyx_t_20 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
|
|
4331
4330
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4332
|
-
__pyx_v_dy =
|
|
4331
|
+
__pyx_v_dy = __pyx_t_20;
|
|
4333
4332
|
|
|
4334
4333
|
/* "shapely/speedups/_speedups.pyx":315
|
|
4335
4334
|
* dx = coords[0]
|
|
@@ -4359,9 +4358,9 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4359
4358
|
*/
|
|
4360
4359
|
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_coords, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
4361
4360
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4362
|
-
|
|
4361
|
+
__pyx_t_20 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
|
|
4363
4362
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4364
|
-
__pyx_v_dz =
|
|
4363
|
+
__pyx_v_dz = __pyx_t_20;
|
|
4365
4364
|
goto __pyx_L55;
|
|
4366
4365
|
}
|
|
4367
4366
|
__pyx_L55:;
|
|
@@ -4438,9 +4437,9 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4438
4437
|
*/
|
|
4439
4438
|
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_coords, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
4440
4439
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4441
|
-
|
|
4440
|
+
__pyx_t_20 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
|
|
4442
4441
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4443
|
-
__pyx_v_dx =
|
|
4442
|
+
__pyx_v_dx = __pyx_t_20;
|
|
4444
4443
|
|
|
4445
4444
|
/* "shapely/speedups/_speedups.pyx":330
|
|
4446
4445
|
* coords = ob[0]
|
|
@@ -4451,9 +4450,9 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4451
4450
|
*/
|
|
4452
4451
|
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_coords, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
4453
4452
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4454
|
-
|
|
4453
|
+
__pyx_t_20 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
|
|
4455
4454
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4456
|
-
__pyx_v_dy =
|
|
4455
|
+
__pyx_v_dy = __pyx_t_20;
|
|
4457
4456
|
|
|
4458
4457
|
/* "shapely/speedups/_speedups.pyx":331
|
|
4459
4458
|
* dx = coords[0]
|
|
@@ -4483,9 +4482,9 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4483
4482
|
*/
|
|
4484
4483
|
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_coords, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
4485
4484
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4486
|
-
|
|
4485
|
+
__pyx_t_20 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_20 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
|
|
4487
4486
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4488
|
-
__pyx_v_dz =
|
|
4487
|
+
__pyx_v_dz = __pyx_t_20;
|
|
4489
4488
|
goto __pyx_L58;
|
|
4490
4489
|
}
|
|
4491
4490
|
__pyx_L58:;
|
|
@@ -4619,7 +4618,6 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4619
4618
|
__Pyx_XDECREF(__pyx_t_13);
|
|
4620
4619
|
__Pyx_XDECREF(__pyx_t_18);
|
|
4621
4620
|
__Pyx_XDECREF(__pyx_t_19);
|
|
4622
|
-
__Pyx_XDECREF(__pyx_t_20);
|
|
4623
4621
|
__Pyx_AddTraceback("shapely.speedups._speedups.geos_linearring_from_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
4624
4622
|
__pyx_r = NULL;
|
|
4625
4623
|
__pyx_L0:;
|
|
@@ -6341,16 +6339,11 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6341
6339
|
*/
|
|
6342
6340
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_geom, __pyx_n_s_interiors); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6343
6341
|
__Pyx_GOTREF(__pyx_t_9);
|
|
6344
|
-
__pyx_t_17 =
|
|
6342
|
+
__pyx_t_17 = PySequence_List(__pyx_t_9); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6345
6343
|
__Pyx_GOTREF(__pyx_t_17);
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
__pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_17, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6350
|
-
__Pyx_GOTREF(__pyx_t_9);
|
|
6351
|
-
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
|
|
6352
|
-
__pyx_v_holes = ((PyObject*)__pyx_t_9);
|
|
6353
|
-
__pyx_t_9 = 0;
|
|
6344
|
+
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
6345
|
+
__pyx_v_holes = ((PyObject*)__pyx_t_17);
|
|
6346
|
+
__pyx_t_17 = 0;
|
|
6354
6347
|
|
|
6355
6348
|
/* "shapely/speedups/_speedups.pyx":492
|
|
6356
6349
|
* shell = affine_transform(ring, matrix)
|
|
@@ -6360,23 +6353,23 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6360
6353
|
* return type(geom)(shell, holes)
|
|
6361
6354
|
*/
|
|
6362
6355
|
__Pyx_INCREF(__pyx_int_0);
|
|
6363
|
-
|
|
6364
|
-
|
|
6356
|
+
__pyx_t_17 = __pyx_int_0;
|
|
6357
|
+
__pyx_t_9 = __pyx_v_holes; __Pyx_INCREF(__pyx_t_9); __pyx_t_3 = 0;
|
|
6365
6358
|
for (;;) {
|
|
6366
|
-
if (__pyx_t_3 >= PyList_GET_SIZE(
|
|
6359
|
+
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_9)) break;
|
|
6367
6360
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
6368
|
-
__pyx_t_5 = PyList_GET_ITEM(
|
|
6361
|
+
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6369
6362
|
#else
|
|
6370
|
-
__pyx_t_5 = PySequence_ITEM(
|
|
6363
|
+
__pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6371
6364
|
#endif
|
|
6372
6365
|
__Pyx_DECREF_SET(__pyx_v_ring, __pyx_t_5);
|
|
6373
6366
|
__pyx_t_5 = 0;
|
|
6374
|
-
__Pyx_INCREF(
|
|
6375
|
-
__Pyx_XDECREF_SET(__pyx_v_pos,
|
|
6376
|
-
__pyx_t_5 = PyNumber_Add(
|
|
6367
|
+
__Pyx_INCREF(__pyx_t_17);
|
|
6368
|
+
__Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_17);
|
|
6369
|
+
__pyx_t_5 = PyNumber_Add(__pyx_t_17, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6377
6370
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6378
|
-
__Pyx_DECREF(
|
|
6379
|
-
|
|
6371
|
+
__Pyx_DECREF(__pyx_t_17);
|
|
6372
|
+
__pyx_t_17 = __pyx_t_5;
|
|
6380
6373
|
__pyx_t_5 = 0;
|
|
6381
6374
|
|
|
6382
6375
|
/* "shapely/speedups/_speedups.pyx":493
|
|
@@ -6399,8 +6392,8 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6399
6392
|
* return type(geom)(shell, holes)
|
|
6400
6393
|
*/
|
|
6401
6394
|
}
|
|
6402
|
-
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
|
|
6403
6395
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
6396
|
+
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
|
|
6404
6397
|
|
|
6405
6398
|
/* "shapely/speedups/_speedups.pyx":494
|
|
6406
6399
|
* for pos, ring in enumerate(holes):
|
|
@@ -6411,15 +6404,15 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6411
6404
|
*/
|
|
6412
6405
|
__Pyx_XDECREF(__pyx_r);
|
|
6413
6406
|
__Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_geom)));
|
|
6414
|
-
|
|
6407
|
+
__pyx_t_9 = ((PyObject *)Py_TYPE(__pyx_v_geom)); __pyx_t_5 = NULL;
|
|
6415
6408
|
__pyx_t_3 = 0;
|
|
6416
|
-
if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(
|
|
6417
|
-
__pyx_t_5 = PyMethod_GET_SELF(
|
|
6409
|
+
if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
|
|
6410
|
+
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
|
|
6418
6411
|
if (likely(__pyx_t_5)) {
|
|
6419
|
-
PyObject* function = PyMethod_GET_FUNCTION(
|
|
6412
|
+
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
|
|
6420
6413
|
__Pyx_INCREF(__pyx_t_5);
|
|
6421
6414
|
__Pyx_INCREF(function);
|
|
6422
|
-
__Pyx_DECREF_SET(
|
|
6415
|
+
__Pyx_DECREF_SET(__pyx_t_9, function);
|
|
6423
6416
|
__pyx_t_3 = 1;
|
|
6424
6417
|
}
|
|
6425
6418
|
}
|
|
@@ -6434,12 +6427,12 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6434
6427
|
__Pyx_INCREF(__pyx_v_holes);
|
|
6435
6428
|
PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_3, __pyx_v_holes);
|
|
6436
6429
|
__Pyx_GIVEREF(__pyx_v_holes);
|
|
6437
|
-
|
|
6438
|
-
__Pyx_GOTREF(
|
|
6430
|
+
__pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6431
|
+
__Pyx_GOTREF(__pyx_t_17);
|
|
6439
6432
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
6440
|
-
__Pyx_DECREF(
|
|
6441
|
-
__pyx_r =
|
|
6442
|
-
|
|
6433
|
+
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
6434
|
+
__pyx_r = __pyx_t_17;
|
|
6435
|
+
__pyx_t_17 = 0;
|
|
6443
6436
|
goto __pyx_L0;
|
|
6444
6437
|
}
|
|
6445
6438
|
|
|
@@ -6450,25 +6443,25 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6450
6443
|
* return type(geom)([affine_transform(part, matrix) for part in geom.geoms])
|
|
6451
6444
|
* else:
|
|
6452
6445
|
*/
|
|
6453
|
-
|
|
6454
|
-
__Pyx_GOTREF(__pyx_t_9);
|
|
6455
|
-
__pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_startswith); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6446
|
+
__pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_geom, __pyx_n_s_type); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6456
6447
|
__Pyx_GOTREF(__pyx_t_17);
|
|
6457
|
-
|
|
6458
|
-
__pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6448
|
+
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_startswith); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6459
6449
|
__Pyx_GOTREF(__pyx_t_9);
|
|
6460
6450
|
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
|
|
6461
|
-
|
|
6451
|
+
__pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6452
|
+
__Pyx_GOTREF(__pyx_t_17);
|
|
6462
6453
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
6454
|
+
__pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_29 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6455
|
+
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
|
|
6463
6456
|
if (!__pyx_t_29) {
|
|
6464
6457
|
} else {
|
|
6465
6458
|
__pyx_t_2 = __pyx_t_29;
|
|
6466
6459
|
goto __pyx_L18_bool_binop_done;
|
|
6467
6460
|
}
|
|
6468
|
-
|
|
6469
|
-
__Pyx_GOTREF(
|
|
6470
|
-
__pyx_t_29 = (__Pyx_PyString_Equals(
|
|
6471
|
-
__Pyx_DECREF(
|
|
6461
|
+
__pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_geom, __pyx_n_s_type); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6462
|
+
__Pyx_GOTREF(__pyx_t_17);
|
|
6463
|
+
__pyx_t_29 = (__Pyx_PyString_Equals(__pyx_t_17, __pyx_n_s_GeometryCollection, Py_EQ)); if (unlikely(__pyx_t_29 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6464
|
+
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
|
|
6472
6465
|
__pyx_t_2 = __pyx_t_29;
|
|
6473
6466
|
__pyx_L18_bool_binop_done:;
|
|
6474
6467
|
if (__pyx_t_2) {
|
|
@@ -6481,8 +6474,8 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6481
6474
|
* raise ValueError('Type %r not recognized' % geom.type)
|
|
6482
6475
|
*/
|
|
6483
6476
|
__Pyx_XDECREF(__pyx_r);
|
|
6484
|
-
|
|
6485
|
-
__Pyx_GOTREF(
|
|
6477
|
+
__pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6478
|
+
__Pyx_GOTREF(__pyx_t_9);
|
|
6486
6479
|
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_geom, __pyx_n_s_geoms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6487
6480
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6488
6481
|
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
|
|
@@ -6527,7 +6520,7 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6527
6520
|
__pyx_t_1 = 0;
|
|
6528
6521
|
__pyx_t_1 = __pyx_f_7shapely_8speedups_9_speedups_affine_transform(__pyx_v_part, __pyx_v_matrix, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6529
6522
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6530
|
-
if (unlikely(__Pyx_ListComp_Append(
|
|
6523
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6531
6524
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
6532
6525
|
}
|
|
6533
6526
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
@@ -6543,23 +6536,23 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6543
6536
|
}
|
|
6544
6537
|
}
|
|
6545
6538
|
if (!__pyx_t_1) {
|
|
6546
|
-
|
|
6547
|
-
__Pyx_DECREF(
|
|
6548
|
-
__Pyx_GOTREF(
|
|
6539
|
+
__pyx_t_17 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6540
|
+
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
6541
|
+
__Pyx_GOTREF(__pyx_t_17);
|
|
6549
6542
|
} else {
|
|
6550
6543
|
__pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6551
6544
|
__Pyx_GOTREF(__pyx_t_4);
|
|
6552
6545
|
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
|
|
6553
|
-
PyTuple_SET_ITEM(__pyx_t_4, 0+1,
|
|
6554
|
-
__Pyx_GIVEREF(
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
__Pyx_GOTREF(
|
|
6546
|
+
PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_9);
|
|
6547
|
+
__Pyx_GIVEREF(__pyx_t_9);
|
|
6548
|
+
__pyx_t_9 = 0;
|
|
6549
|
+
__pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6550
|
+
__Pyx_GOTREF(__pyx_t_17);
|
|
6558
6551
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
6559
6552
|
}
|
|
6560
6553
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
6561
|
-
__pyx_r =
|
|
6562
|
-
|
|
6554
|
+
__pyx_r = __pyx_t_17;
|
|
6555
|
+
__pyx_t_17 = 0;
|
|
6563
6556
|
goto __pyx_L0;
|
|
6564
6557
|
}
|
|
6565
6558
|
/*else*/ {
|
|
@@ -6569,19 +6562,19 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6569
6562
|
* else:
|
|
6570
6563
|
* raise ValueError('Type %r not recognized' % geom.type) # <<<<<<<<<<<<<<
|
|
6571
6564
|
*/
|
|
6572
|
-
|
|
6573
|
-
__Pyx_GOTREF(
|
|
6574
|
-
__pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Type_r_not_recognized,
|
|
6565
|
+
__pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_geom, __pyx_n_s_type); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6566
|
+
__Pyx_GOTREF(__pyx_t_17);
|
|
6567
|
+
__pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Type_r_not_recognized, __pyx_t_17); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6575
6568
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6576
|
-
__Pyx_DECREF(
|
|
6577
|
-
|
|
6578
|
-
__Pyx_GOTREF(
|
|
6579
|
-
PyTuple_SET_ITEM(
|
|
6569
|
+
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
|
|
6570
|
+
__pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6571
|
+
__Pyx_GOTREF(__pyx_t_17);
|
|
6572
|
+
PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5);
|
|
6580
6573
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
6581
6574
|
__pyx_t_5 = 0;
|
|
6582
|
-
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError,
|
|
6575
|
+
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_17, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6583
6576
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6584
|
-
__Pyx_DECREF(
|
|
6577
|
+
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
|
|
6585
6578
|
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
|
|
6586
6579
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
6587
6580
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
@@ -7430,7 +7423,7 @@ PyMODINIT_FUNC PyInit__speedups(void)
|
|
|
7430
7423
|
#endif
|
|
7431
7424
|
}
|
|
7432
7425
|
|
|
7433
|
-
/* Runtime support code */
|
|
7426
|
+
/* --- Runtime support code --- */
|
|
7434
7427
|
#if CYTHON_REFNANNY
|
|
7435
7428
|
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
|
|
7436
7429
|
PyObject *m = NULL, *p = NULL;
|
|
@@ -8387,9 +8380,6 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = {
|
|
|
8387
8380
|
{(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
|
|
8388
8381
|
{0, 0, 0, 0, 0}
|
|
8389
8382
|
};
|
|
8390
|
-
#ifndef PY_WRITE_RESTRICTED
|
|
8391
|
-
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
|
|
8392
|
-
#endif
|
|
8393
8383
|
static PyMemberDef __pyx_CyFunction_members[] = {
|
|
8394
8384
|
{(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
|
|
8395
8385
|
{0, 0, 0, 0, 0}
|
|
@@ -8544,7 +8534,7 @@ static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject
|
|
|
8544
8534
|
if (size == 0)
|
|
8545
8535
|
return (*meth)(self, NULL);
|
|
8546
8536
|
PyErr_Format(PyExc_TypeError,
|
|
8547
|
-
"%.200s() takes no arguments (%
|
|
8537
|
+
"%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
|
|
8548
8538
|
f->m_ml->ml_name, size);
|
|
8549
8539
|
return NULL;
|
|
8550
8540
|
}
|
|
@@ -8555,7 +8545,7 @@ static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject
|
|
|
8555
8545
|
if (size == 1)
|
|
8556
8546
|
return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
|
|
8557
8547
|
PyErr_Format(PyExc_TypeError,
|
|
8558
|
-
"%.200s() takes exactly one argument (%
|
|
8548
|
+
"%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
|
|
8559
8549
|
f->m_ml->ml_name, size);
|
|
8560
8550
|
return NULL;
|
|
8561
8551
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from shapely.geometry import LineString
|
|
6
|
+
from shapely.geos import ReadingError
|
|
7
|
+
from shapely.wkt import loads
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_error_handler(tmpdir):
|
|
11
|
+
logger = logging.getLogger('shapely.geos')
|
|
12
|
+
logger.setLevel(logging.DEBUG)
|
|
13
|
+
|
|
14
|
+
logfile = str(tmpdir.join('test_error.log'))
|
|
15
|
+
fh = logging.FileHandler(logfile)
|
|
16
|
+
logger.addHandler(fh)
|
|
17
|
+
|
|
18
|
+
# This operation calls error_handler with a format string that
|
|
19
|
+
# has *no* conversion specifiers.
|
|
20
|
+
LineString([(0, 0), (2, 2)]).project(LineString([(1, 1), (1.5, 1.5)]))
|
|
21
|
+
|
|
22
|
+
# This calls error_handler with a format string of "%s" and one
|
|
23
|
+
# value.
|
|
24
|
+
with pytest.raises(ReadingError):
|
|
25
|
+
loads('POINT (LOLWUT)')
|
|
26
|
+
|
|
27
|
+
g = loads('MULTIPOLYGON (((10 20, 10 120, 60 70, 30 70, 30 40, 60 40, 60 70, 90 20, 10 20)))')
|
|
28
|
+
assert g.is_valid == False
|
|
29
|
+
|
|
30
|
+
log = open(logfile).read()
|
|
31
|
+
assert "third argument of GEOSProject_r must be Point*" in log
|
|
32
|
+
assert "Expected number but encountered word: 'LOLWUT'" in log
|
|
33
|
+
assert "Ring Self-intersection at or near point 60 70" in log
|
Shapely-1.5.6/VERSION.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.5.6
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.5.6"
|
|
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
|
|
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
|