From: <js...@us...> - 2008-08-08 12:15:41
|
Revision: 6004 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6004&view=rev Author: jswhit Date: 2008-08-08 12:15:38 +0000 (Fri, 08 Aug 2008) Log Message: ----------- add __geos_major_version__ variable for checking geos version. 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-08 12:09:20 UTC (rev 6003) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-08-08 12:15:38 UTC (rev 6004) @@ -981,9 +981,11 @@ # create a GEOS geometry object. poly = Shape(b) # this is a workaround to avoid - # GEOS_ERROR: TopologyException: found non-noded intersection between ... + # "GEOS_ERROR: TopologyException: + # found non-noded intersection between ..." # with geos 3.0.0 - poly = poly.simplify(1.e-10)[0] + if _geoslib.__geos_major_version__ > 2: + poly = poly.simplify(1.e-10)[0] # 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-08 12:09:20 UTC (rev 6003) +++ trunk/toolkits/basemap/src/_geoslib.c 2008-08-08 12:15:38 UTC (rev 6004) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.8 on Fri Aug 8 06:05:03 2008 */ +/* Generated by Cython 0.9.8 on Fri Aug 8 06:11:34 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -228,7 +228,7 @@ /* Type declarations */ -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":129 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":131 * initGEOS(notice_h, error_h) * * cdef class BaseGeometry: # <<<<<<<<<<<<<< @@ -243,7 +243,7 @@ PyObject *boundary; }; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":257 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":259 * 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":313 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":315 * 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":345 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":347 * self.boundary = b * * cdef class Point(BaseGeometry): # <<<<<<<<<<<<<< @@ -314,6 +314,7 @@ static char __pyx_k_numpy[] = "numpy"; static char __pyx_k___version__[] = "__version__"; static char __pyx_k___geos_version__[] = "__geos_version__"; +static char __pyx_k_2[] = "__geos_major_version__"; static PyObject *__pyx_kp_is_valid; static PyObject *__pyx_kp_geom_type; @@ -330,6 +331,7 @@ static PyObject *__pyx_kp_numpy; static PyObject *__pyx_kp___version__; static PyObject *__pyx_kp___geos_version__; +static PyObject *__pyx_kp_2; static PyObject *__pyx_kp_1; @@ -347,9 +349,9 @@ static PyObject *__pyx_kp_stdout; static PyObject *__pyx_kp_write; -static PyObject *__pyx_kp_2; +static PyObject *__pyx_kp_3; -static char __pyx_k_2[] = "GEOS_NOTICE: %s\n"; +static char __pyx_k_3[] = "GEOS_NOTICE: %s\n"; static void __pyx_f_8_geoslib_notice_h(char *__pyx_v_fmt, char *__pyx_v_msg) { PyObject *__pyx_v_format; @@ -451,7 +453,7 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_write); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyNumber_Remainder(__pyx_kp_2, __pyx_v_warn_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = PyNumber_Remainder(__pyx_kp_3, __pyx_v_warn_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); __pyx_1 = 0; @@ -484,9 +486,9 @@ static PyObject *__pyx_kp_stderr; -static PyObject *__pyx_kp_3; +static PyObject *__pyx_kp_4; -static char __pyx_k_3[] = "GEOS_ERROR: %s\n"; +static char __pyx_k_4[] = "GEOS_ERROR: %s\n"; static void __pyx_f_8_geoslib_error_h(char *__pyx_v_fmt, char *__pyx_v_msg) { PyObject *__pyx_v_format; @@ -588,7 +590,7 @@ Py_DECREF(__pyx_1); __pyx_1 = 0; __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_write); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyNumber_Remainder(__pyx_kp_3, __pyx_v_warn_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = PyNumber_Remainder(__pyx_kp_4, __pyx_v_warn_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); __pyx_1 = 0; @@ -626,7 +628,7 @@ * cdef geos_version(): * return PyString_FromString(GEOSversion()) # <<<<<<<<<<<<<< * __geos_version__ = geos_version() # module variable. - * #if __geos_version__ != "2.2.3-CAPI-1.1.1": + * __geos_major_version__ = GEOS_VERSION_MAJOR */ __pyx_1 = PyString_FromString(GEOSversion()); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_r = __pyx_1; @@ -643,7 +645,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":134 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":136 * cdef public object boundary * * def is_valid(self): # <<<<<<<<<<<<<< @@ -657,7 +659,7 @@ PyObject *__pyx_r; char __pyx_1; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":136 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":138 * def is_valid(self): * cdef char valid * valid = GEOSisValid(self._geom) # <<<<<<<<<<<<<< @@ -666,7 +668,7 @@ */ __pyx_v_valid = GEOSisValid(((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":137 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":139 * cdef char valid * valid = GEOSisValid(self._geom) * if valid: # <<<<<<<<<<<<<< @@ -676,7 +678,7 @@ __pyx_1 = __pyx_v_valid; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":138 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":140 * valid = GEOSisValid(self._geom) * if valid: * return True # <<<<<<<<<<<<<< @@ -690,7 +692,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":140 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":142 * return True * else: * return False # <<<<<<<<<<<<<< @@ -708,7 +710,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":142 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":144 * return False * * def geom_type(self): # <<<<<<<<<<<<<< @@ -721,14 +723,14 @@ PyObject *__pyx_r; PyObject *__pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":143 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":145 * * def geom_type(self): * return PyString_FromString(GEOSGeomType(self._geom)) # <<<<<<<<<<<<<< * * def within(self, BaseGeometry geom): */ - __pyx_1 = PyString_FromString(GEOSGeomType(((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = PyString_FromString(GEOSGeomType(((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -743,7 +745,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":145 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":147 * return PyString_FromString(GEOSGeomType(self._geom)) * * def within(self, BaseGeometry geom): # <<<<<<<<<<<<<< @@ -758,9 +760,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 = 145; __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 = 147; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":148 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":150 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -769,7 +771,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":149 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":151 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -778,7 +780,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":150 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":152 * g1 = self._geom * g2 = geom._geom * answer = GEOSWithin(g1, g2) # <<<<<<<<<<<<<< @@ -787,7 +789,7 @@ */ __pyx_v_answer = GEOSWithin(__pyx_v_g1, __pyx_v_g2); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":151 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":153 * g2 = geom._geom * answer = GEOSWithin(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -797,7 +799,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":152 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":154 * answer = GEOSWithin(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -811,7 +813,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":154 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":156 * return True * else: * return False # <<<<<<<<<<<<<< @@ -833,7 +835,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":156 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":158 * return False * * def simplify(self, tol): # <<<<<<<<<<<<<< @@ -847,11 +849,11 @@ static PyObject *__pyx_kp_append; static PyObject *__pyx_kp_NotImplementedError; -static PyObject *__pyx_kp_4; +static PyObject *__pyx_kp_5; static PyObject *__pyx_builtin_NotImplementedError; -static char __pyx_k_4[] = "intersections of type '%s' not yet implemented"; +static char __pyx_k_5[] = "intersections of type '%s' not yet implemented"; static PyObject *__pyx_pf_8_geoslib_12BaseGeometry_simplify(PyObject *__pyx_v_self, PyObject *__pyx_v_tol); /*proto*/ static PyObject *__pyx_pf_8_geoslib_12BaseGeometry_simplify(PyObject *__pyx_v_self, PyObject *__pyx_v_tol) { @@ -876,7 +878,7 @@ __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":160 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":162 * cdef double tolerance * cdef int numgeoms, i, typeid * g1 = self._geom # <<<<<<<<<<<<<< @@ -885,7 +887,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":161 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":163 * cdef int numgeoms, i, typeid * g1 = self._geom * if GEOS_VERSION_MAJOR > 2: # <<<<<<<<<<<<<< @@ -895,17 +897,17 @@ __pyx_1 = (GEOS_VERSION_MAJOR > 2); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":162 + /* "/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 = 162; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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":163 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":165 * if GEOS_VERSION_MAJOR > 2: * tolerance = tol * g3 = GEOSSimplify(g1, tolerance) # <<<<<<<<<<<<<< @@ -917,7 +919,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":165 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":167 * g3 = GEOSSimplify(g1, tolerance) * else: * g3 = g1 # <<<<<<<<<<<<<< @@ -928,7 +930,7 @@ } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":166 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":168 * else: * g3 = g1 * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< @@ -937,7 +939,7 @@ */ __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":167 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":169 * g3 = g1 * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -947,42 +949,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":168 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":170 * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = Polygon(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 = 168; __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_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":169 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":171 * if typeid == GEOS_POLYGON: * b = _get_coords(g3) * p = Polygon(b) # <<<<<<<<<<<<<< * pout = [p] * elif typeid == GEOS_LINESTRING: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__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_Polygon), ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __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 = 171; __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; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":170 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":172 * 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 = 170; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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); @@ -991,7 +993,7 @@ goto __pyx_L5; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":171 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":173 * p = Polygon(b) * pout = [p] * elif typeid == GEOS_LINESTRING: # <<<<<<<<<<<<<< @@ -1001,42 +1003,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":172 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":174 * pout = [p] * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = LineString(b) * pout = [p] */ - __pyx_4 = __pyx_f_8_geoslib__get_coords(__pyx_v_g3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_4; __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":173 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":175 * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) * p = LineString(b) # <<<<<<<<<<<<<< * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __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 = 173; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_4; __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":174 + /* "/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 = 174; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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); @@ -1045,7 +1047,7 @@ goto __pyx_L5; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":175 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":177 * p = LineString(b) * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: # <<<<<<<<<<<<<< @@ -1055,7 +1057,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":176 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":178 * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -1064,19 +1066,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":177 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":179 * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) * pout = [] # <<<<<<<<<<<<<< * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) */ - __pyx_4 = PyList_New(0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":178 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":180 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -1085,7 +1087,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":179 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":181 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -1094,48 +1096,48 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":180 + /* "/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 = 180; __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 = 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":181 + /* "/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) * elif typeid == GEOS_MULTILINESTRING: */ - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 181; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":182 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":184 * b = _get_coords(gout) * p = Polygon(b) * pout.append(p) # <<<<<<<<<<<<<< * 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 = 182; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":183 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":185 * p = Polygon(b) * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: # <<<<<<<<<<<<<< @@ -1145,7 +1147,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":184 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":186 * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -1154,19 +1156,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":185 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":187 * elif typeid == GEOS_MULTILINESTRING: * 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 = 185; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":186 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":188 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -1175,7 +1177,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":187 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":189 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -1184,80 +1186,80 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":188 + /* "/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 = 188; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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":189 + /* "/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) * else: */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 189; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":190 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":192 * b = _get_coords(gout) * p = LineString(b) * pout.append(p) # <<<<<<<<<<<<<< * 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 = 190; __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 = 192; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } goto __pyx_L5; } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":192 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":194 * pout.append(p) * 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 = 192; __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 = 194; __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":193 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":195 * else: * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< * GEOSGeom_destroy(g3) * return pout */ - __pyx_3 = PyNumber_Remainder(__pyx_kp_4, __pyx_v_type); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __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 = 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;} 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 = 193; __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 = 195; __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 = 193; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1;} } __pyx_L5:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":194 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":196 * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< @@ -1266,7 +1268,7 @@ */ GEOSGeom_destroy(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":195 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":197 * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) * return pout # <<<<<<<<<<<<<< @@ -1292,7 +1294,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":197 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":199 * return pout * * def intersects(self, BaseGeometry geom): # <<<<<<<<<<<<<< @@ -1307,9 +1309,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 = 197; __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 = 199; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":200 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":202 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -1318,7 +1320,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":201 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":203 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -1327,7 +1329,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":202 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":204 * g1 = self._geom * g2 = geom._geom * answer = GEOSIntersects(g1, g2) # <<<<<<<<<<<<<< @@ -1336,7 +1338,7 @@ */ __pyx_v_answer = GEOSIntersects(__pyx_v_g1, __pyx_v_g2); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":203 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":205 * g2 = geom._geom * answer = GEOSIntersects(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -1346,7 +1348,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":204 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":206 * answer = GEOSIntersects(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -1360,7 +1362,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":206 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":208 * return True * else: * return False # <<<<<<<<<<<<<< @@ -1382,7 +1384,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":208 +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":210 * return False * * def intersection(self, BaseGeometry geom): # <<<<<<<<<<<<<< @@ -1390,9 +1392,9 @@ * cdef char answer */ -static PyObject *__pyx_kp_5; +static PyObject *__pyx_kp_6; -static char __pyx_k_5[] = "intersections of type '%s' not yet implemented"; +static char __pyx_k_6[] = "intersections of type '%s' not yet implemented"; static PyObject *__pyx_pf_8_geoslib_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ static PyObject *__pyx_pf_8_geoslib_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { @@ -1415,9 +1417,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 = 208; __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 = 210; __pyx_clineno = __LINE__; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":212 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":214 * cdef char answer * cdef int numgeoms, i, typeid * g1 = self._geom # <<<<<<<<<<<<<< @@ -1426,7 +1428,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":213 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":215 * cdef int numgeoms, i, typeid * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -1435,7 +1437,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_8_geoslib_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":214 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":216 * g1 = self._geom * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) # <<<<<<<<<<<<<< @@ -1444,7 +1446,7 @@ */ __pyx_v_g3 = GEOSIntersection(__pyx_v_g1, __pyx_v_g2); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":215 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":217 * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< @@ -1453,7 +1455,7 @@ */ __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":216 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":218 * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -1463,42 +1465,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":217 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":219 * 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 = 217; __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 = 219; __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":218 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":220 * 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 = 218; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __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 = 218; __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 = 220; __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":219 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":221 * 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 = 219; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __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); @@ -1507,7 +1509,7 @@ goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":220 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":222 * p = Polygon(b) * pout = [p] * elif typeid == GEOS_LINESTRING: # <<<<<<<<<<<<<< @@ -1517,42 +1519,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":221 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":223 * 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 = 221; __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 = 223; __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":222 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":224 * 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 = 222; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __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 = 222; __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 = 224; __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":223 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":225 * 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 = 223; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __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); @@ -1561,7 +1563,7 @@ goto __pyx_L4; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":224 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":226 * p = LineString(b) * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: # <<<<<<<<<<<<<< @@ -1571,7 +1573,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":225 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":227 * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -1580,19 +1582,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":226 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":228 * 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 = 226; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __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":227 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":229 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -1601,7 +1603,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":228 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":230 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -1610,48 +1612,48 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":229 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":231 * 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 = 229; __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 = 231; __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":230 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":232 * 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 = 230; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __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 = 230; __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 = 232; __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":231 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":233 * 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 = 231; __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 = 233; __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":232 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":234 * p = Polygon(b) * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: # <<<<<<<<<<<<<< @@ -1661,7 +1663,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":233 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":235 * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -1670,19 +1672,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":234 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":236 * 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 = 234; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyList_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __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":235 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":237 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -1691,7 +1693,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":236 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":238 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -1700,80 +1702,80 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3, __pyx_v_i); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":237 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":239 * 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 = 237; __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 = 239; __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":238 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":240 * 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 = 238; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __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 = 238; __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 = 240; __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":239 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geoslib.pyx":241 * 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 = 239; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx... [truncated message content] |