From: <js...@us...> - 2007-11-13 21:29:35
|
Revision: 4256 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4256&view=rev Author: jswhit Date: 2007-11-13 13:29:33 -0800 (Tue, 13 Nov 2007) Log Message: ----------- plug memory leaks Modified Paths: -------------- trunk/toolkits/basemap-testing/src/geos.c trunk/toolkits/basemap-testing/src/geos.pyx Modified: trunk/toolkits/basemap-testing/src/geos.c =================================================================== --- trunk/toolkits/basemap-testing/src/geos.c 2007-11-13 21:13:04 UTC (rev 4255) +++ trunk/toolkits/basemap-testing/src/geos.c 2007-11-13 21:29:33 UTC (rev 4256) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Tue Nov 13 13:39:59 2007 */ +/* Generated by Cython 0.9.6.7 on Tue Nov 13 14:28:16 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -142,6 +142,8 @@ static PyObject *__pyx_n_intersects; static PyObject *__pyx_n_intersection; static PyObject *__pyx_n_get_coords; +static PyObject *__pyx_n___dealloc__; +static PyObject *__pyx_n___reduce__; static PyObject *__pyx_n___init__; static PyObject *__pyx_n_area; @@ -165,31 +167,31 @@ __pyx_v_message = Py_None; Py_INCREF(Py_None); __pyx_v_warn_msg = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":99 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":100 * * cdef void notice_h(char *fmt, char*msg): * format = PyString_FromString(fmt) # <<<<<<<<<<<<<< * message = PyString_FromString(msg) * try: */ - __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;} Py_DECREF(__pyx_v_format); __pyx_v_format = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":100 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":101 * cdef void notice_h(char *fmt, char*msg): * format = PyString_FromString(fmt) * message = PyString_FromString(msg) # <<<<<<<<<<<<<< * try: * warn_msg = format % message */ - __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; goto __pyx_L1;} Py_DECREF(__pyx_v_message); __pyx_v_message = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":101 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":102 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -198,14 +200,14 @@ */ /*try:*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":102 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":103 * message = PyString_FromString(msg) * try: * warn_msg = format % message # <<<<<<<<<<<<<< * except: * warn_msg = format */ - __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L2;} + __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L2;} Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_1; __pyx_1 = 0; @@ -214,7 +216,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":103 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":104 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -223,10 +225,10 @@ */ /*except:*/ { __Pyx_AddTraceback("geos.notice_h"); - __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L1;} + __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":104 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":105 * warn_msg = format % message * except: * warn_msg = format # <<<<<<<<<<<<<< @@ -240,23 +242,23 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":105 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":106 * except: * warn_msg = format * sys.stdout.write('GEOS_NOTICE: %s\n' % warn_msg) # <<<<<<<<<<<<<< * * cdef void error_h(char *fmt, char*msg): */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyNumber_Remainder(__pyx_k7p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} + __pyx_2 = PyNumber_Remainder(__pyx_k7p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; @@ -290,31 +292,31 @@ __pyx_v_message = Py_None; Py_INCREF(Py_None); __pyx_v_warn_msg = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":108 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":109 * * cdef void error_h(char *fmt, char*msg): * format = PyString_FromString(fmt) # <<<<<<<<<<<<<< * message = PyString_FromString(msg) * try: */ - __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_v_format); __pyx_v_format = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":109 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":110 * cdef void error_h(char *fmt, char*msg): * format = PyString_FromString(fmt) * message = PyString_FromString(msg) # <<<<<<<<<<<<<< * try: * warn_msg = format % message */ - __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;} Py_DECREF(__pyx_v_message); __pyx_v_message = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":110 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":111 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -323,14 +325,14 @@ */ /*try:*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":111 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":112 * message = PyString_FromString(msg) * try: * warn_msg = format % message # <<<<<<<<<<<<<< * except: * warn_msg = format */ - __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L2;} + __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L2;} Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_1; __pyx_1 = 0; @@ -339,7 +341,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":112 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":113 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -348,10 +350,10 @@ */ /*except:*/ { __Pyx_AddTraceback("geos.error_h"); - __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;} + __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":113 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":114 * warn_msg = format % message * except: * warn_msg = format # <<<<<<<<<<<<<< @@ -365,23 +367,23 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":114 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":115 * except: * warn_msg = format * sys.stderr.write('GEOS_ERROR: %s\n' % warn_msg) # <<<<<<<<<<<<<< * - * # The initGEOS routine should be called first, however, that routine takes + * # intialize GEOS (parameters are notice and error function callbacks). */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stderr); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stderr); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyNumber_Remainder(__pyx_k8p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;} + __pyx_2 = PyNumber_Remainder(__pyx_k8p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; - __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; @@ -405,7 +407,7 @@ char __pyx_1; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":129 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":126 * def is_valid(self): * cdef char valid * valid = GEOSisValid(self._geom) # <<<<<<<<<<<<<< @@ -414,7 +416,7 @@ */ __pyx_v_valid = GEOSisValid(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_self)->_geom); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":130 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":127 * cdef char valid * valid = GEOSisValid(self._geom) * if valid: # <<<<<<<<<<<<<< @@ -424,7 +426,7 @@ __pyx_1 = __pyx_v_valid; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":131 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":128 * valid = GEOSisValid(self._geom) * if valid: * return True # <<<<<<<<<<<<<< @@ -438,7 +440,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":133 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":130 * return True * else: * return False # <<<<<<<<<<<<<< @@ -463,14 +465,14 @@ PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":136 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":133 * * def geom_type(self): * return PyString_FromString(GEOSGeomType(self._geom)) # <<<<<<<<<<<<<< * * def within(self, BaseGeometry geom): */ - __pyx_1 = PyString_FromString(GEOSGeomType(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_self)->_geom)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;} + __pyx_1 = PyString_FromString(GEOSGeomType(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_self)->_geom)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -495,9 +497,9 @@ char __pyx_1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_geom); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_4geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_4geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":141 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":138 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -506,7 +508,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":142 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":139 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -515,7 +517,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":143 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":140 * g1 = self._geom * g2 = geom._geom * answer = GEOSWithin(g1, g2) # <<<<<<<<<<<<<< @@ -524,7 +526,7 @@ */ __pyx_v_answer = GEOSWithin(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":144 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":141 * g2 = geom._geom * answer = GEOSWithin(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -534,7 +536,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":145 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":142 * answer = GEOSWithin(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -548,7 +550,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":147 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":144 * return True * else: * return False # <<<<<<<<<<<<<< @@ -581,9 +583,9 @@ char __pyx_1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_geom); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_4geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_4geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":152 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":149 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -592,7 +594,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":153 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":150 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -601,7 +603,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":154 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":151 * g1 = self._geom * g2 = geom._geom * answer = GEOSIntersects(g1, g2) # <<<<<<<<<<<<<< @@ -610,7 +612,7 @@ */ __pyx_v_answer = GEOSIntersects(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":155 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":152 * g2 = geom._geom * answer = GEOSIntersects(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -620,7 +622,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":156 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":153 * answer = GEOSIntersects(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -634,7 +636,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":158 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":155 * return True * else: * return False # <<<<<<<<<<<<<< @@ -687,9 +689,9 @@ Py_INCREF(__pyx_v_geom); __pyx_v_p = Py_None; Py_INCREF(Py_None); __pyx_v_pout = Py_None; Py_INCREF(Py_None); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_4geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_4geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":164 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":161 * cdef char answer * cdef int numgeoms, i, typeid * g1 = self._geom # <<<<<<<<<<<<<< @@ -698,7 +700,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":165 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":162 * cdef int numgeoms, i, typeid * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -707,7 +709,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":166 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":163 * g1 = self._geom * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) # <<<<<<<<<<<<<< @@ -716,7 +718,7 @@ */ __pyx_v_g3 = GEOSIntersection(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":167 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":164 * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< @@ -725,7 +727,7 @@ */ __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":168 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":165 * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -735,39 +737,39 @@ __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":169 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":166 * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: * p = Polygon() # create an empty Polygon instance # <<<<<<<<<<<<<< * p = _add_geom(p,g3) # add geometry to it. * # above should be faster than this .. */ - __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4geos_Polygon), 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4geos_Polygon), 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; goto __pyx_L1;} Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":170 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":167 * if typeid == GEOS_POLYGON: * p = Polygon() # create an empty Polygon instance * p = _add_geom(p,g3) # add geometry to it. # <<<<<<<<<<<<<< * # above should be faster than this .. * #b = _get_coords(g3) */ - if (!__Pyx_TypeTest(__pyx_v_p, __pyx_ptype_4geos_BaseGeometry)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; goto __pyx_L1;} - __pyx_2 = __pyx_f_4geos__add_geom(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_p),__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_v_p, __pyx_ptype_4geos_BaseGeometry)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; goto __pyx_L1;} + __pyx_2 = __pyx_f_4geos__add_geom(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_p),__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; goto __pyx_L1;} Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":174 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":171 * #b = _get_coords(g3) * #p = Polygon(b) * pout = [p] # return a list with a single element # <<<<<<<<<<<<<< * elif typeid == GEOS_LINESTRING: - * p = LineString() + * p = LineString() # create an empty LineString instance */ - __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); Py_DECREF(__pyx_v_pout); @@ -778,39 +780,39 @@ __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":176 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":173 * pout = [p] # return a list with a single element * elif typeid == GEOS_LINESTRING: - * p = LineString() # <<<<<<<<<<<<<< - * p = _add_geom(p,g3) + * p = LineString() # create an empty LineString instance # <<<<<<<<<<<<<< + * p = _add_geom(p,g3) # add geometry to it. * return [p] */ - __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4geos_LineString), 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4geos_LineString), 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; goto __pyx_L1;} Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":177 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":174 * elif typeid == GEOS_LINESTRING: - * p = LineString() - * p = _add_geom(p,g3) # <<<<<<<<<<<<<< + * p = LineString() # create an empty LineString instance + * p = _add_geom(p,g3) # add geometry to it. # <<<<<<<<<<<<<< * return [p] * elif typeid == GEOS_MULTIPOLYGON: */ - if (!__Pyx_TypeTest(__pyx_v_p, __pyx_ptype_4geos_BaseGeometry)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;} - __pyx_2 = __pyx_f_4geos__add_geom(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_p),__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_v_p, __pyx_ptype_4geos_BaseGeometry)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} + __pyx_2 = __pyx_f_4geos__add_geom(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_p),__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":178 - * p = LineString() - * p = _add_geom(p,g3) + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":175 + * p = LineString() # create an empty LineString instance + * p = _add_geom(p,g3) # add geometry to it. * return [p] # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); __pyx_r = __pyx_2; @@ -821,7 +823,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":180 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":177 * return [p] * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -830,19 +832,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":181 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":178 * elif typeid == GEOS_MULTIPOLYGON: * 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 = 181; goto __pyx_L1;} + __pyx_2 = PyList_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":182 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":179 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -851,7 +853,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":183 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":180 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -860,43 +862,43 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3,__pyx_v_i); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":184 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":181 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * p = Polygon() # create an empty Polygon instance # <<<<<<<<<<<<<< * p = _add_geom(p,gout) # add geometry to it. * pout.append(p) */ - __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4geos_Polygon), 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4geos_Polygon), 0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; goto __pyx_L1;} Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":185 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":182 * gout = GEOSGetGeometryN(g3, i) * p = Polygon() # create an empty Polygon instance * p = _add_geom(p,gout) # add geometry to it. # <<<<<<<<<<<<<< * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: */ - if (!__Pyx_TypeTest(__pyx_v_p, __pyx_ptype_4geos_BaseGeometry)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;} - __pyx_2 = __pyx_f_4geos__add_geom(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_p),__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_v_p, __pyx_ptype_4geos_BaseGeometry)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;} + __pyx_2 = __pyx_f_4geos__add_geom(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_p),__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; goto __pyx_L1;} Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":186 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":183 * p = Polygon() # create an empty Polygon instance * p = _add_geom(p,gout) # add geometry to it. * pout.append(p) # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_2 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_p); - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; @@ -906,7 +908,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":188 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":185 * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -915,73 +917,73 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":189 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":186 * 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 = 189; goto __pyx_L1;} + __pyx_2 = PyList_New(0); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":190 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":187 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< * gout = GEOSGetGeometryN(g3, i) - * p = LineString() # create an empty Polygon instance + * p = LineString() # create an LineString instance */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_numgeoms; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":191 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":188 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< - * p = LineString() # create an empty Polygon instance + * p = LineString() # create an LineString instance * p = _add_geom(p,gout) # add geometry to it. */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3,__pyx_v_i); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":192 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":189 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) - * p = LineString() # create an empty Polygon instance # <<<<<<<<<<<<<< + * p = LineString() # create an LineString instance # <<<<<<<<<<<<<< * p = _add_geom(p,gout) # add geometry to it. * pout.append(p) */ - __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_4geos_LineString), 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_4geos_LineString), 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;} Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":193 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":190 * gout = GEOSGetGeometryN(g3, i) - * p = LineString() # create an empty Polygon instance + * p = LineString() # create an LineString instance * p = _add_geom(p,gout) # add geometry to it. # <<<<<<<<<<<<<< * pout.append(p) * else: */ - if (!__Pyx_TypeTest(__pyx_v_p, __pyx_ptype_4geos_BaseGeometry)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} - __pyx_4 = __pyx_f_4geos__add_geom(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_p),__pyx_v_gout); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_v_p, __pyx_ptype_4geos_BaseGeometry)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} + __pyx_4 = __pyx_f_4geos__add_geom(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_p),__pyx_v_gout); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;} Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_4; __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":194 - * p = LineString() # create an empty Polygon instance + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":191 + * p = LineString() # create an LineString instance * p = _add_geom(p,gout) # add geometry to it. * pout.append(p) # <<<<<<<<<<<<<< * else: * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) */ - __pyx_2 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_p); - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; @@ -990,26 +992,26 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":196 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":193 * pout.append(p) * else: * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< * return pout * */ - __pyx_2 = PyNumber_Remainder(__pyx_k9p, ((PyObject*)&PyType_Type)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + __pyx_2 = PyNumber_Remainder(__pyx_k9p, ((PyObject*)&PyType_Type)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; - __pyx_4 = PyObject_CallObject(__pyx_builtin_NotImplementedError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_NotImplementedError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;} } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":197 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":194 * else: * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * return pout # <<<<<<<<<<<<<< @@ -1042,14 +1044,14 @@ PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":200 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":197 * * def get_coords(self): * return _get_coords(self._geom) # <<<<<<<<<<<<<< - * - * cdef class Polygon(BaseGeometry): + * + * def __dealloc__(self): */ - __pyx_1 = __pyx_f_4geos__get_coords(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; goto __pyx_L1;} + __pyx_1 = __pyx_f_4geos__get_coords(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -1065,6 +1067,70 @@ return __pyx_r; } +static void __pyx_f_py_4geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static char __pyx_doc_4geos_12BaseGeometry___dealloc__[] = "destroy GEOS geometry"; +static void __pyx_f_py_4geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":201 + * def __dealloc__(self): + * """destroy GEOS geometry""" + * GEOSGeom_destroy(self._geom) # <<<<<<<<<<<<<< + * + * def __reduce__(self): + */ + GEOSGeom_destroy(((struct __pyx_obj_4geos_BaseGeometry *)__pyx_v_self)->_geom); + + Py_DECREF(__pyx_v_self); +} + +static PyObject *__pyx_n___class__; + +static PyObject *__pyx_f_py_4geos_12BaseGeometry___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static char __pyx_doc_4geos_12BaseGeometry___reduce__[] = "special method that allows geos instance to be pickled"; +static PyObject *__pyx_f_py_4geos_12BaseGeometry___reduce__(PyObject *__pyx_v_self, PyObject *unused) { + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + Py_INCREF(__pyx_v_self); + + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":205 + * def __reduce__(self): + * """special method that allows geos instance to be pickled""" + * return (self.__class__,(self.get_coords(),)) # <<<<<<<<<<<<<< + * + * cdef class Polygon(BaseGeometry): + */ + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_get_coords); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); + PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); + __pyx_1 = 0; + __pyx_2 = 0; + __pyx_r = __pyx_3; + __pyx_3 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + __Pyx_AddTraceback("geos.BaseGeometry.__reduce__"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_self); + return __pyx_r; +} + static PyObject *__pyx_num_neg_1; static PyObject *__pyx_num_0; static PyObject *__pyx_num_1; @@ -1095,9 +1161,9 @@ if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_b))) return -1; Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_b); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_4geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_4geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":214 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":217 * * # just return an empty class * if b is None: # <<<<<<<<<<<<<< @@ -1107,7 +1173,7 @@ __pyx_1 = (((PyObject *)__pyx_v_b) == Py_None); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":215 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":218 * # just return an empty class * if b is None: * return # <<<<<<<<<<<<<< @@ -1120,7 +1186,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":219 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":222 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1130,17 +1196,17 @@ __pyx_1 = (!PyArray_ISCONTIGUOUS(__pyx_v_b)); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":220 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":223 * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): * b = b.copy() # <<<<<<<<<<<<<< * * m = b.shape[0] */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_copy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_4geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_4geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_3); __pyx_3 = 0; @@ -1148,78 +1214,78 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":222 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":225 * b = b.copy() * * m = b.shape[0] # <<<<<<<<<<<<<< * * # Add closing coordinates to sequence? */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} if (PyList_CheckExact(__pyx_2) && 0 <= 0 && 0 < PyList_GET_SIZE(__pyx_2)) { __pyx_4 = PyList_GET_ITEM(__pyx_2, 0); Py_INCREF(__pyx_4); } else if (PyTuple_CheckExact(__pyx_2) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_2)) { __pyx_4 = PyTuple_GET_ITEM(__pyx_2, 0); Py_INCREF(__pyx_4); } else { - __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} - __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; goto __pyx_L1;} + __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_m = __pyx_5; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":225 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":228 * * # Add closing coordinates to sequence? * if b[-1,0] != b[0,0] or b[-1,1] != b[0,1]: # <<<<<<<<<<<<<< * M = m + 1 * else: */ - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_INCREF(__pyx_num_neg_1); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_num_neg_1); Py_INCREF(__pyx_num_0); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_0); - __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_INCREF(__pyx_num_0); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_num_0); Py_INCREF(__pyx_num_0); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_0); - __pyx_6 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_6 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_6, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_6, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} if (!__pyx_1) { Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_INCREF(__pyx_num_neg_1); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_num_neg_1); Py_INCREF(__pyx_num_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_num_1); - __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_6 = PyTuple_New(2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_6 = PyTuple_New(2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_INCREF(__pyx_num_0); PyTuple_SET_ITEM(__pyx_6, 0, __pyx_num_0); Py_INCREF(__pyx_num_1); PyTuple_SET_ITEM(__pyx_6, 1, __pyx_num_1); - __pyx_3 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_3 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_3, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_3, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; } - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":226 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":229 * # Add closing coordinates to sequence? * if b[-1,0] != b[0,0] or b[-1,1] != b[0,1]: * M = m + 1 # <<<<<<<<<<<<<< @@ -1231,7 +1297,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":228 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":231 * M = m + 1 * else: * M = m # <<<<<<<<<<<<<< @@ -1242,7 +1308,7 @@ } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":229 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":232 * else: * M = m * self._npts = M # <<<<<<<<<<<<<< @@ -1251,7 +1317,7 @@ */ ((struct __pyx_obj_4geos_Polygon *)__pyx_v_self)->__pyx_base._npts = __pyx_v_M; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":232 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":235 * * # Create a coordinate sequence * cs = GEOSCoordSeq_create(M, 2) # <<<<<<<<<<<<<< @@ -1260,7 +1326,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":235 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":238 * * # add to coordinate sequence * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1269,7 +1335,7 @@ */ __pyx_v_bbuffer = ((double (*))__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":236 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":239 * # add to coordinate sequence * bbuffer = <double *>b.data * for i from 0 <= i < m: # <<<<<<<<<<<<<< @@ -1278,7 +1344,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_m; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":237 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":240 * bbuffer = <double *>b.data * for i from 0 <= i < m: * dx = bbuffer[2*i] # <<<<<<<<<<<<<< @@ -1287,7 +1353,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[(2 * __pyx_v_i)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":238 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":241 * for i from 0 <= i < m: * dx = bbuffer[2*i] * dy = bbuffer[2*i+1] # <<<<<<<<<<<<<< @@ -1296,7 +1362,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":241 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":244 * # Because of a bug in the GEOS C API, * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) # <<<<<<<<<<<<<< @@ -1305,7 +1371,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,__pyx_v_i,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":242 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":245 * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) * GEOSCoordSeq_setY(cs, i, dy) # <<<<<<<<<<<<<< @@ -1315,7 +1381,7 @@ GEOSCoordSeq_setY(__pyx_v_cs,__pyx_v_i,__pyx_v_dy); } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":245 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":248 * * # Add closing coordinates to sequence? * if M > m: # <<<<<<<<<<<<<< @@ -1325,7 +1391,7 @@ __pyx_1 = (__pyx_v_M > __pyx_v_m); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":246 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx":249 * # Add closing coordinates to sequence? * if M > m: * dx = bbuffer[0] # <<<<<<<<<<<<<< @@ -1334,7 +1400,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[0]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/geos.pyx"... [truncated message content] |