/* Generated by Cython 0.9.8 on Fri Jun 13 14:28:31 2008 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
#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
  #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
#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
#ifndef __cdecl
  #define __cdecl
#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#include <math.h>
#define __PYX_HAVE_API___geod
#include "stdlib.h"
#include "math.h"
#include "geodesic.h"
#include "proj_api.h"
#ifdef __GNUC__
#define INLINE __inline__
#elif _WIN32
#define INLINE __inline
#else
#define INLINE 
#endif
typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
static int __pyx_skip_dispatch = 0;
/* 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);
static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x);
static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b);
#define __pyx_PyInt_AsLong(x) (PyInt_CheckExact(x) ? PyInt_AS_LONG(x) : PyInt_AsLong(x))
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x);
static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x);
static INLINE char __pyx_PyInt_char(PyObject* x);
static INLINE short __pyx_PyInt_short(PyObject* x);
static INLINE int __pyx_PyInt_int(PyObject* x);
static INLINE long __pyx_PyInt_long(PyObject* x);
static INLINE signed char __pyx_PyInt_signed_char(PyObject* x);
static INLINE signed short __pyx_PyInt_signed_short(PyObject* x);
static INLINE signed int __pyx_PyInt_signed_int(PyObject* x);
static INLINE signed long __pyx_PyInt_signed_long(PyObject* x);
static INLINE long double __pyx_PyInt_long_double(PyObject* x);
#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)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static int __pyx_lineno;
static int __pyx_clineno = 0;
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*/
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
/* Type declarations */
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":5
 * include "_pyproj.pxi"
 * 
 * cdef class Geod:             # <<<<<<<<<<<<<<
 *     cdef GEODESIC_T geodesic_t
 *     cdef public object geodstring
 */
struct __pyx_obj_5_geod_Geod {
  PyObject_HEAD
  GEODESIC_T geodesic_t;
  PyObject *geodstring;
  PyObject *proj_version;
  char *geodinitstring;
};
/* Module declarations from _geod */
static PyTypeObject *__pyx_ptype_5_geod_Geod = 0;
/* Implementation of _geod */
static char __pyx_k_3[] = "1.8.6";
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_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__;
static PyObject *__pyx_kp_3;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":11
 *     cdef char *geodinitstring
 * 
 *     def __new__(self, geodstring):             # <<<<<<<<<<<<<<
 *         cdef GEODESIC_T GEOD_T
 *         # setup geod initialization string.
 */
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*/
static int __pyx_pf_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_geodstring = 0;
  GEODESIC_T __pyx_v_GEOD_T;
  int __pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {"geodstring",0};
  if (likely(!__pyx_kwds) && likely(PyTuple_GET_SIZE(__pyx_args) == 1)) {
    __pyx_v_geodstring = PyTuple_GET_ITEM(__pyx_args, 0);
  }
  else {
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_geodstring))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L2;}
  }
  goto __pyx_L3;
  __pyx_L2:;
  __Pyx_AddTraceback("_geod.Geod.__cinit__");
  return -1;
  __pyx_L3:;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":14
 *         cdef GEODESIC_T GEOD_T
 *         # setup geod initialization string.
 *         self.geodstring = geodstring             # <<<<<<<<<<<<<<
 *         self.geodinitstring = PyString_AsString(self.geodstring)
 *         # initialize projection
 */
  Py_INCREF(__pyx_v_geodstring);
  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/matplotlib/basemap/src/_geod.pyx":15
 *         # setup geod initialization string.
 *         self.geodstring = 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/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]             # <<<<<<<<<<<<<<
 *         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/matplotlib/basemap/src/_geod.pyx":18
 *         # 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_1 = (pj_errno != 0);
  if (__pyx_1) {
    /* "/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))             # <<<<<<<<<<<<<<
 *         self.proj_version = PJ_VERSION/100.
 * 
 */
    __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;
    __pyx_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1;}
    Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
    __Pyx_Raise(__pyx_2, 0, 0);
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L4;
  }
  __pyx_L4:;
  /* "/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.             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
 */
  __pyx_3 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; 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_3;
  __pyx_3 = 0;
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("_geod.Geod.__cinit__");
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":22
 *         self.proj_version = PJ_VERSION/100.
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """special method that allows pyproj.Geod instance to be pickled"""
 *         return (self.__class__,(self.geodstring,))
 */
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) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  /* "/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,))             # <<<<<<<<<<<<<<
 * 
 *     def _fwd(self, object lons, object lats, object az, object dist, radians=False):
 */
  __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);
  __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __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;
  __pyx_2 = 0;
  __pyx_r = ((PyObject *)__pyx_3);
  __pyx_3 = 0;
  goto __pyx_L0;
  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("_geod.Geod.__reduce__");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}
/* "/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):             # <<<<<<<<<<<<<<
 *         """
 *  forward transformation - determine longitude, latitude and back azimuth
 */
