From: <js...@us...> - 2008-08-09 16:18:23
|
Revision: 6013 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6013&view=rev Author: jswhit Date: 2008-08-09 16:18:19 +0000 (Sat, 09 Aug 2008) Log Message: ----------- simplify treatment of dodgy geometries in GEOS 3 Modified Paths: -------------- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py trunk/toolkits/basemap/src/_geoslib.c trunk/toolkits/basemap/src/_geoslib.pyx Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-08-09 14:49:42 UTC (rev 6012) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-08-09 16:18:19 UTC (rev 6013) @@ -985,7 +985,7 @@ # found non-noded intersection between ..." # with geos 3.0.0 if _geoslib.__geos_major_version__ > 2: - poly = poly.simplify(1.e-10)[0] + poly = poly.simplify(1.e-10) # if geometry instersects map projection # region, and doesn't have any invalid points, process it. if goodmask.all() and poly.intersects(boundarypolyxy): Modified: trunk/toolkits/basemap/src/_geoslib.c =================================================================== --- trunk/toolkits/basemap/src/_geoslib.c 2008-08-09 14:49:42 UTC (rev 6012) +++ trunk/toolkits/basemap/src/_geoslib.c 2008-08-09 16:18:19 UTC (rev 6013) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.8 on Fri Aug 8 06:11:34 2008 */ +/* Generated by Cython 0.9.8 on Sat Aug 9 10:17:12 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -181,6 +181,8 @@ static void __Pyx_WriteUnraisable(const char *name); /*proto*/ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + static INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (PyList_Append(L, x) < 0) return NULL; @@ -192,8 +194,6 @@ } } -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ - static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static INLINE PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i, int is_unsigned) { @@ -243,7 +243,7 @@ PyObject *boundary; }; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":259 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":249 * return (self.__class__,(self.boundary,)) * * cdef class Polygon(BaseGeometry): # <<<<<<<<<<<<<< @@ -255,7 +255,7 @@ struct __pyx_obj_8_geoslib_BaseGeometry __pyx_base; }; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":315 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":305 * return area * * cdef class LineString(BaseGeometry): # <<<<<<<<<<<<<< @@ -267,7 +267,7 @@ struct __pyx_obj_8_geoslib_BaseGeometry __pyx_base; }; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":347 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":337 * self.boundary = b * * cdef class Point(BaseGeometry): # <<<<<<<<<<<<<< @@ -843,10 +843,8 @@ * cdef double tolerance */ -static char __pyx_k_append[] = "append"; static char __pyx_k_NotImplementedError[] = "NotImplementedError"; -static PyObject *__pyx_kp_append; static PyObject *__pyx_kp_NotImplementedError; static PyObject *__pyx_kp_5; @@ -862,421 +860,302 @@ GEOSGeom *__pyx_v_gout; double __pyx_v_tolerance; int __pyx_v_numgeoms; - int __pyx_v_i; int __pyx_v_typeid; PyObject *__pyx_v_b; PyObject *__pyx_v_p; - PyObject *__pyx_v_pout; PyObject *__pyx_v_type; PyObject *__pyx_r; - int __pyx_1; - double __pyx_2; + double __pyx_1; + int __pyx_2; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; __pyx_v_b = Py_None; Py_INCREF(Py_None); __pyx_v_p = Py_None; Py_INCREF(Py_None); - __pyx_v_pout = Py_None; Py_INCREF(Py_None); __pyx_v_type = Py_None; Py_INCREF(Py_None); /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":162 * cdef double tolerance * cdef int numgeoms, i, typeid * g1 = self._geom # <<<<<<<<<<<<<< - * if GEOS_VERSION_MAJOR > 2: - * tolerance = tol + * tolerance = tol + * g3 = GEOSSimplify(g1,tolerance) */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":163 * cdef int numgeoms, i, typeid * g1 = self._geom - * if GEOS_VERSION_MAJOR > 2: # <<<<<<<<<<<<<< - * tolerance = tol - * g3 = GEOSSimplify(g1, tolerance) + * tolerance = tol # <<<<<<<<<<<<<< + * g3 = GEOSSimplify(g1,tolerance) + * typeid = GEOSGeomTypeId(g3) */ - __pyx_1 = (GEOS_VERSION_MAJOR > 2); - if (__pyx_1) { + __pyx_1 = __pyx_PyFloat_AsDouble(__pyx_v_tol); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_v_tolerance = __pyx_1; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":164 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":164 * g1 = self._geom - * if GEOS_VERSION_MAJOR > 2: - * tolerance = tol # <<<<<<<<<<<<<< - * g3 = GEOSSimplify(g1, tolerance) - * else: - */ - __pyx_2 = __pyx_PyFloat_AsDouble(__pyx_v_tol); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_v_tolerance = __pyx_2; - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":165 - * if GEOS_VERSION_MAJOR > 2: - * tolerance = tol - * g3 = GEOSSimplify(g1, tolerance) # <<<<<<<<<<<<<< - * else: - * g3 = g1 - */ - __pyx_v_g3 = GEOSSimplify(__pyx_v_g1, __pyx_v_tolerance); - goto __pyx_L4; - } - /*else*/ { - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":167 - * g3 = GEOSSimplify(g1, tolerance) - * else: - * g3 = g1 # <<<<<<<<<<<<<< + * tolerance = tol + * g3 = GEOSSimplify(g1,tolerance) # <<<<<<<<<<<<<< * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: */ - __pyx_v_g3 = __pyx_v_g1; - } - __pyx_L4:; + __pyx_v_g3 = GEOSSimplify(__pyx_v_g1, __pyx_v_tolerance); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":168 - * else: - * g3 = g1 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":165 + * tolerance = tol + * g3 = GEOSSimplify(g1,tolerance) * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< * if typeid == GEOS_POLYGON: * b = _get_coords(g3) */ __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":169 - * g3 = g1 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":166 + * g3 = GEOSSimplify(g1,tolerance) * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< * b = _get_coords(g3) * p = Polygon(b) */ - __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); - if (__pyx_1) { + __pyx_2 = (__pyx_v_typeid == GEOS_POLYGON); + if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":170 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":167 * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = Polygon(b) - * pout = [p] + * elif typeid == GEOS_LINESTRING: */ - __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":171 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":168 * if typeid == GEOS_POLYGON: * b = _get_coords(g3) * p = Polygon(b) # <<<<<<<<<<<<<< - * pout = [p] * elif typeid == GEOS_LINESTRING: + * b = _get_coords(g3) */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); - __pyx_4 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_4; __pyx_4 = 0; + goto __pyx_L4; + } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":172 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":169 * b = _get_coords(g3) * p = Polygon(b) - * pout = [p] # <<<<<<<<<<<<<< - * elif typeid == GEOS_LINESTRING: - * b = _get_coords(g3) - */ - __pyx_3 = PyList_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_p); - PyList_SET_ITEM(__pyx_3, 0, __pyx_v_p); - Py_DECREF(__pyx_v_pout); - __pyx_v_pout = ((PyObject *)__pyx_3); - __pyx_3 = 0; - goto __pyx_L5; - } - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":173 - * p = Polygon(b) - * pout = [p] * elif typeid == GEOS_LINESTRING: # <<<<<<<<<<<<<< * b = _get_coords(g3) * p = LineString(b) */ - __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); - if (__pyx_1) { + __pyx_2 = (__pyx_v_typeid == GEOS_LINESTRING); + if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":174 - * pout = [p] + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":170 + * p = Polygon(b) * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = LineString(b) - * pout = [p] + * # for multi-geom structures, just return first one. */ - __pyx_4 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_b); - __pyx_v_b = __pyx_4; - __pyx_4 = 0; + __pyx_v_b = __pyx_3; + __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":175 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":171 * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) * p = LineString(b) # <<<<<<<<<<<<<< - * pout = [p] + * # for multi-geom structures, just return first one. * elif typeid == GEOS_MULTIPOLYGON: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_b); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); - __pyx_4 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_b); + __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; Py_DECREF(__pyx_v_p); - __pyx_v_p = __pyx_4; - __pyx_4 = 0; - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":176 - * b = _get_coords(g3) - * p = LineString(b) - * pout = [p] # <<<<<<<<<<<<<< - * elif typeid == GEOS_MULTIPOLYGON: - * numgeoms = GEOSGetNumGeometries(g3) - */ - __pyx_3 = PyList_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_p); - PyList_SET_ITEM(__pyx_3, 0, __pyx_v_p); - Py_DECREF(__pyx_v_pout); - __pyx_v_pout = ((PyObject *)__pyx_3); + __pyx_v_p = __pyx_3; __pyx_3 = 0; - goto __pyx_L5; + goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":177 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":173 * p = LineString(b) - * pout = [p] + * # for multi-geom structures, just return first one. * elif typeid == GEOS_MULTIPOLYGON: # <<<<<<<<<<<<<< * numgeoms = GEOSGetNumGeometries(g3) - * pout = [] + * gout = GEOSGetGeometryN(g3, 0) */ - __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); - if (__pyx_1) { + __pyx_2 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); + if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":178 - * pout = [p] + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":174 + * # for multi-geom structures, just return first one. * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< - * pout = [] - * for i from 0 <= i < numgeoms: + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":179 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":175 * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) - * pout = [] # <<<<<<<<<<<<<< - * for i from 0 <= i < numgeoms: - * gout = GEOSGetGeometryN(g3, i) + * gout = GEOSGetGeometryN(g3, 0) # <<<<<<<<<<<<<< + * b = _get_coords(gout) + * p = Polygon(b) */ - __pyx_4 = PyList_New(0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_pout); - __pyx_v_pout = ((PyObject *)__pyx_4); - __pyx_4 = 0; + __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":180 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":176 * numgeoms = GEOSGetNumGeometries(g3) - * pout = [] - * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< - * gout = GEOSGetGeometryN(g3, i) - * b = _get_coords(gout) - */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":181 - * pout = [] - * for i from 0 <= i < numgeoms: - * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< - * b = _get_coords(gout) - * p = Polygon(b) - */ - __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i); - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":182 - * for i from 0 <= i < numgeoms: - * gout = GEOSGetGeometryN(g3, i) - * b = _get_coords(gout) # <<<<<<<<<<<<<< - * p = Polygon(b) - * pout.append(p) - */ - __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_b); - __pyx_v_b = __pyx_3; - __pyx_3 = 0; - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":183 - * gout = GEOSGetGeometryN(g3, i) - * b = _get_coords(gout) - * p = Polygon(b) # <<<<<<<<<<<<<< - * pout.append(p) + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) # <<<<<<<<<<<<<< + * p = Polygon(b) * elif typeid == GEOS_MULTILINESTRING: */ - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_b); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_b); - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; - Py_DECREF(__pyx_v_p); - __pyx_v_p = __pyx_3; - __pyx_3 = 0; + __pyx_4 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(__pyx_v_b); + __pyx_v_b = __pyx_4; + __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":184 - * b = _get_coords(gout) - * p = Polygon(b) - * pout.append(p) # <<<<<<<<<<<<<< + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":177 + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) + * p = Polygon(b) # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_4 = __Pyx_PyObject_Append(__pyx_v_pout, __pyx_v_p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - } - goto __pyx_L5; + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_INCREF(__pyx_v_b); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); + __pyx_4 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; + Py_DECREF(__pyx_v_p); + __pyx_v_p = __pyx_4; + __pyx_4 = 0; + goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":185 - * p = Polygon(b) - * pout.append(p) + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":178 + * b = _get_coords(gout) + * p = Polygon(b) * elif typeid == GEOS_MULTILINESTRING: # <<<<<<<<<<<<<< * numgeoms = GEOSGetNumGeometries(g3) - * pout = [] + * gout = GEOSGetGeometryN(g3, 0) */ - __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); - if (__pyx_1) { + __pyx_2 = (__pyx_v_typeid == GEOS_MULTILINESTRING); + if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":186 - * pout.append(p) + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":179 + * p = Polygon(b) * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< - * pout = [] - * for i from 0 <= i < numgeoms: + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":187 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":180 * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) - * pout = [] # <<<<<<<<<<<<<< - * for i from 0 <= i < numgeoms: - * gout = GEOSGetGeometryN(g3, i) + * gout = GEOSGetGeometryN(g3, 0) # <<<<<<<<<<<<<< + * b = _get_coords(gout) + * p = LineString(b) */ - __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_pout); - __pyx_v_pout = ((PyObject *)__pyx_3); - __pyx_3 = 0; + __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, 0); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":188 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":181 * numgeoms = GEOSGetNumGeometries(g3) - * pout = [] - * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< - * gout = GEOSGetGeometryN(g3, i) - * b = _get_coords(gout) - */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":189 - * pout = [] - * for i from 0 <= i < numgeoms: - * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< - * b = _get_coords(gout) - * p = LineString(b) - */ - __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i); - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":190 - * for i from 0 <= i < numgeoms: - * gout = GEOSGetGeometryN(g3, i) - * b = _get_coords(gout) # <<<<<<<<<<<<<< - * p = LineString(b) - * pout.append(p) - */ - __pyx_4 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_b); - __pyx_v_b = __pyx_4; - __pyx_4 = 0; - - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":191 - * gout = GEOSGetGeometryN(g3, i) - * b = _get_coords(gout) - * p = LineString(b) # <<<<<<<<<<<<<< - * pout.append(p) + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) # <<<<<<<<<<<<<< + * p = LineString(b) * else: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_b); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); - __pyx_4 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; - Py_DECREF(__pyx_v_p); - __pyx_v_p = __pyx_4; - __pyx_4 = 0; + __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(__pyx_v_b); + __pyx_v_b = __pyx_3; + __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":192 - * b = _get_coords(gout) - * p = LineString(b) - * pout.append(p) # <<<<<<<<<<<<<< + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":182 + * gout = GEOSGetGeometryN(g3, 0) + * b = _get_coords(gout) + * p = LineString(b) # <<<<<<<<<<<<<< * else: * type = PyString_FromString(GEOSGeomType(g3)) */ - __pyx_3 = __Pyx_PyObject_Append(__pyx_v_pout, __pyx_v_p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - } - goto __pyx_L5; + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_INCREF(__pyx_v_b); + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_b); + __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; + Py_DECREF(__pyx_v_p); + __pyx_v_p = __pyx_3; + __pyx_3 = 0; + goto __pyx_L4; } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":194 - * pout.append(p) + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":184 + * p = LineString(b) * else: * type = PyString_FromString(GEOSGeomType(g3)) # <<<<<<<<<<<<<< * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) */ - __pyx_4 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_type); __pyx_v_type = __pyx_4; __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":195 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":185 * else: * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< * GEOSGeom_destroy(g3) - * return pout + * return p */ - __pyx_3 = PyNumber_Remainder(__pyx_kp_5, __pyx_v_type); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyNumber_Remainder(__pyx_kp_5, __pyx_v_type); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; - __pyx_3 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} } - __pyx_L5:; + __pyx_L4:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":196 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":186 * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< - * return pout + * return p * */ GEOSGeom_destroy(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":197 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":187 * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) - * return pout # <<<<<<<<<<<<<< + * return p # <<<<<<<<<<<<<< * * def intersects(self, BaseGeometry geom): */ - Py_INCREF(__pyx_v_pout); - __pyx_r = __pyx_v_pout; + Py_INCREF(__pyx_v_p); + __pyx_r = __pyx_v_p; goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); @@ -1289,13 +1168,12 @@ __pyx_L0:; Py_DECREF(__pyx_v_b); Py_DECREF(__pyx_v_p); - Py_DECREF(__pyx_v_pout); Py_DECREF(__pyx_v_type); return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":199 - * return pout +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":189 + * return p * * def intersects(self, BaseGeometry geom): # <<<<<<<<<<<<<< * cdef GEOSGeom *g1, *g2 @@ -1309,9 +1187,9 @@ char __pyx_v_answer; PyObject *__pyx_r; char __pyx_1; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_8_geoslib_BaseGeometry, 1, "geom", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_8_geoslib_BaseGeometry, 1, "geom", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":202 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":192 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -1320,7 +1198,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":203 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":193 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -1329,7 +1207,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":204 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":194 * g1 = self._geom * g2 = geom._geom * answer = GEOSIntersects(g1, g2) # <<<<<<<<<<<<<< @@ -1338,7 +1216,7 @@ */ __pyx_v_answer = GEOSIntersects(__pyx_v_g1, __pyx_v_g2); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":205 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":195 * g2 = geom._geom * answer = GEOSIntersects(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -1348,7 +1226,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":206 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":196 * answer = GEOSIntersects(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -1362,7 +1240,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":208 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":198 * return True * else: * return False # <<<<<<<<<<<<<< @@ -1384,7 +1262,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":210 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":200 * return False * * def intersection(self, BaseGeometry geom): # <<<<<<<<<<<<<< @@ -1392,6 +1270,10 @@ * cdef char answer */ +static char __pyx_k_append[] = "append"; + +static PyObject *__pyx_kp_append; + static PyObject *__pyx_kp_6; static char __pyx_k_6[] = "intersections of type '%s' not yet implemented"; @@ -1417,9 +1299,9 @@ __pyx_v_p = Py_None; Py_INCREF(Py_None); __pyx_v_pout = Py_None; Py_INCREF(Py_None); __pyx_v_type = Py_None; Py_INCREF(Py_None); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_8_geoslib_BaseGeometry, 1, "geom", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_8_geoslib_BaseGeometry, 1, "geom", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":214 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":204 * cdef char answer * cdef int numgeoms, i, typeid * g1 = self._geom # <<<<<<<<<<<<<< @@ -1428,7 +1310,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":215 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":205 * cdef int numgeoms, i, typeid * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -1437,7 +1319,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":216 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":206 * g1 = self._geom * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) # <<<<<<<<<<<<<< @@ -1446,7 +1328,7 @@ */ __pyx_v_g3 = GEOSIntersection(__pyx_v_g1, __pyx_v_g2); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":217 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":207 * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< @@ -1455,7 +1337,7 @@ */ __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":218 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":208 * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -1465,42 +1347,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":219 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":209 * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = Polygon(b) * pout = [p] */ - __pyx_2 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":220 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":210 * if typeid == GEOS_POLYGON: * b = _get_coords(g3) * p = Polygon(b) # <<<<<<<<<<<<<< * pout = [p] * elif typeid == GEOS_LINESTRING: */ - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":221 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":211 * b = _get_coords(g3) * p = Polygon(b) * pout = [p] # <<<<<<<<<<<<<< * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) */ - __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); Py_DECREF(__pyx_v_pout); @@ -1509,7 +1391,7 @@ goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":222 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":212 * p = Polygon(b) * pout = [p] * elif typeid == GEOS_LINESTRING: # <<<<<<<<<<<<<< @@ -1519,42 +1401,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":223 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":213 * pout = [p] * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = LineString(b) * pout = [p] */ - __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":224 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":214 * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) * p = LineString(b) # <<<<<<<<<<<<<< * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: */ - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":225 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":215 * b = _get_coords(g3) * p = LineString(b) * pout = [p] # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); Py_DECREF(__pyx_v_pout); @@ -1563,7 +1445,7 @@ goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":226 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":216 * p = LineString(b) * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: # <<<<<<<<<<<<<< @@ -1573,7 +1455,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":227 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":217 * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -1582,19 +1464,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":228 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":218 * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) * pout = [] # <<<<<<<<<<<<<< * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) */ - __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = ((PyObject *)__pyx_3); __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":229 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":219 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -1603,7 +1485,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":230 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":220 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -1612,48 +1494,48 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":231 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":221 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) # <<<<<<<<<<<<<< * p = Polygon(b) * pout.append(p) */ - __pyx_2 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":232 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":222 * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) * p = Polygon(b) # <<<<<<<<<<<<<< * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); - __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":233 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":223 * b = _get_coords(gout) * p = Polygon(b) * pout.append(p) # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_3 = __Pyx_PyObject_Append(__pyx_v_pout, __pyx_v_p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_PyObject_Append(__pyx_v_pout, __pyx_v_p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":234 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":224 * p = Polygon(b) * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: # <<<<<<<<<<<<<< @@ -1663,7 +1545,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":235 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":225 * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -1672,19 +1554,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":236 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":226 * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) * pout = [] # <<<<<<<<<<<<<< * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) */ - __pyx_2 = PyList_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyList_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = ((PyObject *)__pyx_2); __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":237 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":227 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -1693,7 +1575,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":238 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":228 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -1702,80 +1584,80 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":239 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":229 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) # <<<<<<<<<<<<<< * p = LineString(b) * pout.append(p) */ - __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __pyx_f_8_geoslib__get_coords(__pyx_v_gout); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":240 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":230 * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) * p = LineString(b) # <<<<<<<<<<<<<< * pout.append(p) * else: */ - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); - __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyObject_Call(((PyObject*)__pyx_ptype_8_geoslib_LineString), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":241 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":231 * b = _get_coords(gout) * p = LineString(b) * pout.append(p) # <<<<<<<<<<<<<< * else: * type = PyString_FromString(GEOSGeomType(g3)) */ - __pyx_2 = __Pyx_PyObject_Append(__pyx_v_pout, __pyx_v_p); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __Pyx_PyObject_Append(__pyx_v_pout, __pyx_v_p); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; } goto __pyx_L4; } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":243 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":233 * pout.append(p) * else: * type = PyString_FromString(GEOSGeomType(g3)) # <<<<<<<<<<<<<< * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) */ - __pyx_3 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_v_type); __pyx_v_type = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":244 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":234 * else: * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< * GEOSGeom_destroy(g3) * return pout */ - __pyx_2 = PyNumber_Remainder(__pyx_kp_6, __pyx_v_type); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyNumber_Remainder(__pyx_kp_6, __pyx_v_type); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyObject_Call(__pyx_builtin_NotImplementedError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1;} } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":245 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":235 * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< @@ -1784,7 +1666,7 @@ */ GEOSGeom_destroy(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":246 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":236 * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) * return pout # <<<<<<<<<<<<<< @@ -1810,7 +1692,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":248 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":238 * return pout * * def get_coords(self): # <<<<<<<<<<<<<< @@ -1823,14 +1705,14 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":249 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":239 * * def get_coords(self): * return _get_coords(self._geom) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_1 = __pyx_f_8_geoslib__get_coords(((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = __pyx_f_8_geoslib__get_coords(((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -1845,7 +1727,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":251 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":241 * return _get_coords(self._geom) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -1857,7 +1739,7 @@ static char __pyx_doc_8_geoslib_12BaseGeometry___dealloc__[] = "destroy GEOS geometry"; static void __pyx_pf_8_geoslib_12BaseGeometry___dealloc__(PyObject *__pyx_v_self) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":253 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":243 * def __dealloc__(self): * """destroy GEOS geometry""" * GEOSGeom_destroy(self._geom) # <<<<<<<<<<<<<< @@ -1868,7 +1750,7 @@ } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":255 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":245 * GEOSGeom_destroy(self._geom) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -1888,18 +1770,18 @@ PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":257 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":247 * def __reduce__(self): * """special method that allows geos instance to be pickled""" * return (self.__class__,(self.boundary,)) # <<<<<<<<<<<<<< * * cdef class Polygon(BaseGeometry): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0];... [truncated message content] |