From: <js...@us...> - 2007-11-01 03:22:42
|
Revision: 4077 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4077&view=rev Author: jswhit Date: 2007-10-31 20:22:40 -0700 (Wed, 31 Oct 2007) Log Message: ----------- reverse Eric's changes for now Modified Paths: -------------- trunk/toolkits/basemap-testing/src/_geod.c trunk/toolkits/basemap-testing/src/_proj.c trunk/toolkits/basemap-testing/src/_proj.pyx Modified: trunk/toolkits/basemap-testing/src/_geod.c =================================================================== --- trunk/toolkits/basemap-testing/src/_geod.c 2007-11-01 03:18:09 UTC (rev 4076) +++ trunk/toolkits/basemap-testing/src/_geod.c 2007-11-01 03:22:40 UTC (rev 4077) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Sun Oct 14 08:16:22 2007 */ +/* Generated by Cython 0.9.6.7 on Wed Oct 31 21:20:49 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -160,7 +160,7 @@ __pyx_v_key = Py_None; Py_INCREF(Py_None); __pyx_v_value = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":13 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":13 * def __new__(self, geodparams): * cdef GEODESIC_T GEOD_T * self.geodparams = geodparams # <<<<<<<<<<<<<< @@ -171,7 +171,7 @@ Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams); ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams = __pyx_v_geodparams; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":15 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":15 * self.geodparams = geodparams * # setup proj initialization string. * geodargs = [] # <<<<<<<<<<<<<< @@ -183,7 +183,7 @@ __pyx_v_geodargs = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":16 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":16 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< @@ -232,7 +232,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; } - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":17 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":17 * geodargs = [] * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< @@ -263,7 +263,7 @@ } Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":18 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":18 * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') * self.geodinitstring = PyString_AsString(''.join(geodargs)) # <<<<<<<<<<<<<< @@ -280,7 +280,7 @@ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring = PyString_AsString(__pyx_6); Py_DECREF(__pyx_6); __pyx_6 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":20 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":20 * self.geodinitstring = PyString_AsString(''.join(geodargs)) * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< @@ -289,7 +289,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t = (GEOD_init_plus(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring,(&__pyx_v_GEOD_T))[0]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":21 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":21 * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -299,7 +299,7 @@ __pyx_7 = (pj_errno != 0); if (__pyx_7) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":22 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":22 * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -319,7 +319,7 @@ } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":23 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":23 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< @@ -361,7 +361,7 @@ PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":27 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":27 * def __reduce__(self): * """special method that allows pyproj.Geod instance to be pickled""" * return (self.__class__,(self.geodparams,)) # <<<<<<<<<<<<<< @@ -445,7 +445,7 @@ Py_INCREF(__pyx_v_dist); Py_INCREF(__pyx_v_radians); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":40 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":40 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< @@ -455,7 +455,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":41 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":41 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -468,7 +468,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":42 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":42 * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -478,7 +478,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":43 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":43 * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -491,7 +491,7 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":44 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":44 * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< @@ -501,7 +501,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":45 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":45 * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -514,7 +514,7 @@ } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":46 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":46 * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< @@ -524,7 +524,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":47 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":47 * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -537,7 +537,7 @@ } __pyx_L5:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":49 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":49 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -554,7 +554,7 @@ __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":50 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":50 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< @@ -573,7 +573,7 @@ } __pyx_L6:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":51 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":51 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< @@ -589,7 +589,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":52 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":52 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< @@ -598,7 +598,7 @@ */ __pyx_v_lonsdata = ((double (*))__pyx_v_londata); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":53 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":53 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< @@ -607,7 +607,7 @@ */ __pyx_v_latsdata = ((double (*))__pyx_v_latdata); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":54 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":54 * lonsdata = <double *>londata * latsdata = <double *>latdata * azdata = <double *>azdat # <<<<<<<<<<<<<< @@ -616,7 +616,7 @@ */ __pyx_v_azdata = ((double (*))__pyx_v_azdat); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":55 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":55 * latsdata = <double *>latdata * azdata = <double *>azdat * distdata = <double *>distdat # <<<<<<<<<<<<<< @@ -625,7 +625,7 @@ */ __pyx_v_distdata = ((double (*))__pyx_v_distdat); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":56 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":56 * azdata = <double *>azdat * distdata = <double *>distdat * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -634,7 +634,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":57 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":57 * distdata = <double *>distdat * for i from 0 <= i < ndim: * if radians: # <<<<<<<<<<<<<< @@ -644,7 +644,7 @@ __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;} if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":58 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":58 * for i from 0 <= i < ndim: * if radians: * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< @@ -653,7 +653,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":59 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":59 * if radians: * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< @@ -662,7 +662,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":60 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":60 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< @@ -671,7 +671,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = (__pyx_v_azdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":61 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":61 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -683,7 +683,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":63 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":63 * self.geodesic_t.DIST = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -699,7 +699,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":64 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":64 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -715,7 +715,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":65 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":65 * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] # <<<<<<<<<<<<<< @@ -731,7 +731,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":66 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":66 * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -742,7 +742,7 @@ } __pyx_L9:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":67 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":67 * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -751,7 +751,7 @@ */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":68 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":68 * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -761,7 +761,7 @@ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":69 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":69 * geod_pre(&self.geodesic_t) * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -781,7 +781,7 @@ } __pyx_L10:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":70 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":70 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -790,7 +790,7 @@ */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":71 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":71 * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -800,7 +800,7 @@ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":72 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":72 * geod_for(&self.geodesic_t) * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -820,7 +820,7 @@ } __pyx_L11:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":73 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":73 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< @@ -830,7 +830,7 @@ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (__pyx_8) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":74 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":74 * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): * raise ValueError('undefined forward geodesic (may be an equatorial arc)') # <<<<<<<<<<<<<< @@ -849,7 +849,7 @@ } __pyx_L12:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":75 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":75 * if isnan(self.geodesic_t.ALPHA21): * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: # <<<<<<<<<<<<<< @@ -859,7 +859,7 @@ __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":76 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":76 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -868,7 +868,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":77 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":77 * if radians: * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -877,7 +877,7 @@ */ (__pyx_v_latsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":78 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":78 * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -889,7 +889,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":80 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":80 * azdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -905,7 +905,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":81 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":81 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -921,7 +921,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":82 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":82 * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1005,7 +1005,7 @@ Py_INCREF(__pyx_v_lats2); Py_INCREF(__pyx_v_radians); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":94 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":94 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< @@ -1015,7 +1015,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":95 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":95 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1028,7 +1028,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":96 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":96 * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -1038,7 +1038,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":97 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":97 * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1051,7 +1051,7 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":98 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":98 * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< @@ -1061,7 +1061,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":99 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":99 * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1074,7 +1074,7 @@ } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":100 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":100 * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< @@ -1084,7 +1084,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":101 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":101 * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1097,7 +1097,7 @@ } __pyx_L5:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":103 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":103 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -1114,7 +1114,7 @@ __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":104 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":104 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< @@ -1133,7 +1133,7 @@ } __pyx_L6:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":105 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":105 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< @@ -1149,7 +1149,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":106 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":106 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< @@ -1158,7 +1158,7 @@ */ __pyx_v_lonsdata = ((double (*))__pyx_v_londata); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":107 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":107 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< @@ -1167,7 +1167,7 @@ */ __pyx_v_latsdata = ((double (*))__pyx_v_latdata); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":108 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":108 * lonsdata = <double *>londata * latsdata = <double *>latdata * azdata = <double *>azdat # <<<<<<<<<<<<<< @@ -1176,7 +1176,7 @@ */ __pyx_v_azdata = ((double (*))__pyx_v_azdat); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":109 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":109 * latsdata = <double *>latdata * azdata = <double *>azdat * distdata = <double *>distdat # <<<<<<<<<<<<<< @@ -1185,7 +1185,7 @@ */ __pyx_v_distdata = ((double (*))__pyx_v_distdat); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":110 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":110 * azdata = <double *>azdat * distdata = <double *>distdat * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -1194,7 +1194,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":111 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":111 * distdata = <double *>distdat * for i from 0 <= i < ndim: * if radians: # <<<<<<<<<<<<<< @@ -1204,7 +1204,7 @@ __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L1;} if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":112 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":112 * for i from 0 <= i < ndim: * if radians: * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< @@ -1213,7 +1213,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":113 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":113 * if radians: * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< @@ -1222,7 +1222,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":114 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":114 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.p2.v = azdata[i] # <<<<<<<<<<<<<< @@ -1231,7 +1231,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = (__pyx_v_azdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":115 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":115 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.p2.v = azdata[i] * self.geodesic_t.p2.u = distdata[i] # <<<<<<<<<<<<<< @@ -1243,7 +1243,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":117 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":117 * self.geodesic_t.p2.u = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -1259,7 +1259,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":118 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":118 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -1275,7 +1275,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":119 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":119 * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.p2.v = _dg2rad*azdata[i] # <<<<<<<<<<<<<< @@ -1291,7 +1291,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":120 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":120 * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.p2.v = _dg2rad*azdata[i] * self.geodesic_t.p2.u = _dg2rad*distdata[i] # <<<<<<<<<<<<<< @@ -1309,7 +1309,7 @@ } __pyx_L9:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":121 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":121 * self.geodesic_t.p2.v = _dg2rad*azdata[i] * self.geodesic_t.p2.u = _dg2rad*distdata[i] * geod_inv(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -1318,7 +1318,7 @@ */ geod_inv((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":122 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":122 * self.geodesic_t.p2.u = _dg2rad*distdata[i] * geod_inv(&self.geodesic_t) * if isnan(self.geodesic_t.DIST): # <<<<<<<<<<<<<< @@ -1328,7 +1328,7 @@ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST); if (__pyx_8) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":123 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":123 * geod_inv(&self.geodesic_t) * if isnan(self.geodesic_t.DIST): * raise ValueError('undefined inverse geodesic (may be an antipodal point)') # <<<<<<<<<<<<<< @@ -1347,7 +1347,7 @@ } __pyx_L10:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":124 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":124 * if isnan(self.geodesic_t.DIST): * raise ValueError('undefined inverse geodesic (may be an antipodal point)') * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -1357,7 +1357,7 @@ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":125 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":125 * raise ValueError('undefined inverse geodesic (may be an antipodal point)') * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -1377,7 +1377,7 @@ } __pyx_L11:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":126 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":126 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * if radians: # <<<<<<<<<<<<<< @@ -1387,7 +1387,7 @@ __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":127 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":127 * raise RuntimeError(pj_strerrno(pj_errno)) * if radians: * lonsdata[i] = self.geodesic_t.ALPHA12 # <<<<<<<<<<<<<< @@ -1396,7 +1396,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":128 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":128 * if radians: * lonsdata[i] = self.geodesic_t.ALPHA12 * latsdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1408,7 +1408,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":130 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":130 * latsdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 # <<<<<<<<<<<<<< @@ -1424,7 +1424,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":131 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":131 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 * latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1442,7 +1442,7 @@ } __pyx_L12:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":132 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":132 * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 * latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * azdata[i] = self.geodesic_t.DIST # <<<<<<<<<<<<<< @@ -1498,7 +1498,7 @@ __pyx_v_lats = Py_None; Py_INCREF(Py_None); __pyx_v_lons = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":139 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":139 * cdef int i * cdef double del_s * if radians: # <<<<<<<<<<<<<< @@ -1508,7 +1508,7 @@ __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":140 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":140 * cdef double del_s * if radians: * self.geodesic_t.p1.v = lon1 # <<<<<<<<<<<<<< @@ -1517,7 +1517,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_v_lon1; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":141 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":141 * if radians: * self.geodesic_t.p1.v = lon1 * self.geodesic_t.p1.u = lat1 # <<<<<<<<<<<<<< @@ -1526,7 +1526,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_v_lat1; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":142 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":142 * self.geodesic_t.p1.v = lon1 * self.geodesic_t.p1.u = lat1 * self.geodesic_t.p2.v = lon2 # <<<<<<<<<<<<<< @@ -1535,7 +1535,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = __pyx_v_lon2; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":143 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":143 * self.geodesic_t.p1.u = lat1 * self.geodesic_t.p2.v = lon2 * self.geodesic_t.p2.u = lat2 # <<<<<<<<<<<<<< @@ -1547,7 +1547,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":145 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":145 * self.geodesic_t.p2.u = lat2 * else: * self.geodesic_t.p1.v = _dg2rad*lon1 # <<<<<<<<<<<<<< @@ -1563,7 +1563,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_5; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":146 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":146 * else: * self.geodesic_t.p1.v = _dg2rad*lon1 * self.geodesic_t.p1.u = _dg2rad*lat1 # <<<<<<<<<<<<<< @@ -1579,7 +1579,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_5; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":147 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":147 * self.geodesic_t.p1.v = _dg2rad*lon1 * self.geodesic_t.p1.u = _dg2rad*lat1 * self.geodesic_t.p2.v = _dg2rad*lon2 # <<<<<<<<<<<<<< @@ -1595,7 +1595,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = __pyx_5; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":148 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":148 * self.geodesic_t.p1.u = _dg2rad*lat1 * self.geodesic_t.p2.v = _dg2rad*lon2 * self.geodesic_t.p2.u = _dg2rad*lat2 # <<<<<<<<<<<<<< @@ -1613,7 +1613,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":150 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":150 * self.geodesic_t.p2.u = _dg2rad*lat2 * # do inverse computation to set azimuths, distance. * geod_inv(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -1622,7 +1622,7 @@ */ geod_inv((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":152 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":152 * geod_inv(&self.geodesic_t) * # set up some constants needed for forward computation. * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -1631,7 +1631,7 @@ */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":154 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":154 * geod_pre(&self.geodesic_t) * # distance increment. * del_s = self.geodesic_t.DIST/(npts+1) # <<<<<<<<<<<<<< @@ -1640,7 +1640,7 @@ */ __pyx_v_del_s = (((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST / (__pyx_v_npts + 1)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":156 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":156 * del_s = self.geodesic_t.DIST/(npts+1) * # initialize output tuples. * lats = () # <<<<<<<<<<<<<< @@ -1652,7 +1652,7 @@ __pyx_v_lats = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":157 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":157 * # initialize output tuples. * lats = () * lons = () # <<<<<<<<<<<<<< @@ -1664,7 +1664,7 @@ __pyx_v_lons = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":159 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":159 * lons = () * # loop over intermediate points, compute lat/lons. * for i from 1 <= i < npts+1: # <<<<<<<<<<<<<< @@ -1674,7 +1674,7 @@ __pyx_6 = (__pyx_v_npts + 1); for (__pyx_v_i = 1; __pyx_v_i < __pyx_6; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":160 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":160 * # loop over intermediate points, compute lat/lons. * for i from 1 <= i < npts+1: * self.geodesic_t.DIST = i*del_s # <<<<<<<<<<<<<< @@ -1683,7 +1683,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST = (__pyx_v_i * __pyx_v_del_s); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":161 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":161 * for i from 1 <= i < npts+1: * self.geodesic_t.DIST = i*del_s * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -1692,7 +1692,7 @@ */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":162 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":162 * self.geodesic_t.DIST = i*del_s * geod_for(&self.geodesic_t) * if radians: # <<<<<<<<<<<<<< @@ -1702,7 +1702,7 @@ __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;} if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":163 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":163 * geod_for(&self.geodesic_t) * if radians: * lats = lats + (self.geodesic_t.p2.u,) # <<<<<<<<<<<<<< @@ -1719,7 +1719,7 @@ __pyx_v_lats = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":164 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":164 * if radians: * lats = lats + (self.geodesic_t.p2.u,) * lons = lons + (self.geodesic_t.p2.v,) # <<<<<<<<<<<<<< @@ -1739,7 +1739,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":166 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":166 * lons = lons + (self.geodesic_t.p2.v,) * else: * lats = lats + (_rad2dg*self.geodesic_t.p2.u,) # <<<<<<<<<<<<<< @@ -1760,7 +1760,7 @@ __pyx_v_lats = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":167 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":167 * else: * lats = lats + (_rad2dg*self.geodesic_t.p2.u,) * lons = lons + (_rad2dg*self.geodesic_t.p2.v,) # <<<<<<<<<<<<<< @@ -1783,7 +1783,7 @@ __pyx_L5:; } - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":168 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":168 * lats = lats + (_rad2dg*self.geodesic_t.p2.u,) * lons = lons + (_rad2dg*self.geodesic_t.p2.v,) * return lons, lats # <<<<<<<<<<<<<< @@ -2046,7 +2046,7 @@ if (PyObject_SetAttrString(__pyx_m, "Geod", (PyObject *)&__pyx_type_5_geod_Geod) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;} __pyx_ptype_5_geod_Geod = &__pyx_type_5_geod_Geod; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":1 + /* "/private/tmp/toolkits/basemap-testing/src/_pyproj.pxi":1 * import math # <<<<<<<<<<<<<< * * _dg2rad = math.radians(1.) @@ -2055,7 +2055,7 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n_math, __pyx_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":3 + /* "/private/tmp/toolkits/basemap-testing/src/_pyproj.pxi":3 * import math * * _dg2rad = math.radians(1.) # <<<<<<<<<<<<<< @@ -2075,7 +2075,7 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n__dg2rad, __pyx_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":4 + /* "/private/tmp/toolkits/basemap-testing/src/_pyproj.pxi":4 * * _dg2rad = math.radians(1.) * _rad2dg = math.degrees(1.) # <<<<<<<<<<<<<< @@ -2095,7 +2095,7 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n__rad2dg, __pyx_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":5 + /* "/private/tmp/toolkits/basemap-testing/src/_pyproj.pxi":5 * _dg2rad = math.radians(1.) * _rad2dg = math.degrees(1.) * _doublesize = sizeof(double) # <<<<<<<<<<<<<< @@ -2106,7 +2106,7 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n__doublesize, __pyx_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":6 + /* "/private/tmp/toolkits/basemap-testing/src/_pyproj.pxi":6 * _rad2dg = math.degrees(1.) * _doublesize = sizeof(double) * __version__ = "1.8.3" # <<<<<<<<<<<<<< @@ -2115,7 +2115,7 @@ */ if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k2p) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":29 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":29 * return (self.__class__,(self.geodparams,)) * * def _fwd(self, object lons, object lats, object az, object dist, radians=False): # <<<<<<<<<<<<<< @@ -2125,7 +2125,7 @@ Py_INCREF(Py_False); __pyx_k3 = Py_False; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":84 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":84 * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): # <<<<<<<<<<<<<< @@ -2135,7 +2135,7 @@ Py_INCREF(Py_False); __pyx_k4 = Py_False; - /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":134 + /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":134 * azdata[i] = self.geodesic_t.DIST * * def _npts(self, double lon1, double lat1, double lon2, double lat2, int npts, radians=False): # <<<<<<<<<<<<<< Modified: trunk/toolkits/basemap-testing/src/_proj.c =================================================================== --- trunk/toolkits/basemap-testing/src/_proj.c 2007-11-01 03:18:09 UTC (rev 4076) +++ trunk/toolkits/basemap-testing/src/_proj.c 2007-11-01 03:22:40 UTC (rev 4077) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Sun Oct 28 13:19:08 2007 */ +/* Generated by Cython 0.9.6.7 on Wed Oct 31 21:20:52 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -25,7 +25,6 @@ #include "math.h" #include "geodesic.h" #include "proj_api.h" -#include "numpy/arrayobject.h" #ifdef __GNUC__ @@ -85,17 +84,8 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ -static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size); /*proto*/ - static void __Pyx_AddTraceback(char *funcname); /*proto*/ -/* Declarations from c_numpy */ - -static PyTypeObject *__pyx_ptype_7c_numpy_dtype = 0; -static PyTypeObject *__pyx_ptype_7c_numpy_ndarray = 0; -static PyTypeObject *__pyx_ptype_7c_numpy_flatiter = 0; -static PyTypeObject *__pyx_ptype_7c_numpy_broadcast = 0; - /* Declarations from _proj */ @@ -109,22 +99,16 @@ }; static PyTypeObject *__pyx_ptype_5_proj_Proj = 0; +static PyObject *__pyx_k3; static PyObject *__pyx_k4; static PyObject *__pyx_k5; static PyObject *__pyx_k6; -static PyObject *__pyx_k7; -static PyObject *__pyx_k8; -static PyObject *__pyx_k9; -static PyObject *__pyx_k10; -static PyObject *__pyx_k11; /* Implementation of _proj */ -static char (__pyx_k3[]) = "1.8.3"; +static char (__pyx_k2[]) = "1.8.3"; -static PyObject *__pyx_n_c_numpy; -static PyObject *__pyx_n_numpy; static PyObject *__pyx_n_math; static PyObject *__pyx_n__dg2rad; static PyObject *__pyx_n__rad2dg; @@ -135,8 +119,6 @@ static PyObject *__pyx_n___dealloc__; static PyObject *__pyx_n___reduce__; static PyObject *__pyx_n__fwd; -static PyObject *__pyx_n__fwdn; -static PyObject *__pyx_n__invn; static PyObject *__pyx_n__inv; static PyObject *__pyx_n_is_latlong; static PyObject *__pyx_n_is_geocent; @@ -144,7 +126,7 @@ static PyObject *__pyx_n_radians; static PyObject *__pyx_n_degrees; -static PyObject *__pyx_k3p; +static PyObject *__pyx_k2p; static PyObject *__pyx_f_py_5_proj_set_datapath(PyObject *__pyx_self, PyObject *__pyx_v_datapath); /*proto*/ static PyObject *__pyx_f_py_5_proj_set_datapath(PyObject *__pyx_self, PyObject *__pyx_v_datapath) { @@ -152,20 +134,20 @@ PyObject *__pyx_r; Py_INCREF(__pyx_v_datapath); - /* "/home/efiring/programs/py/mpl/basemap.dev/src/_proj.pyx":11 + /* "/private/tmp/toolkits/basemap-testing/src/_proj.pyx":7 * def set_datapath(datapath): * cdef char *searchpath * searchpath = PyString_AsString(datapath) # <<<<<<<<<<<<<< * pj_set_searchpath(1, &searchpath) - * + * */ __pyx_v_searchpath = PyString_AsString(__pyx_v_datapath); - /* "/home/efiring/programs/py/mpl/basemap.dev/src/_proj.pyx":12 + /* "/private/tmp/toolkits/basemap-testing/src/_proj.pyx":8 * cdef char *searchpath * searchpath = PyString_AsString(datapath) * pj_set_searchpath(1, &searchpath) # <<<<<<<<<<<<<< - * + * * cdef class Proj: */ pj_set_searchpath(1,(&__pyx_v_searchpath)); @@ -180,17 +162,17 @@ static PyObject *__pyx_n_join; static PyObject *__pyx_n_RuntimeError; -static PyObject *__pyx_k12p; -static PyObject *__pyx_k13p; -static PyObject *__pyx_k14p; -static PyObject *__pyx_k15p; +static PyObject *__pyx_k7p; +static PyObject *__pyx_k8p; +static PyObject *__pyx_k9p; +static PyObject *__pyx_k10p; static PyObject *__pyx_builtin_RuntimeError; -static char (__pyx_k12[]) = "+"; -static char (__pyx_k13[]) = "="; -static char (__pyx_k14[]) = " "; -static char (__pyx_k15[]) = ""; +static char (__pyx_k7[]) = "+"; +static char (__pyx_k8[]) = "="; +static char (__pyx_k9[]) = " "; +static char (__pyx_k10[]) = ""; static int __pyx_f_py_5_proj_4Proj___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_f_py_5_proj_4Proj___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -214,7 +196,7 @@ __pyx_v_key = Py_None; Py_INCREF(Py_None); __pyx_v_value = Py_None; Py_INCREF(Py_None); - /* "/home/efiring/programs/py/mpl/basemap.dev/src/_proj.pyx":22 + /* "/private/tmp/toolkits/basemap-testing/src/_proj.pyx":18 * * def __new__(self, projparams): * self.projparams = projparams # <<<<<<<<<<<<<< @@ -225,30 +207,30 @@ Py_DECREF(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->projparams); ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->projparams = __pyx_v_projparams; - /* "/home/efiring/programs/py/mpl/basemap.dev/src/_proj.pyx":24 + /* "/private/tmp/toolkits/basemap-testing/src/_proj.pyx":20 * self.projparams = projparams * # setup proj initialization string. * pjargs = [] # <<<<<<<<<<<<<< * for key,value in projparams.iteritems(): * pjargs.append('+'+key+"="+str(value)+' ') */ - __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;} + __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;} Py_DECREF(__pyx_v_pjargs); __pyx_v_pjargs = __pyx_1; __pyx_1 = 0; - /* "/home/efiring/programs/py/mpl/basemap.dev/src/_proj.pyx":25 + /* "/private/tmp/toolkits/basemap-testing/src/_proj.pyx":21 * # setup proj initialization string. * pjargs = [] * for key,value in projparams.iteritems(): # <<<<<<<<<<<<<< * pjargs.append('+'+key+"="+str(value)+' ') * self.srs = ''.join(pjargs) */ - __pyx_1 = PyObject_GetAttr(__pyx_v_projparams, __pyx_n_iteritems); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_projparams, __pyx_n_iteritems); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; if (PyList_CheckExact(__pyx_3)) { __pyx_2 = 0; __pyx_1 = __pyx_3; Py_INCREF(__pyx_1); } - else { __pyx_1 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;} } + else { __pyx_1 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;} } Py_DECREF(__pyx_3); __pyx_3 = 0; for (;;) { if (PyList_CheckExact(__pyx_1)) { if (__pyx_2 >= PyList_GET_SIZE(__pyx_1)) break; __pyx_3 = PyList_GET_ITEM(__pyx_1, __pyx_2++); Py_INCREF(__pyx_3); } @@ -272,70 +254,70 @@ Py_DECREF(__pyx_3); __pyx_3 = 0; } else { - __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;} + __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;} + __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;} Py_DECREF(__pyx_v_key); __pyx_v_key = __pyx_5; __pyx_5 = 0; - __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;} + __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;} Py_DECREF(__pyx_v_value); __pyx_v_value = __pyx_5; __pyx_5 = 0; - if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;} + if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; } - /* "/home/efiring/programs/py/mpl/basemap.dev/src/_proj.pyx":26 + /* "/private/tmp/toolkits/basemap-testing/src/_proj.pyx":22 * pjargs = [] * for key,value in projparams.iteritems(): * pjargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< * self.srs = ''.join(pjargs) * self.pjinitstring = PyString_AsString(self.srs) */ - __pyx_5 = PyObject_GetAttr(__pyx_v_pjargs, __pyx_n_append); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;} - __pyx_3 = PyNumber_Add(__pyx_k12p, __pyx_v_key); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;} - __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k13p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_v_pjargs, __pyx_n_append); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_k7p, __pyx_v_key); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} + __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k8p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} Py_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_value); - __pyx_6 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;} + __pyx_6 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyNumber_Add(__pyx_4, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_4, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k14p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;} + __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k9p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_6 = PyTuple... [truncated message content] |
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] |
From: <js...@us...> - 2007-11-13 23:03:48
|
Revision: 4260 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4260&view=rev Author: jswhit Date: 2007-11-13 15:03:46 -0800 (Tue, 13 Nov 2007) Log Message: ----------- remove obsolete function 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 23:02:59 UTC (rev 4259) +++ trunk/toolkits/basemap-testing/src/_geos.c 2007-11-13 23:03:46 UTC (rev 4260) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Tue Nov 13 16:02:30 2007 */ +/* Generated by Cython 0.9.6.7 on Tue Nov 13 16:03:26 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -123,7 +123,6 @@ static PyTypeObject *__pyx_ptype_5_geos_Point = 0; static void (__pyx_f_5_geos_notice_h(char (*),char (*))); /*proto*/ static void (__pyx_f_5_geos_error_h(char (*),char (*))); /*proto*/ -static PyObject *(__pyx_f_5_geos__add_geom(struct __pyx_obj_5_geos_BaseGeometry *,GEOSGeom (*))); /*proto*/ static PyObject *(__pyx_f_5_geos__get_coords(GEOSGeom (*))); /*proto*/ @@ -1496,7 +1495,7 @@ * GEOSArea(self._geom, &area) * return area # <<<<<<<<<<<<<< * - * cdef _add_geom(BaseGeometry p, GEOSGeom *geom): + * cdef _get_coords(GEOSGeom *geom): */ __pyx_1 = PyFloat_FromDouble(__pyx_v_area); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;} __pyx_r = __pyx_1; @@ -1514,100 +1513,6 @@ return __pyx_r; } -static PyObject *__pyx_f_5_geos__add_geom(struct __pyx_obj_5_geos_BaseGeometry *__pyx_v_p,GEOSGeom (*__pyx_v_geom)) { - GEOSCoordSeq (*__pyx_v_cs); - GEOSGeom (*__pyx_v_lr); - unsigned int __pyx_v_M; - PyObject *__pyx_r; - int __pyx_1; - Py_INCREF(__pyx_v_p); - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":266 - * cdef GEOSGeom *lr - * cdef unsigned int M - * if GEOSGeomTypeId(geom) == GEOS_POLYGON: # <<<<<<<<<<<<<< - * lr = GEOSGetExteriorRing(geom) - * cs = GEOSGeom_getCoordSeq(lr) - */ - __pyx_1 = (GEOSGeomTypeId(__pyx_v_geom) == GEOS_POLYGON); - if (__pyx_1) { - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":267 - * cdef unsigned int M - * if GEOSGeomTypeId(geom) == GEOS_POLYGON: - * lr = GEOSGetExteriorRing(geom) # <<<<<<<<<<<<<< - * cs = GEOSGeom_getCoordSeq(lr) - * else: - */ - __pyx_v_lr = GEOSGetExteriorRing(__pyx_v_geom); - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":268 - * if GEOSGeomTypeId(geom) == GEOS_POLYGON: - * lr = GEOSGetExteriorRing(geom) - * cs = GEOSGeom_getCoordSeq(lr) # <<<<<<<<<<<<<< - * else: - * cs = GEOSGeom_getCoordSeq(geom) - */ - __pyx_v_cs = GEOSGeom_getCoordSeq(__pyx_v_lr); - goto __pyx_L2; - } - /*else*/ { - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":270 - * cs = GEOSGeom_getCoordSeq(lr) - * else: - * cs = GEOSGeom_getCoordSeq(geom) # <<<<<<<<<<<<<< - * GEOSCoordSeq_getSize(cs, &M) - * p._geom = geom - */ - __pyx_v_cs = GEOSGeom_getCoordSeq(__pyx_v_geom); - } - __pyx_L2:; - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":271 - * else: - * cs = GEOSGeom_getCoordSeq(geom) - * GEOSCoordSeq_getSize(cs, &M) # <<<<<<<<<<<<<< - * p._geom = geom - * p._npts = M - */ - GEOSCoordSeq_getSize(__pyx_v_cs,(&__pyx_v_M)); - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":272 - * cs = GEOSGeom_getCoordSeq(geom) - * GEOSCoordSeq_getSize(cs, &M) - * p._geom = geom # <<<<<<<<<<<<<< - * p._npts = M - * return p - */ - __pyx_v_p->_geom = __pyx_v_geom; - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":273 - * GEOSCoordSeq_getSize(cs, &M) - * p._geom = geom - * p._npts = M # <<<<<<<<<<<<<< - * return p - * - */ - __pyx_v_p->_npts = __pyx_v_M; - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":274 - * p._geom = geom - * p._npts = M - * return p # <<<<<<<<<<<<<< - * - * cdef _get_coords(GEOSGeom *geom): - */ - Py_INCREF(((PyObject *)__pyx_v_p)); - __pyx_r = ((PyObject *)__pyx_v_p); - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(Py_None); - __pyx_L0:; - Py_DECREF(__pyx_v_p); - return __pyx_r; -} - static PyObject *__pyx_num_2; static PyObject *__pyx_n_empty; @@ -1630,7 +1535,7 @@ PyObject *__pyx_5 = 0; __pyx_v_b = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":283 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":269 * cdef ndarray b * cdef double *bbuffer * if GEOSGeomTypeId(geom) == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -1640,7 +1545,7 @@ __pyx_1 = (GEOSGeomTypeId(__pyx_v_geom) == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":284 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":270 * cdef double *bbuffer * if GEOSGeomTypeId(geom) == GEOS_POLYGON: * lr = GEOSGetExteriorRing(geom) # <<<<<<<<<<<<<< @@ -1649,7 +1554,7 @@ */ __pyx_v_lr = GEOSGetExteriorRing(__pyx_v_geom); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":285 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":271 * if GEOSGeomTypeId(geom) == GEOS_POLYGON: * lr = GEOSGetExteriorRing(geom) * cs = GEOSGeom_getCoordSeq(lr) # <<<<<<<<<<<<<< @@ -1661,7 +1566,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":287 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":273 * cs = GEOSGeom_getCoordSeq(lr) * else: * cs = GEOSGeom_getCoordSeq(geom) # <<<<<<<<<<<<<< @@ -1672,7 +1577,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":288 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":274 * else: * cs = GEOSGeom_getCoordSeq(geom) * GEOSCoordSeq_getSize(cs, &M) # <<<<<<<<<<<<<< @@ -1681,39 +1586,39 @@ */ GEOSCoordSeq_getSize(__pyx_v_cs,(&__pyx_v_M)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":289 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":275 * cs = GEOSGeom_getCoordSeq(geom) * GEOSCoordSeq_getSize(cs, &M) * b = numpy.empty((M,2), numpy.float64) # <<<<<<<<<<<<<< * bbuffer = <double *>b.data * for i from 0 <= i < M: */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_M); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} + __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_M); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); Py_INCREF(__pyx_num_2); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_num_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} - __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5); __pyx_4 = 0; __pyx_5 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_4); __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":290 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":276 * GEOSCoordSeq_getSize(cs, &M) * b = numpy.empty((M,2), numpy.float64) * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1722,7 +1627,7 @@ */ __pyx_v_bbuffer = ((double (*))__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":291 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":277 * b = numpy.empty((M,2), numpy.float64) * bbuffer = <double *>b.data * for i from 0 <= i < M: # <<<<<<<<<<<<<< @@ -1731,7 +1636,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":292 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":278 * bbuffer = <double *>b.data * for i from 0 <= i < M: * GEOSCoordSeq_getX(cs, i, &dx) # <<<<<<<<<<<<<< @@ -1740,7 +1645,7 @@ */ GEOSCoordSeq_getX(__pyx_v_cs,__pyx_v_i,(&__pyx_v_dx)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":293 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":279 * for i from 0 <= i < M: * GEOSCoordSeq_getX(cs, i, &dx) * GEOSCoordSeq_getY(cs, i, &dy) # <<<<<<<<<<<<<< @@ -1749,7 +1654,7 @@ */ GEOSCoordSeq_getY(__pyx_v_cs,__pyx_v_i,(&__pyx_v_dy)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":294 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":280 * GEOSCoordSeq_getX(cs, i, &dx) * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx # <<<<<<<<<<<<<< @@ -1758,7 +1663,7 @@ */ (__pyx_v_bbuffer[(2 * __pyx_v_i)]) = __pyx_v_dx; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":295 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":281 * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy # <<<<<<<<<<<<<< @@ -1768,7 +1673,7 @@ (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]) = __pyx_v_dy; } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":296 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":282 * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy * return b # <<<<<<<<<<<<<< @@ -1812,9 +1717,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_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":307 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":293 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1824,17 +1729,17 @@ __pyx_1 = (!PyArray_ISCONTIGUOUS(__pyx_v_b)); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":308 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":294 * # 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 = 308; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; 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 = 294; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_3); __pyx_3 = 0; @@ -1842,29 +1747,29 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":310 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":296 * b = b.copy() * * M = b.shape[0] # <<<<<<<<<<<<<< * self._npts = M * */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; 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 = 296; 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 = 310; goto __pyx_L1;} - __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyInt_AsLong(__pyx_4); if (unlikely((__pyx_5 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; goto __pyx_L1;} + __pyx_5 = PyInt_AsLong(__pyx_4); if (unlikely((__pyx_5 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; 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":311 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":297 * * M = b.shape[0] * self._npts = M # <<<<<<<<<<<<<< @@ -1873,7 +1778,7 @@ */ ((struct __pyx_obj_5_geos_LineString *)__pyx_v_self)->__pyx_base._npts = __pyx_v_M; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":314 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":300 * * # Create a coordinate sequence * cs = GEOSCoordSeq_create(M, 2) # <<<<<<<<<<<<<< @@ -1882,7 +1787,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":317 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":303 * * # add to coordinate sequence * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1891,7 +1796,7 @@ */ __pyx_v_bbuffer = ((double (*))__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":318 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":304 * # add to coordinate sequence * bbuffer = <double *>b.data * for i from 0 <= i < M: # <<<<<<<<<<<<<< @@ -1900,7 +1805,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":319 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":305 * bbuffer = <double *>b.data * for i from 0 <= i < M: * dx = bbuffer[2*i] # <<<<<<<<<<<<<< @@ -1909,7 +1814,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[(2 * __pyx_v_i)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":320 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":306 * for i from 0 <= i < M: * dx = bbuffer[2*i] * dy = bbuffer[2*i+1] # <<<<<<<<<<<<<< @@ -1918,7 +1823,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":309 * # Because of a bug in the GEOS C API, * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) # <<<<<<<<<<<<<< @@ -1927,7 +1832,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,__pyx_v_i,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":324 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":310 * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) * GEOSCoordSeq_setY(cs, i, dy) # <<<<<<<<<<<<<< @@ -1937,7 +1842,7 @@ GEOSCoordSeq_setY(__pyx_v_cs,__pyx_v_i,__pyx_v_dy); } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":327 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":313 * * # create LineString * self._geom = GEOSGeom_createLineString(cs) # <<<<<<<<<<<<<< @@ -1946,7 +1851,7 @@ */ ((struct __pyx_obj_5_geos_LineString *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createLineString(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":328 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":314 * # create LineString * self._geom = GEOSGeom_createLineString(cs) * self.boundary = b # <<<<<<<<<<<<<< @@ -1986,7 +1891,7 @@ Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_b); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":336 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":322 * cdef GEOSCoordSeq *cs * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) # <<<<<<<<<<<<<< @@ -1995,7 +1900,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(1,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":337 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] # <<<<<<<<<<<<<< @@ -2007,15 +1912,15 @@ } else if (PyTuple_CheckExact(__pyx_v_b) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_v_b)) { __pyx_2 = PyTuple_GET_ITEM(__pyx_v_b, 0); Py_INCREF(__pyx_2); } else { - __pyx_1 = PyInt_FromLong(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; } - __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} + __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_dx = __pyx_3; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":337 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] # <<<<<<<<<<<<<< @@ -2027,15 +1932,15 @@ } else if (PyTuple_CheckExact(__pyx_v_b) && 0 <= 1 && 1 < PyTuple_GET_SIZE(__pyx_v_b)) { __pyx_2 = PyTuple_GET_ITEM(__pyx_v_b, 1); Py_INCREF(__pyx_2); } else { - __pyx_1 = PyInt_FromLong(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; } - __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;} + __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_dy = __pyx_3; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":338 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":324 * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] * GEOSCoordSeq_setX(cs, 0, dx) # <<<<<<<<<<<<<< @@ -2044,7 +1949,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,0,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":339 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":325 * dx = b[0]; dy = b[1] * GEOSCoordSeq_setX(cs, 0, dx) * GEOSCoordSeq_setY(cs, 0, dy) # <<<<<<<<<<<<<< @@ -2053,7 +1958,7 @@ */ GEOSCoordSeq_setY(__pyx_v_cs,0,__pyx_v_dy); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":340 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":326 * GEOSCoordSeq_setX(cs, 0, dx) * GEOSCoordSeq_setY(cs, 0, dy) * self._geom = GEOSGeom_createPoint(cs) # <<<<<<<<<<<<<< @@ -2062,7 +1967,7 @@ */ ((struct __pyx_obj_5_geos_Point *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createPoint(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":341 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":327 * GEOSCoordSeq_setY(cs, 0, dy) * self._geom = GEOSGeom_createPoint(cs) * self._npts = 1 # <<<<<<<<<<<<<< @@ -2070,7 +1975,7 @@ */ ((struct __pyx_obj_5_geos_Point *)__pyx_v_self)->__pyx_base._npts = 1; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":342 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":328 * self._geom = GEOSGeom_createPoint(cs) * self._npts = 1 * self.boundary = b # <<<<<<<<<<<<<< @@ -2786,13 +2691,13 @@ if (PyObject_SetAttrString(__pyx_m, "Polygon", (PyObject *)&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; goto __pyx_L1;} __pyx_ptype_5_geos_Polygon = &__pyx_type_5_geos_Polygon; __pyx_type_5_geos_LineString.tp_base = __pyx_ptype_5_geos_BaseGeometry; - if (PyType_Ready(&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "LineString", (PyObject *)&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; goto __pyx_L1;} + if (PyType_Ready(&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "LineString", (PyObject *)&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} __pyx_ptype_5_geos_LineString = &__pyx_type_5_geos_LineString; __pyx_type_5_geos_Point.tp_base = __pyx_ptype_5_geos_BaseGeometry; __pyx_type_5_geos_Point.tp_free = _PyObject_GC_Del; - if (PyType_Ready(&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "Point", (PyObject *)&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;} + if (PyType_Ready(&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "Point", (PyObject *)&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} __pyx_ptype_5_geos_Point = &__pyx_type_5_geos_Point; /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":1 @@ -2841,7 +2746,7 @@ */ initGEOS(__pyx_f_5_geos_notice_h,__pyx_f_5_geos_error_h); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":332 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":318 * cdef class Point(BaseGeometry): * cdef public x,y * def __init__(self, b): # <<<<<<<<<<<<<< Modified: trunk/toolkits/basemap-testing/src/_geos.pyx =================================================================== --- trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-13 23:02:59 UTC (rev 4259) +++ trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-13 23:03:46 UTC (rev 4260) @@ -259,20 +259,6 @@ GEOSArea(self._geom, &area) return area -cdef _add_geom(BaseGeometry p, GEOSGeom *geom): - cdef GEOSCoordSeq *cs - cdef GEOSGeom *lr - cdef unsigned int M - if GEOSGeomTypeId(geom) == GEOS_POLYGON: - lr = GEOSGetExteriorRing(geom) - cs = GEOSGeom_getCoordSeq(lr) - else: - cs = GEOSGeom_getCoordSeq(geom) - GEOSCoordSeq_getSize(cs, &M) - p._geom = geom - p._npts = M - return p - cdef _get_coords(GEOSGeom *geom): cdef GEOSCoordSeq *cs cdef GEOSGeom *lr This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 04:03:47
|
Revision: 4263 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4263&view=rev Author: jswhit Date: 2007-11-13 20:03:46 -0800 (Tue, 13 Nov 2007) Log Message: ----------- squash another mem leak. 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 23:29:42 UTC (rev 4262) +++ trunk/toolkits/basemap-testing/src/_geos.c 2007-11-14 04:03:46 UTC (rev 4263) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Tue Nov 13 16:03:26 2007 */ +/* Generated by Cython 0.9.6.7 on Tue Nov 13 21:03:25 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -1659,7 +1659,7 @@ * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx # <<<<<<<<<<<<<< * bbuffer[2*i+1] = dy - * return b + * GEOSCoordSeq_destroy(cs) */ (__pyx_v_bbuffer[(2 * __pyx_v_i)]) = __pyx_v_dx; @@ -1667,8 +1667,8 @@ * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy # <<<<<<<<<<<<<< + * GEOSCoordSeq_destroy(cs) * return b - * */ (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]) = __pyx_v_dy; } @@ -1676,6 +1676,15 @@ /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":282 * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy + * GEOSCoordSeq_destroy(cs) # <<<<<<<<<<<<<< + * return b + * + */ + GEOSCoordSeq_destroy(__pyx_v_cs); + + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":283 + * bbuffer[2*i+1] = dy + * GEOSCoordSeq_destroy(cs) * return b # <<<<<<<<<<<<<< * * cdef class LineString(BaseGeometry): @@ -1717,9 +1726,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_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":293 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":294 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1729,17 +1738,17 @@ __pyx_1 = (!PyArray_ISCONTIGUOUS(__pyx_v_b)); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":294 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":295 * # 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 = 294; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; 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 = 295; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_3); __pyx_3 = 0; @@ -1747,29 +1756,29 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":296 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":297 * b = b.copy() * * M = b.shape[0] # <<<<<<<<<<<<<< * self._npts = M * */ - __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_b), __pyx_n_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; 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 = 297; 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 = 296; goto __pyx_L1;} - __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = PyInt_AsLong(__pyx_4); if (unlikely((__pyx_5 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; goto __pyx_L1;} + __pyx_5 = PyInt_AsLong(__pyx_4); if (unlikely((__pyx_5 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; 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":297 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":298 * * M = b.shape[0] * self._npts = M # <<<<<<<<<<<<<< @@ -1778,7 +1787,7 @@ */ ((struct __pyx_obj_5_geos_LineString *)__pyx_v_self)->__pyx_base._npts = __pyx_v_M; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":300 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":301 * * # Create a coordinate sequence * cs = GEOSCoordSeq_create(M, 2) # <<<<<<<<<<<<<< @@ -1787,7 +1796,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":303 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":304 * * # add to coordinate sequence * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1796,7 +1805,7 @@ */ __pyx_v_bbuffer = ((double (*))__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":304 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":305 * # add to coordinate sequence * bbuffer = <double *>b.data * for i from 0 <= i < M: # <<<<<<<<<<<<<< @@ -1805,7 +1814,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":305 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":306 * bbuffer = <double *>b.data * for i from 0 <= i < M: * dx = bbuffer[2*i] # <<<<<<<<<<<<<< @@ -1814,7 +1823,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[(2 * __pyx_v_i)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":306 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":307 * for i from 0 <= i < M: * dx = bbuffer[2*i] * dy = bbuffer[2*i+1] # <<<<<<<<<<<<<< @@ -1823,7 +1832,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":309 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":310 * # Because of a bug in the GEOS C API, * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) # <<<<<<<<<<<<<< @@ -1832,7 +1841,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,__pyx_v_i,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":310 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":311 * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) * GEOSCoordSeq_setY(cs, i, dy) # <<<<<<<<<<<<<< @@ -1842,7 +1851,7 @@ GEOSCoordSeq_setY(__pyx_v_cs,__pyx_v_i,__pyx_v_dy); } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":313 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":314 * * # create LineString * self._geom = GEOSGeom_createLineString(cs) # <<<<<<<<<<<<<< @@ -1851,7 +1860,7 @@ */ ((struct __pyx_obj_5_geos_LineString *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createLineString(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":314 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":315 * # create LineString * self._geom = GEOSGeom_createLineString(cs) * self.boundary = b # <<<<<<<<<<<<<< @@ -1891,7 +1900,7 @@ Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_b); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":322 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 * cdef GEOSCoordSeq *cs * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) # <<<<<<<<<<<<<< @@ -1900,7 +1909,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(1,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":324 * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] # <<<<<<<<<<<<<< @@ -1912,15 +1921,15 @@ } else if (PyTuple_CheckExact(__pyx_v_b) && 0 <= 0 && 0 < PyTuple_GET_SIZE(__pyx_v_b)) { __pyx_2 = PyTuple_GET_ITEM(__pyx_v_b, 0); Py_INCREF(__pyx_2); } else { - __pyx_1 = PyInt_FromLong(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; } - __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_dx = __pyx_3; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":324 * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] # <<<<<<<<<<<<<< @@ -1932,15 +1941,15 @@ } else if (PyTuple_CheckExact(__pyx_v_b) && 0 <= 1 && 1 < PyTuple_GET_SIZE(__pyx_v_b)) { __pyx_2 = PyTuple_GET_ITEM(__pyx_v_b, 1); Py_INCREF(__pyx_2); } else { - __pyx_1 = PyInt_FromLong(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} - __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_1 = PyInt_FromLong(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} + __pyx_2 = PyObject_GetItem(__pyx_v_b, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; } - __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; goto __pyx_L1;} + __pyx_3 = PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_dy = __pyx_3; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":324 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":325 * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] * GEOSCoordSeq_setX(cs, 0, dx) # <<<<<<<<<<<<<< @@ -1949,7 +1958,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,0,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":325 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":326 * dx = b[0]; dy = b[1] * GEOSCoordSeq_setX(cs, 0, dx) * GEOSCoordSeq_setY(cs, 0, dy) # <<<<<<<<<<<<<< @@ -1958,7 +1967,7 @@ */ GEOSCoordSeq_setY(__pyx_v_cs,0,__pyx_v_dy); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":326 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":327 * GEOSCoordSeq_setX(cs, 0, dx) * GEOSCoordSeq_setY(cs, 0, dy) * self._geom = GEOSGeom_createPoint(cs) # <<<<<<<<<<<<<< @@ -1967,7 +1976,7 @@ */ ((struct __pyx_obj_5_geos_Point *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createPoint(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":327 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":328 * GEOSCoordSeq_setY(cs, 0, dy) * self._geom = GEOSGeom_createPoint(cs) * self._npts = 1 # <<<<<<<<<<<<<< @@ -1975,7 +1984,7 @@ */ ((struct __pyx_obj_5_geos_Point *)__pyx_v_self)->__pyx_base._npts = 1; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":328 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":329 * self._geom = GEOSGeom_createPoint(cs) * self._npts = 1 * self.boundary = b # <<<<<<<<<<<<<< @@ -2691,13 +2700,13 @@ if (PyObject_SetAttrString(__pyx_m, "Polygon", (PyObject *)&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; goto __pyx_L1;} __pyx_ptype_5_geos_Polygon = &__pyx_type_5_geos_Polygon; __pyx_type_5_geos_LineString.tp_base = __pyx_ptype_5_geos_BaseGeometry; - if (PyType_Ready(&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "LineString", (PyObject *)&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; goto __pyx_L1;} + if (PyType_Ready(&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "LineString", (PyObject *)&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} __pyx_ptype_5_geos_LineString = &__pyx_type_5_geos_LineString; __pyx_type_5_geos_Point.tp_base = __pyx_ptype_5_geos_BaseGeometry; __pyx_type_5_geos_Point.tp_free = _PyObject_GC_Del; - if (PyType_Ready(&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "Point", (PyObject *)&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; goto __pyx_L1;} + if (PyType_Ready(&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "Point", (PyObject *)&__pyx_type_5_geos_Point) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; goto __pyx_L1;} __pyx_ptype_5_geos_Point = &__pyx_type_5_geos_Point; /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":1 @@ -2746,7 +2755,7 @@ */ initGEOS(__pyx_f_5_geos_notice_h,__pyx_f_5_geos_error_h); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":318 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":319 * cdef class Point(BaseGeometry): * cdef public x,y * def __init__(self, b): # <<<<<<<<<<<<<< Modified: trunk/toolkits/basemap-testing/src/_geos.pyx =================================================================== --- trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-13 23:29:42 UTC (rev 4262) +++ trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-14 04:03:46 UTC (rev 4263) @@ -279,6 +279,7 @@ GEOSCoordSeq_getY(cs, i, &dy) bbuffer[2*i] = dx bbuffer[2*i+1] = dy + GEOSCoordSeq_destroy(cs) return b cdef class LineString(BaseGeometry): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 13:05:13
|
Revision: 4265 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4265&view=rev Author: jswhit Date: 2007-11-14 05:05:06 -0800 (Wed, 14 Nov 2007) Log Message: ----------- fix one last memory leak 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-14 07:45:12 UTC (rev 4264) +++ trunk/toolkits/basemap-testing/src/_geos.c 2007-11-14 13:05:06 UTC (rev 4265) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Tue Nov 13 21:03:25 2007 */ +/* Generated by Cython 0.9.6.7 on Wed Nov 14 06:04:45 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -1010,7 +1010,7 @@ * else: * type = PyString_FromString(GEOSGeomType(g3)) # <<<<<<<<<<<<<< * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) - * return pout + * GEOSGeom_destroy(g3) */ __pyx_2 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_v_type); @@ -1021,8 +1021,8 @@ * else: * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< + * GEOSGeom_destroy(g3) * return pout - * */ __pyx_4 = PyNumber_Remainder(__pyx_k6p, __pyx_v_type); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} @@ -1039,6 +1039,15 @@ /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":193 * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) + * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< + * return pout + * + */ + GEOSGeom_destroy(__pyx_v_g3); + + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":194 + * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) + * GEOSGeom_destroy(g3) * return pout # <<<<<<<<<<<<<< * * def get_coords(self): @@ -1071,14 +1080,14 @@ PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":196 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":197 * * def get_coords(self): * return _get_coords(self._geom) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_1 = __pyx_f_5_geos__get_coords(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + __pyx_1 = __pyx_f_5_geos__get_coords(((struct __pyx_obj_5_geos_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; @@ -1099,7 +1108,7 @@ static void __pyx_f_py_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self) { 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":201 * def __dealloc__(self): * """destroy GEOS geometry""" * GEOSGeom_destroy(self._geom) # <<<<<<<<<<<<<< @@ -1122,18 +1131,18 @@ PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":204 + /* "/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.boundary,)) # <<<<<<<<<<<<<< * * 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 = 204; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} + __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 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} Py_INCREF(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->boundary); PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->boundary); - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} + __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; @@ -1184,9 +1193,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_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":217 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":218 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1196,17 +1205,17 @@ __pyx_1 = (!PyArray_ISCONTIGUOUS(__pyx_v_b)); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":218 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":219 * # 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 = 218; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; 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 = 219; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_3); __pyx_3 = 0; @@ -1214,78 +1223,78 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":220 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":221 * 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 = 220; 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 = 221; 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 = 220; goto __pyx_L1;} - __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; 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 = 220; goto __pyx_L1;} + __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; 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":223 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":224 * * # 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 = 223; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_6 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_6, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_6 = PyTuple_New(2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_3 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_2 = PyObject_RichCompare(__pyx_4, __pyx_3, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; 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 = 223; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":224 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":225 * # Add closing coordinates to sequence? * if b[-1,0] != b[0,0] or b[-1,1] != b[0,1]: * M = m + 1 # <<<<<<<<<<<<<< @@ -1297,7 +1306,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":226 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":227 * M = m + 1 * else: * M = m # <<<<<<<<<<<<<< @@ -1308,7 +1317,7 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":227 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":228 * else: * M = m * self._npts = M # <<<<<<<<<<<<<< @@ -1317,7 +1326,7 @@ */ ((struct __pyx_obj_5_geos_Polygon *)__pyx_v_self)->__pyx_base._npts = __pyx_v_M; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":230 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":231 * * # Create a coordinate sequence * cs = GEOSCoordSeq_create(M, 2) # <<<<<<<<<<<<<< @@ -1326,7 +1335,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":233 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":234 * * # add to coordinate sequence * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1335,7 +1344,7 @@ */ __pyx_v_bbuffer = ((double (*))__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":234 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":235 * # add to coordinate sequence * bbuffer = <double *>b.data * for i from 0 <= i < m: # <<<<<<<<<<<<<< @@ -1344,7 +1353,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":235 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":236 * bbuffer = <double *>b.data * for i from 0 <= i < m: * dx = bbuffer[2*i] # <<<<<<<<<<<<<< @@ -1353,7 +1362,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[(2 * __pyx_v_i)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":236 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":237 * for i from 0 <= i < m: * dx = bbuffer[2*i] * dy = bbuffer[2*i+1] # <<<<<<<<<<<<<< @@ -1362,7 +1371,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":239 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":240 * # Because of a bug in the GEOS C API, * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) # <<<<<<<<<<<<<< @@ -1371,7 +1380,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,__pyx_v_i,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":240 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":241 * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) * GEOSCoordSeq_setY(cs, i, dy) # <<<<<<<<<<<<<< @@ -1381,7 +1390,7 @@ GEOSCoordSeq_setY(__pyx_v_cs,__pyx_v_i,__pyx_v_dy); } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":243 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":244 * * # Add closing coordinates to sequence? * if M > m: # <<<<<<<<<<<<<< @@ -1391,7 +1400,7 @@ __pyx_1 = (__pyx_v_M > __pyx_v_m); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":244 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":245 * # Add closing coordinates to sequence? * if M > m: * dx = bbuffer[0] # <<<<<<<<<<<<<< @@ -1400,7 +1409,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[0]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":245 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":246 * if M > m: * dx = bbuffer[0] * dy = bbuffer[1] # <<<<<<<<<<<<<< @@ -1409,7 +1418,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[1]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":246 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":247 * dx = bbuffer[0] * dy = bbuffer[1] * GEOSCoordSeq_setX(cs, M-1, dx) # <<<<<<<<<<<<<< @@ -1418,7 +1427,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,(__pyx_v_M - 1),__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":247 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":248 * dy = bbuffer[1] * GEOSCoordSeq_setX(cs, M-1, dx) * GEOSCoordSeq_setY(cs, M-1, dy) # <<<<<<<<<<<<<< @@ -1430,7 +1439,7 @@ } __pyx_L6:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":250 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":251 * * # create LinearRing * lr = GEOSGeom_createLinearRing(cs) # <<<<<<<<<<<<<< @@ -1439,7 +1448,7 @@ */ __pyx_v_lr = GEOSGeom_createLinearRing(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":253 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":254 * * # create Polygon from LinearRing (assuming no holes) * self._geom = GEOSGeom_createPolygon(lr,NULL,0) # <<<<<<<<<<<<<< @@ -1448,7 +1457,7 @@ */ ((struct __pyx_obj_5_geos_Polygon *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createPolygon(__pyx_v_lr,NULL,0); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":254 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":255 * # create Polygon from LinearRing (assuming no holes) * self._geom = GEOSGeom_createPolygon(lr,NULL,0) * self.boundary = b # <<<<<<<<<<<<<< @@ -1481,7 +1490,7 @@ PyObject *__pyx_1 = 0; Py_INCREF((PyObject *)__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":259 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":260 * def area(self): * cdef double area * GEOSArea(self._geom, &area) # <<<<<<<<<<<<<< @@ -1490,14 +1499,14 @@ */ GEOSArea(((struct __pyx_obj_5_geos_Polygon *)__pyx_v_self)->__pyx_base._geom,(&__pyx_v_area)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":260 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":261 * cdef double area * GEOSArea(self._geom, &area) * return area # <<<<<<<<<<<<<< * * cdef _get_coords(GEOSGeom *geom): */ - __pyx_1 = PyFloat_FromDouble(__pyx_v_area); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;} + __pyx_1 = PyFloat_FromDouble(__pyx_v_area); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -1535,7 +1544,7 @@ PyObject *__pyx_5 = 0; __pyx_v_b = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":269 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":270 * cdef ndarray b * cdef double *bbuffer * if GEOSGeomTypeId(geom) == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -1545,7 +1554,7 @@ __pyx_1 = (GEOSGeomTypeId(__pyx_v_geom) == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":270 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":271 * cdef double *bbuffer * if GEOSGeomTypeId(geom) == GEOS_POLYGON: * lr = GEOSGetExteriorRing(geom) # <<<<<<<<<<<<<< @@ -1554,7 +1563,7 @@ */ __pyx_v_lr = GEOSGetExteriorRing(__pyx_v_geom); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":271 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":272 * if GEOSGeomTypeId(geom) == GEOS_POLYGON: * lr = GEOSGetExteriorRing(geom) * cs = GEOSGeom_getCoordSeq(lr) # <<<<<<<<<<<<<< @@ -1566,7 +1575,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":273 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":274 * cs = GEOSGeom_getCoordSeq(lr) * else: * cs = GEOSGeom_getCoordSeq(geom) # <<<<<<<<<<<<<< @@ -1577,7 +1586,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":274 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":275 * else: * cs = GEOSGeom_getCoordSeq(geom) * GEOSCoordSeq_getSize(cs, &M) # <<<<<<<<<<<<<< @@ -1586,39 +1595,39 @@ */ GEOSCoordSeq_getSize(__pyx_v_cs,(&__pyx_v_M)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":275 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":276 * cs = GEOSGeom_getCoordSeq(geom) * GEOSCoordSeq_getSize(cs, &M) * b = numpy.empty((M,2), numpy.float64) # <<<<<<<<<<<<<< * bbuffer = <double *>b.data * for i from 0 <= i < M: */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_empty); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_M); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_2 = PyLong_FromUnsignedLong(__pyx_v_M); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); Py_INCREF(__pyx_num_2); PyTuple_SET_ITEM(__pyx_4, 1, __pyx_num_2); __pyx_2 = 0; - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} - __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_float64); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_2 = PyTuple_New(2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4); PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5); __pyx_4 = 0; __pyx_5 = 0; - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_4); __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":276 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":277 * GEOSCoordSeq_getSize(cs, &M) * b = numpy.empty((M,2), numpy.float64) * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1627,7 +1636,7 @@ */ __pyx_v_bbuffer = ((double (*))__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":277 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":278 * b = numpy.empty((M,2), numpy.float64) * bbuffer = <double *>b.data * for i from 0 <= i < M: # <<<<<<<<<<<<<< @@ -1636,7 +1645,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":278 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":279 * bbuffer = <double *>b.data * for i from 0 <= i < M: * GEOSCoordSeq_getX(cs, i, &dx) # <<<<<<<<<<<<<< @@ -1645,7 +1654,7 @@ */ GEOSCoordSeq_getX(__pyx_v_cs,__pyx_v_i,(&__pyx_v_dx)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":279 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":280 * for i from 0 <= i < M: * GEOSCoordSeq_getX(cs, i, &dx) * GEOSCoordSeq_getY(cs, i, &dy) # <<<<<<<<<<<<<< @@ -1654,37 +1663,28 @@ */ GEOSCoordSeq_getY(__pyx_v_cs,__pyx_v_i,(&__pyx_v_dy)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":280 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":281 * GEOSCoordSeq_getX(cs, i, &dx) * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx # <<<<<<<<<<<<<< * bbuffer[2*i+1] = dy - * GEOSCoordSeq_destroy(cs) + * return b */ (__pyx_v_bbuffer[(2 * __pyx_v_i)]) = __pyx_v_dx; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":281 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":282 * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy # <<<<<<<<<<<<<< - * GEOSCoordSeq_destroy(cs) * return b + * */ (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]) = __pyx_v_dy; } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":282 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":283 * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy - * GEOSCoordSeq_destroy(cs) # <<<<<<<<<<<<<< - * return b - * - */ - GEOSCoordSeq_destroy(__pyx_v_cs); - - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":283 - * bbuffer[2*i+1] = dy - * GEOSCoordSeq_destroy(cs) * return b # <<<<<<<<<<<<<< * * cdef class LineString(BaseGeometry): @@ -2696,8 +2696,8 @@ if (PyObject_SetAttrString(__pyx_m, "BaseGeometry", (PyObject *)&__pyx_type_5_geos_BaseGeometry) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} __pyx_ptype_5_geos_BaseGeometry = &__pyx_type_5_geos_BaseGeometry; __pyx_type_5_geos_Polygon.tp_base = __pyx_ptype_5_geos_BaseGeometry; - if (PyType_Ready(&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "Polygon", (PyObject *)&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; goto __pyx_L1;} + if (PyType_Ready(&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "Polygon", (PyObject *)&__pyx_type_5_geos_Polygon) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;} __pyx_ptype_5_geos_Polygon = &__pyx_type_5_geos_Polygon; __pyx_type_5_geos_LineString.tp_base = __pyx_ptype_5_geos_BaseGeometry; if (PyType_Ready(&__pyx_type_5_geos_LineString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;} Modified: trunk/toolkits/basemap-testing/src/_geos.pyx =================================================================== --- trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-14 07:45:12 UTC (rev 4264) +++ trunk/toolkits/basemap-testing/src/_geos.pyx 2007-11-14 13:05:06 UTC (rev 4265) @@ -190,6 +190,7 @@ else: type = PyString_FromString(GEOSGeomType(g3)) raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) + GEOSGeom_destroy(g3) return pout def get_coords(self): @@ -206,7 +207,7 @@ cdef class Polygon(BaseGeometry): def __init__(self, ndarray b): - cdef unsigned int M, m, n, i + cdef unsigned int M, m, i cdef double dx, dy cdef double *bbuffer cdef GEOSCoordSeq *cs @@ -279,7 +280,6 @@ GEOSCoordSeq_getY(cs, i, &dy) bbuffer[2*i] = dx bbuffer[2*i+1] = dy - GEOSCoordSeq_destroy(cs) return b cdef class LineString(BaseGeometry): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-14 15:42:35
|
Revision: 4269 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4269&view=rev Author: jswhit Date: 2007-11-14 07:42:30 -0800 (Wed, 14 Nov 2007) Log Message: ----------- check library version 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-14 14:00:56 UTC (rev 4268) +++ trunk/toolkits/basemap-testing/src/_geos.c 2007-11-14 15:42:30 UTC (rev 4269) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Wed Nov 14 06:04:45 2007 */ +/* Generated by Cython 0.9.6.6 on Wed Nov 14 08:42:18 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -35,7 +35,7 @@ typedef struct {const char *s; const void **p;} __Pyx_CApiTabEntry; /*proto*/ typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ -typedef struct {PyObject **p; char *s; long n; int is_unicode;} __Pyx_StringTabEntry; /*proto*/ +typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ #define __pyx_PyIndex_AsSsize_t(b) PyInt_AsSsize_t(PyNumber_Index(b)) @@ -71,14 +71,14 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + static PyObject *__Pyx_GetExcValue(void); /*proto*/ -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ - static void __Pyx_WriteUnraisable(char *name); /*proto*/ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ - static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ @@ -129,31 +129,27 @@ /* Implementation of _geos */ static char (__pyx_k3[]) = "0.1"; +static char (__pyx_k4[]) = "version 2.2.3 of the geos library is required"; static PyObject *__pyx_n_sys; static PyObject *__pyx_n_numpy; static PyObject *__pyx_n___version__; -static PyObject *__pyx_n_is_valid; -static PyObject *__pyx_n_geom_type; -static PyObject *__pyx_n_within; -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; +static PyObject *__pyx_n_geos_version; +static PyObject *__pyx_n_ValueError; static PyObject *__pyx_k3p; +static PyObject *__pyx_k4p; +static PyObject *__pyx_builtin_ValueError; + static PyObject *__pyx_n_stdout; static PyObject *__pyx_n_write; -static PyObject *__pyx_k4p; +static PyObject *__pyx_k5p; -static char (__pyx_k4[]) = "GEOS_NOTICE: %s\n"; +static char (__pyx_k5[]) = "GEOS_NOTICE: %s\n"; -static void __pyx_f_5_geos_notice_h(char (*__pyx_v_fmt),char (*__pyx_v_msg)) { +static void __pyx_f_5_geos_notice_h(char (*__pyx_v_fmt),char (*__pyx_v_msg)) { PyObject *__pyx_v_format; PyObject *__pyx_v_message; PyObject *__pyx_v_warn_msg; @@ -164,31 +160,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":100 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":103 * * 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 = 100; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; 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":101 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":104 * 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 = 101; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; 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":102 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":105 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -197,14 +193,14 @@ */ /*try:*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":103 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":106 * 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 = 103; goto __pyx_L2;} + __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L2;} Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_1; __pyx_1 = 0; @@ -213,7 +209,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":104 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":107 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -222,10 +218,10 @@ */ /*except:*/ { __Pyx_AddTraceback("_geos.notice_h"); - __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;} + __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":105 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":108 * warn_msg = format % message * except: * warn_msg = format # <<<<<<<<<<<<<< @@ -239,23 +235,23 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":106 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":109 * 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 = 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;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; 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 = 106; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyNumber_Remainder(__pyx_k4p, __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;} + __pyx_2 = PyNumber_Remainder(__pyx_k5p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; 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 = 106; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; @@ -274,11 +270,11 @@ static PyObject *__pyx_n_stderr; -static PyObject *__pyx_k5p; +static PyObject *__pyx_k6p; -static char (__pyx_k5[]) = "GEOS_ERROR: %s\n"; +static char (__pyx_k6[]) = "GEOS_ERROR: %s\n"; -static void __pyx_f_5_geos_error_h(char (*__pyx_v_fmt),char (*__pyx_v_msg)) { +static void __pyx_f_5_geos_error_h(char (*__pyx_v_fmt),char (*__pyx_v_msg)) { PyObject *__pyx_v_format; PyObject *__pyx_v_message; PyObject *__pyx_v_warn_msg; @@ -289,31 +285,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":109 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":112 * * 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 = 109; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; 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":110 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":113 * 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 = 110; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; 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":111 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":114 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -322,14 +318,14 @@ */ /*try:*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":112 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":115 * 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 = 112; goto __pyx_L2;} + __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L2;} Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_1; __pyx_1 = 0; @@ -338,7 +334,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":113 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":116 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -347,10 +343,10 @@ */ /*except:*/ { __Pyx_AddTraceback("_geos.error_h"); - __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;} + __pyx_1 = __Pyx_GetExcValue(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":114 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":117 * warn_msg = format % message * except: * warn_msg = format # <<<<<<<<<<<<<< @@ -364,23 +360,23 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":115 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":118 * except: * warn_msg = format * sys.stderr.write('GEOS_ERROR: %s\n' % warn_msg) # <<<<<<<<<<<<<< * - * # intialize GEOS (parameters are notice and error function callbacks). + * # check library version */ - __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;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stderr); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; 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 = 115; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = PyNumber_Remainder(__pyx_k5p, __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;} + __pyx_2 = PyNumber_Remainder(__pyx_k6p, __pyx_v_warn_msg); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; 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 = 115; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; @@ -397,14 +393,14 @@ Py_DECREF(__pyx_v_warn_msg); } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused) { char __pyx_v_valid; PyObject *__pyx_r; char __pyx_1; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":127 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":134 * def is_valid(self): * cdef char valid * valid = GEOSisValid(self._geom) # <<<<<<<<<<<<<< @@ -413,7 +409,7 @@ */ __pyx_v_valid = GEOSisValid(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":128 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":135 * cdef char valid * valid = GEOSisValid(self._geom) * if valid: # <<<<<<<<<<<<<< @@ -423,7 +419,7 @@ __pyx_1 = __pyx_v_valid; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":129 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":136 * valid = GEOSisValid(self._geom) * if valid: * return True # <<<<<<<<<<<<<< @@ -437,7 +433,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":131 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":138 * return True * else: * return False # <<<<<<<<<<<<<< @@ -456,20 +452,20 @@ return __pyx_r; } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_geom_type(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_geom_type(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_geom_type(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_geom_type(PyObject *__pyx_v_self, PyObject *unused) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":134 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":141 * * def geom_type(self): * return PyString_FromString(GEOSGeomType(self._geom)) # <<<<<<<<<<<<<< * * def within(self, BaseGeometry geom): */ - __pyx_1 = PyString_FromString(GEOSGeomType(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;} + __pyx_1 = PyString_FromString(GEOSGeomType(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -485,8 +481,8 @@ return __pyx_r; } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_within(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_within(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_within(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_within(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { GEOSGeom (*__pyx_v_g1); GEOSGeom (*__pyx_v_g2); char __pyx_v_answer; @@ -494,9 +490,9 @@ char __pyx_1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_geom); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":139 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":146 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -505,7 +501,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":140 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":147 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -514,7 +510,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":141 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":148 * g1 = self._geom * g2 = geom._geom * answer = GEOSWithin(g1, g2) # <<<<<<<<<<<<<< @@ -523,7 +519,7 @@ */ __pyx_v_answer = GEOSWithin(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":142 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":149 * g2 = geom._geom * answer = GEOSWithin(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -533,7 +529,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":143 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":150 * answer = GEOSWithin(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -547,7 +543,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":145 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":152 * return True * else: * return False # <<<<<<<<<<<<<< @@ -571,8 +567,8 @@ return __pyx_r; } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_intersects(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_intersects(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_intersects(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_intersects(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { GEOSGeom (*__pyx_v_g1); GEOSGeom (*__pyx_v_g2); char __pyx_v_answer; @@ -580,9 +576,9 @@ char __pyx_1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_geom); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":150 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":157 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -591,7 +587,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":151 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":158 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -600,7 +596,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":152 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":159 * g1 = self._geom * g2 = geom._geom * answer = GEOSIntersects(g1, g2) # <<<<<<<<<<<<<< @@ -609,7 +605,7 @@ */ __pyx_v_answer = GEOSIntersects(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":153 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":160 * g2 = geom._geom * answer = GEOSIntersects(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -619,7 +615,7 @@ __pyx_1 = __pyx_v_answer; if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":154 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":161 * answer = GEOSIntersects(g1, g2) * if answer: * return True # <<<<<<<<<<<<<< @@ -633,7 +629,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":156 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":163 * return True * else: * return False # <<<<<<<<<<<<<< @@ -660,14 +656,14 @@ static PyObject *__pyx_n_append; static PyObject *__pyx_n_NotImplementedError; -static PyObject *__pyx_k6p; +static PyObject *__pyx_k7p; static PyObject *__pyx_builtin_NotImplementedError; -static char (__pyx_k6[]) = "intersections of type '%s' not yet implemented"; +static char (__pyx_k7[]) = "intersections of type '%s' not yet implemented"; -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { GEOSGeom (*__pyx_v_g1); GEOSGeom (*__pyx_v_g2); GEOSGeom (*__pyx_v_g3); @@ -690,9 +686,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_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":162 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":169 * cdef char answer * cdef int numgeoms, i, typeid * g1 = self._geom # <<<<<<<<<<<<<< @@ -701,7 +697,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":163 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":170 * cdef int numgeoms, i, typeid * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -710,7 +706,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":164 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":171 * g1 = self._geom * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) # <<<<<<<<<<<<<< @@ -719,7 +715,7 @@ */ __pyx_v_g3 = GEOSIntersection(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":165 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":172 * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< @@ -728,7 +724,7 @@ */ __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":166 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":173 * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -738,42 +734,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":167 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":174 * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = Polygon(b) * pout = [p] */ - __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; goto __pyx_L1;} + __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_g3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":168 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":175 * 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 = 168; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); - __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_Polygon), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_Polygon), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":169 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":176 * 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 = 169; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); Py_DECREF(__pyx_v_pout); @@ -784,42 +780,42 @@ __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":171 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":178 * pout = [p] * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) # <<<<<<<<<<<<<< * p = LineString(b) * pout = [p] */ - __pyx_3 = __pyx_f_5_geos__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; goto __pyx_L1;} + __pyx_3 = __pyx_f_5_geos__get_coords(__pyx_v_g3); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":172 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":179 * 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 = 172; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b); - __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_LineString), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_LineString), __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":173 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":180 * 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 = 173; goto __pyx_L1;} + __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyList_SET_ITEM(__pyx_2, 0, __pyx_v_p); Py_DECREF(__pyx_v_pout); @@ -830,7 +826,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":175 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":182 * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -839,19 +835,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":176 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":183 * 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 = 176; goto __pyx_L1;} + __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":177 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":184 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -860,7 +856,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":178 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":185 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -869,46 +865,46 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3,__pyx_v_i); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":179 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":186 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) # <<<<<<<<<<<<<< * p = Polygon(b) * pout.append(p) */ - __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;} + __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":180 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":187 * 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 = 180; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_b); - __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_Polygon), __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_Polygon), __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":181 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":188 * b = _get_coords(gout) * p = Polygon(b) * pout.append(p) # <<<<<<<<<<<<<< * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) */ - __pyx_3 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_p); - __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; @@ -918,7 +914,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":183 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":190 * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -927,19 +923,19 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":184 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":191 * 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 = 184; goto __pyx_L1;} + __pyx_3 = PyList_New(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;} Py_DECREF(__pyx_v_pout); __pyx_v_pout = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":185 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":192 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -948,7 +944,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":186 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":193 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -957,46 +953,46 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3,__pyx_v_i); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":187 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":194 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) # <<<<<<<<<<<<<< * p = LineString(b) * pout.append(p) */ - __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;} + __pyx_2 = __pyx_f_5_geos__get_coords(__pyx_v_gout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;} Py_DECREF(__pyx_v_b); __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":188 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":195 * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) * p = LineString(b) # <<<<<<<<<<<<<< * pout.append(p) * else: */ - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L1;} Py_INCREF(__pyx_v_b); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_b); - __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_LineString), __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_5_geos_LineString), __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_v_p); __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":189 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":196 * b = _get_coords(gout) * p = LineString(b) * pout.append(p) # <<<<<<<<<<<<<< * else: * type = PyString_FromString(GEOSGeomType(g3)) */ - __pyx_2 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_v_pout, __pyx_n_append); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} Py_INCREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_p); - __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -1005,38 +1001,38 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":191 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":198 * pout.append(p) * else: * type = PyString_FromString(GEOSGeomType(g3)) # <<<<<<<<<<<<<< * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) */ - __pyx_2 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;} + __pyx_2 = PyString_FromString(GEOSGeomType(__pyx_v_g3)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; goto __pyx_L1;} Py_DECREF(__pyx_v_type); __pyx_v_type = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":192 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":199 * else: * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< * GEOSGeom_destroy(g3) * return pout */ - __pyx_4 = PyNumber_Remainder(__pyx_k6p, __pyx_v_type); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} + __pyx_4 = PyNumber_Remainder(__pyx_k7p, __pyx_v_type); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); __pyx_4 = 0; - __pyx_2 = PyObject_CallObject(__pyx_builtin_NotImplementedError, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} + __pyx_2 = PyObject_CallObject(__pyx_builtin_NotImplementedError, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":193 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":200 * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< @@ -1045,7 +1041,7 @@ */ GEOSGeom_destroy(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":194 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":201 * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) * return pout # <<<<<<<<<<<<<< @@ -1074,20 +1070,20 @@ return __pyx_r; } -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_get_coords(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ -static PyObject *__pyx_f_py_5_geos_12BaseGeometry_get_coords(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_f_5_geos_12BaseGeometry_get_coords(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry_get_coords(PyObject *__pyx_v_self, PyObject *unused) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":197 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":204 * * def get_coords(self): * return _get_coords(self._geom) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_1 = __pyx_f_5_geos__get_coords(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;} + __pyx_1 = __pyx_f_5_geos__get_coords(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;} __pyx_r = __pyx_1; __pyx_1 = 0; goto __pyx_L0; @@ -1103,12 +1099,12 @@ return __pyx_r; } -static void __pyx_f_py_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_f_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_5_geos_12BaseGeometry___dealloc__[] = "destroy GEOS geometry"; -static void __pyx_f_py_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self) { +static void __pyx_f_5_geos_12BaseGeometry___dealloc__(PyObject *__pyx_v_self) { Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":201 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":208 * def __dealloc__(self): * """destroy GEOS geometry""" * GEOSGeom_destroy(self._geom) # <<<<<<<<<<<<<< @@ -1122,27 +1118,27 @@ static PyObject *__pyx_n___class__; -static PyObject *__pyx_f_py_5_geos_12BaseGeometry___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_geos_12BaseGeometry___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ static char __pyx_doc_5_geos_12BaseGeometry___reduce__[] = "special method that allows geos instance to be pickled"; -static PyObject *__pyx_f_py_5_geos_12BaseGeometry___reduce__(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_f_5_geos_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 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":212 * def __reduce__(self): * """special method that allows geos instance to be pickled""" * return (self.__class__,(self.boundary,)) # <<<<<<<<<<<<<< * * cdef class Polygon(BaseGeometry): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;} Py_INCREF(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->boundary); PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->boundary); - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; @@ -1164,15 +1160,11 @@ return __pyx_r; } -static PyObject *__pyx_num_neg_1; -static PyObject *__pyx_num_0; -static PyObject *__pyx_num_1; - static PyObject *__pyx_n_copy; static PyObject *__pyx_n_shape; -static int __pyx_f_py_5_geos_7Polygon___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_py_5_geos_7Polygon___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_f_5_geos_7Polygon___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_f_5_geos_7Polygon___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_b = 0; unsigned int __pyx_v_M; unsigned int __pyx_v_m; @@ -1193,9 +1185,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_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; goto __pyx_L1;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":218 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":225 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1205,17 +1197,17 @@ __pyx_1 = (!PyArray_ISCONTIGUOUS(__pyx_v_b)); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":219 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":226 * # 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 = 219; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; 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 = 226; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;} + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_5_geos_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_v_b)); __pyx_v_b = ((PyArrayObject *)__pyx_3); __pyx_3 = 0; @@ -1223,78 +1215,84 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":221 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":228 * 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 = 221; 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 = 228; 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 = 221; goto __pyx_L1;} - __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;} + __pyx_4 = PyObject_GetItem(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; 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 = 221; goto __pyx_L1;} + __pyx_5 = PyInt_AsUnsignedLongMask(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; 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":224 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":231 * * # 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 = 224; 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 = 224; 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 = 224; 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 = 224; 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 = 224; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong((-1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); + PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3); + __pyx_2 = 0; + __pyx_3 = 0; + __pyx_2 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_3 = PyInt_FromLong(0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_4 = PyInt_FromLong(0); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_6 = PyTuple_New(2); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_6, 0, __pyx_3); + PyTuple_SET_ITEM(__pyx_6, 1, __pyx_4); + __pyx_3 = 0; + __pyx_4 = 0; + __pyx_3 = PyObject_GetItem(((PyObject *)__pyx_v_b), __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} 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 = 224; goto __pyx_L1;} + if (PyObject_Cmp(__pyx_2, __pyx_3, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_1 = __pyx_1 != 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; if (!__pyx_1) { + __pyx_4 = PyInt_FromLong((-1)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;} + __pyx_6 = PyInt_FromLong(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; _... [truncated message content] |
From: <js...@us...> - 2007-11-14 18:08:10
|
Revision: 4277 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4277&view=rev Author: jswhit Date: 2007-11-14 10:08:07 -0800 (Wed, 14 Nov 2007) Log Message: ----------- regenerated with Cython 0.9.6.8 Modified Paths: -------------- trunk/toolkits/basemap-testing/src/_geod.c trunk/toolkits/basemap-testing/src/_geos.c trunk/toolkits/basemap-testing/src/_proj.c Modified: trunk/toolkits/basemap-testing/src/_geod.c =================================================================== --- trunk/toolkits/basemap-testing/src/_geod.c 2007-11-14 16:47:09 UTC (rev 4276) +++ trunk/toolkits/basemap-testing/src/_geod.c 2007-11-14 18:08:07 UTC (rev 4277) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.7 on Wed Oct 31 21:20:49 2007 */ +/* Generated by Cython 0.9.6.8 on Wed Nov 14 11:06:42 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -15,12 +15,16 @@ #define PyNumber_Index(o) PyNumber_Int(o) #define PyIndex_Check(o) PyNumber_Check(o) #endif +#ifndef WIN32 + #define __stdcall + #define __cdecl +#endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif -__PYX_EXTERN_C double pow(double, double); +#include <math.h> #include "stdlib.h" #include "math.h" #include "geodesic.h" @@ -35,11 +39,17 @@ #define INLINE #endif -typedef struct {const char *s; const void **p;} __Pyx_CApiTabEntry; /*proto*/ typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ typedef struct {PyObject **p; char *s; long n; int is_unicode;} __Pyx_StringTabEntry; /*proto*/ -#define __pyx_PyIndex_AsSsize_t(b) PyInt_AsSsize_t(PyNumber_Index(b)) +static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject* x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { @@ -49,6 +59,10 @@ } + +static int __pyx_skip_dispatch = 0; + + #ifdef __GNUC__ /* Test for GCC > 2.95 */ #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) @@ -69,6 +83,8 @@ static char *__pyx_filename; static char **__pyx_f; +static char __pyx_mdoc[] = "\ncopyright (c) 2007 by Jeffrey Whitaker.\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notices appear in all copies and that\nboth the copyright notices and this permission notice appear in\nsupporting documentation.\nTHE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\nINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO\nEVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR\nCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF\nUSE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n"; + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ @@ -84,17 +100,23 @@ static void __Pyx_AddTraceback(char *funcname); /*proto*/ -/* Declarations from _geod */ +static PyObject *__Pyx_ImportModule(char *name); /*proto*/ +static int __Pyx_RegisterCleanup(); /*proto*/ +static PyObject* cleanup(PyObject *self, PyObject *unused); /*proto*/ +static PyMethodDef cleanup_def = {"__cleanup", (PyCFunction)&cleanup, METH_NOARGS, 0}; +/* Declarations from _geod */ + struct __pyx_obj_5_geod_Geod { PyObject_HEAD GEODESIC_T geodesic_t; PyObject *geodparams; PyObject *proj_version; - char (*geodinitstring); + char *geodinitstring; }; + static PyTypeObject *__pyx_ptype_5_geod_Geod = 0; static PyObject *__pyx_k3; static PyObject *__pyx_k4; @@ -103,20 +125,20 @@ /* Implementation of _geod */ -static char (__pyx_k2[]) = "1.8.3"; +static char __pyx_k2[] = "1.8.3"; -static PyObject *__pyx_n_math; -static PyObject *__pyx_n__dg2rad; -static PyObject *__pyx_n__rad2dg; -static PyObject *__pyx_n__doublesize; -static PyObject *__pyx_n___version__; -static PyObject *__pyx_n___new__; +static PyObject *__pyx_n___cinit__; static PyObject *__pyx_n___reduce__; static PyObject *__pyx_n__fwd; static PyObject *__pyx_n__inv; static PyObject *__pyx_n__npts; +static PyObject *__pyx_n_math; static PyObject *__pyx_n_radians; +static PyObject *__pyx_n__dg2rad; static PyObject *__pyx_n_degrees; +static PyObject *__pyx_n__rad2dg; +static PyObject *__pyx_n__doublesize; +static PyObject *__pyx_n___version__; static PyObject *__pyx_k2p; @@ -132,13 +154,13 @@ static PyObject *__pyx_builtin_RuntimeError; -static char (__pyx_k6[]) = "+"; -static char (__pyx_k7[]) = "="; -static char (__pyx_k8[]) = " "; -static char (__pyx_k9[]) = ""; +static char __pyx_k6[] = "+"; +static char __pyx_k7[] = "="; +static char __pyx_k8[] = " "; +static char __pyx_k9[] = ""; -static int __pyx_f_py_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_py_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static int __pyx_pf_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pf_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_geodparams = 0; GEODESIC_T __pyx_v_GEOD_T; PyObject *__pyx_v_geodargs; @@ -160,7 +182,7 @@ __pyx_v_key = Py_None; Py_INCREF(Py_None); __pyx_v_value = Py_None; Py_INCREF(Py_None); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":13 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":29 * def __new__(self, geodparams): * cdef GEODESIC_T GEOD_T * self.geodparams = geodparams # <<<<<<<<<<<<<< @@ -171,30 +193,30 @@ Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams); ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams = __pyx_v_geodparams; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":15 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":31 * self.geodparams = geodparams * # setup proj initialization string. * geodargs = [] # <<<<<<<<<<<<<< * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') */ - __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;} + __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;} Py_DECREF(__pyx_v_geodargs); __pyx_v_geodargs = __pyx_1; __pyx_1 = 0; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":16 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":32 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< * geodargs.append('+'+key+"="+str(value)+' ') * self.geodinitstring = PyString_AsString(''.join(geodargs)) */ - __pyx_1 = PyObject_GetAttr(__pyx_v_geodparams, __pyx_n_iteritems); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_geodparams, __pyx_n_iteritems); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; if (PyList_CheckExact(__pyx_3)) { __pyx_2 = 0; __pyx_1 = __pyx_3; Py_INCREF(__pyx_1); } - else { __pyx_1 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} } + else { __pyx_1 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} } Py_DECREF(__pyx_3); __pyx_3 = 0; for (;;) { if (PyList_CheckExact(__pyx_1)) { if (__pyx_2 >= PyList_GET_SIZE(__pyx_1)) break; __pyx_3 = PyList_GET_ITEM(__pyx_1, __pyx_2++); Py_INCREF(__pyx_3); } @@ -218,69 +240,61 @@ Py_DECREF(__pyx_3); __pyx_3 = 0; } else { - __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_v_key); __pyx_v_key = __pyx_5; __pyx_5 = 0; - __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_v_value); __pyx_v_value = __pyx_5; __pyx_5 = 0; - if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; } - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":17 - * geodargs = [] - * for key,value in geodparams.iteritems(): - * geodargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< - * self.geodinitstring = PyString_AsString(''.join(geodargs)) - * # initialize projection - */ - __pyx_5 = PyObject_GetAttr(__pyx_v_geodargs, __pyx_n_append); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - __pyx_3 = PyNumber_Add(__pyx_k6p, __pyx_v_key); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k7p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_5 = PyObject_GetAttr(__pyx_v_geodargs, __pyx_n_append); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_k6p, __pyx_v_key); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} + __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k7p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_INCREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_value); - __pyx_6 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_6 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = PyNumber_Add(__pyx_4, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_4, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k8p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k8p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_6, 0, __pyx_4); __pyx_4 = 0; - __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; } Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":18 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":34 * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') * self.geodinitstring = PyString_AsString(''.join(geodargs)) # <<<<<<<<<<<<<< * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] */ - __pyx_4 = PyObject_GetAttr(__pyx_k9p, __pyx_n_join); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_k9p, __pyx_n_join); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; goto __pyx_L1;} + __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; goto __pyx_L1;} Py_INCREF(__pyx_v_geodargs); PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_geodargs); - __pyx_6 = PyObject_CallObject(__pyx_4, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} + __pyx_6 = PyObject_CallObject(__pyx_4, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring = PyString_AsString(__pyx_6); Py_DECREF(__pyx_6); __pyx_6 = 0; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":20 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":36 * self.geodinitstring = PyString_AsString(''.join(geodargs)) * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< @@ -289,7 +303,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t = (GEOD_init_plus(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring,(&__pyx_v_GEOD_T))[0]); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":21 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":37 * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -298,35 +312,27 @@ */ __pyx_7 = (pj_errno != 0); if (__pyx_7) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":22 - * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] - * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< - * self.proj_version = PJ_VERSION/100. - * - */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} + __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); __pyx_3 = 0; - __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":23 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":39 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< * * def __reduce__(self): */ - __pyx_5 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;} + __pyx_5 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version); ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version = __pyx_5; __pyx_5 = 0; @@ -339,7 +345,7 @@ Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); Py_XDECREF(__pyx_6); - __Pyx_AddTraceback("_geod.Geod.__new__"); + __Pyx_AddTraceback("_geod.Geod.__cinit__"); __pyx_r = -1; __pyx_L0:; Py_DECREF(__pyx_v_geodargs); @@ -352,27 +358,19 @@ static PyObject *__pyx_n___class__; -static PyObject *__pyx_f_py_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_pf_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ static char __pyx_doc_5_geod_4Geod___reduce__[] = "special method that allows pyproj.Geod instance to be pickled"; -static PyObject *__pyx_f_py_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_pf_5_geod_4Geod___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); - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":27 - * def __reduce__(self): - * """special method that allows pyproj.Geod instance to be pickled""" - * return (self.__class__,(self.geodparams,)) # <<<<<<<<<<<<<< - * - * def _fwd(self, object lons, object lats, object az, object dist, radians=False): - */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} Py_INCREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams); PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodparams); - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; @@ -388,7 +386,7 @@ Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); __Pyx_AddTraceback("_geod.Geod.__reduce__"); - __pyx_r = 0; + __pyx_r = NULL; __pyx_L0:; Py_DECREF(__pyx_v_self); return __pyx_r; @@ -401,12 +399,12 @@ static PyObject *__pyx_builtin_ValueError; -static char (__pyx_k10[]) = "Buffer lengths not the same"; -static char (__pyx_k11[]) = "undefined forward geodesic (may be an equatorial arc)"; +static char __pyx_k10[] = "Buffer lengths not the same"; +static char __pyx_k11[] = "undefined forward geodesic (may be an equatorial arc)"; -static PyObject *__pyx_f_py_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pf_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5_geod_4Geod__fwd[] = "\n forward transformation - determine longitude, latitude and back azimuth \n of a terminus point given an initial point longitude and latitude, plus\n forward azimuth and distance.\n if radians=True, lons/lats are radians instead of degrees.\n "; -static PyObject *__pyx_f_py_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lons = 0; PyObject *__pyx_v_lats = 0; PyObject *__pyx_v_az = 0; @@ -418,14 +416,14 @@ Py_ssize_t __pyx_v_buflend; Py_ssize_t __pyx_v_ndim; Py_ssize_t __pyx_v_i; - double (*__pyx_v_lonsdata); - double (*__pyx_v_latsdata); - double (*__pyx_v_azdata); - double (*__pyx_v_distdata); - void (*__pyx_v_londata); - void (*__pyx_v_latdata); - void (*__pyx_v_azdat); - void (*__pyx_v_distdat); + double *__pyx_v_lonsdata; + double *__pyx_v_latsdata; + double *__pyx_v_azdata; + double *__pyx_v_distdata; + void *__pyx_v_londata; + void *__pyx_v_latdata; + void *__pyx_v_azdat; + void *__pyx_v_distdat; PyObject *__pyx_r; int __pyx_1; int __pyx_2; @@ -437,7 +435,7 @@ int __pyx_8; static char *__pyx_argnames[] = {"lons","lats","az","dist","radians",0}; __pyx_v_radians = __pyx_k3; - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO|O", __pyx_argnames, &__pyx_v_lons, &__pyx_v_lats, &__pyx_v_az, &__pyx_v_dist, &__pyx_v_radians))) return 0; + if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO|O", __pyx_argnames, &__pyx_v_lons, &__pyx_v_lats, &__pyx_v_az, &__pyx_v_dist, &__pyx_v_radians))) return NULL; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_lons); Py_INCREF(__pyx_v_lats); @@ -445,7 +443,7 @@ Py_INCREF(__pyx_v_dist); Py_INCREF(__pyx_v_radians); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":40 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":56 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< @@ -454,21 +452,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":41 - * # if buffer api is supported, get pointer to data buffers. - * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: - * raise RuntimeError - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":42 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":58 * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -477,21 +467,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":43 - * raise RuntimeError - * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: - * raise RuntimeError - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":44 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":60 * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< @@ -500,21 +482,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":45 - * raise RuntimeError - * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: - * raise RuntimeError - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":46 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":62 * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< @@ -523,21 +497,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":47 - * raise RuntimeError - * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * # process data in buffer - * if not buflenlons == buflenlats == buflenaz == buflend: - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":49 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":65 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -553,79 +519,71 @@ } __pyx_2 = (!__pyx_1); if (__pyx_2) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":50 - * # process data in buffer - * if not buflenlons == buflenlats == buflenaz == buflend: - * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< - * ndim = buflenlons/_doublesize - * lonsdata = <double *>londata - */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} Py_INCREF(__pyx_k10p); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k10p); - __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; 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 = 50; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":51 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":67 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< * lonsdata = <double *>londata * latsdata = <double *>latdata */ - __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} - __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} + __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;} + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;} + __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyIndex_AsSsize_t(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} + __pyx_6 = __pyx_PyIndex_AsSsize_t(__pyx_5); if (unlikely((__pyx_6 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":52 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":68 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< * latsdata = <double *>latdata * azdata = <double *>azdat */ - __pyx_v_lonsdata = ((double (*))__pyx_v_londata); + __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":53 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":69 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< * azdata = <double *>azdat * distdata = <double *>distdat */ - __pyx_v_latsdata = ((double (*))__pyx_v_latdata); + __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":54 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":70 * lonsdata = <double *>londata * latsdata = <double *>latdata * azdata = <double *>azdat # <<<<<<<<<<<<<< * distdata = <double *>distdat * for i from 0 <= i < ndim: */ - __pyx_v_azdata = ((double (*))__pyx_v_azdat); + __pyx_v_azdata = ((double *)__pyx_v_azdat); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":55 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":71 * latsdata = <double *>latdata * azdata = <double *>azdat * distdata = <double *>distdat # <<<<<<<<<<<<<< * for i from 0 <= i < ndim: * if radians: */ - __pyx_v_distdata = ((double (*))__pyx_v_distdat); + __pyx_v_distdata = ((double *)__pyx_v_distdat); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":56 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":72 * azdata = <double *>azdat * distdata = <double *>distdat * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -634,17 +592,17 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":57 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":73 * distdata = <double *>distdat * for i from 0 <= i < ndim: * if radians: # <<<<<<<<<<<<<< * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] */ - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; goto __pyx_L1;} if (__pyx_1) { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":58 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":74 * for i from 0 <= i < ndim: * if radians: * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< @@ -653,7 +611,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":59 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":75 * if radians: * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< @@ -662,7 +620,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":60 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":76 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< @@ -671,7 +629,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = (__pyx_v_azdata[__pyx_v_i]); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":61 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":77 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -683,55 +641,55 @@ } /*else*/ { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":63 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":79 * self.geodesic_t.DIST = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} + __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} + __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":64 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":80 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} + __pyx_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} + __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":65 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":81 * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + __pyx_4 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":66 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":82 * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -742,7 +700,7 @@ } __pyx_L9:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":67 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":83 * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -751,7 +709,7 @@ */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":68 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":84 * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -760,28 +718,20 @@ */ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":69 - * geod_pre(&self.geodesic_t) - * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< - * geod_for(&self.geodesic_t) - * if pj_errno != 0: - */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} + __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_5, 0, 0); Py_DECREF(__pyx_5); __pyx_5 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;} goto __pyx_L10; } __pyx_L10:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":70 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":86 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -790,7 +740,7 @@ */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":71 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":87 * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -799,28 +749,20 @@ */ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":72 - * geod_for(&self.geodesic_t) - * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< - * if isnan(self.geodesic_t.ALPHA21): - * raise ValueError('undefined forward geodesic (may be an equatorial arc)') - */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} + __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; - __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_5, 0, 0); Py_DECREF(__pyx_5); __pyx_5 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;} goto __pyx_L11; } __pyx_L11:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":73 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":89 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< @@ -829,37 +771,29 @@ */ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (__pyx_8) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":74 - * raise RuntimeError(pj_strerrno(pj_errno)) - * if isnan(self.geodesic_t.ALPHA21): - * raise ValueError('undefined forward geodesic (may be an equatorial arc)') # <<<<<<<<<<<<<< - * if radians: - * lonsdata[i] = self.geodesic_t.p2.v - */ - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} Py_INCREF(__pyx_k11p); PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k11p); - __pyx_4 = PyObject_CallObject(__pyx_builtin_ValueError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_ValueError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; 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 = 74; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} goto __pyx_L12; } __pyx_L12:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":75 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":91 * if isnan(self.geodesic_t.ALPHA21): * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: # <<<<<<<<<<<<<< * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u */ - __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} + __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;} if (__pyx_2) { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":76 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":92 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -868,7 +802,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":77 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":93 * if radians: * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -877,7 +811,7 @@ */ (__pyx_v_latsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":78 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":94 * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -889,51 +823,51 @@ } /*else*/ { - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":80 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":96 * azdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< * latsdata[i] = _rad2dg*self.geodesic_t.p2.u * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} - __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} - __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} + __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} + __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":81 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":97 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} - __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} - __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} + __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} + __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":82 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":98 * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< * * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} - __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} - __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;} + __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;} + __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_azdata[__pyx_v_i]) = __pyx_7; } @@ -947,7 +881,7 @@ Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("_geod.Geod._fwd"); - __pyx_r = 0; + __pyx_r = NULL; __pyx_L0:; Py_DECREF(__pyx_v_self); Py_DECREF(__pyx_v_lons); @@ -961,12 +895,12 @@ static PyObject *__pyx_k12p; static PyObject *__pyx_k13p; -static char (__pyx_k12[]) = "Buffer lengths not the same"; -static char (__pyx_k13[]) = "undefined inverse geodesic (may be an antipodal point)"; +static char __pyx_k12[] = "Buffer lengths not the same"; +static char __pyx_k13[] = "undefined inverse geodesic (may be an antipodal point)"; -static PyObject *__pyx_f_py_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pf_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5_geod_4Geod__inv[] = "\n inverse transformation - return forward and back azimuths, plus distance\n between an initial and terminus lat/lon pair.\n if radians=True, lons/lats are radians instead of degrees.\n "; -static PyObject *__pyx_f_py_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pf_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lons1 = 0; PyObject *__pyx_v_lats1 = 0; PyObject *__pyx_v_lons2 = 0; @@ -978,14 +912,14 @@ Py_ssize_t __pyx_v_buflend; Py_ssize_t __pyx_v_ndim; Py_ssize_t __pyx_v_i; - double (*__pyx_v_lonsdata); - double (*__pyx_v_latsdata); - double (*__pyx_v_azdata); - double (*__pyx_v_distdata); - void (*__pyx_v_londata); - void (*__pyx_v_latdata); - void (*__pyx_v_azdat); - void (*__pyx_v_distdat); + double *__pyx_v_lonsdata; + double *__pyx_v_latsdata; + double *__pyx_v_azdata; + double *__pyx_v_distdata; + void *__pyx_v_londata; + void *__pyx_v_latdata; + void *__pyx_v_azdat; + void *__pyx_v_distdat; PyObject *__pyx_r; int __pyx_1; int __pyx_2; @@ -997,7 +931,7 @@ int __pyx_8; static char *__pyx_argnames[] = {"lons1","lats1","lons2","lats2","radians",0}; __pyx_v_radians = __pyx_k4; - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO|O", __pyx_argnames, &__pyx_v_lons1, &__pyx_v_lats1, &__pyx_v_lons2, &__pyx_v_lats2, &__pyx_v_radians))) return 0; + if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO|O", __pyx_argnames, &__pyx_v_lons1, &__pyx_v_lats1, &__pyx_v_lons2, &__pyx_v_lats2, &__pyx_v_radians))) return NULL; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_lons1); Py_INCREF(__pyx_v_lats1); @@ -1005,7 +939,7 @@ Py_INCREF(__pyx_v_lats2); Py_INCREF(__pyx_v_radians); - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":94 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":110 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< @@ -1014,21 +948,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":95 - * # if buffer api is supported, get pointer to data buffers. - * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: - * raise RuntimeError - */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":96 + /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":112 * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -1037,21 +963,13 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - - /* "/private/tmp/toolkits/basemap-testing/src/_geod.pyx":97 - * raise RuntimeError - * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< - * if PyObject_AsWriteBuffer(lons2, &azdat, &buflen... [truncated message content] |
From: <js...@us...> - 2007-11-15 21:00:12
|
Revision: 4321 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4321&view=rev Author: jswhit Date: 2007-11-15 13:00:07 -0800 (Thu, 15 Nov 2007) Log Message: ----------- library version now a module variable (__geos_version__) 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-15 20:26:03 UTC (rev 4320) +++ trunk/toolkits/basemap-testing/src/_geos.c 2007-11-15 21:00:07 UTC (rev 4321) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.8 on Wed Nov 14 11:06:42 2007 */ +/* Generated by Cython 0.9.6.8 on Thu Nov 15 13:56:55 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -146,17 +146,16 @@ static PyTypeObject *__pyx_ptype_5_geos_Point = 0; static void __pyx_f_5_geos_notice_h(char *,char *); /*proto*/ static void __pyx_f_5_geos_error_h(char *,char *); /*proto*/ +static PyObject *__pyx_f_5_geos_geos_version(void); /*proto*/ static PyObject *__pyx_f_5_geos__get_coords(GEOSGeom *); /*proto*/ /* Implementation of _geos */ static char __pyx_k3[] = "0.1"; -static char __pyx_k4[] = "version 2.2.3 of the geos library is required"; +static char __pyx_k4[] = "2.2.3-CAPI-1.1.1"; +static char __pyx_k5[] = "version 2.2.3 of the geos library is required"; -static PyObject *__pyx_num_2; -static PyObject *__pyx_num_3; - static PyObject *__pyx_n_is_valid; static PyObject *__pyx_n_geom_type; static PyObject *__pyx_n_within; @@ -170,20 +169,21 @@ static PyObject *__pyx_n_sys; static PyObject *__pyx_n_numpy; static PyObject *__pyx_n___version__; -static PyObject *__pyx_n_geos_version; +static PyObject *__pyx_n___geos_version__; static PyObject *__pyx_n_ValueError; static PyObject *__pyx_k3p; static PyObject *__pyx_k4p; +static PyObject *__pyx_k5p; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_n_stdout; static PyObject *__pyx_n_write; -static PyObject *__pyx_k5p; +static PyObject *__pyx_k6p; -static char __pyx_k5[] = "GEOS_NOTICE: %s\n"; +static char __pyx_k6[] = "GEOS_NOTICE: %s\n"; static void __pyx_f_5_geos_notice_h(char *__pyx_v_fmt,char *__pyx_v_msg) { PyObject *__pyx_v_format; @@ -196,31 +196,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":103 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":101 * * 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 = 103; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; 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":104 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":102 * 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 = 104; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; 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":105 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":103 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -228,7 +228,7 @@ * except: */ /*try:*/ { - __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L2;} + __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L2;} Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_1; __pyx_1 = 0; @@ -237,7 +237,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":107 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":105 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -246,7 +246,7 @@ */ /*except:*/ { __Pyx_AddTraceback("_geos.notice_h"); - if (__Pyx_GetException(&__pyx_1, &__pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} + if (__Pyx_GetException(&__pyx_1, &__pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} Py_INCREF(__pyx_v_format); Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_v_format; @@ -257,23 +257,23 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":109 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":107 * 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 = 109; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stdout); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyNumber_Remainder(__pyx_k5p, __pyx_v_warn_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_1 = PyNumber_Remainder(__pyx_k6p, __pyx_v_warn_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -292,9 +292,9 @@ static PyObject *__pyx_n_stderr; -static PyObject *__pyx_k6p; +static PyObject *__pyx_k7p; -static char __pyx_k6[] = "GEOS_ERROR: %s\n"; +static char __pyx_k7[] = "GEOS_ERROR: %s\n"; static void __pyx_f_5_geos_error_h(char *__pyx_v_fmt,char *__pyx_v_msg) { PyObject *__pyx_v_format; @@ -307,31 +307,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":112 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":110 * * 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 = 112; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_fmt); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; 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":113 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":111 * 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 = 113; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; 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":114 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":112 * format = PyString_FromString(fmt) * message = PyString_FromString(msg) * try: # <<<<<<<<<<<<<< @@ -339,7 +339,7 @@ * except: */ /*try:*/ { - __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; goto __pyx_L2;} + __pyx_1 = PyNumber_Remainder(__pyx_v_format, __pyx_v_message); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L2;} Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_1; __pyx_1 = 0; @@ -348,7 +348,7 @@ __pyx_L2:; Py_XDECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":116 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":114 * try: * warn_msg = format % message * except: # <<<<<<<<<<<<<< @@ -357,7 +357,7 @@ */ /*except:*/ { __Pyx_AddTraceback("_geos.error_h"); - if (__Pyx_GetException(&__pyx_1, &__pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} + if (__Pyx_GetException(&__pyx_1, &__pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;} Py_INCREF(__pyx_v_format); Py_DECREF(__pyx_v_warn_msg); __pyx_v_warn_msg = __pyx_v_format; @@ -368,23 +368,23 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":118 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":116 * except: * warn_msg = format * sys.stderr.write('GEOS_ERROR: %s\n' % warn_msg) # <<<<<<<<<<<<<< * * # check library version */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} - __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stderr); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} + __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_stderr); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} + __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_write); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_1 = PyNumber_Remainder(__pyx_k6p, __pyx_v_warn_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} + __pyx_1 = PyNumber_Remainder(__pyx_k7p, __pyx_v_warn_msg); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} + __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_1); __pyx_1 = 0; @@ -401,6 +401,24 @@ Py_DECREF(__pyx_v_warn_msg); } +static PyObject *__pyx_f_5_geos_geos_version(void) { + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + __pyx_1 = PyString_FromString(GEOSversion()); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} + __pyx_r = __pyx_1; + __pyx_1 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + __Pyx_AddTraceback("_geos.geos_version"); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + static PyObject *__pyx_pf_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ static PyObject *__pyx_pf_5_geos_12BaseGeometry_is_valid(PyObject *__pyx_v_self, PyObject *unused) { char __pyx_v_valid; @@ -408,7 +426,7 @@ char __pyx_1; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":134 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":134 * def is_valid(self): * cdef char valid * valid = GEOSisValid(self._geom) # <<<<<<<<<<<<<< @@ -417,7 +435,7 @@ */ __pyx_v_valid = GEOSisValid(((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":135 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":135 * cdef char valid * valid = GEOSisValid(self._geom) * if valid: # <<<<<<<<<<<<<< @@ -476,7 +494,7 @@ Py_INCREF(__pyx_v_geom); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":146 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":146 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -485,7 +503,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":147 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":147 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -494,7 +512,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":148 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":148 * g1 = self._geom * g2 = geom._geom * answer = GEOSWithin(g1, g2) # <<<<<<<<<<<<<< @@ -503,7 +521,7 @@ */ __pyx_v_answer = GEOSWithin(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":149 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":149 * g2 = geom._geom * answer = GEOSWithin(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -546,7 +564,7 @@ Py_INCREF(__pyx_v_geom); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":157 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":157 * cdef GEOSGeom *g1, *g2 * cdef char answer * g1 = self._geom # <<<<<<<<<<<<<< @@ -555,7 +573,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":158 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":158 * cdef char answer * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -564,7 +582,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":159 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":159 * g1 = self._geom * g2 = geom._geom * answer = GEOSIntersects(g1, g2) # <<<<<<<<<<<<<< @@ -573,7 +591,7 @@ */ __pyx_v_answer = GEOSIntersects(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":160 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":160 * g2 = geom._geom * answer = GEOSIntersects(g1, g2) * if answer: # <<<<<<<<<<<<<< @@ -608,11 +626,11 @@ static PyObject *__pyx_n_append; static PyObject *__pyx_n_NotImplementedError; -static PyObject *__pyx_k7p; +static PyObject *__pyx_k8p; static PyObject *__pyx_builtin_NotImplementedError; -static char __pyx_k7[] = "intersections of type '%s' not yet implemented"; +static char __pyx_k8[] = "intersections of type '%s' not yet implemented"; static PyObject *__pyx_pf_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom); /*proto*/ static PyObject *__pyx_pf_5_geos_12BaseGeometry_intersection(PyObject *__pyx_v_self, PyObject *__pyx_v_geom) { @@ -640,7 +658,7 @@ __pyx_v_type = Py_None; Py_INCREF(Py_None); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_geom), __pyx_ptype_5_geos_BaseGeometry, 1, "geom"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":169 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":169 * cdef char answer * cdef int numgeoms, i, typeid * g1 = self._geom # <<<<<<<<<<<<<< @@ -649,7 +667,7 @@ */ __pyx_v_g1 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_self)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":170 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":170 * cdef int numgeoms, i, typeid * g1 = self._geom * g2 = geom._geom # <<<<<<<<<<<<<< @@ -658,7 +676,7 @@ */ __pyx_v_g2 = ((struct __pyx_obj_5_geos_BaseGeometry *)__pyx_v_geom)->_geom; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":171 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":171 * g1 = self._geom * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) # <<<<<<<<<<<<<< @@ -667,7 +685,7 @@ */ __pyx_v_g3 = GEOSIntersection(__pyx_v_g1,__pyx_v_g2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":172 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":172 * g2 = geom._geom * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) # <<<<<<<<<<<<<< @@ -676,7 +694,7 @@ */ __pyx_v_typeid = GEOSGeomTypeId(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":173 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":173 * g3 = GEOSIntersection(g1, g2) * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -686,7 +704,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":174 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":174 * typeid = GEOSGeomTypeId(g3) * if typeid == GEOS_POLYGON: * b = _get_coords(g3) # <<<<<<<<<<<<<< @@ -698,7 +716,7 @@ __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":175 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":175 * if typeid == GEOS_POLYGON: * b = _get_coords(g3) * p = Polygon(b) # <<<<<<<<<<<<<< @@ -714,7 +732,7 @@ __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":176 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":176 * b = _get_coords(g3) * p = Polygon(b) * pout = [p] # <<<<<<<<<<<<<< @@ -732,7 +750,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_LINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":178 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":178 * pout = [p] * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) # <<<<<<<<<<<<<< @@ -744,7 +762,7 @@ __pyx_v_b = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":179 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":179 * elif typeid == GEOS_LINESTRING: * b = _get_coords(g3) * p = LineString(b) # <<<<<<<<<<<<<< @@ -760,7 +778,7 @@ __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":180 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":180 * b = _get_coords(g3) * p = LineString(b) * pout = [p] # <<<<<<<<<<<<<< @@ -778,7 +796,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTIPOLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":182 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":182 * pout = [p] * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -787,7 +805,7 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":183 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":183 * elif typeid == GEOS_MULTIPOLYGON: * numgeoms = GEOSGetNumGeometries(g3) * pout = [] # <<<<<<<<<<<<<< @@ -799,7 +817,7 @@ __pyx_v_pout = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":184 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":184 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -808,7 +826,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":185 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":185 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -817,7 +835,7 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3,__pyx_v_i); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":186 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":186 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) # <<<<<<<<<<<<<< @@ -829,7 +847,7 @@ __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":187 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":187 * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) * p = Polygon(b) # <<<<<<<<<<<<<< @@ -845,7 +863,7 @@ __pyx_v_p = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":188 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":188 * b = _get_coords(gout) * p = Polygon(b) * pout.append(p) # <<<<<<<<<<<<<< @@ -866,7 +884,7 @@ __pyx_1 = (__pyx_v_typeid == GEOS_MULTILINESTRING); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":190 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":190 * pout.append(p) * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) # <<<<<<<<<<<<<< @@ -875,7 +893,7 @@ */ __pyx_v_numgeoms = GEOSGetNumGeometries(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":191 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":191 * elif typeid == GEOS_MULTILINESTRING: * numgeoms = GEOSGetNumGeometries(g3) * pout = [] # <<<<<<<<<<<<<< @@ -887,7 +905,7 @@ __pyx_v_pout = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":192 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":192 * numgeoms = GEOSGetNumGeometries(g3) * pout = [] * for i from 0 <= i < numgeoms: # <<<<<<<<<<<<<< @@ -896,7 +914,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":193 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":193 * pout = [] * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) # <<<<<<<<<<<<<< @@ -905,7 +923,7 @@ */ __pyx_v_gout = GEOSGetGeometryN(__pyx_v_g3,__pyx_v_i); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":194 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":194 * for i from 0 <= i < numgeoms: * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) # <<<<<<<<<<<<<< @@ -917,7 +935,7 @@ __pyx_v_b = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":195 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":195 * gout = GEOSGetGeometryN(g3, i) * b = _get_coords(gout) * p = LineString(b) # <<<<<<<<<<<<<< @@ -933,7 +951,7 @@ __pyx_v_p = __pyx_3; __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":196 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":196 * b = _get_coords(gout) * p = LineString(b) * pout.append(p) # <<<<<<<<<<<<<< @@ -953,7 +971,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":198 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":198 * pout.append(p) * else: * type = PyString_FromString(GEOSGeomType(g3)) # <<<<<<<<<<<<<< @@ -965,14 +983,14 @@ __pyx_v_type = __pyx_2; __pyx_2 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":199 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":199 * else: * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) # <<<<<<<<<<<<<< * GEOSGeom_destroy(g3) * return pout */ - __pyx_4 = PyNumber_Remainder(__pyx_k7p, __pyx_v_type); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} + __pyx_4 = PyNumber_Remainder(__pyx_k8p, __pyx_v_type); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); __pyx_4 = 0; @@ -984,7 +1002,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":200 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":200 * type = PyString_FromString(GEOSGeomType(g3)) * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) # <<<<<<<<<<<<<< @@ -993,7 +1011,7 @@ */ GEOSGeom_destroy(__pyx_v_g3); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":201 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":201 * raise NotImplementedError("intersections of type '%s' not yet implemented" % (type)) * GEOSGeom_destroy(g3) * return pout # <<<<<<<<<<<<<< @@ -1118,7 +1136,7 @@ Py_INCREF(__pyx_v_b); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":225 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":225 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1138,7 +1156,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":228 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":228 * b = b.copy() * * m = b.shape[0] # <<<<<<<<<<<<<< @@ -1160,7 +1178,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_m = __pyx_5; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":231 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":231 * * # Add closing coordinates to sequence? * if b[-1,0] != b[0,0] or b[-1,1] != b[0,1]: # <<<<<<<<<<<<<< @@ -1216,7 +1234,7 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":235 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":235 * else: * M = m * self._npts = M # <<<<<<<<<<<<<< @@ -1225,7 +1243,7 @@ */ ((struct __pyx_obj_5_geos_Polygon *)__pyx_v_self)->__pyx_base._npts = __pyx_v_M; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":238 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":238 * * # Create a coordinate sequence * cs = GEOSCoordSeq_create(M, 2) # <<<<<<<<<<<<<< @@ -1234,7 +1252,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":241 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":241 * * # add to coordinate sequence * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1243,7 +1261,7 @@ */ __pyx_v_bbuffer = ((double *)__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":242 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":242 * # add to coordinate sequence * bbuffer = <double *>b.data * for i from 0 <= i < m: # <<<<<<<<<<<<<< @@ -1252,7 +1270,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":243 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":243 * bbuffer = <double *>b.data * for i from 0 <= i < m: * dx = bbuffer[2*i] # <<<<<<<<<<<<<< @@ -1261,7 +1279,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[(2 * __pyx_v_i)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":244 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":244 * for i from 0 <= i < m: * dx = bbuffer[2*i] * dy = bbuffer[2*i+1] # <<<<<<<<<<<<<< @@ -1270,7 +1288,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":247 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":247 * # Because of a bug in the GEOS C API, * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) # <<<<<<<<<<<<<< @@ -1279,7 +1297,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,__pyx_v_i,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":248 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":248 * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) * GEOSCoordSeq_setY(cs, i, dy) # <<<<<<<<<<<<<< @@ -1289,7 +1307,7 @@ GEOSCoordSeq_setY(__pyx_v_cs,__pyx_v_i,__pyx_v_dy); } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":251 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":251 * * # Add closing coordinates to sequence? * if M > m: # <<<<<<<<<<<<<< @@ -1299,7 +1317,7 @@ __pyx_1 = (__pyx_v_M > __pyx_v_m); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":252 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":252 * # Add closing coordinates to sequence? * if M > m: * dx = bbuffer[0] # <<<<<<<<<<<<<< @@ -1308,7 +1326,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[0]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":253 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":253 * if M > m: * dx = bbuffer[0] * dy = bbuffer[1] # <<<<<<<<<<<<<< @@ -1317,7 +1335,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[1]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":254 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":254 * dx = bbuffer[0] * dy = bbuffer[1] * GEOSCoordSeq_setX(cs, M-1, dx) # <<<<<<<<<<<<<< @@ -1326,7 +1344,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,(__pyx_v_M - 1),__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":255 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":255 * dy = bbuffer[1] * GEOSCoordSeq_setX(cs, M-1, dx) * GEOSCoordSeq_setY(cs, M-1, dy) # <<<<<<<<<<<<<< @@ -1338,7 +1356,7 @@ } __pyx_L6:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":258 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":258 * * # create LinearRing * lr = GEOSGeom_createLinearRing(cs) # <<<<<<<<<<<<<< @@ -1347,7 +1365,7 @@ */ __pyx_v_lr = GEOSGeom_createLinearRing(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":261 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":261 * * # create Polygon from LinearRing (assuming no holes) * self._geom = GEOSGeom_createPolygon(lr,NULL,0) # <<<<<<<<<<<<<< @@ -1356,7 +1374,7 @@ */ ((struct __pyx_obj_5_geos_Polygon *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createPolygon(__pyx_v_lr,NULL,0); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":262 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":262 * # create Polygon from LinearRing (assuming no holes) * self._geom = GEOSGeom_createPolygon(lr,NULL,0) * self.boundary = b # <<<<<<<<<<<<<< @@ -1389,7 +1407,7 @@ PyObject *__pyx_1 = 0; Py_INCREF((PyObject *)__pyx_v_self); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":267 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":267 * def area(self): * cdef double area * GEOSArea(self._geom, &area) # <<<<<<<<<<<<<< @@ -1398,7 +1416,7 @@ */ GEOSArea(((struct __pyx_obj_5_geos_Polygon *)__pyx_v_self)->__pyx_base._geom,(&__pyx_v_area)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":268 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":268 * cdef double area * GEOSArea(self._geom, &area) * return area # <<<<<<<<<<<<<< @@ -1442,7 +1460,7 @@ Py_INCREF(__pyx_v_b); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_5_geos_ndarray, 1, "b"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":279 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":279 * # make sure data is contiguous. * # if not, make a local copy. * if not PyArray_ISCONTIGUOUS(b): # <<<<<<<<<<<<<< @@ -1462,7 +1480,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":282 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":282 * b = b.copy() * * M = b.shape[0] # <<<<<<<<<<<<<< @@ -1484,7 +1502,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_M = __pyx_5; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":283 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":283 * * M = b.shape[0] * self._npts = M # <<<<<<<<<<<<<< @@ -1493,7 +1511,7 @@ */ ((struct __pyx_obj_5_geos_LineString *)__pyx_v_self)->__pyx_base._npts = __pyx_v_M; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":286 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":286 * * # Create a coordinate sequence * cs = GEOSCoordSeq_create(M, 2) # <<<<<<<<<<<<<< @@ -1502,7 +1520,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(__pyx_v_M,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":289 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":289 * * # add to coordinate sequence * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1511,7 +1529,7 @@ */ __pyx_v_bbuffer = ((double *)__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":290 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":290 * # add to coordinate sequence * bbuffer = <double *>b.data * for i from 0 <= i < M: # <<<<<<<<<<<<<< @@ -1520,7 +1538,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":291 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":291 * bbuffer = <double *>b.data * for i from 0 <= i < M: * dx = bbuffer[2*i] # <<<<<<<<<<<<<< @@ -1529,7 +1547,7 @@ */ __pyx_v_dx = (__pyx_v_bbuffer[(2 * __pyx_v_i)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":292 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":292 * for i from 0 <= i < M: * dx = bbuffer[2*i] * dy = bbuffer[2*i+1] # <<<<<<<<<<<<<< @@ -1538,7 +1556,7 @@ */ __pyx_v_dy = (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":295 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":295 * # Because of a bug in the GEOS C API, * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) # <<<<<<<<<<<<<< @@ -1547,7 +1565,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,__pyx_v_i,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":296 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":296 * # always set X before Y * GEOSCoordSeq_setX(cs, i, dx) * GEOSCoordSeq_setY(cs, i, dy) # <<<<<<<<<<<<<< @@ -1557,7 +1575,7 @@ GEOSCoordSeq_setY(__pyx_v_cs,__pyx_v_i,__pyx_v_dy); } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":299 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":299 * * # create LineString * self._geom = GEOSGeom_createLineString(cs) # <<<<<<<<<<<<<< @@ -1566,7 +1584,7 @@ */ ((struct __pyx_obj_5_geos_LineString *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createLineString(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":300 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":300 * # create LineString * self._geom = GEOSGeom_createLineString(cs) * self.boundary = b # <<<<<<<<<<<<<< @@ -1606,7 +1624,7 @@ Py_INCREF((PyObject *)__pyx_v_self); Py_INCREF(__pyx_v_b); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":308 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":308 * cdef GEOSCoordSeq *cs * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) # <<<<<<<<<<<<<< @@ -1615,7 +1633,7 @@ */ __pyx_v_cs = GEOSCoordSeq_create(1,2); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":309 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":309 * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] # <<<<<<<<<<<<<< @@ -1635,7 +1653,7 @@ Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_dx = __pyx_3; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":309 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":309 * # Create a coordinate sequence * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] # <<<<<<<<<<<<<< @@ -1655,7 +1673,7 @@ Py_DECREF(__pyx_2); __pyx_2 = 0; __pyx_v_dy = __pyx_3; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":310 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":310 * cs = GEOSCoordSeq_create(1, 2) * dx = b[0]; dy = b[1] * GEOSCoordSeq_setX(cs, 0, dx) # <<<<<<<<<<<<<< @@ -1664,7 +1682,7 @@ */ GEOSCoordSeq_setX(__pyx_v_cs,0,__pyx_v_dx); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":311 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":311 * dx = b[0]; dy = b[1] * GEOSCoordSeq_setX(cs, 0, dx) * GEOSCoordSeq_setY(cs, 0, dy) # <<<<<<<<<<<<<< @@ -1673,7 +1691,7 @@ */ GEOSCoordSeq_setY(__pyx_v_cs,0,__pyx_v_dy); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":312 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":312 * GEOSCoordSeq_setX(cs, 0, dx) * GEOSCoordSeq_setY(cs, 0, dy) * self._geom = GEOSGeom_createPoint(cs) # <<<<<<<<<<<<<< @@ -1682,7 +1700,7 @@ */ ((struct __pyx_obj_5_geos_Point *)__pyx_v_self)->__pyx_base._geom = GEOSGeom_createPoint(__pyx_v_cs); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":313 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":313 * GEOSCoordSeq_setY(cs, 0, dy) * self._geom = GEOSGeom_createPoint(cs) * self._npts = 1 # <<<<<<<<<<<<<< @@ -1691,7 +1709,7 @@ */ ((struct __pyx_obj_5_geos_Point *)__pyx_v_self)->__pyx_base._npts = 1; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":314 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":314 * self._geom = GEOSGeom_createPoint(cs) * self._npts = 1 * self.boundary = b # <<<<<<<<<<<<<< @@ -1715,6 +1733,8 @@ return __pyx_r; } +static PyObject *__pyx_num_2; + static PyObject *__pyx_n_empty; static PyObject *__pyx_n_float64; @@ -1735,7 +1755,7 @@ PyObject *__pyx_5 = 0; __pyx_v_b = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":323 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":323 * cdef ndarray b * cdef double *bbuffer * if GEOSGeomTypeId(geom) == GEOS_POLYGON: # <<<<<<<<<<<<<< @@ -1745,7 +1765,7 @@ __pyx_1 = (GEOSGeomTypeId(__pyx_v_geom) == GEOS_POLYGON); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":324 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":324 * cdef double *bbuffer * if GEOSGeomTypeId(geom) == GEOS_POLYGON: * lr = GEOSGetExteriorRing(geom) # <<<<<<<<<<<<<< @@ -1754,7 +1774,7 @@ */ __pyx_v_lr = GEOSGetExteriorRing(__pyx_v_geom); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":325 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":325 * if GEOSGeomTypeId(geom) == GEOS_POLYGON: * lr = GEOSGetExteriorRing(geom) * cs = GEOSGeom_getCoordSeq(lr) # <<<<<<<<<<<<<< @@ -1769,7 +1789,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":328 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":328 * else: * cs = GEOSGeom_getCoordSeq(geom) * GEOSCoordSeq_getSize(cs, &M) # <<<<<<<<<<<<<< @@ -1778,7 +1798,7 @@ */ GEOSCoordSeq_getSize(__pyx_v_cs,(&__pyx_v_M)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":329 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":329 * cs = GEOSGeom_getCoordSeq(geom) * GEOSCoordSeq_getSize(cs, &M) * b = numpy.empty((M,2), numpy.float64) # <<<<<<<<<<<<<< @@ -1810,7 +1830,7 @@ __pyx_v_b = ((PyArrayObject *)__pyx_4); __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":330 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":330 * GEOSCoordSeq_getSize(cs, &M) * b = numpy.empty((M,2), numpy.float64) * bbuffer = <double *>b.data # <<<<<<<<<<<<<< @@ -1819,7 +1839,7 @@ */ __pyx_v_bbuffer = ((double *)__pyx_v_b->data); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":331 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":331 * b = numpy.empty((M,2), numpy.float64) * bbuffer = <double *>b.data * for i from 0 <= i < M: # <<<<<<<<<<<<<< @@ -1828,7 +1848,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":332 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":332 * bbuffer = <double *>b.data * for i from 0 <= i < M: * GEOSCoordSeq_getX(cs, i, &dx) # <<<<<<<<<<<<<< @@ -1837,7 +1857,7 @@ */ GEOSCoordSeq_getX(__pyx_v_cs,__pyx_v_i,(&__pyx_v_dx)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":333 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":333 * for i from 0 <= i < M: * GEOSCoordSeq_getX(cs, i, &dx) * GEOSCoordSeq_getY(cs, i, &dy) # <<<<<<<<<<<<<< @@ -1846,7 +1866,7 @@ */ GEOSCoordSeq_getY(__pyx_v_cs,__pyx_v_i,(&__pyx_v_dy)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":334 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":334 * GEOSCoordSeq_getX(cs, i, &dx) * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx # <<<<<<<<<<<<<< @@ -1855,7 +1875,7 @@ */ (__pyx_v_bbuffer[(2 * __pyx_v_i)]) = __pyx_v_dx; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":335 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":335 * GEOSCoordSeq_getY(cs, i, &dy) * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy # <<<<<<<<<<<<<< @@ -1864,7 +1884,7 @@ (__pyx_v_bbuffer[((2 * __pyx_v_i) + 1)]) = __pyx_v_dy; } - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":336 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":336 * bbuffer[2*i] = dx * bbuffer[2*i+1] = dy * return b # <<<<<<<<<<<<<< @@ -1892,6 +1912,7 @@ {&__pyx_n_ValueError, "ValueError"}, {&__pyx_n___class__, "__class__"}, {&__pyx_n___dealloc__, "__dealloc__"}, + {&__pyx_n___geos_version__, "__geos_version__"}, {&__pyx_n___init__, "__init__"}, {&__pyx_n___reduce__, "__reduce__"}, {&__pyx_n___version__, "__version__"}, @@ -1901,7 +1922,6 @@ {&__pyx_n_empty, "empty"}, {&__pyx_n_float64, "float64"}, {&__pyx_n_geom_type, "geom_type"}, - {&__pyx_n_geos_version, "geos_version"}, {&__pyx_n_get_coords, "get_coords"}, {&__pyx_n_intersection, "intersection"}, {&__pyx_n_intersects, "intersects"}, @@ -1922,6 +1942,7 @@ {&__pyx_k5p, __pyx_k5, sizeof(__pyx_k5), 0}, {&__pyx_k6p, __pyx_k6, sizeof(__pyx_k6), 0}, {&__pyx_k7p, __pyx_k7, sizeof(__pyx_k7), 0}, + {&__pyx_k8p, __pyx_k8, sizeof(__pyx_k8), 0}, {0, 0, 0, 0} }; @@ -2568,9 +2589,7 @@ PyMODINIT_FUNC init_geos(void) { PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - int __pyx_5; + int __pyx_3; /*--- Libary function declarations ---*/ __pyx_init_filenames(); /*--- Module creation code ---*/ @@ -2580,11 +2599,10 @@ if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; /*--- Intern code ---*/ - __pyx_num_2 = PyInt_FromLong(2); if (unlikely(!__pyx_num_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; - __pyx_num_3 = PyInt_FromLong(3); if (unlikely(!__pyx_num_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; __pyx_num_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_num_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; __pyx_num_0 = PyInt_FromLong(0); if (unlikely(!__pyx_num_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; __pyx_num_1 = PyInt_FromLong(1); if (unlikely(!__pyx_num_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; + __pyx_num_2 = PyInt_FromLong(2); if (unlikely(!__pyx_num_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; /*--- String init code ---*/ if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}; @@ -2616,7 +2634,7 @@ /*--- Type import code ---*/ /*--- Execution code ---*/ - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":1 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":1 * import sys # <<<<<<<<<<<<<< * import numpy * @@ -2625,7 +2643,7 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n_sys, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":2 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":2 * import sys * import numpy # <<<<<<<<<<<<<< * @@ -2635,7 +2653,7 @@ if (PyObject_SetAttr(__pyx_m, __pyx_n_numpy, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":4 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":4 * import numpy * * __version__ = "0.1" # <<<<<<<<<<<<<< @@ -2644,7 +2662,7 @@ */ if (PyObject_SetAttr(__pyx_m, __pyx_n___version__, __pyx_k3p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":26 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":26 * * # Initialize numpy * import_array() # <<<<<<<<<<<<<< @@ -2653,60 +2671,43 @@ */ import_array(); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":121 - * - * # check library version - * geos_version = GEOS_VERSION_MAJOR,GEOS_VERSION_MINOR,GEOS_VERSION_PATCH # <<<<<<<<<<<<<< - * if geos_version != (2,2,3): + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":121 + * cdef geos_version(): + * return PyString_FromString(GEOSversion()) + * __geos_version__ = geos_version() # module variable. # <<<<<<<<<<<<<< + * if __geos_version__ != "2.2.3-CAPI-1.1.1": * raise ValueError('version 2.2.3 of the geos library is required') */ - __pyx_1 = PyInt_FromLong(GEOS_VERSION_MAJOR); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;} - __pyx_2 = PyInt_FromLong(GEOS_VERSION_MINOR); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;} - __pyx_3 = PyInt_FromLong(GEOS_VERSION_PATCH); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;} - __pyx_4 = PyTuple_New(3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2); - PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3); - __pyx_1 = 0; - __pyx_2 = 0; - __pyx_3 = 0; - if (PyObject_SetAttr(__pyx_m, __pyx_n_geos_version, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_1 = __pyx_f_5_geos_geos_version(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n___geos_version__, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":122 - * # check library version - * geos_version = GEOS_VERSION_MAJOR,GEOS_VERSION_MINOR,GEOS_VERSION_PATCH - * if geos_version != (2,2,3): # <<<<<<<<<<<<<< + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":122 + * return PyString_FromString(GEOSversion()) + * __geos_version__ = geos_version() # module variable. + * if __geos_version__ != "2.2.3-CAPI-1.1.1": # <<<<<<<<<<<<<< * raise ValueError('version 2.2.3 of the geos library is required') * # intialize GEOS (parameters are notice and error function callbacks). */ - __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_geos_version); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} - __pyx_2 = PyTuple_New(3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} - Py_INCREF(__pyx_num_2); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_num_2); - Py_INCREF(__pyx_num_2); - PyTuple_SET_ITEM(__pyx_2, 1, __pyx_num_2); - Py_INCREF(__pyx_num_3); - PyTuple_SET_ITEM(__pyx_2, 2, __pyx_num_3); - __pyx_3 = PyObject_RichCompare(__pyx_1, __pyx_2, Py_NE); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n___geos_version__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} + __pyx_2 = PyObject_RichCompare(__pyx_1, __pyx_k4p, Py_NE); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_3 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_5 = __Pyx_PyObject_IsTrue(__pyx_3); if (unlikely(__pyx_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - if (__pyx_5) { - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;} - Py_INCREF(__pyx_k4p); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k4p); - __pyx_1 = PyObject_CallObject(__pyx_builtin_ValueError, __pyx_4); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __Pyx_Raise(__pyx_1, 0, 0); + if (__pyx_3) { + __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;} + Py_INCREF(__pyx_k5p); + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k5p); + __pyx_2 = PyObject_CallObject(__pyx_builtin_ValueError, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;} Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geos.pyx":125 + /* "/Volumes/User/jwhitaker/matplotlib/basemap-testing/src/_geos.pyx":125 * raise ValueError('version 2.2.3 of the geos library is required') * # intialize GEOS (parameters are notice and error function callbacks... [truncated message content] |