static char __pyx_k_ValueError[] = "ValueError";
static PyObject *__pyx_kp_ValueError;
static PyObject *__pyx_kp_4;
static PyObject *__pyx_kp_5;
static PyObject *__pyx_builtin_ValueError;
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        ";
static PyObject *__pyx_pf_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_lons = 0;
  PyObject *__pyx_v_lats = 0;
  PyObject *__pyx_v_az = 0;
  PyObject *__pyx_v_dist = 0;
  PyObject *__pyx_v_radians = 0;
  Py_ssize_t __pyx_v_buflenlons;
  Py_ssize_t __pyx_v_buflenlats;
  Py_ssize_t __pyx_v_buflenaz;
  Py_ssize_t __pyx_v_buflend;
  Py_ssize_t __pyx_v_ndim;
  Py_ssize_t __pyx_v_i;
  double *__pyx_v_lonsdata;
  double *__pyx_v_latsdata;
  double *__pyx_v_azdata;
  double *__pyx_v_distdata;
  void *__pyx_v_londata;
  void *__pyx_v_latdata;
  void *__pyx_v_azdat;
  void *__pyx_v_distdat;
  PyObject *__pyx_r;
  int __pyx_1;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  Py_ssize_t __pyx_6 = 0;
  double __pyx_7;
  int __pyx_8;
  static char *__pyx_argnames[] = {"lons","lats","az","dist","radians",0};
  __pyx_v_radians = Py_False;
  if (likely(!__pyx_kwds) && likely(4 <= PyTuple_GET_SIZE(__pyx_args)) && likely(PyTuple_GET_SIZE(__pyx_args) <= 5)) {
    __pyx_v_lons = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_lats = PyTuple_GET_ITEM(__pyx_args, 1);
    __pyx_v_az = PyTuple_GET_ITEM(__pyx_args, 2);
    __pyx_v_dist = PyTuple_GET_ITEM(__pyx_args, 3);
    if (PyTuple_GET_SIZE(__pyx_args) > 4) {
      __pyx_v_radians = PyTuple_GET_ITEM(__pyx_args, 4);
    }
  }
  else {
    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))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L2;}
  }
  goto __pyx_L3;
  __pyx_L2:;
  __Pyx_AddTraceback("_geod.Geod._fwd");
  return NULL;
  __pyx_L3:;
  /* "/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:             # <<<<<<<<<<<<<<
 *             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/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             # <<<<<<<<<<<<<<
 *         if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0:
 *             raise RuntimeError
 */
    __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L4;
  }
  __pyx_L4:;
  /* "/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:             # <<<<<<<<<<<<<<
 *             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/matplotlib/basemap/src/_geod.pyx":40
 *             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 = 40; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L5;
  }
  __pyx_L5:;
  /* "/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:             # <<<<<<<<<<<<<<
 *             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/matplotlib/basemap/src/_geod.pyx":42
 *             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 = 42; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L6;
  }
  __pyx_L6:;
  /* "/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:             # <<<<<<<<<<<<<<
 *             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/matplotlib/basemap/src/_geod.pyx":44
 *             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 = 44; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L7;
  }
  __pyx_L7:;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":46
 *             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);
    if (__pyx_1) {
      __pyx_1 = (__pyx_v_buflenaz == __pyx_v_buflend);
    }
  }
  __pyx_2 = (!__pyx_1);
  if (__pyx_2) {
    /* "/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")             # <<<<<<<<<<<<<<
 *         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_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);
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L8;
  }
  __pyx_L8:;
  /* "/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             # <<<<<<<<<<<<<<
 *         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_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;
  __pyx_6 = __pyx_PyIndex_AsSsize_t(__pyx_5); if (unlikely((__pyx_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  __pyx_v_ndim = __pyx_6;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":49
 *             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);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":50
 *         ndim = buflenlons/_doublesize
 *         lonsdata = <double *>londata
 *         latsdata = <double *>latdata             # <<<<<<<<<<<<<<
 *         azdata = <double *>azdat
 *         distdata = <double *>distdat
 */
  __pyx_v_latsdata = ((double *)__pyx_v_latdata);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":51
 *         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);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":52
 *         latsdata = <double *>latdata
 *         azdata = <double *>azdat
 *         distdata = <double *>distdat             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < ndim:
 *             if radians:
 */
  __pyx_v_distdata = ((double *)__pyx_v_distdat);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":53
 *         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++) {
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":54
 *         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 = 54; __pyx_clineno = __LINE__; goto __pyx_L1;}
    if (__pyx_1) {
      /* "/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.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/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.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/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.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/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]             # <<<<<<<<<<<<<<
 *             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_L11;
    }
    /*else*/ {
      /* "/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.u = _dg2rad*latsdata[i]
 *                 self.geodesic_t.ALPHA12 = _dg2rad*azdata[i]
 */
      __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;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; 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;
      /* "/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.ALPHA12 = _dg2rad*azdata[i]
 *                 self.geodesic_t.DIST = distdata[i]
 */
      __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;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; 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;
      /* "/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.DIST = distdata[i]
 *             geod_pre(&self.geodesic_t)
 */
      __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;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_7;
      /* "/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]             # <<<<<<<<<<<<<<
 *             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_L11:;
    /* "/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)             # <<<<<<<<<<<<<<
 *             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/matplotlib/basemap/src/_geod.pyx":65
 *                 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) {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":66
 *             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 = __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;
      __pyx_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(((PyObject *)__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 = 66; __pyx_clineno = __LINE__; goto __pyx_L1;}
      goto __pyx_L12;
    }
    __pyx_L12:;
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":67
 *             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));
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":68
 *                 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):
 */
    __pyx_1 = (pj_errno != 0);
    if (__pyx_1) {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":69
 *             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 = __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;
      __pyx_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
      __Pyx_Raise(__pyx_5, 0, 0);
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1;}
      goto __pyx_L13;
    }
    __pyx_L13:;
    /* "/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):             # <<<<<<<<<<<<<<
 *                 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/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)')             # <<<<<<<<<<<<<<
 *             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_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);
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1;}
      goto __pyx_L14;
    }
    __pyx_L14:;
    /* "/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:             # <<<<<<<<<<<<<<
 *                 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/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             # <<<<<<<<<<<<<<
 *                 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/matplotlib/basemap/src/_geod.pyx":74
 *             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;
      /* "/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             # <<<<<<<<<<<<<<
 *             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_L15;
    }
    /*else*/ {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":77
 *                 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_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;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7;
      /* "/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             # <<<<<<<<<<<<<<
 *                 azdata[i] = _rad2dg*self.geodesic_t.ALPHA21
 * 
 */
      __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;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7;
      /* "/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             # <<<<<<<<<<<<<<
 * 
 *     def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False):
 */
      __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;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      (__pyx_v_azdata[__pyx_v_i]) = __pyx_7;
    }
    __pyx_L15:;
  }
  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("_geod.Geod._fwd");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}
/* "/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):             # <<<<<<<<<<<<<<
 *         """
 *  inverse transformation - return forward and back azimuths, plus distance
 */
