From: <js...@us...> - 2007-08-31 17:23:35
|
Revision: 3763 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3763&view=rev Author: jswhit Date: 2007-08-31 10:23:32 -0700 (Fri, 31 Aug 2007) Log Message: ----------- regenerate with Cython 0.9.6.5 Modified Paths: -------------- trunk/toolkits/basemap/src/_geod.c trunk/toolkits/basemap/src/_proj.c trunk/toolkits/basemap/src/_pyproj.pxi Modified: trunk/toolkits/basemap/src/_geod.c =================================================================== --- trunk/toolkits/basemap/src/_geod.c 2007-08-31 15:40:42 UTC (rev 3762) +++ trunk/toolkits/basemap/src/_geod.c 2007-08-31 17:23:32 UTC (rev 3763) @@ -1,10 +1,18 @@ -/* Generated by Pyrex 0.9.5.1 on Sun May 20 08:32:09 2007 */ +/* Generated by Pyrex 0.9.6.3 on Fri Aug 31 08:42:50 2007 */ +#define PY_SSIZE_T_CLEAN #include "Python.h" #include "structmember.h" #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif +#if PY_VERSION_HEX < 0x02050000 + typedef int Py_ssize_t; + #define PY_SSIZE_T_MAX INT_MAX + #define PY_SSIZE_T_MIN INT_MIN + #define PyInt_FromSsize_t(z) PyInt_FromLong(z) + #define PyInt_AsSsize_t(o) PyInt_AsLong(o) +#endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else @@ -15,12 +23,36 @@ #include "math.h" #include "geodesic.h" #include "proj_api.h" -#include "pycompat.h" +#ifdef __GNUC__ +#define INLINE __inline__ +#elif _WIN32 +#define INLINE __inline +#else +#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;} __Pyx_StringTabEntry; /*proto*/ +#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) { + if (x == Py_True) return 1; + else if (x == Py_False) return 0; + else return PyObject_IsTrue(x); +} + + +#ifdef __GNUC__ +#define likely(x) __builtin_expect(!!(x), 1) +#define unlikely(x) __builtin_expect(!!(x), 0) +#else /* __GNUC__ */ +#define likely(x) (x) +#define unlikely(x) (x) +#endif /* __GNUC__ */ + static PyObject *__pyx_m; static PyObject *__pyx_b; static int __pyx_lineno; @@ -70,13 +102,11 @@ static PyObject *__pyx_n___version__; static PyObject *__pyx_n_radians; static PyObject *__pyx_n_degrees; -static PyObject *__pyx_n_False; static PyObject *__pyx_k2p; static PyObject *__pyx_n_iteritems; static PyObject *__pyx_n_append; -static PyObject *__pyx_n_str; static PyObject *__pyx_n_join; static PyObject *__pyx_n_RuntimeError; @@ -85,6 +115,8 @@ static PyObject *__pyx_k8p; static PyObject *__pyx_k9p; +static PyObject *__pyx_builtin_RuntimeError; + static char (__pyx_k6[]) = "+"; static char (__pyx_k7[]) = "="; static char (__pyx_k8[]) = " "; @@ -99,119 +131,187 @@ PyObject *__pyx_v_value; int __pyx_r; PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; + Py_ssize_t __pyx_2; PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; PyObject *__pyx_6 = 0; int __pyx_7; static char *__pyx_argnames[] = {"geodparams",0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geodparams)) return -1; + if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geodparams))) return -1; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_geodparams); __pyx_v_geodargs = Py_None; Py_INCREF(Py_None); __pyx_v_key = Py_None; Py_INCREF(Py_None); __pyx_v_value = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":13 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":13 + * def __new__(self, geodparams): + * cdef GEODESIC_T GEOD_T + * self.geodparams = geodparams # <<<<<<<<<<<<<< + * # setup proj initialization string. + * geodargs = [] + */ Py_INCREF(__pyx_v_geodparams); 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/trunk/toolkits/basemap/src/_geod.pyx":15 */ - __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":15 + * 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;} Py_DECREF(__pyx_v_geodargs); __pyx_v_geodargs = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 */ - __pyx_1 = PyObject_GetAttr(__pyx_v_geodparams, __pyx_n_iteritems); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":16 + * # 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;} Py_DECREF(__pyx_1); __pyx_1 = 0; - __pyx_1 = PyObject_GetIter(__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 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;} } + Py_DECREF(__pyx_3); __pyx_3 = 0; for (;;) { - __pyx_2 = PyIter_Next(__pyx_1); - if (!__pyx_2) { - if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - break; + 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; + } } - __pyx_3 = PyObject_GetIter(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - __pyx_2 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - Py_DECREF(__pyx_v_key); - __pyx_v_key = __pyx_2; - __pyx_2 = 0; - __pyx_2 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - Py_DECREF(__pyx_v_value); - __pyx_v_value = __pyx_2; - __pyx_2 = 0; - if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + if (PyTuple_CheckExact(__pyx_3) && PyTuple_GET_SIZE(__pyx_3) == 2) { + __pyx_5 = PyTuple_GET_ITEM(__pyx_3, 0); + Py_INCREF(__pyx_5); + Py_DECREF(__pyx_v_key); + __pyx_v_key = __pyx_5; + __pyx_5 = 0; + __pyx_5 = PyTuple_GET_ITEM(__pyx_3, 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 = 16; 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;} + 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;} + 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;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":17 */ - __pyx_2 = PyObject_GetAttr(__pyx_v_geodargs, __pyx_n_append); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - __pyx_3 = PyNumber_Add(__pyx_k6p, __pyx_v_key); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k7p); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__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 = 17; goto __pyx_L1;} Py_INCREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_value); - __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + 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;} Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_3 = PyNumber_Add(__pyx_4, __pyx_6); if (!__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 = 17; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; - __pyx_5 = PyNumber_Add(__pyx_3, __pyx_k8p); if (!__pyx_5) {__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 = 17; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); - __pyx_5 = 0; - __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; 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;} + 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; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":18 */ - __pyx_3 = PyObject_GetAttr(__pyx_k9p, __pyx_n_join); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":18 + * 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;} Py_INCREF(__pyx_v_geodargs); PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_geodargs); - __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; + __pyx_6 = PyObject_CallObject(__pyx_4, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; 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_2); - Py_DECREF(__pyx_2); __pyx_2 = 0; + ((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/trunk/toolkits/basemap/src/_geod.pyx":20 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":20 + * self.geodinitstring = PyString_AsString(''.join(geodargs)) + * # initialize projection + * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< + * if pj_errno != 0: + * raise RuntimeError(pj_strerrno(pj_errno)) + */ ((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/trunk/toolkits/basemap/src/_geod.pyx":21 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":21 + * # initialize projection + * 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_7 = (pj_errno != 0); if (__pyx_7) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":22 */ - __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} - __pyx_6 = PyString_FromString(pj_strerrno(pj_errno)); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} - __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_1, 0, __pyx_6); - __pyx_6 = 0; - __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} + 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;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + __Pyx_Raise(__pyx_4, 0, 0); Py_DECREF(__pyx_4); __pyx_4 = 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - __Pyx_Raise(__pyx_3, 0, 0); - Py_DECREF(__pyx_3); __pyx_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":23 */ - __pyx_5 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":23 + * 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;} 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; @@ -220,7 +320,6 @@ 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); @@ -246,15 +345,21 @@ PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; + if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames))) return 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":27 */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} 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 (!__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 = 27; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; @@ -281,6 +386,8 @@ static PyObject *__pyx_k10p; static PyObject *__pyx_k11p; +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)"; @@ -308,15 +415,15 @@ void (*__pyx_v_distdat); PyObject *__pyx_r; int __pyx_1; - PyObject *__pyx_2 = 0; - int __pyx_3; + int __pyx_2; + PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; Py_ssize_t __pyx_6; double __pyx_7; static char *__pyx_argnames[] = {"lons","lats","az","dist","radians",0}; __pyx_v_radians = __pyx_k3; - if (!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 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_lons); Py_INCREF(__pyx_v_lats); @@ -324,59 +431,105 @@ Py_INCREF(__pyx_v_dist); Py_INCREF(__pyx_v_radians); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":40 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_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: # <<<<<<<<<<<<<< + * raise RuntimeError + * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: + */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":41 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":42 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":42 + * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: + * raise RuntimeError + * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< + * raise RuntimeError + * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: + */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":43 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} goto __pyx_L3; } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":44 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":44 + * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: + * raise RuntimeError + * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< + * raise RuntimeError + * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: + */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":45 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} goto __pyx_L4; } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":46 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":46 + * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: + * raise RuntimeError + * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< + * raise RuntimeError + * # process data in buffer + */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":47 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} goto __pyx_L5; } __pyx_L5:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":49 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":49 + * raise RuntimeError + * # process data in buffer + * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< + * raise RuntimeError("Buffer lengths not the same") + * ndim = buflenlons/_doublesize + */ __pyx_1 = __pyx_v_buflenlons == __pyx_v_buflenlats; if (__pyx_1) { __pyx_1 = __pyx_v_buflenlats == __pyx_v_buflenaz; @@ -384,141 +537,267 @@ __pyx_1 = __pyx_v_buflenaz == __pyx_v_buflend; } } - __pyx_3 = (!__pyx_1); - if (__pyx_3) { + __pyx_2 = (!__pyx_1); + if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":50 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} Py_INCREF(__pyx_k10p); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k10p); - __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + 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;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); 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 = 50; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":51 */ - __pyx_2 = PyInt_FromLong(__pyx_v_buflenlons); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} - __pyx_5 = PyNumber_Divide(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":51 + * 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;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = PyInt_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} + __pyx_6 = PyInt_AsSsize_t(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":52 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":52 + * 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); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":53 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":53 + * ndim = buflenlons/_doublesize + * lonsdata = <double *>londata + * latsdata = <double *>latdata # <<<<<<<<<<<<<< + * azdata = <double *>azdat + * distdata = <double *>distdat + */ __pyx_v_latsdata = ((double (*))__pyx_v_latdata); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":54 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":54 + * 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); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":55 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":55 + * latsdata = <double *>latdata + * azdata = <double *>azdat + * distdata = <double *>distdat # <<<<<<<<<<<<<< + * for i from 0 <= i < ndim: + * if radians: + */ __pyx_v_distdata = ((double (*))__pyx_v_distdat); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":56 */ - for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; ++__pyx_v_i) { + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":56 + * azdata = <double *>azdat + * distdata = <double *>distdat + * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< + * if radians: + * self.geodesic_t.p1.v = lonsdata[i] + */ + for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":57 */ - __pyx_1 = PyObject_IsTrue(__pyx_v_radians); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":57 + * 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 = 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/trunk/toolkits/basemap/src/_geod.pyx":58 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":58 + * for i from 0 <= i < ndim: + * if radians: + * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.u = latsdata[i] + * self.geodesic_t.ALPHA12 = azdata[i] + */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":59 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":59 + * if radians: + * self.geodesic_t.p1.v = lonsdata[i] + * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.ALPHA12 = azdata[i] + * self.geodesic_t.DIST = distdata[i] + */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":60 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":60 + * self.geodesic_t.p1.v = lonsdata[i] + * self.geodesic_t.p1.u = latsdata[i] + * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.DIST = distdata[i] + * else: + */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = (__pyx_v_azdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":61 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":61 + * self.geodesic_t.p1.u = latsdata[i] + * self.geodesic_t.ALPHA12 = azdata[i] + * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< + * else: + * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] + */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST = (__pyx_v_distdata[__pyx_v_i]); goto __pyx_L9; } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":63 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":63 + * 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;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (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 = 63; 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; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":64 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":64 + * 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;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (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 = 64; 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; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":65 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_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] # <<<<<<<<<<<<<< + * 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;} + Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (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 = 65; goto __pyx_L1;} 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/trunk/toolkits/basemap/src/_geod.pyx":66 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":66 + * 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) + * if pj_errno != 0: + */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST = (__pyx_v_distdata[__pyx_v_i]); } __pyx_L9:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":67 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":67 + * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] + * self.geodesic_t.DIST = distdata[i] + * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< + * if pj_errno != 0: + * raise RuntimeError(pj_strerrno(pj_errno)) + */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":68 */ - __pyx_3 = (pj_errno != 0); - if (__pyx_3) { + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":68 + * self.geodesic_t.DIST = distdata[i] + * geod_pre(&self.geodesic_t) + * if pj_errno != 0: # <<<<<<<<<<<<<< + * raise RuntimeError(pj_strerrno(pj_errno)) + * geod_for(&self.geodesic_t) + */ + __pyx_2 = (pj_errno != 0); + if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":69 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} - __pyx_4 = PyString_FromString(pj_strerrno(pj_errno)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4); - __pyx_4 = 0; - __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} + 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;} + Py_DECREF(__pyx_4); __pyx_4 = 0; + __Pyx_Raise(__pyx_5, 0, 0); Py_DECREF(__pyx_5); __pyx_5 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} goto __pyx_L10; } __pyx_L10:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":70 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":70 + * if pj_errno != 0: + * raise RuntimeError(pj_strerrno(pj_errno)) + * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< + * if pj_errno != 0: + * raise RuntimeError(pj_strerrno(pj_errno)) + */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":71 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":71 + * raise RuntimeError(pj_strerrno(pj_errno)) + * geod_for(&self.geodesic_t) + * if pj_errno != 0: # <<<<<<<<<<<<<< + * raise RuntimeError(pj_strerrno(pj_errno)) + * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: + */ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":72 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} - __pyx_5 = PyString_FromString(pj_strerrno(pj_errno)); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5); - __pyx_5 = 0; - __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":72 + * geod_for(&self.geodesic_t) + * if pj_errno != 0: + * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< + * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: + * 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;} + 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;} Py_DECREF(__pyx_4); __pyx_4 = 0; __Pyx_Raise(__pyx_5, 0, 0); Py_DECREF(__pyx_5); __pyx_5 = 0; @@ -527,69 +806,121 @@ } __pyx_L11:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":73 */ - __pyx_3 = (isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21) == FP_NAN); - if (__pyx_3) { + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":73 + * if pj_errno != 0: + * raise RuntimeError(pj_strerrno(pj_errno)) + * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: # <<<<<<<<<<<<<< + * raise ValueError('undefined forward geodesic (may be an equatorial arc)') + * if radians: + */ + __pyx_2 = (isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21) == FP_NAN); + if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":74 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":74 + * raise RuntimeError(pj_strerrno(pj_errno)) + * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: + * 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;} Py_INCREF(__pyx_k11p); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k11p); - __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + 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;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + __Pyx_Raise(__pyx_4, 0, 0); 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 = 74; goto __pyx_L1;} goto __pyx_L12; } __pyx_L12:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":75 */ - __pyx_1 = PyObject_IsTrue(__pyx_v_radians); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":75 + * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: + * 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_1 = PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":76 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":76 + * 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 + * azdata[i] = self.geodesic_t.ALPHA21 + */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":77 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":77 + * if radians: + * lonsdata[i] = self.geodesic_t.p2.v + * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< + * azdata[i] = self.geodesic_t.ALPHA21 + * else: + */ (__pyx_v_latsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":78 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":78 + * lonsdata[i] = self.geodesic_t.p2.v + * latsdata[i] = self.geodesic_t.p2.u + * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< + * else: + * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v + */ (__pyx_v_azdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21; goto __pyx_L13; } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":80 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":80 + * 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;} + 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;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} - Py_DECREF(__pyx_5); __pyx_5 = 0; (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":81 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":81 + * 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;} + 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;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} - Py_DECREF(__pyx_5); __pyx_5 = 0; (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":82 */ - __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} - __pyx_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} - __pyx_5 = PyNumber_Multiply(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_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 # <<<<<<<<<<<<<< + * + * 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;} + 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;} Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_7 = PyFloat_AsDouble(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} - Py_DECREF(__pyx_5); __pyx_5 = 0; (__pyx_v_azdata[__pyx_v_i]) = __pyx_7; } __pyx_L13:; @@ -598,7 +929,7 @@ __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; - Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); Py_XDECREF(__pyx_4); Py_XDECREF(__pyx_5); __Pyx_AddTraceback("_geod.Geod._fwd"); @@ -643,15 +974,15 @@ void (*__pyx_v_distdat); PyObject *__pyx_r; int __pyx_1; - PyObject *__pyx_2 = 0; - int __pyx_3; + int __pyx_2; + PyObject *__pyx_3 = 0; PyObject *__pyx_4 = 0; PyObject *__pyx_5 = 0; Py_ssize_t __pyx_6; double __pyx_7; static char *__pyx_argnames[] = {"lons1","lats1","lons2","lats2","radians",0}; __pyx_v_radians = __pyx_k4; - if (!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 0; Py_INCREF(__pyx_v_self); Py_INCREF(__pyx_v_lons1); Py_INCREF(__pyx_v_lats1); @@ -659,59 +990,105 @@ Py_INCREF(__pyx_v_lats2); Py_INCREF(__pyx_v_radians); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":94 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_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: # <<<<<<<<<<<<<< + * raise RuntimeError + * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: + */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":95 */ - __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_RuntimeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;} - __Pyx_Raise(__pyx_2, 0, 0); - Py_DECREF(__pyx_2); __pyx_2 = 0; + /* "/Volumes/User/jwhitaker/python/pyproj/_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;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":96 */ + /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":96 + * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: + * raise RuntimeError + * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< + * raise RuntimeError + * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: + */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_... [truncated message content] |
From: <js...@us...> - 2007-09-12 18:14:42
|
Revision: 3840 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3840&view=rev Author: jswhit Date: 2007-09-12 11:14:38 -0700 (Wed, 12 Sep 2007) Log Message: ----------- fix isnan check Modified Paths: -------------- trunk/toolkits/basemap/src/_geod.c trunk/toolkits/basemap/src/_geod.pyx Modified: trunk/toolkits/basemap/src/_geod.c =================================================================== --- trunk/toolkits/basemap/src/_geod.c 2007-09-12 17:25:19 UTC (rev 3839) +++ trunk/toolkits/basemap/src/_geod.c 2007-09-12 18:14:38 UTC (rev 3840) @@ -1,4 +1,4 @@ -/* Generated by Pyrex 0.9.6.3 on Fri Aug 31 08:42:50 2007 */ +/* Generated by Pyrex 0.9.6.5 on Wed Sep 12 12:12:33 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -12,6 +12,8 @@ #define PY_SSIZE_T_MIN INT_MIN #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) PyInt_AsLong(o) + #define PyNumber_Index(o) PyNumber_Int(o) + #define PyIndex_Check(o) PyNumber_Check(o) #endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" @@ -37,6 +39,8 @@ typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ +#define __pyx_PyIndex_AsSsize_t(b) PyInt_AsSsize_t(PyNumber_Index(b)) + #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) { if (x == Py_True) return 1; @@ -337,15 +341,13 @@ static PyObject *__pyx_n___class__; -static PyObject *__pyx_f_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_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_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_f_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; - static char *__pyx_argnames[] = {0}; - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames))) return 0; Py_INCREF(__pyx_v_self); /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":27 @@ -421,6 +423,7 @@ PyObject *__pyx_5 = 0; Py_ssize_t __pyx_6; double __pyx_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; @@ -571,7 +574,7 @@ __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = PyInt_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(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; @@ -781,7 +784,7 @@ * geod_for(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< * raise RuntimeError(pj_strerrno(pj_errno)) - * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: + * if isnan(self.geodesic_t.ALPHA21): */ __pyx_1 = (pj_errno != 0); if (__pyx_1) { @@ -790,7 +793,7 @@ * geod_for(&self.geodesic_t) * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< - * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: + * 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;} @@ -809,16 +812,16 @@ /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":73 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) - * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: # <<<<<<<<<<<<<< + * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: */ - __pyx_2 = (isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21) == FP_NAN); - if (__pyx_2) { + __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); + if (__pyx_8) { /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":74 * raise RuntimeError(pj_strerrno(pj_errno)) - * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: + * 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 @@ -836,14 +839,14 @@ __pyx_L12:; /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":75 - * if isnan(self.geodesic_t.ALPHA21) == FP_NAN: + * 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_1 = PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} - if (__pyx_1) { + __pyx_2 = PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;} + if (__pyx_2) { /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":76 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') @@ -980,6 +983,7 @@ PyObject *__pyx_5 = 0; Py_ssize_t __pyx_6; double __pyx_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; @@ -1130,7 +1134,7 @@ __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = PyInt_AsSsize_t(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} + __pyx_6 = __pyx_PyIndex_AsSsize_t(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; @@ -1281,7 +1285,7 @@ * self.geodesic_t.p2.v = _dg2rad*azdata[i] * self.geodesic_t.p2.u = _dg2rad*distdata[i] # <<<<<<<<<<<<<< * geod_inv(&self.geodesic_t) - * if isnan(self.geodesic_t.DIST) == FP_NAN: + * if isnan(self.geodesic_t.DIST): */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_distdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} @@ -1298,7 +1302,7 @@ * self.geodesic_t.p2.v = _dg2rad*azdata[i] * self.geodesic_t.p2.u = _dg2rad*distdata[i] * geod_inv(&self.geodesic_t) # <<<<<<<<<<<<<< - * if isnan(self.geodesic_t.DIST) == FP_NAN: + * if isnan(self.geodesic_t.DIST): * raise ValueError('undefined inverse geodesic (may be an antipodal point)') */ geod_inv((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); @@ -1306,16 +1310,16 @@ /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":122 * self.geodesic_t.p2.u = _dg2rad*distdata[i] * geod_inv(&self.geodesic_t) - * if isnan(self.geodesic_t.DIST) == FP_NAN: # <<<<<<<<<<<<<< + * if isnan(self.geodesic_t.DIST): # <<<<<<<<<<<<<< * raise ValueError('undefined inverse geodesic (may be an antipodal point)') * if pj_errno != 0: */ - __pyx_2 = (isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST) == FP_NAN); - if (__pyx_2) { + __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST); + if (__pyx_8) { /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":123 * geod_inv(&self.geodesic_t) - * if isnan(self.geodesic_t.DIST) == FP_NAN: + * if isnan(self.geodesic_t.DIST): * raise ValueError('undefined inverse geodesic (may be an antipodal point)') # <<<<<<<<<<<<<< * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) @@ -1333,14 +1337,14 @@ __pyx_L10:; /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":124 - * if isnan(self.geodesic_t.DIST) == FP_NAN: + * if isnan(self.geodesic_t.DIST): * raise ValueError('undefined inverse geodesic (may be an antipodal point)') * if pj_errno != 0: # <<<<<<<<<<<<<< * raise RuntimeError(pj_strerrno(pj_errno)) * if radians: */ - __pyx_1 = (pj_errno != 0); - if (__pyx_1) { + __pyx_2 = (pj_errno != 0); + if (__pyx_2) { /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":125 * raise ValueError('undefined inverse geodesic (may be an antipodal point)') @@ -1369,8 +1373,8 @@ * lonsdata[i] = self.geodesic_t.ALPHA12 * latsdata[i] = self.geodesic_t.ALPHA21 */ - __pyx_2 = PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} - if (__pyx_2) { + __pyx_1 = PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} + if (__pyx_1) { /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":127 * raise RuntimeError(pj_strerrno(pj_errno)) @@ -1868,7 +1872,7 @@ } static struct PyMethodDef __pyx_methods_5_geod_Geod[] = { - {"__reduce__", (PyCFunction)__pyx_f_5_geod_4Geod___reduce__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod___reduce__}, + {"__reduce__", (PyCFunction)__pyx_f_5_geod_4Geod___reduce__, METH_NOARGS, __pyx_doc_5_geod_4Geod___reduce__}, {"_fwd", (PyCFunction)__pyx_f_5_geod_4Geod__fwd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__fwd}, {"_inv", (PyCFunction)__pyx_f_5_geod_4Geod__inv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__inv}, {"_npts", (PyCFunction)__pyx_f_5_geod_4Geod__npts, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__npts}, Modified: trunk/toolkits/basemap/src/_geod.pyx =================================================================== --- trunk/toolkits/basemap/src/_geod.pyx 2007-09-12 17:25:19 UTC (rev 3839) +++ trunk/toolkits/basemap/src/_geod.pyx 2007-09-12 18:14:38 UTC (rev 3840) @@ -70,7 +70,7 @@ geod_for(&self.geodesic_t) if pj_errno != 0: raise RuntimeError(pj_strerrno(pj_errno)) - if isnan(self.geodesic_t.ALPHA21) == FP_NAN: + 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 @@ -119,7 +119,7 @@ self.geodesic_t.p2.v = _dg2rad*azdata[i] self.geodesic_t.p2.u = _dg2rad*distdata[i] geod_inv(&self.geodesic_t) - if isnan(self.geodesic_t.DIST) == FP_NAN: + if isnan(self.geodesic_t.DIST): raise ValueError('undefined inverse geodesic (may be an antipodal point)') if pj_errno != 0: raise RuntimeError(pj_strerrno(pj_errno)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-09-12 18:22:26
|
Revision: 3841 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3841&view=rev Author: jswhit Date: 2007-09-12 11:22:24 -0700 (Wed, 12 Sep 2007) Log Message: ----------- regenerate with Cython 0.9.6.6 Modified Paths: -------------- trunk/toolkits/basemap/src/_geod.c trunk/toolkits/basemap/src/_proj.c Modified: trunk/toolkits/basemap/src/_geod.c =================================================================== --- trunk/toolkits/basemap/src/_geod.c 2007-09-12 18:14:38 UTC (rev 3840) +++ trunk/toolkits/basemap/src/_geod.c 2007-09-12 18:22:24 UTC (rev 3841) @@ -1,4 +1,4 @@ -/* Generated by Pyrex 0.9.6.5 on Wed Sep 12 12:12:33 2007 */ +/* Generated by Cython 0.9.6.6 on Wed Sep 12 12:20:59 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -50,8 +50,14 @@ #ifdef __GNUC__ +/* Test for GCC > 2.95 */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* __GNUC__ > 2 ... */ +#define likely(x) (x) +#define unlikely(x) (x) +#endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) Modified: trunk/toolkits/basemap/src/_proj.c =================================================================== --- trunk/toolkits/basemap/src/_proj.c 2007-09-12 18:14:38 UTC (rev 3840) +++ trunk/toolkits/basemap/src/_proj.c 2007-09-12 18:22:24 UTC (rev 3841) @@ -1,4 +1,4 @@ -/* Generated by Pyrex 0.9.6.3 on Fri Aug 31 08:42:47 2007 */ +/* Generated by Cython 0.9.6.6 on Wed Sep 12 12:21:02 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -12,6 +12,8 @@ #define PY_SSIZE_T_MIN INT_MIN #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) PyInt_AsLong(o) + #define PyNumber_Index(o) PyNumber_Int(o) + #define PyIndex_Check(o) PyNumber_Check(o) #endif #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" @@ -37,6 +39,8 @@ typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ +#define __pyx_PyIndex_AsSsize_t(b) PyInt_AsSsize_t(PyNumber_Index(b)) + #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) { if (x == Py_True) return 1; @@ -46,8 +50,14 @@ #ifdef __GNUC__ +/* Test for GCC > 2.95 */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* __GNUC__ > 2 ... */ +#define likely(x) (x) +#define unlikely(x) (x) +#endif /* __GNUC__ > 2 ... */ #else /* __GNUC__ */ #define likely(x) (x) #define unlikely(x) (x) @@ -111,13 +121,10 @@ static PyObject *__pyx_k2p; -static PyObject *__pyx_f_5_proj_set_datapath(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_5_proj_set_datapath(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_datapath = 0; +static PyObject *__pyx_f_5_proj_set_datapath(PyObject *__pyx_self, PyObject *__pyx_v_datapath); /*proto*/ +static PyObject *__pyx_f_5_proj_set_datapath(PyObject *__pyx_self, PyObject *__pyx_v_datapath) { char (*__pyx_v_searchpath); PyObject *__pyx_r; - static char *__pyx_argnames[] = {"datapath",0}; - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_datapath))) return 0; Py_INCREF(__pyx_v_datapath); /* "/Volumes/User/jwhitaker/python/pyproj/_proj.pyx":7 @@ -401,15 +408,13 @@ static PyObject *__pyx_n___class__; -static PyObject *__pyx_f_5_proj_4Proj___reduce__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_5_proj_4Proj___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ static char __pyx_doc_5_proj_4Proj___reduce__[] = "special method that allows pyproj.Proj instance to be pickled"; -static PyObject *__pyx_f_5_proj_4Proj___reduce__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_f_5_proj_4Proj___reduce__(PyObject *__pyx_v_self, PyObject *unused) { PyObject *__pyx_r; PyObject *__pyx_1 = 0; PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - static char *__pyx_argnames[] = {0}; - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames))) return 0; Py_INCREF(__pyx_v_self); /* "/Volumes/User/jwhitaker/python/pyproj/_proj.pyx":37 @@ -570,7 +575,7 @@ __pyx_4 = PyNumber_Divide(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyInt_AsSsize_t(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; goto __pyx_L1;} + __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_ndim = __pyx_5; @@ -922,7 +927,7 @@ __pyx_4 = PyNumber_Divide(__pyx_2, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyInt_AsSsize_t(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} + __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_ndim = __pyx_5; @@ -1142,13 +1147,11 @@ return __pyx_r; } -static PyObject *__pyx_f_5_proj_4Proj_is_latlong(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_5_proj_4Proj_is_latlong(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_f_5_proj_4Proj_is_latlong(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_proj_4Proj_is_latlong(PyObject *__pyx_v_self, PyObject *unused) { int __pyx_v_i; PyObject *__pyx_r; int __pyx_1; - static char *__pyx_argnames[] = {0}; - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames))) return 0; Py_INCREF(__pyx_v_self); /* "/Volumes/User/jwhitaker/python/pyproj/_proj.pyx":133 @@ -1203,13 +1206,11 @@ return __pyx_r; } -static PyObject *__pyx_f_5_proj_4Proj_is_geocent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_5_proj_4Proj_is_geocent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_f_5_proj_4Proj_is_geocent(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_5_proj_4Proj_is_geocent(PyObject *__pyx_v_self, PyObject *unused) { int __pyx_v_i; PyObject *__pyx_r; int __pyx_1; - static char *__pyx_argnames[] = {0}; - if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames))) return 0; Py_INCREF(__pyx_v_self); /* "/Volumes/User/jwhitaker/python/pyproj/_proj.pyx":142 @@ -1609,7 +1610,7 @@ * if not radians and p2.is_latlong(): * for i from 0 <= i < npts: */ - __pyx_7 = PyInt_AsLong(__pyx_v_ierr); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; goto __pyx_L1;} + __pyx_7 = PyInt_AsLong(__pyx_v_ierr); if (unlikely((__pyx_7 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; goto __pyx_L1;} __pyx_4 = PyString_FromString(pj_strerrno(__pyx_7)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4); @@ -1791,11 +1792,11 @@ } static struct PyMethodDef __pyx_methods_5_proj_Proj[] = { - {"__reduce__", (PyCFunction)__pyx_f_5_proj_4Proj___reduce__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_proj_4Proj___reduce__}, + {"__reduce__", (PyCFunction)__pyx_f_5_proj_4Proj___reduce__, METH_NOARGS, __pyx_doc_5_proj_4Proj___reduce__}, {"_fwd", (PyCFunction)__pyx_f_5_proj_4Proj__fwd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_proj_4Proj__fwd}, {"_inv", (PyCFunction)__pyx_f_5_proj_4Proj__inv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_proj_4Proj__inv}, - {"is_latlong", (PyCFunction)__pyx_f_5_proj_4Proj_is_latlong, METH_VARARGS|METH_KEYWORDS, 0}, - {"is_geocent", (PyCFunction)__pyx_f_5_proj_4Proj_is_geocent, METH_VARARGS|METH_KEYWORDS, 0}, + {"is_latlong", (PyCFunction)__pyx_f_5_proj_4Proj_is_latlong, METH_NOARGS, 0}, + {"is_geocent", (PyCFunction)__pyx_f_5_proj_4Proj_is_geocent, METH_NOARGS, 0}, {0, 0, 0, 0} }; @@ -1924,7 +1925,7 @@ }; static struct PyMethodDef __pyx_methods[] = { - {"set_datapath", (PyCFunction)__pyx_f_5_proj_set_datapath, METH_VARARGS|METH_KEYWORDS, 0}, + {"set_datapath", (PyCFunction)__pyx_f_5_proj_set_datapath, METH_O, 0}, {"_transform", (PyCFunction)__pyx_f_5_proj__transform, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-10-14 14:16:55
|
Revision: 3940 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3940&view=rev Author: jswhit Date: 2007-10-14 07:16:48 -0700 (Sun, 14 Oct 2007) Log Message: ----------- regenerated with cython 0.9.6.7 Modified Paths: -------------- trunk/toolkits/basemap/src/_geod.c trunk/toolkits/basemap/src/_proj.c Modified: trunk/toolkits/basemap/src/_geod.c =================================================================== --- trunk/toolkits/basemap/src/_geod.c 2007-10-12 17:30:17 UTC (rev 3939) +++ trunk/toolkits/basemap/src/_geod.c 2007-10-14 14:16:48 UTC (rev 3940) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.6 on Wed Sep 12 12:20:59 2007 */ +/* Generated by Cython 0.9.6.7 on Sun Oct 14 08:16:22 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -37,7 +37,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;} __Pyx_StringTabEntry; /*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)) @@ -110,6 +110,11 @@ static PyObject *__pyx_n__rad2dg; static PyObject *__pyx_n__doublesize; static PyObject *__pyx_n___version__; +static PyObject *__pyx_n___new__; +static PyObject *__pyx_n___reduce__; +static PyObject *__pyx_n__fwd; +static PyObject *__pyx_n__inv; +static PyObject *__pyx_n__npts; static PyObject *__pyx_n_radians; static PyObject *__pyx_n_degrees; @@ -132,8 +137,8 @@ static char (__pyx_k8[]) = " "; static char (__pyx_k9[]) = ""; -static int __pyx_f_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +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) { PyObject *__pyx_v_geodparams = 0; GEODESIC_T __pyx_v_GEOD_T; PyObject *__pyx_v_geodargs; @@ -155,7 +160,7 @@ __pyx_v_key = Py_None; Py_INCREF(Py_None); __pyx_v_value = Py_None; Py_INCREF(Py_None); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":13 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":13 * def __new__(self, geodparams): * cdef GEODESIC_T GEOD_T * self.geodparams = geodparams # <<<<<<<<<<<<<< @@ -166,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":15 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":15 * self.geodparams = geodparams * # setup proj initialization string. * geodargs = [] # <<<<<<<<<<<<<< @@ -178,7 +183,7 @@ __pyx_v_geodargs = __pyx_1; __pyx_1 = 0; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":16 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":16 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< @@ -227,7 +232,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; } - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":17 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":17 * geodargs = [] * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< @@ -258,7 +263,7 @@ } Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":18 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":18 * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') * self.geodinitstring = PyString_AsString(''.join(geodargs)) # <<<<<<<<<<<<<< @@ -275,7 +280,7 @@ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring = PyString_AsString(__pyx_6); Py_DECREF(__pyx_6); __pyx_6 = 0; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":20 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":20 * self.geodinitstring = PyString_AsString(''.join(geodargs)) * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< @@ -284,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]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":21 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":21 * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -294,7 +299,7 @@ __pyx_7 = (pj_errno != 0); if (__pyx_7) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":22 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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)) # <<<<<<<<<<<<<< @@ -314,7 +319,7 @@ } __pyx_L4:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":23 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":23 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< @@ -347,16 +352,16 @@ static PyObject *__pyx_n___class__; -static PyObject *__pyx_f_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ +static PyObject *__pyx_f_py_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_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused) { +static PyObject *__pyx_f_py_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); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":27 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":27 * def __reduce__(self): * """special method that allows pyproj.Geod instance to be pickled""" * return (self.__class__,(self.geodparams,)) # <<<<<<<<<<<<<< @@ -399,9 +404,9 @@ 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_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_py_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_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_f_py_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; @@ -440,7 +445,7 @@ Py_INCREF(__pyx_v_dist); Py_INCREF(__pyx_v_radians); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":40 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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: # <<<<<<<<<<<<<< @@ -450,7 +455,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":41 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":41 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -463,7 +468,7 @@ } __pyx_L2:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":42 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":42 * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -473,7 +478,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":43 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":43 * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -486,7 +491,7 @@ } __pyx_L3:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":44 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":44 * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< @@ -496,7 +501,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":45 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":45 * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -509,7 +514,7 @@ } __pyx_L4:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":46 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":46 * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< @@ -519,7 +524,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":47 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":47 * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -532,24 +537,24 @@ } __pyx_L5:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":49 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":49 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize */ - __pyx_1 = __pyx_v_buflenlons == __pyx_v_buflenlats; + __pyx_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats); if (__pyx_1) { - __pyx_1 = __pyx_v_buflenlats == __pyx_v_buflenaz; + __pyx_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz); if (__pyx_1) { - __pyx_1 = __pyx_v_buflenaz == __pyx_v_buflend; + __pyx_1 = (__pyx_v_buflenaz == __pyx_v_buflend); } } __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":50 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":50 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< @@ -568,7 +573,7 @@ } __pyx_L6:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":51 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":51 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< @@ -584,7 +589,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":52 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":52 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< @@ -593,7 +598,7 @@ */ __pyx_v_lonsdata = ((double (*))__pyx_v_londata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":53 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":53 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< @@ -602,7 +607,7 @@ */ __pyx_v_latsdata = ((double (*))__pyx_v_latdata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":54 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":54 * lonsdata = <double *>londata * latsdata = <double *>latdata * azdata = <double *>azdat # <<<<<<<<<<<<<< @@ -611,7 +616,7 @@ */ __pyx_v_azdata = ((double (*))__pyx_v_azdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":55 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":55 * latsdata = <double *>latdata * azdata = <double *>azdat * distdata = <double *>distdat # <<<<<<<<<<<<<< @@ -620,7 +625,7 @@ */ __pyx_v_distdata = ((double (*))__pyx_v_distdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":56 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":56 * azdata = <double *>azdat * distdata = <double *>distdat * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -629,17 +634,17 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":57 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":57 * 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 = 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 = 57; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":58 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":58 * for i from 0 <= i < ndim: * if radians: * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< @@ -648,7 +653,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":59 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":59 * if radians: * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< @@ -657,7 +662,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":60 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":60 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< @@ -666,7 +671,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = (__pyx_v_azdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":61 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":61 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -678,7 +683,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":63 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":63 * self.geodesic_t.DIST = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -694,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":64 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":64 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -710,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":65 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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] # <<<<<<<<<<<<<< @@ -726,7 +731,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":66 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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] # <<<<<<<<<<<<<< @@ -737,7 +742,7 @@ } __pyx_L9:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":67 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":67 * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -746,7 +751,7 @@ */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":68 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":68 * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -756,7 +761,7 @@ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":69 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":69 * geod_pre(&self.geodesic_t) * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -776,7 +781,7 @@ } __pyx_L10:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":70 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":70 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -785,7 +790,7 @@ */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":71 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":71 * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -795,7 +800,7 @@ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":72 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":72 * geod_for(&self.geodesic_t) * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -815,7 +820,7 @@ } __pyx_L11:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":73 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":73 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< @@ -825,7 +830,7 @@ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (__pyx_8) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":74 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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)') # <<<<<<<<<<<<<< @@ -844,17 +849,17 @@ } __pyx_L12:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":75 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":75 * 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 = 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 = 75; goto __pyx_L1;} if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":76 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":76 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -863,7 +868,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":77 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":77 * if radians: * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -872,7 +877,7 @@ */ (__pyx_v_latsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":78 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":78 * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -884,7 +889,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":80 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":80 * azdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -900,7 +905,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":81 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":81 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -916,7 +921,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":82 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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 # <<<<<<<<<<<<<< @@ -959,9 +964,9 @@ 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_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_py_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_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_f_py_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; @@ -1000,7 +1005,7 @@ Py_INCREF(__pyx_v_lats2); Py_INCREF(__pyx_v_radians); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":94 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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: # <<<<<<<<<<<<<< @@ -1010,7 +1015,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":95 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":95 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1023,7 +1028,7 @@ } __pyx_L2:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":96 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":96 * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -1033,7 +1038,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":97 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":97 * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1046,7 +1051,7 @@ } __pyx_L3:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":98 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":98 * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< @@ -1056,7 +1061,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":99 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":99 * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1069,7 +1074,7 @@ } __pyx_L4:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":100 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":100 * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< @@ -1079,7 +1084,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":101 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":101 * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1092,24 +1097,24 @@ } __pyx_L5:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":103 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":103 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize */ - __pyx_1 = __pyx_v_buflenlons == __pyx_v_buflenlats; + __pyx_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats); if (__pyx_1) { - __pyx_1 = __pyx_v_buflenlats == __pyx_v_buflenaz; + __pyx_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz); if (__pyx_1) { - __pyx_1 = __pyx_v_buflenaz == __pyx_v_buflend; + __pyx_1 = (__pyx_v_buflenaz == __pyx_v_buflend); } } __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":104 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":104 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< @@ -1128,7 +1133,7 @@ } __pyx_L6:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":105 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":105 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< @@ -1144,7 +1149,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":106 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":106 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< @@ -1153,7 +1158,7 @@ */ __pyx_v_lonsdata = ((double (*))__pyx_v_londata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":107 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":107 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< @@ -1162,7 +1167,7 @@ */ __pyx_v_latsdata = ((double (*))__pyx_v_latdata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":108 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":108 * lonsdata = <double *>londata * latsdata = <double *>latdata * azdata = <double *>azdat # <<<<<<<<<<<<<< @@ -1171,7 +1176,7 @@ */ __pyx_v_azdata = ((double (*))__pyx_v_azdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":109 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":109 * latsdata = <double *>latdata * azdata = <double *>azdat * distdata = <double *>distdat # <<<<<<<<<<<<<< @@ -1180,7 +1185,7 @@ */ __pyx_v_distdata = ((double (*))__pyx_v_distdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":110 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":110 * azdata = <double *>azdat * distdata = <double *>distdat * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -1189,17 +1194,17 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":111 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":111 * 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 = PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L1;} + __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) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":112 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":112 * for i from 0 <= i < ndim: * if radians: * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< @@ -1208,7 +1213,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":113 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":113 * if radians: * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< @@ -1217,7 +1222,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":114 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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] # <<<<<<<<<<<<<< @@ -1226,7 +1231,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = (__pyx_v_azdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":115 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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] # <<<<<<<<<<<<<< @@ -1238,7 +1243,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":117 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":117 * self.geodesic_t.p2.u = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -1254,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":118 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":118 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -1270,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":119 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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] # <<<<<<<<<<<<<< @@ -1286,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":120 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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] # <<<<<<<<<<<<<< @@ -1304,7 +1309,7 @@ } __pyx_L9:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":121 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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) # <<<<<<<<<<<<<< @@ -1313,7 +1318,7 @@ */ geod_inv((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":122 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":122 * self.geodesic_t.p2.u = _dg2rad*distdata[i] * geod_inv(&self.geodesic_t) * if isnan(self.geodesic_t.DIST): # <<<<<<<<<<<<<< @@ -1323,7 +1328,7 @@ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST); if (__pyx_8) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":123 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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)') # <<<<<<<<<<<<<< @@ -1342,7 +1347,7 @@ } __pyx_L10:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":124 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":124 * if isnan(self.geodesic_t.DIST): * raise ValueError('undefined inverse geodesic (may be an antipodal point)') * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -1352,7 +1357,7 @@ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":125 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":125 * raise ValueError('undefined inverse geodesic (may be an antipodal point)') * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -1372,17 +1377,17 @@ } __pyx_L11:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":126 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":126 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * if radians: # <<<<<<<<<<<<<< * lonsdata[i] = self.geodesic_t.ALPHA12 * latsdata[i] = self.geodesic_t.ALPHA21 */ - __pyx_1 = PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; goto __pyx_L1;} + __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) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":127 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":127 * raise RuntimeError(pj_strerrno(pj_errno)) * if radians: * lonsdata[i] = self.geodesic_t.ALPHA12 # <<<<<<<<<<<<<< @@ -1391,7 +1396,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":128 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":128 * if radians: * lonsdata[i] = self.geodesic_t.ALPHA12 * latsdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1403,7 +1408,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":130 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":130 * latsdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 # <<<<<<<<<<<<<< @@ -1419,7 +1424,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":131 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":131 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 * latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1437,7 +1442,7 @@ } __pyx_L12:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":132 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":132 * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 * latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * azdata[i] = self.geodesic_t.DIST # <<<<<<<<<<<<<< @@ -1465,9 +1470,9 @@ return __pyx_r; } -static PyObject *__pyx_f_5_geod_4Geod__npts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_py_5_geod_4Geod__npts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5_geod_4Geod__npts[] = "\n given initial and terminus lat/lon, find npts intermediate points."; -static PyObject *__pyx_f_5_geod_4Geod__npts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_f_py_5_geod_4Geod__npts(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { double __pyx_v_lon1; double __pyx_v_lat1; double __pyx_v_lon2; @@ -1493,17 +1498,17 @@ __pyx_v_lats = Py_None; Py_INCREF(Py_None); __pyx_v_lons = Py_None; Py_INCREF(Py_None); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":139 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":139 * cdef int i * cdef double del_s * if radians: # <<<<<<<<<<<<<< * self.geodesic_t.p1.v = lon1 * self.geodesic_t.p1.u = lat1 */ - __pyx_1 = PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;} + __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) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":140 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":140 * cdef double del_s * if radians: * self.geodesic_t.p1.v = lon1 # <<<<<<<<<<<<<< @@ -1512,7 +1517,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_v_lon1; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":141 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":141 * if radians: * self.geodesic_t.p1.v = lon1 * self.geodesic_t.p1.u = lat1 # <<<<<<<<<<<<<< @@ -1521,7 +1526,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_v_lat1; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":142 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":142 * self.geodesic_t.p1.v = lon1 * self.geodesic_t.p1.u = lat1 * self.geodesic_t.p2.v = lon2 # <<<<<<<<<<<<<< @@ -1530,7 +1535,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = __pyx_v_lon2; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":143 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":143 * self.geodesic_t.p1.u = lat1 * self.geodesic_t.p2.v = lon2 * self.geodesic_t.p2.u = lat2 # <<<<<<<<<<<<<< @@ -1542,7 +1547,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":145 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":145 * self.geodesic_t.p2.u = lat2 * else: * self.geodesic_t.p1.v = _dg2rad*lon1 # <<<<<<<<<<<<<< @@ -1558,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":146 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":146 * else: * self.geodesic_t.p1.v = _dg2rad*lon1 * self.geodesic_t.p1.u = _dg2rad*lat1 # <<<<<<<<<<<<<< @@ -1574,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":147 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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 # <<<<<<<<<<<<<< @@ -1590,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":148 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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 # <<<<<<<<<<<<<< @@ -1608,7 +1613,7 @@ } __pyx_L2:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":150 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":150 * self.geodesic_t.p2.u = _dg2rad*lat2 * # do inverse computation to set azimuths, distance. * geod_inv(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -1617,7 +1622,7 @@ */ geod_inv((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":152 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":152 * geod_inv(&self.geodesic_t) * # set up some constants needed for forward computation. * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -1626,7 +1631,7 @@ */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":154 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":154 * geod_pre(&self.geodesic_t) * # distance increment. * del_s = self.geodesic_t.DIST/(npts+1) # <<<<<<<<<<<<<< @@ -1635,7 +1640,7 @@ */ __pyx_v_del_s = (((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST / (__pyx_v_npts + 1)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":156 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":156 * del_s = self.geodesic_t.DIST/(npts+1) * # initialize output tuples. * lats = () # <<<<<<<<<<<<<< @@ -1647,7 +1652,7 @@ __pyx_v_lats = __pyx_2; __pyx_2 = 0; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":157 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":157 * # initialize output tuples. * lats = () * lons = () # <<<<<<<<<<<<<< @@ -1659,7 +1664,7 @@ __pyx_v_lons = __pyx_3; __pyx_3 = 0; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":159 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":159 * lons = () * # loop over intermediate points, compute lat/lons. * for i from 1 <= i < npts+1: # <<<<<<<<<<<<<< @@ -1669,7 +1674,7 @@ __pyx_6 = (__pyx_v_npts + 1); for (__pyx_v_i = 1; __pyx_v_i < __pyx_6; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":160 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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 # <<<<<<<<<<<<<< @@ -1678,7 +1683,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST = (__pyx_v_i * __pyx_v_del_s); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":161 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":161 * for i from 1 <= i < npts+1: * self.geodesic_t.DIST = i*del_s * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -1687,17 +1692,17 @@ */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":162 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":162 * self.geodesic_t.DIST = i*del_s * geod_for(&self.geodesic_t) * if radians: # <<<<<<<<<<<<<< * lats = lats + (self.geodesic_t.p2.u,) * lons = lons + (self.geodesic_t.p2.v,) */ - __pyx_1 = PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;} + __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) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":163 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":163 * geod_for(&self.geodesic_t) * if radians: * lats = lats + (self.geodesic_t.p2.u,) # <<<<<<<<<<<<<< @@ -1714,7 +1719,7 @@ __pyx_v_lats = __pyx_3; __pyx_3 = 0; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":164 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":164 * if radians: * lats = lats + (self.geodesic_t.p2.u,) * lons = lons + (self.geodesic_t.p2.v,) # <<<<<<<<<<<<<< @@ -1734,7 +1739,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":166 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":166 * lons = lons + (self.geodesic_t.p2.v,) * else: * lats = lats + (_rad2dg*self.geodesic_t.p2.u,) # <<<<<<<<<<<<<< @@ -1755,7 +1760,7 @@ __pyx_v_lats = __pyx_2; __pyx_2 = 0; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":167 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":167 * else: * lats = lats + (_rad2dg*self.geodesic_t.p2.u,) * lons = lons + (_rad2dg*self.geodesic_t.p2.v,) # <<<<<<<<<<<<<< @@ -1778,7 +1783,7 @@ __pyx_L5:; } - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":168 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":168 * lats = lats + (_rad2dg*self.geodesic_t.p2.u,) * lons = lons + (_rad2dg*self.geodesic_t.p2.v,) * return lons, lats # <<<<<<<<<<<<<< @@ -1812,9 +1817,14 @@ {&__pyx_n_RuntimeError, "RuntimeError"}, {&__pyx_n_ValueError, "ValueError"}, {&__pyx_n___class__, "__class__"}, + {&__pyx_n___new__, "__new__"}, + {&__pyx_n___reduce__, "__reduce__"}, {&__pyx_n___version__, "__version__"}, {&__pyx_n__dg2rad, "_dg2rad"}, {&__pyx_n__doublesize, "_doublesize"}, + {&__pyx_n__fwd, "_fwd"}, + {&__pyx_n__inv, "_inv"}, + {&__pyx_n__npts, "_npts"}, {&__pyx_n__rad2dg, "_rad2dg"}, {&__pyx_n_append, "append"}, {&__pyx_n_degrees, "degrees"}, @@ -1826,16 +1836,16 @@ }; static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_k2p, __pyx_k2, sizeof(__pyx_k2)}, - {&__pyx_k6p, __pyx_k6, sizeof(__pyx_k6)}, - {&__pyx_k7p, __pyx_k7, sizeof(__pyx_k7)}, - {&__pyx_k8p, __pyx_k8, sizeof(__pyx_k8)}, - {&__pyx_k9p, __pyx_k9, sizeof(__pyx_k9)}, - {&__pyx_k10p, __pyx_k10, sizeof(__pyx_k10)}, - {&__pyx_k11p, __pyx_k11, sizeof(__pyx_k11)}, - {&__pyx_k12p, __pyx_k12, sizeof(__pyx_k12)}, - {&__pyx_k13p, __pyx_k13, sizeof(__pyx_k13)}, - {0, 0, 0} + {&__pyx_k2p, __pyx_k2, sizeof(__pyx_k2), 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}, + {&__pyx_k9p, __pyx_k9, sizeof(__pyx_k9), 0}, + {&__pyx_k10p, __pyx_k10, sizeof(__pyx_k10), 0}, + {&__pyx_k11p, __pyx_k11, sizeof(__pyx_k11), 0}, + {&__pyx_k12p, __pyx_k12, sizeof(__pyx_k12), 0}, + {&__pyx_k13p, __pyx_k13, sizeof(__pyx_k13), 0}, + {0, 0, 0, 0} }; static PyObject *__pyx_tp_new_5_geod_Geod(PyTypeObject *t, PyObject *a, PyObject *k) { @@ -1843,7 +1853,7 @@ struct __pyx_obj_5_geod_Geod *p = (struct __pyx_obj_5_geod_Geod *)o; p->geodparams = Py_None; Py_INCREF(Py_None); p->proj_version = Py_None; Py_INCREF(Py_None); - if (__pyx_f_5_geod_4Geod___new__(o, a, k) < 0) { + if (__pyx_f_py_5_geod_4Geod___new__(o, a, k) < 0) { Py_DECREF(o); o = 0; } return o; @@ -1878,10 +1888,10 @@ } static struct PyMethodDef __pyx_methods_5_geod_Geod[] = { - {"__reduce__", (PyCFunction)__pyx_f_5_geod_4Geod___reduce__, METH_NOARGS, __pyx_doc_5_geod_4Geod___reduce__}, - {"_fwd", (PyCFunction)__pyx_f_5_geod_4Geod__fwd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__fwd}, - {"_inv", (PyCFunction)__pyx_f_5_geod_4Geod__inv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__inv}, - {"_npts", (PyCFunction)__pyx_f_5_geod_4Geod__npts, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__npts}, + {"__reduce__", (PyCFunction)__pyx_f_py_5_geod_4Geod___reduce__, METH_NOARGS, __pyx_doc_5_geod_4Geod___reduce__}, + {"_fwd", (PyCFunction)__pyx_f_py_5_geod_4Geod__fwd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__fwd}, + {"_inv", (PyCFunction)__pyx_f_py_5_geod_4Geod__inv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__inv}, + {"_npts", (PyCFunction)__pyx_f_py_5_geod_4Geod__npts, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__npts}, {0, 0, 0, 0} }; @@ -1930,7 +1940,9 @@ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ + #if PY_VERSION_HEX >= 0x02050000 0, /*nb_index*/ + #endif }; static PySequenceMethods __pyx_tp_as_sequence_Geod = { @@ -2034,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_pyproj.pxi":1 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":1 * import math # <<<<<<<<<<<<<< * * _dg2rad = math.radians(1.) @@ -2043,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_pyproj.pxi":3 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":3 * import math * * _dg2rad = math.radians(1.) # <<<<<<<<<<<<<< @@ -2063,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_pyproj.pxi":4 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":4 * * _dg2rad = math.radians(1.) * _rad2dg = math.degrees(1.) # <<<<<<<<<<<<<< @@ -2083,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_pyproj.pxi":5 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":5 * _dg2rad = math.radians(1.) * _rad2dg = math.degrees(1.) * _doublesize = sizeof(double) # <<<<<<<<<<<<<< @@ -2094,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; - /* "/Volumes/User/jwhitaker/python/pyproj/_pyproj.pxi":6 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_pyproj.pxi":6 * _rad2dg = math.degrees(1.) * _doublesize = sizeof(double) * __version__ = "1.8.3" # <<<<<<<<<<<<<< @@ -2103,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;} - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":29 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":29 * return (self.__class__,(self.geodparams,)) * * def _fwd(self, object lons, object lats, object az, object dist, radians=False): # <<<<<<<<<<<<<< @@ -2113,7 +2125,7 @@ Py_INCREF(Py_False); __pyx_k3 = Py_False; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":84 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/src/_geod.pyx":84 * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): # <<<<<<<<<<<<<< @@ -2123,7 +2135,7 @@ Py_INCREF(Py_False); __pyx_k4 = Py_False; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":134 + /* "/Users/jsw/python/matplotlib/toolkits/basemap/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): # <<<<<<<<<<<<<< @@ -2288,7 +2300,11 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { - *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } if (!*t->p) return -1; ++t; Modified: trunk/toolkits/basemap/src/_proj.c =================================================================== --- trunk/toolkits/basemap/src/_proj.c 2007-10-12 17:30:17 UTC (rev 3939) +++ trunk/toolkits/basemap/src/_proj.c 2007-10-14 14:16:48 UTC (rev 3940) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.6 on Wed Sep 12 12:21:02 2007 */ +/* Generated by Cython 0.9.6.7 on Sun Oct 14 08:16:26 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -37,7 +37,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;} __Pyx_StringTabEntry; /*proto*/ +typedef struct {PyObject **p; char *s; long n; int is_unicode;} __Pyx_S... [truncated message content] |
From: <js...@us...> - 2007-12-28 19:45:03
|
Revision: 4794 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4794&view=rev Author: jswhit Date: 2007-12-28 11:44:55 -0800 (Fri, 28 Dec 2007) Log Message: ----------- update proj4 sources to version 4.6.0 Modified Paths: -------------- trunk/toolkits/basemap/src/PJ_gn_sinu.c trunk/toolkits/basemap/src/PJ_krovak.c trunk/toolkits/basemap/src/PJ_laea.c trunk/toolkits/basemap/src/PJ_wag3.c trunk/toolkits/basemap/src/emess.c trunk/toolkits/basemap/src/geocent.c trunk/toolkits/basemap/src/geocent.h trunk/toolkits/basemap/src/geod.c trunk/toolkits/basemap/src/nad_init.c trunk/toolkits/basemap/src/pj_datum_set.c trunk/toolkits/basemap/src/pj_factors.c trunk/toolkits/basemap/src/pj_gridinfo.c trunk/toolkits/basemap/src/pj_gridlist.c trunk/toolkits/basemap/src/pj_init.c trunk/toolkits/basemap/src/pj_latlong.c trunk/toolkits/basemap/src/pj_list.h trunk/toolkits/basemap/src/pj_open_lib.c trunk/toolkits/basemap/src/pj_release.c trunk/toolkits/basemap/src/pj_transform.c trunk/toolkits/basemap/src/pj_utils.c trunk/toolkits/basemap/src/proj_api.h trunk/toolkits/basemap/src/projects.h trunk/toolkits/basemap/src/rtodms.c Modified: trunk/toolkits/basemap/src/PJ_gn_sinu.c =================================================================== --- trunk/toolkits/basemap/src/PJ_gn_sinu.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/PJ_gn_sinu.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -75,7 +75,6 @@ if (!(P->en = pj_enfn(P->es))) E_ERROR_0; if (P->es) { - P->en = pj_enfn(P->es); P->inv = e_inverse; P->fwd = e_forward; } else { Modified: trunk/toolkits/basemap/src/PJ_krovak.c =================================================================== --- trunk/toolkits/basemap/src/PJ_krovak.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/PJ_krovak.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: PJ_krovak.c,v 1.6 2006/09/14 13:10:50 fwarmerdam Exp $ + * $Id: PJ_krovak.c,v 1.9 2007/03/07 17:32:32 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Implementation of the krovak (Krovak) projection. @@ -30,6 +30,15 @@ ****************************************************************************** * * $Log: PJ_krovak.c,v $ + * Revision 1.9 2007/03/07 17:32:32 fwarmerdam + * remove orphan semicolon. + * + * Revision 1.8 2007/03/07 17:28:08 fwarmerdam + * Make it reasonably clear that this is ellipsoidal in the code. + * + * Revision 1.7 2007/03/07 17:25:34 fwarmerdam + * report krovak as ellipsoidal, not spherical + * * Revision 1.6 2006/09/14 13:10:50 fwarmerdam * Add +czech flag to control reversal of signs (bug 1133,147) * @@ -55,9 +64,9 @@ #include <string.h> #include <stdio.h> -PJ_CVSID("$Id: PJ_krovak.c,v 1.6 2006/09/14 13:10:50 fwarmerdam Exp $"); +PJ_CVSID("$Id: PJ_krovak.c,v 1.9 2007/03/07 17:32:32 fwarmerdam Exp $"); -PROJ_HEAD(krovak, "Krovak") "\n\tPCyl., Sph."; +PROJ_HEAD(krovak, "Krovak") "\n\tPCyl., Ellps."; /** NOTES: According to EPSG the full Krovak projection method should have @@ -84,7 +93,7 @@ -FORWARD(s_forward); /* spheroid */ +FORWARD(e_forward); /* ellipsoid */ /* calculate xy from lat/lon */ char errmess[255]; @@ -153,7 +162,7 @@ -INVERSE(s_inverse); /* spheroid */ +INVERSE(e_inverse); /* ellipsoid */ /* calculate lat/lon from xy */ /* Constants, identisch wie in der Umkehrfunktion */ @@ -258,15 +267,14 @@ /* as input and output, instead of lat/long relative to Ferro */ if (!pj_param(P->params, "tlon_0").i) P->lam0 = 0.7417649320975901 - 0.308341501185665; -; /* if scale not set default to 0.9999 */ if (!pj_param(P->params, "tk").i) P->k0 = 0.9999; /* always the same */ - P->inv = s_inverse; - P->fwd = s_forward; + P->inv = e_inverse; + P->fwd = e_forward; ENDENTRY(P) Modified: trunk/toolkits/basemap/src/PJ_laea.c =================================================================== --- trunk/toolkits/basemap/src/PJ_laea.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/PJ_laea.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -179,8 +179,14 @@ 0. : atan2(xy.x, xy.y); return (lp); } -FREEUP; if (P) pj_dalloc(P); } -ENTRY0(laea) +FREEUP; + if (P) { + if (P->apa) + pj_dalloc(P->apa); + pj_dalloc(P); + } +} +ENTRY1(laea,apa) double t; if (fabs((t = fabs(P->phi0)) - HALFPI) < EPS10) Modified: trunk/toolkits/basemap/src/PJ_wag3.c =================================================================== --- trunk/toolkits/basemap/src/PJ_wag3.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/PJ_wag3.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -5,7 +5,7 @@ double C_x; #define PJ_LIB__ # include <projects.h> -PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph."; +PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph.\n\tlat_ts="; #define TWOTHIRD 0.6666666666666666666667 FORWARD(s_forward); /* spheroid */ xy.x = P->C_x * lp.lam * cos(TWOTHIRD * lp.phi); Modified: trunk/toolkits/basemap/src/emess.c =================================================================== --- trunk/toolkits/basemap/src/emess.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/emess.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -3,6 +3,15 @@ static const char SCCSID[]="@(#)emess.c 4.6 94/05/24 GIE REL"; #endif +#ifdef _MSC_VER +# ifndef _CRT_SECURE_NO_DEPRECATE +# define _CRT_SECURE_NO_DEPRECATE +# endif +# ifndef _CRT_NONSTDC_NO_DEPRECATE +# define _CRT_NONSTDC_NO_DEPRECATE +# endif +#endif + #include <stdio.h> #include <stdlib.h> #include <stdarg.h> Modified: trunk/toolkits/basemap/src/geocent.c =================================================================== --- trunk/toolkits/basemap/src/geocent.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/geocent.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -65,6 +65,9 @@ * 25-02-97 Original Code * * $Log: geocent.c,v $ + * Revision 1.7 2007/09/11 20:19:36 fwarmerdam + * avoid use of static variables to make reentrant + * * Revision 1.6 2006/01/12 22:29:01 fwarmerdam * make geocent.c globals static to avoid conflicts * @@ -109,29 +112,11 @@ /***************************************************************************/ /* - * GLOBAL DECLARATIONS - */ -/* Ellipsoid parameters, default to WGS 84 */ -static double Geocent_a = 6378137.0; /* Semi-major axis of ellipsoid in meters */ -static double Geocent_b = 6356752.3142; /* Semi-minor axis of ellipsoid */ - -static double Geocent_a2 = 40680631590769.0; /* Square of semi-major axis */ -static double Geocent_b2 = 40408299984087.05; /* Square of semi-minor axis */ -static double Geocent_e2 = 0.0066943799901413800; /* Eccentricity squared */ -static double Geocent_ep2 = 0.00673949675658690300; /* 2nd eccentricity squared */ -/* - * These state variables are for optimization purposes. The only function - * that should modify them is Set_Geocentric_Parameters. - */ - - -/***************************************************************************/ -/* * FUNCTIONS */ -long pj_Set_Geocentric_Parameters (double a, double b) +long pj_Set_Geocentric_Parameters (GeocentricInfo *gi, double a, double b) { /* BEGIN Set_Geocentric_Parameters */ /* @@ -141,29 +126,30 @@ * a : Semi-major axis, in meters. (input) * b : Semi-minor axis, in meters. (input) */ - long Error_Code = GEOCENT_NO_ERROR; + long Error_Code = GEOCENT_NO_ERROR; - if (a <= 0.0) - Error_Code |= GEOCENT_A_ERROR; - if (b <= 0.0) - Error_Code |= GEOCENT_B_ERROR; - if (a < b) - Error_Code |= GEOCENT_A_LESS_B_ERROR; - if (!Error_Code) - { - Geocent_a = a; - Geocent_b = b; - Geocent_a2 = a * a; - Geocent_b2 = b * b; - Geocent_e2 = (Geocent_a2 - Geocent_b2) / Geocent_a2; - Geocent_ep2 = (Geocent_a2 - Geocent_b2) / Geocent_b2; - } - return (Error_Code); + if (a <= 0.0) + Error_Code |= GEOCENT_A_ERROR; + if (b <= 0.0) + Error_Code |= GEOCENT_B_ERROR; + if (a < b) + Error_Code |= GEOCENT_A_LESS_B_ERROR; + if (!Error_Code) + { + gi->Geocent_a = a; + gi->Geocent_b = b; + gi->Geocent_a2 = a * a; + gi->Geocent_b2 = b * b; + gi->Geocent_e2 = (gi->Geocent_a2 - gi->Geocent_b2) / gi->Geocent_a2; + gi->Geocent_ep2 = (gi->Geocent_a2 - gi->Geocent_b2) / gi->Geocent_b2; + } + return (Error_Code); } /* END OF Set_Geocentric_Parameters */ -void pj_Get_Geocentric_Parameters (double *a, - double *b) +void pj_Get_Geocentric_Parameters (GeocentricInfo *gi, + double *a, + double *b) { /* BEGIN Get_Geocentric_Parameters */ /* * The function Get_Geocentric_Parameters returns the ellipsoid parameters @@ -173,17 +159,18 @@ * b : Semi-minor axis, in meters. (output) */ - *a = Geocent_a; - *b = Geocent_b; + *a = gi->Geocent_a; + *b = gi->Geocent_b; } /* END OF Get_Geocentric_Parameters */ -long pj_Convert_Geodetic_To_Geocentric (double Latitude, - double Longitude, - double Height, - double *X, - double *Y, - double *Z) +long pj_Convert_Geodetic_To_Geocentric (GeocentricInfo *gi, + double Latitude, + double Longitude, + double Height, + double *X, + double *Y, + double *Z) { /* BEGIN Convert_Geodetic_To_Geocentric */ /* * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates @@ -225,10 +212,10 @@ Sin_Lat = sin(Latitude); Cos_Lat = cos(Latitude); Sin2_Lat = Sin_Lat * Sin_Lat; - Rn = Geocent_a / (sqrt(1.0e0 - Geocent_e2 * Sin2_Lat)); + Rn = gi->Geocent_a / (sqrt(1.0e0 - gi->Geocent_e2 * Sin2_Lat)); *X = (Rn + Height) * Cos_Lat * cos(Longitude); *Y = (Rn + Height) * Cos_Lat * sin(Longitude); - *Z = ((Rn * (1 - Geocent_e2)) + Height) * Sin_Lat; + *Z = ((Rn * (1 - gi->Geocent_e2)) + Height) * Sin_Lat; } return (Error_Code); @@ -249,12 +236,13 @@ #define USE_ITERATIVE_METHOD -void pj_Convert_Geocentric_To_Geodetic (double X, - double Y, - double Z, - double *Latitude, - double *Longitude, - double *Height) +void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi, + double X, + double Y, + double Z, + double *Latitude, + double *Longitude, + double *Height) { /* BEGIN Convert_Geocentric_To_Geodetic */ #if !defined(USE_ITERATIVE_METHOD) /* @@ -321,12 +309,12 @@ Sin_B0 = T0 / S0; Cos_B0 = W / S0; Sin3_B0 = Sin_B0 * Sin_B0 * Sin_B0; - T1 = Z + Geocent_b * Geocent_ep2 * Sin3_B0; - Sum = W - Geocent_a * Geocent_e2 * Cos_B0 * Cos_B0 * Cos_B0; + T1 = Z + gi->Geocent_b * gi->Geocent_ep2 * Sin3_B0; + Sum = W - gi->Geocent_a * gi->Geocent_e2 * Cos_B0 * Cos_B0 * Cos_B0; S1 = sqrt(T1*T1 + Sum * Sum); Sin_p1 = T1 / S1; Cos_p1 = Sum / S1; - Rn = Geocent_a / sqrt(1.0 - Geocent_e2 * Sin_p1 * Sin_p1); + Rn = gi->Geocent_a / sqrt(1.0 - gi->Geocent_e2 * Sin_p1 * Sin_p1); if (Cos_p1 >= COS_67P5) { *Height = W / Cos_p1 - Rn; @@ -337,7 +325,7 @@ } else { - *Height = Z / Sin_p1 + Rn * (Geocent_e2 - 1.0); + *Height = Z / Sin_p1 + Rn * (gi->Geocent_e2 - 1.0); } if (At_Pole == FALSE) { @@ -401,7 +389,7 @@ RR = sqrt(X*X+Y*Y+Z*Z); /* special cases for latitude and longitude */ - if (P/Geocent_a < genau) { + if (P/gi->Geocent_a < genau) { /* special case, if P=0. (X=0., Y=0.) */ At_Pole = TRUE; @@ -409,9 +397,9 @@ /* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis * of ellipsoid (=center of mass), Latitude becomes PI/2 */ - if (RR/Geocent_a < genau) { + if (RR/gi->Geocent_a < genau) { *Latitude = PI_OVER_2; - *Height = -Geocent_b; + *Height = -gi->Geocent_b; return ; } @@ -433,8 +421,8 @@ */ CT = Z/RR; ST = P/RR; - RX = 1.0/sqrt(1.0-Geocent_e2*(2.0-Geocent_e2)*ST*ST); - CPHI0 = ST*(1.0-Geocent_e2)*RX; + RX = 1.0/sqrt(1.0-gi->Geocent_e2*(2.0-gi->Geocent_e2)*ST*ST); + CPHI0 = ST*(1.0-gi->Geocent_e2)*RX; SPHI0 = CT*RX; iter = 0; @@ -443,12 +431,12 @@ do { iter++; - RN = Geocent_a/sqrt(1.0-Geocent_e2*SPHI0*SPHI0); + RN = gi->Geocent_a/sqrt(1.0-gi->Geocent_e2*SPHI0*SPHI0); /* ellipsoidal (geodetic) height */ - *Height = P*CPHI0+Z*SPHI0-RN*(1.0-Geocent_e2*SPHI0*SPHI0); + *Height = P*CPHI0+Z*SPHI0-RN*(1.0-gi->Geocent_e2*SPHI0*SPHI0); - RK = Geocent_e2*RN/(RN+*Height); + RK = gi->Geocent_e2*RN/(RN+*Height); RX = 1.0/sqrt(1.0-RK*(2.0-RK)*ST*ST); CPHI = ST*(1.0-RK)*RX; SPHI = CT*RX; Modified: trunk/toolkits/basemap/src/geocent.h =================================================================== --- trunk/toolkits/basemap/src/geocent.h 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/geocent.h 2007-12-28 19:44:55 UTC (rev 4794) @@ -92,9 +92,21 @@ extern "C" { #endif +typedef struct +{ + double Geocent_a; /* Semi-major axis of ellipsoid in meters */ + double Geocent_b; /* Semi-minor axis of ellipsoid */ + double Geocent_a2; /* Square of semi-major axis */ + double Geocent_b2; /* Square of semi-minor axis */ + double Geocent_e2; /* Eccentricity squared */ + double Geocent_ep2; /* 2nd eccentricity squared */ +} GeocentricInfo; - long pj_Set_Geocentric_Parameters (double a, - double b); +void pj_Init_Geocentric( GeocentricInfo *gi ); +long pj_Set_Geocentric_Parameters( GeocentricInfo *gi, + double a, + double b); + /* * The function Set_Geocentric_Parameters receives the ellipsoid parameters * as inputs and sets the corresponding state variables. @@ -104,8 +116,10 @@ */ - void pj_Get_Geocentric_Parameters (double *a, - double *b); +void pj_Get_Geocentric_Parameters ( GeocentricInfo *gi, + double *a, + double *b); + /* * The function Get_Geocentric_Parameters returns the ellipsoid parameters * to be used in geocentric coordinate conversions. @@ -115,12 +129,13 @@ */ - long pj_Convert_Geodetic_To_Geocentric (double Latitude, - double Longitude, - double Height, - double *X, - double *Y, - double *Z); +long pj_Convert_Geodetic_To_Geocentric ( GeocentricInfo *gi, + double Latitude, + double Longitude, + double Height, + double *X, + double *Y, + double *Z); /* * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z), @@ -136,12 +151,13 @@ */ - void pj_Convert_Geocentric_To_Geodetic (double X, - double Y, - double Z, - double *Latitude, - double *Longitude, - double *Height); +void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi, + double X, + double Y, + double Z, + double *Latitude, + double *Longitude, + double *Height); /* * The function Convert_Geocentric_To_Geodetic converts geocentric * coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude, Modified: trunk/toolkits/basemap/src/geod.c =================================================================== --- trunk/toolkits/basemap/src/geod.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/geod.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -2,11 +2,11 @@ static const char SCCSID[]="@(#)geod.c 4.8 95/09/23 GIE REL"; #endif /* <<<< Geodesic filter program >>>> */ -# include <ctype.h> -# include <stdio.h> # include "projects.h" # include "geodesic.h" # include "emess.h" +# include <ctype.h> +# include <stdio.h> # include <string.h> # define MAXLINE 200 Modified: trunk/toolkits/basemap/src/nad_init.c =================================================================== --- trunk/toolkits/basemap/src/nad_init.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/nad_init.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: nad_init.c,v 1.8 2003/03/17 18:56:01 warmerda Exp $ + * $Id: nad_init.c,v 1.10 2007/09/11 20:16:33 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Load datum shift files into memory. @@ -28,6 +28,12 @@ ****************************************************************************** * * $Log: nad_init.c,v $ + * Revision 1.10 2007/09/11 20:16:33 fwarmerdam + * Improve error recovery if ctable datum shift files fails to load. + * + * Revision 1.9 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.8 2003/03/17 18:56:01 warmerda * implement delayed loading of ctable format files * @@ -53,9 +59,18 @@ #include <projects.h> #include <stdio.h> #include <errno.h> -#include <assert.h> #include <string.h> +#ifdef _WIN32_WCE +/* assert.h includes all Windows API headers and causes 'LP' name clash. + * Here assert we disable assert() for Windows CE. + * TODO - mloskot: re-implement porting friendly assert + */ +# define assert(exp) ((void)0) +#else +# include <assert.h> +#endif /* _WIN32_WCE */ + /************************************************************************/ /* nad_ctable_load() */ /* */ @@ -75,6 +90,15 @@ if( ct->cvs == NULL || fread(ct->cvs, sizeof(FLP), a_size, fid) != a_size ) { + pj_dalloc( ct->cvs ); + ct->cvs = NULL; + + if( getenv("PROJ_DEBUG") != NULL ) + { + fprintf( stderr, + "ctable loading failed on fread() - binary incompatible?\n" ); + } + pj_errno = -38; return 0; } Modified: trunk/toolkits/basemap/src/pj_datum_set.c =================================================================== --- trunk/toolkits/basemap/src/pj_datum_set.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_datum_set.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_datum_set.c,v 1.2 2001/04/04 21:13:21 warmerda Exp $ + * $Id: pj_datum_set.c,v 1.4 2007/11/29 21:06:50 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Apply datum definition to PJ structure from initialization string. @@ -28,6 +28,12 @@ ****************************************************************************** * * $Log: pj_datum_set.c,v $ + * Revision 1.4 2007/11/29 21:06:50 fwarmerdam + * make sure we only look for 7 parameters + * + * Revision 1.3 2007/01/31 06:41:01 fwarmerdam + * dont parse more datum parameters than we have room for in datum_params[] + * * Revision 1.2 2001/04/04 21:13:21 warmerda * do arcsecond/radian and ppm datum parm transformation in pj_set_datum() * @@ -113,7 +119,7 @@ /* parse out the parameters */ s = towgs84; - for( s = towgs84; *s != '\0'; ) + for( s = towgs84; *s != '\0' && parm_count < 7; ) { projdef->datum_params[parm_count++] = atof(s); while( *s != '\0' && *s != ',' ) Modified: trunk/toolkits/basemap/src/pj_factors.c =================================================================== --- trunk/toolkits/basemap/src/pj_factors.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_factors.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -20,15 +20,16 @@ return 1; } else { /* proceed */ errno = pj_errno = 0; - if (fabs(t) <= EPS) /* adjust to pi/2 */ - lp.phi = lp.phi < 0. ? -HALFPI : HALFPI; + if (h < EPS) + h = DEFAULT_H; + if (fabs(lp.phi) > (HALFPI - h)) + /* adjust to value around pi/2 where derived still exists*/ + lp.phi = lp.phi < 0. ? (-HALFPI+h) : (HALFPI-h); else if (P->geoc) lp.phi = atan(P->rone_es * tan(lp.phi)); lp.lam -= P->lam0; /* compute del lp.lam */ if (!P->over) lp.lam = adjlon(lp.lam); /* adjust del longitude */ - if (h <= 0.) - h = DEFAULT_H; if (P->spc) /* get what projection analytic values */ P->spc(lp, P, fac); if (((fac->code & (IS_ANAL_XL_YL+IS_ANAL_XP_YP)) != Modified: trunk/toolkits/basemap/src/pj_gridinfo.c =================================================================== --- trunk/toolkits/basemap/src/pj_gridinfo.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_gridinfo.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_gridinfo.c,v 1.7 2005/07/07 00:16:03 fwarmerdam Exp $ + * $Id: pj_gridinfo.c,v 1.8 2006/11/17 22:16:30 mloskot Exp $ * * Project: PROJ.4 * Purpose: Functions for handling individual PJ_GRIDINFO's. Includes @@ -29,6 +29,9 @@ ****************************************************************************** * * $Log: pj_gridinfo.c,v $ + * Revision 1.8 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.7 2005/07/07 00:16:03 fwarmerdam * Fixed debug fprintf syntax per: * http://bugzilla.remotesensing.org/show_bug.cgi?id=886 @@ -59,8 +62,17 @@ #include <string.h> #include <math.h> #include <errno.h> -#include <assert.h> +#ifdef _WIN32_WCE +/* assert.h includes all Windows API headers and causes 'LP' name clash. + * Here assert we disable assert() for Windows CE. + * TODO - mloskot: re-implement porting friendly assert + */ +# define assert(exp) ((void)0) +#else +# include <assert.h> +#endif /* _WIN32_WCE */ + /************************************************************************/ /* swap_words() */ /* */ Modified: trunk/toolkits/basemap/src/pj_gridlist.c =================================================================== --- trunk/toolkits/basemap/src/pj_gridlist.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_gridlist.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_gridlist.c,v 1.4 2005/11/01 05:56:13 fwarmerdam Exp $ + * $Id: pj_gridlist.c,v 1.5 2006/11/17 22:16:30 mloskot Exp $ * * Project: PROJ.4 * Purpose: Code to manage the list of currently loaded (cached) PJ_GRIDINFOs @@ -29,6 +29,9 @@ ****************************************************************************** * * $Log: pj_gridlist.c,v $ + * Revision 1.5 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.4 2005/11/01 05:56:13 fwarmerdam * improved error handling if gridcount is zero * @@ -48,8 +51,17 @@ #include <projects.h> #include <string.h> #include <math.h> -#include <assert.h> +#ifdef _WIN32_WCE +/* assert.h includes all Windows API headers and causes 'LP' name clash. + * Here assert we disable assert() for Windows CE. + * TODO - mloskot: re-implement porting friendly assert + */ +# define assert(exp) ((void)0) +#else +# include <assert.h> +#endif /* _WIN32_WCE */ + static PJ_GRIDINFO *grid_list = NULL; /* used only by pj_load_nadgrids() and pj_deallocate_grids() */ Modified: trunk/toolkits/basemap/src/pj_init.c =================================================================== --- trunk/toolkits/basemap/src/pj_init.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_init.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_init.c,v 1.18 2006/10/12 21:04:39 fwarmerdam Exp $ + * $Id: pj_init.c,v 1.19 2007/11/26 00:21:59 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Initialize projection object from string definition. Includes @@ -30,6 +30,15 @@ ****************************************************************************** * * $Log: pj_init.c,v $ + * Revision 1.19 2007/11/26 00:21:59 fwarmerdam + * Modified PJ structure to hold a_orig, es_orig, ellipsoid definition before + * adjustment for spherical projections. + * Modified pj_datum_transform() to use the original ellipsoid parameters, + * not the ones adjusted for spherical projections. + * Modified pj_datum_transform() to not attempt any datum shift via + * geocentric coordinates if the source *or* destination are raw ellipsoids + * (ie. PJD_UNKNOWN). All per PROJ bug #1602, GDAL bug #2025. + * * Revision 1.18 2006/10/12 21:04:39 fwarmerdam * Added experimental +lon_wrap argument to set a "center point" for * longitude wrapping of longitude values coming out of pj_transform(). @@ -73,7 +82,7 @@ #include <string.h> #include <errno.h> -PJ_CVSID("$Id: pj_init.c,v 1.18 2006/10/12 21:04:39 fwarmerdam Exp $"); +PJ_CVSID("$Id: pj_init.c,v 1.19 2007/11/26 00:21:59 fwarmerdam Exp $"); extern FILE *pj_open_lib(char *, char *); @@ -282,6 +291,9 @@ /* set ellipsoid/sphere parameters */ if (pj_ell_set(start, &PIN->a, &PIN->es)) goto bum_call; + PIN->a_orig = PIN->a; + PIN->es_orig = PIN->es; + PIN->e = sqrt(PIN->es); PIN->ra = 1. / PIN->a; PIN->one_es = 1. - PIN->es; Modified: trunk/toolkits/basemap/src/pj_latlong.c =================================================================== --- trunk/toolkits/basemap/src/pj_latlong.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_latlong.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_latlong.c,v 1.2 2000/07/07 06:04:23 warmerda Exp $ + * $Id: pj_latlong.c,v 1.3 2007/11/30 20:02:31 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Stub projection implementation for lat/long coordinates. We @@ -30,6 +30,9 @@ ****************************************************************************** * * $Log: pj_latlong.c,v $ + * Revision 1.3 2007/11/30 20:02:31 fwarmerdam + * add latlon and lonlat aliases + * * Revision 1.2 2000/07/07 06:04:23 warmerda * added longlat alias * @@ -41,8 +44,10 @@ /* very loosely based upon DMA code by Bradford W. Drew */ #define PJ_LIB__ #include <projects.h> -PROJ_HEAD(latlong, "Lat/long (Geodetic)") "\n\t"; -PROJ_HEAD(longlat, "Lat/long (Geodetic)") "\n\t"; +PROJ_HEAD(lonlat, "Lat/long (Geodetic)") "\n\t"; +PROJ_HEAD(latlon, "Lat/long (Geodetic alias)") "\n\t"; +PROJ_HEAD(latlong, "Lat/long (Geodetic alias)") "\n\t"; +PROJ_HEAD(longlat, "Lat/long (Geodetic alias)") "\n\t"; FORWARD(forward); @@ -71,3 +76,17 @@ P->y0 = 0.0; P->inv = inverse; P->fwd = forward; ENDENTRY(P) + +ENTRY0(latlon) + P->is_latlong = 1; + P->x0 = 0.0; + P->y0 = 0.0; + P->inv = inverse; P->fwd = forward; +ENDENTRY(P) + +ENTRY0(lonlat) + P->is_latlong = 1; + P->x0 = 0.0; + P->y0 = 0.0; + P->inv = inverse; P->fwd = forward; +ENDENTRY(P) Modified: trunk/toolkits/basemap/src/pj_list.h =================================================================== --- trunk/toolkits/basemap/src/pj_list.h 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_list.h 2007-12-28 19:44:55 UTC (rev 4794) @@ -55,8 +55,10 @@ PROJ_HEAD(lagrng, "Lagrange") PROJ_HEAD(larr, "Larrivee") PROJ_HEAD(lask, "Laskowski") -PROJ_HEAD(latlong, "Lat/long (Geodetic)") -PROJ_HEAD(longlat, "Lat/long (Geodetic)") +PROJ_HEAD(lonlat, "Lat/long (Geodetic)") +PROJ_HEAD(latlon, "Lat/long (Geodetic alias)") +PROJ_HEAD(latlong, "Lat/long (Geodetic alias)") +PROJ_HEAD(longlat, "Lat/long (Geodetic alias)") PROJ_HEAD(lcc, "Lambert Conformal Conic") PROJ_HEAD(lcca, "Lambert Conformal Conic Alternative") PROJ_HEAD(leac, "Lambert Equal Area Conic") @@ -71,7 +73,6 @@ PROJ_HEAD(merc, "Mercator") PROJ_HEAD(mil_os, "Miller Oblated Stereographic") PROJ_HEAD(mill, "Miller Cylindrical") -PROJ_HEAD(mpoly, "Modified Polyconic") PROJ_HEAD(moll, "Mollweide") PROJ_HEAD(murd1, "Murdoch I") PROJ_HEAD(murd2, "Murdoch II") Modified: trunk/toolkits/basemap/src/pj_open_lib.c =================================================================== --- trunk/toolkits/basemap/src/pj_open_lib.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_open_lib.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_open_lib.c,v 1.6 2004/09/16 15:14:01 fwarmerdam Exp $ + * $Id: pj_open_lib.c,v 1.9 2007/07/06 14:58:03 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Implementation of pj_open_lib(), and pj_set_finder(). These @@ -31,6 +31,15 @@ ****************************************************************************** * * $Log: pj_open_lib.c,v $ + * Revision 1.9 2007/07/06 14:58:03 fwarmerdam + * improve searchpath clearning with pj_set_searchpath() + * + * Revision 1.8 2007/03/11 17:03:18 fwarmerdam + * support drive letter prefixes on win32 and related fixes (bug 1499) + * + * Revision 1.7 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.6 2004/09/16 15:14:01 fwarmerdam * * src/pj_open_lib.c: added pj_set_searchpath() provided by Eric Miller. * @@ -45,7 +54,7 @@ #include <string.h> #include <errno.h> -PJ_CVSID("$Id: pj_open_lib.c,v 1.6 2004/09/16 15:14:01 fwarmerdam Exp $"); +PJ_CVSID("$Id: pj_open_lib.c,v 1.9 2007/07/06 14:58:03 fwarmerdam Exp $"); static const char *(*pj_finder)(const char *) = NULL; static int path_count = 0; @@ -71,7 +80,8 @@ /* pj_set_searchpath() */ /* */ /* Path control for callers that can't practically provide */ -/* pj_set_finder() style callbacks. */ +/* pj_set_finder() style callbacks. Call with (0,NULL) as args */ +/* to clear the searchpath set. */ /************************************************************************/ void pj_set_searchpath ( int count, const char **path ) @@ -89,13 +99,16 @@ search_path = NULL; } - search_path = pj_malloc(sizeof *search_path * count); - for (i = 0; i < count; i++) + if( count > 0 ) { - search_path[i] = pj_malloc(strlen(path[i]) + 1); - strcpy(search_path[i], path[i]); + search_path = pj_malloc(sizeof *search_path * count); + for (i = 0; i < count; i++) + { + search_path[i] = pj_malloc(strlen(path[i]) + 1); + strcpy(search_path[i], path[i]); + } } - + path_count = count; } @@ -110,9 +123,16 @@ FILE *fid; int n = 0; int i; +#ifdef WIN32 + static const char dir_chars[] = "/\\"; +#else + static const char dir_chars[] = "/"; +#endif +#ifndef _WIN32_WCE + /* check if ~/name */ - if (*name == '~' && name[1] == DIR_CHAR) + if (*name == '~' && strchr(dir_chars,name[1]) ) if (sysname = getenv("HOME")) { (void)strcpy(fname, sysname); fname[n = strlen(fname)] = DIR_CHAR; @@ -123,8 +143,10 @@ return NULL; /* or fixed path: /name, ./name or ../name */ - else if (*name == DIR_CHAR || (*name == '.' && name[1] == DIR_CHAR) || - (!strncmp(name, "..", 2) && name[2] == DIR_CHAR) ) + else if (strchr(dir_chars,*name) + || (*name == '.' && strchr(dir_chars,name[1])) + || (!strncmp(name, "..", 2) && strchr(dir_chars,name[2])) + || (name[1] == ':' && strchr(dir_chars,name[2])) ) sysname = name; /* or try to use application provided file finder */ @@ -163,4 +185,7 @@ fid == NULL ? "failed" : "succeeded" ); return(fid); +#else + return NULL; +#endif /* _WIN32_WCE */ } Modified: trunk/toolkits/basemap/src/pj_release.c =================================================================== --- trunk/toolkits/basemap/src/pj_release.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_release.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -2,7 +2,7 @@ #include <projects.h> -char const pj_release[]="Rel. 4.5.0, 22 Oct 2006"; +char const pj_release[]="Rel. 4.6.0, 21 Dec 2007"; const char *pj_get_release() Modified: trunk/toolkits/basemap/src/pj_transform.c =================================================================== --- trunk/toolkits/basemap/src/pj_transform.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_transform.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_transform.c,v 1.20 2006/10/12 21:04:39 fwarmerdam Exp $ + * $Id: pj_transform.c,v 1.24 2007/12/03 15:48:20 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Perform overall coordinate system to coordinate system @@ -30,6 +30,24 @@ ****************************************************************************** * * $Log: pj_transform.c,v $ + * Revision 1.24 2007/12/03 15:48:20 fwarmerdam + * Improve WGS84 ES precision to avoid unnecesary transformation (#1531) + * + * Revision 1.23 2007/11/26 00:21:59 fwarmerdam + * Modified PJ structure to hold a_orig, es_orig, ellipsoid definition before + * adjustment for spherical projections. + * Modified pj_datum_transform() to use the original ellipsoid parameters, + * not the ones adjusted for spherical projections. + * Modified pj_datum_transform() to not attempt any datum shift via + * geocentric coordinates if the source *or* destination are raw ellipsoids + * (ie. PJD_UNKNOWN). All per PROJ bug #1602, GDAL bug #2025. + * + * Revision 1.22 2007/09/11 20:32:25 fwarmerdam + * mark the transient error array const + * + * Revision 1.21 2007/09/11 20:19:36 fwarmerdam + * avoid use of static variables to make reentrant + * * Revision 1.20 2006/10/12 21:04:39 fwarmerdam * Added experimental +lon_wrap argument to set a "center point" for * longitude wrapping of longitude values coming out of pj_transform(). @@ -110,14 +128,14 @@ #include <math.h> #include "geocent.h" -PJ_CVSID("$Id: pj_transform.c,v 1.20 2006/10/12 21:04:39 fwarmerdam Exp $"); +PJ_CVSID("$Id: pj_transform.c,v 1.24 2007/12/03 15:48:20 fwarmerdam Exp $"); #ifndef SRS_WGS84_SEMIMAJOR #define SRS_WGS84_SEMIMAJOR 6378137.0 #endif #ifndef SRS_WGS84_ESQUARED -#define SRS_WGS84_ESQUARED 0.006694379990 +#define SRS_WGS84_ESQUARED 0.0066943799901413165 #endif #define Dx_BF (defn->datum_params[0]) @@ -139,7 +157,7 @@ ** list or something, but while experimenting with it this should be fine. */ -static int transient_error[45] = { +static const int transient_error[45] = { /* 0 1 2 3 4 5 6 7 8 9 */ /* 0 to 9 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 to 19 */ 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, @@ -191,7 +209,7 @@ } } - if( pj_geocentric_to_geodetic( srcdefn->a, srcdefn->es, + if( pj_geocentric_to_geodetic( srcdefn->a_orig, srcdefn->es_orig, point_count, point_offset, x, y, z ) != 0) return pj_errno; @@ -288,7 +306,7 @@ return PJD_ERR_GEOCENTRIC; } - pj_geodetic_to_geocentric( dstdefn->a, dstdefn->es, + pj_geodetic_to_geocentric( dstdefn->a_orig, dstdefn->es_orig, point_count, point_offset, x, y, z ); if( dstdefn->fr_meter != 1.0 ) @@ -372,6 +390,7 @@ { double b; int i; + GeocentricInfo gi; pj_errno = 0; @@ -380,7 +399,7 @@ else b = a * sqrt(1-es); - if( pj_Set_Geocentric_Parameters( a, b ) != 0 ) + if( pj_Set_Geocentric_Parameters( &gi, a, b ) != 0 ) { pj_errno = PJD_ERR_GEOCENTRIC; return pj_errno; @@ -393,7 +412,7 @@ if( x[io] == HUGE_VAL ) continue; - if( pj_Convert_Geodetic_To_Geocentric( y[io], x[io], z[io], + if( pj_Convert_Geodetic_To_Geocentric( &gi, y[io], x[io], z[io], x+io, y+io, z+io ) != 0 ) { pj_errno = -14; @@ -416,13 +435,14 @@ { double b; int i; + GeocentricInfo gi; if( es == 0.0 ) b = a; else b = a * sqrt(1-es); - if( pj_Set_Geocentric_Parameters( a, b ) != 0 ) + if( pj_Set_Geocentric_Parameters( &gi, a, b ) != 0 ) { pj_errno = PJD_ERR_GEOCENTRIC; return pj_errno; @@ -435,8 +455,8 @@ if( x[io] == HUGE_VAL ) continue; - pj_Convert_Geocentric_To_Geodetic( x[io], y[io], z[io], - y+io, x+io, z+io ); + pj_Convert_Geocentric_To_Geodetic( &gi, x[io], y[io], z[io], + y+io, x+io, z+io ); } return 0; @@ -456,8 +476,8 @@ { return 0; } - else if( srcdefn->a != dstdefn->a - || ABS(srcdefn->es - dstdefn->es) > 0.000000000050 ) + else if( srcdefn->a_orig != dstdefn->a_orig + || ABS(srcdefn->es_orig - dstdefn->es_orig) > 0.000000000050 ) { /* the tolerence for es is to ensure that GRS80 and WGS84 are considered identical */ @@ -590,6 +610,10 @@ /************************************************************************/ /* pj_datum_transform() */ +/* */ +/* The input should be long/lat/z coordinates in radians in the */ +/* source datum, and the output should be long/lat/z */ +/* coordinates in radians in the destination datum. */ /************************************************************************/ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn, @@ -603,16 +627,26 @@ pj_errno = 0; /* -------------------------------------------------------------------- */ +/* We cannot do any meaningful datum transformation if either */ +/* the source or destination are of an unknown datum type */ +/* (ie. only a +ellps declaration, no +datum). This is new */ +/* behavior for PROJ 4.6.0. */ +/* -------------------------------------------------------------------- */ + if( srcdefn->datum_type == PJD_UNKNOWN + || dstdefn->datum_type == PJD_UNKNOWN ) + return 0; + +/* -------------------------------------------------------------------- */ /* Short cut if the datums are identical. */ /* -------------------------------------------------------------------- */ if( pj_compare_datums( srcdefn, dstdefn ) ) return 0; - src_a = srcdefn->a; - src_es = srcdefn->es; + src_a = srcdefn->a_orig; + src_es = srcdefn->es_orig; - dst_a = dstdefn->a; - dst_es = dstdefn->es; + dst_a = dstdefn->a_orig; + dst_es = dstdefn->es_orig; /* -------------------------------------------------------------------- */ /* Create a temporary Z array if one is not provided. */ Modified: trunk/toolkits/basemap/src/pj_utils.c =================================================================== --- trunk/toolkits/basemap/src/pj_utils.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/pj_utils.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_utils.c,v 1.4 2005/07/06 14:04:09 fwarmerdam Exp $ + * $Id: pj_utils.c,v 1.5 2007/03/12 14:05:35 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Some utility functions we don't want to bother putting in @@ -29,6 +29,9 @@ ****************************************************************************** * * $Log: pj_utils.c,v $ + * Revision 1.5 2007/03/12 14:05:35 fwarmerdam + * Removed duplicate towgs84 definition code. + * * Revision 1.4 2005/07/06 14:04:09 fwarmerdam * Improved precision of es encoding for pj_latlong_from_proj() per: * http://bugzilla.remotesensing.org/show_bug.cgi?id=881 @@ -135,10 +138,6 @@ sprintf( defn+strlen(defn), " +towgs84=%s", pj_param(pj_in->params,"stowgs84").s ); - if( pj_param(pj_in->params, "ttowgs84").i ) - sprintf( defn+strlen(defn), " +towgs84=%s", - pj_param(pj_in->params,"stowgs84").s ); - if( pj_param(pj_in->params, "tnadgrids").i ) sprintf( defn+strlen(defn), " +nadgrids=%s", pj_param(pj_in->params,"snadgrids").s ); Modified: trunk/toolkits/basemap/src/proj_api.h =================================================================== --- trunk/toolkits/basemap/src/proj_api.h 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/proj_api.h 2007-12-28 19:44:55 UTC (rev 4794) @@ -28,6 +28,12 @@ ****************************************************************************** * * $Log: proj_api.h,v $ + * Revision 1.16 2007/11/29 21:07:49 fwarmerdam + * prepare for 4.6.0 release + * + * Revision 1.15 2007/08/20 13:40:06 fwarmerdam + * avoid warnings in c++ for some prototypes + * * Revision 1.14 2006/04/20 04:19:59 fwarmerdam * updated version * @@ -86,7 +92,7 @@ #endif /* Try to update this every version! */ -#define PJ_VERSION 450 +#define PJ_VERSION 460 extern char const pj_release[]; /* global release id string */ @@ -126,7 +132,7 @@ int pj_apply_gridshift( const char *, int, long point_count, int point_offset, double *x, double *y, double *z ); -void pj_deallocate_grids(); +void pj_deallocate_grids(void); int pj_is_latlong(projPJ); int pj_is_geocent(projPJ); void pj_pr_list(projPJ); @@ -140,8 +146,8 @@ void *pj_malloc(size_t); void pj_dalloc(void *); char *pj_strerrno(int); -int *pj_get_errno_ref(); -const char *pj_get_release(); +int *pj_get_errno_ref(void); +const char *pj_get_release(void); #ifdef __cplusplus } Modified: trunk/toolkits/basemap/src/projects.h =================================================================== --- trunk/toolkits/basemap/src/projects.h 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/projects.h 2007-12-28 19:44:55 UTC (rev 4794) @@ -28,6 +28,21 @@ ****************************************************************************** * * $Log: projects.h,v $ + * Revision 1.27 2007/11/26 00:21:59 fwarmerdam + * Modified PJ structure to hold a_orig, es_orig, ellipsoid definition before + * adjustment for spherical projections. + * Modified pj_datum_transform() to use the original ellipsoid parameters, + * not the ones adjusted for spherical projections. + * Modified pj_datum_transform() to not attempt any datum shift via + * geocentric coordinates if the source *or* destination are raw ellipsoids + * (ie. PJD_UNKNOWN). All per PROJ bug #1602, GDAL bug #2025. + * + * Revision 1.26 2007/03/11 17:03:18 fwarmerdam + * support drive letter prefixes on win32 and related fixes (bug 1499) + * + * Revision 1.25 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.24 2006/10/18 04:34:03 fwarmerdam * added mlist functions from libproj4 * @@ -149,6 +164,15 @@ extern double hypot(double, double); #endif +#ifdef _WIN32_WCE +# include <wce_stdlib.h> +# include <wce_stdio.h> +# define rewind wceex_rewind +# define getenv wceex_getenv +# define strdup _strdup +# define hypot _hypot +#endif + /* some useful constants */ #define HALFPI 1.5707963267948966 #define FORTPI 0.78539816339744833 @@ -164,8 +188,17 @@ #define ID_TAG_MAX 50 #endif +/* Use WIN32 as a standard windows 32 bit declaration */ +#if defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) +# define WIN32 +#endif + +#if defined(_WINDOWS) && !defined(WIN32) && !defined(_WIN32_WCE) +# define WIN32 +#endif + /* directory delimiter for DOS support */ -#ifdef DOS +#ifdef WIN32 #define DIR_CHAR '\\' #else #define DIR_CHAR '/' @@ -265,8 +298,10 @@ int is_geocent; /* proj=geocent ... not really a projection at all */ double a, /* major axis or radius if es==0 */ + a_orig, /* major axis before any +proj related adjustment */ + es, /* e ^ 2 */ + es_orig, /* es before any +proj related adjustment */ e, /* eccentricity */ - es, /* e ^ 2 */ ra, /* 1/A */ one_es, /* 1 - e^2 */ rone_es, /* 1/one_es */ @@ -274,7 +309,7 @@ x0, y0, /* easting and northing */ k0, /* general scaling factor */ to_meter, fr_meter; /* cartesian scaling */ - + int datum_type; /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */ double datum_params[7]; double from_greenwich; /* prime meridian offset (in radians) */ Modified: trunk/toolkits/basemap/src/rtodms.c =================================================================== --- trunk/toolkits/basemap/src/rtodms.c 2007-12-27 13:05:41 UTC (rev 4793) +++ trunk/toolkits/basemap/src/rtodms.c 2007-12-28 19:44:55 UTC (rev 4794) @@ -53,7 +53,9 @@ sec = fmod(r / RES, 60.); r = floor(r / RES60); min = fmod(r, 60.); - deg = r / 60.; + r = floor(r / 60.); + deg = r; + if (dolong) (void)sprintf(ss,format,deg,min,sec,sign); else if (sec) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-12-28 20:04:38
|
Revision: 4795 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4795&view=rev Author: jswhit Date: 2007-12-28 12:04:31 -0800 (Fri, 28 Dec 2007) Log Message: ----------- revert the update to proj 4.6.0 Modified Paths: -------------- trunk/toolkits/basemap/src/PJ_gn_sinu.c trunk/toolkits/basemap/src/PJ_krovak.c trunk/toolkits/basemap/src/PJ_laea.c trunk/toolkits/basemap/src/PJ_wag3.c trunk/toolkits/basemap/src/emess.c trunk/toolkits/basemap/src/geocent.c trunk/toolkits/basemap/src/geocent.h trunk/toolkits/basemap/src/geod.c trunk/toolkits/basemap/src/nad_init.c trunk/toolkits/basemap/src/pj_datum_set.c trunk/toolkits/basemap/src/pj_factors.c trunk/toolkits/basemap/src/pj_gridinfo.c trunk/toolkits/basemap/src/pj_gridlist.c trunk/toolkits/basemap/src/pj_init.c trunk/toolkits/basemap/src/pj_latlong.c trunk/toolkits/basemap/src/pj_list.h trunk/toolkits/basemap/src/pj_open_lib.c trunk/toolkits/basemap/src/pj_release.c trunk/toolkits/basemap/src/pj_transform.c trunk/toolkits/basemap/src/pj_utils.c trunk/toolkits/basemap/src/proj_api.h trunk/toolkits/basemap/src/projects.h trunk/toolkits/basemap/src/rtodms.c Modified: trunk/toolkits/basemap/src/PJ_gn_sinu.c =================================================================== --- trunk/toolkits/basemap/src/PJ_gn_sinu.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/PJ_gn_sinu.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -75,6 +75,7 @@ if (!(P->en = pj_enfn(P->es))) E_ERROR_0; if (P->es) { + P->en = pj_enfn(P->es); P->inv = e_inverse; P->fwd = e_forward; } else { Modified: trunk/toolkits/basemap/src/PJ_krovak.c =================================================================== --- trunk/toolkits/basemap/src/PJ_krovak.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/PJ_krovak.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: PJ_krovak.c,v 1.9 2007/03/07 17:32:32 fwarmerdam Exp $ + * $Id: PJ_krovak.c,v 1.6 2006/09/14 13:10:50 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Implementation of the krovak (Krovak) projection. @@ -30,15 +30,6 @@ ****************************************************************************** * * $Log: PJ_krovak.c,v $ - * Revision 1.9 2007/03/07 17:32:32 fwarmerdam - * remove orphan semicolon. - * - * Revision 1.8 2007/03/07 17:28:08 fwarmerdam - * Make it reasonably clear that this is ellipsoidal in the code. - * - * Revision 1.7 2007/03/07 17:25:34 fwarmerdam - * report krovak as ellipsoidal, not spherical - * * Revision 1.6 2006/09/14 13:10:50 fwarmerdam * Add +czech flag to control reversal of signs (bug 1133,147) * @@ -64,9 +55,9 @@ #include <string.h> #include <stdio.h> -PJ_CVSID("$Id: PJ_krovak.c,v 1.9 2007/03/07 17:32:32 fwarmerdam Exp $"); +PJ_CVSID("$Id: PJ_krovak.c,v 1.6 2006/09/14 13:10:50 fwarmerdam Exp $"); -PROJ_HEAD(krovak, "Krovak") "\n\tPCyl., Ellps."; +PROJ_HEAD(krovak, "Krovak") "\n\tPCyl., Sph."; /** NOTES: According to EPSG the full Krovak projection method should have @@ -93,7 +84,7 @@ -FORWARD(e_forward); /* ellipsoid */ +FORWARD(s_forward); /* spheroid */ /* calculate xy from lat/lon */ char errmess[255]; @@ -162,7 +153,7 @@ -INVERSE(e_inverse); /* ellipsoid */ +INVERSE(s_inverse); /* spheroid */ /* calculate lat/lon from xy */ /* Constants, identisch wie in der Umkehrfunktion */ @@ -267,14 +258,15 @@ /* as input and output, instead of lat/long relative to Ferro */ if (!pj_param(P->params, "tlon_0").i) P->lam0 = 0.7417649320975901 - 0.308341501185665; +; /* if scale not set default to 0.9999 */ if (!pj_param(P->params, "tk").i) P->k0 = 0.9999; /* always the same */ - P->inv = e_inverse; - P->fwd = e_forward; + P->inv = s_inverse; + P->fwd = s_forward; ENDENTRY(P) Modified: trunk/toolkits/basemap/src/PJ_laea.c =================================================================== --- trunk/toolkits/basemap/src/PJ_laea.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/PJ_laea.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -179,14 +179,8 @@ 0. : atan2(xy.x, xy.y); return (lp); } -FREEUP; - if (P) { - if (P->apa) - pj_dalloc(P->apa); - pj_dalloc(P); - } -} -ENTRY1(laea,apa) +FREEUP; if (P) pj_dalloc(P); } +ENTRY0(laea) double t; if (fabs((t = fabs(P->phi0)) - HALFPI) < EPS10) Modified: trunk/toolkits/basemap/src/PJ_wag3.c =================================================================== --- trunk/toolkits/basemap/src/PJ_wag3.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/PJ_wag3.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -5,7 +5,7 @@ double C_x; #define PJ_LIB__ # include <projects.h> -PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph.\n\tlat_ts="; +PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph."; #define TWOTHIRD 0.6666666666666666666667 FORWARD(s_forward); /* spheroid */ xy.x = P->C_x * lp.lam * cos(TWOTHIRD * lp.phi); Modified: trunk/toolkits/basemap/src/emess.c =================================================================== --- trunk/toolkits/basemap/src/emess.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/emess.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -3,15 +3,6 @@ static const char SCCSID[]="@(#)emess.c 4.6 94/05/24 GIE REL"; #endif -#ifdef _MSC_VER -# ifndef _CRT_SECURE_NO_DEPRECATE -# define _CRT_SECURE_NO_DEPRECATE -# endif -# ifndef _CRT_NONSTDC_NO_DEPRECATE -# define _CRT_NONSTDC_NO_DEPRECATE -# endif -#endif - #include <stdio.h> #include <stdlib.h> #include <stdarg.h> Modified: trunk/toolkits/basemap/src/geocent.c =================================================================== --- trunk/toolkits/basemap/src/geocent.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/geocent.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -65,9 +65,6 @@ * 25-02-97 Original Code * * $Log: geocent.c,v $ - * Revision 1.7 2007/09/11 20:19:36 fwarmerdam - * avoid use of static variables to make reentrant - * * Revision 1.6 2006/01/12 22:29:01 fwarmerdam * make geocent.c globals static to avoid conflicts * @@ -112,11 +109,29 @@ /***************************************************************************/ /* + * GLOBAL DECLARATIONS + */ +/* Ellipsoid parameters, default to WGS 84 */ +static double Geocent_a = 6378137.0; /* Semi-major axis of ellipsoid in meters */ +static double Geocent_b = 6356752.3142; /* Semi-minor axis of ellipsoid */ + +static double Geocent_a2 = 40680631590769.0; /* Square of semi-major axis */ +static double Geocent_b2 = 40408299984087.05; /* Square of semi-minor axis */ +static double Geocent_e2 = 0.0066943799901413800; /* Eccentricity squared */ +static double Geocent_ep2 = 0.00673949675658690300; /* 2nd eccentricity squared */ +/* + * These state variables are for optimization purposes. The only function + * that should modify them is Set_Geocentric_Parameters. + */ + + +/***************************************************************************/ +/* * FUNCTIONS */ -long pj_Set_Geocentric_Parameters (GeocentricInfo *gi, double a, double b) +long pj_Set_Geocentric_Parameters (double a, double b) { /* BEGIN Set_Geocentric_Parameters */ /* @@ -126,30 +141,29 @@ * a : Semi-major axis, in meters. (input) * b : Semi-minor axis, in meters. (input) */ - long Error_Code = GEOCENT_NO_ERROR; + long Error_Code = GEOCENT_NO_ERROR; - if (a <= 0.0) - Error_Code |= GEOCENT_A_ERROR; - if (b <= 0.0) - Error_Code |= GEOCENT_B_ERROR; - if (a < b) - Error_Code |= GEOCENT_A_LESS_B_ERROR; - if (!Error_Code) - { - gi->Geocent_a = a; - gi->Geocent_b = b; - gi->Geocent_a2 = a * a; - gi->Geocent_b2 = b * b; - gi->Geocent_e2 = (gi->Geocent_a2 - gi->Geocent_b2) / gi->Geocent_a2; - gi->Geocent_ep2 = (gi->Geocent_a2 - gi->Geocent_b2) / gi->Geocent_b2; - } - return (Error_Code); + if (a <= 0.0) + Error_Code |= GEOCENT_A_ERROR; + if (b <= 0.0) + Error_Code |= GEOCENT_B_ERROR; + if (a < b) + Error_Code |= GEOCENT_A_LESS_B_ERROR; + if (!Error_Code) + { + Geocent_a = a; + Geocent_b = b; + Geocent_a2 = a * a; + Geocent_b2 = b * b; + Geocent_e2 = (Geocent_a2 - Geocent_b2) / Geocent_a2; + Geocent_ep2 = (Geocent_a2 - Geocent_b2) / Geocent_b2; + } + return (Error_Code); } /* END OF Set_Geocentric_Parameters */ -void pj_Get_Geocentric_Parameters (GeocentricInfo *gi, - double *a, - double *b) +void pj_Get_Geocentric_Parameters (double *a, + double *b) { /* BEGIN Get_Geocentric_Parameters */ /* * The function Get_Geocentric_Parameters returns the ellipsoid parameters @@ -159,18 +173,17 @@ * b : Semi-minor axis, in meters. (output) */ - *a = gi->Geocent_a; - *b = gi->Geocent_b; + *a = Geocent_a; + *b = Geocent_b; } /* END OF Get_Geocentric_Parameters */ -long pj_Convert_Geodetic_To_Geocentric (GeocentricInfo *gi, - double Latitude, - double Longitude, - double Height, - double *X, - double *Y, - double *Z) +long pj_Convert_Geodetic_To_Geocentric (double Latitude, + double Longitude, + double Height, + double *X, + double *Y, + double *Z) { /* BEGIN Convert_Geodetic_To_Geocentric */ /* * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates @@ -212,10 +225,10 @@ Sin_Lat = sin(Latitude); Cos_Lat = cos(Latitude); Sin2_Lat = Sin_Lat * Sin_Lat; - Rn = gi->Geocent_a / (sqrt(1.0e0 - gi->Geocent_e2 * Sin2_Lat)); + Rn = Geocent_a / (sqrt(1.0e0 - Geocent_e2 * Sin2_Lat)); *X = (Rn + Height) * Cos_Lat * cos(Longitude); *Y = (Rn + Height) * Cos_Lat * sin(Longitude); - *Z = ((Rn * (1 - gi->Geocent_e2)) + Height) * Sin_Lat; + *Z = ((Rn * (1 - Geocent_e2)) + Height) * Sin_Lat; } return (Error_Code); @@ -236,13 +249,12 @@ #define USE_ITERATIVE_METHOD -void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi, - double X, - double Y, - double Z, - double *Latitude, - double *Longitude, - double *Height) +void pj_Convert_Geocentric_To_Geodetic (double X, + double Y, + double Z, + double *Latitude, + double *Longitude, + double *Height) { /* BEGIN Convert_Geocentric_To_Geodetic */ #if !defined(USE_ITERATIVE_METHOD) /* @@ -309,12 +321,12 @@ Sin_B0 = T0 / S0; Cos_B0 = W / S0; Sin3_B0 = Sin_B0 * Sin_B0 * Sin_B0; - T1 = Z + gi->Geocent_b * gi->Geocent_ep2 * Sin3_B0; - Sum = W - gi->Geocent_a * gi->Geocent_e2 * Cos_B0 * Cos_B0 * Cos_B0; + T1 = Z + Geocent_b * Geocent_ep2 * Sin3_B0; + Sum = W - Geocent_a * Geocent_e2 * Cos_B0 * Cos_B0 * Cos_B0; S1 = sqrt(T1*T1 + Sum * Sum); Sin_p1 = T1 / S1; Cos_p1 = Sum / S1; - Rn = gi->Geocent_a / sqrt(1.0 - gi->Geocent_e2 * Sin_p1 * Sin_p1); + Rn = Geocent_a / sqrt(1.0 - Geocent_e2 * Sin_p1 * Sin_p1); if (Cos_p1 >= COS_67P5) { *Height = W / Cos_p1 - Rn; @@ -325,7 +337,7 @@ } else { - *Height = Z / Sin_p1 + Rn * (gi->Geocent_e2 - 1.0); + *Height = Z / Sin_p1 + Rn * (Geocent_e2 - 1.0); } if (At_Pole == FALSE) { @@ -389,7 +401,7 @@ RR = sqrt(X*X+Y*Y+Z*Z); /* special cases for latitude and longitude */ - if (P/gi->Geocent_a < genau) { + if (P/Geocent_a < genau) { /* special case, if P=0. (X=0., Y=0.) */ At_Pole = TRUE; @@ -397,9 +409,9 @@ /* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis * of ellipsoid (=center of mass), Latitude becomes PI/2 */ - if (RR/gi->Geocent_a < genau) { + if (RR/Geocent_a < genau) { *Latitude = PI_OVER_2; - *Height = -gi->Geocent_b; + *Height = -Geocent_b; return ; } @@ -421,8 +433,8 @@ */ CT = Z/RR; ST = P/RR; - RX = 1.0/sqrt(1.0-gi->Geocent_e2*(2.0-gi->Geocent_e2)*ST*ST); - CPHI0 = ST*(1.0-gi->Geocent_e2)*RX; + RX = 1.0/sqrt(1.0-Geocent_e2*(2.0-Geocent_e2)*ST*ST); + CPHI0 = ST*(1.0-Geocent_e2)*RX; SPHI0 = CT*RX; iter = 0; @@ -431,12 +443,12 @@ do { iter++; - RN = gi->Geocent_a/sqrt(1.0-gi->Geocent_e2*SPHI0*SPHI0); + RN = Geocent_a/sqrt(1.0-Geocent_e2*SPHI0*SPHI0); /* ellipsoidal (geodetic) height */ - *Height = P*CPHI0+Z*SPHI0-RN*(1.0-gi->Geocent_e2*SPHI0*SPHI0); + *Height = P*CPHI0+Z*SPHI0-RN*(1.0-Geocent_e2*SPHI0*SPHI0); - RK = gi->Geocent_e2*RN/(RN+*Height); + RK = Geocent_e2*RN/(RN+*Height); RX = 1.0/sqrt(1.0-RK*(2.0-RK)*ST*ST); CPHI = ST*(1.0-RK)*RX; SPHI = CT*RX; Modified: trunk/toolkits/basemap/src/geocent.h =================================================================== --- trunk/toolkits/basemap/src/geocent.h 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/geocent.h 2007-12-28 20:04:31 UTC (rev 4795) @@ -92,21 +92,9 @@ extern "C" { #endif -typedef struct -{ - double Geocent_a; /* Semi-major axis of ellipsoid in meters */ - double Geocent_b; /* Semi-minor axis of ellipsoid */ - double Geocent_a2; /* Square of semi-major axis */ - double Geocent_b2; /* Square of semi-minor axis */ - double Geocent_e2; /* Eccentricity squared */ - double Geocent_ep2; /* 2nd eccentricity squared */ -} GeocentricInfo; -void pj_Init_Geocentric( GeocentricInfo *gi ); -long pj_Set_Geocentric_Parameters( GeocentricInfo *gi, - double a, - double b); - + long pj_Set_Geocentric_Parameters (double a, + double b); /* * The function Set_Geocentric_Parameters receives the ellipsoid parameters * as inputs and sets the corresponding state variables. @@ -116,10 +104,8 @@ */ -void pj_Get_Geocentric_Parameters ( GeocentricInfo *gi, - double *a, - double *b); - + void pj_Get_Geocentric_Parameters (double *a, + double *b); /* * The function Get_Geocentric_Parameters returns the ellipsoid parameters * to be used in geocentric coordinate conversions. @@ -129,13 +115,12 @@ */ -long pj_Convert_Geodetic_To_Geocentric ( GeocentricInfo *gi, - double Latitude, - double Longitude, - double Height, - double *X, - double *Y, - double *Z); + long pj_Convert_Geodetic_To_Geocentric (double Latitude, + double Longitude, + double Height, + double *X, + double *Y, + double *Z); /* * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z), @@ -151,13 +136,12 @@ */ -void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi, - double X, - double Y, - double Z, - double *Latitude, - double *Longitude, - double *Height); + void pj_Convert_Geocentric_To_Geodetic (double X, + double Y, + double Z, + double *Latitude, + double *Longitude, + double *Height); /* * The function Convert_Geocentric_To_Geodetic converts geocentric * coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude, Modified: trunk/toolkits/basemap/src/geod.c =================================================================== --- trunk/toolkits/basemap/src/geod.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/geod.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -2,11 +2,11 @@ static const char SCCSID[]="@(#)geod.c 4.8 95/09/23 GIE REL"; #endif /* <<<< Geodesic filter program >>>> */ +# include <ctype.h> +# include <stdio.h> # include "projects.h" # include "geodesic.h" # include "emess.h" -# include <ctype.h> -# include <stdio.h> # include <string.h> # define MAXLINE 200 Modified: trunk/toolkits/basemap/src/nad_init.c =================================================================== --- trunk/toolkits/basemap/src/nad_init.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/nad_init.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: nad_init.c,v 1.10 2007/09/11 20:16:33 fwarmerdam Exp $ + * $Id: nad_init.c,v 1.8 2003/03/17 18:56:01 warmerda Exp $ * * Project: PROJ.4 * Purpose: Load datum shift files into memory. @@ -28,12 +28,6 @@ ****************************************************************************** * * $Log: nad_init.c,v $ - * Revision 1.10 2007/09/11 20:16:33 fwarmerdam - * Improve error recovery if ctable datum shift files fails to load. - * - * Revision 1.9 2006/11/17 22:16:30 mloskot - * Uploaded PROJ.4 port for Windows CE. - * * Revision 1.8 2003/03/17 18:56:01 warmerda * implement delayed loading of ctable format files * @@ -59,18 +53,9 @@ #include <projects.h> #include <stdio.h> #include <errno.h> +#include <assert.h> #include <string.h> -#ifdef _WIN32_WCE -/* assert.h includes all Windows API headers and causes 'LP' name clash. - * Here assert we disable assert() for Windows CE. - * TODO - mloskot: re-implement porting friendly assert - */ -# define assert(exp) ((void)0) -#else -# include <assert.h> -#endif /* _WIN32_WCE */ - /************************************************************************/ /* nad_ctable_load() */ /* */ @@ -90,15 +75,6 @@ if( ct->cvs == NULL || fread(ct->cvs, sizeof(FLP), a_size, fid) != a_size ) { - pj_dalloc( ct->cvs ); - ct->cvs = NULL; - - if( getenv("PROJ_DEBUG") != NULL ) - { - fprintf( stderr, - "ctable loading failed on fread() - binary incompatible?\n" ); - } - pj_errno = -38; return 0; } Modified: trunk/toolkits/basemap/src/pj_datum_set.c =================================================================== --- trunk/toolkits/basemap/src/pj_datum_set.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_datum_set.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_datum_set.c,v 1.4 2007/11/29 21:06:50 fwarmerdam Exp $ + * $Id: pj_datum_set.c,v 1.2 2001/04/04 21:13:21 warmerda Exp $ * * Project: PROJ.4 * Purpose: Apply datum definition to PJ structure from initialization string. @@ -28,12 +28,6 @@ ****************************************************************************** * * $Log: pj_datum_set.c,v $ - * Revision 1.4 2007/11/29 21:06:50 fwarmerdam - * make sure we only look for 7 parameters - * - * Revision 1.3 2007/01/31 06:41:01 fwarmerdam - * dont parse more datum parameters than we have room for in datum_params[] - * * Revision 1.2 2001/04/04 21:13:21 warmerda * do arcsecond/radian and ppm datum parm transformation in pj_set_datum() * @@ -119,7 +113,7 @@ /* parse out the parameters */ s = towgs84; - for( s = towgs84; *s != '\0' && parm_count < 7; ) + for( s = towgs84; *s != '\0'; ) { projdef->datum_params[parm_count++] = atof(s); while( *s != '\0' && *s != ',' ) Modified: trunk/toolkits/basemap/src/pj_factors.c =================================================================== --- trunk/toolkits/basemap/src/pj_factors.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_factors.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -20,16 +20,15 @@ return 1; } else { /* proceed */ errno = pj_errno = 0; - if (h < EPS) - h = DEFAULT_H; - if (fabs(lp.phi) > (HALFPI - h)) - /* adjust to value around pi/2 where derived still exists*/ - lp.phi = lp.phi < 0. ? (-HALFPI+h) : (HALFPI-h); + if (fabs(t) <= EPS) /* adjust to pi/2 */ + lp.phi = lp.phi < 0. ? -HALFPI : HALFPI; else if (P->geoc) lp.phi = atan(P->rone_es * tan(lp.phi)); lp.lam -= P->lam0; /* compute del lp.lam */ if (!P->over) lp.lam = adjlon(lp.lam); /* adjust del longitude */ + if (h <= 0.) + h = DEFAULT_H; if (P->spc) /* get what projection analytic values */ P->spc(lp, P, fac); if (((fac->code & (IS_ANAL_XL_YL+IS_ANAL_XP_YP)) != Modified: trunk/toolkits/basemap/src/pj_gridinfo.c =================================================================== --- trunk/toolkits/basemap/src/pj_gridinfo.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_gridinfo.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_gridinfo.c,v 1.8 2006/11/17 22:16:30 mloskot Exp $ + * $Id: pj_gridinfo.c,v 1.7 2005/07/07 00:16:03 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Functions for handling individual PJ_GRIDINFO's. Includes @@ -29,9 +29,6 @@ ****************************************************************************** * * $Log: pj_gridinfo.c,v $ - * Revision 1.8 2006/11/17 22:16:30 mloskot - * Uploaded PROJ.4 port for Windows CE. - * * Revision 1.7 2005/07/07 00:16:03 fwarmerdam * Fixed debug fprintf syntax per: * http://bugzilla.remotesensing.org/show_bug.cgi?id=886 @@ -62,17 +59,8 @@ #include <string.h> #include <math.h> #include <errno.h> +#include <assert.h> -#ifdef _WIN32_WCE -/* assert.h includes all Windows API headers and causes 'LP' name clash. - * Here assert we disable assert() for Windows CE. - * TODO - mloskot: re-implement porting friendly assert - */ -# define assert(exp) ((void)0) -#else -# include <assert.h> -#endif /* _WIN32_WCE */ - /************************************************************************/ /* swap_words() */ /* */ Modified: trunk/toolkits/basemap/src/pj_gridlist.c =================================================================== --- trunk/toolkits/basemap/src/pj_gridlist.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_gridlist.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_gridlist.c,v 1.5 2006/11/17 22:16:30 mloskot Exp $ + * $Id: pj_gridlist.c,v 1.4 2005/11/01 05:56:13 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Code to manage the list of currently loaded (cached) PJ_GRIDINFOs @@ -29,9 +29,6 @@ ****************************************************************************** * * $Log: pj_gridlist.c,v $ - * Revision 1.5 2006/11/17 22:16:30 mloskot - * Uploaded PROJ.4 port for Windows CE. - * * Revision 1.4 2005/11/01 05:56:13 fwarmerdam * improved error handling if gridcount is zero * @@ -51,17 +48,8 @@ #include <projects.h> #include <string.h> #include <math.h> +#include <assert.h> -#ifdef _WIN32_WCE -/* assert.h includes all Windows API headers and causes 'LP' name clash. - * Here assert we disable assert() for Windows CE. - * TODO - mloskot: re-implement porting friendly assert - */ -# define assert(exp) ((void)0) -#else -# include <assert.h> -#endif /* _WIN32_WCE */ - static PJ_GRIDINFO *grid_list = NULL; /* used only by pj_load_nadgrids() and pj_deallocate_grids() */ Modified: trunk/toolkits/basemap/src/pj_init.c =================================================================== --- trunk/toolkits/basemap/src/pj_init.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_init.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_init.c,v 1.19 2007/11/26 00:21:59 fwarmerdam Exp $ + * $Id: pj_init.c,v 1.18 2006/10/12 21:04:39 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Initialize projection object from string definition. Includes @@ -30,15 +30,6 @@ ****************************************************************************** * * $Log: pj_init.c,v $ - * Revision 1.19 2007/11/26 00:21:59 fwarmerdam - * Modified PJ structure to hold a_orig, es_orig, ellipsoid definition before - * adjustment for spherical projections. - * Modified pj_datum_transform() to use the original ellipsoid parameters, - * not the ones adjusted for spherical projections. - * Modified pj_datum_transform() to not attempt any datum shift via - * geocentric coordinates if the source *or* destination are raw ellipsoids - * (ie. PJD_UNKNOWN). All per PROJ bug #1602, GDAL bug #2025. - * * Revision 1.18 2006/10/12 21:04:39 fwarmerdam * Added experimental +lon_wrap argument to set a "center point" for * longitude wrapping of longitude values coming out of pj_transform(). @@ -82,7 +73,7 @@ #include <string.h> #include <errno.h> -PJ_CVSID("$Id: pj_init.c,v 1.19 2007/11/26 00:21:59 fwarmerdam Exp $"); +PJ_CVSID("$Id: pj_init.c,v 1.18 2006/10/12 21:04:39 fwarmerdam Exp $"); extern FILE *pj_open_lib(char *, char *); @@ -291,9 +282,6 @@ /* set ellipsoid/sphere parameters */ if (pj_ell_set(start, &PIN->a, &PIN->es)) goto bum_call; - PIN->a_orig = PIN->a; - PIN->es_orig = PIN->es; - PIN->e = sqrt(PIN->es); PIN->ra = 1. / PIN->a; PIN->one_es = 1. - PIN->es; Modified: trunk/toolkits/basemap/src/pj_latlong.c =================================================================== --- trunk/toolkits/basemap/src/pj_latlong.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_latlong.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_latlong.c,v 1.3 2007/11/30 20:02:31 fwarmerdam Exp $ + * $Id: pj_latlong.c,v 1.2 2000/07/07 06:04:23 warmerda Exp $ * * Project: PROJ.4 * Purpose: Stub projection implementation for lat/long coordinates. We @@ -30,9 +30,6 @@ ****************************************************************************** * * $Log: pj_latlong.c,v $ - * Revision 1.3 2007/11/30 20:02:31 fwarmerdam - * add latlon and lonlat aliases - * * Revision 1.2 2000/07/07 06:04:23 warmerda * added longlat alias * @@ -44,10 +41,8 @@ /* very loosely based upon DMA code by Bradford W. Drew */ #define PJ_LIB__ #include <projects.h> -PROJ_HEAD(lonlat, "Lat/long (Geodetic)") "\n\t"; -PROJ_HEAD(latlon, "Lat/long (Geodetic alias)") "\n\t"; -PROJ_HEAD(latlong, "Lat/long (Geodetic alias)") "\n\t"; -PROJ_HEAD(longlat, "Lat/long (Geodetic alias)") "\n\t"; +PROJ_HEAD(latlong, "Lat/long (Geodetic)") "\n\t"; +PROJ_HEAD(longlat, "Lat/long (Geodetic)") "\n\t"; FORWARD(forward); @@ -76,17 +71,3 @@ P->y0 = 0.0; P->inv = inverse; P->fwd = forward; ENDENTRY(P) - -ENTRY0(latlon) - P->is_latlong = 1; - P->x0 = 0.0; - P->y0 = 0.0; - P->inv = inverse; P->fwd = forward; -ENDENTRY(P) - -ENTRY0(lonlat) - P->is_latlong = 1; - P->x0 = 0.0; - P->y0 = 0.0; - P->inv = inverse; P->fwd = forward; -ENDENTRY(P) Modified: trunk/toolkits/basemap/src/pj_list.h =================================================================== --- trunk/toolkits/basemap/src/pj_list.h 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_list.h 2007-12-28 20:04:31 UTC (rev 4795) @@ -55,10 +55,8 @@ PROJ_HEAD(lagrng, "Lagrange") PROJ_HEAD(larr, "Larrivee") PROJ_HEAD(lask, "Laskowski") -PROJ_HEAD(lonlat, "Lat/long (Geodetic)") -PROJ_HEAD(latlon, "Lat/long (Geodetic alias)") -PROJ_HEAD(latlong, "Lat/long (Geodetic alias)") -PROJ_HEAD(longlat, "Lat/long (Geodetic alias)") +PROJ_HEAD(latlong, "Lat/long (Geodetic)") +PROJ_HEAD(longlat, "Lat/long (Geodetic)") PROJ_HEAD(lcc, "Lambert Conformal Conic") PROJ_HEAD(lcca, "Lambert Conformal Conic Alternative") PROJ_HEAD(leac, "Lambert Equal Area Conic") @@ -73,6 +71,7 @@ PROJ_HEAD(merc, "Mercator") PROJ_HEAD(mil_os, "Miller Oblated Stereographic") PROJ_HEAD(mill, "Miller Cylindrical") +PROJ_HEAD(mpoly, "Modified Polyconic") PROJ_HEAD(moll, "Mollweide") PROJ_HEAD(murd1, "Murdoch I") PROJ_HEAD(murd2, "Murdoch II") Modified: trunk/toolkits/basemap/src/pj_open_lib.c =================================================================== --- trunk/toolkits/basemap/src/pj_open_lib.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_open_lib.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_open_lib.c,v 1.9 2007/07/06 14:58:03 fwarmerdam Exp $ + * $Id: pj_open_lib.c,v 1.6 2004/09/16 15:14:01 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Implementation of pj_open_lib(), and pj_set_finder(). These @@ -31,15 +31,6 @@ ****************************************************************************** * * $Log: pj_open_lib.c,v $ - * Revision 1.9 2007/07/06 14:58:03 fwarmerdam - * improve searchpath clearning with pj_set_searchpath() - * - * Revision 1.8 2007/03/11 17:03:18 fwarmerdam - * support drive letter prefixes on win32 and related fixes (bug 1499) - * - * Revision 1.7 2006/11/17 22:16:30 mloskot - * Uploaded PROJ.4 port for Windows CE. - * * Revision 1.6 2004/09/16 15:14:01 fwarmerdam * * src/pj_open_lib.c: added pj_set_searchpath() provided by Eric Miller. * @@ -54,7 +45,7 @@ #include <string.h> #include <errno.h> -PJ_CVSID("$Id: pj_open_lib.c,v 1.9 2007/07/06 14:58:03 fwarmerdam Exp $"); +PJ_CVSID("$Id: pj_open_lib.c,v 1.6 2004/09/16 15:14:01 fwarmerdam Exp $"); static const char *(*pj_finder)(const char *) = NULL; static int path_count = 0; @@ -80,8 +71,7 @@ /* pj_set_searchpath() */ /* */ /* Path control for callers that can't practically provide */ -/* pj_set_finder() style callbacks. Call with (0,NULL) as args */ -/* to clear the searchpath set. */ +/* pj_set_finder() style callbacks. */ /************************************************************************/ void pj_set_searchpath ( int count, const char **path ) @@ -99,16 +89,13 @@ search_path = NULL; } - if( count > 0 ) + search_path = pj_malloc(sizeof *search_path * count); + for (i = 0; i < count; i++) { - search_path = pj_malloc(sizeof *search_path * count); - for (i = 0; i < count; i++) - { - search_path[i] = pj_malloc(strlen(path[i]) + 1); - strcpy(search_path[i], path[i]); - } + search_path[i] = pj_malloc(strlen(path[i]) + 1); + strcpy(search_path[i], path[i]); } - + path_count = count; } @@ -123,16 +110,9 @@ FILE *fid; int n = 0; int i; -#ifdef WIN32 - static const char dir_chars[] = "/\\"; -#else - static const char dir_chars[] = "/"; -#endif -#ifndef _WIN32_WCE - /* check if ~/name */ - if (*name == '~' && strchr(dir_chars,name[1]) ) + if (*name == '~' && name[1] == DIR_CHAR) if (sysname = getenv("HOME")) { (void)strcpy(fname, sysname); fname[n = strlen(fname)] = DIR_CHAR; @@ -143,10 +123,8 @@ return NULL; /* or fixed path: /name, ./name or ../name */ - else if (strchr(dir_chars,*name) - || (*name == '.' && strchr(dir_chars,name[1])) - || (!strncmp(name, "..", 2) && strchr(dir_chars,name[2])) - || (name[1] == ':' && strchr(dir_chars,name[2])) ) + else if (*name == DIR_CHAR || (*name == '.' && name[1] == DIR_CHAR) || + (!strncmp(name, "..", 2) && name[2] == DIR_CHAR) ) sysname = name; /* or try to use application provided file finder */ @@ -185,7 +163,4 @@ fid == NULL ? "failed" : "succeeded" ); return(fid); -#else - return NULL; -#endif /* _WIN32_WCE */ } Modified: trunk/toolkits/basemap/src/pj_release.c =================================================================== --- trunk/toolkits/basemap/src/pj_release.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_release.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -2,7 +2,7 @@ #include <projects.h> -char const pj_release[]="Rel. 4.6.0, 21 Dec 2007"; +char const pj_release[]="Rel. 4.5.0, 22 Oct 2006"; const char *pj_get_release() Modified: trunk/toolkits/basemap/src/pj_transform.c =================================================================== --- trunk/toolkits/basemap/src/pj_transform.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_transform.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_transform.c,v 1.24 2007/12/03 15:48:20 fwarmerdam Exp $ + * $Id: pj_transform.c,v 1.20 2006/10/12 21:04:39 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Perform overall coordinate system to coordinate system @@ -30,24 +30,6 @@ ****************************************************************************** * * $Log: pj_transform.c,v $ - * Revision 1.24 2007/12/03 15:48:20 fwarmerdam - * Improve WGS84 ES precision to avoid unnecesary transformation (#1531) - * - * Revision 1.23 2007/11/26 00:21:59 fwarmerdam - * Modified PJ structure to hold a_orig, es_orig, ellipsoid definition before - * adjustment for spherical projections. - * Modified pj_datum_transform() to use the original ellipsoid parameters, - * not the ones adjusted for spherical projections. - * Modified pj_datum_transform() to not attempt any datum shift via - * geocentric coordinates if the source *or* destination are raw ellipsoids - * (ie. PJD_UNKNOWN). All per PROJ bug #1602, GDAL bug #2025. - * - * Revision 1.22 2007/09/11 20:32:25 fwarmerdam - * mark the transient error array const - * - * Revision 1.21 2007/09/11 20:19:36 fwarmerdam - * avoid use of static variables to make reentrant - * * Revision 1.20 2006/10/12 21:04:39 fwarmerdam * Added experimental +lon_wrap argument to set a "center point" for * longitude wrapping of longitude values coming out of pj_transform(). @@ -128,14 +110,14 @@ #include <math.h> #include "geocent.h" -PJ_CVSID("$Id: pj_transform.c,v 1.24 2007/12/03 15:48:20 fwarmerdam Exp $"); +PJ_CVSID("$Id: pj_transform.c,v 1.20 2006/10/12 21:04:39 fwarmerdam Exp $"); #ifndef SRS_WGS84_SEMIMAJOR #define SRS_WGS84_SEMIMAJOR 6378137.0 #endif #ifndef SRS_WGS84_ESQUARED -#define SRS_WGS84_ESQUARED 0.0066943799901413165 +#define SRS_WGS84_ESQUARED 0.006694379990 #endif #define Dx_BF (defn->datum_params[0]) @@ -157,7 +139,7 @@ ** list or something, but while experimenting with it this should be fine. */ -static const int transient_error[45] = { +static int transient_error[45] = { /* 0 1 2 3 4 5 6 7 8 9 */ /* 0 to 9 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 to 19 */ 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, @@ -209,7 +191,7 @@ } } - if( pj_geocentric_to_geodetic( srcdefn->a_orig, srcdefn->es_orig, + if( pj_geocentric_to_geodetic( srcdefn->a, srcdefn->es, point_count, point_offset, x, y, z ) != 0) return pj_errno; @@ -306,7 +288,7 @@ return PJD_ERR_GEOCENTRIC; } - pj_geodetic_to_geocentric( dstdefn->a_orig, dstdefn->es_orig, + pj_geodetic_to_geocentric( dstdefn->a, dstdefn->es, point_count, point_offset, x, y, z ); if( dstdefn->fr_meter != 1.0 ) @@ -390,7 +372,6 @@ { double b; int i; - GeocentricInfo gi; pj_errno = 0; @@ -399,7 +380,7 @@ else b = a * sqrt(1-es); - if( pj_Set_Geocentric_Parameters( &gi, a, b ) != 0 ) + if( pj_Set_Geocentric_Parameters( a, b ) != 0 ) { pj_errno = PJD_ERR_GEOCENTRIC; return pj_errno; @@ -412,7 +393,7 @@ if( x[io] == HUGE_VAL ) continue; - if( pj_Convert_Geodetic_To_Geocentric( &gi, y[io], x[io], z[io], + if( pj_Convert_Geodetic_To_Geocentric( y[io], x[io], z[io], x+io, y+io, z+io ) != 0 ) { pj_errno = -14; @@ -435,14 +416,13 @@ { double b; int i; - GeocentricInfo gi; if( es == 0.0 ) b = a; else b = a * sqrt(1-es); - if( pj_Set_Geocentric_Parameters( &gi, a, b ) != 0 ) + if( pj_Set_Geocentric_Parameters( a, b ) != 0 ) { pj_errno = PJD_ERR_GEOCENTRIC; return pj_errno; @@ -455,8 +435,8 @@ if( x[io] == HUGE_VAL ) continue; - pj_Convert_Geocentric_To_Geodetic( &gi, x[io], y[io], z[io], - y+io, x+io, z+io ); + pj_Convert_Geocentric_To_Geodetic( x[io], y[io], z[io], + y+io, x+io, z+io ); } return 0; @@ -476,8 +456,8 @@ { return 0; } - else if( srcdefn->a_orig != dstdefn->a_orig - || ABS(srcdefn->es_orig - dstdefn->es_orig) > 0.000000000050 ) + else if( srcdefn->a != dstdefn->a + || ABS(srcdefn->es - dstdefn->es) > 0.000000000050 ) { /* the tolerence for es is to ensure that GRS80 and WGS84 are considered identical */ @@ -610,10 +590,6 @@ /************************************************************************/ /* pj_datum_transform() */ -/* */ -/* The input should be long/lat/z coordinates in radians in the */ -/* source datum, and the output should be long/lat/z */ -/* coordinates in radians in the destination datum. */ /************************************************************************/ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn, @@ -627,26 +603,16 @@ pj_errno = 0; /* -------------------------------------------------------------------- */ -/* We cannot do any meaningful datum transformation if either */ -/* the source or destination are of an unknown datum type */ -/* (ie. only a +ellps declaration, no +datum). This is new */ -/* behavior for PROJ 4.6.0. */ -/* -------------------------------------------------------------------- */ - if( srcdefn->datum_type == PJD_UNKNOWN - || dstdefn->datum_type == PJD_UNKNOWN ) - return 0; - -/* -------------------------------------------------------------------- */ /* Short cut if the datums are identical. */ /* -------------------------------------------------------------------- */ if( pj_compare_datums( srcdefn, dstdefn ) ) return 0; - src_a = srcdefn->a_orig; - src_es = srcdefn->es_orig; + src_a = srcdefn->a; + src_es = srcdefn->es; - dst_a = dstdefn->a_orig; - dst_es = dstdefn->es_orig; + dst_a = dstdefn->a; + dst_es = dstdefn->es; /* -------------------------------------------------------------------- */ /* Create a temporary Z array if one is not provided. */ Modified: trunk/toolkits/basemap/src/pj_utils.c =================================================================== --- trunk/toolkits/basemap/src/pj_utils.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/pj_utils.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: pj_utils.c,v 1.5 2007/03/12 14:05:35 fwarmerdam Exp $ + * $Id: pj_utils.c,v 1.4 2005/07/06 14:04:09 fwarmerdam Exp $ * * Project: PROJ.4 * Purpose: Some utility functions we don't want to bother putting in @@ -29,9 +29,6 @@ ****************************************************************************** * * $Log: pj_utils.c,v $ - * Revision 1.5 2007/03/12 14:05:35 fwarmerdam - * Removed duplicate towgs84 definition code. - * * Revision 1.4 2005/07/06 14:04:09 fwarmerdam * Improved precision of es encoding for pj_latlong_from_proj() per: * http://bugzilla.remotesensing.org/show_bug.cgi?id=881 @@ -138,6 +135,10 @@ sprintf( defn+strlen(defn), " +towgs84=%s", pj_param(pj_in->params,"stowgs84").s ); + if( pj_param(pj_in->params, "ttowgs84").i ) + sprintf( defn+strlen(defn), " +towgs84=%s", + pj_param(pj_in->params,"stowgs84").s ); + if( pj_param(pj_in->params, "tnadgrids").i ) sprintf( defn+strlen(defn), " +nadgrids=%s", pj_param(pj_in->params,"snadgrids").s ); Modified: trunk/toolkits/basemap/src/proj_api.h =================================================================== --- trunk/toolkits/basemap/src/proj_api.h 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/proj_api.h 2007-12-28 20:04:31 UTC (rev 4795) @@ -28,12 +28,6 @@ ****************************************************************************** * * $Log: proj_api.h,v $ - * Revision 1.16 2007/11/29 21:07:49 fwarmerdam - * prepare for 4.6.0 release - * - * Revision 1.15 2007/08/20 13:40:06 fwarmerdam - * avoid warnings in c++ for some prototypes - * * Revision 1.14 2006/04/20 04:19:59 fwarmerdam * updated version * @@ -92,7 +86,7 @@ #endif /* Try to update this every version! */ -#define PJ_VERSION 460 +#define PJ_VERSION 450 extern char const pj_release[]; /* global release id string */ @@ -132,7 +126,7 @@ int pj_apply_gridshift( const char *, int, long point_count, int point_offset, double *x, double *y, double *z ); -void pj_deallocate_grids(void); +void pj_deallocate_grids(); int pj_is_latlong(projPJ); int pj_is_geocent(projPJ); void pj_pr_list(projPJ); @@ -146,8 +140,8 @@ void *pj_malloc(size_t); void pj_dalloc(void *); char *pj_strerrno(int); -int *pj_get_errno_ref(void); -const char *pj_get_release(void); +int *pj_get_errno_ref(); +const char *pj_get_release(); #ifdef __cplusplus } Modified: trunk/toolkits/basemap/src/projects.h =================================================================== --- trunk/toolkits/basemap/src/projects.h 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/projects.h 2007-12-28 20:04:31 UTC (rev 4795) @@ -28,21 +28,6 @@ ****************************************************************************** * * $Log: projects.h,v $ - * Revision 1.27 2007/11/26 00:21:59 fwarmerdam - * Modified PJ structure to hold a_orig, es_orig, ellipsoid definition before - * adjustment for spherical projections. - * Modified pj_datum_transform() to use the original ellipsoid parameters, - * not the ones adjusted for spherical projections. - * Modified pj_datum_transform() to not attempt any datum shift via - * geocentric coordinates if the source *or* destination are raw ellipsoids - * (ie. PJD_UNKNOWN). All per PROJ bug #1602, GDAL bug #2025. - * - * Revision 1.26 2007/03/11 17:03:18 fwarmerdam - * support drive letter prefixes on win32 and related fixes (bug 1499) - * - * Revision 1.25 2006/11/17 22:16:30 mloskot - * Uploaded PROJ.4 port for Windows CE. - * * Revision 1.24 2006/10/18 04:34:03 fwarmerdam * added mlist functions from libproj4 * @@ -164,15 +149,6 @@ extern double hypot(double, double); #endif -#ifdef _WIN32_WCE -# include <wce_stdlib.h> -# include <wce_stdio.h> -# define rewind wceex_rewind -# define getenv wceex_getenv -# define strdup _strdup -# define hypot _hypot -#endif - /* some useful constants */ #define HALFPI 1.5707963267948966 #define FORTPI 0.78539816339744833 @@ -188,17 +164,8 @@ #define ID_TAG_MAX 50 #endif -/* Use WIN32 as a standard windows 32 bit declaration */ -#if defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) -# define WIN32 -#endif - -#if defined(_WINDOWS) && !defined(WIN32) && !defined(_WIN32_WCE) -# define WIN32 -#endif - /* directory delimiter for DOS support */ -#ifdef WIN32 +#ifdef DOS #define DIR_CHAR '\\' #else #define DIR_CHAR '/' @@ -298,10 +265,8 @@ int is_geocent; /* proj=geocent ... not really a projection at all */ double a, /* major axis or radius if es==0 */ - a_orig, /* major axis before any +proj related adjustment */ - es, /* e ^ 2 */ - es_orig, /* es before any +proj related adjustment */ e, /* eccentricity */ + es, /* e ^ 2 */ ra, /* 1/A */ one_es, /* 1 - e^2 */ rone_es, /* 1/one_es */ @@ -309,7 +274,7 @@ x0, y0, /* easting and northing */ k0, /* general scaling factor */ to_meter, fr_meter; /* cartesian scaling */ - + int datum_type; /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */ double datum_params[7]; double from_greenwich; /* prime meridian offset (in radians) */ Modified: trunk/toolkits/basemap/src/rtodms.c =================================================================== --- trunk/toolkits/basemap/src/rtodms.c 2007-12-28 19:44:55 UTC (rev 4794) +++ trunk/toolkits/basemap/src/rtodms.c 2007-12-28 20:04:31 UTC (rev 4795) @@ -53,9 +53,7 @@ sec = fmod(r / RES, 60.); r = floor(r / RES60); min = fmod(r, 60.); - r = floor(r / 60.); - deg = r; - + deg = r / 60.; if (dolong) (void)sprintf(ss,format,deg,min,sec,sign); else if (sec) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-12-28 20:19:50
|
Revision: 4796 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4796&view=rev Author: jswhit Date: 2007-12-28 12:18:46 -0800 (Fri, 28 Dec 2007) Log Message: ----------- update to proj 4.6.0 (second try) Modified Paths: -------------- trunk/toolkits/basemap/src/PJ_laea.c trunk/toolkits/basemap/src/PJ_wag3.c trunk/toolkits/basemap/src/_geod.c trunk/toolkits/basemap/src/_proj.c trunk/toolkits/basemap/src/emess.c trunk/toolkits/basemap/src/geocent.c trunk/toolkits/basemap/src/geocent.h trunk/toolkits/basemap/src/geod.c trunk/toolkits/basemap/src/nad_init.c trunk/toolkits/basemap/src/pj_datum_set.c trunk/toolkits/basemap/src/pj_factors.c trunk/toolkits/basemap/src/pj_gridinfo.c trunk/toolkits/basemap/src/pj_gridlist.c trunk/toolkits/basemap/src/pj_init.c trunk/toolkits/basemap/src/pj_latlong.c trunk/toolkits/basemap/src/pj_list.h trunk/toolkits/basemap/src/pj_open_lib.c trunk/toolkits/basemap/src/pj_release.c trunk/toolkits/basemap/src/pj_transform.c trunk/toolkits/basemap/src/pj_utils.c trunk/toolkits/basemap/src/proj_api.h trunk/toolkits/basemap/src/projects.h trunk/toolkits/basemap/src/rtodms.c Modified: trunk/toolkits/basemap/src/PJ_laea.c =================================================================== --- trunk/toolkits/basemap/src/PJ_laea.c 2007-12-28 20:04:31 UTC (rev 4795) +++ trunk/toolkits/basemap/src/PJ_laea.c 2007-12-28 20:18:46 UTC (rev 4796) @@ -179,8 +179,14 @@ 0. : atan2(xy.x, xy.y); return (lp); } -FREEUP; if (P) pj_dalloc(P); } -ENTRY0(laea) +FREEUP; + if (P) { + if (P->apa) + pj_dalloc(P->apa); + pj_dalloc(P); + } +} +ENTRY1(laea,apa) double t; if (fabs((t = fabs(P->phi0)) - HALFPI) < EPS10) Modified: trunk/toolkits/basemap/src/PJ_wag3.c =================================================================== --- trunk/toolkits/basemap/src/PJ_wag3.c 2007-12-28 20:04:31 UTC (rev 4795) +++ trunk/toolkits/basemap/src/PJ_wag3.c 2007-12-28 20:18:46 UTC (rev 4796) @@ -5,7 +5,7 @@ double C_x; #define PJ_LIB__ # include <projects.h> -PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph."; +PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph.\n\tlat_ts="; #define TWOTHIRD 0.6666666666666666666667 FORWARD(s_forward); /* spheroid */ xy.x = P->C_x * lp.lam * cos(TWOTHIRD * lp.phi); Modified: trunk/toolkits/basemap/src/_geod.c =================================================================== --- trunk/toolkits/basemap/src/_geod.c 2007-12-28 20:04:31 UTC (rev 4795) +++ trunk/toolkits/basemap/src/_geod.c 2007-12-28 20:18:46 UTC (rev 4796) @@ -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.9 on Fri Dec 28 13:16:13 2007 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -15,6 +15,9 @@ #define PyNumber_Index(o) PyNumber_Int(o) #define PyIndex_Check(o) PyNumber_Check(o) #endif +#if PY_VERSION_HEX < 0x02040000 + #define METH_COEXIST 0 +#endif #ifndef WIN32 #define __stdcall #define __cdecl @@ -83,8 +86,6 @@ 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*/ @@ -108,6 +109,14 @@ /* Declarations from _geod */ +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":5 + * include "_pyproj.pxi" + * + * cdef class Geod: # <<<<<<<<<<<<<< + * cdef GEODESIC_T geodesic_t + * cdef public object geodparams + */ + struct __pyx_obj_5_geod_Geod { PyObject_HEAD GEODESIC_T geodesic_t; @@ -117,6 +126,14 @@ }; +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":5 + * include "_pyproj.pxi" + * + * cdef class Geod: # <<<<<<<<<<<<<< + * cdef GEODESIC_T geodesic_t + * cdef public object geodparams + */ + static PyTypeObject *__pyx_ptype_5_geod_Geod = 0; static PyObject *__pyx_k3; static PyObject *__pyx_k4; @@ -142,6 +159,14 @@ static PyObject *__pyx_k2p; +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":11 + * cdef char *geodinitstring + * + * def __new__(self, geodparams): # <<<<<<<<<<<<<< + * cdef GEODESIC_T GEOD_T + * self.geodparams = geodparams + */ + static PyObject *__pyx_n_iteritems; static PyObject *__pyx_n_append; static PyObject *__pyx_n_join; @@ -182,7 +207,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-testing/src/_geod.pyx":29 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":13 * def __new__(self, geodparams): * cdef GEODESIC_T GEOD_T * self.geodparams = geodparams # <<<<<<<<<<<<<< @@ -193,32 +218,40 @@ 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-testing/src/_geod.pyx":31 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":15 * 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 = 31; goto __pyx_L1;} + __pyx_1 = PyList_New(0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;} Py_DECREF(__pyx_v_geodargs); __pyx_v_geodargs = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":32 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 * # 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 = 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;} + __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;} 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 = 32; goto __pyx_L1;} } + else { __pyx_1 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} } Py_DECREF(__pyx_3); __pyx_3 = 0; for (;;) { + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + * # setup proj initialization string. + * geodargs = [] + * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< + * geodargs.append('+'+key+"="+str(value)+' ') + * self.geodinitstring = PyString_AsString(''.join(geodargs)) + */ 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); @@ -229,72 +262,160 @@ if (PyTuple_CheckExact(__pyx_3) && PyTuple_GET_SIZE(__pyx_3) == 2) { __pyx_5 = PyTuple_GET_ITEM(__pyx_3, 0); Py_INCREF(__pyx_5); + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + * # setup proj initialization string. + * geodargs = [] + * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< + * geodargs.append('+'+key+"="+str(value)+' ') + * self.geodinitstring = PyString_AsString(''.join(geodargs)) + */ Py_DECREF(__pyx_v_key); __pyx_v_key = __pyx_5; __pyx_5 = 0; __pyx_5 = PyTuple_GET_ITEM(__pyx_3, 1); Py_INCREF(__pyx_5); + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + * # setup proj initialization string. + * geodargs = [] + * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< + * geodargs.append('+'+key+"="+str(value)+' ') + * self.geodinitstring = PyString_AsString(''.join(geodargs)) + */ 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 = 32; goto __pyx_L1;} + __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; 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 = 32; goto __pyx_L1;} + __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + * # setup proj initialization string. + * geodargs = [] + * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< + * geodargs.append('+'+key+"="+str(value)+' ') + * self.geodinitstring = PyString_AsString(''.join(geodargs)) + */ 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 = 32; goto __pyx_L1;} + __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + * # setup proj initialization string. + * geodargs = [] + * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< + * geodargs.append('+'+key+"="+str(value)+' ') + * self.geodinitstring = PyString_AsString(''.join(geodargs)) + */ 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 = 32; goto __pyx_L1;} + if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; } - __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;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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_3 = PyNumber_Add(__pyx_k6p, __pyx_v_key); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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_4 = PyNumber_Add(__pyx_3, __pyx_k7p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; 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 = 33; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; 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 = 33; goto __pyx_L1;} + __pyx_6 = PyObject_CallObject(((PyObject*)&PyString_Type), __pyx_3); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; 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 = 33; goto __pyx_L1;} + __pyx_3 = PyNumber_Add(__pyx_4, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; 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 = 33; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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_4 = PyNumber_Add(__pyx_3, __pyx_k8p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; 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 = 33; goto __pyx_L1;} + __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; 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 = 33; goto __pyx_L1;} + __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_6); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; 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; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":34 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":18 * 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 = 34; goto __pyx_L1;} - __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; goto __pyx_L1;} + __pyx_4 = PyObject_GetAttr(__pyx_k9p, __pyx_n_join); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":18 + * 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_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; 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 = 34; goto __pyx_L1;} + __pyx_6 = PyObject_CallObject(__pyx_4, __pyx_5); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":18 + * 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] + */ ((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-testing/src/_geod.pyx":36 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":20 * self.geodinitstring = PyString_AsString(''.join(geodargs)) * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< @@ -303,7 +424,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-testing/src/_geod.pyx":37 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":21 * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -312,27 +433,43 @@ */ __pyx_7 = (pj_errno != 0); if (__pyx_7) { - __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;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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;} 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 = 38; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; 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 = 38; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":39 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":23 * 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 = 39; goto __pyx_L1;} + __pyx_5 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":23 + * if pj_errno != 0: + * raise RuntimeError(pj_strerrno(pj_errno)) + * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< + * + * def __reduce__(self): + */ 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; @@ -356,6 +493,14 @@ return __pyx_r; } +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":25 + * self.proj_version = PJ_VERSION/100. + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * """special method that allows pyproj.Geod instance to be pickled""" + * return (self.__class__,(self.geodparams,)) + */ + static PyObject *__pyx_n___class__; static PyObject *__pyx_pf_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ @@ -366,11 +511,27 @@ PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); - __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;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; 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 = 43; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); __pyx_1 = 0; @@ -392,6 +553,14 @@ return __pyx_r; } +/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":29 + * return (self.__class__,(self.geodparams,)) + * + * def _fwd(self, object lons, object lats, object az, object dist, radians=False): # <<<<<<<<<<<<<< + * """ + * forward transformation - determine longitude, latitude and back azimuth + */ + static PyObject *__pyx_n_ValueError; static PyObject *__pyx_k10p; @@ -443,7 +612,7 @@ Py_INCREF(__pyx_v_dist); Py_INCREF(__pyx_v_radians); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":56 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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: # <<<<<<<<<<<<<< @@ -452,13 +621,21 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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 = 57; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;} goto __pyx_L2; } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":58 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":42 * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -467,13 +644,21 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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 = 59; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; goto __pyx_L1;} goto __pyx_L3; } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":60 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":44 * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< @@ -482,13 +667,21 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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 = 61; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":62 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":46 * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< @@ -497,13 +690,21 @@ */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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 = 63; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":65 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":49 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -512,42 +713,74 @@ */ __pyx_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats); if (__pyx_1) { + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":49 + * raise RuntimeError + * # process data in buffer + * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< + * raise RuntimeError("Buffer lengths not the same") + * ndim = buflenlons/_doublesize + */ __pyx_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz); if (__pyx_1) { + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":49 + * raise RuntimeError + * # process data in buffer + * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< + * raise RuntimeError("Buffer lengths not the same") + * ndim = buflenlons/_doublesize + */ __pyx_1 = (__pyx_v_buflenaz == __pyx_v_buflend); } } __pyx_2 = (!__pyx_1); if (__pyx_2) { - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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;} 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 = 66; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; 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 = 66; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":67 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":51 * 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 = 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;} + __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":51 + * if not buflenlons == buflenlats == buflenaz == buflend: + * raise RuntimeError("Buffer lengths not the same") + * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< + * lonsdata = <double *>londata + * latsdata = <double *>latdata + */ + __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;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __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;} + __pyx_6 = __pyx_PyIndex_AsSsize_t(__pyx_5); if (unlikely((__pyx_6 == -1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":68 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":52 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< @@ -556,7 +789,7 @@ */ __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":69 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":53 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< @@ -565,7 +798,7 @@ */ __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":70 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":54 * lonsdata = <double *>londata * latsdata = <double *>latdata * azdata = <double *>azdat # <<<<<<<<<<<<<< @@ -574,7 +807,7 @@ */ __pyx_v_azdata = ((double *)__pyx_v_azdat); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":71 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":55 * latsdata = <double *>latdata * azdata = <double *>azdat * distdata = <double *>distdat # <<<<<<<<<<<<<< @@ -583,7 +816,7 @@ */ __pyx_v_distdata = ((double *)__pyx_v_distdat); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":72 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":56 * azdata = <double *>azdat * distdata = <double *>distdat * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -592,17 +825,17 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":73 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":57 * 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 = 73; goto __pyx_L1;} + __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-testing/src/_geod.pyx":74 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":58 * for i from 0 <= i < ndim: * if radians: * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< @@ -611,7 +844,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-testing/src/_geod.pyx":75 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":59 * if radians: * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< @@ -620,7 +853,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-testing/src/_geod.pyx":76 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":60 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< @@ -629,7 +862,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-testing/src/_geod.pyx":77 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":61 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -641,55 +874,103 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":79 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":63 * 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 = 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;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":63 + * 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_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;} 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 = 79; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":63 + * 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] + */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":80 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":64 * 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 = 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;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":64 + * 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_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;} 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 = 80; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":64 + * 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] + */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":81 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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] # <<<<<<<<<<<<<< * 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 = 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;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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] # <<<<<<<<<<<<<< + * self.geodesic_t.DIST = distdata[i] + * geod_pre(&self.geodesic_t) + */ + __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;} 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 = 81; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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] # <<<<<<<<<<<<<< + * self.geodesic_t.DIST = distdata[i] + * geod_pre(&self.geodesic_t) + */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":82 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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] # <<<<<<<<<<<<<< @@ -700,7 +981,7 @@ } __pyx_L9:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":83 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":67 * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -709,7 +990,7 @@ */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":84 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":68 * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -718,20 +999,28 @@ */ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - __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;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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;} 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 = 85; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; 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 = 85; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; goto __pyx_L1;} goto __pyx_L10; } __pyx_L10:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":86 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":70 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -740,7 +1029,7 @@ */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":87 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":71 * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -749,20 +1038,28 @@ */ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - __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;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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;} 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 = 88; goto __pyx_L1;} + __pyx_5 = PyObject_CallObject(__pyx_builtin_RuntimeError, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; 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 = 88; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;} goto __pyx_L11; } __pyx_L11:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":89 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":73 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< @@ -771,29 +1068,37 @@ */ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (__pyx_8) { - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/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;} 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 = 90; goto __pyx_L1;} + __pyx_4 = PyObject_CallObject(__pyx_builtin_ValueError, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; 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 = 90; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;} goto __pyx_L12; } __pyx_L12:; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":91 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":75 * 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 = 91; goto __pyx_L1;} + __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-testing/src/_geod.pyx":92 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":76 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -802,7 +1107,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-testing/src/_geod.pyx":93 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":77 * if radians: * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -811,7 +1116,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-testing/src/_geod.pyx":94 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":78 * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -823,52 +1128,100 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":96 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":80 * 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 = 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;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":80 + * 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_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;} 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 = 96; goto __pyx_L1;} + __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":80 + * 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_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Users/jsw/python/matplotlib/toolkits/basemap-testing/src/_geod.pyx":97 + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":81 * 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 = 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;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} + + /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":81 + * else: + * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v + * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< + * azdata[i] = _rad2dg*self.ge... [truncated message content] |
From: <js...@us...> - 2008-01-01 14:29:20
|
Revision: 4798 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4798&view=rev Author: jswhit Date: 2008-01-01 06:29:16 -0800 (Tue, 01 Jan 2008) Log Message: ----------- update pyproj to 1.8.4 Modified Paths: -------------- trunk/toolkits/basemap/src/_geod.c trunk/toolkits/basemap/src/_proj.c trunk/toolkits/basemap/src/_pyproj.pxi Modified: trunk/toolkits/basemap/src/_geod.c =================================================================== --- trunk/toolkits/basemap/src/_geod.c 2007-12-28 20:29:30 UTC (rev 4797) +++ trunk/toolkits/basemap/src/_geod.c 2008-01-01 14:29:16 UTC (rev 4798) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.9 on Fri Dec 28 13:16:13 2007 */ +/* Generated by Cython 0.9.6.9 on Tue Jan 1 07:25:28 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -109,7 +109,7 @@ /* Declarations from _geod */ -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":5 +/* "/Users/jsw/python/pyproj/_geod.pyx":5 * include "_pyproj.pxi" * * cdef class Geod: # <<<<<<<<<<<<<< @@ -126,7 +126,7 @@ }; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":5 +/* "/Users/jsw/python/pyproj/_geod.pyx":5 * include "_pyproj.pxi" * * cdef class Geod: # <<<<<<<<<<<<<< @@ -142,7 +142,7 @@ /* Implementation of _geod */ -static char __pyx_k2[] = "1.8.3"; +static char __pyx_k2[] = "1.8.4"; static PyObject *__pyx_n___cinit__; static PyObject *__pyx_n___reduce__; @@ -159,7 +159,7 @@ static PyObject *__pyx_k2p; -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":11 +/* "/Users/jsw/python/pyproj/_geod.pyx":11 * cdef char *geodinitstring * * def __new__(self, geodparams): # <<<<<<<<<<<<<< @@ -207,7 +207,7 @@ __pyx_v_key = Py_None; Py_INCREF(Py_None); __pyx_v_value = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":13 + /* "/Users/jsw/python/pyproj/_geod.pyx":13 * def __new__(self, geodparams): * cdef GEODESIC_T GEOD_T * self.geodparams = geodparams # <<<<<<<<<<<<<< @@ -218,7 +218,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/trunk/toolkits/basemap/src/_geod.pyx":15 + /* "/Users/jsw/python/pyproj/_geod.pyx":15 * self.geodparams = geodparams * # setup proj initialization string. * geodargs = [] # <<<<<<<<<<<<<< @@ -230,7 +230,7 @@ __pyx_v_geodargs = __pyx_1; __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + /* "/Users/jsw/python/pyproj/_geod.pyx":16 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< @@ -245,7 +245,7 @@ Py_DECREF(__pyx_3); __pyx_3 = 0; for (;;) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + /* "/Users/jsw/python/pyproj/_geod.pyx":16 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< @@ -263,7 +263,7 @@ __pyx_5 = PyTuple_GET_ITEM(__pyx_3, 0); Py_INCREF(__pyx_5); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + /* "/Users/jsw/python/pyproj/_geod.pyx":16 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< @@ -276,7 +276,7 @@ __pyx_5 = PyTuple_GET_ITEM(__pyx_3, 1); Py_INCREF(__pyx_5); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + /* "/Users/jsw/python/pyproj/_geod.pyx":16 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< @@ -293,7 +293,7 @@ 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;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + /* "/Users/jsw/python/pyproj/_geod.pyx":16 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< @@ -305,7 +305,7 @@ __pyx_5 = 0; __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":16 + /* "/Users/jsw/python/pyproj/_geod.pyx":16 * # setup proj initialization string. * geodargs = [] * for key,value in geodparams.iteritems(): # <<<<<<<<<<<<<< @@ -319,7 +319,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; } - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":17 + /* "/Users/jsw/python/pyproj/_geod.pyx":17 * geodargs = [] * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< @@ -328,7 +328,7 @@ */ __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;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":17 + /* "/Users/jsw/python/pyproj/_geod.pyx":17 * geodargs = [] * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< @@ -337,7 +337,7 @@ */ __pyx_3 = PyNumber_Add(__pyx_k6p, __pyx_v_key); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":17 + /* "/Users/jsw/python/pyproj/_geod.pyx":17 * geodargs = [] * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< @@ -347,7 +347,7 @@ __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k7p); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":17 + /* "/Users/jsw/python/pyproj/_geod.pyx":17 * geodargs = [] * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< @@ -363,7 +363,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_6); __pyx_6 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":17 + /* "/Users/jsw/python/pyproj/_geod.pyx":17 * geodargs = [] * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') # <<<<<<<<<<<<<< @@ -382,7 +382,7 @@ } Py_DECREF(__pyx_1); __pyx_1 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":18 + /* "/Users/jsw/python/pyproj/_geod.pyx":18 * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') * self.geodinitstring = PyString_AsString(''.join(geodargs)) # <<<<<<<<<<<<<< @@ -391,7 +391,7 @@ */ __pyx_4 = PyObject_GetAttr(__pyx_k9p, __pyx_n_join); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":18 + /* "/Users/jsw/python/pyproj/_geod.pyx":18 * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') * self.geodinitstring = PyString_AsString(''.join(geodargs)) # <<<<<<<<<<<<<< @@ -405,7 +405,7 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":18 + /* "/Users/jsw/python/pyproj/_geod.pyx":18 * for key,value in geodparams.iteritems(): * geodargs.append('+'+key+"="+str(value)+' ') * self.geodinitstring = PyString_AsString(''.join(geodargs)) # <<<<<<<<<<<<<< @@ -415,7 +415,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/trunk/toolkits/basemap/src/_geod.pyx":20 + /* "/Users/jsw/python/pyproj/_geod.pyx":20 * self.geodinitstring = PyString_AsString(''.join(geodargs)) * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< @@ -424,7 +424,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/trunk/toolkits/basemap/src/_geod.pyx":21 + /* "/Users/jsw/python/pyproj/_geod.pyx":21 * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -434,7 +434,7 @@ __pyx_7 = (pj_errno != 0); if (__pyx_7) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":22 + /* "/Users/jsw/python/pyproj/_geod.pyx":22 * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -454,7 +454,7 @@ } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":23 + /* "/Users/jsw/python/pyproj/_geod.pyx":23 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< @@ -463,7 +463,7 @@ */ __pyx_5 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":23 + /* "/Users/jsw/python/pyproj/_geod.pyx":23 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< @@ -493,7 +493,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":25 +/* "/Users/jsw/python/pyproj/_geod.pyx":25 * self.proj_version = PJ_VERSION/100. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -512,7 +512,7 @@ PyObject *__pyx_3 = 0; Py_INCREF(__pyx_v_self); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":27 + /* "/Users/jsw/python/pyproj/_geod.pyx":27 * def __reduce__(self): * """special method that allows pyproj.Geod instance to be pickled""" * return (self.__class__,(self.geodparams,)) # <<<<<<<<<<<<<< @@ -521,7 +521,7 @@ */ __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;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":27 + /* "/Users/jsw/python/pyproj/_geod.pyx":27 * def __reduce__(self): * """special method that allows pyproj.Geod instance to be pickled""" * return (self.__class__,(self.geodparams,)) # <<<<<<<<<<<<<< @@ -553,7 +553,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":29 +/* "/Users/jsw/python/pyproj/_geod.pyx":29 * return (self.__class__,(self.geodparams,)) * * def _fwd(self, object lons, object lats, object az, object dist, radians=False): # <<<<<<<<<<<<<< @@ -612,7 +612,7 @@ Py_INCREF(__pyx_v_dist); Py_INCREF(__pyx_v_radians); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":40 + /* "/Users/jsw/python/pyproj/_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: # <<<<<<<<<<<<<< @@ -622,7 +622,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":41 + /* "/Users/jsw/python/pyproj/_geod.pyx":41 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -635,7 +635,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":42 + /* "/Users/jsw/python/pyproj/_geod.pyx":42 * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -645,7 +645,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":43 + /* "/Users/jsw/python/pyproj/_geod.pyx":43 * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -658,7 +658,7 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":44 + /* "/Users/jsw/python/pyproj/_geod.pyx":44 * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< @@ -668,7 +668,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":45 + /* "/Users/jsw/python/pyproj/_geod.pyx":45 * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -681,7 +681,7 @@ } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":46 + /* "/Users/jsw/python/pyproj/_geod.pyx":46 * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< @@ -691,7 +691,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":47 + /* "/Users/jsw/python/pyproj/_geod.pyx":47 * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -704,7 +704,7 @@ } __pyx_L5:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":49 + /* "/Users/jsw/python/pyproj/_geod.pyx":49 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -714,7 +714,7 @@ __pyx_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":49 + /* "/Users/jsw/python/pyproj/_geod.pyx":49 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -724,7 +724,7 @@ __pyx_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":49 + /* "/Users/jsw/python/pyproj/_geod.pyx":49 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -737,7 +737,7 @@ __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":50 + /* "/Users/jsw/python/pyproj/_geod.pyx":50 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< @@ -756,7 +756,7 @@ } __pyx_L6:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":51 + /* "/Users/jsw/python/pyproj/_geod.pyx":51 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< @@ -765,7 +765,7 @@ */ __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":51 + /* "/Users/jsw/python/pyproj/_geod.pyx":51 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< @@ -780,7 +780,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":52 + /* "/Users/jsw/python/pyproj/_geod.pyx":52 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< @@ -789,7 +789,7 @@ */ __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":53 + /* "/Users/jsw/python/pyproj/_geod.pyx":53 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< @@ -798,7 +798,7 @@ */ __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":54 + /* "/Users/jsw/python/pyproj/_geod.pyx":54 * lonsdata = <double *>londata * latsdata = <double *>latdata * azdata = <double *>azdat # <<<<<<<<<<<<<< @@ -807,7 +807,7 @@ */ __pyx_v_azdata = ((double *)__pyx_v_azdat); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":55 + /* "/Users/jsw/python/pyproj/_geod.pyx":55 * latsdata = <double *>latdata * azdata = <double *>azdat * distdata = <double *>distdat # <<<<<<<<<<<<<< @@ -816,7 +816,7 @@ */ __pyx_v_distdata = ((double *)__pyx_v_distdat); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":56 + /* "/Users/jsw/python/pyproj/_geod.pyx":56 * azdata = <double *>azdat * distdata = <double *>distdat * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -825,7 +825,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":57 + /* "/Users/jsw/python/pyproj/_geod.pyx":57 * distdata = <double *>distdat * for i from 0 <= i < ndim: * if radians: # <<<<<<<<<<<<<< @@ -835,7 +835,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/trunk/toolkits/basemap/src/_geod.pyx":58 + /* "/Users/jsw/python/pyproj/_geod.pyx":58 * for i from 0 <= i < ndim: * if radians: * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< @@ -844,7 +844,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":59 + /* "/Users/jsw/python/pyproj/_geod.pyx":59 * if radians: * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< @@ -853,7 +853,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":60 + /* "/Users/jsw/python/pyproj/_geod.pyx":60 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< @@ -862,7 +862,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = (__pyx_v_azdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":61 + /* "/Users/jsw/python/pyproj/_geod.pyx":61 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -874,7 +874,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":63 + /* "/Users/jsw/python/pyproj/_geod.pyx":63 * self.geodesic_t.DIST = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -883,7 +883,7 @@ */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":63 + /* "/Users/jsw/python/pyproj/_geod.pyx":63 * self.geodesic_t.DIST = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -897,7 +897,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":63 + /* "/Users/jsw/python/pyproj/_geod.pyx":63 * self.geodesic_t.DIST = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -906,7 +906,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":64 + /* "/Users/jsw/python/pyproj/_geod.pyx":64 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -915,7 +915,7 @@ */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":64 + /* "/Users/jsw/python/pyproj/_geod.pyx":64 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -929,7 +929,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":64 + /* "/Users/jsw/python/pyproj/_geod.pyx":64 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -938,7 +938,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":65 + /* "/Users/jsw/python/pyproj/_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] # <<<<<<<<<<<<<< @@ -947,7 +947,7 @@ */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":65 + /* "/Users/jsw/python/pyproj/_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] # <<<<<<<<<<<<<< @@ -961,7 +961,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":65 + /* "/Users/jsw/python/pyproj/_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] # <<<<<<<<<<<<<< @@ -970,7 +970,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":66 + /* "/Users/jsw/python/pyproj/_geod.pyx":66 * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< @@ -981,7 +981,7 @@ } __pyx_L9:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":67 + /* "/Users/jsw/python/pyproj/_geod.pyx":67 * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -990,7 +990,7 @@ */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":68 + /* "/Users/jsw/python/pyproj/_geod.pyx":68 * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -1000,7 +1000,7 @@ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":69 + /* "/Users/jsw/python/pyproj/_geod.pyx":69 * geod_pre(&self.geodesic_t) * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -1020,7 +1020,7 @@ } __pyx_L10:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":70 + /* "/Users/jsw/python/pyproj/_geod.pyx":70 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -1029,7 +1029,7 @@ */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":71 + /* "/Users/jsw/python/pyproj/_geod.pyx":71 * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -1039,7 +1039,7 @@ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":72 + /* "/Users/jsw/python/pyproj/_geod.pyx":72 * geod_for(&self.geodesic_t) * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -1059,7 +1059,7 @@ } __pyx_L11:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":73 + /* "/Users/jsw/python/pyproj/_geod.pyx":73 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< @@ -1069,7 +1069,7 @@ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (__pyx_8) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":74 + /* "/Users/jsw/python/pyproj/_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)') # <<<<<<<<<<<<<< @@ -1088,7 +1088,7 @@ } __pyx_L12:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":75 + /* "/Users/jsw/python/pyproj/_geod.pyx":75 * if isnan(self.geodesic_t.ALPHA21): * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: # <<<<<<<<<<<<<< @@ -1098,7 +1098,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/trunk/toolkits/basemap/src/_geod.pyx":76 + /* "/Users/jsw/python/pyproj/_geod.pyx":76 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -1107,7 +1107,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":77 + /* "/Users/jsw/python/pyproj/_geod.pyx":77 * if radians: * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -1116,7 +1116,7 @@ */ (__pyx_v_latsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":78 + /* "/Users/jsw/python/pyproj/_geod.pyx":78 * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1128,7 +1128,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":80 + /* "/Users/jsw/python/pyproj/_geod.pyx":80 * azdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -1137,7 +1137,7 @@ */ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":80 + /* "/Users/jsw/python/pyproj/_geod.pyx":80 * azdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -1151,7 +1151,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":80 + /* "/Users/jsw/python/pyproj/_geod.pyx":80 * azdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< @@ -1160,7 +1160,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":81 + /* "/Users/jsw/python/pyproj/_geod.pyx":81 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -1169,7 +1169,7 @@ */ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":81 + /* "/Users/jsw/python/pyproj/_geod.pyx":81 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -1183,7 +1183,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":81 + /* "/Users/jsw/python/pyproj/_geod.pyx":81 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< @@ -1192,7 +1192,7 @@ */ (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":82 + /* "/Users/jsw/python/pyproj/_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 # <<<<<<<<<<<<<< @@ -1201,7 +1201,7 @@ */ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":82 + /* "/Users/jsw/python/pyproj/_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 # <<<<<<<<<<<<<< @@ -1215,7 +1215,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":82 + /* "/Users/jsw/python/pyproj/_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 # <<<<<<<<<<<<<< @@ -1245,7 +1245,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":84 +/* "/Users/jsw/python/pyproj/_geod.pyx":84 * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): # <<<<<<<<<<<<<< @@ -1300,7 +1300,7 @@ Py_INCREF(__pyx_v_lats2); Py_INCREF(__pyx_v_radians); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":94 + /* "/Users/jsw/python/pyproj/_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: # <<<<<<<<<<<<<< @@ -1310,7 +1310,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1,(&__pyx_v_londata),(&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":95 + /* "/Users/jsw/python/pyproj/_geod.pyx":95 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1323,7 +1323,7 @@ } __pyx_L2:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":96 + /* "/Users/jsw/python/pyproj/_geod.pyx":96 * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< @@ -1333,7 +1333,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1,(&__pyx_v_latdata),(&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":97 + /* "/Users/jsw/python/pyproj/_geod.pyx":97 * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1346,7 +1346,7 @@ } __pyx_L3:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":98 + /* "/Users/jsw/python/pyproj/_geod.pyx":98 * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< @@ -1356,7 +1356,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2,(&__pyx_v_azdat),(&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":99 + /* "/Users/jsw/python/pyproj/_geod.pyx":99 * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1369,7 +1369,7 @@ } __pyx_L4:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":100 + /* "/Users/jsw/python/pyproj/_geod.pyx":100 * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< @@ -1379,7 +1379,7 @@ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2,(&__pyx_v_distdat),(&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":101 + /* "/Users/jsw/python/pyproj/_geod.pyx":101 * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1392,7 +1392,7 @@ } __pyx_L5:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":103 + /* "/Users/jsw/python/pyproj/_geod.pyx":103 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -1402,7 +1402,7 @@ __pyx_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":103 + /* "/Users/jsw/python/pyproj/_geod.pyx":103 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -1412,7 +1412,7 @@ __pyx_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz); if (__pyx_1) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":103 + /* "/Users/jsw/python/pyproj/_geod.pyx":103 * raise RuntimeError * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< @@ -1425,7 +1425,7 @@ __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":104 + /* "/Users/jsw/python/pyproj/_geod.pyx":104 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< @@ -1444,7 +1444,7 @@ } __pyx_L6:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":105 + /* "/Users/jsw/python/pyproj/_geod.pyx":105 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< @@ -1453,7 +1453,7 @@ */ __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":105 + /* "/Users/jsw/python/pyproj/_geod.pyx":105 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< @@ -1468,7 +1468,7 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":106 + /* "/Users/jsw/python/pyproj/_geod.pyx":106 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< @@ -1477,7 +1477,7 @@ */ __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":107 + /* "/Users/jsw/python/pyproj/_geod.pyx":107 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< @@ -1486,7 +1486,7 @@ */ __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":108 + /* "/Users/jsw/python/pyproj/_geod.pyx":108 * lonsdata = <double *>londata * latsdata = <double *>latdata * azdata = <double *>azdat # <<<<<<<<<<<<<< @@ -1495,7 +1495,7 @@ */ __pyx_v_azdata = ((double *)__pyx_v_azdat); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":109 + /* "/Users/jsw/python/pyproj/_geod.pyx":109 * latsdata = <double *>latdata * azdata = <double *>azdat * distdata = <double *>distdat # <<<<<<<<<<<<<< @@ -1504,7 +1504,7 @@ */ __pyx_v_distdata = ((double *)__pyx_v_distdat); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":110 + /* "/Users/jsw/python/pyproj/_geod.pyx":110 * azdata = <double *>azdat * distdata = <double *>distdat * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -1513,7 +1513,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":111 + /* "/Users/jsw/python/pyproj/_geod.pyx":111 * distdata = <double *>distdat * for i from 0 <= i < ndim: * if radians: # <<<<<<<<<<<<<< @@ -1523,7 +1523,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/trunk/toolkits/basemap/src/_geod.pyx":112 + /* "/Users/jsw/python/pyproj/_geod.pyx":112 * for i from 0 <= i < ndim: * if radians: * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< @@ -1532,7 +1532,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":113 + /* "/Users/jsw/python/pyproj/_geod.pyx":113 * if radians: * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< @@ -1541,7 +1541,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":114 + /* "/Users/jsw/python/pyproj/_geod.pyx":114 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.p2.v = azdata[i] # <<<<<<<<<<<<<< @@ -1550,7 +1550,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = (__pyx_v_azdata[__pyx_v_i]); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":115 + /* "/Users/jsw/python/pyproj/_geod.pyx":115 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.p2.v = azdata[i] * self.geodesic_t.p2.u = distdata[i] # <<<<<<<<<<<<<< @@ -1562,7 +1562,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":117 + /* "/Users/jsw/python/pyproj/_geod.pyx":117 * self.geodesic_t.p2.u = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -1571,7 +1571,7 @@ */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":117 + /* "/Users/jsw/python/pyproj/_geod.pyx":117 * self.geodesic_t.p2.u = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -1585,7 +1585,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":117 + /* "/Users/jsw/python/pyproj/_geod.pyx":117 * self.geodesic_t.p2.u = distdata[i] * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< @@ -1594,7 +1594,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":118 + /* "/Users/jsw/python/pyproj/_geod.pyx":118 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -1603,7 +1603,7 @@ */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":118 + /* "/Users/jsw/python/pyproj/_geod.pyx":118 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -1617,7 +1617,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":118 + /* "/Users/jsw/python/pyproj/_geod.pyx":118 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< @@ -1626,7 +1626,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":119 + /* "/Users/jsw/python/pyproj/_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] # <<<<<<<<<<<<<< @@ -1635,7 +1635,7 @@ */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":119 + /* "/Users/jsw/python/pyproj/_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] # <<<<<<<<<<<<<< @@ -1649,7 +1649,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":119 + /* "/Users/jsw/python/pyproj/_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] # <<<<<<<<<<<<<< @@ -1658,7 +1658,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":120 + /* "/Users/jsw/python/pyproj/_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] # <<<<<<<<<<<<<< @@ -1667,7 +1667,7 @@ */ __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":120 + /* "/Users/jsw/python/pyproj/_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] # <<<<<<<<<<<<<< @@ -1681,7 +1681,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":120 + /* "/Users/jsw/python/pyproj/_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] # <<<<<<<<<<<<<< @@ -1692,7 +1692,7 @@ } __pyx_L9:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":121 + /* "/Users/jsw/python/pyproj/_geod.pyx":121 * self.geodesic_t.p2.v = _dg2rad*azdata[i] * self.geodesic_t.p2.u = _dg2rad*distdata[i] * geod_inv(&self.geodesic_t) # <<<<<<<<<<<<<< @@ -1701,7 +1701,7 @@ */ geod_inv((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":122 + /* "/Users/jsw/python/pyproj/_geod.pyx":122 * self.geodesic_t.p2.u = _dg2rad*distdata[i] * geod_inv(&self.geodesic_t) * if isnan(self.geodesic_t.DIST): # <<<<<<<<<<<<<< @@ -1711,7 +1711,7 @@ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST); if (__pyx_8) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":123 + /* "/Users/jsw/python/pyproj/_geod.pyx":123 * geod_inv(&self.geodesic_t) * if isnan(self.geodesic_t.DIST): * raise ValueError('undefined inverse geodesic (may be an antipodal point)') # <<<<<<<<<<<<<< @@ -1730,7 +1730,7 @@ } __pyx_L10:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":124 + /* "/Users/jsw/python/pyproj/_geod.pyx":124 * if isnan(self.geodesic_t.DIST): * raise ValueError('undefined inverse geodesic (may be an antipodal point)') * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -1740,7 +1740,7 @@ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":125 + /* "/Users/jsw/python/pyproj/_geod.pyx":125 * raise ValueError('undefined inverse geodesic (may be an antipodal point)') * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< @@ -1760,7 +1760,7 @@ } __pyx_L11:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":126 + /* "/Users/jsw/python/pyproj/_geod.pyx":126 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) * if radians: # <<<<<<<<<<<<<< @@ -1770,7 +1770,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/trunk/toolkits/basemap/src/_geod.pyx":127 + /* "/Users/jsw/python/pyproj/_geod.pyx":127 * raise RuntimeError(pj_strerrno(pj_errno)) * if radians: * lonsdata[i] = self.geodesic_t.ALPHA12 # <<<<<<<<<<<<<< @@ -1779,7 +1779,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":128 + /* "/Users/jsw/python/pyproj/_geod.pyx":128 * if radians: * lonsdata[i] = self.geodesic_t.ALPHA12 * latsdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1791,7 +1791,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":130 + /* "/Users/jsw/python/pyproj/_geod.pyx":130 * latsdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 # <<<<<<<<<<<<<< @@ -1800,7 +1800,7 @@ */ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":130 + /* "/Users/jsw/python/pyproj/_geod.pyx":130 * latsdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 # <<<<<<<<<<<<<< @@ -1814,7 +1814,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":130 + /* "/Users/jsw/python/pyproj/_geod.pyx":130 * latsdata[i] = self.geodesic_t.ALPHA21 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 # <<<<<<<<<<<<<< @@ -1823,7 +1823,7 @@ */ (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":131 + /* "/Users/jsw/python/pyproj/_geod.pyx":131 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 * latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1832,7 +1832,7 @@ */ __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;} - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":131 + /* "/Users/jsw/python/pyproj/_geod.pyx":131 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 * latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1846,7 +1846,7 @@ __pyx_7 = PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;} Py_DECREF(__pyx_4); __pyx_4 = 0; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":131 + /* "/Users/jsw/python/pyproj/_geod.pyx":131 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 * latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< @@ -1857,7 +1857,7 @@ } __pyx_L12:; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":132 + /* "/Users/jsw/python/pyproj/_geod.pyx":132 * lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12 * latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * azdata[i] = self.geodesic_t.DIST # <<<<<<<<<<<<<< @@ -1885,7 +1885,7 @@ return __pyx_r; } -/* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":134 +/* "/Users/jsw/python/pyproj/_geod.pyx":134 * azdata[i] = self.geodesic_t.DIST * * def _npts(self, double lon1, double lat1, double lon2, double lat2, int npts, radians=False): # <<<<<<<<<<<<<< @@ -1921,7 +1921,7 @@ __pyx_v_lats = Py_None; Py_INCREF(Py_None); __pyx_v_lons = Py_None; Py_INCREF(Py_None); - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":139 + /* "/Users/jsw/python/pyproj/_geod.pyx":139 * cdef int i * cdef double del_s * if radians: # <<<<<<<<<<<<<< @@ -1931,7 +1931,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/trunk/toolkits/basemap/src/_geod.pyx":140 + /* "/Users/jsw/python/pyproj/_geod.pyx":140 * cdef double del_s * if radians: * self.geodesic_t.p1.v = lon1 # <<<<<<<<<<<<<< @@ -1940,7 +1940,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_v_lon1; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":141 + /* "/Users/jsw/python/pyproj/_geod.pyx":141 * if radians: * self.geodesic_t.p1.v = lon1 * self.geodesic_t.p1.u = lat1 # <<<<<<<<<<<<<< @@ -1949,7 +1949,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_v_lat1; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":142 + /* "/Users/jsw/python/pyproj/_geod.pyx":142 * self.geodesic_t.p1.v = lon1 * self.geodesic_t.p1.u = lat1 * self.geodesic_t.p2.v = lon2 # <<<<<<<<<<<<<< @@ -1958,7 +1958,7 @@ */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = __pyx_v_lon2; - /* "/Users/jsw/python/matplotlib/trunk/toolkits/basemap/src/_geod.pyx":143 + /* "/Users/jsw/python/pyproj/_geod.pyx":143 * self.geodesic_t.p1.u = lat1 * self.geodesic_t.p2.v = lon2 * self.geodesic_t.p2.u = lat2 # <<<<<<<<<<<<<< @@ -1970,7 +1970,7 @@ } /*else*/ { - /* "/Users/jsw/python/matplotlib/trunk/tool... [truncated message content] |
From: <js...@us...> - 2008-05-20 16:01:49
|
Revision: 5204 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5204&view=rev Author: jswhit Date: 2008-05-20 09:00:21 -0700 (Tue, 20 May 2008) Log Message: ----------- don't need to import numpy Modified Paths: -------------- trunk/toolkits/basemap/src/_proj.c trunk/toolkits/basemap/src/_proj.pyx Modified: trunk/toolkits/basemap/src/_proj.c =================================================================== --- trunk/toolkits/basemap/src/_proj.c 2008-05-20 15:57:58 UTC (rev 5203) +++ trunk/toolkits/basemap/src/_proj.c 2008-05-20 16:00:21 UTC (rev 5204) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.14 on Tue May 20 09:53:32 2008 */ +/* Generated by Cython 0.9.6.14 on Tue May 20 09:59:26 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -134,7 +134,7 @@ /* Declarations */ -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":13 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":12 * pj_set_searchpath(1, &searchpath) * * cdef class Proj: # <<<<<<<<<<<<<< @@ -180,11 +180,10 @@ static PyObject *__pyx_n__rad2dg; static PyObject *__pyx_n__doublesize; static PyObject *__pyx_n___version__; -static PyObject *__pyx_n_numpy; static PyObject *__pyx_k_2p; -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":8 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":7 * c_numpy.import_array() * * def set_datapath(datapath): # <<<<<<<<<<<<<< @@ -197,7 +196,7 @@ char *__pyx_v_searchpath; PyObject *__pyx_r; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":10 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":9 * def set_datapath(datapath): * cdef char *searchpath * searchpath = PyString_AsString(datapath) # <<<<<<<<<<<<<< @@ -206,7 +205,7 @@ */ __pyx_v_searchpath = PyString_AsString(__pyx_v_datapath); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":11 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":10 * cdef char *searchpath * searchpath = PyString_AsString(datapath) * pj_set_searchpath(1, &searchpath) # <<<<<<<<<<<<<< @@ -219,7 +218,7 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":20 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":19 * cdef public object srs * * def __new__(self, projparams): # <<<<<<<<<<<<<< @@ -232,17 +231,17 @@ 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_k_7p; static PyObject *__pyx_builtin_RuntimeError; -static char __pyx_k_4[] = "+"; -static char __pyx_k_5[] = "="; -static char __pyx_k_6[] = " "; -static char __pyx_k_7[] = ""; +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) { @@ -262,7 +261,7 @@ __pyx_v_projparams = 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 = 20; __pyx_clineno = __LINE__; goto __pyx_L2;} + 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;} } goto __pyx_L3; __pyx_L2:; @@ -273,7 +272,7 @@ __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":21 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":20 * * def __new__(self, projparams): * self.projparams = projparams # <<<<<<<<<<<<<< @@ -284,30 +283,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; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":23 + /* "/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 = 23; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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":24 + /* "/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 = 24; __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 = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} } + 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); } @@ -332,65 +331,65 @@ 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 = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} + 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":25 + /* "/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.pjinitstring = PyString_AsString(self.srs) */ - __pyx_5 = PyNumber_Add(__pyx_k_4p, __pyx_v_key); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = PyNumber_Add(__pyx_5, __pyx_k_5p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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_6p); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 25; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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":26 + /* "/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_7p, __pyx_n_join); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 26; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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_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; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":27 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":26 * pjargs.append('+'+key+"="+str(value)+' ') * self.srs = ''.join(pjargs) * self.pjinitstring = PyString_AsString(self.srs) # <<<<<<<<<<<<<< @@ -399,7 +398,7 @@ */ ((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":29 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":28 * self.pjinitstring = PyString_AsString(self.srs) * # initialize projection * self.projpj = pj_init_plus(self.pjinitstring) # <<<<<<<<<<<<<< @@ -408,7 +407,7 @@ */ ((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":30 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":29 * # initialize projection * self.projpj = pj_init_plus(self.pjinitstring) * if pj_errno != 0: # <<<<<<<<<<<<<< @@ -418,34 +417,34 @@ __pyx_6 = (pj_errno != 0); if (__pyx_6) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":31 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":30 * 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 = 31; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 31; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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 = 31; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":32 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":31 * 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 = 32; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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;} 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; @@ -466,7 +465,7 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":34 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":33 * self.proj_version = PJ_VERSION/100. * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -478,7 +477,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":36 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":35 * def __dealloc__(self): * """destroy projection definition""" * pj_free(self.projpj) # <<<<<<<<<<<<<< @@ -489,7 +488,7 @@ } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":38 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":37 * pj_free(self.projpj) * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -507,18 +506,18 @@ PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":40 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":39 * def __reduce__(self): * """special method that allows pyproj.Proj instance to be pickled""" * return (self.__class__,(self.projparams,)) # <<<<<<<<<<<<<< * * 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 = 40; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __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 = 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 = 40; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __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; @@ -539,7 +538,7 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":42 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":41 * return (self.__class__,(self.projparams,)) * * def _fwd(self, object lons, object lats, radians=False, errcheck=False): # <<<<<<<<<<<<<< @@ -547,9 +546,9 @@ * forward transformation - lons,lats to x,y (done in place). */ -static PyObject *__pyx_k_8p; +static PyObject *__pyx_k_7p; -static char __pyx_k_8[] = "Buffer lengths not the same"; +static char __pyx_k_7[] = "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 "; @@ -589,7 +588,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 = 42; __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 = 41; __pyx_clineno = __LINE__; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; @@ -597,7 +596,7 @@ return NULL; __pyx_L3:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":56 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":55 * cdef void *londata, *latdata * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenx) <> 0: # <<<<<<<<<<<<<< @@ -607,7 +606,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":57 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":56 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenx) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -615,12 +614,12 @@ * raise RuntimeError */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":58 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":57 * if PyObject_AsWriteBuffer(lons, &londata, &buflenx) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &bufleny) <> 0: # <<<<<<<<<<<<<< @@ -630,7 +629,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":59 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":58 * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &bufleny) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -638,12 +637,12 @@ * if buflenx != bufleny: */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":61 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":60 * raise RuntimeError * # process data in buffer * if buflenx != bufleny: # <<<<<<<<<<<<<< @@ -653,42 +652,42 @@ __pyx_1 = (__pyx_v_buflenx != __pyx_v_bufleny); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":62 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":61 * # 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 = 62; __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 = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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;} 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 = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":63 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":62 * 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 = 63; __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 = 63; __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 = 63; __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 = 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;} 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 = 63; __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 = 62; __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":64 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":63 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenx/_doublesize * lonsdata = <double *>londata # <<<<<<<<<<<<<< @@ -697,7 +696,7 @@ */ __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":65 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":64 * ndim = buflenx/_doublesize * lonsdata = <double *>londata * latsdata = <double *>latdata # <<<<<<<<<<<<<< @@ -706,7 +705,7 @@ */ __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":66 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":65 * lonsdata = <double *>londata * latsdata = <double *>latdata * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -715,17 +714,17 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":67 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":66 * 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 = 67; __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 = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":68 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":67 * for i from 0 <= i < ndim: * if radians: * projlonlatin.u = lonsdata[i] # <<<<<<<<<<<<<< @@ -734,7 +733,7 @@ */ __pyx_v_projlonlatin.u = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":69 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":68 * if radians: * projlonlatin.u = lonsdata[i] * projlonlatin.v = latsdata[i] # <<<<<<<<<<<<<< @@ -746,41 +745,41 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":71 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":70 * 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 = 71; __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 = 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 = 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;} 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 = 70; __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":72 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":71 * 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 = 72; __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 = 72; __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 = 72; __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 = 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;} 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 = 72; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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;} Py_DECREF(__pyx_4); __pyx_4 = 0; __pyx_v_projlonlatin.v = __pyx_6; } __pyx_L9:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":73 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":72 * projlonlatin.u = _dg2rad*lonsdata[i] * projlonlatin.v = _dg2rad*latsdata[i] * projxyout = pj_fwd(projlonlatin,self.projpj) # <<<<<<<<<<<<<< @@ -789,7 +788,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":74 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":73 * projlonlatin.v = _dg2rad*latsdata[i] * projxyout = pj_fwd(projlonlatin,self.projpj) * if errcheck and pj_errno != 0: # <<<<<<<<<<<<<< @@ -798,36 +797,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 = 74; __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;} 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 = 74; __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 = 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 = 74; __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;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":75 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":74 * 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 = 75; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __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 = 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;} 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 = 75; __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 = 74; __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 = 75; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L10; } __pyx_L10:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":78 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":77 * # since HUGE_VAL can be 'inf', * # change it to a real (but very large) number. * if projxyout.u == HUGE_VAL: # <<<<<<<<<<<<<< @@ -837,7 +836,7 @@ __pyx_1 = (__pyx_v_projxyout.u == HUGE_VAL); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":79 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":78 * # change it to a real (but very large) number. * if projxyout.u == HUGE_VAL: * lonsdata[i] = 1.e30 # <<<<<<<<<<<<<< @@ -849,7 +848,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":81 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":80 * lonsdata[i] = 1.e30 * else: * lonsdata[i] = projxyout.u # <<<<<<<<<<<<<< @@ -860,7 +859,7 @@ } __pyx_L11:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":82 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":81 * else: * lonsdata[i] = projxyout.u * if projxyout.v == HUGE_VAL: # <<<<<<<<<<<<<< @@ -870,7 +869,7 @@ __pyx_1 = (__pyx_v_projxyout.v == HUGE_VAL); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":83 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":82 * lonsdata[i] = projxyout.u * if projxyout.v == HUGE_VAL: * latsdata[i] = 1.e30 # <<<<<<<<<<<<<< @@ -882,7 +881,7 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":85 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":84 * latsdata[i] = 1.e30 * else: * latsdata[i] = projxyout.v # <<<<<<<<<<<<<< @@ -906,7 +905,7 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":87 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":86 * latsdata[i] = projxyout.v * * def _inv(self, object x, object y, radians=False, errcheck=False): # <<<<<<<<<<<<<< @@ -914,9 +913,9 @@ * inverse transformation - x,y to lons,lats (done in place). */ -static PyObject *__pyx_k_9p; +static PyObject *__pyx_k_8p; -static char __pyx_k_9[] = "Buffer lengths not the same"; +static char __pyx_k_8[] = "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 "; @@ -956,7 +955,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 = 87; __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 = 86; __pyx_clineno = __LINE__; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; @@ -964,7 +963,7 @@ return NULL; __pyx_L3:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":101 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":100 * cdef double *xdatab, *ydatab * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(x, &xdata, &buflenx) <> 0: # <<<<<<<<<<<<<< @@ -974,7 +973,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":102 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":101 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(x, &xdata, &buflenx) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -982,12 +981,12 @@ * raise RuntimeError */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L4; } __pyx_L4:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":103 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":102 * if PyObject_AsWriteBuffer(x, &xdata, &buflenx) <> 0: * raise RuntimeError * if PyObject_AsWriteBuffer(y, &ydata, &bufleny) <> 0: # <<<<<<<<<<<<<< @@ -997,7 +996,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":104 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":103 * raise RuntimeError * if PyObject_AsWriteBuffer(y, &ydata, &bufleny) <> 0: * raise RuntimeError # <<<<<<<<<<<<<< @@ -1005,12 +1004,12 @@ * # (for numpy/regular python arrays). */ __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L5; } __pyx_L5:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":107 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":106 * # process data in buffer * # (for numpy/regular python arrays). * if buflenx != bufleny: # <<<<<<<<<<<<<< @@ -1020,42 +1019,42 @@ __pyx_1 = (__pyx_v_buflenx != __pyx_v_bufleny); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":108 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":107 * # (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 = 108; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_k_9p); - PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k_9p); - __pyx_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1;} + __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;} 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 = 108; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L6; } __pyx_L6:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":109 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":108 * 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 = 109; __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 = 109; __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 = 109; __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 = 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;} 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 = 109; __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 = 108; __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":110 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":109 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenx/_doublesize * xdatab = <double *>xdata # <<<<<<<<<<<<<< @@ -1064,7 +1063,7 @@ */ __pyx_v_xdatab = ((double *)__pyx_v_xdata); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":111 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":110 * ndim = buflenx/_doublesize * xdatab = <double *>xdata * ydatab = <double *>ydata # <<<<<<<<<<<<<< @@ -1073,7 +1072,7 @@ */ __pyx_v_ydatab = ((double *)__pyx_v_ydata); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":112 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":111 * xdatab = <double *>xdata * ydatab = <double *>ydata * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< @@ -1082,7 +1081,7 @@ */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":113 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":112 * ydatab = <double *>ydata * for i from 0 <= i < ndim: * projxyin.u = xdatab[i] # <<<<<<<<<<<<<< @@ -1091,7 +1090,7 @@ */ __pyx_v_projxyin.u = (__pyx_v_xdatab[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":114 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":113 * for i from 0 <= i < ndim: * projxyin.u = xdatab[i] * projxyin.v = ydatab[i] # <<<<<<<<<<<<<< @@ -1100,7 +1099,7 @@ */ __pyx_v_projxyin.v = (__pyx_v_ydatab[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":115 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":114 * projxyin.u = xdatab[i] * projxyin.v = ydatab[i] * projlonlatout = pj_inv(projxyin,self.projpj) # <<<<<<<<<<<<<< @@ -1109,7 +1108,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":116 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":115 * projxyin.v = ydatab[i] * projlonlatout = pj_inv(projxyin,self.projpj) * if errcheck and pj_errno != 0: # <<<<<<<<<<<<<< @@ -1118,36 +1117,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 = 116; __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;} 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 = 116; __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 = 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 = 116; __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;} Py_DECREF(__pyx_2); __pyx_2 = 0; if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":117 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":116 * 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 = 117; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __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 = 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;} 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 = 117; __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 = 116; __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 = 117; __pyx_clineno = __LINE__; goto __pyx_L1;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1;} goto __pyx_L9; } __pyx_L9:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":120 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":119 * # since HUGE_VAL can be 'inf', * # change it to a real (but very large) number. * if projlonlatout.u == HUGE_VAL: # <<<<<<<<<<<<<< @@ -1157,7 +1156,7 @@ __pyx_1 = (__pyx_v_projlonlatout.u == HUGE_VAL); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":121 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":120 * # change it to a real (but very large) number. * if projlonlatout.u == HUGE_VAL: * xdatab[i] = 1.e30 # <<<<<<<<<<<<<< @@ -1168,17 +1167,17 @@ goto __pyx_L10; } - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":122 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":121 * 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 = 122; __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 = 121; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":123 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":122 * xdatab[i] = 1.e30 * elif radians: * xdatab[i] = projlonlatout.u # <<<<<<<<<<<<<< @@ -1190,25 +1189,25 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":125 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":124 * 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 = 125; __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 = 125; __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 = 125; __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 = 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;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_2); __pyx_2 = 0; (__pyx_v_xdatab[__pyx_v_i]) = __pyx_6; } __pyx_L10:; - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":126 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":125 * else: * xdatab[i] = _rad2dg*projlonlatout.u * if projlonlatout.v == HUGE_VAL: # <<<<<<<<<<<<<< @@ -1218,7 +1217,7 @@ __pyx_1 = (__pyx_v_projlonlatout.v == HUGE_VAL); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":127 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":126 * xdatab[i] = _rad2dg*projlonlatout.u * if projlonlatout.v == HUGE_VAL: * ydatab[i] = 1.e30 # <<<<<<<<<<<<<< @@ -1229,17 +1228,17 @@ goto __pyx_L11; } - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":128 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":127 * if projlonlatout.v == HUGE_VAL: * ydatab[i] = 1.e30 * elif radians: # <<<<<<<<<<<<<< * ydatab[i] = projlonlatout.v * else: */ - __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __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 = 127; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":129 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":128 * ydatab[i] = 1.e30 * elif radians: * ydatab[i] = projlonlatout.v # <<<<<<<<<<<<<< @@ -1251,19 +1250,19 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":131 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_proj.pyx":130 * ydatab[i] = projlonlatout.v * else: * ydatab[i] = _rad2dg*projlonlatout.v # <<<<<<<<<<<<<< * * def _fwdn(self, c_numpy.ndarray lonlat, radians=False, errcheck=False):... [truncated message content] |
From: <js...@us...> - 2008-06-13 20:29:03
|
Revision: 5522 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5522&view=rev Author: jswhit Date: 2008-06-13 13:29:00 -0700 (Fri, 13 Jun 2008) Log Message: ----------- regenerated with Cython 0.9.8 Modified Paths: -------------- trunk/toolkits/basemap/src/_geod.c trunk/toolkits/basemap/src/_geoslib.c trunk/toolkits/basemap/src/_proj.c Modified: trunk/toolkits/basemap/src/_geod.c =================================================================== --- trunk/toolkits/basemap/src/_geod.c 2008-06-13 20:15:42 UTC (rev 5521) +++ trunk/toolkits/basemap/src/_geod.c 2008-06-13 20:29:00 UTC (rev 5522) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.14 on Fri May 30 16:08:08 2008 */ +/* Generated by Cython 0.9.8 on Fri Jun 13 14:28:31 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -6,6 +6,12 @@ #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#if PY_VERSION_HEX < 0x02040000 + #define METH_COEXIST 0 +#endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX @@ -15,9 +21,69 @@ #define PyNumber_Index(o) PyNumber_Int(o) #define PyIndex_Check(o) PyNumber_Check(o) #endif -#if PY_VERSION_HEX < 0x02040000 - #define METH_COEXIST 0 +#if PY_VERSION_HEX < 0x02060000 + #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) + #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) + #define Py_SIZE(ob) ((PyVarObject*)(ob))->ob_size) + #define PyVarObject_HEAD_INIT(type, size) \ + PyObject_HEAD_INIT(type) size, + + typedef struct { + void *buf; + Py_ssize_t len; + int readonly; + const char *format; + int ndim; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + Py_ssize_t itemsize; + void *internal; + } Py_buffer; + + #define PyBUF_SIMPLE 0 + #define PyBUF_WRITABLE 0x0001 + #define PyBUF_LOCK 0x0002 + #define PyBUF_FORMAT 0x0004 + #define PyBUF_ND 0x0008 + #define PyBUF_STRIDES (0x0010 | PyBUF_ND) + #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) + #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) + #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) + #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #endif +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#endif +#if PY_MAJOR_VERSION >= 3 + #define Py_TPFLAGS_CHECKTYPES 0 + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyString_Type PyBytes_Type + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#else + #define PyBytes_Type PyString_Type +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) +#endif #ifndef __stdcall #define __stdcall #endif @@ -30,6 +96,7 @@ #define __PYX_EXTERN_C extern #endif #include <math.h> +#define __PYX_HAVE_API___geod #include "stdlib.h" #include "math.h" #include "geodesic.h" @@ -44,8 +111,7 @@ #define INLINE #endif -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; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/ @@ -54,6 +120,14 @@ /* Type Conversion Predeclarations */ +#if PY_MAJOR_VERSION < 3 +#define __Pyx_PyBytes_FromString PyString_FromString +#define __Pyx_PyBytes_AsString PyString_AsString +#else +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_AsString PyBytes_AsString +#endif + #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); static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x); @@ -93,9 +167,9 @@ static PyObject *__pyx_empty_tuple; static int __pyx_lineno; static int __pyx_clineno = 0; -static char * __pyx_cfilenm= __FILE__; -static char *__pyx_filename; -static char **__pyx_f; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; +static const char **__pyx_f; static INLINE void __Pyx_RaiseArgtupleTooLong(Py_ssize_t num_expected, Py_ssize_t num_found); /*proto*/ @@ -105,18 +179,16 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ -static void __Pyx_AddTraceback(char *funcname); /*proto*/ +static void __Pyx_AddTraceback(const char *funcname); /*proto*/ -/* Declarations */ +/* Type declarations */ -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":5 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":5 * include "_pyproj.pxi" * - * cdef class Geod: # <<<<<<<<<<<<<< + * cdef class Geod: # <<<<<<<<<<<<<< * cdef GEODESIC_T geodesic_t * cdef public object geodstring */ @@ -128,39 +200,55 @@ PyObject *proj_version; char *geodinitstring; }; +/* Module declarations from _geod */ static PyTypeObject *__pyx_ptype_5_geod_Geod = 0; /* Implementation of _geod */ -static char __pyx_k_2[] = "1.8.5"; +static char __pyx_k_3[] = "1.8.6"; -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 char __pyx_k___cinit__[] = "__cinit__"; +static char __pyx_k___reduce__[] = "__reduce__"; +static char __pyx_k__fwd[] = "_fwd"; +static char __pyx_k__inv[] = "_inv"; +static char __pyx_k__npts[] = "_npts"; +static char __pyx_k_math[] = "math"; +static char __pyx_k_radians[] = "radians"; +static char __pyx_k_1[] = "_dg2rad"; +static char __pyx_k_degrees[] = "degrees"; +static char __pyx_k_2[] = "_rad2dg"; +static char __pyx_k__doublesize[] = "_doublesize"; +static char __pyx_k___version__[] = "__version__"; -static PyObject *__pyx_k_2p; +static PyObject *__pyx_kp___cinit__; +static PyObject *__pyx_kp___reduce__; +static PyObject *__pyx_kp__fwd; +static PyObject *__pyx_kp__inv; +static PyObject *__pyx_kp__npts; +static PyObject *__pyx_kp_math; +static PyObject *__pyx_kp_radians; +static PyObject *__pyx_kp_1; +static PyObject *__pyx_kp_degrees; +static PyObject *__pyx_kp_2; +static PyObject *__pyx_kp__doublesize; +static PyObject *__pyx_kp___version__; -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":11 +static PyObject *__pyx_kp_3; + +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":11 * cdef char *geodinitstring * - * def __new__(self, geodstring): # <<<<<<<<<<<<<< + * def __new__(self, geodstring): # <<<<<<<<<<<<<< * cdef GEODESIC_T GEOD_T * # setup geod initialization string. */ -static PyObject *__pyx_n_RuntimeError; +static char __pyx_k_RuntimeError[] = "RuntimeError"; +static PyObject *__pyx_kp_RuntimeError; + static PyObject *__pyx_builtin_RuntimeError; static int __pyx_pf_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ @@ -184,10 +272,10 @@ return -1; __pyx_L3:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":14 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":14 * cdef GEODESIC_T GEOD_T * # setup geod initialization string. - * self.geodstring = geodstring # <<<<<<<<<<<<<< + * self.geodstring = geodstring # <<<<<<<<<<<<<< * self.geodinitstring = PyString_AsString(self.geodstring) * # initialize projection */ @@ -195,42 +283,42 @@ Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring = __pyx_v_geodstring; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":15 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":15 * # setup geod initialization string. * self.geodstring = geodstring - * self.geodinitstring = PyString_AsString(self.geodstring) # <<<<<<<<<<<<<< + * self.geodinitstring = PyString_AsString(self.geodstring) # <<<<<<<<<<<<<< * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring = PyString_AsString(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":17 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":17 * self.geodinitstring = PyString_AsString(self.geodstring) * # initialize projection - * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< + * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) */ ((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]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":18 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":18 * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] - * if pj_errno != 0: # <<<<<<<<<<<<<< + * if pj_errno != 0: # <<<<<<<<<<<<<< * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. */ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":19 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":19 * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< + * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< * self.proj_version = PJ_VERSION/100. * */ - __pyx_2 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; @@ -243,10 +331,10 @@ } __pyx_L4:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":20 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":20 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) - * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< + * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< * * def __reduce__(self): */ @@ -266,16 +354,18 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":22 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":22 * self.proj_version = PJ_VERSION/100. * - * def __reduce__(self): # <<<<<<<<<<<<<< + * def __reduce__(self): # <<<<<<<<<<<<<< * """special method that allows pyproj.Geod instance to be pickled""" * return (self.__class__,(self.geodstring,)) */ -static PyObject *__pyx_n___class__; +static char __pyx_k___class__[] = "__class__"; +static PyObject *__pyx_kp___class__; + 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_pf_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused) { @@ -284,14 +374,14 @@ PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":24 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":24 * def __reduce__(self): * """special method that allows pyproj.Geod instance to be pickled""" - * return (self.__class__,(self.geodstring,)) # <<<<<<<<<<<<<< + * return (self.__class__,(self.geodstring,)) # <<<<<<<<<<<<<< * * 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 = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); @@ -316,23 +406,25 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":26 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":26 * return (self.__class__,(self.geodstring,)) * - * def _fwd(self, object lons, object lats, object az, object dist, radians=False): # <<<<<<<<<<<<<< + * def _fwd(self, object lons, object lats, object az, object dist, radians=False): # <<<<<<<<<<<<<< * """ - * forward transformation - determine longitude, latitude and back azimuth + * forward transformation - determine longitude, latitude and back azimuth */ -static PyObject *__pyx_n_ValueError; +static char __pyx_k_ValueError[] = "ValueError"; -static PyObject *__pyx_k_3p; -static PyObject *__pyx_k_4p; +static PyObject *__pyx_kp_ValueError; +static PyObject *__pyx_kp_4; +static PyObject *__pyx_kp_5; + static PyObject *__pyx_builtin_ValueError; -static char __pyx_k_3[] = "Buffer lengths not the same"; -static char __pyx_k_4[] = "undefined forward geodesic (may be an equatorial arc)"; +static char __pyx_k_4[] = "Buffer lengths not the same"; +static char __pyx_k_5[] = "undefined forward geodesic (may be an equatorial arc)"; 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 "; @@ -385,20 +477,20 @@ return NULL; __pyx_L3:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":37 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":37 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. - * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":38 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":38 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError */ @@ -408,20 +500,20 @@ } __pyx_L4:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":39 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":39 * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":40 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":40 * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError */ @@ -431,20 +523,20 @@ } __pyx_L5:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":41 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":41 * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":42 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":42 * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: * raise RuntimeError */ @@ -454,20 +546,20 @@ } __pyx_L6:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":43 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":43 * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * # process data in buffer */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":44 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":44 * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: */ @@ -477,10 +569,10 @@ } __pyx_L7:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":46 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":46 * raise RuntimeError * # process data in buffer - * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< + * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize */ @@ -494,16 +586,16 @@ __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":47 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":47 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: - * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< + * 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 = 47; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_k_3p); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_3p); + Py_INCREF(__pyx_kp_4); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_4); __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); @@ -513,15 +605,15 @@ } __pyx_L8:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":48 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":48 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") - * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< + * 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 = 48; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; @@ -529,92 +621,92 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":49 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":49 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize - * lonsdata = <double *>londata # <<<<<<<<<<<<<< + * lonsdata = <double *>londata # <<<<<<<<<<<<<< * latsdata = <double *>latdata * azdata = <double *>azdat */ __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":50 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":50 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata - * latsdata = <double *>latdata # <<<<<<<<<<<<<< + * latsdata = <double *>latdata # <<<<<<<<<<<<<< * azdata = <double *>azdat * distdata = <double *>distdat */ __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":51 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":51 * lonsdata = <double *>londata * latsdata = <double *>latdata - * azdata = <double *>azdat # <<<<<<<<<<<<<< + * azdata = <double *>azdat # <<<<<<<<<<<<<< * distdata = <double *>distdat * for i from 0 <= i < ndim: */ __pyx_v_azdata = ((double *)__pyx_v_azdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":52 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":52 * latsdata = <double *>latdata * azdata = <double *>azdat - * distdata = <double *>distdat # <<<<<<<<<<<<<< + * distdata = <double *>distdat # <<<<<<<<<<<<<< * for i from 0 <= i < ndim: * if radians: */ __pyx_v_distdata = ((double *)__pyx_v_distdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":53 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":53 * azdata = <double *>azdat * distdata = <double *>distdat - * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< + * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< * if radians: * self.geodesic_t.p1.v = lonsdata[i] */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":54 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":54 * distdata = <double *>distdat * for i from 0 <= i < ndim: - * if radians: # <<<<<<<<<<<<<< + * 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 = 54; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":55 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":55 * for i from 0 <= i < ndim: * if radians: - * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":56 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":56 * if radians: * self.geodesic_t.p1.v = lonsdata[i] - * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.ALPHA12 = azdata[i] * self.geodesic_t.DIST = distdata[i] */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":57 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":57 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] - * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.DIST = distdata[i] * else: */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = (__pyx_v_azdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":58 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":58 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] - * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] */ @@ -623,14 +715,14 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":60 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":60 * self.geodesic_t.DIST = distdata[i] * else: - * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< + * 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 = 60; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -639,14 +731,14 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":61 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":61 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] - * self.geodesic_t.p1.u = _dg2rad*latsdata[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 = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -655,14 +747,14 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":62 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":62 * 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.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 = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -671,10 +763,10 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":63 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":63 * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] - * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< * geod_pre(&self.geodesic_t) * if pj_errno != 0: */ @@ -682,33 +774,33 @@ } __pyx_L11:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":64 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":64 * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] - * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< + * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":65 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":65 * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) - * if pj_errno != 0: # <<<<<<<<<<<<<< + * if pj_errno != 0: # <<<<<<<<<<<<<< * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) */ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":66 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":66 * geod_pre(&self.geodesic_t) * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< + * 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 = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; @@ -721,33 +813,33 @@ } __pyx_L12:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":67 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":67 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) - * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< + * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":68 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":68 * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) - * if pj_errno != 0: # <<<<<<<<<<<<<< + * if pj_errno != 0: # <<<<<<<<<<<<<< * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): */ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":69 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":69 * geod_for(&self.geodesic_t) * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< + * 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 = 69; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_PyBytes_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; @@ -760,26 +852,26 @@ } __pyx_L13:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":70 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":70 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) - * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< + * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: */ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (__pyx_8) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":71 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":71 * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): - * raise ValueError('undefined forward geodesic (may be an equatorial arc)') # <<<<<<<<<<<<<< + * 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 = 71; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_k_4p); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_4p); + Py_INCREF(__pyx_kp_5); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_5); __pyx_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); @@ -789,38 +881,38 @@ } __pyx_L14:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":72 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":72 * if isnan(self.geodesic_t.ALPHA21): * raise ValueError('undefined forward geodesic (may be an equatorial arc)') - * if radians: # <<<<<<<<<<<<<< + * 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 = 72; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":73 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":73 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: - * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< + * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< * latsdata[i] = self.geodesic_t.p2.u * azdata[i] = self.geodesic_t.ALPHA21 */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":74 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":74 * if radians: * lonsdata[i] = self.geodesic_t.p2.v - * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< + * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< * azdata[i] = self.geodesic_t.ALPHA21 * else: */ (__pyx_v_latsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":75 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":75 * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u - * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< + * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v */ @@ -829,14 +921,14 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":77 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":77 * azdata[i] = self.geodesic_t.ALPHA21 * else: - * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< + * 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 = 77; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; 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 = 77; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; @@ -845,14 +937,14 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":78 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":78 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v - * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< + * 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 = 78; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; 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 = 78; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; @@ -861,14 +953,14 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":79 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":79 * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u - * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< + * 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 = 79; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; 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 = 79; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; @@ -892,19 +984,19 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":81 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":81 * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * - * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): # <<<<<<<<<<<<<< + * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): # <<<<<<<<<<<<<< * """ * inverse transformation - return forward and back azimuths, plus distance */ -static PyObject *__pyx_k_5p; -static PyObject *__pyx_k_6p; +static PyObject *__pyx_kp_6; +static PyObject *__pyx_kp_7; -static char __pyx_k_5[] = "Buffer lengths not the same"; -static char __pyx_k_6[] = "undefined inverse geodesic (may be an antipodal point)"; +static char __pyx_k_6[] = "Buffer lengths not the same"; +static char __pyx_k_7[] = "undefined inverse geodesic (may be an antipodal point)"; 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 "; @@ -957,20 +1049,20 @@ return NULL; __pyx_L3:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":91 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":91 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. - * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":92 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":92 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError */ @@ -980,20 +1072,20 @@ } __pyx_L4:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":93 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":93 * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":94 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":94 * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError */ @@ -1003,20 +1095,20 @@ } __pyx_L5:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":95 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":95 * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":96 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":96 * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: * raise RuntimeError */ @@ -1026,20 +1118,20 @@ } __pyx_L6:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":97 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":97 * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * # process data in buffer */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":98 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":98 * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: */ @@ -1049,10 +1141,10 @@ } __pyx_L7:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":100 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":100 * raise RuntimeError * # process data in buffer - * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< + * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize */ @@ -1066,16 +1158,16 @@ __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":101 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":101 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: - * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< + * 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 = 101; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_k_5p); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_5p); + Py_INCREF(__pyx_kp_6); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_6); __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); @@ -1085,15 +1177,15 @@ } __pyx_L8:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":102 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":102 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") - * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< + * 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 = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; @@ -1101,92 +1193,92 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":103 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":103 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize - * lonsdata = <double *>londata # <<<<<<<<<<<<<< + * lonsdata = <double *>londata # <<<<<<<<<<<<<< * latsdata = <double *>latdata * azdata = <double *>azdat */ __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":104 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":104 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata - * latsdata = <double *>latdata # <<<<<<<<<<<<<< + * latsdata = <double *>latdata # <<<<<<<<<<<<<< * azdata = <double *>azdat * distdata = <double *>distdat */ __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":105 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":105 * lonsdata = <double *>londata * latsdata = <double *>latdata - * azdata = <double *>azdat # <<<<<<<<<<<<<< + * azdata = <double *>azdat # <<<<<<<<<<<<<< * distdata = <double *>distdat * for i from 0 <= i < ndim: */ __pyx_v_azdata = ((double *)__pyx_v_azdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":106 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":106 * latsdata = <double *>latdata * azdata = <double *>azdat - * distdata = <double *>distdat # <<<<<<<<<<<<<< + * distdata = <double *>distdat # <<<<<<<<<<<<<< * for i from 0 <= i < ndim: * if radians: */ __pyx_v_distdata = ((double *)__pyx_v_distdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":107 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":107 * azdata = <double *>azdat * distdata = <double *>distdat - * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< + * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< * if radians: * self.geodesic_t.p1.v = lonsdata[i] */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":108 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":108 * distdata = <double *>distdat * for i from 0 <= i < ndim: - * if radians: # <<<<<<<<<<<<<< + * 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 = 108; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":109 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":109 * for i from 0 <= i < ndim: * if radians: - * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.p2.v = azdata[i] */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":110 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":110 * if radians: * self.geodesic_t.p1.v = lonsdata[i] - * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.p2.v = azdata[i] * self.geodesic_t.p2.u = distdata[i] */ ... [truncated message content] |