From: <js...@us...> - 2008-05-23 21:53:34
|
Revision: 5247 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5247&view=rev Author: jswhit Date: 2008-05-23 14:53:33 -0700 (Fri, 23 May 2008) Log Message: ----------- update pyproj to 1.8.5 Modified Paths: -------------- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/pyproj.py trunk/toolkits/basemap/src/_proj.c trunk/toolkits/basemap/src/_proj.pyx trunk/toolkits/basemap/src/_pyproj.pxi Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/pyproj.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/pyproj.py 2008-05-23 21:53:01 UTC (rev 5246) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/pyproj.py 2008-05-23 21:53:33 UTC (rev 5247) @@ -66,7 +66,8 @@ A Proj class instance is initialized with proj map projection control parameter key/value pairs. The key/value pairs can - either be passed in a dictionary, or as keyword arguments. See + either be passed in a dictionary, or as keyword arguments, + or as a proj4 string (compatible with the proj command). See http://www.remotesensing.org/geotiff/proj_list for examples of key/value pairs defining different map projections. @@ -97,7 +98,7 @@ Example usage: >>> from pyproj import Proj - >>> p = Proj(proj='utm',zone=10,ellps='WGS84') + >>> p = Proj(proj='utm',zone=10,ellps='WGS84') # use kwargs >>> x,y = p(-120.108, 34.36116666) >>> print 'x=%9.3f y=%11.3f' % (x,y) x=765975.641 y=3805993.134 @@ -116,20 +117,35 @@ lons: -119.720 -118.400 -122.380 >>> print 'lats: %8.3f %8.3f %8.3f' % lats lats: 36.770 33.930 37.620 + >>> p2 = Proj('+proj=utm +zone=10 +ellps=WGS84') # use proj4 string + >>> x,y = p2(-120.108, 34.36116666) + >>> print 'x=%9.3f y=%11.3f' % (x,y) + x=765975.641 y=3805993.134 """ # if projparams is None, use kwargs. if projparams is None: if len(kwargs) == 0: raise RuntimeError('no projection control parameters specified') else: - projparams = kwargs - # set units to meters. - if not projparams.has_key('units'): - projparams['units']='m' - elif projparams['units'] != 'm': - print 'resetting units to meters ...' - projparams['units']='m' - return _Proj.__new__(self, projparams) + projstring = _dict2string(kwargs) + elif type(projparams) == str: + # if projparams is a string, interpret as a proj4 init string. + projstring = projparams + else: # projparams a dict + projstring = _dict2string(projparams) + # make sure units are meters. + if not projstring.count('+units='): + projstring = '+units=m '+projstring + else: + kvpairs = [] + for kvpair in projstring.split(): + if kvpair.startswith('+units'): + k,v = kvpair.split('=') + kvpairs.append(k+'=m ') + else: + kvpairs.append(kvpair+' ') + projstring = ''.join(kvpairs) + return _Proj.__new__(self, projstring) def __call__(self, *args, **kw): #,lon,lat,inverse=False,radians=False,errcheck=False): @@ -331,6 +347,13 @@ else: return inx +def _dict2string(projparams): + # convert a dict to a proj4 string. + pjargs = [] + for key,value in projparams.iteritems(): + pjargs.append('+'+key+"="+str(value)+' ') + return ''.join(pjargs) + class Geod(_Geod): """ performs forward and inverse geodetic, or Great Circle, Modified: trunk/toolkits/basemap/src/_proj.c =================================================================== --- trunk/toolkits/basemap/src/_proj.c 2008-05-23 21:53:01 UTC (rev 5246) +++ trunk/toolkits/basemap/src/_proj.c 2008-05-23 21:53:33 UTC (rev 5247) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.14 on Tue May 20 09:59:26 2008 */ +/* Generated by Cython 0.9.6.14 on Fri May 23 15:52:15 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -106,20 +106,6 @@ static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ -static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ -static int __Pyx_EndUnpack(PyObject *); /*proto*/ - -static inline PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { - if (likely(PyList_CheckExact(L))) { - if (PyList_Append(L, x) < 0) return NULL; - Py_INCREF(Py_None); - return Py_None; // this is just to have an accurate signature - } - else { - return PyObject_CallMethod(L, "append", "(O)", x); - } -} - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ @@ -139,13 +125,12 @@ * * cdef class Proj: # <<<<<<<<<<<<<< * cdef projPJ projpj - * cdef public object projparams + * cdef public object proj_version */ struct __pyx_obj_5_proj_Proj { PyObject_HEAD projPJ projpj; - PyObject *projparams; PyObject *proj_version; char *pjinitstring; PyObject *srs; @@ -162,7 +147,7 @@ /* Implementation of _proj */ -static char __pyx_k_2[] = "1.8.4"; +static char __pyx_k_2[] = "1.8.5"; static PyObject *__pyx_n___cinit__; static PyObject *__pyx_n___dealloc__; @@ -218,187 +203,59 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":19 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":18 * cdef public object srs * - * def __new__(self, projparams): # <<<<<<<<<<<<<< - * self.projparams = projparams + * def __new__(self, projstring): # <<<<<<<<<<<<<< * # setup proj initialization string. + * self.srs = projstring */ -static PyObject *__pyx_n_iteritems; -static PyObject *__pyx_n_append; -static PyObject *__pyx_n_join; static PyObject *__pyx_n_RuntimeError; -static PyObject *__pyx_k_3p; -static PyObject *__pyx_k_4p; -static PyObject *__pyx_k_5p; -static PyObject *__pyx_k_6p; - static PyObject *__pyx_builtin_RuntimeError; -static char __pyx_k_3[] = "+"; -static char __pyx_k_4[] = "="; -static char __pyx_k_5[] = " "; -static char __pyx_k_6[] = ""; - static int __pyx_pf_5_proj_4Proj___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pf_5_proj_4Proj___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_projparams = 0; - PyObject *__pyx_v_pjargs; - PyObject *__pyx_v_key; - PyObject *__pyx_v_value; + PyObject *__pyx_v_projstring = 0; int __pyx_r; - PyObject *__pyx_1 = 0; - Py_ssize_t __pyx_2 = 0; + int __pyx_1; + PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - PyObject *__pyx_5 = 0; - int __pyx_6; - static char *__pyx_argnames[] = {"projparams",0}; + static char *__pyx_argnames[] = {"projstring",0}; if (likely(!__pyx_kwds) && likely(PyTuple_GET_SIZE(__pyx_args) == 1)) { - __pyx_v_projparams = PyTuple_GET_ITEM(__pyx_args, 0); + __pyx_v_projstring = PyTuple_GET_ITEM(__pyx_args, 0); } else { - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_projparams))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L2;} + if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_projstring))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; __Pyx_AddTraceback("_proj.Proj.__cinit__"); return -1; __pyx_L3:; - __pyx_v_pjargs = Py_None; Py_INCREF(Py_None); - __pyx_v_key = Py_None; Py_INCREF(Py_None); - __pyx_v_value = Py_None; Py_INCREF(Py_None); /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":20 - * - * def __new__(self, projparams): - * self.projparams = projparams # <<<<<<<<<<<<<< + * def __new__(self, projstring): * # setup proj initialization string. - * pjargs = [] - */ - Py_INCREF(__pyx_v_projparams); - 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; - - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":22 - * 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 = 22; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_pjargs); - __pyx_v_pjargs = ((PyObject *)__pyx_1); - __pyx_1 = 0; - - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":23 - * # 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 = 23; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; 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 = 23; __pyx_clineno = __LINE__; 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); } - else { - __pyx_3 = PyIter_Next(__pyx_1); - if (!__pyx_3) { - break; - } - } - if (PyTuple_CheckExact(__pyx_3) && PyTuple_GET_SIZE(__pyx_3) == 2) { - PyObject* tuple = __pyx_3; - __pyx_5 = PyTuple_GET_ITEM(tuple, 0); - Py_INCREF(__pyx_5); - Py_DECREF(__pyx_v_key); - __pyx_v_key = __pyx_5; - __pyx_5 = 0; - __pyx_5 = PyTuple_GET_ITEM(tuple, 1); - Py_INCREF(__pyx_5); - Py_DECREF(__pyx_v_value); - __pyx_v_value = __pyx_5; - __pyx_5 = 0; - 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 = 23; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = __Pyx_UnpackItem(__pyx_4, 0); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_v_key); - __pyx_v_key = __pyx_5; - __pyx_5 = 0; - __pyx_5 = __Pyx_UnpackItem(__pyx_4, 1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; 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 = 23; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - } - - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":24 - * pjargs = [] - * for key,value in projparams.iteritems(): - * pjargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< - * self.srs = ''.join(pjargs) + * self.srs = projstring # <<<<<<<<<<<<<< * self.pjinitstring = PyString_AsString(self.srs) - */ - __pyx_5 = PyNumber_Add(__pyx_k_3p, __pyx_v_key); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = PyNumber_Add(__pyx_5, __pyx_k_4p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_value); - __pyx_5 = PyObject_Call(((PyObject*)&PyString_Type), ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; - __pyx_4 = PyNumber_Add(__pyx_3, __pyx_5); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_3 = PyNumber_Add(__pyx_4, __pyx_k_5p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_5 = __Pyx_PyObject_Append(__pyx_v_pjargs, __pyx_3); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_5); __pyx_5 = 0; - } - Py_DECREF(__pyx_1); __pyx_1 = 0; - - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":25 - * for key,value in projparams.iteritems(): - * pjargs.append('+'+key+"="+str(value)+' ') - * self.srs = ''.join(pjargs) # <<<<<<<<<<<<<< - * self.pjinitstring = PyString_AsString(self.srs) * # initialize projection */ - __pyx_4 = PyObject_GetAttr(__pyx_k_6p, __pyx_n_join); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_v_pjargs); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_pjargs); - __pyx_5 = PyObject_Call(__pyx_4, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; + Py_INCREF(__pyx_v_projstring); Py_DECREF(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->srs); - ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->srs = __pyx_5; - __pyx_5 = 0; + ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->srs = __pyx_v_projstring; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":26 - * pjargs.append('+'+key+"="+str(value)+' ') - * self.srs = ''.join(pjargs) + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":21 + * # setup proj initialization string. + * self.srs = projstring * self.pjinitstring = PyString_AsString(self.srs) # <<<<<<<<<<<<<< * # initialize projection * self.projpj = pj_init_plus(self.pjinitstring) */ ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->pjinitstring = PyString_AsString(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->srs); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":28 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":23 * self.pjinitstring = PyString_AsString(self.srs) * # initialize projection * self.projpj = pj_init_plus(self.pjinitstring) # <<<<<<<<<<<<<< @@ -407,65 +264,60 @@ */ ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->projpj = pj_init_plus(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->pjinitstring); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":29 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":24 * # initialize projection * self.projpj = pj_init_plus(self.pjinitstring) * if pj_errno != 0: # <<<<<<<<<<<<<< * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. */ - __pyx_6 = (pj_errno != 0); - if (__pyx_6) { + __pyx_1 = (pj_errno != 0); + if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":30 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":25 * self.projpj = pj_init_plus(self.pjinitstring) * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< * self.proj_version = PJ_VERSION/100. * */ - __pyx_1 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1); - __pyx_1 = 0; - __pyx_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1;} - goto __pyx_L6; + __pyx_2 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); + __pyx_2 = 0; + __pyx_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + goto __pyx_L4; } - __pyx_L6:; + __pyx_L4:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":31 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":26 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_5 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->proj_version); - ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->proj_version = __pyx_5; - __pyx_5 = 0; + ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->proj_version = __pyx_3; + __pyx_3 = 0; __pyx_r = 0; goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_2); Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_5); __Pyx_AddTraceback("_proj.Proj.__cinit__"); __pyx_r = -1; __pyx_L0:; - Py_DECREF(__pyx_v_pjargs); - Py_DECREF(__pyx_v_key); - Py_DECREF(__pyx_v_value); return __pyx_r; } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":33 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":28 * self.proj_version = PJ_VERSION/100. * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -477,7 +329,7 @@ static char __pyx_doc_5_proj_4Proj___dealloc__[] = "destroy projection definition"; static void __pyx_pf_5_proj_4Proj___dealloc__(PyObject *__pyx_v_self) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":35 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":30 * def __dealloc__(self): * """destroy projection definition""" * pj_free(self.projpj) # <<<<<<<<<<<<<< @@ -488,12 +340,12 @@ } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":37 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":32 * pj_free(self.projpj) * * def __reduce__(self): # <<<<<<<<<<<<<< * """special method that allows pyproj.Proj instance to be pickled""" - * return (self.__class__,(self.projparams,)) + * return (self.__class__,(self.srs,)) */ static PyObject *__pyx_n___class__; @@ -506,18 +358,18 @@ PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":39 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":34 * def __reduce__(self): * """special method that allows pyproj.Proj instance to be pickled""" - * return (self.__class__,(self.projparams,)) # <<<<<<<<<<<<<< + * return (self.__class__,(self.srs,)) # <<<<<<<<<<<<<< * * def _fwd(self, object lons, object lats, radians=False, errcheck=False): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->projparams); - PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->projparams); - __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_INCREF(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->srs); + PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->srs); + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, ((PyObject *)__pyx_2)); __pyx_1 = 0; @@ -538,17 +390,17 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":41 - * return (self.__class__,(self.projparams,)) +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":36 + * return (self.__class__,(self.srs,)) * * def _fwd(self, object lons, object lats, radians=False, errcheck=False): # <<<<<<<<<<<<<< * """ * forward transformation - lons,lats to x,y (done in place). */ -static PyObject *__pyx_k_7p; +static PyObject *__pyx_k_3p; -static char __pyx_k_7[] = "Buffer lengths not the same"; +static char __pyx_k_3[] = "Buffer lengths not the same"; static PyObject *__pyx_pf_5_proj_4Proj__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5_proj_4Proj__fwd[] = "\n forward transformation - lons,lats to x,y (done in place).\n if radians=True, lons/lats are radians instead of degrees.\n if errcheck=True, an exception is raised if the forward transformation is invalid.\n if errcheck=False and the forward transformation is invalid, no exception is\n raised and 1.e30 is returned.\n "; @@ -588,7 +440,7 @@ } } else { - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|OO", __pyx_argnames, &__pyx_v_lons, &__pyx_v_lats, &__pyx_v_radians, &__pyx_v_errcheck))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L2;} + if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|OO", __pyx_argnames, &__pyx_v_lons, &__pyx_v_lats, &__pyx_v_radians, &__pyx_v_errcheck))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; @@ -596,7 +448,7 @@ return NULL; __pyx_L3:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":55 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":50 * cdef void *londata, *latdata * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenx) <> 0: # <<<<<<<<<<<<<< @@ -606,7 +458,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenx)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":56 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":51 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenx) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -614,12 +466,12 @@ * raise RuntimeError */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":57 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":52 * if PyObject_AsWriteBuffer(lons, &londata, &buflenx) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &bufleny) <> 0: # <<<<<<<<<<<<<< @@ -629,7 +481,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_bufleny)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":58 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":53 * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &bufleny) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -637,12 +489,12 @@ * if buflenx != bufleny: */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":60 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":55 * raise RuntimeError * # process data in buffer * if buflenx != bufleny: # <<<<<<<<<<<<<< @@ -652,42 +504,42 @@ __pyx_1 = (__pyx_v_buflenx != __pyx_v_bufleny); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":61 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":56 * # process data in buffer * if buflenx != bufleny: * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< * ndim = buflenx/_doublesize * lonsdata = <double *>londata */ - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_k_7p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k_7p); - __pyx_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_INCREF(__pyx_k_3p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k_3p); + __pyx_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":62 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":57 * if buflenx != bufleny: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenx/_doublesize # <<<<<<<<<<<<<< * lonsdata = <double *>londata * latsdata = <double *>latdata */ - __pyx_2 = PyInt_FromSsize_t(__pyx_v_buflenx); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyNumber_Divide(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyInt_FromSsize_t(__pyx_v_buflenx); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyNumber_Divide(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_4); if (unlikely((__pyx_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_4); if (unlikely((__pyx_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_ndim = __pyx_5; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":63 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":58 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenx/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< @@ -696,7 +548,7 @@ */ __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":64 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":59 * ndim = buflenx/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< @@ -705,7 +557,7 @@ */ __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":65 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":60 * lonsdata = <double *>londata * latsdata = <double *>latdata * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -714,17 +566,17 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":66 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":61 * latsdata = <double *>latdata * for i from 0 <= i < ndim: * if radians: # <<<<<<<<<<<<<< * projlonlatin.u = lonsdata[i] * projlonlatin.v = latsdata[i] */ - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":67 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":62 * for i from 0 <= i < ndim: * if radians: * projlonlatin.u = lonsdata[i] # <<<<<<<<<<<<<< @@ -733,7 +585,7 @@ */ __pyx_v_projlonlatin.u = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":68 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":63 * if radians: * projlonlatin.u = lonsdata[i] * projlonlatin.v = latsdata[i] # <<<<<<<<<<<<<< @@ -745,41 +597,41 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":70 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":65 * projlonlatin.v = latsdata[i] * else: * projlonlatin.u = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< * projlonlatin.v = _dg2rad*latsdata[i] * projxyout = pj_fwd(projlonlatin,self.projpj) */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyNumber_Multiply(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyNumber_Multiply(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_projlonlatin.u = __pyx_6; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":71 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":66 * else: * projlonlatin.u = _dg2rad*lonsdata[i] * projlonlatin.v = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< * projxyout = pj_fwd(projlonlatin,self.projpj) * if errcheck and pj_errno != 0: */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyNumber_Multiply(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyNumber_Multiply(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_projlonlatin.v = __pyx_6; } __pyx_L9:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":72 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":67 * projlonlatin.u = _dg2rad*lonsdata[i] * projlonlatin.v = _dg2rad*latsdata[i] * projxyout = pj_fwd(projlonlatin,self.projpj) # <<<<<<<<<<<<<< @@ -788,7 +640,7 @@ */ __pyx_v_projxyout = pj_fwd(__pyx_v_projlonlatin, ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->projpj); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":73 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":68 * projlonlatin.v = _dg2rad*latsdata[i] * projxyout = pj_fwd(projlonlatin,self.projpj) * if errcheck and pj_errno != 0: # <<<<<<<<<<<<<< @@ -797,36 +649,36 @@ */ __pyx_2 = __pyx_v_errcheck; Py_INCREF(__pyx_2); - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_PyBool_FromLong((pj_errno != 0)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __Pyx_PyBool_FromLong((pj_errno != 0)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1;} } - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":74 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":69 * projxyout = pj_fwd(projlonlatin,self.projpj) * if errcheck and pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< * # since HUGE_VAL can be 'inf', * # change it to a real (but very large) number. */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; - __pyx_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L10; } __pyx_L10:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":77 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":72 * # since HUGE_VAL can be 'inf', * # change it to a real (but very large) number. * if projxyout.u == HUGE_VAL: # <<<<<<<<<<<<<< @@ -836,7 +688,7 @@ __pyx_1 = (__pyx_v_projxyout.u == HUGE_VAL); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":78 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":73 * # change it to a real (but very large) number. * if projxyout.u == HUGE_VAL: * lonsdata[i] = 1.e30 # <<<<<<<<<<<<<< @@ -848,7 +700,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":80 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":75 * lonsdata[i] = 1.e30 * else: * lonsdata[i] = projxyout.u # <<<<<<<<<<<<<< @@ -859,7 +711,7 @@ } __pyx_L11:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":81 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":76 * else: * lonsdata[i] = projxyout.u * if projxyout.v == HUGE_VAL: # <<<<<<<<<<<<<< @@ -869,7 +721,7 @@ __pyx_1 = (__pyx_v_projxyout.v == HUGE_VAL); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":82 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":77 * lonsdata[i] = projxyout.u * if projxyout.v == HUGE_VAL: * latsdata[i] = 1.e30 # <<<<<<<<<<<<<< @@ -881,7 +733,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":84 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":79 * latsdata[i] = 1.e30 * else: * latsdata[i] = projxyout.v # <<<<<<<<<<<<<< @@ -905,7 +757,7 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":86 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":81 * latsdata[i] = projxyout.v * * def _inv(self, object x, object y, radians=False, errcheck=False): # <<<<<<<<<<<<<< @@ -913,9 +765,9 @@ * inverse transformation - x,y to lons,lats (done in place). */ -static PyObject *__pyx_k_8p; +static PyObject *__pyx_k_4p; -static char __pyx_k_8[] = "Buffer lengths not the same"; +static char __pyx_k_4[] = "Buffer lengths not the same"; static PyObject *__pyx_pf_5_proj_4Proj__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5_proj_4Proj__inv[] = "\n inverse transformation - x,y to lons,lats (done in place).\n if radians=True, lons/lats are radians instead of degrees.\n if errcheck=True, an exception is raised if the inverse transformation is invalid.\n if errcheck=False and the inverse transformation is invalid, no exception is\n raised and 1.e30 is returned.\n "; @@ -955,7 +807,7 @@ } } else { - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|OO", __pyx_argnames, &__pyx_v_x, &__pyx_v_y, &__pyx_v_radians, &__pyx_v_errcheck))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L2;} + if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|OO", __pyx_argnames, &__pyx_v_x, &__pyx_v_y, &__pyx_v_radians, &__pyx_v_errcheck))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; @@ -963,7 +815,7 @@ return NULL; __pyx_L3:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":100 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":95 * cdef double *xdatab, *ydatab * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(x, &xdata, &buflenx) <> 0: # <<<<<<<<<<<<<< @@ -973,7 +825,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_x, (&__pyx_v_xdata), (&__pyx_v_buflenx)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":101 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":96 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(x, &xdata, &buflenx) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -981,12 +833,12 @@ * raise RuntimeError */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":102 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":97 * if PyObject_AsWriteBuffer(x, &xdata, &buflenx) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(y, &ydata, &bufleny) <> 0: # <<<<<<<<<<<<<< @@ -996,7 +848,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_y, (&__pyx_v_ydata), (&__pyx_v_bufleny)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":103 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":98 * raise RuntimeError * if PyObject_AsWriteBuffer(y, &ydata, &bufleny) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1004,12 +856,12 @@ * # (for numpy/regular python arrays). */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":106 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":101 * # process data in buffer * # (for numpy/regular python arrays). * if buflenx != bufleny: # <<<<<<<<<<<<<< @@ -1019,42 +871,42 @@ __pyx_1 = (__pyx_v_buflenx != __pyx_v_bufleny); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":107 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":102 * # (for numpy/regular python arrays). * if buflenx != bufleny: * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< * ndim = buflenx/_doublesize * xdatab = <double *>xdata */ - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_k_8p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k_8p); - __pyx_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} + Py_INCREF(__pyx_k_4p); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k_4p); + __pyx_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; __Pyx_Raise(__pyx_3, 0, 0); Py_DECREF(__pyx_3); __pyx_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":108 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":103 * if buflenx != bufleny: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenx/_doublesize # <<<<<<<<<<<<<< * xdatab = <double *>xdata * ydatab = <double *>ydata */ - __pyx_2 = PyInt_FromSsize_t(__pyx_v_buflenx); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyNumber_Divide(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyInt_FromSsize_t(__pyx_v_buflenx); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyNumber_Divide(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_4); if (unlikely((__pyx_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_4); if (unlikely((__pyx_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_ndim = __pyx_5; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":109 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":104 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenx/_doublesize * xdatab = <double *>xdata # <<<<<<<<<<<<<< @@ -1063,7 +915,7 @@ */ __pyx_v_xdatab = ((double *)__pyx_v_xdata); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":110 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":105 * ndim = buflenx/_doublesize * xdatab = <double *>xdata * ydatab = <double *>ydata # <<<<<<<<<<<<<< @@ -1072,7 +924,7 @@ */ __pyx_v_ydatab = ((double *)__pyx_v_ydata); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":111 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":106 * xdatab = <double *>xdata * ydatab = <double *>ydata * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -1081,7 +933,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":112 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":107 * ydatab = <double *>ydata * for i from 0 <= i < ndim: * projxyin.u = xdatab[i] # <<<<<<<<<<<<<< @@ -1090,7 +942,7 @@ */ __pyx_v_projxyin.u = (__pyx_v_xdatab[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":113 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":108 * for i from 0 <= i < ndim: * projxyin.u = xdatab[i] * projxyin.v = ydatab[i] # <<<<<<<<<<<<<< @@ -1099,7 +951,7 @@ */ __pyx_v_projxyin.v = (__pyx_v_ydatab[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":114 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":109 * projxyin.u = xdatab[i] * projxyin.v = ydatab[i] * projlonlatout = pj_inv(projxyin,self.projpj) # <<<<<<<<<<<<<< @@ -1108,7 +960,7 @@ */ __pyx_v_projlonlatout = pj_inv(__pyx_v_projxyin, ((struct __pyx_obj_5_proj_Proj *)__pyx_v_self)->projpj); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":115 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":110 * projxyin.v = ydatab[i] * projlonlatout = pj_inv(projxyin,self.projpj) * if errcheck and pj_errno != 0: # <<<<<<<<<<<<<< @@ -1117,36 +969,36 @@ */ __pyx_2 = __pyx_v_errcheck; Py_INCREF(__pyx_2); - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_PyBool_FromLong((pj_errno != 0)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __Pyx_PyBool_FromLong((pj_errno != 0)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1;} } - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_2); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":116 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":111 * projlonlatout = pj_inv(projxyin,self.projpj) * if errcheck and pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< * # since HUGE_VAL can be 'inf', * # change it to a real (but very large) number. */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; - __pyx_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; __Pyx_Raise(__pyx_2, 0, 0); Py_DECREF(__pyx_2); __pyx_2 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L9; } __pyx_L9:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":119 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":114 * # since HUGE_VAL can be 'inf', * # change it to a real (but very large) number. * if projlonlatout.u == HUGE_VAL: # <<<<<<<<<<<<<< @@ -1156,7 +1008,7 @@ __pyx_1 = (__pyx_v_projlonlatout.u == HUGE_VAL); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":120 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":115 * # change it to a real (but very large) number. * if projlonlatout.u == HUGE_VAL: * xdatab[i] = 1.e30 # <<<<<<<<<<<<<< @@ -1167,17 +1019,17 @@ goto __pyx_L10; } - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":121 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":116 * if projlonlatout.u == HUGE_VAL: * xdatab[i] = 1.e30 * elif radians: # <<<<<<<<<<<<<< * xdatab[i] = projlonlatout.u * else: */ - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":122 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":117 * xdatab[i] = 1.e30 * elif radians: * xdatab[i] = projlonlatout.u # <<<<<<<<<<<<<< @@ -1189,25 +1041,25 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":124 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":119 * xdatab[i] = projlonlatout.u * else: * xdatab[i] = _rad2dg*projlonlatout.u # <<<<<<<<<<<<<< * if projlonlatout.v == HUGE_VAL: * ydatab[i] = 1.e30 */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble(__pyx_v_projlonlatout.u); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_2 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = PyFloat_FromDouble(__pyx_v_projlonlatout.u); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clinen... [truncated message content] |