static PyObject *__pyx_kp_6;
static PyObject *__pyx_kp_7;
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        ";
static PyObject *__pyx_pf_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_lons1 = 0;
  PyObject *__pyx_v_lats1 = 0;
  PyObject *__pyx_v_lons2 = 0;
  PyObject *__pyx_v_lats2 = 0;
  PyObject *__pyx_v_radians = 0;
  Py_ssize_t __pyx_v_buflenlons;
  Py_ssize_t __pyx_v_buflenlats;
  Py_ssize_t __pyx_v_buflenaz;
  Py_ssize_t __pyx_v_buflend;
  Py_ssize_t __pyx_v_ndim;
  Py_ssize_t __pyx_v_i;
  double *__pyx_v_lonsdata;
  double *__pyx_v_latsdata;
  double *__pyx_v_azdata;
  double *__pyx_v_distdata;
  void *__pyx_v_londata;
  void *__pyx_v_latdata;
  void *__pyx_v_azdat;
  void *__pyx_v_distdat;
  PyObject *__pyx_r;
  int __pyx_1;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  Py_ssize_t __pyx_6 = 0;
  double __pyx_7;
  int __pyx_8;
  static char *__pyx_argnames[] = {"lons1","lats1","lons2","lats2","radians",0};
  __pyx_v_radians = Py_False;
  if (likely(!__pyx_kwds) && likely(4 <= PyTuple_GET_SIZE(__pyx_args)) && likely(PyTuple_GET_SIZE(__pyx_args) <= 5)) {
    __pyx_v_lons1 = PyTuple_GET_ITEM(__pyx_args, 0);
    __pyx_v_lats1 = PyTuple_GET_ITEM(__pyx_args, 1);
    __pyx_v_lons2 = PyTuple_GET_ITEM(__pyx_args, 2);
    __pyx_v_lats2 = PyTuple_GET_ITEM(__pyx_args, 3);
    if (PyTuple_GET_SIZE(__pyx_args) > 4) {
      __pyx_v_radians = PyTuple_GET_ITEM(__pyx_args, 4);
    }
  }
  else {
    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))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L2;}
  }
  goto __pyx_L3;
  __pyx_L2:;
  __Pyx_AddTraceback("_geod.Geod._inv");
  return NULL;
  __pyx_L3:;
  /* "/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:             # <<<<<<<<<<<<<<
 *             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/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             # <<<<<<<<<<<<<<
 *         if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0:
 *             raise RuntimeError
 */
    __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L4;
  }
  __pyx_L4:;
  /* "/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:             # <<<<<<<<<<<<<<
 *             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/matplotlib/basemap/src/_geod.pyx":94
 *             raise RuntimeError
 *         if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0:
 *             raise RuntimeError             # <<<<<<<<<<<<<<
 *         if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0:
 *             raise RuntimeError
 */
    __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L5;
  }
  __pyx_L5:;
  /* "/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:             # <<<<<<<<<<<<<<
 *             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/matplotlib/basemap/src/_geod.pyx":96
 *             raise RuntimeError
 *         if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0:
 *             raise RuntimeError             # <<<<<<<<<<<<<<
 *         if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0:
 *             raise RuntimeError
 */
    __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L6;
  }
  __pyx_L6:;
  /* "/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:             # <<<<<<<<<<<<<<
 *             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/matplotlib/basemap/src/_geod.pyx":98
 *             raise RuntimeError
 *         if PyObject_AsWriteBuffer(lats2, &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 = 98; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L7;
  }
  __pyx_L7:;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":100
 *             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);
    if (__pyx_1) {
      __pyx_1 = (__pyx_v_buflenaz == __pyx_v_buflend);
    }
  }
  __pyx_2 = (!__pyx_1);
  if (__pyx_2) {
    /* "/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")             # <<<<<<<<<<<<<<
 *         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_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);
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1;}
    goto __pyx_L8;
  }
  __pyx_L8:;
  /* "/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             # <<<<<<<<<<<<<<
 *         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_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;
  __pyx_6 = __pyx_PyIndex_AsSsize_t(__pyx_5); if (unlikely((__pyx_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  __pyx_v_ndim = __pyx_6;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":103
 *             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);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":104
 *         ndim = buflenlons/_doublesize
 *         lonsdata = <double *>londata
 *         latsdata = <double *>latdata             # <<<<<<<<<<<<<<
 *         azdata = <double *>azdat
 *         distdata = <double *>distdat
 */
  __pyx_v_latsdata = ((double *)__pyx_v_latdata);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":105
 *         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);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":106
 *         latsdata = <double *>latdata
 *         azdata = <double *>azdat
 *         distdata = <double *>distdat             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < ndim:
 *             if radians:
 */
  __pyx_v_distdata = ((double *)__pyx_v_distdat);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":107
 *         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++) {
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":108
 *         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 = 108; __pyx_clineno = __LINE__; goto __pyx_L1;}
    if (__pyx_1) {
      /* "/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.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/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.p2.v = azdata[i]
 *                 self.geodesic_t.p2.u = distdata[i]
 */
      ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]);
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":111
 *                 self.geodesic_t.p1.v = lonsdata[i]
 *                 self.geodesic_t.p1.u = latsdata[i]
 *                 self.geodesic_t.p2.v = azdata[i]             # <<<<<<<<<<<<<<
 *                 self.geodesic_t.p2.u = distdata[i]
 *             else:
 */
      ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = (__pyx_v_azdata[__pyx_v_i]);
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":112
 *                 self.geodesic_t.p1.u = latsdata[i]
 *                 self.geodesic_t.p2.v = azdata[i]
 *                 self.geodesic_t.p2.u = distdata[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 self.geodesic_t.p1.v = _dg2rad*lonsdata[i]
 */
      ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u = (__pyx_v_distdata[__pyx_v_i]);
      goto __pyx_L11;
    }
    /*else*/ {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":114
 *                 self.geodesic_t.p2.u = distdata[i]
 *             else:
 *                 self.geodesic_t.p1.v = _dg2rad*lonsdata[i]             # <<<<<<<<<<<<<<
 *                 self.geodesic_t.p1.u = _dg2rad*latsdata[i]
 *                 self.geodesic_t.p2.v = _dg2rad*azdata[i]
 */
      __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __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 = 114; __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 = 114; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; 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;
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":115
 *             else:
 *                 self.geodesic_t.p1.v = _dg2rad*lonsdata[i]
 *                 self.geodesic_t.p1.u = _dg2rad*latsdata[i]             # <<<<<<<<<<<<<<
 *                 self.geodesic_t.p2.v = _dg2rad*azdata[i]
 *                 self.geodesic_t.p2.u = _dg2rad*distdata[i]
 */
      __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __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 = 115; __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 = 115; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; 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;
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":116
 *                 self.geodesic_t.p1.v = _dg2rad*lonsdata[i]
 *                 self.geodesic_t.p1.u = _dg2rad*latsdata[i]
 *                 self.geodesic_t.p2.v = _dg2rad*azdata[i]             # <<<<<<<<<<<<<<
 *                 self.geodesic_t.p2.u = _dg2rad*distdata[i]
 *             geod_inv(&self.geodesic_t)
 */
      __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __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 = 116; __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 = 116; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1;}
      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/matplotlib/basemap/src/_geod.pyx":117
 *                 self.geodesic_t.p1.u = _dg2rad*latsdata[i]
 *                 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):
 */
      __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1;}
      __pyx_4 = PyFloat_FromDouble((__pyx_v_distdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __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 = 117; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u = __pyx_7;
    }
    __pyx_L11:;
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":118
 *                 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):
 *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
 */
    geod_inv((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t));
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":119
 *                 self.geodesic_t.p2.u = _dg2rad*distdata[i]
 *             geod_inv(&self.geodesic_t)
 *             if isnan(self.geodesic_t.DIST):             # <<<<<<<<<<<<<<
 *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
 *             if pj_errno != 0:
 */
    __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST);
    if (__pyx_8) {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":120
 *             geod_inv(&self.geodesic_t)
 *             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))
 */
      __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_INCREF(__pyx_kp_7);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_7);
      __pyx_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(((PyObject *)__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 = 120; __pyx_clineno = __LINE__; goto __pyx_L1;}
      goto __pyx_L12;
    }
    __pyx_L12:;
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":121
 *             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_2 = (pj_errno != 0);
    if (__pyx_2) {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":122
 *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
 *             if pj_errno != 0:
 *                 raise RuntimeError(pj_strerrno(pj_errno))             # <<<<<<<<<<<<<<
 *             if radians:
 *                 lonsdata[i] = self.geodesic_t.ALPHA12
 */
      __pyx_5 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1;}
      __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5);
      __pyx_5 = 0;
      __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(((PyObject *)__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 = 122; __pyx_clineno = __LINE__; goto __pyx_L1;}
      goto __pyx_L13;
    }
    __pyx_L13:;
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":123
 *             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 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1;}
    if (__pyx_1) {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":124
 *                 raise RuntimeError(pj_strerrno(pj_errno))
 *             if radians:
 *                 lonsdata[i] = self.geodesic_t.ALPHA12             # <<<<<<<<<<<<<<
 *                 latsdata[i] = self.geodesic_t.ALPHA21
 *             else:
 */
      (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12;
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":125
 *             if radians:
 *                 lonsdata[i] = self.geodesic_t.ALPHA12
 *                 latsdata[i] = self.geodesic_t.ALPHA21             # <<<<<<<<<<<<<<
 *             else:
 *                 lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12
 */
      (__pyx_v_latsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21;
      goto __pyx_L14;
    }
    /*else*/ {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":127
 *                 latsdata[i] = self.geodesic_t.ALPHA21
 *             else:
 *                 lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12             # <<<<<<<<<<<<<<
 *                 latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21
 *             azdata[i] = self.geodesic_t.DIST
 */
      __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1;}
      __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __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 = 127; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7;
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":128
 *             else:
 *                 lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12
 *                 latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21             # <<<<<<<<<<<<<<
 *             azdata[i] = self.geodesic_t.DIST
 * 
 */
      __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __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 = 128; __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 = 128; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_7 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7;
    }
    __pyx_L14:;
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":129
 *                 lonsdata[i] = _rad2dg*self.geodesic_t.ALPHA12
 *                 latsdata[i] = _rad2dg*self.geodesic_t.ALPHA21
 *             azdata[i] = self.geodesic_t.DIST             # <<<<<<<<<<<<<<
 * 
 *     def _npts(self, double lon1, double lat1, double lon2, double lat2, int npts, radians=False):
 */
    (__pyx_v_azdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST;
  }
  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("_geod.Geod._inv");
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":131
 *             azdata[i] = self.geodesic_t.DIST
 * 
 *     def _npts(self, double lon1, double lat1, double lon2, double lat2, int npts, radians=False):             # <<<<<<<<<<<<<<
 *         """
 *  given initial and terminus lat/lon, find npts intermediate points."""
 */
static PyObject *__pyx_pf_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_pf_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;
  double __pyx_v_lat2;
  int __pyx_v_npts;
  PyObject *__pyx_v_radians = 0;
  int __pyx_v_i;
  double __pyx_v_del_s;
  PyObject *__pyx_v_lats;
  PyObject *__pyx_v_lons;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  double __pyx_5;
  long __pyx_6;
  static char *__pyx_argnames[] = {"lon1","lat1","lon2","lat2","npts","radians",0};
  __pyx_v_radians = Py_False;
  if (likely(!__pyx_kwds) && likely(5 <= PyTuple_GET_SIZE(__pyx_args)) && likely(PyTuple_GET_SIZE(__pyx_args) <= 6)) {
    __pyx_v_lon1 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L2;}
    __pyx_v_lat1 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L2;}
    __pyx_v_lon2 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L2;}
    __pyx_v_lat2 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L2;}
    __pyx_v_npts = __pyx_PyInt_int(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_npts == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L2;}
    if (PyTuple_GET_SIZE(__pyx_args) > 5) {
      __pyx_v_radians = PyTuple_GET_ITEM(__pyx_args, 5);
    }
  }
  else {
    if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "ddddi|O", __pyx_argnames, &__pyx_v_lon1, &__pyx_v_lat1, &__pyx_v_lon2, &__pyx_v_lat2, &__pyx_v_npts, &__pyx_v_radians))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L2;}
  }
  goto __pyx_L3;
  __pyx_L2:;
  __Pyx_AddTraceback("_geod.Geod._npts");
  return NULL;
  __pyx_L3:;
  __pyx_v_lats = Py_None; Py_INCREF(Py_None);
  __pyx_v_lons = Py_None; Py_INCREF(Py_None);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":136
 *         cdef int i
 *         cdef double del_s
 *         if radians:             # <<<<<<<<<<<<<<
 *             self.geodesic_t.p1.v = lon1
 *             self.geodesic_t.p1.u = lat1
 */
  __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1;}
  if (__pyx_1) {
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":137
 *         cdef double del_s
 *         if radians:
 *             self.geodesic_t.p1.v = lon1             # <<<<<<<<<<<<<<
 *             self.geodesic_t.p1.u = lat1
 *             self.geodesic_t.p2.v = lon2
 */
    ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_v_lon1;
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":138
 *         if radians:
 *             self.geodesic_t.p1.v = lon1
 *             self.geodesic_t.p1.u = lat1             # <<<<<<<<<<<<<<
 *             self.geodesic_t.p2.v = lon2
 *             self.geodesic_t.p2.u = lat2
 */
    ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_v_lat1;
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":139
 *             self.geodesic_t.p1.v = lon1
 *             self.geodesic_t.p1.u = lat1
 *             self.geodesic_t.p2.v = lon2             # <<<<<<<<<<<<<<
 *             self.geodesic_t.p2.u = lat2
 *         else:
 */
    ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v = __pyx_v_lon2;
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":140
 *             self.geodesic_t.p1.u = lat1
 *             self.geodesic_t.p2.v = lon2
 *             self.geodesic_t.p2.u = lat2             # <<<<<<<<<<<<<<
 *         else:
 *             self.geodesic_t.p1.v = _dg2rad*lon1
 */
    ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u = __pyx_v_lat2;
    goto __pyx_L4;
  }
  /*else*/ {
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":142
 *             self.geodesic_t.p2.u = lat2
 *         else:
 *             self.geodesic_t.p1.v = _dg2rad*lon1             # <<<<<<<<<<<<<<
 *             self.geodesic_t.p1.u = _dg2rad*lat1
 *             self.geodesic_t.p2.v = _dg2rad*lon2
 */
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1;}
    __pyx_3 = PyFloat_FromDouble(__pyx_v_lon1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __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 = 142; __pyx_clineno = __LINE__; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_5 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1;}
    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/matplotlib/basemap/src/_geod.pyx":143
 *         else:
 *             self.geodesic_t.p1.v = _dg2rad*lon1
 *             self.geodesic_t.p1.u = _dg2rad*lat1             # <<<<<<<<<<<<<<
 *             self.geodesic_t.p2.v = _dg2rad*lon2
 *             self.geodesic_t.p2.u = _dg2rad*lat2
 */
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1;}
    __pyx_3 = PyFloat_FromDouble(__pyx_v_lat1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __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 = 143; __pyx_clineno = __LINE__; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_5 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1;}
    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/matplotlib/basemap/src/_geod.pyx":144
 *             self.geodesic_t.p1.v = _dg2rad*lon1
 *             self.geodesic_t.p1.u = _dg2rad*lat1
 *             self.geodesic_t.p2.v = _dg2rad*lon2             # <<<<<<<<<<<<<<
 *             self.geodesic_t.p2.u = _dg2rad*lat2
 *         # do inverse computation to set azimuths, distance.
 */
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1;}
    __pyx_3 = PyFloat_FromDouble(__pyx_v_lon2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __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 = 144; __pyx_clineno = __LINE__; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_5 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1;}
    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/matplotlib/basemap/src/_geod.pyx":145
 *             self.geodesic_t.p1.u = _dg2rad*lat1
 *             self.geodesic_t.p2.v = _dg2rad*lon2
 *             self.geodesic_t.p2.u = _dg2rad*lat2             # <<<<<<<<<<<<<<
 *         # do inverse computation to set azimuths, distance.
 *         geod_inv(&self.geodesic_t)
 */
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1;}
    __pyx_3 = PyFloat_FromDouble(__pyx_v_lat2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __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 = 145; __pyx_clineno = __LINE__; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_5 = __pyx_PyFloat_AsDouble(__pyx_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u = __pyx_5;
  }
  __pyx_L4:;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":147
 *             self.geodesic_t.p2.u = _dg2rad*lat2
 *         # do inverse computation to set azimuths, distance.
 *         geod_inv(&self.geodesic_t)             # <<<<<<<<<<<<<<
 *         # set up some constants needed for forward computation.
 *         geod_pre(&self.geodesic_t)
 */
  geod_inv((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t));
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":149
 *         geod_inv(&self.geodesic_t)
 *         # set up some constants needed for forward computation.
 *         geod_pre(&self.geodesic_t)             # <<<<<<<<<<<<<<
 *         # distance increment.
 *         del_s = self.geodesic_t.DIST/(npts+1)
 */
  geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t));
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":151
 *         geod_pre(&self.geodesic_t)
 *         # distance increment.
 *         del_s = self.geodesic_t.DIST/(npts+1)             # <<<<<<<<<<<<<<
 *         # initialize output tuples.
 *         lats = ()
 */
  __pyx_v_del_s = (((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST / (__pyx_v_npts + 1));
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":153
 *         del_s = self.geodesic_t.DIST/(npts+1)
 *         # initialize output tuples.
 *         lats = ()             # <<<<<<<<<<<<<<
 *         lons = ()
 *         # loop over intermediate points, compute lat/lons.
 */
  Py_INCREF(((PyObject *)__pyx_empty_tuple));
  Py_DECREF(__pyx_v_lats);
  __pyx_v_lats = ((PyObject *)__pyx_empty_tuple);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":154
 *         # initialize output tuples.
 *         lats = ()
 *         lons = ()             # <<<<<<<<<<<<<<
 *         # loop over intermediate points, compute lat/lons.
 *         for i from 1 <= i < npts+1:
 */
  Py_INCREF(((PyObject *)__pyx_empty_tuple));
  Py_DECREF(__pyx_v_lons);
  __pyx_v_lons = ((PyObject *)__pyx_empty_tuple);
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":156
 *         lons = ()
 *         # loop over intermediate points, compute lat/lons.
 *         for i from 1 <= i < npts+1:             # <<<<<<<<<<<<<<
 *             self.geodesic_t.DIST = i*del_s
 *             geod_for(&self.geodesic_t)
 */
  __pyx_6 = (__pyx_v_npts + 1);
  for (__pyx_v_i = 1; __pyx_v_i < __pyx_6; __pyx_v_i++) {
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":157
 *         # loop over intermediate points, compute lat/lons.
 *         for i from 1 <= i < npts+1:
 *             self.geodesic_t.DIST = i*del_s             # <<<<<<<<<<<<<<
 *             geod_for(&self.geodesic_t)
 *             if radians:
 */
    ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.DIST = (__pyx_v_i * __pyx_v_del_s);
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":158
 *         for i from 1 <= i < npts+1:
 *             self.geodesic_t.DIST = i*del_s
 *             geod_for(&self.geodesic_t)             # <<<<<<<<<<<<<<
 *             if radians:
 *                 lats = lats + (self.geodesic_t.p2.u,)
 */
    geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t));
    /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":159
 *             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 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1;}
    if (__pyx_1) {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":160
 *             geod_for(&self.geodesic_t)
 *             if radians:
 *                 lats = lats + (self.geodesic_t.p2.u,)             # <<<<<<<<<<<<<<
 *                 lons = lons + (self.geodesic_t.p2.v,)
 *             else:
 */
      __pyx_2 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1;}
      __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
      __pyx_2 = 0;
      __pyx_4 = PyNumber_Add(__pyx_v_lats, ((PyObject *)__pyx_3)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
      Py_DECREF(__pyx_v_lats);
      __pyx_v_lats = __pyx_4;
      __pyx_4 = 0;
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":161
 *             if radians:
 *                 lats = lats + (self.geodesic_t.p2.u,)
 *                 lons = lons + (self.geodesic_t.p2.v,)             # <<<<<<<<<<<<<<
 *             else:
 *                 lats = lats + (_rad2dg*self.geodesic_t.p2.u,)
 */
      __pyx_2 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1;}
      __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
      __pyx_2 = 0;
      __pyx_4 = PyNumber_Add(__pyx_v_lons, ((PyObject *)__pyx_3)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
      Py_DECREF(__pyx_v_lons);
      __pyx_v_lons = __pyx_4;
      __pyx_4 = 0;
      goto __pyx_L7;
    }
    /*else*/ {
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":163
 *                 lons = lons + (self.geodesic_t.p2.v,)
 *             else:
 *                 lats = lats + (_rad2dg*self.geodesic_t.p2.u,)             # <<<<<<<<<<<<<<
 *                 lons = lons + (_rad2dg*self.geodesic_t.p2.v,)
 *         return lons, lats
 */
      __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __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 = 163; __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 = 163; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
      __pyx_4 = 0;
      __pyx_3 = PyNumber_Add(__pyx_v_lats, ((PyObject *)__pyx_2)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
      Py_DECREF(__pyx_v_lats);
      __pyx_v_lats = __pyx_3;
      __pyx_3 = 0;
      /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":164
 *             else:
 *                 lats = lats + (_rad2dg*self.geodesic_t.p2.u,)
 *                 lons = lons + (_rad2dg*self.geodesic_t.p2.v,)             # <<<<<<<<<<<<<<
 *         return lons, lats
 */
      __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1;}
      __pyx_2 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1;}
      __pyx_3 = PyNumber_Multiply(__pyx_4, __pyx_2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
      __pyx_3 = 0;
      __pyx_2 = PyNumber_Add(__pyx_v_lons, ((PyObject *)__pyx_4)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1;}
      Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
      Py_DECREF(__pyx_v_lons);
      __pyx_v_lons = __pyx_2;
      __pyx_2 = 0;
    }
    __pyx_L7:;
  }
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":165
 *                 lats = lats + (_rad2dg*self.geodesic_t.p2.u,)
 *                 lons = lons + (_rad2dg*self.geodesic_t.p2.v,)
 *         return lons, lats             # <<<<<<<<<<<<<<
 */
  __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_INCREF(__pyx_v_lons);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_lons);
  Py_INCREF(__pyx_v_lats);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_lats);
  __pyx_r = ((PyObject *)__pyx_3);
  __pyx_3 = 0;
  goto __pyx_L0;
  __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);
  __Pyx_AddTraceback("_geod.Geod._npts");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_lats);
  Py_DECREF(__pyx_v_lons);
  return __pyx_r;
}
static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp___cinit__, __pyx_k___cinit__, sizeof(__pyx_k___cinit__), 1, 1, 1},
  {&__pyx_kp___reduce__, __pyx_k___reduce__, sizeof(__pyx_k___reduce__), 0, 1, 1},
  {&__pyx_kp__fwd, __pyx_k__fwd, sizeof(__pyx_k__fwd), 0, 1, 1},
  {&__pyx_kp__inv, __pyx_k__inv, sizeof(__pyx_k__inv), 0, 1, 1},
  {&__pyx_kp__npts, __pyx_k__npts, sizeof(__pyx_k__npts), 0, 1, 1},
  {&__pyx_kp_math, __pyx_k_math, sizeof(__pyx_k_math), 1, 1, 1},
  {&__pyx_kp_radians, __pyx_k_radians, sizeof(__pyx_k_radians), 1, 1, 1},
  {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 1, 1, 1},
  {&__pyx_kp_degrees, __pyx_k_degrees, sizeof(__pyx_k_degrees), 1, 1, 1},
  {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 1, 1, 1},
  {&__pyx_kp__doublesize, __pyx_k__doublesize, sizeof(__pyx_k__doublesize), 1, 1, 1},
  {&__pyx_kp___version__, __pyx_k___version__, sizeof(__pyx_k___version__), 1, 1, 1},
  {&__pyx_kp_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 0},
  {&__pyx_kp_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 1, 1, 1},
  {&__pyx_kp___class__, __pyx_k___class__, sizeof(__pyx_k___class__), 1, 1, 1},
  {&__pyx_kp_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 0},
  {&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1},
  {&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 0},
  {&__pyx_kp_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 0},
  {&__pyx_kp_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 0},
  {0, 0, 0, 0, 0}
};
static PyObject *__pyx_tp_new_5_geod_Geod(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5_geod_Geod *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_5_geod_Geod *)o);
  p->geodstring = Py_None; Py_INCREF(Py_None);
  p->proj_version = Py_None; Py_INCREF(Py_None);
  if (__pyx_pf_5_geod_4Geod___new__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}
static void __pyx_tp_dealloc_5_geod_Geod(PyObject *o) {
  struct __pyx_obj_5_geod_Geod *p = (struct __pyx_obj_5_geod_Geod *)o;
  Py_XDECREF(p->geodstring);
  Py_XDECREF(p->proj_version);
  (*Py_TYPE(o)->tp_free)(o);
}
static int __pyx_tp_traverse_5_geod_Geod(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5_geod_Geod *p = (struct __pyx_obj_5_geod_Geod *)o;
  if (p->geodstring) {
    e = (*v)(p->geodstring, a); if (e) return e;
  }
  if (p->proj_version) {
    e = (*v)(p->proj_version, a); if (e) return e;
  }
  return 0;
}
static int __pyx_tp_clear_5_geod_Geod(PyObject *o) {
  struct __pyx_obj_5_geod_Geod *p = (struct __pyx_obj_5_geod_Geod *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->geodstring);
  p->geodstring = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->proj_version);
  p->proj_version = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static struct PyMethodDef __pyx_methods_5_geod_Geod[] = {
  {"__reduce__", (PyCFunction)__pyx_pf_5_geod_4Geod___reduce__, METH_NOARGS, __pyx_doc_5_geod_4Geod___reduce__},
  {"_fwd", (PyCFunction)__pyx_pf_5_geod_4Geod__fwd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__fwd},
  {"_inv", (PyCFunction)__pyx_pf_5_geod_4Geod__inv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__inv},
  {"_npts", (PyCFunction)__pyx_pf_5_geod_4Geod__npts, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5_geod_4Geod__npts},
  {0, 0, 0, 0}
};
static struct PyMemberDef __pyx_members_5_geod_Geod[] = {
  {"geodstring", T_OBJECT, offsetof(struct __pyx_obj_5_geod_Geod, geodstring), 0, 0},
  {"proj_version", T_OBJECT, offsetof(struct __pyx_obj_5_geod_Geod, proj_version), 0, 0},
  {0, 0, 0, 0, 0}
};
static PyNumberMethods __pyx_tp_as_number_Geod = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
  0, /*nb_index*/
  #endif
};
static PySequenceMethods __pyx_tp_as_sequence_Geod = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};
static PyMappingMethods __pyx_tp_as_mapping_Geod = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};
static PyBufferProcs __pyx_tp_as_buffer_Geod = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_NEWBUFFER)
  0, /*bf_getbuffer*/
  #endif
  #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_NEWBUFFER)
  0, /*bf_releasebuffer*/
  #endif
};
PyTypeObject __pyx_type_5_geod_Geod = {
  PyVarObject_HEAD_INIT(0, 0)
  "_geod.Geod", /*tp_name*/
  sizeof(struct __pyx_obj_5_geod_Geod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5_geod_Geod, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_Geod, /*tp_as_number*/
  &__pyx_tp_as_sequence_Geod, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Geod, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Geod, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5_geod_Geod, /*tp_traverse*/
  __pyx_tp_clear_5_geod_Geod, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5_geod_Geod, /*tp_methods*/
  __pyx_members_5_geod_Geod, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5_geod_Geod, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};
static struct PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
static void __pyx_init_filenames(void); /*proto*/
PyMODINIT_FUNC init_geod(void); /*proto*/
PyMODINIT_FUNC init_geod(void) {
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;}
  /*--- Libary function declarations ---*/
  __pyx_init_filenames();
  /*--- Module creation code ---*/
  __pyx_m = Py_InitModule4("_geod", __pyx_methods, 0, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;};
  Py_INCREF(__pyx_m);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME);
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;};
  /*--- Intern code ---*/
  /*--- String init code ---*/
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;};
  /*--- Builtin init code ---*/
  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1;}
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1;}
  __pyx_skip_dispatch = 0;
  /*--- Global init code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_5_geod_Geod) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "Geod", (PyObject *)&__pyx_type_5_geod_Geod) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1;}
  __pyx_ptype_5_geod_Geod = &__pyx_type_5_geod_Geod;
  /*--- Type import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_pyproj.pxi":1
 * import math             # <<<<<<<<<<<<<<
 * 
 * _dg2rad = math.radians(1.)
 */
  __pyx_1 = __Pyx_Import(__pyx_kp_math, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_math, __pyx_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_pyproj.pxi":3
 * import math
 * 
 * _dg2rad = math.radians(1.)             # <<<<<<<<<<<<<<
 * _rad2dg = math.degrees(1.)
 * _doublesize = sizeof(double)
 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_math); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_radians); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyFloat_FromDouble(1.); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
  __pyx_1 = 0;
  __pyx_1 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_1, __pyx_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_pyproj.pxi":4
 * 
 * _dg2rad = math.radians(1.)
 * _rad2dg = math.degrees(1.)             # <<<<<<<<<<<<<<
 * _doublesize = sizeof(double)
 * __version__ = "1.8.6"
 */
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_math); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1;}
  __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_degrees); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_1 = PyFloat_FromDouble(1.); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
  __pyx_1 = 0;
  __pyx_1 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_2, __pyx_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_pyproj.pxi":5
 * _dg2rad = math.radians(1.)
 * _rad2dg = math.degrees(1.)
 * _doublesize = sizeof(double)             # <<<<<<<<<<<<<<
 * __version__ = "1.8.6"
 * 
 */
  __pyx_3 = PyInt_FromLong((sizeof(double))); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_kp__doublesize, __pyx_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_pyproj.pxi":6
 * _rad2dg = math.degrees(1.)
 * _doublesize = sizeof(double)
 * __version__ = "1.8.6"             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "stdlib.h":
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_kp___version__, __pyx_kp_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1;}
  /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":131
 *             azdata[i] = self.geodesic_t.DIST
 * 
 *     def _npts(self, double lon1, double lat1, double lon2, double lat2, int npts, radians=False):             # <<<<<<<<<<<<<<
 *         """
 *  given initial and terminus lat/lon, find npts intermediate points."""
 */
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("_geod");
}
static const char *__pyx_filenames[] = {
  "_geod.pyx",
  "_pyproj.pxi",
};
/* Runtime support code */
static void __pyx_init_filenames(void) {
  __pyx_f = __pyx_filenames;
}
static INLINE void __Pyx_RaiseArgtupleTooLong(
    Py_ssize_t num_expected,
    Py_ssize_t num_found)
{
    const char* error_message =
    #if PY_VERSION_HEX < 0x02050000
        "function takes at most %d positional arguments (%d given)";
    #else
        "function takes at most %zd positional arguments (%zd given)";
    #endif
    PyErr_Format(PyExc_TypeError, error_message, num_expected, num_found);
}
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    PyObject *__import__ = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
    if (!__import__)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    module = PyObject_CallFunction(__import__, "OOOO",
        name, global_dict, empty_dict, list);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(__import__);
    Py_XDECREF(empty_dict);
    return module;
}
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        /* Normalize to raise <class>, <instance> */
        Py_DECREF(value);
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }
    PyErr_Restore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode && (!t->is_identifier)) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_identifier || (t->is_unicode && t->intern)) {
            *t->p = PyUnicode_InternFromString(t->s);
        } else if (t->is_unicode) {
            *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static void __Pyx_AddTraceback(const char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(__pyx_filename);
    #else
    py_srcfile = PyUnicode_FromString(__pyx_filename);
    #endif
    if (!py_srcfile) goto bad;
    if (__pyx_clineno) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%u)", funcname, __pyx_cfilenm, __pyx_clineno);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%u)", funcname, __pyx_cfilenm, __pyx_clineno);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    #if PY_MAJOR_VERSION < 3
    empty_string = PyString_FromStringAndSize("", 0);
    #else
    empty_string = PyBytes_FromStringAndSize("", 0);
    #endif
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        #if PY_MAJOR_VERSION >= 3
        0,            /*int kwonlyargcount,*/
        #endif
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*PyObject *code,*/
        __pyx_empty_tuple,  /*PyObject *consts,*/
        __pyx_empty_tuple,  /*PyObject *names,*/
        __pyx_empty_tuple,  /*PyObject *varnames,*/
        __pyx_empty_tuple,  /*PyObject *freevars,*/
        __pyx_empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_Get(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_string);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
/* Type Conversion Functions */
static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
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);
}
static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x) {
    if (PyInt_CheckExact(x)) {
        return PyInt_AS_LONG(x);
    }
    else if (PyLong_CheckExact(x)) {
        return PyLong_AsLongLong(x);
    }
    else {
        PY_LONG_LONG val;
        PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
        val = __pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}
static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    if (PyInt_CheckExact(x)) {
        long val = PyInt_AS_LONG(x);
        if (unlikely(val < 0)) {
            PyErr_SetString(PyExc_TypeError, "Negative assignment to unsigned type.");
            return (unsigned PY_LONG_LONG)-1;
        }
        return val;
    }
    else if (PyLong_CheckExact(x)) {
        return PyLong_AsUnsignedLongLong(x);
    }
    else {
        PY_LONG_LONG val;
        PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
        val = __pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}
static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x) {
    if (sizeof(unsigned char) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        unsigned char val = (unsigned char)long_val;
        if (unlikely((val != long_val)  || (long_val < 0))) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned char");
            return (unsigned char)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x) {
    if (sizeof(unsigned short) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        unsigned short val = (unsigned short)long_val;
        if (unlikely((val != long_val)  || (long_val < 0))) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned short");
            return (unsigned short)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE char __pyx_PyInt_char(PyObject* x) {
    if (sizeof(char) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        char val = (char)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to char");
            return (char)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE short __pyx_PyInt_short(PyObject* x) {
    if (sizeof(short) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        short val = (short)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to short");
            return (short)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE int __pyx_PyInt_int(PyObject* x) {
    if (sizeof(int) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        int val = (int)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to int");
            return (int)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE long __pyx_PyInt_long(PyObject* x) {
    if (sizeof(long) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        long val = (long)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to long");
            return (long)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE signed char __pyx_PyInt_signed_char(PyObject* x) {
    if (sizeof(signed char) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        signed char val = (signed char)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed char");
            return (signed char)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE signed short __pyx_PyInt_signed_short(PyObject* x) {
    if (sizeof(signed short) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        signed short val = (signed short)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed short");
            return (signed short)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE signed int __pyx_PyInt_signed_int(PyObject* x) {
    if (sizeof(signed int) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        signed int val = (signed int)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed int");
            return (signed int)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE signed long __pyx_PyInt_signed_long(PyObject* x) {
    if (sizeof(signed long) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        signed long val = (signed long)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to signed long");
            return (signed long)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}
static INLINE long double __pyx_PyInt_long_double(PyObject* x) {
    if (sizeof(long double) < sizeof(long)) {
        long long_val = __pyx_PyInt_AsLong(x);
        long double val = (long double)long_val;
        if (unlikely((val != long_val) )) {
            PyErr_SetString(PyExc_OverflowError, "value too large to convert to long double");
            return (long double)-1;
        }
        return val;
    }
    else {
        return __pyx_PyInt_AsLong(x);
    }
}