[python-pyproj] 21/34: Imported Upstream version 1.9.4

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sun Mar 1 03:37:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository python-pyproj.

commit b09ed1c392f54af7b4895ffede22f8028f3bd840
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Mar 1 02:53:13 2015 +0100

    Imported Upstream version 1.9.4
---
 Changelog                     |    6 +
 LICENSE                       |   16 +
 LICENSE_geographiclib         |    3 -
 MANIFEST.in                   |    4 +-
 PKG-INFO                      |   24 -
 README                        |   11 -
 README.md                     |   14 +
 _proj.c                       | 2491 +++++++++++++++++++++++------------------
 _proj.pyx                     |   43 +-
 docs/api-objects.txt          |    5 +-
 docs/class-tree.html          |    2 +-
 docs/help.html                |    2 +-
 docs/identifier-index.html    |    5 +-
 docs/index.html               |   12 +-
 docs/module-tree.html         |    2 +-
 docs/pyproj-module.html       |   12 +-
 docs/pyproj-pysrc.html        |  945 ++++++++--------
 docs/pyproj.Geod-class.html   |    2 +-
 docs/pyproj.Proj-class.html   |   42 +-
 lib/pyproj/__init__.py        |    7 +-
 lib/pyproj/data/epsg          | 1833 ++++++++++++++++++++++++++++--
 lib/pyproj/data/ntv2_out.dist |   12 +-
 lib/pyproj/data/testntv2      |    4 +-
 lib/pyproj/data/testvarious   |  386 ++++++-
 lib/pyproj/data/tv_out.dist   |  218 +++-
 setup-proj.py                 |    7 +-
 setup.py                      |   11 +-
 src/PJ_aeqd.c                 |    6 +-
 src/PJ_aitoff.c               |    8 +-
 src/PJ_calcofi.c              |  138 +++
 src/PJ_geos.c                 |    4 +-
 src/PJ_hammer.c               |   18 +-
 src/PJ_hammer.c.diff          |   41 +
 src/PJ_healpix.c              |  976 +++++++---------
 src/PJ_isea.c                 |    6 +-
 src/PJ_ob_tran.c              |    1 +
 src/PJ_omerc.c                |   17 +-
 src/PJ_putp3.c                |    2 +-
 src/PJ_qsc.c                  |  375 +++++++
 src/PJ_robin.c                |   97 +-
 src/PJ_urm5.c                 |    2 +-
 src/README                    |    4 +
 src/geod_interface.c          |    8 +-
 src/geod_interface.h          |    4 +-
 src/geodesic.c                |  629 ++++++++---
 src/geodesic.h                |  871 +++++++++++---
 src/mk_cheby.c                |  316 +++---
 src/nad_init.c                |   26 +-
 src/pj_apply_gridshift.c      |   18 +-
 src/pj_apply_vgridshift.c     |   13 +-
 src/pj_ctx.c                  |   25 +-
 src/pj_datums.c               |    6 +-
 src/pj_ell_set.c              |   44 +-
 src/pj_ellps.c                |    1 +
 src/pj_fileapi.c              |  203 ++++
 src/pj_gc_reader.c            |   23 +-
 src/pj_gridcatalog.c          |    1 -
 src/pj_gridinfo.c             |  288 +++--
 src/pj_init.c                 |  222 +++-
 src/pj_list.h                 |    2 +
 src/pj_mutex.c                |   52 +-
 src/pj_open_lib.c             |   14 +-
 src/pj_release.c              |    2 +-
 src/proj.def                  |   56 +
 src/proj_api.h                |   28 +-
 src/proj_etmerc.c             |  367 +++---
 src/projects.h                |   18 +-
 unittest/test.py              |   52 +
 68 files changed, 7740 insertions(+), 3363 deletions(-)

diff --git a/Changelog b/Changelog
index 9290df0..5968f0b 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,9 @@
+1.9.4 (git tag v1.9.4rel)
+ * migrate to github from googlecode.
+ * update proj4 source code from svn r2595 (version 4.9.0RC2).
+ * include runtime_library_dirs in setup-proj.py.
+ * added to_latlong method (issue 51).
+ * fix back azimuth when lon1 and lon2 are identical.
 1.9.3 (svn revision 327)
  * Geod now uses C code adapted from geographiclib now included in proj4 source,
    instead of pure python code directly from geographiclib.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..761fadd
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,16 @@
+Contact:  Jeffrey Whitaker <jeffrey.s.whitaker at noaa.gov
+
+copyright (c) 2013 by Jeffrey Whitaker.
+
+Permission to use, copy, modify, and distribute this software
+and its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both the copyright notice and this permission
+notice appear in supporting documentation. THE AUTHOR DISCLAIMS
+ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT
+SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/LICENSE_geographiclib b/LICENSE_geographiclib
deleted file mode 100644
index abd09e5..0000000
--- a/LICENSE_geographiclib
+++ /dev/null
@@ -1,3 +0,0 @@
- Copyright (c) Charles Karney (2011) <charles at karney.com> and licensed
- under the MIT/X11 License.  For more information, see
- http://geographiclib.sourceforge.net/
diff --git a/MANIFEST.in b/MANIFEST.in
index 05ebe62..206a4ad 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,7 @@
-include README
+include README.md
 include MANIFEST.in
 include LICENSE_proj4
-include LICENSE_geographiclib
+include LICENSE
 include Changelog
 include create_docs.sh
 include _proj.pyx
diff --git a/PKG-INFO b/PKG-INFO
deleted file mode 100644
index e6904d5..0000000
--- a/PKG-INFO
+++ /dev/null
@@ -1,24 +0,0 @@
-Metadata-Version: 1.1
-Name: pyproj
-Version: 1.9.3
-Summary: Python interface to PROJ.4 library
-Home-page: http://code.google.com/p/pyproj
-Author: Jeff Whitaker
-Author-email: jeffrey.s.whitaker at noaa.gov
-License: OSI Approved
-Download-URL: http://python.org/pypi/pyproj
-Description: 
-        Performs cartographic transformations between geographic (lat/lon)
-        and map projection (x/y) coordinates. Can also transform directly
-        from one map projection coordinate system to another.
-        Coordinates can be given as numpy arrays, python arrays, lists or scalars.
-        Optimized for numpy arrays.
-Keywords: python,map projections,GIS,mapping,maps
-Platform: any
-Classifier: Development Status :: 4 - Beta
-Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: Scientific/Engineering :: GIS
-Classifier: Topic :: Scientific/Engineering :: Mathematics
-Classifier: Operating System :: OS Independent
diff --git a/README b/README
deleted file mode 100644
index 7ced097..0000000
--- a/README
+++ /dev/null
@@ -1,11 +0,0 @@
-To install:
-
-python setup.py build
-python setup.py install
-
-To use installed proj lib (and data files), use setup-proj.py instead
-and set PROJ_DIR env var to point to location of proj installation.
-
-Docs at http://pyproj.googlecode.com/svn/trunk/docs/index.html
-
-Report bugs/ask questions at http://code.google.com/p/pyproj/issues/list
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d46722c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,14 @@
+To install:
+
+* clone github repo or download source release at http://python.org/pypi/pyproj.
+* python setup.py build
+* python setup.py install (with sudo if necessary).
+
+To test, run `python -c "import pyproj; pyproj.test()"`
+
+To use installed proj lib (and data files), use setup-proj.py instead
+and set PROJ_DIR env var to point to location of proj installation.
+
+Docs at http://jswhit.github.io/pyproj.
+
+Report bugs/ask questions at https://github.com/jswhit/pyproj/issues.
diff --git a/_proj.c b/_proj.c
index 2b9e695..1d891f4 100644
--- a/_proj.c
+++ b/_proj.c
@@ -1,6 +1,18 @@
-/* Generated by Cython 0.17.4 on Sat Jan  5 16:03:47 2013 */
+/* Generated by Cython 0.19.1 on Tue Nov  5 11:06:29 2013 */
 
 #define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
 #include "Python.h"
 #ifndef Py_PYTHON_H
     #error Python headers needed to compile C extensions, please install development version of Python.
@@ -116,6 +128,9 @@
 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 #endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
   #define CYTHON_PEP393_ENABLED 1
   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
@@ -155,6 +170,14 @@
   #define PyBytes_Concat               PyString_Concat
   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
 #endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
+                                         PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type)
+#endif
 #if PY_VERSION_HEX < 0x02060000
   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
@@ -227,6 +250,40 @@
   #define __Pyx_NAMESTR(n) (n)
   #define __Pyx_DOCSTR(n)  (n)
 #endif
+#ifndef CYTHON_INLINE
+  #if defined(__GNUC__)
+    #define CYTHON_INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
+  #else
+    #define CYTHON_INLINE
+  #endif
+#endif
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER)
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
 
 
 #if PY_MAJOR_VERSION >= 3
@@ -262,21 +319,6 @@
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-
-/* inline attribute */
-#ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
-    #define CYTHON_INLINE __inline__
-  #elif defined(_MSC_VER)
-    #define CYTHON_INLINE __inline
-  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-    #define CYTHON_INLINE inline
-  #else
-    #define CYTHON_INLINE
-  #endif
-#endif
-
-/* unused attribute */
 #ifndef CYTHON_UNUSED
 # if defined(__GNUC__)
 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
@@ -290,30 +332,130 @@
 #   define CYTHON_UNUSED
 # endif
 #endif
-
-typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
-
-
-/* Type Conversion Predeclarations */
-
-#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
-#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
-
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return u_end - u - 1;
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
-
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
-
 #if CYTHON_COMPILING_IN_CPYTHON
 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 #else
 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
 #endif
 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params() {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (ascii_chars_u == NULL) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+    }
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params() {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    default_encoding_c = PyBytes_AS_STRING(default_encoding);
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(sys);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
+
 
 #ifdef __GNUC__
   /* Test for GCC > 2.95 */
@@ -328,8 +470,9 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
   #define likely(x)   (x)
   #define unlikely(x) (x)
 #endif /* __GNUC__ */
-    
+
 static PyObject *__pyx_m;
+static PyObject *__pyx_d;
 static PyObject *__pyx_b;
 static PyObject *__pyx_empty_tuple;
 static PyObject *__pyx_empty_bytes;
@@ -348,7 +491,7 @@ struct __pyx_obj_5_proj_Proj;
 struct __pyx_obj_5_proj_Geod;
 struct __pyx_opt_args_5_proj__strencode;
 
-/* "_proj.pyx":346
+/* "_proj.pyx":359
  *             yy[i] = yy[i]*_rad2dg
  * 
  * cdef _strencode(pystr,encoding='ascii'):             # <<<<<<<<<<<<<<
@@ -360,8 +503,8 @@ struct __pyx_opt_args_5_proj__strencode {
   PyObject *encoding;
 };
 
-/* "_proj.pyx":62
- *     pj_set_searchpath(1, &searchpath)
+/* "_proj.pyx":66
+ *     return Proj(projstring)
  * 
  * cdef class Proj:             # <<<<<<<<<<<<<<
  *     cdef projPJ projpj
@@ -377,16 +520,16 @@ struct __pyx_obj_5_proj_Proj {
 };
 
 
-/* "_proj.pyx":353
+/* "_proj.pyx":366
  *         return pystr # already bytes?
  * 
  * cdef class Geod:             # <<<<<<<<<<<<<<
- *     cdef Geodesic _Geodesic
+ *     cdef geod_geodesic _geod_geodesic
  *     cdef public object initstring
  */
 struct __pyx_obj_5_proj_Geod {
   PyObject_HEAD
-  struct Geodesic _Geodesic;
+  struct geod_geodesic _geod_geodesic;
   PyObject *initstring;
 };
 
@@ -444,7 +587,22 @@ struct __pyx_obj_5_proj_Geod {
 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
 
 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
 
@@ -460,6 +618,8 @@ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyOb
 
 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
 
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
+
 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
     const char *name, int exact); /*proto*/
 
@@ -467,10 +627,14 @@ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /*
 
 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
+#ifndef __PYX_FORCE_INIT_THREADS
+  #define __PYX_FORCE_INIT_THREADS 0
+#endif
+
 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
 
 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
 
@@ -540,20 +704,22 @@ static PyObject *__pyx_builtin_RuntimeError;
 static PyObject *__pyx_builtin_AttributeError;
 static PyObject *__pyx_builtin_ValueError;
 static PyObject *__pyx_pf_5_proj_set_datapath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datapath); /* proto */
+static PyObject *__pyx_pf_5_proj_2_createproj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_projstring); /* proto */
 static int __pyx_pf_5_proj_4Proj___cinit__(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_projstring); /* proto */
 static void __pyx_pf_5_proj_4Proj_2__dealloc__(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5_proj_4Proj_4__reduce__(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_lons, PyObject *__pyx_v_lats, PyObject *__pyx_v_radians, PyObject *__pyx_v_errcheck); /* proto */
-static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_radians, PyObject *__pyx_v_errcheck); /* proto */
-static PyObject *__pyx_pf_5_proj_4Proj_10is_latlong(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5_proj_4Proj_12is_geocent(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5_proj_4Proj_4to_latlong(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5_proj_4Proj_6__reduce__(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5_proj_4Proj_8_fwd(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_lons, PyObject *__pyx_v_lats, PyObject *__pyx_v_radians, PyObject *__pyx_v_errcheck); /* proto */
+static PyObject *__pyx_pf_5_proj_4Proj_10_inv(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_radians, PyObject *__pyx_v_errcheck); /* proto */
+static PyObject *__pyx_pf_5_proj_4Proj_12is_latlong(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5_proj_4Proj_14is_geocent(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5_proj_4Proj_12proj_version___get__(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
 static int __pyx_pf_5_proj_4Proj_12proj_version_2__set__(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
 static int __pyx_pf_5_proj_4Proj_12proj_version_4__del__(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5_proj_4Proj_3srs___get__(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
 static int __pyx_pf_5_proj_4Proj_3srs_2__set__(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
 static int __pyx_pf_5_proj_4Proj_3srs_4__del__(struct __pyx_obj_5_proj_Proj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_5_proj_Proj *__pyx_v_p1, struct __pyx_obj_5_proj_Proj *__pyx_v_p2, PyObject *__pyx_v_inx, PyObject *__pyx_v_iny, PyObject *__pyx_v_inz, PyObject *__pyx_v_radians); /* proto */
+static PyObject *__pyx_pf_5_proj_4_transform(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_5_proj_Proj *__pyx_v_p1, struct __pyx_obj_5_proj_Proj *__pyx_v_p2, PyObject *__pyx_v_inx, PyObject *__pyx_v_iny, PyObject *__pyx_v_inz, PyObject *__pyx_v_radians); /* proto */
 static int __pyx_pf_5_proj_4Geod___cinit__(struct __pyx_obj_5_proj_Geod *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_f); /* proto */
 static PyObject *__pyx_pf_5_proj_4Geod_2__reduce__(struct __pyx_obj_5_proj_Geod *__pyx_v_self); /* proto */
 static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx_v_self, PyObject *__pyx_v_lons, PyObject *__pyx_v_lats, PyObject *__pyx_v_az, PyObject *__pyx_v_dist, PyObject *__pyx_v_radians); /* proto */
@@ -562,13 +728,15 @@ static PyObject *__pyx_pf_5_proj_4Geod_8_npts(struct __pyx_obj_5_proj_Geod *__py
 static PyObject *__pyx_pf_5_proj_4Geod_10initstring___get__(struct __pyx_obj_5_proj_Geod *__pyx_v_self); /* proto */
 static int __pyx_pf_5_proj_4Geod_10initstring_2__set__(struct __pyx_obj_5_proj_Geod *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
 static int __pyx_pf_5_proj_4Geod_10initstring_4__del__(struct __pyx_obj_5_proj_Geod *__pyx_v_self); /* proto */
+static PyObject *__pyx_tp_new_5_proj_Proj(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5_proj_Geod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
 static char __pyx_k_3[] = "Buffer lengths not the same";
 static char __pyx_k_5[] = "projection undefined";
 static char __pyx_k_15[] = "x,y and z must be same size";
 static char __pyx_k_17[] = "+a=%s +f=%s";
 static char __pyx_k_20[] = "undefined inverse geodesic (may be an antipodal point)";
-static char __pyx_k_26[] = "1.9.3";
-static char __pyx_k_29[] = "/Users/jsw/python/pyproj/_proj.pyx";
+static char __pyx_k_26[] = "1.9.4";
+static char __pyx_k_29[] = "/Volumes/User/jwhitaker/python/pyproj/_proj.pyx";
 static char __pyx_k__a[] = "a";
 static char __pyx_k__f[] = "f";
 static char __pyx_k__i[] = "i";
@@ -615,11 +783,13 @@ static char __pyx_k__datapath[] = "datapath";
 static char __pyx_k__errcheck[] = "errcheck";
 static char __pyx_k____class__[] = "__class__";
 static char __pyx_k__ValueError[] = "ValueError";
+static char __pyx_k____import__[] = "__import__";
 static char __pyx_k___transform[] = "_transform";
 static char __pyx_k__is_latlong[] = "is_latlong";
 static char __pyx_k__projstring[] = "projstring";
 static char __pyx_k__searchpath[] = "searchpath";
 static char __pyx_k____version__[] = "__version__";
+static char __pyx_k___createproj[] = "_createproj";
 static char __pyx_k___doublesize[] = "_doublesize";
 static char __pyx_k__RuntimeError[] = "RuntimeError";
 static char __pyx_k__set_datapath[] = "set_datapath";
@@ -635,9 +805,11 @@ static PyObject *__pyx_n_s__AttributeError;
 static PyObject *__pyx_n_s__RuntimeError;
 static PyObject *__pyx_n_s__ValueError;
 static PyObject *__pyx_n_s____class__;
+static PyObject *__pyx_n_s____import__;
 static PyObject *__pyx_n_s____main__;
 static PyObject *__pyx_n_s____test__;
 static PyObject *__pyx_n_s____version__;
+static PyObject *__pyx_n_s___createproj;
 static PyObject *__pyx_n_s___doublesize;
 static PyObject *__pyx_n_s___proj;
 static PyObject *__pyx_n_s___transform;
@@ -708,8 +880,10 @@ static PyObject *__pyx_k_tuple_23;
 static PyObject *__pyx_k_tuple_24;
 static PyObject *__pyx_k_tuple_27;
 static PyObject *__pyx_k_tuple_30;
+static PyObject *__pyx_k_tuple_32;
 static PyObject *__pyx_k_codeobj_28;
 static PyObject *__pyx_k_codeobj_31;
+static PyObject *__pyx_k_codeobj_33;
 
 /* Python wrapper */
 static PyObject *__pyx_pw_5_proj_1set_datapath(PyObject *__pyx_self, PyObject *__pyx_v_datapath); /*proto*/
@@ -723,54 +897,54 @@ static PyObject *__pyx_pw_5_proj_1set_datapath(PyObject *__pyx_self, PyObject *_
   return __pyx_r;
 }
 
-/* "_proj.pyx":56
+/* "_proj.pyx":58
  *     int PyObject_AsWriteBuffer(object, void **rbuf, Py_ssize_t *len)
  * 
  * def set_datapath(datapath):             # <<<<<<<<<<<<<<
- *     cdef char *searchpath
  *     bytestr = _strencode(datapath)
+ *     cdef const char *searchpath = bytestr
  */
 
 static PyObject *__pyx_pf_5_proj_set_datapath(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datapath) {
-  char *__pyx_v_searchpath;
   PyObject *__pyx_v_bytestr = NULL;
+  char const *__pyx_v_searchpath;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  char *__pyx_t_2;
+  char const *__pyx_t_2;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("set_datapath", 0);
 
-  /* "_proj.pyx":58
+  /* "_proj.pyx":59
+ * 
  * def set_datapath(datapath):
- *     cdef char *searchpath
  *     bytestr = _strencode(datapath)             # <<<<<<<<<<<<<<
- *     searchpath = bytestr
+ *     cdef const char *searchpath = bytestr
  *     pj_set_searchpath(1, &searchpath)
  */
-  __pyx_t_1 = __pyx_f_5_proj__strencode(__pyx_v_datapath, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_f_5_proj__strencode(__pyx_v_datapath, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_bytestr = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "_proj.pyx":59
- *     cdef char *searchpath
+  /* "_proj.pyx":60
+ * def set_datapath(datapath):
  *     bytestr = _strencode(datapath)
- *     searchpath = bytestr             # <<<<<<<<<<<<<<
+ *     cdef const char *searchpath = bytestr             # <<<<<<<<<<<<<<
  *     pj_set_searchpath(1, &searchpath)
  * 
  */
-  __pyx_t_2 = PyBytes_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_searchpath = __pyx_t_2;
 
-  /* "_proj.pyx":60
+  /* "_proj.pyx":61
  *     bytestr = _strencode(datapath)
- *     searchpath = bytestr
+ *     cdef const char *searchpath = bytestr
  *     pj_set_searchpath(1, &searchpath)             # <<<<<<<<<<<<<<
  * 
- * cdef class Proj:
+ * def _createproj(projstring):
  */
   pj_set_searchpath(1, (&__pyx_v_searchpath));
 
@@ -788,9 +962,75 @@ static PyObject *__pyx_pf_5_proj_set_datapath(CYTHON_UNUSED PyObject *__pyx_self
 }
 
 /* Python wrapper */
+static PyObject *__pyx_pw_5_proj_3_createproj(PyObject *__pyx_self, PyObject *__pyx_v_projstring); /*proto*/
+static PyMethodDef __pyx_mdef_5_proj_3_createproj = {__Pyx_NAMESTR("_createproj"), (PyCFunction)__pyx_pw_5_proj_3_createproj, METH_O, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_5_proj_3_createproj(PyObject *__pyx_self, PyObject *__pyx_v_projstring) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_createproj (wrapper)", 0);
+  __pyx_r = __pyx_pf_5_proj_2_createproj(__pyx_self, ((PyObject *)__pyx_v_projstring));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "_proj.pyx":63
+ *     pj_set_searchpath(1, &searchpath)
+ * 
+ * def _createproj(projstring):             # <<<<<<<<<<<<<<
+ *     return Proj(projstring)
+ * 
+ */
+
+static PyObject *__pyx_pf_5_proj_2_createproj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_projstring) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_createproj", 0);
+
+  /* "_proj.pyx":64
+ * 
+ * def _createproj(projstring):
+ *     return Proj(projstring)             # <<<<<<<<<<<<<<
+ * 
+ * cdef class Proj:
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_projstring);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_projstring);
+  __Pyx_GIVEREF(__pyx_v_projstring);
+  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5_proj_Proj)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("_proj._createproj", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
 static int __pyx_pw_5_proj_4Proj_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_pw_5_proj_4Proj_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_projstring = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
@@ -812,7 +1052,7 @@ static int __pyx_pw_5_proj_4Proj_1__cinit__(PyObject *__pyx_v_self, PyObject *__
         else goto __pyx_L5_argtuple_error;
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
       goto __pyx_L5_argtuple_error;
@@ -823,7 +1063,7 @@ static int __pyx_pw_5_proj_4Proj_1__cinit__(PyObject *__pyx_v_self, PyObject *__
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("_proj.Proj.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
@@ -834,7 +1074,7 @@ static int __pyx_pw_5_proj_4Proj_1__cinit__(PyObject *__pyx_v_self, PyObject *__
   return __pyx_r;
 }
 
-/* "_proj.pyx":69
+/* "_proj.pyx":73
  *     cdef public object srs
  * 
  *     def __cinit__(self, projstring):             # <<<<<<<<<<<<<<
@@ -856,7 +1096,7 @@ static int __pyx_pf_5_proj_4Proj___cinit__(struct __pyx_obj_5_proj_Proj *__pyx_v
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__cinit__", 0);
 
-  /* "_proj.pyx":72
+  /* "_proj.pyx":76
  *         # setup proj initialization string.
  *         cdef int err
  *         self.srs = projstring             # <<<<<<<<<<<<<<
@@ -869,29 +1109,29 @@ static int __pyx_pf_5_proj_4Proj___cinit__(struct __pyx_obj_5_proj_Proj *__pyx_v
   __Pyx_DECREF(__pyx_v_self->srs);
   __pyx_v_self->srs = __pyx_v_projstring;
 
-  /* "_proj.pyx":73
+  /* "_proj.pyx":77
  *         cdef int err
  *         self.srs = projstring
  *         bytestr = _strencode(projstring)             # <<<<<<<<<<<<<<
  *         self.pjinitstring = bytestr
  *         # initialize projection
  */
-  __pyx_t_1 = __pyx_f_5_proj__strencode(__pyx_v_projstring, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_f_5_proj__strencode(__pyx_v_projstring, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_bytestr = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "_proj.pyx":74
+  /* "_proj.pyx":78
  *         self.srs = projstring
  *         bytestr = _strencode(projstring)
  *         self.pjinitstring = bytestr             # <<<<<<<<<<<<<<
  *         # initialize projection
  *         self.projctx = pj_ctx_alloc()
  */
-  __pyx_t_2 = PyBytes_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_self->pjinitstring = __pyx_t_2;
 
-  /* "_proj.pyx":76
+  /* "_proj.pyx":80
  *         self.pjinitstring = bytestr
  *         # initialize projection
  *         self.projctx = pj_ctx_alloc()             # <<<<<<<<<<<<<<
@@ -900,7 +1140,7 @@ static int __pyx_pf_5_proj_4Proj___cinit__(struct __pyx_obj_5_proj_Proj *__pyx_v
  */
   __pyx_v_self->projctx = pj_ctx_alloc();
 
-  /* "_proj.pyx":77
+  /* "_proj.pyx":81
  *         # initialize projection
  *         self.projctx = pj_ctx_alloc()
  *         self.projpj = pj_init_plus_ctx(self.projctx, self.pjinitstring)             # <<<<<<<<<<<<<<
@@ -909,7 +1149,7 @@ static int __pyx_pf_5_proj_4Proj___cinit__(struct __pyx_obj_5_proj_Proj *__pyx_v
  */
   __pyx_v_self->projpj = pj_init_plus_ctx(__pyx_v_self->projctx, __pyx_v_self->pjinitstring);
 
-  /* "_proj.pyx":78
+  /* "_proj.pyx":82
  *         self.projctx = pj_ctx_alloc()
  *         self.projpj = pj_init_plus_ctx(self.projctx, self.pjinitstring)
  *         err = pj_ctx_get_errno(self.projctx)             # <<<<<<<<<<<<<<
@@ -918,48 +1158,48 @@ static int __pyx_pf_5_proj_4Proj___cinit__(struct __pyx_obj_5_proj_Proj *__pyx_v
  */
   __pyx_v_err = pj_ctx_get_errno(__pyx_v_self->projctx);
 
-  /* "_proj.pyx":79
+  /* "_proj.pyx":83
  *         self.projpj = pj_init_plus_ctx(self.projctx, self.pjinitstring)
  *         err = pj_ctx_get_errno(self.projctx)
  *         if err != 0:             # <<<<<<<<<<<<<<
  *              raise RuntimeError(pj_strerrno(err))
  *         self.proj_version = PJ_VERSION/100.
  */
-  __pyx_t_3 = (__pyx_v_err != 0);
+  __pyx_t_3 = ((__pyx_v_err != 0) != 0);
   if (__pyx_t_3) {
 
-    /* "_proj.pyx":80
+    /* "_proj.pyx":84
  *         err = pj_ctx_get_errno(self.projctx)
  *         if err != 0:
  *              raise RuntimeError(pj_strerrno(err))             # <<<<<<<<<<<<<<
  *         self.proj_version = PJ_VERSION/100.
  * 
  */
-    __pyx_t_1 = PyBytes_FromString(pj_strerrno(__pyx_v_err)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyBytes_FromString(pj_strerrno(__pyx_v_err)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
     __pyx_t_1 = 0;
-    __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "_proj.pyx":81
+  /* "_proj.pyx":85
  *         if err != 0:
  *              raise RuntimeError(pj_strerrno(err))
  *         self.proj_version = PJ_VERSION/100.             # <<<<<<<<<<<<<<
  * 
  *     def __dealloc__(self):
  */
-  __pyx_t_1 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   __Pyx_GOTREF(__pyx_v_self->proj_version);
@@ -989,7 +1229,7 @@ static void __pyx_pw_5_proj_4Proj_3__dealloc__(PyObject *__pyx_v_self) {
   __Pyx_RefNannyFinishContext();
 }
 
-/* "_proj.pyx":83
+/* "_proj.pyx":87
  *         self.proj_version = PJ_VERSION/100.
  * 
  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
@@ -1001,7 +1241,7 @@ static void __pyx_pf_5_proj_4Proj_2__dealloc__(struct __pyx_obj_5_proj_Proj *__p
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__dealloc__", 0);
 
-  /* "_proj.pyx":85
+  /* "_proj.pyx":89
  *     def __dealloc__(self):
  *         """destroy projection definition"""
  *         pj_free(self.projpj)             # <<<<<<<<<<<<<<
@@ -1010,12 +1250,12 @@ static void __pyx_pf_5_proj_4Proj_2__dealloc__(struct __pyx_obj_5_proj_Proj *__p
  */
   pj_free(__pyx_v_self->projpj);
 
-  /* "_proj.pyx":86
+  /* "_proj.pyx":90
  *         """destroy projection definition"""
  *         pj_free(self.projpj)
  *         pj_ctx_free(self.projctx)             # <<<<<<<<<<<<<<
  * 
- *     def __reduce__(self):
+ *     def to_latlong(self):
  */
   pj_ctx_free(__pyx_v_self->projctx);
 
@@ -1023,26 +1263,125 @@ static void __pyx_pf_5_proj_4Proj_2__dealloc__(struct __pyx_obj_5_proj_Proj *__p
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_5_proj_4Proj_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_5_proj_4Proj_4__reduce__[] = "special method that allows pyproj.Proj instance to be pickled";
-static PyObject *__pyx_pw_5_proj_4Proj_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_5_proj_4Proj_5to_latlong(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5_proj_4Proj_4to_latlong[] = "return a new Proj instance which is the geographic (lat/lon)\n        coordinate version of the current projection";
+static PyObject *__pyx_pw_5_proj_4Proj_5to_latlong(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_5_proj_4Proj_4__reduce__(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("to_latlong (wrapper)", 0);
+  __pyx_r = __pyx_pf_5_proj_4Proj_4to_latlong(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self));
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "_proj.pyx":88
+/* "_proj.pyx":92
  *         pj_ctx_free(self.projctx)
  * 
+ *     def to_latlong(self):             # <<<<<<<<<<<<<<
+ *         """return a new Proj instance which is the geographic (lat/lon)
+ *         coordinate version of the current projection"""
+ */
+
+static PyObject *__pyx_pf_5_proj_4Proj_4to_latlong(struct __pyx_obj_5_proj_Proj *__pyx_v_self) {
+  projPJ __pyx_v_llpj;
+  char *__pyx_v_initstring;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("to_latlong", 0);
+
+  /* "_proj.pyx":96
+ *         coordinate version of the current projection"""
+ *         cdef projPJ llpj
+ *         llpj = pj_latlong_from_proj(self.projpj)             # <<<<<<<<<<<<<<
+ *         initstring = pj_get_def(llpj, 0)
+ *         pj_free(llpj)
+ */
+  __pyx_v_llpj = pj_latlong_from_proj(__pyx_v_self->projpj);
+
+  /* "_proj.pyx":97
+ *         cdef projPJ llpj
+ *         llpj = pj_latlong_from_proj(self.projpj)
+ *         initstring = pj_get_def(llpj, 0)             # <<<<<<<<<<<<<<
+ *         pj_free(llpj)
+ *         return _createproj(initstring)
+ */
+  __pyx_v_initstring = pj_get_def(__pyx_v_llpj, 0);
+
+  /* "_proj.pyx":98
+ *         llpj = pj_latlong_from_proj(self.projpj)
+ *         initstring = pj_get_def(llpj, 0)
+ *         pj_free(llpj)             # <<<<<<<<<<<<<<
+ *         return _createproj(initstring)
+ * 
+ */
+  pj_free(__pyx_v_llpj);
+
+  /* "_proj.pyx":99
+ *         initstring = pj_get_def(llpj, 0)
+ *         pj_free(llpj)
+ *         return _createproj(initstring)             # <<<<<<<<<<<<<<
+ * 
+ *     def __reduce__(self):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___createproj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_initstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+  __pyx_t_2 = 0;
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __pyx_r = __pyx_t_2;
+  __pyx_t_2 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("_proj.Proj.to_latlong", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5_proj_4Proj_7__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5_proj_4Proj_6__reduce__[] = "special method that allows pyproj.Proj instance to be pickled";
+static PyObject *__pyx_pw_5_proj_4Proj_7__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_5_proj_4Proj_6__reduce__(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "_proj.pyx":101
+ *         return _createproj(initstring)
+ * 
  *     def __reduce__(self):             # <<<<<<<<<<<<<<
  *         """special method that allows pyproj.Proj instance to be pickled"""
  *         return (self.__class__,(self.srs,))
  */
 
-static PyObject *__pyx_pf_5_proj_4Proj_4__reduce__(struct __pyx_obj_5_proj_Proj *__pyx_v_self) {
+static PyObject *__pyx_pf_5_proj_4Proj_6__reduce__(struct __pyx_obj_5_proj_Proj *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
@@ -1053,7 +1392,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_4__reduce__(struct __pyx_obj_5_proj_Proj
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__reduce__", 0);
 
-  /* "_proj.pyx":90
+  /* "_proj.pyx":103
  *     def __reduce__(self):
  *         """special method that allows pyproj.Proj instance to be pickled"""
  *         return (self.__class__,(self.srs,))             # <<<<<<<<<<<<<<
@@ -1061,14 +1400,14 @@ static PyObject *__pyx_pf_5_proj_4Proj_4__reduce__(struct __pyx_obj_5_proj_Proj
  *     def _fwd(self, object lons, object lats, radians=False, errcheck=False):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_v_self->srs);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->srs);
   __Pyx_GIVEREF(__pyx_v_self->srs);
-  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
@@ -1095,13 +1434,16 @@ static PyObject *__pyx_pf_5_proj_4Proj_4__reduce__(struct __pyx_obj_5_proj_Proj
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_5_proj_4Proj_7_fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5_proj_4Proj_6_fwd[] = "\n forward transformation - lons,lats to x,y (done in place).\n if radians=True, lons/lats are radians instead of degrees.\n if errcheck=True, an exception is raised if the forward transformation is invalid.\n if errcheck=False and the forward transformation is invalid, no exception is\n raised and 1.e30 is returned.\n        ";
-static PyObject *__pyx_pw_5_proj_4Proj_7_fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_5_proj_4Proj_9_fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5_proj_4Proj_8_fwd[] = "\n forward transformation - lons,lats to x,y (done in place).\n if radians=True, lons/lats are radians instead of degrees.\n if errcheck=True, an exception is raised if the forward transformation is invalid.\n if errcheck=False and the forward transformation is invalid, no exception is\n raised and 1.e30 is returned.\n        ";
+static PyObject *__pyx_pw_5_proj_4Proj_9_fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_lons = 0;
   PyObject *__pyx_v_lats = 0;
   PyObject *__pyx_v_radians = 0;
   PyObject *__pyx_v_errcheck = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_fwd (wrapper)", 0);
@@ -1129,7 +1471,7 @@ static PyObject *__pyx_pw_5_proj_4Proj_7_fwd(PyObject *__pyx_v_self, PyObject *_
         case  1:
         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lats)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_fwd", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_fwd", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (kw_args > 0) {
@@ -1143,7 +1485,7 @@ static PyObject *__pyx_pw_5_proj_4Proj_7_fwd(PyObject *__pyx_v_self, PyObject *_
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_fwd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_fwd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -1162,18 +1504,18 @@ static PyObject *__pyx_pw_5_proj_4Proj_7_fwd(PyObject *__pyx_v_self, PyObject *_
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_fwd", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_fwd", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("_proj.Proj._fwd", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5_proj_4Proj_6_fwd(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self), __pyx_v_lons, __pyx_v_lats, __pyx_v_radians, __pyx_v_errcheck);
+  __pyx_r = __pyx_pf_5_proj_4Proj_8_fwd(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self), __pyx_v_lons, __pyx_v_lats, __pyx_v_radians, __pyx_v_errcheck);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "_proj.pyx":92
+/* "_proj.pyx":105
  *         return (self.__class__,(self.srs,))
  * 
  *     def _fwd(self, object lons, object lats, radians=False, errcheck=False):             # <<<<<<<<<<<<<<
@@ -1181,7 +1523,7 @@ static PyObject *__pyx_pw_5_proj_4Proj_7_fwd(PyObject *__pyx_v_self, PyObject *_
  *  forward transformation - lons,lats to x,y (done in place).
  */
 
-static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_lons, PyObject *__pyx_v_lats, PyObject *__pyx_v_radians, PyObject *__pyx_v_errcheck) {
+static PyObject *__pyx_pf_5_proj_4Proj_8_fwd(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_lons, PyObject *__pyx_v_lats, PyObject *__pyx_v_radians, PyObject *__pyx_v_errcheck) {
   projUV __pyx_v_projxyout;
   projUV __pyx_v_projlonlatin;
   Py_ssize_t __pyx_v_buflenx;
@@ -1208,17 +1550,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_fwd", 0);
 
-  /* "_proj.pyx":107
+  /* "_proj.pyx":120
  *         cdef int err
  *         # if buffer api is supported, get pointer to data buffers.
  *         if PyObject_AsWriteBuffer(lons, &londata, &buflenx) <> 0:             # <<<<<<<<<<<<<<
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(lats, &latdata, &bufleny) <> 0:
  */
-  __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenx)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenx)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":108
+    /* "_proj.pyx":121
  *         # if buffer api is supported, get pointer to data buffers.
  *         if PyObject_AsWriteBuffer(lons, &londata, &buflenx) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -1226,22 +1568,22 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
  *             raise RuntimeError
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "_proj.pyx":109
+  /* "_proj.pyx":122
  *         if PyObject_AsWriteBuffer(lons, &londata, &buflenx) <> 0:
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(lats, &latdata, &bufleny) <> 0:             # <<<<<<<<<<<<<<
  *             raise RuntimeError
  *         # process data in buffer
  */
-  __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_bufleny)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_bufleny)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":110
+    /* "_proj.pyx":123
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(lats, &latdata, &bufleny) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -1249,57 +1591,57 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
  *         if buflenx != bufleny:
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "_proj.pyx":112
+  /* "_proj.pyx":125
  *             raise RuntimeError
  *         # process data in buffer
  *         if buflenx != bufleny:             # <<<<<<<<<<<<<<
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenx//_doublesize
  */
-  __pyx_t_1 = (__pyx_v_buflenx != __pyx_v_bufleny);
+  __pyx_t_1 = ((__pyx_v_buflenx != __pyx_v_bufleny) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":113
+    /* "_proj.pyx":126
  *         # process data in buffer
  *         if buflenx != bufleny:
  *             raise RuntimeError("Buffer lengths not the same")             # <<<<<<<<<<<<<<
  *         ndim = buflenx//_doublesize
  *         lonsdata = <double *>londata
  */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "_proj.pyx":114
+  /* "_proj.pyx":127
  *         if buflenx != bufleny:
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenx//_doublesize             # <<<<<<<<<<<<<<
  *         lonsdata = <double *>londata
  *         latsdata = <double *>latdata
  */
-  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_buflenx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_buflenx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___doublesize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___doublesize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __pyx_v_ndim = __pyx_t_5;
 
-  /* "_proj.pyx":115
+  /* "_proj.pyx":128
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenx//_doublesize
  *         lonsdata = <double *>londata             # <<<<<<<<<<<<<<
@@ -1308,7 +1650,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
  */
   __pyx_v_lonsdata = ((double *)__pyx_v_londata);
 
-  /* "_proj.pyx":116
+  /* "_proj.pyx":129
  *         ndim = buflenx//_doublesize
  *         lonsdata = <double *>londata
  *         latsdata = <double *>latdata             # <<<<<<<<<<<<<<
@@ -1317,7 +1659,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
  */
   __pyx_v_latsdata = ((double *)__pyx_v_latdata);
 
-  /* "_proj.pyx":117
+  /* "_proj.pyx":130
  *         lonsdata = <double *>londata
  *         latsdata = <double *>latdata
  *         for i from 0 <= i < ndim:             # <<<<<<<<<<<<<<
@@ -1327,23 +1669,23 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
   __pyx_t_5 = __pyx_v_ndim;
   for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
 
-    /* "_proj.pyx":119
+    /* "_proj.pyx":132
  *         for i from 0 <= i < ndim:
  *             # if inputs are nan's, return big number.
  *             if lonsdata[i] != lonsdata[i] or latsdata[i] != latsdata[i]:             # <<<<<<<<<<<<<<
  *                 lonsdata[i]=1.e30; latsdata[i]=1.e30
  *                 if errcheck:
  */
-    __pyx_t_1 = ((__pyx_v_lonsdata[__pyx_v_i]) != (__pyx_v_lonsdata[__pyx_v_i]));
+    __pyx_t_1 = (((__pyx_v_lonsdata[__pyx_v_i]) != (__pyx_v_lonsdata[__pyx_v_i])) != 0);
     if (!__pyx_t_1) {
-      __pyx_t_6 = ((__pyx_v_latsdata[__pyx_v_i]) != (__pyx_v_latsdata[__pyx_v_i]));
+      __pyx_t_6 = (((__pyx_v_latsdata[__pyx_v_i]) != (__pyx_v_latsdata[__pyx_v_i])) != 0);
       __pyx_t_7 = __pyx_t_6;
     } else {
       __pyx_t_7 = __pyx_t_1;
     }
     if (__pyx_t_7) {
 
-      /* "_proj.pyx":120
+      /* "_proj.pyx":133
  *             # if inputs are nan's, return big number.
  *             if lonsdata[i] != lonsdata[i] or latsdata[i] != latsdata[i]:
  *                 lonsdata[i]=1.e30; latsdata[i]=1.e30             # <<<<<<<<<<<<<<
@@ -1353,33 +1695,33 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
       (__pyx_v_lonsdata[__pyx_v_i]) = 1.e30;
       (__pyx_v_latsdata[__pyx_v_i]) = 1.e30;
 
-      /* "_proj.pyx":121
+      /* "_proj.pyx":134
  *             if lonsdata[i] != lonsdata[i] or latsdata[i] != latsdata[i]:
  *                 lonsdata[i]=1.e30; latsdata[i]=1.e30
  *                 if errcheck:             # <<<<<<<<<<<<<<
  *                     raise RuntimeError('projection undefined')
  *                 continue
  */
-      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       if (__pyx_t_7) {
 
-        /* "_proj.pyx":122
+        /* "_proj.pyx":135
  *                 lonsdata[i]=1.e30; latsdata[i]=1.e30
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 continue
  *             if radians:
  */
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L9;
       }
       __pyx_L9:;
 
-      /* "_proj.pyx":123
+      /* "_proj.pyx":136
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  *                 continue             # <<<<<<<<<<<<<<
@@ -1391,17 +1733,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
     }
     __pyx_L8:;
 
-    /* "_proj.pyx":124
+    /* "_proj.pyx":137
  *                     raise RuntimeError('projection undefined')
  *                 continue
  *             if radians:             # <<<<<<<<<<<<<<
  *                 projlonlatin.u = lonsdata[i]
  *                 projlonlatin.v = latsdata[i]
  */
-    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_7) {
 
-      /* "_proj.pyx":125
+      /* "_proj.pyx":138
  *                 continue
  *             if radians:
  *                 projlonlatin.u = lonsdata[i]             # <<<<<<<<<<<<<<
@@ -1410,7 +1752,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
  */
       __pyx_v_projlonlatin.u = (__pyx_v_lonsdata[__pyx_v_i]);
 
-      /* "_proj.pyx":126
+      /* "_proj.pyx":139
  *             if radians:
  *                 projlonlatin.u = lonsdata[i]
  *                 projlonlatin.v = latsdata[i]             # <<<<<<<<<<<<<<
@@ -1422,7 +1764,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
     }
     /*else*/ {
 
-      /* "_proj.pyx":128
+      /* "_proj.pyx":141
  *                 projlonlatin.v = latsdata[i]
  *             else:
  *                 projlonlatin.u = _dg2rad*lonsdata[i]             # <<<<<<<<<<<<<<
@@ -1431,7 +1773,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
  */
       __pyx_v_projlonlatin.u = (__pyx_v_5_proj__dg2rad * (__pyx_v_lonsdata[__pyx_v_i]));
 
-      /* "_proj.pyx":129
+      /* "_proj.pyx":142
  *             else:
  *                 projlonlatin.u = _dg2rad*lonsdata[i]
  *                 projlonlatin.v = _dg2rad*latsdata[i]             # <<<<<<<<<<<<<<
@@ -1442,7 +1784,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
     }
     __pyx_L10:;
 
-    /* "_proj.pyx":130
+    /* "_proj.pyx":143
  *                 projlonlatin.u = _dg2rad*lonsdata[i]
  *                 projlonlatin.v = _dg2rad*latsdata[i]
  *             projxyout = pj_fwd(projlonlatin,self.projpj)             # <<<<<<<<<<<<<<
@@ -1451,17 +1793,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
  */
     __pyx_v_projxyout = pj_fwd(__pyx_v_projlonlatin, __pyx_v_self->projpj);
 
-    /* "_proj.pyx":131
+    /* "_proj.pyx":144
  *                 projlonlatin.v = _dg2rad*latsdata[i]
  *             projxyout = pj_fwd(projlonlatin,self.projpj)
  *             if errcheck:             # <<<<<<<<<<<<<<
  *                 err = pj_ctx_get_errno(self.projctx)
  *                 if err != 0:
  */
-    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_7) {
 
-      /* "_proj.pyx":132
+      /* "_proj.pyx":145
  *             projxyout = pj_fwd(projlonlatin,self.projpj)
  *             if errcheck:
  *                 err = pj_ctx_get_errno(self.projctx)             # <<<<<<<<<<<<<<
@@ -1470,36 +1812,36 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
  */
       __pyx_v_err = pj_ctx_get_errno(__pyx_v_self->projctx);
 
-      /* "_proj.pyx":133
+      /* "_proj.pyx":146
  *             if errcheck:
  *                 err = pj_ctx_get_errno(self.projctx)
  *                 if err != 0:             # <<<<<<<<<<<<<<
  *                      raise RuntimeError(pj_strerrno(err))
  *             # since HUGE_VAL can be 'inf',
  */
-      __pyx_t_7 = (__pyx_v_err != 0);
+      __pyx_t_7 = ((__pyx_v_err != 0) != 0);
       if (__pyx_t_7) {
 
-        /* "_proj.pyx":134
+        /* "_proj.pyx":147
  *                 err = pj_ctx_get_errno(self.projctx)
  *                 if err != 0:
  *                      raise RuntimeError(pj_strerrno(err))             # <<<<<<<<<<<<<<
  *             # since HUGE_VAL can be 'inf',
  *             # change it to a real (but very large) number.
  */
-        __pyx_t_4 = PyBytes_FromString(pj_strerrno(__pyx_v_err)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = __Pyx_PyBytes_FromString(pj_strerrno(__pyx_v_err)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_3);
         PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
         __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
         __pyx_t_4 = 0;
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L12;
       }
       __pyx_L12:;
@@ -1507,57 +1849,57 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
     }
     __pyx_L11:;
 
-    /* "_proj.pyx":138
+    /* "_proj.pyx":151
  *             # change it to a real (but very large) number.
  *             # also check for NaNs.
  *             if projxyout.u == HUGE_VAL or\             # <<<<<<<<<<<<<<
  *                projxyout.u != projxyout.u:
  *                 if errcheck:
  */
-    __pyx_t_7 = (__pyx_v_projxyout.u == HUGE_VAL);
+    __pyx_t_7 = ((__pyx_v_projxyout.u == HUGE_VAL) != 0);
     if (!__pyx_t_7) {
 
-      /* "_proj.pyx":139
+      /* "_proj.pyx":152
  *             # also check for NaNs.
  *             if projxyout.u == HUGE_VAL or\
  *                projxyout.u != projxyout.u:             # <<<<<<<<<<<<<<
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  */
-      __pyx_t_1 = (__pyx_v_projxyout.u != __pyx_v_projxyout.u);
+      __pyx_t_1 = ((__pyx_v_projxyout.u != __pyx_v_projxyout.u) != 0);
       __pyx_t_6 = __pyx_t_1;
     } else {
       __pyx_t_6 = __pyx_t_7;
     }
     if (__pyx_t_6) {
 
-      /* "_proj.pyx":140
+      /* "_proj.pyx":153
  *             if projxyout.u == HUGE_VAL or\
  *                projxyout.u != projxyout.u:
  *                 if errcheck:             # <<<<<<<<<<<<<<
  *                     raise RuntimeError('projection undefined')
  *                 lonsdata[i] = 1.e30
  */
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       if (__pyx_t_6) {
 
-        /* "_proj.pyx":141
+        /* "_proj.pyx":154
  *                projxyout.u != projxyout.u:
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 lonsdata[i] = 1.e30
  *             else:
  */
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L14;
       }
       __pyx_L14:;
 
-      /* "_proj.pyx":142
+      /* "_proj.pyx":155
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  *                 lonsdata[i] = 1.e30             # <<<<<<<<<<<<<<
@@ -1569,7 +1911,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
     }
     /*else*/ {
 
-      /* "_proj.pyx":144
+      /* "_proj.pyx":157
  *                 lonsdata[i] = 1.e30
  *             else:
  *                 lonsdata[i] = projxyout.u             # <<<<<<<<<<<<<<
@@ -1581,57 +1923,57 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
     }
     __pyx_L13:;
 
-    /* "_proj.pyx":145
+    /* "_proj.pyx":158
  *             else:
  *                 lonsdata[i] = projxyout.u
  *             if projxyout.v == HUGE_VAL or\             # <<<<<<<<<<<<<<
  *                projxyout.u != projxyout.u:
  *                 if errcheck:
  */
-    __pyx_t_6 = (__pyx_v_projxyout.v == HUGE_VAL);
+    __pyx_t_6 = ((__pyx_v_projxyout.v == HUGE_VAL) != 0);
     if (!__pyx_t_6) {
 
-      /* "_proj.pyx":146
+      /* "_proj.pyx":159
  *                 lonsdata[i] = projxyout.u
  *             if projxyout.v == HUGE_VAL or\
  *                projxyout.u != projxyout.u:             # <<<<<<<<<<<<<<
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  */
-      __pyx_t_7 = (__pyx_v_projxyout.u != __pyx_v_projxyout.u);
+      __pyx_t_7 = ((__pyx_v_projxyout.u != __pyx_v_projxyout.u) != 0);
       __pyx_t_1 = __pyx_t_7;
     } else {
       __pyx_t_1 = __pyx_t_6;
     }
     if (__pyx_t_1) {
 
-      /* "_proj.pyx":147
+      /* "_proj.pyx":160
  *             if projxyout.v == HUGE_VAL or\
  *                projxyout.u != projxyout.u:
  *                 if errcheck:             # <<<<<<<<<<<<<<
  *                     raise RuntimeError('projection undefined')
  *                 latsdata[i] = 1.e30
  */
-      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       if (__pyx_t_1) {
 
-        /* "_proj.pyx":148
+        /* "_proj.pyx":161
  *                projxyout.u != projxyout.u:
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 latsdata[i] = 1.e30
  *             else:
  */
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L16;
       }
       __pyx_L16:;
 
-      /* "_proj.pyx":149
+      /* "_proj.pyx":162
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  *                 latsdata[i] = 1.e30             # <<<<<<<<<<<<<<
@@ -1643,7 +1985,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
     }
     /*else*/ {
 
-      /* "_proj.pyx":151
+      /* "_proj.pyx":164
  *                 latsdata[i] = 1.e30
  *             else:
  *                 latsdata[i] = projxyout.v             # <<<<<<<<<<<<<<
@@ -1672,13 +2014,16 @@ static PyObject *__pyx_pf_5_proj_4Proj_6_fwd(struct __pyx_obj_5_proj_Proj *__pyx
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_5_proj_4Proj_9_inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_5_proj_4Proj_8_inv[] = "\n inverse transformation - x,y to lons,lats (done in place).\n if radians=True, lons/lats are radians instead of degrees.\n if errcheck=True, an exception is raised if the inverse transformation is invalid.\n if errcheck=False and the inverse transformation is invalid, no exception is\n raised and 1.e30 is returned.\n        ";
-static PyObject *__pyx_pw_5_proj_4Proj_9_inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_5_proj_4Proj_11_inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5_proj_4Proj_10_inv[] = "\n inverse transformation - x,y to lons,lats (done in place).\n if radians=True, lons/lats are radians instead of degrees.\n if errcheck=True, an exception is raised if the inverse transformation is invalid.\n if errcheck=False and the inverse transformation is invalid, no exception is\n raised and 1.e30 is returned.\n        ";
+static PyObject *__pyx_pw_5_proj_4Proj_11_inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_x = 0;
   PyObject *__pyx_v_y = 0;
   PyObject *__pyx_v_radians = 0;
   PyObject *__pyx_v_errcheck = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_inv (wrapper)", 0);
@@ -1706,7 +2051,7 @@ static PyObject *__pyx_pw_5_proj_4Proj_9_inv(PyObject *__pyx_v_self, PyObject *_
         case  1:
         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_inv", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_inv", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (kw_args > 0) {
@@ -1720,7 +2065,7 @@ static PyObject *__pyx_pw_5_proj_4Proj_9_inv(PyObject *__pyx_v_self, PyObject *_
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_inv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_inv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -1739,18 +2084,18 @@ static PyObject *__pyx_pw_5_proj_4Proj_9_inv(PyObject *__pyx_v_self, PyObject *_
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_inv", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_inv", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("_proj.Proj._inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_5_proj_4Proj_8_inv(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_radians, __pyx_v_errcheck);
+  __pyx_r = __pyx_pf_5_proj_4Proj_10_inv(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_radians, __pyx_v_errcheck);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "_proj.pyx":153
+/* "_proj.pyx":166
  *                 latsdata[i] = projxyout.v
  * 
  *     def _inv(self, object x, object y, radians=False, errcheck=False):             # <<<<<<<<<<<<<<
@@ -1758,7 +2103,7 @@ static PyObject *__pyx_pw_5_proj_4Proj_9_inv(PyObject *__pyx_v_self, PyObject *_
  *  inverse transformation - x,y to lons,lats (done in place).
  */
 
-static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_radians, PyObject *__pyx_v_errcheck) {
+static PyObject *__pyx_pf_5_proj_4Proj_10_inv(struct __pyx_obj_5_proj_Proj *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_radians, PyObject *__pyx_v_errcheck) {
   projUV __pyx_v_projxyin;
   projUV __pyx_v_projlonlatout;
   Py_ssize_t __pyx_v_buflenx;
@@ -1785,17 +2130,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_inv", 0);
 
-  /* "_proj.pyx":167
+  /* "_proj.pyx":180
  *         cdef double *xdatab, *ydatab
  *         # if buffer api is supported, get pointer to data buffers.
  *         if PyObject_AsWriteBuffer(x, &xdata, &buflenx) <> 0:             # <<<<<<<<<<<<<<
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(y, &ydata, &bufleny) <> 0:
  */
-  __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_x, (&__pyx_v_xdata), (&__pyx_v_buflenx)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_x, (&__pyx_v_xdata), (&__pyx_v_buflenx)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":168
+    /* "_proj.pyx":181
  *         # if buffer api is supported, get pointer to data buffers.
  *         if PyObject_AsWriteBuffer(x, &xdata, &buflenx) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -1803,22 +2148,22 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
  *             raise RuntimeError
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "_proj.pyx":169
+  /* "_proj.pyx":182
  *         if PyObject_AsWriteBuffer(x, &xdata, &buflenx) <> 0:
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(y, &ydata, &bufleny) <> 0:             # <<<<<<<<<<<<<<
  *             raise RuntimeError
  *         # process data in buffer
  */
-  __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_y, (&__pyx_v_ydata), (&__pyx_v_bufleny)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_y, (&__pyx_v_ydata), (&__pyx_v_bufleny)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":170
+    /* "_proj.pyx":183
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(y, &ydata, &bufleny) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -1826,57 +2171,57 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
  *         # (for numpy/regular python arrays).
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "_proj.pyx":173
+  /* "_proj.pyx":186
  *         # process data in buffer
  *         # (for numpy/regular python arrays).
  *         if buflenx != bufleny:             # <<<<<<<<<<<<<<
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenx//_doublesize
  */
-  __pyx_t_1 = (__pyx_v_buflenx != __pyx_v_bufleny);
+  __pyx_t_1 = ((__pyx_v_buflenx != __pyx_v_bufleny) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":174
+    /* "_proj.pyx":187
  *         # (for numpy/regular python arrays).
  *         if buflenx != bufleny:
  *             raise RuntimeError("Buffer lengths not the same")             # <<<<<<<<<<<<<<
  *         ndim = buflenx//_doublesize
  *         xdatab = <double *>xdata
  */
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "_proj.pyx":175
+  /* "_proj.pyx":188
  *         if buflenx != bufleny:
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenx//_doublesize             # <<<<<<<<<<<<<<
  *         xdatab = <double *>xdata
  *         ydatab = <double *>ydata
  */
-  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_buflenx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_buflenx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___doublesize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___doublesize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   __pyx_v_ndim = __pyx_t_5;
 
-  /* "_proj.pyx":176
+  /* "_proj.pyx":189
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenx//_doublesize
  *         xdatab = <double *>xdata             # <<<<<<<<<<<<<<
@@ -1885,7 +2230,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
  */
   __pyx_v_xdatab = ((double *)__pyx_v_xdata);
 
-  /* "_proj.pyx":177
+  /* "_proj.pyx":190
  *         ndim = buflenx//_doublesize
  *         xdatab = <double *>xdata
  *         ydatab = <double *>ydata             # <<<<<<<<<<<<<<
@@ -1894,7 +2239,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
  */
   __pyx_v_ydatab = ((double *)__pyx_v_ydata);
 
-  /* "_proj.pyx":178
+  /* "_proj.pyx":191
  *         xdatab = <double *>xdata
  *         ydatab = <double *>ydata
  *         for i from 0 <= i < ndim:             # <<<<<<<<<<<<<<
@@ -1904,23 +2249,23 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
   __pyx_t_5 = __pyx_v_ndim;
   for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
 
-    /* "_proj.pyx":180
+    /* "_proj.pyx":193
  *         for i from 0 <= i < ndim:
  *             # if inputs are nan's, return big number.
  *             if xdatab[i] != xdatab[i] or ydatab[i] != ydatab[i]:             # <<<<<<<<<<<<<<
  *                 xdatab[i]=1.e30; ydatab[i]=1.e30
  *                 if errcheck:
  */
-    __pyx_t_1 = ((__pyx_v_xdatab[__pyx_v_i]) != (__pyx_v_xdatab[__pyx_v_i]));
+    __pyx_t_1 = (((__pyx_v_xdatab[__pyx_v_i]) != (__pyx_v_xdatab[__pyx_v_i])) != 0);
     if (!__pyx_t_1) {
-      __pyx_t_6 = ((__pyx_v_ydatab[__pyx_v_i]) != (__pyx_v_ydatab[__pyx_v_i]));
+      __pyx_t_6 = (((__pyx_v_ydatab[__pyx_v_i]) != (__pyx_v_ydatab[__pyx_v_i])) != 0);
       __pyx_t_7 = __pyx_t_6;
     } else {
       __pyx_t_7 = __pyx_t_1;
     }
     if (__pyx_t_7) {
 
-      /* "_proj.pyx":181
+      /* "_proj.pyx":194
  *             # if inputs are nan's, return big number.
  *             if xdatab[i] != xdatab[i] or ydatab[i] != ydatab[i]:
  *                 xdatab[i]=1.e30; ydatab[i]=1.e30             # <<<<<<<<<<<<<<
@@ -1930,33 +2275,33 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
       (__pyx_v_xdatab[__pyx_v_i]) = 1.e30;
       (__pyx_v_ydatab[__pyx_v_i]) = 1.e30;
 
-      /* "_proj.pyx":182
+      /* "_proj.pyx":195
  *             if xdatab[i] != xdatab[i] or ydatab[i] != ydatab[i]:
  *                 xdatab[i]=1.e30; ydatab[i]=1.e30
  *                 if errcheck:             # <<<<<<<<<<<<<<
  *                     raise RuntimeError('projection undefined')
  *                 continue
  */
-      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       if (__pyx_t_7) {
 
-        /* "_proj.pyx":183
+        /* "_proj.pyx":196
  *                 xdatab[i]=1.e30; ydatab[i]=1.e30
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 continue
  *             projxyin.u = xdatab[i]
  */
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L9;
       }
       __pyx_L9:;
 
-      /* "_proj.pyx":184
+      /* "_proj.pyx":197
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  *                 continue             # <<<<<<<<<<<<<<
@@ -1968,7 +2313,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
     }
     __pyx_L8:;
 
-    /* "_proj.pyx":185
+    /* "_proj.pyx":198
  *                     raise RuntimeError('projection undefined')
  *                 continue
  *             projxyin.u = xdatab[i]             # <<<<<<<<<<<<<<
@@ -1977,7 +2322,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
  */
     __pyx_v_projxyin.u = (__pyx_v_xdatab[__pyx_v_i]);
 
-    /* "_proj.pyx":186
+    /* "_proj.pyx":199
  *                 continue
  *             projxyin.u = xdatab[i]
  *             projxyin.v = ydatab[i]             # <<<<<<<<<<<<<<
@@ -1986,7 +2331,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
  */
     __pyx_v_projxyin.v = (__pyx_v_ydatab[__pyx_v_i]);
 
-    /* "_proj.pyx":187
+    /* "_proj.pyx":200
  *             projxyin.u = xdatab[i]
  *             projxyin.v = ydatab[i]
  *             projlonlatout = pj_inv(projxyin,self.projpj)             # <<<<<<<<<<<<<<
@@ -1995,17 +2340,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
  */
     __pyx_v_projlonlatout = pj_inv(__pyx_v_projxyin, __pyx_v_self->projpj);
 
-    /* "_proj.pyx":188
+    /* "_proj.pyx":201
  *             projxyin.v = ydatab[i]
  *             projlonlatout = pj_inv(projxyin,self.projpj)
  *             if errcheck:             # <<<<<<<<<<<<<<
  *                 err = pj_ctx_get_errno(self.projctx)
  *                 if err != 0:
  */
-    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_7) {
 
-      /* "_proj.pyx":189
+      /* "_proj.pyx":202
  *             projlonlatout = pj_inv(projxyin,self.projpj)
  *             if errcheck:
  *                 err = pj_ctx_get_errno(self.projctx)             # <<<<<<<<<<<<<<
@@ -2014,36 +2359,36 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
  */
       __pyx_v_err = pj_ctx_get_errno(__pyx_v_self->projctx);
 
-      /* "_proj.pyx":190
+      /* "_proj.pyx":203
  *             if errcheck:
  *                 err = pj_ctx_get_errno(self.projctx)
  *                 if err != 0:             # <<<<<<<<<<<<<<
  *                      raise RuntimeError(pj_strerrno(err))
  *             # since HUGE_VAL can be 'inf',
  */
-      __pyx_t_7 = (__pyx_v_err != 0);
+      __pyx_t_7 = ((__pyx_v_err != 0) != 0);
       if (__pyx_t_7) {
 
-        /* "_proj.pyx":191
+        /* "_proj.pyx":204
  *                 err = pj_ctx_get_errno(self.projctx)
  *                 if err != 0:
  *                      raise RuntimeError(pj_strerrno(err))             # <<<<<<<<<<<<<<
  *             # since HUGE_VAL can be 'inf',
  *             # change it to a real (but very large) number.
  */
-        __pyx_t_4 = PyBytes_FromString(pj_strerrno(__pyx_v_err)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = __Pyx_PyBytes_FromString(pj_strerrno(__pyx_v_err)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_3);
         PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
         __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
         __pyx_t_4 = 0;
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L11;
       }
       __pyx_L11:;
@@ -2051,57 +2396,57 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
     }
     __pyx_L10:;
 
-    /* "_proj.pyx":195
+    /* "_proj.pyx":208
  *             # change it to a real (but very large) number.
  *             # also check for NaNs.
  *             if projlonlatout.u == HUGE_VAL or \             # <<<<<<<<<<<<<<
  *                projlonlatout.u != projlonlatout.u:
  *                 if errcheck:
  */
-    __pyx_t_7 = (__pyx_v_projlonlatout.u == HUGE_VAL);
+    __pyx_t_7 = ((__pyx_v_projlonlatout.u == HUGE_VAL) != 0);
     if (!__pyx_t_7) {
 
-      /* "_proj.pyx":196
+      /* "_proj.pyx":209
  *             # also check for NaNs.
  *             if projlonlatout.u == HUGE_VAL or \
  *                projlonlatout.u != projlonlatout.u:             # <<<<<<<<<<<<<<
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  */
-      __pyx_t_1 = (__pyx_v_projlonlatout.u != __pyx_v_projlonlatout.u);
+      __pyx_t_1 = ((__pyx_v_projlonlatout.u != __pyx_v_projlonlatout.u) != 0);
       __pyx_t_6 = __pyx_t_1;
     } else {
       __pyx_t_6 = __pyx_t_7;
     }
     if (__pyx_t_6) {
 
-      /* "_proj.pyx":197
+      /* "_proj.pyx":210
  *             if projlonlatout.u == HUGE_VAL or \
  *                projlonlatout.u != projlonlatout.u:
  *                 if errcheck:             # <<<<<<<<<<<<<<
  *                     raise RuntimeError('projection undefined')
  *                 xdatab[i] = 1.e30
  */
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       if (__pyx_t_6) {
 
-        /* "_proj.pyx":198
+        /* "_proj.pyx":211
  *                projlonlatout.u != projlonlatout.u:
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 xdatab[i] = 1.e30
  *             elif radians:
  */
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L13;
       }
       __pyx_L13:;
 
-      /* "_proj.pyx":199
+      /* "_proj.pyx":212
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  *                 xdatab[i] = 1.e30             # <<<<<<<<<<<<<<
@@ -2112,17 +2457,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
       goto __pyx_L12;
     }
 
-    /* "_proj.pyx":200
+    /* "_proj.pyx":213
  *                     raise RuntimeError('projection undefined')
  *                 xdatab[i] = 1.e30
  *             elif radians:             # <<<<<<<<<<<<<<
  *                 xdatab[i] = projlonlatout.u
  *             else:
  */
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_6) {
 
-      /* "_proj.pyx":201
+      /* "_proj.pyx":214
  *                 xdatab[i] = 1.e30
  *             elif radians:
  *                 xdatab[i] = projlonlatout.u             # <<<<<<<<<<<<<<
@@ -2135,7 +2480,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
     }
     /*else*/ {
 
-      /* "_proj.pyx":203
+      /* "_proj.pyx":216
  *                 xdatab[i] = projlonlatout.u
  *             else:
  *                 xdatab[i] = _rad2dg*projlonlatout.u             # <<<<<<<<<<<<<<
@@ -2146,57 +2491,57 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
     }
     __pyx_L12:;
 
-    /* "_proj.pyx":204
+    /* "_proj.pyx":217
  *             else:
  *                 xdatab[i] = _rad2dg*projlonlatout.u
  *             if projlonlatout.v == HUGE_VAL or \             # <<<<<<<<<<<<<<
  *                projlonlatout.v != projlonlatout.v:
  *                 if errcheck:
  */
-    __pyx_t_6 = (__pyx_v_projlonlatout.v == HUGE_VAL);
+    __pyx_t_6 = ((__pyx_v_projlonlatout.v == HUGE_VAL) != 0);
     if (!__pyx_t_6) {
 
-      /* "_proj.pyx":205
+      /* "_proj.pyx":218
  *                 xdatab[i] = _rad2dg*projlonlatout.u
  *             if projlonlatout.v == HUGE_VAL or \
  *                projlonlatout.v != projlonlatout.v:             # <<<<<<<<<<<<<<
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  */
-      __pyx_t_7 = (__pyx_v_projlonlatout.v != __pyx_v_projlonlatout.v);
+      __pyx_t_7 = ((__pyx_v_projlonlatout.v != __pyx_v_projlonlatout.v) != 0);
       __pyx_t_1 = __pyx_t_7;
     } else {
       __pyx_t_1 = __pyx_t_6;
     }
     if (__pyx_t_1) {
 
-      /* "_proj.pyx":206
+      /* "_proj.pyx":219
  *             if projlonlatout.v == HUGE_VAL or \
  *                projlonlatout.v != projlonlatout.v:
  *                 if errcheck:             # <<<<<<<<<<<<<<
  *                     raise RuntimeError('projection undefined')
  *                 ydatab[i] = 1.e30
  */
-      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_errcheck); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       if (__pyx_t_1) {
 
-        /* "_proj.pyx":207
+        /* "_proj.pyx":220
  *                projlonlatout.v != projlonlatout.v:
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 ydatab[i] = 1.e30
  *             elif radians:
  */
-        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_4);
         __Pyx_Raise(__pyx_t_4, 0, 0, 0);
         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         goto __pyx_L15;
       }
       __pyx_L15:;
 
-      /* "_proj.pyx":208
+      /* "_proj.pyx":221
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')
  *                 ydatab[i] = 1.e30             # <<<<<<<<<<<<<<
@@ -2207,17 +2552,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
       goto __pyx_L14;
     }
 
-    /* "_proj.pyx":209
+    /* "_proj.pyx":222
  *                     raise RuntimeError('projection undefined')
  *                 ydatab[i] = 1.e30
  *             elif radians:             # <<<<<<<<<<<<<<
  *                 ydatab[i] = projlonlatout.v
  *             else:
  */
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_1) {
 
-      /* "_proj.pyx":210
+      /* "_proj.pyx":223
  *                 ydatab[i] = 1.e30
  *             elif radians:
  *                 ydatab[i] = projlonlatout.v             # <<<<<<<<<<<<<<
@@ -2230,7 +2575,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
     }
     /*else*/ {
 
-      /* "_proj.pyx":212
+      /* "_proj.pyx":225
  *                 ydatab[i] = projlonlatout.v
  *             else:
  *                 ydatab[i] = _rad2dg*projlonlatout.v             # <<<<<<<<<<<<<<
@@ -2258,17 +2603,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_8_inv(struct __pyx_obj_5_proj_Proj *__pyx
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_5_proj_4Proj_11is_latlong(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_5_proj_4Proj_11is_latlong(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_5_proj_4Proj_13is_latlong(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_5_proj_4Proj_13is_latlong(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("is_latlong (wrapper)", 0);
-  __pyx_r = __pyx_pf_5_proj_4Proj_10is_latlong(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self));
+  __pyx_r = __pyx_pf_5_proj_4Proj_12is_latlong(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self));
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "_proj.pyx":291
+/* "_proj.pyx":304
  * #               llptr[i].v = _rad2dg*projlonlatout.v
  * 
  *     def is_latlong(self):             # <<<<<<<<<<<<<<
@@ -2276,17 +2621,18 @@ static PyObject *__pyx_pw_5_proj_4Proj_11is_latlong(PyObject *__pyx_v_self, CYTH
  *         cdef int i
  */
 
-static PyObject *__pyx_pf_5_proj_4Proj_10is_latlong(struct __pyx_obj_5_proj_Proj *__pyx_v_self) {
+static PyObject *__pyx_pf_5_proj_4Proj_12is_latlong(struct __pyx_obj_5_proj_Proj *__pyx_v_self) {
   int __pyx_v_i;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("is_latlong", 0);
 
-  /* "_proj.pyx":294
+  /* "_proj.pyx":307
  *         # returns True if projection in geographic (lon/lat) coordinates
  *         cdef int i
  *         i = pj_is_latlong(self.projpj)             # <<<<<<<<<<<<<<
@@ -2295,16 +2641,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_10is_latlong(struct __pyx_obj_5_proj_Proj
  */
   __pyx_v_i = pj_is_latlong(__pyx_v_self->projpj);
 
-  /* "_proj.pyx":295
+  /* "_proj.pyx":308
  *         cdef int i
  *         i = pj_is_latlong(self.projpj)
  *         if i:             # <<<<<<<<<<<<<<
  *             return True
  *         else:
  */
-  if (__pyx_v_i) {
+  __pyx_t_1 = (__pyx_v_i != 0);
+  if (__pyx_t_1) {
 
-    /* "_proj.pyx":296
+    /* "_proj.pyx":309
  *         i = pj_is_latlong(self.projpj)
  *         if i:
  *             return True             # <<<<<<<<<<<<<<
@@ -2312,16 +2659,16 @@ static PyObject *__pyx_pf_5_proj_4Proj_10is_latlong(struct __pyx_obj_5_proj_Proj
  *             return False
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
     goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "_proj.pyx":298
+    /* "_proj.pyx":311
  *             return True
  *         else:
  *             return False             # <<<<<<<<<<<<<<
@@ -2329,10 +2676,10 @@ static PyObject *__pyx_pf_5_proj_4Proj_10is_latlong(struct __pyx_obj_5_proj_Proj
  *     def is_geocent(self):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
   }
   __pyx_L3:;
@@ -2340,7 +2687,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_10is_latlong(struct __pyx_obj_5_proj_Proj
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_AddTraceback("_proj.Proj.is_latlong", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -2350,17 +2697,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_10is_latlong(struct __pyx_obj_5_proj_Proj
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_5_proj_4Proj_13is_geocent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_5_proj_4Proj_13is_geocent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_5_proj_4Proj_15is_geocent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_5_proj_4Proj_15is_geocent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("is_geocent (wrapper)", 0);
-  __pyx_r = __pyx_pf_5_proj_4Proj_12is_geocent(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self));
+  __pyx_r = __pyx_pf_5_proj_4Proj_14is_geocent(((struct __pyx_obj_5_proj_Proj *)__pyx_v_self));
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "_proj.pyx":300
+/* "_proj.pyx":313
  *             return False
  * 
  *     def is_geocent(self):             # <<<<<<<<<<<<<<
@@ -2368,17 +2715,18 @@ static PyObject *__pyx_pw_5_proj_4Proj_13is_geocent(PyObject *__pyx_v_self, CYTH
  *         cdef int i
  */
 
-static PyObject *__pyx_pf_5_proj_4Proj_12is_geocent(struct __pyx_obj_5_proj_Proj *__pyx_v_self) {
+static PyObject *__pyx_pf_5_proj_4Proj_14is_geocent(struct __pyx_obj_5_proj_Proj *__pyx_v_self) {
   int __pyx_v_i;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
+  PyObject *__pyx_t_2 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("is_geocent", 0);
 
-  /* "_proj.pyx":303
+  /* "_proj.pyx":316
  *         # returns True if projection in geocentric (x/y) coordinates
  *         cdef int i
  *         i = pj_is_geocent(self.projpj)             # <<<<<<<<<<<<<<
@@ -2387,16 +2735,17 @@ static PyObject *__pyx_pf_5_proj_4Proj_12is_geocent(struct __pyx_obj_5_proj_Proj
  */
   __pyx_v_i = pj_is_geocent(__pyx_v_self->projpj);
 
-  /* "_proj.pyx":304
+  /* "_proj.pyx":317
  *         cdef int i
  *         i = pj_is_geocent(self.projpj)
  *         if i:             # <<<<<<<<<<<<<<
  *             return True
  *         else:
  */
-  if (__pyx_v_i) {
+  __pyx_t_1 = (__pyx_v_i != 0);
+  if (__pyx_t_1) {
 
-    /* "_proj.pyx":305
+    /* "_proj.pyx":318
  *         i = pj_is_geocent(self.projpj)
  *         if i:
  *             return True             # <<<<<<<<<<<<<<
@@ -2404,16 +2753,16 @@ static PyObject *__pyx_pf_5_proj_4Proj_12is_geocent(struct __pyx_obj_5_proj_Proj
  *             return False
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
     goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "_proj.pyx":307
+    /* "_proj.pyx":320
  *             return True
  *         else:
  *             return False             # <<<<<<<<<<<<<<
@@ -2421,10 +2770,10 @@ static PyObject *__pyx_pf_5_proj_4Proj_12is_geocent(struct __pyx_obj_5_proj_Proj
  * def _transform(Proj p1, Proj p2, inx, iny, inz, radians):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
     goto __pyx_L0;
   }
   __pyx_L3:;
@@ -2432,7 +2781,7 @@ static PyObject *__pyx_pf_5_proj_4Proj_12is_geocent(struct __pyx_obj_5_proj_Proj
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_AddTraceback("_proj.Proj.is_geocent", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
@@ -2452,7 +2801,7 @@ static PyObject *__pyx_pw_5_proj_4Proj_12proj_version_1__get__(PyObject *__pyx_v
   return __pyx_r;
 }
 
-/* "_proj.pyx":65
+/* "_proj.pyx":69
  *     cdef projPJ projpj
  *     cdef projCtx projctx
  *     cdef public object proj_version             # <<<<<<<<<<<<<<
@@ -2539,7 +2888,7 @@ static PyObject *__pyx_pw_5_proj_4Proj_3srs_1__get__(PyObject *__pyx_v_self) {
   return __pyx_r;
 }
 
-/* "_proj.pyx":67
+/* "_proj.pyx":71
  *     cdef public object proj_version
  *     cdef char *pjinitstring
  *     cdef public object srs             # <<<<<<<<<<<<<<
@@ -2616,15 +2965,18 @@ static int __pyx_pf_5_proj_4Proj_3srs_4__del__(struct __pyx_obj_5_proj_Proj *__p
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_5_proj_3_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyMethodDef __pyx_mdef_5_proj_3_transform = {__Pyx_NAMESTR("_transform"), (PyCFunction)__pyx_pw_5_proj_3_transform, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
-static PyObject *__pyx_pw_5_proj_3_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_5_proj_5_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5_proj_5_transform = {__Pyx_NAMESTR("_transform"), (PyCFunction)__pyx_pw_5_proj_5_transform, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
+static PyObject *__pyx_pw_5_proj_5_transform(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   struct __pyx_obj_5_proj_Proj *__pyx_v_p1 = 0;
   struct __pyx_obj_5_proj_Proj *__pyx_v_p2 = 0;
   PyObject *__pyx_v_inx = 0;
   PyObject *__pyx_v_iny = 0;
   PyObject *__pyx_v_inz = 0;
   PyObject *__pyx_v_radians = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_transform (wrapper)", 0);
@@ -2652,31 +3004,31 @@ static PyObject *__pyx_pw_5_proj_3_transform(PyObject *__pyx_self, PyObject *__p
         case  1:
         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__p2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__inx)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
         if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iny)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  4:
         if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__inz)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  5:
         if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__radians)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_transform") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_transform") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
       goto __pyx_L5_argtuple_error;
@@ -2697,15 +3049,15 @@ static PyObject *__pyx_pw_5_proj_3_transform(PyObject *__pyx_self, PyObject *__p
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_transform", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("_proj._transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p1), __pyx_ptype_5_proj_Proj, 1, "p1", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p2), __pyx_ptype_5_proj_Proj, 1, "p2", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_5_proj_2_transform(__pyx_self, __pyx_v_p1, __pyx_v_p2, __pyx_v_inx, __pyx_v_iny, __pyx_v_inz, __pyx_v_radians);
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p1), __pyx_ptype_5_proj_Proj, 1, "p1", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p2), __pyx_ptype_5_proj_Proj, 1, "p2", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_5_proj_4_transform(__pyx_self, __pyx_v_p1, __pyx_v_p2, __pyx_v_inx, __pyx_v_iny, __pyx_v_inz, __pyx_v_radians);
   goto __pyx_L0;
   __pyx_L1_error:;
   __pyx_r = NULL;
@@ -2714,7 +3066,7 @@ static PyObject *__pyx_pw_5_proj_3_transform(PyObject *__pyx_self, PyObject *__p
   return __pyx_r;
 }
 
-/* "_proj.pyx":309
+/* "_proj.pyx":322
  *             return False
  * 
  * def _transform(Proj p1, Proj p2, inx, iny, inz, radians):             # <<<<<<<<<<<<<<
@@ -2722,7 +3074,7 @@ static PyObject *__pyx_pw_5_proj_3_transform(PyObject *__pyx_self, PyObject *__p
  *     cdef void *xdata, *ydata, *zdata
  */
 
-static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_5_proj_Proj *__pyx_v_p1, struct __pyx_obj_5_proj_Proj *__pyx_v_p2, PyObject *__pyx_v_inx, PyObject *__pyx_v_iny, PyObject *__pyx_v_inz, PyObject *__pyx_v_radians) {
+static PyObject *__pyx_pf_5_proj_4_transform(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_5_proj_Proj *__pyx_v_p1, struct __pyx_obj_5_proj_Proj *__pyx_v_p2, PyObject *__pyx_v_inx, PyObject *__pyx_v_iny, PyObject *__pyx_v_inz, PyObject *__pyx_v_radians) {
   void *__pyx_v_xdata;
   void *__pyx_v_ydata;
   void *__pyx_v_zdata;
@@ -2748,17 +3100,17 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_transform", 0);
 
-  /* "_proj.pyx":315
+  /* "_proj.pyx":328
  *     cdef Py_ssize_t buflenx, bufleny, buflenz, npts, i
  *     cdef int err
  *     if PyObject_AsWriteBuffer(inx, &xdata, &buflenx) <> 0:             # <<<<<<<<<<<<<<
  *         raise RuntimeError
  *     if PyObject_AsWriteBuffer(iny, &ydata, &bufleny) <> 0:
  */
-  __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_inx, (&__pyx_v_xdata), (&__pyx_v_buflenx)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_inx, (&__pyx_v_xdata), (&__pyx_v_buflenx)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":316
+    /* "_proj.pyx":329
  *     cdef int err
  *     if PyObject_AsWriteBuffer(inx, &xdata, &buflenx) <> 0:
  *         raise RuntimeError             # <<<<<<<<<<<<<<
@@ -2766,22 +3118,22 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  *         raise RuntimeError
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "_proj.pyx":317
+  /* "_proj.pyx":330
  *     if PyObject_AsWriteBuffer(inx, &xdata, &buflenx) <> 0:
  *         raise RuntimeError
  *     if PyObject_AsWriteBuffer(iny, &ydata, &bufleny) <> 0:             # <<<<<<<<<<<<<<
  *         raise RuntimeError
  *     if inz is not None:
  */
-  __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_iny, (&__pyx_v_ydata), (&__pyx_v_bufleny)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_iny, (&__pyx_v_ydata), (&__pyx_v_bufleny)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":318
+    /* "_proj.pyx":331
  *         raise RuntimeError
  *     if PyObject_AsWriteBuffer(iny, &ydata, &bufleny) <> 0:
  *         raise RuntimeError             # <<<<<<<<<<<<<<
@@ -2789,12 +3141,12 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  *         if PyObject_AsWriteBuffer(inz, &zdata, &buflenz) <> 0:
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "_proj.pyx":319
+  /* "_proj.pyx":332
  *     if PyObject_AsWriteBuffer(iny, &ydata, &bufleny) <> 0:
  *         raise RuntimeError
  *     if inz is not None:             # <<<<<<<<<<<<<<
@@ -2802,19 +3154,20 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  *             raise RuntimeError
  */
   __pyx_t_1 = (__pyx_v_inz != Py_None);
-  if (__pyx_t_1) {
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-    /* "_proj.pyx":320
+    /* "_proj.pyx":333
  *         raise RuntimeError
  *     if inz is not None:
  *         if PyObject_AsWriteBuffer(inz, &zdata, &buflenz) <> 0:             # <<<<<<<<<<<<<<
  *             raise RuntimeError
  *     else:
  */
-    __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_inz, (&__pyx_v_zdata), (&__pyx_v_buflenz)) != 0);
-    if (__pyx_t_1) {
+    __pyx_t_2 = ((PyObject_AsWriteBuffer(__pyx_v_inz, (&__pyx_v_zdata), (&__pyx_v_buflenz)) != 0) != 0);
+    if (__pyx_t_2) {
 
-      /* "_proj.pyx":321
+      /* "_proj.pyx":334
  *     if inz is not None:
  *         if PyObject_AsWriteBuffer(inz, &zdata, &buflenz) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -2822,7 +3175,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  *         buflenz = bufleny
  */
       __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L6;
     }
     __pyx_L6:;
@@ -2830,7 +3183,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
   }
   /*else*/ {
 
-    /* "_proj.pyx":323
+    /* "_proj.pyx":336
  *             raise RuntimeError
  *     else:
  *         buflenz = bufleny             # <<<<<<<<<<<<<<
@@ -2841,37 +3194,37 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
   }
   __pyx_L5:;
 
-  /* "_proj.pyx":324
+  /* "_proj.pyx":337
  *     else:
  *         buflenz = bufleny
  *     if not (buflenx == bufleny == buflenz):             # <<<<<<<<<<<<<<
  *         raise RuntimeError('x,y and z must be same size')
  *     xx = <double *>xdata
  */
-  __pyx_t_1 = (__pyx_v_buflenx == __pyx_v_bufleny);
-  if (__pyx_t_1) {
-    __pyx_t_1 = (__pyx_v_bufleny == __pyx_v_buflenz);
-  }
-  __pyx_t_2 = (!__pyx_t_1);
+  __pyx_t_2 = (__pyx_v_buflenx == __pyx_v_bufleny);
   if (__pyx_t_2) {
+    __pyx_t_2 = (__pyx_v_bufleny == __pyx_v_buflenz);
+  }
+  __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
+  if (__pyx_t_1) {
 
-    /* "_proj.pyx":325
+    /* "_proj.pyx":338
  *         buflenz = bufleny
  *     if not (buflenx == bufleny == buflenz):
  *         raise RuntimeError('x,y and z must be same size')             # <<<<<<<<<<<<<<
  *     xx = <double *>xdata
  *     yy = <double *>ydata
  */
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L7;
   }
   __pyx_L7:;
 
-  /* "_proj.pyx":326
+  /* "_proj.pyx":339
  *     if not (buflenx == bufleny == buflenz):
  *         raise RuntimeError('x,y and z must be same size')
  *     xx = <double *>xdata             # <<<<<<<<<<<<<<
@@ -2880,7 +3233,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  */
   __pyx_v_xx = ((double *)__pyx_v_xdata);
 
-  /* "_proj.pyx":327
+  /* "_proj.pyx":340
  *         raise RuntimeError('x,y and z must be same size')
  *     xx = <double *>xdata
  *     yy = <double *>ydata             # <<<<<<<<<<<<<<
@@ -2889,17 +3242,18 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  */
   __pyx_v_yy = ((double *)__pyx_v_ydata);
 
-  /* "_proj.pyx":328
+  /* "_proj.pyx":341
  *     xx = <double *>xdata
  *     yy = <double *>ydata
  *     if inz is not None:             # <<<<<<<<<<<<<<
  *         zz = <double *>zdata
  *     npts = buflenx/8
  */
-  __pyx_t_2 = (__pyx_v_inz != Py_None);
+  __pyx_t_1 = (__pyx_v_inz != Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
   if (__pyx_t_2) {
 
-    /* "_proj.pyx":329
+    /* "_proj.pyx":342
  *     yy = <double *>ydata
  *     if inz is not None:
  *         zz = <double *>zdata             # <<<<<<<<<<<<<<
@@ -2911,7 +3265,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
   }
   __pyx_L8:;
 
-  /* "_proj.pyx":330
+  /* "_proj.pyx":343
  *     if inz is not None:
  *         zz = <double *>zdata
  *     npts = buflenx/8             # <<<<<<<<<<<<<<
@@ -2920,22 +3274,22 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  */
   __pyx_v_npts = __Pyx_div_Py_ssize_t(__pyx_v_buflenx, 8);
 
-  /* "_proj.pyx":331
+  /* "_proj.pyx":344
  *         zz = <double *>zdata
  *     npts = buflenx/8
  *     if not radians and p1.is_latlong():             # <<<<<<<<<<<<<<
  *         for i from 0 <= i < npts:
  *             xx[i] = xx[i]*_dg2rad
  */
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_t_1 = (!__pyx_t_2);
   if (__pyx_t_1) {
-    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_p1), __pyx_n_s__is_latlong); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_p1), __pyx_n_s__is_latlong); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __pyx_t_5 = __pyx_t_2;
   } else {
@@ -2943,7 +3297,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
   }
   if (__pyx_t_5) {
 
-    /* "_proj.pyx":332
+    /* "_proj.pyx":345
  *     npts = buflenx/8
  *     if not radians and p1.is_latlong():
  *         for i from 0 <= i < npts:             # <<<<<<<<<<<<<<
@@ -2953,7 +3307,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
     __pyx_t_6 = __pyx_v_npts;
     for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
 
-      /* "_proj.pyx":333
+      /* "_proj.pyx":346
  *     if not radians and p1.is_latlong():
  *         for i from 0 <= i < npts:
  *             xx[i] = xx[i]*_dg2rad             # <<<<<<<<<<<<<<
@@ -2962,7 +3316,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  */
       (__pyx_v_xx[__pyx_v_i]) = ((__pyx_v_xx[__pyx_v_i]) * __pyx_v_5_proj__dg2rad);
 
-      /* "_proj.pyx":334
+      /* "_proj.pyx":347
  *         for i from 0 <= i < npts:
  *             xx[i] = xx[i]*_dg2rad
  *             yy[i] = yy[i]*_dg2rad             # <<<<<<<<<<<<<<
@@ -2975,7 +3329,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
   }
   __pyx_L9:;
 
-  /* "_proj.pyx":335
+  /* "_proj.pyx":348
  *             xx[i] = xx[i]*_dg2rad
  *             yy[i] = yy[i]*_dg2rad
  *     if inz is not None:             # <<<<<<<<<<<<<<
@@ -2983,9 +3337,10 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  *     else:
  */
   __pyx_t_5 = (__pyx_v_inz != Py_None);
-  if (__pyx_t_5) {
+  __pyx_t_1 = (__pyx_t_5 != 0);
+  if (__pyx_t_1) {
 
-    /* "_proj.pyx":336
+    /* "_proj.pyx":349
  *             yy[i] = yy[i]*_dg2rad
  *     if inz is not None:
  *         err = pj_transform(p1.projpj, p2.projpj, npts, 0, xx, yy, zz)             # <<<<<<<<<<<<<<
@@ -2997,7 +3352,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
   }
   /*else*/ {
 
-    /* "_proj.pyx":338
+    /* "_proj.pyx":351
  *         err = pj_transform(p1.projpj, p2.projpj, npts, 0, xx, yy, zz)
  *     else:
  *         err = pj_transform(p1.projpj, p2.projpj, npts, 0, xx, yy, NULL)             # <<<<<<<<<<<<<<
@@ -3008,64 +3363,64 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
   }
   __pyx_L12:;
 
-  /* "_proj.pyx":339
+  /* "_proj.pyx":352
  *     else:
  *         err = pj_transform(p1.projpj, p2.projpj, npts, 0, xx, yy, NULL)
  *     if err != 0:             # <<<<<<<<<<<<<<
  *         raise RuntimeError(pj_strerrno(err))
  *     if not radians and p2.is_latlong():
  */
-  __pyx_t_5 = (__pyx_v_err != 0);
-  if (__pyx_t_5) {
+  __pyx_t_1 = ((__pyx_v_err != 0) != 0);
+  if (__pyx_t_1) {
 
-    /* "_proj.pyx":340
+    /* "_proj.pyx":353
  *         err = pj_transform(p1.projpj, p2.projpj, npts, 0, xx, yy, NULL)
  *     if err != 0:
  *         raise RuntimeError(pj_strerrno(err))             # <<<<<<<<<<<<<<
  *     if not radians and p2.is_latlong():
  *         for i from 0 <= i < npts:
  */
-    __pyx_t_4 = PyBytes_FromString(pj_strerrno(__pyx_v_err)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyBytes_FromString(pj_strerrno(__pyx_v_err)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
     __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
     __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
     __Pyx_Raise(__pyx_t_4, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L13;
   }
   __pyx_L13:;
 
-  /* "_proj.pyx":341
+  /* "_proj.pyx":354
  *     if err != 0:
  *         raise RuntimeError(pj_strerrno(err))
  *     if not radians and p2.is_latlong():             # <<<<<<<<<<<<<<
  *         for i from 0 <= i < npts:
  *             xx[i] = xx[i]*_rad2dg
  */
-  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = (!__pyx_t_5);
-  if (__pyx_t_1) {
-    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_p2), __pyx_n_s__is_latlong); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = (!__pyx_t_1);
+  if (__pyx_t_5) {
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_p2), __pyx_n_s__is_latlong); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_2 = __pyx_t_5;
-  } else {
     __pyx_t_2 = __pyx_t_1;
+  } else {
+    __pyx_t_2 = __pyx_t_5;
   }
   if (__pyx_t_2) {
 
-    /* "_proj.pyx":342
+    /* "_proj.pyx":355
  *         raise RuntimeError(pj_strerrno(err))
  *     if not radians and p2.is_latlong():
  *         for i from 0 <= i < npts:             # <<<<<<<<<<<<<<
@@ -3075,7 +3430,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
     __pyx_t_6 = __pyx_v_npts;
     for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
 
-      /* "_proj.pyx":343
+      /* "_proj.pyx":356
  *     if not radians and p2.is_latlong():
  *         for i from 0 <= i < npts:
  *             xx[i] = xx[i]*_rad2dg             # <<<<<<<<<<<<<<
@@ -3084,7 +3439,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
  */
       (__pyx_v_xx[__pyx_v_i]) = ((__pyx_v_xx[__pyx_v_i]) * __pyx_v_5_proj__rad2dg);
 
-      /* "_proj.pyx":344
+      /* "_proj.pyx":357
  *         for i from 0 <= i < npts:
  *             xx[i] = xx[i]*_rad2dg
  *             yy[i] = yy[i]*_rad2dg             # <<<<<<<<<<<<<<
@@ -3110,7 +3465,7 @@ static PyObject *__pyx_pf_5_proj_2_transform(CYTHON_UNUSED PyObject *__pyx_self,
   return __pyx_r;
 }
 
-/* "_proj.pyx":346
+/* "_proj.pyx":359
  *             yy[i] = yy[i]*_rad2dg
  * 
  * cdef _strencode(pystr,encoding='ascii'):             # <<<<<<<<<<<<<<
@@ -3139,7 +3494,7 @@ static PyObject *__pyx_f_5_proj__strencode(PyObject *__pyx_v_pystr, struct __pyx
     }
   }
 
-  /* "_proj.pyx":348
+  /* "_proj.pyx":361
  * cdef _strencode(pystr,encoding='ascii'):
  *     # encode a string into bytes.  If already bytes, do nothing.
  *     try:             # <<<<<<<<<<<<<<
@@ -3153,7 +3508,7 @@ static PyObject *__pyx_f_5_proj__strencode(PyObject *__pyx_v_pystr, struct __pyx
     __Pyx_XGOTREF(__pyx_t_3);
     /*try:*/ {
 
-      /* "_proj.pyx":349
+      /* "_proj.pyx":362
  *     # encode a string into bytes.  If already bytes, do nothing.
  *     try:
  *         return pystr.encode(encoding)             # <<<<<<<<<<<<<<
@@ -3161,14 +3516,14 @@ static PyObject *__pyx_f_5_proj__strencode(PyObject *__pyx_v_pystr, struct __pyx
  *         return pystr # already bytes?
  */
       __Pyx_XDECREF(__pyx_r);
-      __pyx_t_4 = PyObject_GetAttr(__pyx_v_pystr, __pyx_n_s__encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pystr, __pyx_n_s__encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_5);
       __Pyx_INCREF(__pyx_v_encoding);
       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_encoding);
       __Pyx_GIVEREF(__pyx_v_encoding);
-      __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       __Pyx_GOTREF(__pyx_t_6);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
@@ -3191,7 +3546,7 @@ static PyObject *__pyx_f_5_proj__strencode(PyObject *__pyx_v_pystr, struct __pyx
     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-    /* "_proj.pyx":350
+    /* "_proj.pyx":363
  *     try:
  *         return pystr.encode(encoding)
  *     except AttributeError:             # <<<<<<<<<<<<<<
@@ -3201,12 +3556,12 @@ static PyObject *__pyx_f_5_proj__strencode(PyObject *__pyx_v_pystr, struct __pyx
     __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
     if (__pyx_t_7) {
       __Pyx_AddTraceback("_proj._strencode", __pyx_clineno, __pyx_lineno, __pyx_filename);
-      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
       __Pyx_GOTREF(__pyx_t_6);
       __Pyx_GOTREF(__pyx_t_5);
       __Pyx_GOTREF(__pyx_t_4);
 
-      /* "_proj.pyx":351
+      /* "_proj.pyx":364
  *         return pystr.encode(encoding)
  *     except AttributeError:
  *         return pystr # already bytes?             # <<<<<<<<<<<<<<
@@ -3264,6 +3619,9 @@ static int __pyx_pw_5_proj_4Geod_1__cinit__(PyObject *__pyx_v_self, PyObject *__
 static int __pyx_pw_5_proj_4Geod_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_a = 0;
   PyObject *__pyx_v_f = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
@@ -3287,11 +3645,11 @@ static int __pyx_pw_5_proj_4Geod_1__cinit__(PyObject *__pyx_v_self, PyObject *__
         case  1:
         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -3304,7 +3662,7 @@ static int __pyx_pw_5_proj_4Geod_1__cinit__(PyObject *__pyx_v_self, PyObject *__
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("_proj.Geod.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
@@ -3315,12 +3673,12 @@ static int __pyx_pw_5_proj_4Geod_1__cinit__(PyObject *__pyx_v_self, PyObject *__
   return __pyx_r;
 }
 
-/* "_proj.pyx":357
+/* "_proj.pyx":370
  *     cdef public object initstring
  * 
  *     def __cinit__(self, a, f):             # <<<<<<<<<<<<<<
  *         self.initstring = '+a=%s +f=%s' % (a, f)
- *         GeodesicInit(&self._Geodesic, <double> a, <double> f)
+ *         geod_init(&self._geod_geodesic, <double> a, <double> f)
  */
 
 static int __pyx_pf_5_proj_4Geod___cinit__(struct __pyx_obj_5_proj_Geod *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_f) {
@@ -3335,14 +3693,14 @@ static int __pyx_pf_5_proj_4Geod___cinit__(struct __pyx_obj_5_proj_Geod *__pyx_v
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__cinit__", 0);
 
-  /* "_proj.pyx":358
+  /* "_proj.pyx":371
  * 
  *     def __cinit__(self, a, f):
  *         self.initstring = '+a=%s +f=%s' % (a, f)             # <<<<<<<<<<<<<<
- *         GeodesicInit(&self._Geodesic, <double> a, <double> f)
+ *         geod_init(&self._geod_geodesic, <double> a, <double> f)
  * 
  */
-  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_INCREF(__pyx_v_a);
   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_a);
@@ -3350,7 +3708,7 @@ static int __pyx_pf_5_proj_4Geod___cinit__(struct __pyx_obj_5_proj_Geod *__pyx_v
   __Pyx_INCREF(__pyx_v_f);
   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_f);
   __Pyx_GIVEREF(__pyx_v_f);
-  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
@@ -3359,16 +3717,16 @@ static int __pyx_pf_5_proj_4Geod___cinit__(struct __pyx_obj_5_proj_Geod *__pyx_v
   __pyx_v_self->initstring = ((PyObject *)__pyx_t_2);
   __pyx_t_2 = 0;
 
-  /* "_proj.pyx":359
+  /* "_proj.pyx":372
  *     def __cinit__(self, a, f):
  *         self.initstring = '+a=%s +f=%s' % (a, f)
- *         GeodesicInit(&self._Geodesic, <double> a, <double> f)             # <<<<<<<<<<<<<<
+ *         geod_init(&self._geod_geodesic, <double> a, <double> f)             # <<<<<<<<<<<<<<
  * 
  *     def __reduce__(self):
  */
-  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_a); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_f); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  GeodesicInit((&__pyx_v_self->_Geodesic), ((double)__pyx_t_3), ((double)__pyx_t_4));
+  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_a); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_f); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  geod_init((&__pyx_v_self->_geod_geodesic), ((double)__pyx_t_3), ((double)__pyx_t_4));
 
   __pyx_r = 0;
   goto __pyx_L0;
@@ -3394,8 +3752,8 @@ static PyObject *__pyx_pw_5_proj_4Geod_3__reduce__(PyObject *__pyx_v_self, CYTHO
   return __pyx_r;
 }
 
-/* "_proj.pyx":361
- *         GeodesicInit(&self._Geodesic, <double> a, <double> f)
+/* "_proj.pyx":374
+ *         geod_init(&self._geod_geodesic, <double> a, <double> f)
  * 
  *     def __reduce__(self):             # <<<<<<<<<<<<<<
  *         """special method that allows pyproj.Geod instance to be pickled"""
@@ -3413,7 +3771,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_2__reduce__(struct __pyx_obj_5_proj_Geod
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("__reduce__", 0);
 
-  /* "_proj.pyx":363
+  /* "_proj.pyx":376
  *     def __reduce__(self):
  *         """special method that allows pyproj.Geod instance to be pickled"""
  *         return (self.__class__,(self.initstring,))             # <<<<<<<<<<<<<<
@@ -3421,14 +3779,14 @@ static PyObject *__pyx_pf_5_proj_4Geod_2__reduce__(struct __pyx_obj_5_proj_Geod
  *     def _fwd(self, object lons, object lats, object az, object dist, radians=False):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_v_self->initstring);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->initstring);
   __Pyx_GIVEREF(__pyx_v_self->initstring);
-  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
@@ -3463,6 +3821,9 @@ static PyObject *__pyx_pw_5_proj_4Geod_5_fwd(PyObject *__pyx_v_self, PyObject *_
   PyObject *__pyx_v_az = 0;
   PyObject *__pyx_v_dist = 0;
   PyObject *__pyx_v_radians = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_fwd (wrapper)", 0);
@@ -3490,17 +3851,17 @@ static PyObject *__pyx_pw_5_proj_4Geod_5_fwd(PyObject *__pyx_v_self, PyObject *_
         case  1:
         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lats)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__az)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
         if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dist)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  4:
         if (kw_args > 0) {
@@ -3509,7 +3870,7 @@ static PyObject *__pyx_pw_5_proj_4Geod_5_fwd(PyObject *__pyx_v_self, PyObject *_
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_fwd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_fwd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -3530,7 +3891,7 @@ static PyObject *__pyx_pw_5_proj_4Geod_5_fwd(PyObject *__pyx_v_self, PyObject *_
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("_proj.Geod._fwd", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
@@ -3541,7 +3902,7 @@ static PyObject *__pyx_pw_5_proj_4Geod_5_fwd(PyObject *__pyx_v_self, PyObject *_
   return __pyx_r;
 }
 
-/* "_proj.pyx":365
+/* "_proj.pyx":378
  *         return (self.__class__,(self.initstring,))
  * 
  *     def _fwd(self, object lons, object lats, object az, object dist, radians=False):             # <<<<<<<<<<<<<<
@@ -3584,17 +3945,17 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_fwd", 0);
 
-  /* "_proj.pyx":377
+  /* "_proj.pyx":390
  *         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_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":378
+    /* "_proj.pyx":391
  *         # if buffer api is supported, get pointer to data buffers.
  *         if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -3602,22 +3963,22 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  *             raise RuntimeError
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "_proj.pyx":379
+  /* "_proj.pyx":392
  *         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_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":380
+    /* "_proj.pyx":393
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -3625,22 +3986,22 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  *             raise RuntimeError
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "_proj.pyx":381
+  /* "_proj.pyx":394
  *         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_t_1 = (PyObject_AsWriteBuffer(__pyx_v_az, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_az, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":382
+    /* "_proj.pyx":395
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -3648,22 +4009,22 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  *             raise RuntimeError
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "_proj.pyx":383
+  /* "_proj.pyx":396
  *         if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0:
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0:             # <<<<<<<<<<<<<<
  *             raise RuntimeError
  *         # process data in buffer
  */
-  __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_dist, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_dist, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":384
+    /* "_proj.pyx":397
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -3671,12 +4032,12 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  *         if not buflenlons == buflenlats == buflenaz == buflend:
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "_proj.pyx":386
+  /* "_proj.pyx":399
  *             raise RuntimeError
  *         # process data in buffer
  *         if not buflenlons == buflenlats == buflenaz == buflend:             # <<<<<<<<<<<<<<
@@ -3690,45 +4051,45 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
       __pyx_t_1 = (__pyx_v_buflenaz == __pyx_v_buflend);
     }
   }
-  __pyx_t_2 = (!__pyx_t_1);
+  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
   if (__pyx_t_2) {
 
-    /* "_proj.pyx":387
+    /* "_proj.pyx":400
  *         # process data in buffer
  *         if not buflenlons == buflenlats == buflenaz == buflend:
  *             raise RuntimeError("Buffer lengths not the same")             # <<<<<<<<<<<<<<
  *         ndim = buflenlons//_doublesize
  *         lonsdata = <double *>londata
  */
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L7;
   }
   __pyx_L7:;
 
-  /* "_proj.pyx":388
+  /* "_proj.pyx":401
  *         if not buflenlons == buflenlats == buflenaz == buflend:
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenlons//_doublesize             # <<<<<<<<<<<<<<
  *         lonsdata = <double *>londata
  *         latsdata = <double *>latdata
  */
-  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___doublesize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___doublesize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyNumber_FloorDivide(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyNumber_FloorDivide(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   __pyx_v_ndim = __pyx_t_6;
 
-  /* "_proj.pyx":389
+  /* "_proj.pyx":402
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenlons//_doublesize
  *         lonsdata = <double *>londata             # <<<<<<<<<<<<<<
@@ -3737,7 +4098,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
   __pyx_v_lonsdata = ((double *)__pyx_v_londata);
 
-  /* "_proj.pyx":390
+  /* "_proj.pyx":403
  *         ndim = buflenlons//_doublesize
  *         lonsdata = <double *>londata
  *         latsdata = <double *>latdata             # <<<<<<<<<<<<<<
@@ -3746,7 +4107,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
   __pyx_v_latsdata = ((double *)__pyx_v_latdata);
 
-  /* "_proj.pyx":391
+  /* "_proj.pyx":404
  *         lonsdata = <double *>londata
  *         latsdata = <double *>latdata
  *         azdata = <double *>azdat             # <<<<<<<<<<<<<<
@@ -3755,7 +4116,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
   __pyx_v_azdata = ((double *)__pyx_v_azdat);
 
-  /* "_proj.pyx":392
+  /* "_proj.pyx":405
  *         latsdata = <double *>latdata
  *         azdata = <double *>azdat
  *         distdata = <double *>distdat             # <<<<<<<<<<<<<<
@@ -3764,7 +4125,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
   __pyx_v_distdata = ((double *)__pyx_v_distdat);
 
-  /* "_proj.pyx":393
+  /* "_proj.pyx":406
  *         azdata = <double *>azdat
  *         distdata = <double *>distdat
  *         for i from 0 <= i < ndim:             # <<<<<<<<<<<<<<
@@ -3774,18 +4135,18 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
   __pyx_t_6 = __pyx_v_ndim;
   for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
 
-    /* "_proj.pyx":394
+    /* "_proj.pyx":407
  *         distdata = <double *>distdat
  *         for i from 0 <= i < ndim:
  *             if not radians:             # <<<<<<<<<<<<<<
  *                 lon1 = lonsdata[i]
  *                 lat1 = latsdata[i]
  */
-    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = (!__pyx_t_2);
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = ((!__pyx_t_2) != 0);
     if (__pyx_t_1) {
 
-      /* "_proj.pyx":395
+      /* "_proj.pyx":408
  *         for i from 0 <= i < ndim:
  *             if not radians:
  *                 lon1 = lonsdata[i]             # <<<<<<<<<<<<<<
@@ -3794,7 +4155,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_lon1 = (__pyx_v_lonsdata[__pyx_v_i]);
 
-      /* "_proj.pyx":396
+      /* "_proj.pyx":409
  *             if not radians:
  *                 lon1 = lonsdata[i]
  *                 lat1 = latsdata[i]             # <<<<<<<<<<<<<<
@@ -3803,7 +4164,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_lat1 = (__pyx_v_latsdata[__pyx_v_i]);
 
-      /* "_proj.pyx":397
+      /* "_proj.pyx":410
  *                 lon1 = lonsdata[i]
  *                 lat1 = latsdata[i]
  *                 az1 = azdata[i]             # <<<<<<<<<<<<<<
@@ -3812,7 +4173,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_az1 = (__pyx_v_azdata[__pyx_v_i]);
 
-      /* "_proj.pyx":398
+      /* "_proj.pyx":411
  *                 lat1 = latsdata[i]
  *                 az1 = azdata[i]
  *                 s12 = distdata[i]             # <<<<<<<<<<<<<<
@@ -3824,7 +4185,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
     }
     /*else*/ {
 
-      /* "_proj.pyx":400
+      /* "_proj.pyx":413
  *                 s12 = distdata[i]
  *             else:
  *                 lon1 = _dg2rad*lonsdata[i]             # <<<<<<<<<<<<<<
@@ -3833,7 +4194,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_lon1 = (__pyx_v_5_proj__dg2rad * (__pyx_v_lonsdata[__pyx_v_i]));
 
-      /* "_proj.pyx":401
+      /* "_proj.pyx":414
  *             else:
  *                 lon1 = _dg2rad*lonsdata[i]
  *                 lat1 = _dg2rad*latsdata[i]             # <<<<<<<<<<<<<<
@@ -3842,69 +4203,69 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_lat1 = (__pyx_v_5_proj__dg2rad * (__pyx_v_latsdata[__pyx_v_i]));
 
-      /* "_proj.pyx":402
+      /* "_proj.pyx":415
  *                 lon1 = _dg2rad*lonsdata[i]
  *                 lat1 = _dg2rad*latsdata[i]
  *                 az1 = _dg2rad*azdata[i]             # <<<<<<<<<<<<<<
  *                 s12 = distdata[i]
- *             Direct(&self._Geodesic, lat1, lon1, az1, s12,\
+ *             geod_direct(&self._geod_geodesic, lat1, lon1, az1, s12,\
  */
       __pyx_v_az1 = (__pyx_v_5_proj__dg2rad * (__pyx_v_azdata[__pyx_v_i]));
 
-      /* "_proj.pyx":403
+      /* "_proj.pyx":416
  *                 lat1 = _dg2rad*latsdata[i]
  *                 az1 = _dg2rad*azdata[i]
  *                 s12 = distdata[i]             # <<<<<<<<<<<<<<
- *             Direct(&self._Geodesic, lat1, lon1, az1, s12,\
+ *             geod_direct(&self._geod_geodesic, lat1, lon1, az1, s12,\
  *                    &plat2, &plon2, &pazi2)
  */
       __pyx_v_s12 = (__pyx_v_distdata[__pyx_v_i]);
     }
     __pyx_L10:;
 
-    /* "_proj.pyx":405
+    /* "_proj.pyx":418
  *                 s12 = distdata[i]
- *             Direct(&self._Geodesic, lat1, lon1, az1, s12,\
+ *             geod_direct(&self._geod_geodesic, lat1, lon1, az1, s12,\
  *                    &plat2, &plon2, &pazi2)             # <<<<<<<<<<<<<<
  *             # back azimuth needs to be flipped 180 degrees
  *             # to match what proj4 geod utility produces.
  */
-    Direct((&__pyx_v_self->_Geodesic), __pyx_v_lat1, __pyx_v_lon1, __pyx_v_az1, __pyx_v_s12, (&__pyx_v_plat2), (&__pyx_v_plon2), (&__pyx_v_pazi2));
+    geod_direct((&__pyx_v_self->_geod_geodesic), __pyx_v_lat1, __pyx_v_lon1, __pyx_v_az1, __pyx_v_s12, (&__pyx_v_plat2), (&__pyx_v_plon2), (&__pyx_v_pazi2));
 
-    /* "_proj.pyx":408
+    /* "_proj.pyx":421
  *             # back azimuth needs to be flipped 180 degrees
  *             # to match what proj4 geod utility produces.
  *             if pazi2 > 0:             # <<<<<<<<<<<<<<
  *                 pazi2 = pazi2-180.
- *             elif pazi2 < 0:
+ *             elif pazi2 <= 0:
  */
-    __pyx_t_1 = (__pyx_v_pazi2 > 0.0);
+    __pyx_t_1 = ((__pyx_v_pazi2 > 0.0) != 0);
     if (__pyx_t_1) {
 
-      /* "_proj.pyx":409
+      /* "_proj.pyx":422
  *             # to match what proj4 geod utility produces.
  *             if pazi2 > 0:
  *                 pazi2 = pazi2-180.             # <<<<<<<<<<<<<<
- *             elif pazi2 < 0:
+ *             elif pazi2 <= 0:
  *                 pazi2 = pazi2+180.
  */
       __pyx_v_pazi2 = (__pyx_v_pazi2 - 180.);
       goto __pyx_L11;
     }
 
-    /* "_proj.pyx":410
+    /* "_proj.pyx":423
  *             if pazi2 > 0:
  *                 pazi2 = pazi2-180.
- *             elif pazi2 < 0:             # <<<<<<<<<<<<<<
+ *             elif pazi2 <= 0:             # <<<<<<<<<<<<<<
  *                 pazi2 = pazi2+180.
  *             # check for NaN.
  */
-    __pyx_t_1 = (__pyx_v_pazi2 < 0.0);
+    __pyx_t_1 = ((__pyx_v_pazi2 <= 0.0) != 0);
     if (__pyx_t_1) {
 
-      /* "_proj.pyx":411
+      /* "_proj.pyx":424
  *                 pazi2 = pazi2-180.
- *             elif pazi2 < 0:
+ *             elif pazi2 <= 0:
  *                 pazi2 = pazi2+180.             # <<<<<<<<<<<<<<
  *             # check for NaN.
  *             if pazi2 != pazi2:
@@ -3914,44 +4275,44 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
     }
     __pyx_L11:;
 
-    /* "_proj.pyx":413
+    /* "_proj.pyx":426
  *                 pazi2 = pazi2+180.
  *             # check for NaN.
  *             if pazi2 != pazi2:             # <<<<<<<<<<<<<<
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
  *             if not radians:
  */
-    __pyx_t_1 = (__pyx_v_pazi2 != __pyx_v_pazi2);
+    __pyx_t_1 = ((__pyx_v_pazi2 != __pyx_v_pazi2) != 0);
     if (__pyx_t_1) {
 
-      /* "_proj.pyx":414
+      /* "_proj.pyx":427
  *             # check for NaN.
  *             if pazi2 != pazi2:
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')             # <<<<<<<<<<<<<<
  *             if not radians:
  *                 lonsdata[i] = plon2
  */
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
       __Pyx_Raise(__pyx_t_5, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L12;
     }
     __pyx_L12:;
 
-    /* "_proj.pyx":415
+    /* "_proj.pyx":428
  *             if pazi2 != pazi2:
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
  *             if not radians:             # <<<<<<<<<<<<<<
  *                 lonsdata[i] = plon2
  *                 latsdata[i] = plat2
  */
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_2 = (!__pyx_t_1);
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = ((!__pyx_t_1) != 0);
     if (__pyx_t_2) {
 
-      /* "_proj.pyx":416
+      /* "_proj.pyx":429
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
  *             if not radians:
  *                 lonsdata[i] = plon2             # <<<<<<<<<<<<<<
@@ -3960,7 +4321,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
       (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_v_plon2;
 
-      /* "_proj.pyx":417
+      /* "_proj.pyx":430
  *             if not radians:
  *                 lonsdata[i] = plon2
  *                 latsdata[i] = plat2             # <<<<<<<<<<<<<<
@@ -3969,7 +4330,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
       (__pyx_v_latsdata[__pyx_v_i]) = __pyx_v_plat2;
 
-      /* "_proj.pyx":418
+      /* "_proj.pyx":431
  *                 lonsdata[i] = plon2
  *                 latsdata[i] = plat2
  *                 azdata[i] = pazi2             # <<<<<<<<<<<<<<
@@ -3981,7 +4342,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
     }
     /*else*/ {
 
-      /* "_proj.pyx":420
+      /* "_proj.pyx":433
  *                 azdata[i] = pazi2
  *             else:
  *                 lonsdata[i] = _rad2dg*plon2             # <<<<<<<<<<<<<<
@@ -3990,7 +4351,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
       (__pyx_v_lonsdata[__pyx_v_i]) = (__pyx_v_5_proj__rad2dg * __pyx_v_plon2);
 
-      /* "_proj.pyx":421
+      /* "_proj.pyx":434
  *             else:
  *                 lonsdata[i] = _rad2dg*plon2
  *                 latsdata[i] = _rad2dg*plat2             # <<<<<<<<<<<<<<
@@ -3999,7 +4360,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_4_fwd(struct __pyx_obj_5_proj_Geod *__pyx
  */
       (__pyx_v_latsdata[__pyx_v_i]) = (__pyx_v_5_proj__rad2dg * __pyx_v_plat2);
 
-      /* "_proj.pyx":422
+      /* "_proj.pyx":435
  *                 lonsdata[i] = _rad2dg*plon2
  *                 latsdata[i] = _rad2dg*plat2
  *                 azdata[i] = _rad2dg*pazi2             # <<<<<<<<<<<<<<
@@ -4034,6 +4395,9 @@ static PyObject *__pyx_pw_5_proj_4Geod_7_inv(PyObject *__pyx_v_self, PyObject *_
   PyObject *__pyx_v_lons2 = 0;
   PyObject *__pyx_v_lats2 = 0;
   PyObject *__pyx_v_radians = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_inv (wrapper)", 0);
@@ -4061,17 +4425,17 @@ static PyObject *__pyx_pw_5_proj_4Geod_7_inv(PyObject *__pyx_v_self, PyObject *_
         case  1:
         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lats1)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lons2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
         if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lats2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  4:
         if (kw_args > 0) {
@@ -4080,7 +4444,7 @@ static PyObject *__pyx_pw_5_proj_4Geod_7_inv(PyObject *__pyx_v_self, PyObject *_
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_inv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_inv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -4101,7 +4465,7 @@ static PyObject *__pyx_pw_5_proj_4Geod_7_inv(PyObject *__pyx_v_self, PyObject *_
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("_proj.Geod._inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
@@ -4112,7 +4476,7 @@ static PyObject *__pyx_pw_5_proj_4Geod_7_inv(PyObject *__pyx_v_self, PyObject *_
   return __pyx_r;
 }
 
-/* "_proj.pyx":424
+/* "_proj.pyx":437
  *                 azdata[i] = _rad2dg*pazi2
  * 
  *     def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False):             # <<<<<<<<<<<<<<
@@ -4156,17 +4520,17 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_inv", 0);
 
-  /* "_proj.pyx":435
+  /* "_proj.pyx":448
  *         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_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_lons1, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":436
+    /* "_proj.pyx":449
  *         # if buffer api is supported, get pointer to data buffers.
  *         if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -4174,22 +4538,22 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  *             raise RuntimeError
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "_proj.pyx":437
+  /* "_proj.pyx":450
  *         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_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_lats1, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":438
+    /* "_proj.pyx":451
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -4197,22 +4561,22 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  *             raise RuntimeError
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "_proj.pyx":439
+  /* "_proj.pyx":452
  *         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_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_lons2, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":440
+    /* "_proj.pyx":453
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -4220,22 +4584,22 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  *             raise RuntimeError
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "_proj.pyx":441
+  /* "_proj.pyx":454
  *         if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0:
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0:             # <<<<<<<<<<<<<<
  *             raise RuntimeError
  *         # process data in buffer
  */
-  __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0);
+  __pyx_t_1 = ((PyObject_AsWriteBuffer(__pyx_v_lats2, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0) != 0);
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":442
+    /* "_proj.pyx":455
  *             raise RuntimeError
  *         if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0:
  *             raise RuntimeError             # <<<<<<<<<<<<<<
@@ -4243,12 +4607,12 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  *         if not buflenlons == buflenlats == buflenaz == buflend:
  */
     __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "_proj.pyx":444
+  /* "_proj.pyx":457
  *             raise RuntimeError
  *         # process data in buffer
  *         if not buflenlons == buflenlats == buflenaz == buflend:             # <<<<<<<<<<<<<<
@@ -4262,45 +4626,45 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
       __pyx_t_1 = (__pyx_v_buflenaz == __pyx_v_buflend);
     }
   }
-  __pyx_t_2 = (!__pyx_t_1);
+  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
   if (__pyx_t_2) {
 
-    /* "_proj.pyx":445
+    /* "_proj.pyx":458
  *         # process data in buffer
  *         if not buflenlons == buflenlats == buflenaz == buflend:
  *             raise RuntimeError("Buffer lengths not the same")             # <<<<<<<<<<<<<<
  *         ndim = buflenlons//_doublesize
  *         lonsdata = <double *>londata
  */
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L7;
   }
   __pyx_L7:;
 
-  /* "_proj.pyx":446
+  /* "_proj.pyx":459
  *         if not buflenlons == buflenlats == buflenaz == buflend:
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenlons//_doublesize             # <<<<<<<<<<<<<<
  *         lonsdata = <double *>londata
  *         latsdata = <double *>latdata
  */
-  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___doublesize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___doublesize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = PyNumber_FloorDivide(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyNumber_FloorDivide(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   __pyx_v_ndim = __pyx_t_6;
 
-  /* "_proj.pyx":447
+  /* "_proj.pyx":460
  *             raise RuntimeError("Buffer lengths not the same")
  *         ndim = buflenlons//_doublesize
  *         lonsdata = <double *>londata             # <<<<<<<<<<<<<<
@@ -4309,7 +4673,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
   __pyx_v_lonsdata = ((double *)__pyx_v_londata);
 
-  /* "_proj.pyx":448
+  /* "_proj.pyx":461
  *         ndim = buflenlons//_doublesize
  *         lonsdata = <double *>londata
  *         latsdata = <double *>latdata             # <<<<<<<<<<<<<<
@@ -4318,7 +4682,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
   __pyx_v_latsdata = ((double *)__pyx_v_latdata);
 
-  /* "_proj.pyx":449
+  /* "_proj.pyx":462
  *         lonsdata = <double *>londata
  *         latsdata = <double *>latdata
  *         azdata = <double *>azdat             # <<<<<<<<<<<<<<
@@ -4327,7 +4691,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
   __pyx_v_azdata = ((double *)__pyx_v_azdat);
 
-  /* "_proj.pyx":450
+  /* "_proj.pyx":463
  *         latsdata = <double *>latdata
  *         azdata = <double *>azdat
  *         distdata = <double *>distdat             # <<<<<<<<<<<<<<
@@ -4336,7 +4700,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
   __pyx_v_distdata = ((double *)__pyx_v_distdat);
 
-  /* "_proj.pyx":451
+  /* "_proj.pyx":464
  *         azdata = <double *>azdat
  *         distdata = <double *>distdat
  *         errmsg = 'undefined inverse geodesic (may be an antipodal point)'             # <<<<<<<<<<<<<<
@@ -4346,7 +4710,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
   __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
   __pyx_v_errmsg = ((PyObject *)__pyx_kp_s_20);
 
-  /* "_proj.pyx":452
+  /* "_proj.pyx":465
  *         distdata = <double *>distdat
  *         errmsg = 'undefined inverse geodesic (may be an antipodal point)'
  *         for i from 0 <= i < ndim:             # <<<<<<<<<<<<<<
@@ -4356,17 +4720,17 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
   __pyx_t_6 = __pyx_v_ndim;
   for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
 
-    /* "_proj.pyx":453
+    /* "_proj.pyx":466
  *         errmsg = 'undefined inverse geodesic (may be an antipodal point)'
  *         for i from 0 <= i < ndim:
  *             if radians:             # <<<<<<<<<<<<<<
  *                 lon1 = _rad2dg*lonsdata[i]
  *                 lat1 = _rad2dg*latsdata[i]
  */
-    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_2) {
 
-      /* "_proj.pyx":454
+      /* "_proj.pyx":467
  *         for i from 0 <= i < ndim:
  *             if radians:
  *                 lon1 = _rad2dg*lonsdata[i]             # <<<<<<<<<<<<<<
@@ -4375,7 +4739,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_lon1 = (__pyx_v_5_proj__rad2dg * (__pyx_v_lonsdata[__pyx_v_i]));
 
-      /* "_proj.pyx":455
+      /* "_proj.pyx":468
  *             if radians:
  *                 lon1 = _rad2dg*lonsdata[i]
  *                 lat1 = _rad2dg*latsdata[i]             # <<<<<<<<<<<<<<
@@ -4384,7 +4748,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_lat1 = (__pyx_v_5_proj__rad2dg * (__pyx_v_latsdata[__pyx_v_i]));
 
-      /* "_proj.pyx":456
+      /* "_proj.pyx":469
  *                 lon1 = _rad2dg*lonsdata[i]
  *                 lat1 = _rad2dg*latsdata[i]
  *                 lon2 = _rad2dg*azdata[i]             # <<<<<<<<<<<<<<
@@ -4393,7 +4757,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_lon2 = (__pyx_v_5_proj__rad2dg * (__pyx_v_azdata[__pyx_v_i]));
 
-      /* "_proj.pyx":457
+      /* "_proj.pyx":470
  *                 lat1 = _rad2dg*latsdata[i]
  *                 lon2 = _rad2dg*azdata[i]
  *                 lat2 = _rad2dg*distdata[i]             # <<<<<<<<<<<<<<
@@ -4405,7 +4769,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
     }
     /*else*/ {
 
-      /* "_proj.pyx":459
+      /* "_proj.pyx":472
  *                 lat2 = _rad2dg*distdata[i]
  *             else:
  *                 lon1 = lonsdata[i]             # <<<<<<<<<<<<<<
@@ -4414,7 +4778,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_lon1 = (__pyx_v_lonsdata[__pyx_v_i]);
 
-      /* "_proj.pyx":460
+      /* "_proj.pyx":473
  *             else:
  *                 lon1 = lonsdata[i]
  *                 lat1 = latsdata[i]             # <<<<<<<<<<<<<<
@@ -4423,69 +4787,69 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
       __pyx_v_lat1 = (__pyx_v_latsdata[__pyx_v_i]);
 
-      /* "_proj.pyx":461
+      /* "_proj.pyx":474
  *                 lon1 = lonsdata[i]
  *                 lat1 = latsdata[i]
  *                 lon2 = azdata[i]             # <<<<<<<<<<<<<<
  *                 lat2 = distdata[i]
- *             Inverse(&self._Geodesic, lat1, lon1, lat2, lon2,
+ *             geod_inverse(&self._geod_geodesic, lat1, lon1, lat2, lon2,
  */
       __pyx_v_lon2 = (__pyx_v_azdata[__pyx_v_i]);
 
-      /* "_proj.pyx":462
+      /* "_proj.pyx":475
  *                 lat1 = latsdata[i]
  *                 lon2 = azdata[i]
  *                 lat2 = distdata[i]             # <<<<<<<<<<<<<<
- *             Inverse(&self._Geodesic, lat1, lon1, lat2, lon2,
+ *             geod_inverse(&self._geod_geodesic, lat1, lon1, lat2, lon2,
  *                     &ps12, &pazi1, &pazi2)
  */
       __pyx_v_lat2 = (__pyx_v_distdata[__pyx_v_i]);
     }
     __pyx_L10:;
 
-    /* "_proj.pyx":464
+    /* "_proj.pyx":477
  *                 lat2 = distdata[i]
- *             Inverse(&self._Geodesic, lat1, lon1, lat2, lon2,
+ *             geod_inverse(&self._geod_geodesic, lat1, lon1, lat2, lon2,
  *                     &ps12, &pazi1, &pazi2)             # <<<<<<<<<<<<<<
  *             # back azimuth needs to be flipped 180 degrees
  *             # to match what proj4 geod utility produces.
  */
-    Inverse((&__pyx_v_self->_Geodesic), __pyx_v_lat1, __pyx_v_lon1, __pyx_v_lat2, __pyx_v_lon2, (&__pyx_v_ps12), (&__pyx_v_pazi1), (&__pyx_v_pazi2));
+    geod_inverse((&__pyx_v_self->_geod_geodesic), __pyx_v_lat1, __pyx_v_lon1, __pyx_v_lat2, __pyx_v_lon2, (&__pyx_v_ps12), (&__pyx_v_pazi1), (&__pyx_v_pazi2));
 
-    /* "_proj.pyx":467
+    /* "_proj.pyx":480
  *             # back azimuth needs to be flipped 180 degrees
  *             # to match what proj4 geod utility produces.
  *             if pazi2 > 0:             # <<<<<<<<<<<<<<
  *                 pazi2 = pazi2-180.
- *             elif pazi2 < 0:
+ *             elif pazi2 <= 0:
  */
-    __pyx_t_2 = (__pyx_v_pazi2 > 0.0);
+    __pyx_t_2 = ((__pyx_v_pazi2 > 0.0) != 0);
     if (__pyx_t_2) {
 
-      /* "_proj.pyx":468
+      /* "_proj.pyx":481
  *             # to match what proj4 geod utility produces.
  *             if pazi2 > 0:
  *                 pazi2 = pazi2-180.             # <<<<<<<<<<<<<<
- *             elif pazi2 < 0:
+ *             elif pazi2 <= 0:
  *                 pazi2 = pazi2+180.
  */
       __pyx_v_pazi2 = (__pyx_v_pazi2 - 180.);
       goto __pyx_L11;
     }
 
-    /* "_proj.pyx":469
+    /* "_proj.pyx":482
  *             if pazi2 > 0:
  *                 pazi2 = pazi2-180.
- *             elif pazi2 < 0:             # <<<<<<<<<<<<<<
+ *             elif pazi2 <= 0:             # <<<<<<<<<<<<<<
  *                 pazi2 = pazi2+180.
  *             if ps12 != ps12: # check for NaN
  */
-    __pyx_t_2 = (__pyx_v_pazi2 < 0.0);
+    __pyx_t_2 = ((__pyx_v_pazi2 <= 0.0) != 0);
     if (__pyx_t_2) {
 
-      /* "_proj.pyx":470
+      /* "_proj.pyx":483
  *                 pazi2 = pazi2-180.
- *             elif pazi2 < 0:
+ *             elif pazi2 <= 0:
  *                 pazi2 = pazi2+180.             # <<<<<<<<<<<<<<
  *             if ps12 != ps12: # check for NaN
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
@@ -4495,43 +4859,43 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
     }
     __pyx_L11:;
 
-    /* "_proj.pyx":471
- *             elif pazi2 < 0:
+    /* "_proj.pyx":484
+ *             elif pazi2 <= 0:
  *                 pazi2 = pazi2+180.
  *             if ps12 != ps12: # check for NaN             # <<<<<<<<<<<<<<
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
  *             if radians:
  */
-    __pyx_t_2 = (__pyx_v_ps12 != __pyx_v_ps12);
+    __pyx_t_2 = ((__pyx_v_ps12 != __pyx_v_ps12) != 0);
     if (__pyx_t_2) {
 
-      /* "_proj.pyx":472
+      /* "_proj.pyx":485
  *                 pazi2 = pazi2+180.
  *             if ps12 != ps12: # check for NaN
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')             # <<<<<<<<<<<<<<
  *             if radians:
  *                 lonsdata[i] = _rad2dg*pazi1
  */
-      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_5);
       __Pyx_Raise(__pyx_t_5, 0, 0, 0);
       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       goto __pyx_L12;
     }
     __pyx_L12:;
 
-    /* "_proj.pyx":473
+    /* "_proj.pyx":486
  *             if ps12 != ps12: # check for NaN
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
  *             if radians:             # <<<<<<<<<<<<<<
  *                 lonsdata[i] = _rad2dg*pazi1
  *                 latsdata[i] = _rad2dg*pazi2
  */
-    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_2) {
 
-      /* "_proj.pyx":474
+      /* "_proj.pyx":487
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
  *             if radians:
  *                 lonsdata[i] = _rad2dg*pazi1             # <<<<<<<<<<<<<<
@@ -4540,7 +4904,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
       (__pyx_v_lonsdata[__pyx_v_i]) = (__pyx_v_5_proj__rad2dg * __pyx_v_pazi1);
 
-      /* "_proj.pyx":475
+      /* "_proj.pyx":488
  *             if radians:
  *                 lonsdata[i] = _rad2dg*pazi1
  *                 latsdata[i] = _rad2dg*pazi2             # <<<<<<<<<<<<<<
@@ -4552,7 +4916,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
     }
     /*else*/ {
 
-      /* "_proj.pyx":477
+      /* "_proj.pyx":490
  *                 latsdata[i] = _rad2dg*pazi2
  *             else:
  *                 lonsdata[i] = pazi1             # <<<<<<<<<<<<<<
@@ -4561,7 +4925,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
  */
       (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_v_pazi1;
 
-      /* "_proj.pyx":478
+      /* "_proj.pyx":491
  *             else:
  *                 lonsdata[i] = pazi1
  *                 latsdata[i] = pazi2             # <<<<<<<<<<<<<<
@@ -4572,7 +4936,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_6_inv(struct __pyx_obj_5_proj_Geod *__pyx
     }
     __pyx_L13:;
 
-    /* "_proj.pyx":479
+    /* "_proj.pyx":492
  *                 lonsdata[i] = pazi1
  *                 latsdata[i] = pazi2
  *             azdata[i] = ps12             # <<<<<<<<<<<<<<
@@ -4607,6 +4971,9 @@ static PyObject *__pyx_pw_5_proj_4Geod_9_npts(PyObject *__pyx_v_self, PyObject *
   double __pyx_v_lat2;
   int __pyx_v_npts;
   PyObject *__pyx_v_radians = 0;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_npts (wrapper)", 0);
@@ -4635,22 +5002,22 @@ static PyObject *__pyx_pw_5_proj_4Geod_9_npts(PyObject *__pyx_v_self, PyObject *
         case  1:
         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lat1)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  2:
         if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lon2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  3:
         if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lat2)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  4:
         if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__npts)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
         case  5:
         if (kw_args > 0) {
@@ -4659,7 +5026,7 @@ static PyObject *__pyx_pw_5_proj_4Geod_9_npts(PyObject *__pyx_v_self, PyObject *
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_npts") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_npts") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -4673,16 +5040,16 @@ static PyObject *__pyx_pw_5_proj_4Geod_9_npts(PyObject *__pyx_v_self, PyObject *
         default: goto __pyx_L5_argtuple_error;
       }
     }
-    __pyx_v_lon1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lon1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_lat1 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_lat1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_lon2 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_lon2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_lat2 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_lat2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-    __pyx_v_npts = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_npts == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_lon1 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lon1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_lat1 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_lat1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_lon2 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_lon2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_lat2 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_lat2 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_v_npts = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_npts == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     __pyx_v_radians = values[5];
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_npts", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("_proj.Geod._npts", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
@@ -4693,7 +5060,7 @@ static PyObject *__pyx_pw_5_proj_4Geod_9_npts(PyObject *__pyx_v_self, PyObject *
   return __pyx_r;
 }
 
-/* "_proj.pyx":481
+/* "_proj.pyx":494
  *             azdata[i] = ps12
  * 
  *     def _npts(self, double lon1, double lat1, double lon2, double lat2, int npts, radians=False):             # <<<<<<<<<<<<<<
@@ -4723,17 +5090,17 @@ static PyObject *__pyx_pf_5_proj_4Geod_8_npts(struct __pyx_obj_5_proj_Geod *__py
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("_npts", 0);
 
-  /* "_proj.pyx":486
+  /* "_proj.pyx":499
  *         cdef int i
  *         cdef double del_s,ps12,pazi1,pazi2,s12,plon2,plat2
  *         if radians:             # <<<<<<<<<<<<<<
  *             lon1 = _rad2dg*lon1
  *             lat1 = _rad2dg*lat1
  */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_1) {
 
-    /* "_proj.pyx":487
+    /* "_proj.pyx":500
  *         cdef double del_s,ps12,pazi1,pazi2,s12,plon2,plat2
  *         if radians:
  *             lon1 = _rad2dg*lon1             # <<<<<<<<<<<<<<
@@ -4742,7 +5109,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_8_npts(struct __pyx_obj_5_proj_Geod *__py
  */
     __pyx_v_lon1 = (__pyx_v_5_proj__rad2dg * __pyx_v_lon1);
 
-    /* "_proj.pyx":488
+    /* "_proj.pyx":501
  *         if radians:
  *             lon1 = _rad2dg*lon1
  *             lat1 = _rad2dg*lat1             # <<<<<<<<<<<<<<
@@ -4751,7 +5118,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_8_npts(struct __pyx_obj_5_proj_Geod *__py
  */
     __pyx_v_lat1 = (__pyx_v_5_proj__rad2dg * __pyx_v_lat1);
 
-    /* "_proj.pyx":489
+    /* "_proj.pyx":502
  *             lon1 = _rad2dg*lon1
  *             lat1 = _rad2dg*lat1
  *             lon2 = _rad2dg*lon2             # <<<<<<<<<<<<<<
@@ -4760,28 +5127,28 @@ static PyObject *__pyx_pf_5_proj_4Geod_8_npts(struct __pyx_obj_5_proj_Geod *__py
  */
     __pyx_v_lon2 = (__pyx_v_5_proj__rad2dg * __pyx_v_lon2);
 
-    /* "_proj.pyx":490
+    /* "_proj.pyx":503
  *             lat1 = _rad2dg*lat1
  *             lon2 = _rad2dg*lon2
  *             lat2 = _rad2dg*lat2             # <<<<<<<<<<<<<<
  *         # do inverse computation to set azimuths, distance.
- *         Inverse(&self._Geodesic, lat1, lon1,  lat2, lon2,
+ *         geod_inverse(&self._geod_geodesic, lat1, lon1,  lat2, lon2,
  */
     __pyx_v_lat2 = (__pyx_v_5_proj__rad2dg * __pyx_v_lat2);
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "_proj.pyx":493
+  /* "_proj.pyx":506
  *         # do inverse computation to set azimuths, distance.
- *         Inverse(&self._Geodesic, lat1, lon1,  lat2, lon2,
+ *         geod_inverse(&self._geod_geodesic, lat1, lon1,  lat2, lon2,
  *                 &ps12, &pazi1, &pazi2)             # <<<<<<<<<<<<<<
  *         # distance increment.
  *         del_s = ps12/(npts+1)
  */
-  Inverse((&__pyx_v_self->_Geodesic), __pyx_v_lat1, __pyx_v_lon1, __pyx_v_lat2, __pyx_v_lon2, (&__pyx_v_ps12), (&__pyx_v_pazi1), (&__pyx_v_pazi2));
+  geod_inverse((&__pyx_v_self->_geod_geodesic), __pyx_v_lat1, __pyx_v_lon1, __pyx_v_lat2, __pyx_v_lon2, (&__pyx_v_ps12), (&__pyx_v_pazi1), (&__pyx_v_pazi2));
 
-  /* "_proj.pyx":495
+  /* "_proj.pyx":508
  *                 &ps12, &pazi1, &pazi2)
  *         # distance increment.
  *         del_s = ps12/(npts+1)             # <<<<<<<<<<<<<<
@@ -4790,12 +5157,18 @@ static PyObject *__pyx_pf_5_proj_4Geod_8_npts(struct __pyx_obj_5_proj_Geod *__py
  */
   __pyx_t_2 = (__pyx_v_npts + 1);
   if (unlikely(__pyx_t_2 == 0)) {
+    #ifdef WITH_THREAD
+    PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
+    #endif
     PyErr_Format(PyExc_ZeroDivisionError, "float division");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    #ifdef WITH_THREAD
+    PyGILState_Release(__pyx_gilstate_save);
+    #endif
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_v_del_s = (__pyx_v_ps12 / __pyx_t_2);
 
-  /* "_proj.pyx":497
+  /* "_proj.pyx":510
  *         del_s = ps12/(npts+1)
  *         # initialize output tuples.
  *         lats = ()             # <<<<<<<<<<<<<<
@@ -4805,7 +5178,7 @@ static PyObject *__pyx_pf_5_proj_4Geod_8_npts(struct __pyx_obj_5_proj_Geod *__py
   __Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
   __pyx_v_lats = __pyx_empty_tuple;
 
-  /* "_proj.pyx":498
+  /* "_proj.pyx":511
  *         # initialize output tuples.
  *         lats = ()
  *         lons = ()             # <<<<<<<<<<<<<<
@@ -4815,140 +5188,140 @@ static PyObject *__pyx_pf_5_proj_4Geod_8_npts(struct __pyx_obj_5_proj_Geod *__py
   __Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
   __pyx_v_lons = __pyx_empty_tuple;
 
-  /* "_proj.pyx":500
+  /* "_proj.pyx":513
  *         lons = ()
  *         # loop over intermediate points, compute lat/lons.
  *         for i from 1 <= i < npts+1:             # <<<<<<<<<<<<<<
  *             s12 = i*del_s
- *             Direct(&self._Geodesic, lat1, lon1, pazi1, s12,\
+ *             geod_direct(&self._geod_geodesic, lat1, lon1, pazi1, s12,\
  */
   __pyx_t_2 = (__pyx_v_npts + 1);
   for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
 
-    /* "_proj.pyx":501
+    /* "_proj.pyx":514
  *         # loop over intermediate points, compute lat/lons.
  *         for i from 1 <= i < npts+1:
  *             s12 = i*del_s             # <<<<<<<<<<<<<<
- *             Direct(&self._Geodesic, lat1, lon1, pazi1, s12,\
+ *             geod_direct(&self._geod_geodesic, lat1, lon1, pazi1, s12,\
  *                    &plat2, &plon2, &pazi2)
  */
     __pyx_v_s12 = (__pyx_v_i * __pyx_v_del_s);
 
-    /* "_proj.pyx":503
+    /* "_proj.pyx":516
  *             s12 = i*del_s
- *             Direct(&self._Geodesic, lat1, lon1, pazi1, s12,\
+ *             geod_direct(&self._geod_geodesic, lat1, lon1, pazi1, s12,\
  *                    &plat2, &plon2, &pazi2)             # <<<<<<<<<<<<<<
  *             if radians:
  *                 lats = lats + (_dg2rad*plat2,)
  */
-    Direct((&__pyx_v_self->_Geodesic), __pyx_v_lat1, __pyx_v_lon1, __pyx_v_pazi1, __pyx_v_s12, (&__pyx_v_plat2), (&__pyx_v_plon2), (&__pyx_v_pazi2));
+    geod_direct((&__pyx_v_self->_geod_geodesic), __pyx_v_lat1, __pyx_v_lon1, __pyx_v_pazi1, __pyx_v_s12, (&__pyx_v_plat2), (&__pyx_v_plon2), (&__pyx_v_pazi2));
 
-    /* "_proj.pyx":504
- *             Direct(&self._Geodesic, lat1, lon1, pazi1, s12,\
+    /* "_proj.pyx":517
+ *             geod_direct(&self._geod_geodesic, lat1, lon1, pazi1, s12,\
  *                    &plat2, &plon2, &pazi2)
  *             if radians:             # <<<<<<<<<<<<<<
  *                 lats = lats + (_dg2rad*plat2,)
  *                 lons = lons + (_dg2rad*plon2,)
  */
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     if (__pyx_t_1) {
 
-      /* "_proj.pyx":505
+      /* "_proj.pyx":518
  *                    &plat2, &plon2, &pazi2)
  *             if radians:
  *                 lats = lats + (_dg2rad*plat2,)             # <<<<<<<<<<<<<<
  *                 lons = lons + (_dg2rad*plon2,)
  *             else:
  */
-      __pyx_t_3 = PyFloat_FromDouble((__pyx_v_5_proj__dg2rad * __pyx_v_plat2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyFloat_FromDouble((__pyx_v_5_proj__dg2rad * __pyx_v_plat2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
       PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
       __Pyx_GIVEREF(__pyx_t_3);
       __pyx_t_3 = 0;
-      __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_lats), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_lats), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
       __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
       __Pyx_DECREF(((PyObject *)__pyx_v_lats));
-      __pyx_v_lats = __pyx_t_3;
+      __pyx_v_lats = ((PyObject*)__pyx_t_3);
       __pyx_t_3 = 0;
 
-      /* "_proj.pyx":506
+      /* "_proj.pyx":519
  *             if radians:
  *                 lats = lats + (_dg2rad*plat2,)
  *                 lons = lons + (_dg2rad*plon2,)             # <<<<<<<<<<<<<<
  *             else:
  *                 lats = lats + (plat2,)
  */
-      __pyx_t_3 = PyFloat_FromDouble((__pyx_v_5_proj__dg2rad * __pyx_v_plon2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyFloat_FromDouble((__pyx_v_5_proj__dg2rad * __pyx_v_plon2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
       PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
       __Pyx_GIVEREF(__pyx_t_3);
       __pyx_t_3 = 0;
-      __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_lons), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_lons), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
       __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
       __Pyx_DECREF(((PyObject *)__pyx_v_lons));
-      __pyx_v_lons = __pyx_t_3;
+      __pyx_v_lons = ((PyObject*)__pyx_t_3);
       __pyx_t_3 = 0;
       goto __pyx_L6;
     }
     /*else*/ {
 
-      /* "_proj.pyx":508
+      /* "_proj.pyx":521
  *                 lons = lons + (_dg2rad*plon2,)
  *             else:
  *                 lats = lats + (plat2,)             # <<<<<<<<<<<<<<
  *                 lons = lons + (plon2,)
  *         return lons, lats
  */
-      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_plat2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_plat2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
       PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
       __Pyx_GIVEREF(__pyx_t_3);
       __pyx_t_3 = 0;
-      __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_lats), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_lats), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
       __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
       __Pyx_DECREF(((PyObject *)__pyx_v_lats));
-      __pyx_v_lats = __pyx_t_3;
+      __pyx_v_lats = ((PyObject*)__pyx_t_3);
       __pyx_t_3 = 0;
 
-      /* "_proj.pyx":509
+      /* "_proj.pyx":522
  *             else:
  *                 lats = lats + (plat2,)
  *                 lons = lons + (plon2,)             # <<<<<<<<<<<<<<
  *         return lons, lats
  */
-      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_plon2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_plon2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_4);
       PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
       __Pyx_GIVEREF(__pyx_t_3);
       __pyx_t_3 = 0;
-      __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_lons), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_lons), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_3));
       __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
       __Pyx_DECREF(((PyObject *)__pyx_v_lons));
-      __pyx_v_lons = __pyx_t_3;
+      __pyx_v_lons = ((PyObject*)__pyx_t_3);
       __pyx_t_3 = 0;
     }
     __pyx_L6:;
   }
 
-  /* "_proj.pyx":510
+  /* "_proj.pyx":523
  *                 lats = lats + (plat2,)
  *                 lons = lons + (plon2,)
  *         return lons, lats             # <<<<<<<<<<<<<<
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(((PyObject *)__pyx_v_lons));
   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_lons));
@@ -4986,9 +5359,9 @@ static PyObject *__pyx_pw_5_proj_4Geod_10initstring_1__get__(PyObject *__pyx_v_s
   return __pyx_r;
 }
 
-/* "_proj.pyx":355
+/* "_proj.pyx":368
  * cdef class Geod:
- *     cdef Geodesic _Geodesic
+ *     cdef geod_geodesic _geod_geodesic
  *     cdef public object initstring             # <<<<<<<<<<<<<<
  * 
  *     def __cinit__(self, a, f):
@@ -5064,12 +5437,13 @@ static int __pyx_pf_5_proj_4Geod_10initstring_4__del__(struct __pyx_obj_5_proj_G
 
 static PyObject *__pyx_tp_new_5_proj_Proj(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5_proj_Proj *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
+  PyObject *o;
+  o = (*t->tp_alloc)(t, 0);
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5_proj_Proj *)o);
   p->proj_version = Py_None; Py_INCREF(Py_None);
   p->srs = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pw_5_proj_4Proj_1__cinit__(o, a, k) < 0) {
+  if (unlikely(__pyx_pw_5_proj_4Proj_1__cinit__(o, a, k) < 0)) {
     Py_DECREF(o); o = 0;
   }
   return o;
@@ -5089,7 +5463,6 @@ static void __pyx_tp_dealloc_5_proj_Proj(PyObject *o) {
   }
   Py_CLEAR(p->proj_version);
   Py_CLEAR(p->srs);
-  PyObject_GC_Track(o);
   (*Py_TYPE(o)->tp_free)(o);
 }
 
@@ -5144,11 +5517,12 @@ static int __pyx_setprop_5_proj_4Proj_srs(PyObject *o, PyObject *v, CYTHON_UNUSE
 }
 
 static PyMethodDef __pyx_methods_5_proj_Proj[] = {
-  {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_5_proj_4Proj_5__reduce__, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_proj_4Proj_4__reduce__)},
-  {__Pyx_NAMESTR("_fwd"), (PyCFunction)__pyx_pw_5_proj_4Proj_7_fwd, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5_proj_4Proj_6_fwd)},
-  {__Pyx_NAMESTR("_inv"), (PyCFunction)__pyx_pw_5_proj_4Proj_9_inv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5_proj_4Proj_8_inv)},
-  {__Pyx_NAMESTR("is_latlong"), (PyCFunction)__pyx_pw_5_proj_4Proj_11is_latlong, METH_NOARGS, __Pyx_DOCSTR(0)},
-  {__Pyx_NAMESTR("is_geocent"), (PyCFunction)__pyx_pw_5_proj_4Proj_13is_geocent, METH_NOARGS, __Pyx_DOCSTR(0)},
+  {__Pyx_NAMESTR("to_latlong"), (PyCFunction)__pyx_pw_5_proj_4Proj_5to_latlong, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_proj_4Proj_4to_latlong)},
+  {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_5_proj_4Proj_7__reduce__, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_5_proj_4Proj_6__reduce__)},
+  {__Pyx_NAMESTR("_fwd"), (PyCFunction)__pyx_pw_5_proj_4Proj_9_fwd, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5_proj_4Proj_8_fwd)},
+  {__Pyx_NAMESTR("_inv"), (PyCFunction)__pyx_pw_5_proj_4Proj_11_inv, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_5_proj_4Proj_10_inv)},
+  {__Pyx_NAMESTR("is_latlong"), (PyCFunction)__pyx_pw_5_proj_4Proj_13is_latlong, METH_NOARGS, __Pyx_DOCSTR(0)},
+  {__Pyx_NAMESTR("is_geocent"), (PyCFunction)__pyx_pw_5_proj_4Proj_15is_geocent, METH_NOARGS, __Pyx_DOCSTR(0)},
   {0, 0, 0, 0}
 };
 
@@ -5158,104 +5532,6 @@ static struct PyGetSetDef __pyx_getsets_5_proj_Proj[] = {
   {0, 0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_Proj = {
-  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*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  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_VERSION_HEX >= 0x02050000
-  0, /*nb_index*/
-  #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence_Proj = {
-  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_Proj = {
-  0, /*mp_length*/
-  0, /*mp_subscript*/
-  0, /*mp_ass_subscript*/
-};
-
-static PyBufferProcs __pyx_tp_as_buffer_Proj = {
-  #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_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
 static PyTypeObject __pyx_type_5_proj_Proj = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("_proj.Proj"), /*tp_name*/
@@ -5271,16 +5547,16 @@ static PyTypeObject __pyx_type_5_proj_Proj = {
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_Proj, /*tp_as_number*/
-  &__pyx_tp_as_sequence_Proj, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_Proj, /*tp_as_mapping*/
+  0, /*tp_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_Proj, /*tp_as_buffer*/
-  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   0, /*tp_doc*/
   __pyx_tp_traverse_5_proj_Proj, /*tp_traverse*/
   __pyx_tp_clear_5_proj_Proj, /*tp_clear*/
@@ -5314,11 +5590,12 @@ static PyTypeObject __pyx_type_5_proj_Proj = {
 
 static PyObject *__pyx_tp_new_5_proj_Geod(PyTypeObject *t, PyObject *a, PyObject *k) {
   struct __pyx_obj_5_proj_Geod *p;
-  PyObject *o = (*t->tp_alloc)(t, 0);
-  if (!o) return 0;
+  PyObject *o;
+  o = (*t->tp_alloc)(t, 0);
+  if (unlikely(!o)) return 0;
   p = ((struct __pyx_obj_5_proj_Geod *)o);
   p->initstring = Py_None; Py_INCREF(Py_None);
-  if (__pyx_pw_5_proj_4Geod_1__cinit__(o, a, k) < 0) {
+  if (unlikely(__pyx_pw_5_proj_4Geod_1__cinit__(o, a, k) < 0)) {
     Py_DECREF(o); o = 0;
   }
   return o;
@@ -5328,7 +5605,6 @@ static void __pyx_tp_dealloc_5_proj_Geod(PyObject *o) {
   struct __pyx_obj_5_proj_Geod *p = (struct __pyx_obj_5_proj_Geod *)o;
   PyObject_GC_UnTrack(o);
   Py_CLEAR(p->initstring);
-  PyObject_GC_Track(o);
   (*Py_TYPE(o)->tp_free)(o);
 }
 
@@ -5376,104 +5652,6 @@ static struct PyGetSetDef __pyx_getsets_5_proj_Geod[] = {
   {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*/
-  #if PY_MAJOR_VERSION < 3
-  0, /*nb_long*/
-  #else
-  0, /*reserved*/
-  #endif
-  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_VERSION_HEX >= 0x02050000
-  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_VERSION_HEX >= 0x02060000
-  0, /*bf_getbuffer*/
-  #endif
-  #if PY_VERSION_HEX >= 0x02060000
-  0, /*bf_releasebuffer*/
-  #endif
-};
-
 static PyTypeObject __pyx_type_5_proj_Geod = {
   PyVarObject_HEAD_INIT(0, 0)
   __Pyx_NAMESTR("_proj.Geod"), /*tp_name*/
@@ -5489,16 +5667,16 @@ static PyTypeObject __pyx_type_5_proj_Geod = {
   0, /*reserved*/
   #endif
   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_as_number*/
+  0, /*tp_as_sequence*/
+  0, /*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_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   0, /*tp_doc*/
   __pyx_tp_traverse_5_proj_Geod, /*tp_traverse*/
   __pyx_tp_clear_5_proj_Geod, /*tp_clear*/
@@ -5536,7 +5714,11 @@ static PyMethodDef __pyx_methods[] = {
 
 #if PY_MAJOR_VERSION >= 3
 static struct PyModuleDef __pyx_moduledef = {
+  #if PY_VERSION_HEX < 0x03020000
+    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
+  #else
     PyModuleDef_HEAD_INIT,
+  #endif
     __Pyx_NAMESTR("_proj"),
     0, /* m_doc */
     -1, /* m_size */
@@ -5560,9 +5742,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
   {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
   {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1},
+  {&__pyx_n_s____import__, __pyx_k____import__, sizeof(__pyx_k____import__), 0, 0, 1, 1},
   {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
   {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
   {&__pyx_n_s____version__, __pyx_k____version__, sizeof(__pyx_k____version__), 0, 0, 1, 1},
+  {&__pyx_n_s___createproj, __pyx_k___createproj, sizeof(__pyx_k___createproj), 0, 0, 1, 1},
   {&__pyx_n_s___doublesize, __pyx_k___doublesize, sizeof(__pyx_k___doublesize), 0, 0, 1, 1},
   {&__pyx_n_s___proj, __pyx_k___proj, sizeof(__pyx_k___proj), 0, 0, 1, 1},
   {&__pyx_n_s___transform, __pyx_k___transform, sizeof(__pyx_k___transform), 0, 0, 1, 1},
@@ -5614,9 +5798,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {0, 0, 0, 0, 0, 0, 0}
 };
 static int __Pyx_InitCachedBuiltins(void) {
-  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   return 0;
   __pyx_L1_error:;
   return -1;
@@ -5626,274 +5810,184 @@ static int __Pyx_InitCachedConstants(void) {
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
 
-  /* "_proj.pyx":113
+  /* "_proj.pyx":126
  *         # process data in buffer
  *         if buflenx != bufleny:
  *             raise RuntimeError("Buffer lengths not the same")             # <<<<<<<<<<<<<<
  *         ndim = buflenx//_doublesize
  *         lonsdata = <double *>londata
  */
-  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_4 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_4);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
 
-  /* "_proj.pyx":122
+  /* "_proj.pyx":135
  *                 lonsdata[i]=1.e30; latsdata[i]=1.e30
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 continue
  *             if radians:
  */
-  __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_6 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_6);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
-  PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_kp_s_5));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));
 
-  /* "_proj.pyx":141
+  /* "_proj.pyx":154
  *                projxyout.u != projxyout.u:
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 lonsdata[i] = 1.e30
  *             else:
  */
-  __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_7 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_7);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
-  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_5));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));
 
-  /* "_proj.pyx":148
+  /* "_proj.pyx":161
  *                projxyout.u != projxyout.u:
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 latsdata[i] = 1.e30
  *             else:
  */
-  __pyx_k_tuple_8 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_8 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_8);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
-  PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_kp_s_5));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));
 
-  /* "_proj.pyx":174
+  /* "_proj.pyx":187
  *         # (for numpy/regular python arrays).
  *         if buflenx != bufleny:
  *             raise RuntimeError("Buffer lengths not the same")             # <<<<<<<<<<<<<<
  *         ndim = buflenx//_doublesize
  *         xdatab = <double *>xdata
  */
-  __pyx_k_tuple_11 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_11 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_11);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-  PyTuple_SET_ITEM(__pyx_k_tuple_11, 0, ((PyObject *)__pyx_kp_s_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
 
-  /* "_proj.pyx":183
+  /* "_proj.pyx":196
  *                 xdatab[i]=1.e30; ydatab[i]=1.e30
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 continue
  *             projxyin.u = xdatab[i]
  */
-  __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_12 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_12);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
-  PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_5));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
 
-  /* "_proj.pyx":198
+  /* "_proj.pyx":211
  *                projlonlatout.u != projlonlatout.u:
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 xdatab[i] = 1.e30
  *             elif radians:
  */
-  __pyx_k_tuple_13 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_13 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_13);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
-  PyTuple_SET_ITEM(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_kp_s_5));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
 
-  /* "_proj.pyx":207
+  /* "_proj.pyx":220
  *                projlonlatout.v != projlonlatout.v:
  *                 if errcheck:
  *                     raise RuntimeError('projection undefined')             # <<<<<<<<<<<<<<
  *                 ydatab[i] = 1.e30
  *             elif radians:
  */
-  __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_5)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_14);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
-  PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_5));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
 
-  /* "_proj.pyx":325
+  /* "_proj.pyx":338
  *         buflenz = bufleny
  *     if not (buflenx == bufleny == buflenz):
  *         raise RuntimeError('x,y and z must be same size')             # <<<<<<<<<<<<<<
  *     xx = <double *>xdata
  *     yy = <double *>ydata
  */
-  __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_16 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_16);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_15));
-  PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_kp_s_15));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_15));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));
 
-  /* "_proj.pyx":387
+  /* "_proj.pyx":400
  *         # process data in buffer
  *         if not buflenlons == buflenlats == buflenaz == buflend:
  *             raise RuntimeError("Buffer lengths not the same")             # <<<<<<<<<<<<<<
  *         ndim = buflenlons//_doublesize
  *         lonsdata = <double *>londata
  */
-  __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_19 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_19);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-  PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_kp_s_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
 
-  /* "_proj.pyx":414
+  /* "_proj.pyx":427
  *             # check for NaN.
  *             if pazi2 != pazi2:
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')             # <<<<<<<<<<<<<<
  *             if not radians:
  *                 lonsdata[i] = plon2
  */
-  __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_21 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_21);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
-  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_20));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));
 
-  /* "_proj.pyx":445
+  /* "_proj.pyx":458
  *         # process data in buffer
  *         if not buflenlons == buflenlats == buflenaz == buflend:
  *             raise RuntimeError("Buffer lengths not the same")             # <<<<<<<<<<<<<<
  *         ndim = buflenlons//_doublesize
  *         lonsdata = <double *>londata
  */
-  __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_23 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_3)); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_23);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
-  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_kp_s_3));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
 
-  /* "_proj.pyx":472
+  /* "_proj.pyx":485
  *                 pazi2 = pazi2+180.
  *             if ps12 != ps12: # check for NaN
  *                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')             # <<<<<<<<<<<<<<
  *             if radians:
  *                 lonsdata[i] = _rad2dg*pazi1
  */
-  __pyx_k_tuple_24 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_24 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_24);
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
-  PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, ((PyObject *)__pyx_kp_s_20));
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));
 
-  /* "_proj.pyx":56
+  /* "_proj.pyx":58
  *     int PyObject_AsWriteBuffer(object, void **rbuf, Py_ssize_t *len)
  * 
  * def set_datapath(datapath):             # <<<<<<<<<<<<<<
- *     cdef char *searchpath
  *     bytestr = _strencode(datapath)
+ *     cdef const char *searchpath = bytestr
  */
-  __pyx_k_tuple_27 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_27 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__datapath), ((PyObject *)__pyx_n_s__bytestr), ((PyObject *)__pyx_n_s__searchpath)); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_k_tuple_27);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__datapath));
-  PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_n_s__datapath));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datapath));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__searchpath));
-  PyTuple_SET_ITEM(__pyx_k_tuple_27, 1, ((PyObject *)__pyx_n_s__searchpath));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__searchpath));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__bytestr));
-  PyTuple_SET_ITEM(__pyx_k_tuple_27, 2, ((PyObject *)__pyx_n_s__bytestr));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bytestr));
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));
-  __pyx_k_codeobj_28 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_29, __pyx_n_s__set_datapath, 56, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_codeobj_28 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_29, __pyx_n_s__set_datapath, 58, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "_proj.pyx":63
+ *     pj_set_searchpath(1, &searchpath)
+ * 
+ * def _createproj(projstring):             # <<<<<<<<<<<<<<
+ *     return Proj(projstring)
+ * 
+ */
+  __pyx_k_tuple_30 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__projstring)); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_k_tuple_30);
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));
+  __pyx_k_codeobj_31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_29, __pyx_n_s___createproj, 63, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "_proj.pyx":309
+  /* "_proj.pyx":322
  *             return False
  * 
  * def _transform(Proj p1, Proj p2, inx, iny, inz, radians):             # <<<<<<<<<<<<<<
  *     # private function to call pj_transform
  *     cdef void *xdata, *ydata, *zdata
  */
-  __pyx_k_tuple_30 = PyTuple_New(18); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_k_tuple_30);
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__p1));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 0, ((PyObject *)__pyx_n_s__p1));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p1));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__p2));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 1, ((PyObject *)__pyx_n_s__p2));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p2));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__inx));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 2, ((PyObject *)__pyx_n_s__inx));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inx));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__iny));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 3, ((PyObject *)__pyx_n_s__iny));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__iny));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__inz));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 4, ((PyObject *)__pyx_n_s__inz));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inz));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__radians));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 5, ((PyObject *)__pyx_n_s__radians));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__radians));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__xdata));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 6, ((PyObject *)__pyx_n_s__xdata));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xdata));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__ydata));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 7, ((PyObject *)__pyx_n_s__ydata));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ydata));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__zdata));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 8, ((PyObject *)__pyx_n_s__zdata));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__zdata));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__xx));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 9, ((PyObject *)__pyx_n_s__xx));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xx));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__yy));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 10, ((PyObject *)__pyx_n_s__yy));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__yy));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__zz));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 11, ((PyObject *)__pyx_n_s__zz));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__zz));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__buflenx));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 12, ((PyObject *)__pyx_n_s__buflenx));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buflenx));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__bufleny));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 13, ((PyObject *)__pyx_n_s__bufleny));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bufleny));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__buflenz));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 14, ((PyObject *)__pyx_n_s__buflenz));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buflenz));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__npts));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 15, ((PyObject *)__pyx_n_s__npts));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__npts));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 16, ((PyObject *)__pyx_n_s__i));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
-  __Pyx_INCREF(((PyObject *)__pyx_n_s__err));
-  PyTuple_SET_ITEM(__pyx_k_tuple_30, 17, ((PyObject *)__pyx_n_s__err));
-  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__err));
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));
-  __pyx_k_codeobj_31 = (PyObject*)__Pyx_PyCode_New(6, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_29, __pyx_n_s___transform, 309, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_k_tuple_32 = PyTuple_Pack(18, ((PyObject *)__pyx_n_s__p1), ((PyObject *)__pyx_n_s__p2), ((PyObject *)__pyx_n_s__inx), ((PyObject *)__pyx_n_s__iny), ((PyObject *)__pyx_n_s__inz), ((PyObject *)__pyx_n_s__radians), ((PyObject *)__pyx_n_s__xdata), ((PyObject *)__pyx_n_s__ydata), ((PyObject *)__pyx_n_s__zdata), ((PyObject *)__pyx_n_s__xx), ((PyObject *)__pyx_n_s__yy), ((PyObject *)__pyx_n_s__zz), ((PyObject *)__pyx_n_s__buflenx), ((PyObject *)__pyx_n_s__bufleny), ((PyObject *)__pyx_n_ [...]
+  __Pyx_GOTREF(__pyx_k_tuple_32);
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));
+  __pyx_k_codeobj_33 = (PyObject*)__Pyx_PyCode_New(6, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_29, __pyx_n_s___transform, 322, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_RefNannyFinishContext();
   return 0;
   __pyx_L1_error:;
@@ -5920,6 +6014,9 @@ PyMODINIT_FUNC PyInit__proj(void)
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   double __pyx_t_4;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
   __Pyx_RefNannyDeclarations
   #if CYTHON_REFNANNY
   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
@@ -5957,6 +6054,8 @@ PyMODINIT_FUNC PyInit__proj(void)
   __pyx_m = PyModule_Create(&__pyx_moduledef);
   #endif
   if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  Py_INCREF(__pyx_d);
   #if PY_MAJOR_VERSION >= 3
   {
     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -5972,6 +6071,9 @@ PyMODINIT_FUNC PyInit__proj(void)
   if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   /*--- Initialize various global constants etc. ---*/
   if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  #endif
   if (__pyx_module_is_main__proj) {
     if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   }
@@ -5983,11 +6085,11 @@ PyMODINIT_FUNC PyInit__proj(void)
   /*--- Variable export code ---*/
   /*--- Function export code ---*/
   /*--- Type init code ---*/
-  if (PyType_Ready(&__pyx_type_5_proj_Proj) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "Proj", (PyObject *)&__pyx_type_5_proj_Proj) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5_proj_Proj) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "Proj", (PyObject *)&__pyx_type_5_proj_Proj) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5_proj_Proj = &__pyx_type_5_proj_Proj;
-  if (PyType_Ready(&__pyx_type_5_proj_Geod) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__Pyx_SetAttrString(__pyx_m, "Geod", (PyObject *)&__pyx_type_5_proj_Geod) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_5_proj_Geod) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_SetAttrString(__pyx_m, "Geod", (PyObject *)&__pyx_type_5_proj_Geod) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_ptype_5_proj_Geod = &__pyx_type_5_proj_Geod;
   /*--- Type import code ---*/
   /*--- Variable import code ---*/
@@ -6003,7 +6105,7 @@ PyMODINIT_FUNC PyInit__proj(void)
  */
   __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__math), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__math, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s__math, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
   /* "_proj.pyx":8
@@ -6013,9 +6115,9 @@ PyMODINIT_FUNC PyInit__proj(void)
  * _rad2dg = math.degrees(1.)
  * _doublesize = sizeof(double)
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__math); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__math); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__radians); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__radians); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_t_1 = PyFloat_FromDouble(1.); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6038,11 +6140,11 @@ PyMODINIT_FUNC PyInit__proj(void)
  * _dg2rad = math.radians(1.)
  * _rad2dg = math.degrees(1.)             # <<<<<<<<<<<<<<
  * _doublesize = sizeof(double)
- * __version__ = "1.9.3"
+ * __version__ = "1.9.4"
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__math); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__math); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__degrees); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__degrees); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_t_1 = PyFloat_FromDouble(1.); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6064,117 +6166,129 @@ PyMODINIT_FUNC PyInit__proj(void)
  * _dg2rad = math.radians(1.)
  * _rad2dg = math.degrees(1.)
  * _doublesize = sizeof(double)             # <<<<<<<<<<<<<<
- * __version__ = "1.9.3"
+ * __version__ = "1.9.4"
  * 
  */
   __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(double))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___doublesize, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s___doublesize, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
   /* "_proj.pyx":11
  * _rad2dg = math.degrees(1.)
  * _doublesize = sizeof(double)
- * __version__ = "1.9.3"             # <<<<<<<<<<<<<<
+ * __version__ = "1.9.4"             # <<<<<<<<<<<<<<
  * 
  * cdef extern from "math.h":
  */
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____version__, ((PyObject *)__pyx_kp_s_26)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s____version__, ((PyObject *)__pyx_kp_s_26)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "_proj.pyx":56
+  /* "_proj.pyx":58
  *     int PyObject_AsWriteBuffer(object, void **rbuf, Py_ssize_t *len)
  * 
  * def set_datapath(datapath):             # <<<<<<<<<<<<<<
- *     cdef char *searchpath
  *     bytestr = _strencode(datapath)
+ *     cdef const char *searchpath = bytestr
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5_proj_1set_datapath, NULL, __pyx_n_s___proj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s__set_datapath, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "_proj.pyx":63
+ *     pj_set_searchpath(1, &searchpath)
+ * 
+ * def _createproj(projstring):             # <<<<<<<<<<<<<<
+ *     return Proj(projstring)
+ * 
  */
-  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5_proj_1set_datapath, NULL, __pyx_n_s___proj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5_proj_3_createproj, NULL, __pyx_n_s___proj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__set_datapath, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s___createproj, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "_proj.pyx":92
+  /* "_proj.pyx":105
  *         return (self.__class__,(self.srs,))
  * 
  *     def _fwd(self, object lons, object lats, radians=False, errcheck=False):             # <<<<<<<<<<<<<<
  *         """
  *  forward transformation - lons,lats to x,y (done in place).
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_k_1 = __pyx_t_1;
   __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_k_2 = __pyx_t_1;
   __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "_proj.pyx":153
+  /* "_proj.pyx":166
  *                 latsdata[i] = projxyout.v
  * 
  *     def _inv(self, object x, object y, radians=False, errcheck=False):             # <<<<<<<<<<<<<<
  *         """
  *  inverse transformation - x,y to lons,lats (done in place).
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_k_9 = __pyx_t_1;
   __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_k_10 = __pyx_t_1;
   __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "_proj.pyx":309
+  /* "_proj.pyx":322
  *             return False
  * 
  * def _transform(Proj p1, Proj p2, inx, iny, inz, radians):             # <<<<<<<<<<<<<<
  *     # private function to call pj_transform
  *     cdef void *xdata, *ydata, *zdata
  */
-  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5_proj_3_transform, NULL, __pyx_n_s___proj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5_proj_5_transform, NULL, __pyx_n_s___proj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___transform, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s___transform, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "_proj.pyx":365
+  /* "_proj.pyx":378
  *         return (self.__class__,(self.initstring,))
  * 
  *     def _fwd(self, object lons, object lats, object az, object dist, radians=False):             # <<<<<<<<<<<<<<
  *         """
  *  forward transformation - determine longitude, latitude and back azimuth
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_k_18 = __pyx_t_1;
   __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "_proj.pyx":424
+  /* "_proj.pyx":437
  *                 azdata[i] = _rad2dg*pazi2
  * 
  *     def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False):             # <<<<<<<<<<<<<<
  *         """
  *  inverse transformation - return forward and back azimuths, plus distance
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_k_22 = __pyx_t_1;
   __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "_proj.pyx":481
+  /* "_proj.pyx":494
  *             azdata[i] = ps12
  * 
  *     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."""
  */
-  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_k_25 = __pyx_t_1;
   __Pyx_GIVEREF(__pyx_t_1);
@@ -6187,7 +6301,7 @@ PyMODINIT_FUNC PyInit__proj(void)
  */
   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
@@ -6226,17 +6340,15 @@ end:
 }
 #endif /* CYTHON_REFNANNY */
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
-    PyObject *result;
-    result = PyObject_GetAttr(dict, name);
-    if (!result) {
-        if (dict != __pyx_b) {
-            PyErr_Clear();
-            result = PyObject_GetAttr(__pyx_b, name);
-        }
-        if (!result) {
-            PyErr_SetObject(PyExc_NameError, name);
-        }
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+    if (unlikely(!result)) {
+        PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+            "name '%U' is not defined", name);
+#else
+            "name '%s' is not defined", PyString_AS_STRING(name));
+#endif
     }
     return result;
 }
@@ -6449,24 +6561,23 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
         }
         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);
+        if (PyInstance_Check(type)) {
+            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
             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;
-            }
+        } 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
     }
     __Pyx_ErrRestore(type, value, tb);
@@ -6504,8 +6615,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
         else if (PyTuple_Check(value)) {
             Py_INCREF(value);
             args = value;
-        }
-        else
+        } else
             args = PyTuple_Pack(1, value);
         if (!args)
             goto bad;
@@ -6526,18 +6636,22 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
             "raise: exception class must be a subclass of BaseException");
         goto bad;
     }
+#if PY_VERSION_HEX >= 0x03030000
+    if (cause) {
+#else
     if (cause && cause != Py_None) {
+#endif
         PyObject *fixed_cause;
-        if (PyExceptionClass_Check(cause)) {
+        if (cause == Py_None) {
+            fixed_cause = NULL;
+        } else if (PyExceptionClass_Check(cause)) {
             fixed_cause = PyObject_CallObject(cause, NULL);
             if (fixed_cause == NULL)
                 goto bad;
-        }
-        else if (PyExceptionInstance_Check(cause)) {
+        } else if (PyExceptionInstance_Check(cause)) {
             fixed_cause = cause;
             Py_INCREF(fixed_cause);
-        }
-        else {
+        } else {
             PyErr_SetString(PyExc_TypeError,
                             "exception causes must derive from "
                             "BaseException");
@@ -6561,6 +6675,23 @@ bad:
 }
 #endif
 
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+    PyObject *result;
+#if CYTHON_COMPILING_IN_CPYTHON
+    result = PyDict_GetItem(__pyx_d, name);
+    if (result) {
+        Py_INCREF(result);
+    } else {
+#else
+    result = PyObject_GetItem(__pyx_d, name);
+    if (!result) {
+        PyErr_Clear();
+#endif
+        result = __Pyx_GetBuiltinName(name);
+    }
+    return result;
+}
+
 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
     const char *name, int exact)
 {
@@ -6676,16 +6807,18 @@ static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb)
 #endif
 }
 
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
-    PyObject *py_import = 0;
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
     PyObject *empty_list = 0;
     PyObject *module = 0;
     PyObject *global_dict = 0;
     PyObject *empty_dict = 0;
     PyObject *list;
-    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
+    #if PY_VERSION_HEX < 0x03030000
+    PyObject *py_import;
+    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s____import__);
     if (!py_import)
         goto bad;
+    #endif
     if (from_list)
         list = from_list;
     else {
@@ -6705,13 +6838,17 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
         #if PY_MAJOR_VERSION >= 3
         if (level == -1) {
             if (strchr(__Pyx_MODULE_NAME, '.')) {
-                /* try package relative import first */
+                #if PY_VERSION_HEX < 0x03030000
                 PyObject *py_level = PyInt_FromLong(1);
                 if (!py_level)
                     goto bad;
                 module = PyObject_CallFunctionObjArgs(py_import,
                     name, global_dict, empty_dict, list, py_level, NULL);
                 Py_DECREF(py_level);
+                #else
+                module = PyImport_ImportModuleLevelObject(
+                    name, global_dict, empty_dict, list, 1);
+                #endif
                 if (!module) {
                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
                         goto bad;
@@ -6722,12 +6859,17 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
         }
         #endif
         if (!module) {
+            #if PY_VERSION_HEX < 0x03030000
             PyObject *py_level = PyInt_FromLong(level);
             if (!py_level)
                 goto bad;
             module = PyObject_CallFunctionObjArgs(py_import,
                 name, global_dict, empty_dict, list, py_level, NULL);
             Py_DECREF(py_level);
+            #else
+            module = PyImport_ImportModuleLevelObject(
+                name, global_dict, empty_dict, list, level);
+            #endif
         }
     }
     #else
@@ -6739,8 +6881,10 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
         name, global_dict, empty_dict, list, NULL);
     #endif
 bad:
-    Py_XDECREF(empty_list);
+    #if PY_VERSION_HEX < 0x03030000
     Py_XDECREF(py_import);
+    #endif
+    Py_XDECREF(empty_list);
     Py_XDECREF(empty_dict);
     return module;
 }
@@ -6935,10 +7079,15 @@ static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
     return (int)__Pyx_PyInt_AsLong(x);
 }
 
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+#include "longintrepr.h"
+#endif
+#endif
 static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
     const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
         if (is_unsigned && unlikely(val < 0)) {
@@ -6951,6 +7100,16 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(unsigned long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
                                 "can't convert negative value to unsigned long");
@@ -6958,6 +7117,17 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
             }
             return (unsigned long)PyLong_AsUnsignedLong(x);
         } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(unsigned long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             return (unsigned long)PyLong_AsLong(x);
         }
     } else {
@@ -6970,10 +7140,15 @@ static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
     }
 }
 
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+#include "longintrepr.h"
+#endif
+#endif
 static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
     const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
         if (is_unsigned && unlikely(val < 0)) {
@@ -6986,6 +7161,16 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
                                 "can't convert negative value to unsigned PY_LONG_LONG");
@@ -6993,6 +7178,17 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje
             }
             return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
         } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
         }
     } else {
@@ -7005,10 +7201,15 @@ static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObje
     }
 }
 
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+#include "longintrepr.h"
+#endif
+#endif
 static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
     const long neg_one = (long)-1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
         if (is_unsigned && unlikely(val < 0)) {
@@ -7021,6 +7222,16 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
                                 "can't convert negative value to long");
@@ -7028,6 +7239,17 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
             }
             return (long)PyLong_AsUnsignedLong(x);
         } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             return (long)PyLong_AsLong(x);
         }
     } else {
@@ -7040,10 +7262,15 @@ static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
     }
 }
 
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+#include "longintrepr.h"
+#endif
+#endif
 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
     const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
         if (is_unsigned && unlikely(val < 0)) {
@@ -7056,6 +7283,16 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(PY_LONG_LONG)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
                                 "can't convert negative value to PY_LONG_LONG");
@@ -7063,6 +7300,17 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
             }
             return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
         } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(PY_LONG_LONG)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             return (PY_LONG_LONG)PyLong_AsLongLong(x);
         }
     } else {
@@ -7075,10 +7323,15 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
     }
 }
 
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+#include "longintrepr.h"
+#endif
+#endif
 static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
     const signed long neg_one = (signed long)-1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
         if (is_unsigned && unlikely(val < 0)) {
@@ -7091,6 +7344,16 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(signed long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (signed long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
                                 "can't convert negative value to signed long");
@@ -7098,6 +7361,17 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
             }
             return (signed long)PyLong_AsUnsignedLong(x);
         } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(signed long)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(signed long) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             return (signed long)PyLong_AsLong(x);
         }
     } else {
@@ -7110,10 +7384,15 @@ static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
     }
 }
 
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+#include "longintrepr.h"
+#endif
+#endif
 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
     const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
     const int is_unsigned = neg_one > const_zero;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (likely(PyInt_Check(x))) {
         long val = PyInt_AS_LONG(x);
         if (is_unsigned && unlikely(val < 0)) {
@@ -7126,6 +7405,16 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject*
 #endif
     if (likely(PyLong_Check(x))) {
         if (is_unsigned) {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             if (unlikely(Py_SIZE(x) < 0)) {
                 PyErr_SetString(PyExc_OverflowError,
                                 "can't convert negative value to signed PY_LONG_LONG");
@@ -7133,6 +7422,17 @@ static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject*
             }
             return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
         } else {
+#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
+#if CYTHON_USE_PYLONG_INTERNALS
+            if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) {
+                switch (Py_SIZE(x)) {
+                    case  0: return 0;
+                    case  1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                    case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0];
+                }
+            }
+#endif
+#endif
             return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
         }
     } else {
@@ -7356,27 +7656,82 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
     return 0;
 }
 
-
-/* Type Conversion Functions */
-
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
+    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
+    Py_ssize_t ignore;
+    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+    if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+            __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+            PyUnicode_Check(o)) {
+#if PY_VERSION_HEX < 0x03030000
+        char* defenc_c;
+        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+        if (!defenc) return NULL;
+        defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        {
+            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+            char* c;
+            for (c = defenc_c; c < end; c++) {
+                if ((unsigned char) (*c) >= 128) {
+                    PyUnicode_AsASCIIString(o);
+                    return NULL;
+                }
+            }
+        }
+#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
+        *length = PyBytes_GET_SIZE(defenc);
+        return defenc_c;
+#else /* PY_VERSION_HEX < 0x03030000 */
+        if (PyUnicode_READY(o) == -1) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+        if (PyUnicode_IS_ASCII(o)) {
+            *length = PyUnicode_GET_DATA_SIZE(o);
+            return PyUnicode_AsUTF8(o);
+        } else {
+            PyUnicode_AsASCIIString(o);
+            return NULL;
+        }
+#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+        return PyUnicode_AsUTF8AndSize(o, length);
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
+#endif /* PY_VERSION_HEX < 0x03030000 */
+    } else
+#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
+    {
+        char* result;
+        int r = PyBytes_AsStringAndSize(o, &result, length);
+        if (r < 0) {
+            return NULL;
+        } else {
+            return result;
+        }
+    }
+}
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
    int is_true = x == Py_True;
    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
    else return PyObject_IsTrue(x);
 }
-
 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   PyNumberMethods *m;
   const char *name = NULL;
   PyObject *res = NULL;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (PyInt_Check(x) || PyLong_Check(x))
 #else
   if (PyLong_Check(x))
 #endif
     return Py_INCREF(x), x;
   m = Py_TYPE(x)->tp_as_number;
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
   if (m && m->nb_int) {
     name = "int";
     res = PyNumber_Int(x);
@@ -7392,7 +7747,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
 #endif
   if (res) {
-#if PY_VERSION_HEX < 0x03000000
+#if PY_MAJOR_VERSION < 3
     if (!PyInt_Check(res) && !PyLong_Check(res)) {
 #else
     if (!PyLong_Check(res)) {
@@ -7410,7 +7765,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
   }
   return res;
 }
-
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   Py_ssize_t ival;
   PyObject* x = PyNumber_Index(b);
@@ -7419,7 +7773,6 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   Py_DECREF(x);
   return ival;
 }
-
 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
 #if PY_VERSION_HEX < 0x02050000
    if (ival <= LONG_MAX)
@@ -7433,14 +7786,12 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
 #endif
 }
-
 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
    unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
-   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
-       return (size_t)-1;
-   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
-       PyErr_SetString(PyExc_OverflowError,
-                       "value too large to convert to size_t");
+   if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
+       if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred())
+           PyErr_SetString(PyExc_OverflowError,
+                           "value too large to convert to size_t");
        return (size_t)-1;
    }
    return (size_t)val;
diff --git a/_proj.pyx b/_proj.pyx
index 0a6bbe0..791bfa3 100644
--- a/_proj.pyx
+++ b/_proj.pyx
@@ -8,7 +8,7 @@ cdef double _dg2rad, _rad2dg
 _dg2rad = math.radians(1.)
 _rad2dg = math.degrees(1.)
 _doublesize = sizeof(double)
-__version__ = "1.9.3"
+__version__ = "1.9.4"
 
 cdef extern from "math.h":
     cdef enum:
@@ -16,13 +16,13 @@ cdef extern from "math.h":
         FP_NAN
 
 cdef extern from "geodesic.h":
-  struct Geodesic:
+  struct geod_geodesic:
         pass
-  void GeodesicInit(Geodesic* g, double a, double f)
-  void Direct(Geodesic* g,\
+  void geod_init(geod_geodesic* g, double a, double f)
+  void geod_direct(geod_geodesic* g,\
               double lat1, double lon1, double azi1, double s12,\
               double* plat2, double* plon2, double* pazi2)
-  void Inverse(Geodesic* g,\
+  void geod_inverse(geod_geodesic* g,\
                double lat1, double lon1, double lat2, double lon2,\
                double* ps12, double* pazi1, double* pazi2)
 
@@ -36,9 +36,11 @@ cdef extern from "proj_api.h":
     projPJ pj_init_plus_ctx(projCtx, char *)
     projUV pj_fwd(projUV, projPJ)
     projUV pj_inv(projUV, projPJ)
+    projPJ pj_latlong_from_proj(projPJ) 
     int pj_transform(projPJ src, projPJ dst, long point_count, int point_offset,
                      double *x, double *y, double *z)
     int pj_is_latlong(projPJ)
+    char *pj_get_def( projPJ pj, int options)
     int pj_is_geocent(projPJ)
     char *pj_strerrno(int)
     void pj_ctx_free( projCtx )
@@ -54,11 +56,13 @@ cdef extern from "Python.h":
     int PyObject_AsWriteBuffer(object, void **rbuf, Py_ssize_t *len)
 
 def set_datapath(datapath):
-    cdef char *searchpath
     bytestr = _strencode(datapath)
-    searchpath = bytestr
+    cdef const char *searchpath = bytestr
     pj_set_searchpath(1, &searchpath)
 
+def _createproj(projstring):
+    return Proj(projstring)
+
 cdef class Proj:
     cdef projPJ projpj
     cdef projCtx projctx
@@ -85,6 +89,15 @@ cdef class Proj:
         pj_free(self.projpj)
         pj_ctx_free(self.projctx)
 
+    def to_latlong(self):
+        """return a new Proj instance which is the geographic (lat/lon)
+        coordinate version of the current projection"""
+        cdef projPJ llpj
+        llpj = pj_latlong_from_proj(self.projpj)
+        initstring = pj_get_def(llpj, 0)
+        pj_free(llpj)
+        return _createproj(initstring)
+
     def __reduce__(self):
         """special method that allows pyproj.Proj instance to be pickled"""
         return (self.__class__,(self.srs,))
@@ -351,12 +364,12 @@ cdef _strencode(pystr,encoding='ascii'):
         return pystr # already bytes?
 
 cdef class Geod:
-    cdef Geodesic _Geodesic
+    cdef geod_geodesic _geod_geodesic
     cdef public object initstring
 
     def __cinit__(self, a, f):
         self.initstring = '+a=%s +f=%s' % (a, f)
-        GeodesicInit(&self._Geodesic, <double> a, <double> f)
+        geod_init(&self._geod_geodesic, <double> a, <double> f)
 
     def __reduce__(self):
         """special method that allows pyproj.Geod instance to be pickled"""
@@ -401,13 +414,13 @@ cdef class Geod:
                 lat1 = _dg2rad*latsdata[i]
                 az1 = _dg2rad*azdata[i]
                 s12 = distdata[i]
-            Direct(&self._Geodesic, lat1, lon1, az1, s12,\
+            geod_direct(&self._geod_geodesic, lat1, lon1, az1, s12,\
                    &plat2, &plon2, &pazi2)
             # back azimuth needs to be flipped 180 degrees
             # to match what proj4 geod utility produces.
             if pazi2 > 0:
                 pazi2 = pazi2-180.
-            elif pazi2 < 0:
+            elif pazi2 <= 0:
                 pazi2 = pazi2+180.
             # check for NaN.
             if pazi2 != pazi2:
@@ -460,13 +473,13 @@ cdef class Geod:
                 lat1 = latsdata[i]
                 lon2 = azdata[i]
                 lat2 = distdata[i]
-            Inverse(&self._Geodesic, lat1, lon1, lat2, lon2,
+            geod_inverse(&self._geod_geodesic, lat1, lon1, lat2, lon2,
                     &ps12, &pazi1, &pazi2)
             # back azimuth needs to be flipped 180 degrees
             # to match what proj4 geod utility produces.
             if pazi2 > 0:
                 pazi2 = pazi2-180.
-            elif pazi2 < 0:
+            elif pazi2 <= 0:
                 pazi2 = pazi2+180.
             if ps12 != ps12: # check for NaN
                 raise ValueError('undefined inverse geodesic (may be an antipodal point)')
@@ -489,7 +502,7 @@ cdef class Geod:
             lon2 = _rad2dg*lon2
             lat2 = _rad2dg*lat2
         # do inverse computation to set azimuths, distance.
-        Inverse(&self._Geodesic, lat1, lon1,  lat2, lon2,
+        geod_inverse(&self._geod_geodesic, lat1, lon1,  lat2, lon2,
                 &ps12, &pazi1, &pazi2)
         # distance increment.
         del_s = ps12/(npts+1)
@@ -499,7 +512,7 @@ cdef class Geod:
         # loop over intermediate points, compute lat/lons.
         for i from 1 <= i < npts+1:
             s12 = i*del_s
-            Direct(&self._Geodesic, lat1, lon1, pazi1, s12,\
+            geod_direct(&self._geod_geodesic, lat1, lon1, pazi1, s12,\
                    &plat2, &plon2, &pazi2)
             if radians:
                 lats = lats + (_dg2rad*plat2,)
diff --git a/docs/api-objects.txt b/docs/api-objects.txt
index f51a515..c4744dd 100644
--- a/docs/api-objects.txt
+++ b/docs/api-objects.txt
@@ -15,7 +15,8 @@ pyproj.Geod.fwd	pyproj.Geod-class.html#fwd
 pyproj.Geod.inv	pyproj.Geod-class.html#inv
 pyproj.Geod.npts	pyproj.Geod-class.html#npts
 pyproj.Proj	pyproj.Proj-class.html
-pyproj.Proj.is_latlong	pyproj.Proj-class.html#is_latlong
 pyproj.Proj.__new__	pyproj.Proj-class.html#__new__
-pyproj.Proj.is_geocent	pyproj.Proj-class.html#is_geocent
 pyproj.Proj.__call__	pyproj.Proj-class.html#__call__
+pyproj.Proj.to_latlong	pyproj.Proj-class.html#to_latlong
+pyproj.Proj.is_latlong	pyproj.Proj-class.html#is_latlong
+pyproj.Proj.is_geocent	pyproj.Proj-class.html#is_geocent
diff --git a/docs/class-tree.html b/docs/class-tree.html
index d6bb2f6..0ac95ad 100644
--- a/docs/class-tree.html
+++ b/docs/class-tree.html
@@ -98,7 +98,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Jan 11 09:07:23 2013
+    Generated by Epydoc 3.0.1 on Mon Dec 29 15:13:06 2014
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/help.html b/docs/help.html
index 7d380f1..fcc2fbf 100644
--- a/docs/help.html
+++ b/docs/help.html
@@ -240,7 +240,7 @@ page was last updated. </p>
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Jan 11 09:07:23 2013
+    Generated by Epydoc 3.0.1 on Mon Dec 29 15:13:06 2014
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/identifier-index.html b/docs/identifier-index.html
index b23ec0e..e20d6de 100644
--- a/docs/identifier-index.html
+++ b/docs/identifier-index.html
@@ -153,9 +153,10 @@
 <tr>
 <td width="33%" class="link-index"><a href="pyproj-module.html#test">test()</a><br />
 <span class="index-where">(in <a href="pyproj-module.html">pyproj</a>)</span></td>
+<td width="33%" class="link-index"><a href="pyproj.Proj-class.html#to_latlong">to_latlong()</a><br />
+<span class="index-where">(in <a href="pyproj.Proj-class.html">Proj</a>)</span></td>
 <td width="33%" class="link-index"><a href="pyproj-module.html#transform">transform()</a><br />
 <span class="index-where">(in <a href="pyproj-module.html">pyproj</a>)</span></td>
-<td width="33%" class="link-index"> </td>
 </tr>
 <tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
 </table>
@@ -206,7 +207,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Jan 11 09:07:23 2013
+    Generated by Epydoc 3.0.1 on Mon Dec 29 15:13:06 2014
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/index.html b/docs/index.html
index f8d98fb..6ec9135 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -67,7 +67,7 @@
   <p>Input coordinates can be given as python arrays, lists/tuples, scalars
   or numpy/Numeric/numarray arrays. Optimized for objects that support the 
   Python buffer protocol (regular python and numpy array objects).</p>
-  <p>Download: http://code.google.com/p/pyproj/downloads/list</p>
+  <p>Download: http://python.org/pypi/pyproj</p>
   <p>Requirements: python 2.4 or higher.</p>
   <p>Example scripts are in 'test' subdirectory of source distribution. The
   'test()' function will run the examples in the docstrings.</p>
@@ -87,7 +87,7 @@
 
 <hr />
 <div class="fields">      <p><strong>Version:</strong>
-        1.9.3
+        1.9.4
       </p>
 </div><!-- ==================== CLASSES ==================== -->
 <a name="section-Classes"></a>
@@ -214,7 +214,8 @@
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
-        <a href="pyproj-module.html#pyproj_datadir" class="summary-name">pyproj_datadir</a> = <code title="'/Users/jsw/Library/Python/2.7/lib/python/site-packages/pyproj/data'"><code class="variable-quote">'</code><code class="variable-string">/Users/jsw/Library/Python/2.7/lib/python/sit</code><code class="variable-ellipsis">...</code></code>
+        <a href="pyproj-module.html#pyproj_datadir" class="summary-name">pyproj_datadir</a> = <code title="'/Users/jwhitaker/Library/Python/2.7/lib/python/site-packages/pyproj/d\
+ata'"><code class="variable-quote">'</code><code class="variable-string">/Users/jwhitaker/Library/Python/2.7/lib/pyth</code><code class="variable-ellipsis">...</code></code>
     </td>
   </tr>
 </table>
@@ -385,7 +386,8 @@
   <dl class="fields">
     <dt>Value:</dt>
       <dd><table><tr><td><pre class="variable">
-<code class="variable-quote">'</code><code class="variable-string">/Users/jsw/Library/Python/2.7/lib/python/site-packages/pyproj/data</code><code class="variable-quote">'</code>
+<code class="variable-quote">'</code><code class="variable-string">/Users/jwhitaker/Library/Python/2.7/lib/python/site-packages/pyproj/d</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
+<code class="variable-string">ata</code><code class="variable-quote">'</code>
 </pre></td></tr></table>
 </dd>
   </dl>
@@ -418,7 +420,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Jan 11 09:07:23 2013
+    Generated by Epydoc 3.0.1 on Mon Dec 29 15:13:06 2014
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/module-tree.html b/docs/module-tree.html
index 2141c6b..cf36b4e 100644
--- a/docs/module-tree.html
+++ b/docs/module-tree.html
@@ -78,7 +78,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Jan 11 09:07:23 2013
+    Generated by Epydoc 3.0.1 on Mon Dec 29 15:13:06 2014
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/pyproj-module.html b/docs/pyproj-module.html
index f8d98fb..6ec9135 100644
--- a/docs/pyproj-module.html
+++ b/docs/pyproj-module.html
@@ -67,7 +67,7 @@
   <p>Input coordinates can be given as python arrays, lists/tuples, scalars
   or numpy/Numeric/numarray arrays. Optimized for objects that support the 
   Python buffer protocol (regular python and numpy array objects).</p>
-  <p>Download: http://code.google.com/p/pyproj/downloads/list</p>
+  <p>Download: http://python.org/pypi/pyproj</p>
   <p>Requirements: python 2.4 or higher.</p>
   <p>Example scripts are in 'test' subdirectory of source distribution. The
   'test()' function will run the examples in the docstrings.</p>
@@ -87,7 +87,7 @@
 
 <hr />
 <div class="fields">      <p><strong>Version:</strong>
-        1.9.3
+        1.9.4
       </p>
 </div><!-- ==================== CLASSES ==================== -->
 <a name="section-Classes"></a>
@@ -214,7 +214,8 @@
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
-        <a href="pyproj-module.html#pyproj_datadir" class="summary-name">pyproj_datadir</a> = <code title="'/Users/jsw/Library/Python/2.7/lib/python/site-packages/pyproj/data'"><code class="variable-quote">'</code><code class="variable-string">/Users/jsw/Library/Python/2.7/lib/python/sit</code><code class="variable-ellipsis">...</code></code>
+        <a href="pyproj-module.html#pyproj_datadir" class="summary-name">pyproj_datadir</a> = <code title="'/Users/jwhitaker/Library/Python/2.7/lib/python/site-packages/pyproj/d\
+ata'"><code class="variable-quote">'</code><code class="variable-string">/Users/jwhitaker/Library/Python/2.7/lib/pyth</code><code class="variable-ellipsis">...</code></code>
     </td>
   </tr>
 </table>
@@ -385,7 +386,8 @@
   <dl class="fields">
     <dt>Value:</dt>
       <dd><table><tr><td><pre class="variable">
-<code class="variable-quote">'</code><code class="variable-string">/Users/jsw/Library/Python/2.7/lib/python/site-packages/pyproj/data</code><code class="variable-quote">'</code>
+<code class="variable-quote">'</code><code class="variable-string">/Users/jwhitaker/Library/Python/2.7/lib/python/site-packages/pyproj/d</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
+<code class="variable-string">ata</code><code class="variable-quote">'</code>
 </pre></td></tr></table>
 </dd>
   </dl>
@@ -418,7 +420,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Jan 11 09:07:23 2013
+    Generated by Epydoc 3.0.1 on Mon Dec 29 15:13:06 2014
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/pyproj-pysrc.html b/docs/pyproj-pysrc.html
index 3792e3d..5d82fab 100644
--- a/docs/pyproj-pysrc.html
+++ b/docs/pyproj-pysrc.html
@@ -74,7 +74,7 @@
 <a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-docstring">that support the Python buffer protocol (regular python and</tt> </tt>
 <a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring">numpy array objects).</tt> </tt>
 <a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-docstring">Download: http://code.google.com/p/pyproj/downloads/list</tt> </tt>
+<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-docstring">Download: http://python.org/pypi/pyproj</tt> </tt>
 <a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 <a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-docstring">Requirements: python 2.4 or higher.</tt> </tt>
 <a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
@@ -443,478 +443,483 @@ pyproj.Proj.__new__" class="py-name" href="#" onclick="return doclink('link-7',
 <a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line">        <tt class="py-name">outy</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">yisfloat</tt><tt class="py-op">,</tt><tt class="py-name">yislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt><tt class="py-op">)</tt> </tt>
 <a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outx</tt><tt class="py-op">,</tt> <tt class="py-name">outy</tt> </tt>
 </div><a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line"> </tt>
-<a name="Proj.is_latlong"></a><div id="Proj.is_latlong-def"><a name="L394"></a><tt class="py-lineno">394</tt> <a class="py-toggle" href="#" id="Proj.is_latlong-toggle" onclick="return toggle('Proj.is_latlong');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Proj-class.html#is_latlong">is_latlong</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Proj.is_latlong-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Proj.is_latlong-expanded"><a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">        <tt class="py-docstring">"""returns True if projection in geographic (lon/lat) coordinates"""</tt> </tt>
-<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="pyproj.Proj" class="py-name" href="#" onclick="return doclink('link-10', 'Proj', 'link-6');">Proj</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method pyproj.Proj.is_latlong()=pyproj.Proj-class.html#is_latlong"><a title="pyproj.Proj.is_latlong" class="p [...]
-</div><a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line"> </tt>
-<a name="Proj.is_geocent"></a><div id="Proj.is_geocent-def"><a name="L398"></a><tt class="py-lineno">398</tt> <a class="py-toggle" href="#" id="Proj.is_geocent-toggle" onclick="return toggle('Proj.is_geocent');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Proj-class.html#is_geocent">is_geocent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Proj.is_geocent-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Proj.is_geocent-expanded"><a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line">        <tt class="py-docstring">"""returns True if projection in geocentric (x/y) coordinates"""</tt> </tt>
-<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="pyproj.Proj" class="py-name" href="#" onclick="return doclink('link-12', 'Proj', 'link-6');">Proj</a></tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method pyproj.Proj.is_geocent()=pyproj.Proj-class.html#is_geocent"><a title="pyproj.Proj.is_geocent" class="p [...]
-</div></div><a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line"> </tt>
-<a name="transform"></a><div id="transform-def"><a name="L402"></a><tt class="py-lineno">402</tt> <a class="py-toggle" href="#" id="transform-toggle" onclick="return toggle('transform');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#transform">transform</a><tt class="py-op">(</tt><tt class="py-param">p1</tt><tt class="py-op">,</tt> <tt class="py-param">p2</tt><tt class="py-op">,</tt> <tt class="py-param">x</tt><tt class="py-op"> [...]
-</div><div id="transform-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="transform-expanded"><a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line"><tt class="py-docstring">    x2, y2, z2 = transform(p1, p2, x1, y1, z1, radians=False)</tt> </tt>
-<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line"><tt class="py-docstring">    Transform points between two coordinate systems defined by the</tt> </tt>
-<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line"><tt class="py-docstring">    Proj instances p1 and p2.</tt> </tt>
-<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line"><tt class="py-docstring">    The points x1,y1,z1 in the coordinate system defined by p1 are</tt> </tt>
-<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line"><tt class="py-docstring">    transformed to x2,y2,z2 in the coordinate system defined by p2.</tt> </tt>
-<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line"><tt class="py-docstring">    z1 is optional, if it is not set it is assumed to be zero (and</tt> </tt>
-<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line"><tt class="py-docstring">    only x2 and y2 are returned).</tt> </tt>
-<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line"><tt class="py-docstring">    In addition to converting between cartographic and geographic</tt> </tt>
-<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line"><tt class="py-docstring">    projection coordinates, this function can take care of datum</tt> </tt>
-<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line"><tt class="py-docstring">    shifts (which cannot be done using the __call__ method of the</tt> </tt>
-<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line"><tt class="py-docstring">    Proj instances). It also allows for one of the coordinate</tt> </tt>
-<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line"><tt class="py-docstring">    systems to be geographic (proj = 'latlong').</tt> </tt>
-<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line"><tt class="py-docstring">    If optional keyword 'radians' is True (default is False) and p1</tt> </tt>
-<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line"><tt class="py-docstring">    is defined in geographic coordinate (pj.is_latlong() is True),</tt> </tt>
-<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line"><tt class="py-docstring">    x1,y1 is interpreted as radians instead of the default degrees.</tt> </tt>
-<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line"><tt class="py-docstring">    Similarly, if p2 is defined in geographic coordinates and</tt> </tt>
-<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line"><tt class="py-docstring">    radians=True, x2, y2 are returned in radians instead of degrees.</tt> </tt>
-<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line"><tt class="py-docstring">    if p1.is_latlong() and p2.is_latlong() both are False, the</tt> </tt>
-<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line"><tt class="py-docstring">    radians keyword has no effect.</tt> </tt>
-<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line"><tt class="py-docstring">    x,y and z can be numpy or regular python arrays, python</tt> </tt>
-<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line"><tt class="py-docstring">    lists/tuples or scalars. Arrays are fastest.  For projections in</tt> </tt>
-<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line"><tt class="py-docstring">    geocentric coordinates, values of x and y are given in meters.</tt> </tt>
-<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line"><tt class="py-docstring">    z is always meters.</tt> </tt>
+<a name="Proj.to_latlong"></a><div id="Proj.to_latlong-def"><a name="L394"></a><tt class="py-lineno">394</tt> <a class="py-toggle" href="#" id="Proj.to_latlong-toggle" onclick="return toggle('Proj.to_latlong');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Proj-class.html#to_latlong">to_latlong</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Proj.to_latlong-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Proj.to_latlong-expanded"><a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line">        <tt class="py-docstring">"""returns an equivalent Proj in the corresponding lon/lat</tt> </tt>
+<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line"><tt class="py-docstring">        coordinates. (see pj_latlong_from_proj() in the Proj.4 C API)"""</tt> </tt>
+<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="pyproj.Proj" class="py-name" href="#" onclick="return doclink('link-10', 'Proj', 'link-6');">Proj</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method pyproj.Proj.to_latlong()=pyproj.Proj-class.html#to_latlong"><a title="pyproj.Proj.to_latlong" class="p [...]
+</div><a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line"> </tt>
+<a name="Proj.is_latlong"></a><div id="Proj.is_latlong-def"><a name="L399"></a><tt class="py-lineno">399</tt> <a class="py-toggle" href="#" id="Proj.is_latlong-toggle" onclick="return toggle('Proj.is_latlong');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Proj-class.html#is_latlong">is_latlong</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Proj.is_latlong-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Proj.is_latlong-expanded"><a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">        <tt class="py-docstring">"""returns True if projection in geographic (lon/lat) coordinates"""</tt> </tt>
+<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="pyproj.Proj" class="py-name" href="#" onclick="return doclink('link-12', 'Proj', 'link-6');">Proj</a></tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method pyproj.Proj.is_latlong()=pyproj.Proj-class.html#is_latlong"><a title="pyproj.Proj.is_latlong" class="p [...]
+</div><a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line"> </tt>
+<a name="Proj.is_geocent"></a><div id="Proj.is_geocent-def"><a name="L403"></a><tt class="py-lineno">403</tt> <a class="py-toggle" href="#" id="Proj.is_geocent-toggle" onclick="return toggle('Proj.is_geocent');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Proj-class.html#is_geocent">is_geocent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Proj.is_geocent-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Proj.is_geocent-expanded"><a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line">        <tt class="py-docstring">"""returns True if projection in geocentric (x/y) coordinates"""</tt> </tt>
+<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="pyproj.Proj" class="py-name" href="#" onclick="return doclink('link-14', 'Proj', 'link-6');">Proj</a></tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method pyproj.Proj.is_geocent()=pyproj.Proj-class.html#is_geocent"><a title="pyproj.Proj.is_geocent" class="p [...]
+</div></div><a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line"> </tt>
+<a name="transform"></a><div id="transform-def"><a name="L407"></a><tt class="py-lineno">407</tt> <a class="py-toggle" href="#" id="transform-toggle" onclick="return toggle('transform');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#transform">transform</a><tt class="py-op">(</tt><tt class="py-param">p1</tt><tt class="py-op">,</tt> <tt class="py-param">p2</tt><tt class="py-op">,</tt> <tt class="py-param">x</tt><tt class="py-op"> [...]
+</div><div id="transform-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="transform-expanded"><a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line"><tt class="py-docstring">    x2, y2, z2 = transform(p1, p2, x1, y1, z1, radians=False)</tt> </tt>
+<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line"><tt class="py-docstring">    Transform points between two coordinate systems defined by the</tt> </tt>
+<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line"><tt class="py-docstring">    Proj instances p1 and p2.</tt> </tt>
+<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line"><tt class="py-docstring">    The points x1,y1,z1 in the coordinate system defined by p1 are</tt> </tt>
+<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line"><tt class="py-docstring">    transformed to x2,y2,z2 in the coordinate system defined by p2.</tt> </tt>
+<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line"><tt class="py-docstring">    z1 is optional, if it is not set it is assumed to be zero (and</tt> </tt>
+<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line"><tt class="py-docstring">    only x2 and y2 are returned).</tt> </tt>
+<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line"><tt class="py-docstring">    In addition to converting between cartographic and geographic</tt> </tt>
+<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line"><tt class="py-docstring">    projection coordinates, this function can take care of datum</tt> </tt>
+<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line"><tt class="py-docstring">    shifts (which cannot be done using the __call__ method of the</tt> </tt>
+<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line"><tt class="py-docstring">    Proj instances). It also allows for one of the coordinate</tt> </tt>
+<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line"><tt class="py-docstring">    systems to be geographic (proj = 'latlong').</tt> </tt>
+<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line"><tt class="py-docstring">    If optional keyword 'radians' is True (default is False) and p1</tt> </tt>
+<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line"><tt class="py-docstring">    is defined in geographic coordinate (pj.is_latlong() is True),</tt> </tt>
+<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line"><tt class="py-docstring">    x1,y1 is interpreted as radians instead of the default degrees.</tt> </tt>
+<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line"><tt class="py-docstring">    Similarly, if p2 is defined in geographic coordinates and</tt> </tt>
+<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line"><tt class="py-docstring">    radians=True, x2, y2 are returned in radians instead of degrees.</tt> </tt>
+<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line"><tt class="py-docstring">    if p1.is_latlong() and p2.is_latlong() both are False, the</tt> </tt>
+<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line"><tt class="py-docstring">    radians keyword has no effect.</tt> </tt>
 <a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line"><tt class="py-docstring">    Example usage:</tt> </tt>
-<a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # projection 1: UTM zone 15, grs80 ellipse, NAD83 datum</tt> </tt>
-<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # (defined by epsg code 26915)</tt> </tt>
-<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line"><tt class="py-docstring">    >>> p1 = Proj(init='epsg:26915')</tt> </tt>
-<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # projection 2: UTM zone 15, clrk66 ellipse, NAD27 datum</tt> </tt>
-<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line"><tt class="py-docstring">    >>> p2 = Proj(init='epsg:26715')</tt> </tt>
-<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # find x,y of Jefferson City, MO.</tt> </tt>
-<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x1, y1 = p1(-92.199881,38.56694)</tt> </tt>
-<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # transform this point to projection 2 coordinates.</tt> </tt>
-<a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x2, y2 = transform(p1,p2,x1,y1)</tt> </tt>
-<a name="L445"></a><tt class="py-lineno">445</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%9.3f %11.3f' % (x1,y1)</tt> </tt>
-<a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line"><tt class="py-docstring">    '569704.566 4269024.671'</tt> </tt>
-<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%9.3f %11.3f' % (x2,y2)</tt> </tt>
-<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line"><tt class="py-docstring">    '569722.342 4268814.027'</tt> </tt>
-<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%8.3f %5.3f' % p2(x2,y2,inverse=True)</tt> </tt>
-<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line"><tt class="py-docstring">    ' -92.200 38.567'</tt> </tt>
-<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # process 3 points at a time in a tuple</tt> </tt>
-<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line"><tt class="py-docstring">    >>> lats = (38.83,39.32,38.75) # Columbia, KC and StL Missouri</tt> </tt>
-<a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line"><tt class="py-docstring">    >>> lons = (-92.22,-94.72,-90.37)</tt> </tt>
-<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x1, y1 = p1(lons,lats)</tt> </tt>
-<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x2, y2 = transform(p1,p2,x1,y1)</tt> </tt>
-<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line"><tt class="py-docstring">    >>> xy = x1+y1</tt> </tt>
-<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%9.3f %9.3f %9.3f %11.3f %11.3f %11.3f' % xy</tt> </tt>
-<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line"><tt class="py-docstring">    '567703.344 351730.944 728553.093 4298200.739 4353698.725 4292319.005'</tt> </tt>
-<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line"><tt class="py-docstring">    >>> xy = x2+y2</tt> </tt>
-<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%9.3f %9.3f %9.3f %11.3f %11.3f %11.3f' % xy</tt> </tt>
-<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line"><tt class="py-docstring">    '567721.149 351747.558 728569.133 4297989.112 4353489.644 4292106.305'</tt> </tt>
-<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line"><tt class="py-docstring">    >>> lons, lats = p2(x2,y2,inverse=True)</tt> </tt>
-<a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line"><tt class="py-docstring">    >>> xy = lons+lats</tt> </tt>
-<a name="L464"></a><tt class="py-lineno">464</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%8.3f %8.3f %8.3f %5.3f %5.3f %5.3f' % xy</tt> </tt>
-<a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line"><tt class="py-docstring">    ' -92.220  -94.720  -90.370 38.830 39.320 38.750'</tt> </tt>
-<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # test datum shifting, installation of extra datum grid files.</tt> </tt>
-<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line"><tt class="py-docstring">    >>> p1 = Proj(proj='latlong',datum='WGS84')</tt> </tt>
-<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x1 = -111.5; y1 = 45.25919444444</tt> </tt>
-<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line"><tt class="py-docstring">    >>> p2 = Proj(proj="utm",zone=10,datum='NAD27')</tt> </tt>
-<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x2, y2 = transform(p1, p2, x1, y1)</tt> </tt>
-<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line"><tt class="py-docstring">    >>> "%12.3f %12.3f" % (x2,y2)</tt> </tt>
-<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line"><tt class="py-docstring">    ' 1402285.991  5076292.423'</tt> </tt>
-<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line">    <tt class="py-comment"># process inputs, making copies that support buffer API.</tt> </tt>
-<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line">    <tt class="py-name">inx</tt><tt class="py-op">,</tt> <tt class="py-name">xisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">xislist</tt><tt class="py-op">,</tt> <tt class="py-name">xistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
-<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line">    <tt class="py-name">iny</tt><tt class="py-op">,</tt> <tt class="py-name">yisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">yislist</tt><tt class="py-op">,</tt> <tt class="py-name">yistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">y</tt><tt class="py-op">)</tt> </tt>
-<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">z</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
-<a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line">        <tt class="py-name">inz</tt><tt class="py-op">,</tt> <tt class="py-name">zisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">zislist</tt><tt class="py-op">,</tt> <tt class="py-name">zistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">z</tt><tt class="py-op">)</tt> </tt>
-<a name="L479"></a><tt class="py-lineno">479</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line">        <tt class="py-name">inz</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
-<a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line">    <tt class="py-comment"># call pj_transform.  inx,iny,inz buffers modified in place.</tt> </tt>
-<a name="L482"></a><tt class="py-lineno">482</tt>  <tt class="py-line">    <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt class="py-name">_transform</tt><tt class="py-op">(</tt><tt class="py-name">p1</tt><tt class="py-op">,</tt><tt class="py-name">p2</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt><tt class="py-op">,</tt><tt class="py-name">inz</tt><tt class="py-op">,</tt><tt class="py-name">radians</tt><tt class="py- [...]
-<a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line">    <tt class="py-comment"># if inputs were lists, tuples or floats, convert back.</tt> </tt>
-<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line">    <tt class="py-name">outx</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">xisfloat</tt><tt class="py-op">,</tt><tt class="py-name">xislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">)</tt> </tt>
-<a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line">    <tt class="py-name">outy</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">yisfloat</tt><tt class="py-op">,</tt><tt class="py-name">yislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt><tt class="py-op">)</tt> </tt>
-<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">inz</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
-<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line">        <tt class="py-name">outz</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">zisfloat</tt><tt class="py-op">,</tt><tt class="py-name">zislist</tt><tt class="py-op">,</tt><tt class="py-name">zistuple</tt><tt class="py-op">,</tt><tt class="py-name">inz</tt><tt class="py-op">)</tt> </tt>
-<a name="L488"></a><tt class="py-lineno">488</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outx</tt><tt class="py-op">,</tt> <tt class="py-name">outy</tt><tt class="py-op">,</tt> <tt class="py-name">outz</tt> </tt>
-<a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outx</tt><tt class="py-op">,</tt> <tt class="py-name">outy</tt> </tt>
-</div><a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line"> </tt>
-<a name="_copytobuffer_return_scalar"></a><div id="_copytobuffer_return_scalar-def"><a name="L492"></a><tt class="py-lineno">492</tt> <a class="py-toggle" href="#" id="_copytobuffer_return_scalar-toggle" onclick="return toggle('_copytobuffer_return_scalar');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#_copytobuffer_return_scalar">_copytobuffer_return_scalar</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op [...]
-</div><div id="_copytobuffer_return_scalar-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_copytobuffer_return_scalar-expanded"><a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line">        <tt class="py-comment"># inx,isfloat,islist,istuple</tt> </tt>
-<a name="L495"></a><tt class="py-lineno">495</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">True</tt><tt class="py-op" [...]
-<a name="L496"></a><tt class="py-lineno">496</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
-<a name="L497"></a><tt class="py-lineno">497</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">'input must be an array, list, tuple or scalar'</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L498"></a><tt class="py-lineno">498</tt>  <tt class="py-line"> </tt>
-<a name="_copytobuffer"></a><div id="_copytobuffer-def"><a name="L499"></a><tt class="py-lineno">499</tt> <a class="py-toggle" href="#" id="_copytobuffer-toggle" onclick="return toggle('_copytobuffer');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#_copytobuffer">_copytobuffer</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_copytobuffer-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_copytobuffer-expanded"><a name="L500"></a><tt class="py-lineno">500</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L501"></a><tt class="py-lineno">501</tt>  <tt class="py-line"><tt class="py-docstring">    return a copy of x as an object that supports the python Buffer</tt> </tt>
-<a name="L502"></a><tt class="py-lineno">502</tt>  <tt class="py-line"><tt class="py-docstring">    API (python array if input is float, list or tuple, numpy array</tt> </tt>
-<a name="L503"></a><tt class="py-lineno">503</tt>  <tt class="py-line"><tt class="py-docstring">    if input is a numpy array). returns copyofx, isfloat, islist,</tt> </tt>
-<a name="L504"></a><tt class="py-lineno">504</tt>  <tt class="py-line"><tt class="py-docstring">    istuple (islist is True if input is a list, istuple is true if</tt> </tt>
-<a name="L505"></a><tt class="py-lineno">505</tt>  <tt class="py-line"><tt class="py-docstring">    input is a tuple, isfloat is true if input is a float).</tt> </tt>
-<a name="L506"></a><tt class="py-lineno">506</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L507"></a><tt class="py-lineno">507</tt>  <tt class="py-line">    <tt class="py-comment"># make sure x supports Buffer API and contains doubles.</tt> </tt>
-<a name="L508"></a><tt class="py-lineno">508</tt>  <tt class="py-line">    <tt class="py-name">isfloat</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">;</tt> <tt class="py-name">islist</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">;</tt> <tt class="py-name">istuple</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
-<a name="L509"></a><tt class="py-lineno">509</tt>  <tt class="py-line">    <tt class="py-comment"># first, if it's a numpy array scalar convert to float</tt> </tt>
-<a name="L510"></a><tt class="py-lineno">510</tt>  <tt class="py-line">    <tt class="py-comment"># (array scalars don't support buffer API)</tt> </tt>
-<a name="L511"></a><tt class="py-lineno">511</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">,</tt><tt class="py-string">'shape'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L512"></a><tt class="py-lineno">512</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">shape</tt> <tt class="py-op">==</tt> <tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L513"></a><tt class="py-lineno">513</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">_copytobuffer_return_scalar</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
-<a name="L514"></a><tt class="py-lineno">514</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L515"></a><tt class="py-lineno">515</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L516"></a><tt class="py-lineno">516</tt>  <tt class="py-line">                <tt class="py-comment"># typecast numpy arrays to double.</tt> </tt>
-<a name="L517"></a><tt class="py-lineno">517</tt>  <tt class="py-line">                <tt class="py-comment"># (this makes a copy - which is crucial</tt> </tt>
-<a name="L518"></a><tt class="py-lineno">518</tt>  <tt class="py-line">                <tt class="py-comment">#  since buffer is modified in place)</tt> </tt>
-<a name="L519"></a><tt class="py-lineno">519</tt>  <tt class="py-line">                <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">dtype</tt><tt class="py-op">.</tt><tt class="py-name">char</tt> </tt>
-<a name="L520"></a><tt class="py-lineno">520</tt>  <tt class="py-line">                <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">astype</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
-<a name="L521"></a><tt class="py-lineno">521</tt>  <tt class="py-line">                <tt class="py-comment"># inx,isfloat,islist,istuple</tt> </tt>
-<a name="L522"></a><tt class="py-lineno">522</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">False</tt> </tt>
-<a name="L523"></a><tt class="py-lineno">523</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
-<a name="L524"></a><tt class="py-lineno">524</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> <tt class="py-comment"># perhaps they are Numeric/numarrays?</tt> </tt>
-<a name="L525"></a><tt class="py-lineno">525</tt>  <tt class="py-line">                    <tt class="py-comment"># sorry, not tested yet.</tt> </tt>
-<a name="L526"></a><tt class="py-lineno">526</tt>  <tt class="py-line">                    <tt class="py-comment"># i don't know Numeric/numarrays has `shape'.</tt> </tt>
-<a name="L527"></a><tt class="py-lineno">527</tt>  <tt class="py-line">                    <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">typecode</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L528"></a><tt class="py-lineno">528</tt>  <tt class="py-line">                    <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">astype</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
-<a name="L529"></a><tt class="py-lineno">529</tt>  <tt class="py-line">                    <tt class="py-comment"># inx,isfloat,islist,istuple</tt> </tt>
-<a name="L530"></a><tt class="py-lineno">530</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">False</tt> </tt>
-<a name="L531"></a><tt class="py-lineno">531</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
-<a name="L532"></a><tt class="py-lineno">532</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">'input must be an array, list, tuple or scalar'</tt><tt class="py-op">)</tt> </tt>
-<a name="L533"></a><tt class="py-lineno">533</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L534"></a><tt class="py-lineno">534</tt>  <tt class="py-line">        <tt class="py-comment"># perhaps they are regular python arrays?</tt> </tt>
-<a name="L535"></a><tt class="py-lineno">535</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">,</tt> <tt class="py-string">'typecode'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L536"></a><tt class="py-lineno">536</tt>  <tt class="py-line">            <tt class="py-comment">#x.typecode</tt> </tt>
-<a name="L537"></a><tt class="py-lineno">537</tt>  <tt class="py-line">            <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">,</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
-<a name="L538"></a><tt class="py-lineno">538</tt>  <tt class="py-line">        <tt class="py-comment"># try to convert to python array</tt> </tt>
-<a name="L539"></a><tt class="py-lineno">539</tt>  <tt class="py-line">        <tt class="py-comment"># a list.</tt> </tt>
-<a name="L540"></a><tt class="py-lineno">540</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">list</tt><tt class="py-op">:</tt> </tt>
-<a name="L541"></a><tt class="py-lineno">541</tt>  <tt class="py-line">            <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">,</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
-<a name="L542"></a><tt class="py-lineno">542</tt>  <tt class="py-line">            <tt class="py-name">islist</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
-<a name="L543"></a><tt class="py-lineno">543</tt>  <tt class="py-line">        <tt class="py-comment"># a tuple.</tt> </tt>
-<a name="L544"></a><tt class="py-lineno">544</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">tuple</tt><tt class="py-op">:</tt> </tt>
-<a name="L545"></a><tt class="py-lineno">545</tt>  <tt class="py-line">            <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">,</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
-<a name="L546"></a><tt class="py-lineno">546</tt>  <tt class="py-line">            <tt class="py-name">istuple</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
-<a name="L547"></a><tt class="py-lineno">547</tt>  <tt class="py-line">        <tt class="py-comment"># a scalar?</tt> </tt>
-<a name="L548"></a><tt class="py-lineno">548</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L549"></a><tt class="py-lineno">549</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">_copytobuffer_return_scalar</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
-<a name="L550"></a><tt class="py-lineno">550</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">isfloat</tt><tt class="py-op">,</tt><tt class="py-name">islist</tt><tt class="py-op">,</tt><tt class="py-name">istuple</tt> </tt>
-</div><a name="L551"></a><tt class="py-lineno">551</tt>  <tt class="py-line"> </tt>
-<a name="_convertback"></a><div id="_convertback-def"><a name="L552"></a><tt class="py-lineno">552</tt> <a class="py-toggle" href="#" id="_convertback-toggle" onclick="return toggle('_convertback');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#_convertback">_convertback</a><tt class="py-op">(</tt><tt class="py-param">isfloat</tt><tt class="py-op">,</tt><tt class="py-param">islist</tt><tt class="py-op">,</tt><tt class="py-param" [...]
-</div><div id="_convertback-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_convertback-expanded"><a name="L553"></a><tt class="py-lineno">553</tt>  <tt class="py-line">    <tt class="py-comment"># if inputs were lists, tuples or floats, convert back to original type.</tt> </tt>
-<a name="L554"></a><tt class="py-lineno">554</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isfloat</tt><tt class="py-op">:</tt> </tt>
-<a name="L555"></a><tt class="py-lineno">555</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
-<a name="L556"></a><tt class="py-lineno">556</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">islist</tt><tt class="py-op">:</tt> </tt>
-<a name="L557"></a><tt class="py-lineno">557</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">.</tt><tt class="py-name">tolist</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L558"></a><tt class="py-lineno">558</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">istuple</tt><tt class="py-op">:</tt> </tt>
-<a name="L559"></a><tt class="py-lineno">559</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">inx</tt><tt class="py-op">)</tt> </tt>
-<a name="L560"></a><tt class="py-lineno">560</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L561"></a><tt class="py-lineno">561</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt> </tt>
-</div><a name="L562"></a><tt class="py-lineno">562</tt>  <tt class="py-line"> </tt>
-<a name="_dict2string"></a><div id="_dict2string-def"><a name="L563"></a><tt class="py-lineno">563</tt> <a class="py-toggle" href="#" id="_dict2string-toggle" onclick="return toggle('_dict2string');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#_dict2string">_dict2string</a><tt class="py-op">(</tt><tt class="py-param">projparams</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_dict2string-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_dict2string-expanded"><a name="L564"></a><tt class="py-lineno">564</tt>  <tt class="py-line">    <tt class="py-comment"># convert a dict to a proj4 string.</tt> </tt>
-<a name="L565"></a><tt class="py-lineno">565</tt>  <tt class="py-line">    <tt class="py-name">pjargs</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
-<a name="L566"></a><tt class="py-lineno">566</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">projparams</tt><tt class="py-op">.</tt><tt class="py-name">items</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L567"></a><tt class="py-lineno">567</tt>  <tt class="py-line">        <tt class="py-name">pjargs</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'+'</tt><tt class="py-op">+</tt><tt class="py-name">key</tt><tt class="py-op">+</tt><tt class="py-string">"="</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py [...]
-<a name="L568"></a><tt class="py-lineno">568</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">pjargs</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L569"></a><tt class="py-lineno">569</tt>  <tt class="py-line"> </tt>
-<a name="Geod"></a><div id="Geod-def"><a name="L570"></a><tt class="py-lineno">570</tt> <a class="py-toggle" href="#" id="Geod-toggle" onclick="return toggle('Geod');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pyproj.Geod-class.html">Geod</a><tt class="py-op">(</tt><tt class="py-base-class">_proj</tt><tt class="py-op">.</tt><tt class="py-base-class">Geod</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Geod-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Geod-expanded"><a name="L571"></a><tt class="py-lineno">571</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L572"></a><tt class="py-lineno">572</tt>  <tt class="py-line"><tt class="py-docstring">    performs forward and inverse geodetic, or Great Circle,</tt> </tt>
-<a name="L573"></a><tt class="py-lineno">573</tt>  <tt class="py-line"><tt class="py-docstring">    computations.  The forward computation (using the 'fwd' method)</tt> </tt>
-<a name="L574"></a><tt class="py-lineno">574</tt>  <tt class="py-line"><tt class="py-docstring">    involves determining latitude, longitude and back azimuth of a</tt> </tt>
-<a name="L575"></a><tt class="py-lineno">575</tt>  <tt class="py-line"><tt class="py-docstring">    computations.  The forward computation (using the 'fwd' method)</tt> </tt>
-<a name="L576"></a><tt class="py-lineno">576</tt>  <tt class="py-line"><tt class="py-docstring">    involves determining latitude, longitude and back azimuth of a</tt> </tt>
-<a name="L577"></a><tt class="py-lineno">577</tt>  <tt class="py-line"><tt class="py-docstring">    terminus point given the latitude and longitude of an initial</tt> </tt>
-<a name="L578"></a><tt class="py-lineno">578</tt>  <tt class="py-line"><tt class="py-docstring">    point, plus azimuth and distance. The inverse computation (using</tt> </tt>
-<a name="L579"></a><tt class="py-lineno">579</tt>  <tt class="py-line"><tt class="py-docstring">    the 'inv' method) involves determining the forward and back</tt> </tt>
-<a name="L580"></a><tt class="py-lineno">580</tt>  <tt class="py-line"><tt class="py-docstring">    azimuths and distance given the latitudes and longitudes of an</tt> </tt>
-<a name="L581"></a><tt class="py-lineno">581</tt>  <tt class="py-line"><tt class="py-docstring">    initial and terminus point.</tt> </tt>
-<a name="L582"></a><tt class="py-lineno">582</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="Geod.__new__"></a><div id="Geod.__new__-def"><a name="L583"></a><tt class="py-lineno">583</tt> <a class="py-toggle" href="#" id="Geod.__new__-toggle" onclick="return toggle('Geod.__new__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Geod-class.html#__new__">__new__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">initstring</tt><tt class="py-op">=</tt><tt class="py-name"> [...]
-</div><div id="Geod.__new__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Geod.__new__-expanded"><a name="L584"></a><tt class="py-lineno">584</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L585"></a><tt class="py-lineno">585</tt>  <tt class="py-line"><tt class="py-docstring">        initialize a Geod class instance.</tt> </tt>
-<a name="L586"></a><tt class="py-lineno">586</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L587"></a><tt class="py-lineno">587</tt>  <tt class="py-line"><tt class="py-docstring">        Geodetic parameters for specifying the ellipsoid</tt> </tt>
-<a name="L588"></a><tt class="py-lineno">588</tt>  <tt class="py-line"><tt class="py-docstring">        can be given in a dictionary 'initparams', as keyword arguments,</tt> </tt>
-<a name="L589"></a><tt class="py-lineno">589</tt>  <tt class="py-line"><tt class="py-docstring">        or as as proj4 geod initialization string.</tt> </tt>
-<a name="L590"></a><tt class="py-lineno">590</tt>  <tt class="py-line"><tt class="py-docstring">        Following is a list of the ellipsoids that may be defined using the</tt> </tt>
-<a name="L591"></a><tt class="py-lineno">591</tt>  <tt class="py-line"><tt class="py-docstring">        'ellps' keyword (these are stored in the model variable pj_ellps)::</tt> </tt>
-<a name="L592"></a><tt class="py-lineno">592</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L593"></a><tt class="py-lineno">593</tt>  <tt class="py-line"><tt class="py-docstring">           MERIT a=6378137.0      rf=298.257       MERIT 1983</tt> </tt>
-<a name="L594"></a><tt class="py-lineno">594</tt>  <tt class="py-line"><tt class="py-docstring">           SGS85 a=6378136.0      rf=298.257       Soviet Geodetic System 85</tt> </tt>
-<a name="L595"></a><tt class="py-lineno">595</tt>  <tt class="py-line"><tt class="py-docstring">           GRS80 a=6378137.0      rf=298.257222101 GRS 1980(IUGG, 1980)</tt> </tt>
-<a name="L596"></a><tt class="py-lineno">596</tt>  <tt class="py-line"><tt class="py-docstring">           IAU76 a=6378140.0      rf=298.257       IAU 1976</tt> </tt>
-<a name="L597"></a><tt class="py-lineno">597</tt>  <tt class="py-line"><tt class="py-docstring">           airy a=6377563.396     b=6356256.910    Airy 1830</tt> </tt>
-<a name="L598"></a><tt class="py-lineno">598</tt>  <tt class="py-line"><tt class="py-docstring">           APL4.9 a=6378137.0.    rf=298.25        Appl. Physics. 1965</tt> </tt>
-<a name="L599"></a><tt class="py-lineno">599</tt>  <tt class="py-line"><tt class="py-docstring">           airy a=6377563.396     b=6356256.910    Airy 1830</tt> </tt>
-<a name="L600"></a><tt class="py-lineno">600</tt>  <tt class="py-line"><tt class="py-docstring">           APL4.9 a=6378137.0.    rf=298.25        Appl. Physics. 1965</tt> </tt>
-<a name="L601"></a><tt class="py-lineno">601</tt>  <tt class="py-line"><tt class="py-docstring">           NWL9D a=6378145.0.     rf=298.25        Naval Weapons Lab., 1965</tt> </tt>
-<a name="L602"></a><tt class="py-lineno">602</tt>  <tt class="py-line"><tt class="py-docstring">           mod_airy a=6377340.189 b=6356034.446    Modified Airy</tt> </tt>
-<a name="L603"></a><tt class="py-lineno">603</tt>  <tt class="py-line"><tt class="py-docstring">           andrae a=6377104.43    rf=300.0         Andrae 1876 (Den., Iclnd.)</tt> </tt>
-<a name="L604"></a><tt class="py-lineno">604</tt>  <tt class="py-line"><tt class="py-docstring">           aust_SA a=6378160.0    rf=298.25        Australian Natl & S. Amer. 1969</tt> </tt>
-<a name="L605"></a><tt class="py-lineno">605</tt>  <tt class="py-line"><tt class="py-docstring">           GRS67 a=6378160.0      rf=298.247167427 GRS 67(IUGG 1967)</tt> </tt>
-<a name="L606"></a><tt class="py-lineno">606</tt>  <tt class="py-line"><tt class="py-docstring">           bessel a=6377397.155   rf=299.1528128   Bessel 1841</tt> </tt>
-<a name="L607"></a><tt class="py-lineno">607</tt>  <tt class="py-line"><tt class="py-docstring">           bess_nam a=6377483.865 rf=299.1528128   Bessel 1841 (Namibia)</tt> </tt>
-<a name="L608"></a><tt class="py-lineno">608</tt>  <tt class="py-line"><tt class="py-docstring">           clrk66 a=6378206.4     b=6356583.8      Clarke 1866</tt> </tt>
-<a name="L609"></a><tt class="py-lineno">609</tt>  <tt class="py-line"><tt class="py-docstring">           clrk80 a=6378249.145   rf=293.4663      Clarke 1880 mod.</tt> </tt>
-<a name="L610"></a><tt class="py-lineno">610</tt>  <tt class="py-line"><tt class="py-docstring">           CPM a=6375738.7        rf=334.29        Comm. des Poids et Mesures 1799</tt> </tt>
-<a name="L611"></a><tt class="py-lineno">611</tt>  <tt class="py-line"><tt class="py-docstring">           delmbr a=6376428.      rf=311.5         Delambre 1810 (Belgium)</tt> </tt>
-<a name="L612"></a><tt class="py-lineno">612</tt>  <tt class="py-line"><tt class="py-docstring">           engelis a=6378136.05   rf=298.2566      Engelis 1985</tt> </tt>
-<a name="L613"></a><tt class="py-lineno">613</tt>  <tt class="py-line"><tt class="py-docstring">           evrst30 a=6377276.345  rf=300.8017      Everest 1830</tt> </tt>
-<a name="L614"></a><tt class="py-lineno">614</tt>  <tt class="py-line"><tt class="py-docstring">           evrst48 a=6377304.063  rf=300.8017      Everest 1948</tt> </tt>
-<a name="L615"></a><tt class="py-lineno">615</tt>  <tt class="py-line"><tt class="py-docstring">           evrst56 a=6377301.243  rf=300.8017      Everest 1956</tt> </tt>
-<a name="L616"></a><tt class="py-lineno">616</tt>  <tt class="py-line"><tt class="py-docstring">           evrst69 a=6377295.664  rf=300.8017      Everest 1969</tt> </tt>
-<a name="L617"></a><tt class="py-lineno">617</tt>  <tt class="py-line"><tt class="py-docstring">           evrstSS a=6377298.556  rf=300.8017      Everest (Sabah & Sarawak)</tt> </tt>
-<a name="L618"></a><tt class="py-lineno">618</tt>  <tt class="py-line"><tt class="py-docstring">           fschr60 a=6378166.     rf=298.3         Fischer (Mercury Datum) 1960</tt> </tt>
-<a name="L619"></a><tt class="py-lineno">619</tt>  <tt class="py-line"><tt class="py-docstring">           fschr60m a=6378155.    rf=298.3         Modified Fischer 1960</tt> </tt>
-<a name="L620"></a><tt class="py-lineno">620</tt>  <tt class="py-line"><tt class="py-docstring">           fschr68 a=6378150.     rf=298.3         Fischer 1968</tt> </tt>
-<a name="L621"></a><tt class="py-lineno">621</tt>  <tt class="py-line"><tt class="py-docstring">           helmert a=6378200.     rf=298.3         Helmert 1906</tt> </tt>
-<a name="L622"></a><tt class="py-lineno">622</tt>  <tt class="py-line"><tt class="py-docstring">           hough a=6378270.0      rf=297.          Hough</tt> </tt>
-<a name="L623"></a><tt class="py-lineno">623</tt>  <tt class="py-line"><tt class="py-docstring">           helmert a=6378200.     rf=298.3         Helmert 1906</tt> </tt>
-<a name="L624"></a><tt class="py-lineno">624</tt>  <tt class="py-line"><tt class="py-docstring">           hough a=6378270.0      rf=297.          Hough</tt> </tt>
-<a name="L625"></a><tt class="py-lineno">625</tt>  <tt class="py-line"><tt class="py-docstring">           intl a=6378388.0       rf=297.          International 1909 (Hayford)</tt> </tt>
-<a name="L626"></a><tt class="py-lineno">626</tt>  <tt class="py-line"><tt class="py-docstring">           krass a=6378245.0      rf=298.3         Krassovsky, 1942</tt> </tt>
-<a name="L627"></a><tt class="py-lineno">627</tt>  <tt class="py-line"><tt class="py-docstring">           kaula a=6378163.       rf=298.24        Kaula 1961</tt> </tt>
-<a name="L628"></a><tt class="py-lineno">628</tt>  <tt class="py-line"><tt class="py-docstring">           lerch a=6378139.       rf=298.257       Lerch 1979</tt> </tt>
-<a name="L629"></a><tt class="py-lineno">629</tt>  <tt class="py-line"><tt class="py-docstring">           mprts a=6397300.       rf=191.          Maupertius 1738</tt> </tt>
-<a name="L630"></a><tt class="py-lineno">630</tt>  <tt class="py-line"><tt class="py-docstring">           new_intl a=6378157.5   b=6356772.2      New International 1967</tt> </tt>
-<a name="L631"></a><tt class="py-lineno">631</tt>  <tt class="py-line"><tt class="py-docstring">           plessis a=6376523.     b=6355863.       Plessis 1817 (France)</tt> </tt>
-<a name="L632"></a><tt class="py-lineno">632</tt>  <tt class="py-line"><tt class="py-docstring">           SEasia a=6378155.0     b=6356773.3205   Southeast Asia</tt> </tt>
-<a name="L633"></a><tt class="py-lineno">633</tt>  <tt class="py-line"><tt class="py-docstring">           walbeck a=6376896.0    b=6355834.8467   Walbeck</tt> </tt>
-<a name="L634"></a><tt class="py-lineno">634</tt>  <tt class="py-line"><tt class="py-docstring">           WGS60 a=6378165.0      rf=298.3         WGS 60</tt> </tt>
-<a name="L635"></a><tt class="py-lineno">635</tt>  <tt class="py-line"><tt class="py-docstring">           WGS66 a=6378145.0      rf=298.25        WGS 66</tt> </tt>
-<a name="L636"></a><tt class="py-lineno">636</tt>  <tt class="py-line"><tt class="py-docstring">           WGS72 a=6378135.0      rf=298.26        WGS 72</tt> </tt>
-<a name="L637"></a><tt class="py-lineno">637</tt>  <tt class="py-line"><tt class="py-docstring">           WGS84 a=6378137.0      rf=298.257223563 WGS 84</tt> </tt>
-<a name="L638"></a><tt class="py-lineno">638</tt>  <tt class="py-line"><tt class="py-docstring">           sphere a=6370997.0     b=6370997.0      Normal Sphere (r=6370997)</tt> </tt>
-<a name="L639"></a><tt class="py-lineno">639</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L640"></a><tt class="py-lineno">640</tt>  <tt class="py-line"><tt class="py-docstring">        The parameters of the ellipsoid may also be set directly using</tt> </tt>
-<a name="L641"></a><tt class="py-lineno">641</tt>  <tt class="py-line"><tt class="py-docstring">        the 'a' (semi-major or equatorial axis radius) keyword, and</tt> </tt>
-<a name="L642"></a><tt class="py-lineno">642</tt>  <tt class="py-line"><tt class="py-docstring">        any one of the following keywords: 'b' (semi-minor,</tt> </tt>
-<a name="L643"></a><tt class="py-lineno">643</tt>  <tt class="py-line"><tt class="py-docstring">        or polar axis radius), 'e' (eccentricity), 'es' (eccentricity</tt> </tt>
-<a name="L644"></a><tt class="py-lineno">644</tt>  <tt class="py-line"><tt class="py-docstring">        squared), 'f' (flattening), or 'rf' (reciprocal flattening).</tt> </tt>
-<a name="L645"></a><tt class="py-lineno">645</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L646"></a><tt class="py-lineno">646</tt>  <tt class="py-line"><tt class="py-docstring">        See the proj documentation (http://trac.osgeo.org/proj/) for more</tt> </tt>
-<a name="L647"></a><tt class="py-lineno">647</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L648"></a><tt class="py-lineno">648</tt>  <tt class="py-line"><tt class="py-docstring">        See the proj documentation (http://trac.osgeo.org/proj/) for more</tt> </tt>
-<a name="L649"></a><tt class="py-lineno">649</tt>  <tt class="py-line"><tt class="py-docstring">        information about specifying ellipsoid parameters (specifically,</tt> </tt>
-<a name="L650"></a><tt class="py-lineno">650</tt>  <tt class="py-line"><tt class="py-docstring">        the chapter 'Specifying the Earth's figure' in the main Proj</tt> </tt>
-<a name="L651"></a><tt class="py-lineno">651</tt>  <tt class="py-line"><tt class="py-docstring">        users manual).</tt> </tt>
+<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line"><tt class="py-docstring">    x,y and z can be numpy or regular python arrays, python</tt> </tt>
+<a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line"><tt class="py-docstring">    lists/tuples or scalars. Arrays are fastest.  For projections in</tt> </tt>
+<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line"><tt class="py-docstring">    geocentric coordinates, values of x and y are given in meters.</tt> </tt>
+<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line"><tt class="py-docstring">    z is always meters.</tt> </tt>
+<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line"><tt class="py-docstring">    Example usage:</tt> </tt>
+<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # projection 1: UTM zone 15, grs80 ellipse, NAD83 datum</tt> </tt>
+<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # (defined by epsg code 26915)</tt> </tt>
+<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line"><tt class="py-docstring">    >>> p1 = Proj(init='epsg:26915')</tt> </tt>
+<a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # projection 2: UTM zone 15, clrk66 ellipse, NAD27 datum</tt> </tt>
+<a name="L445"></a><tt class="py-lineno">445</tt>  <tt class="py-line"><tt class="py-docstring">    >>> p2 = Proj(init='epsg:26715')</tt> </tt>
+<a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # find x,y of Jefferson City, MO.</tt> </tt>
+<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x1, y1 = p1(-92.199881,38.56694)</tt> </tt>
+<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # transform this point to projection 2 coordinates.</tt> </tt>
+<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x2, y2 = transform(p1,p2,x1,y1)</tt> </tt>
+<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%9.3f %11.3f' % (x1,y1)</tt> </tt>
+<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line"><tt class="py-docstring">    '569704.566 4269024.671'</tt> </tt>
+<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%9.3f %11.3f' % (x2,y2)</tt> </tt>
+<a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line"><tt class="py-docstring">    '569722.342 4268814.027'</tt> </tt>
+<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%8.3f %5.3f' % p2(x2,y2,inverse=True)</tt> </tt>
+<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line"><tt class="py-docstring">    ' -92.200 38.567'</tt> </tt>
+<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # process 3 points at a time in a tuple</tt> </tt>
+<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line"><tt class="py-docstring">    >>> lats = (38.83,39.32,38.75) # Columbia, KC and StL Missouri</tt> </tt>
+<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line"><tt class="py-docstring">    >>> lons = (-92.22,-94.72,-90.37)</tt> </tt>
+<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x1, y1 = p1(lons,lats)</tt> </tt>
+<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x2, y2 = transform(p1,p2,x1,y1)</tt> </tt>
+<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line"><tt class="py-docstring">    >>> xy = x1+y1</tt> </tt>
+<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%9.3f %9.3f %9.3f %11.3f %11.3f %11.3f' % xy</tt> </tt>
+<a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line"><tt class="py-docstring">    '567703.344 351730.944 728553.093 4298200.739 4353698.725 4292319.005'</tt> </tt>
+<a name="L464"></a><tt class="py-lineno">464</tt>  <tt class="py-line"><tt class="py-docstring">    >>> xy = x2+y2</tt> </tt>
+<a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%9.3f %9.3f %9.3f %11.3f %11.3f %11.3f' % xy</tt> </tt>
+<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line"><tt class="py-docstring">    '567721.149 351747.558 728569.133 4297989.112 4353489.644 4292106.305'</tt> </tt>
+<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line"><tt class="py-docstring">    >>> lons, lats = p2(x2,y2,inverse=True)</tt> </tt>
+<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line"><tt class="py-docstring">    >>> xy = lons+lats</tt> </tt>
+<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line"><tt class="py-docstring">    >>> '%8.3f %8.3f %8.3f %5.3f %5.3f %5.3f' % xy</tt> </tt>
+<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line"><tt class="py-docstring">    ' -92.220  -94.720  -90.370 38.830 39.320 38.750'</tt> </tt>
+<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line"><tt class="py-docstring">    >>> # test datum shifting, installation of extra datum grid files.</tt> </tt>
+<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line"><tt class="py-docstring">    >>> p1 = Proj(proj='latlong',datum='WGS84')</tt> </tt>
+<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x1 = -111.5; y1 = 45.25919444444</tt> </tt>
+<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line"><tt class="py-docstring">    >>> p2 = Proj(proj="utm",zone=10,datum='NAD27')</tt> </tt>
+<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line"><tt class="py-docstring">    >>> x2, y2 = transform(p1, p2, x1, y1)</tt> </tt>
+<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line"><tt class="py-docstring">    >>> "%12.3f %12.3f" % (x2,y2)</tt> </tt>
+<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line"><tt class="py-docstring">    ' 1402285.991  5076292.423'</tt> </tt>
+<a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L479"></a><tt class="py-lineno">479</tt>  <tt class="py-line">    <tt class="py-comment"># process inputs, making copies that support buffer API.</tt> </tt>
+<a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line">    <tt class="py-name">inx</tt><tt class="py-op">,</tt> <tt class="py-name">xisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">xislist</tt><tt class="py-op">,</tt> <tt class="py-name">xistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
+<a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line">    <tt class="py-name">iny</tt><tt class="py-op">,</tt> <tt class="py-name">yisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">yislist</tt><tt class="py-op">,</tt> <tt class="py-name">yistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">y</tt><tt class="py-op">)</tt> </tt>
+<a name="L482"></a><tt class="py-lineno">482</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">z</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line">        <tt class="py-name">inz</tt><tt class="py-op">,</tt> <tt class="py-name">zisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">zislist</tt><tt class="py-op">,</tt> <tt class="py-name">zistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">z</tt><tt class="py-op">)</tt> </tt>
+<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line">        <tt class="py-name">inz</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
+<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line">    <tt class="py-comment"># call pj_transform.  inx,iny,inz buffers modified in place.</tt> </tt>
+<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line">    <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt class="py-name">_transform</tt><tt class="py-op">(</tt><tt class="py-name">p1</tt><tt class="py-op">,</tt><tt class="py-name">p2</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt><tt class="py-op">,</tt><tt class="py-name">inz</tt><tt class="py-op">,</tt><tt class="py-name">radians</tt><tt class="py- [...]
+<a name="L488"></a><tt class="py-lineno">488</tt>  <tt class="py-line">    <tt class="py-comment"># if inputs were lists, tuples or floats, convert back.</tt> </tt>
+<a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">    <tt class="py-name">outx</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">xisfloat</tt><tt class="py-op">,</tt><tt class="py-name">xislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">)</tt> </tt>
+<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line">    <tt class="py-name">outy</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">yisfloat</tt><tt class="py-op">,</tt><tt class="py-name">yislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt><tt class="py-op">)</tt> </tt>
+<a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">inz</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L492"></a><tt class="py-lineno">492</tt>  <tt class="py-line">        <tt class="py-name">outz</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">zisfloat</tt><tt class="py-op">,</tt><tt class="py-name">zislist</tt><tt class="py-op">,</tt><tt class="py-name">zistuple</tt><tt class="py-op">,</tt><tt class="py-name">inz</tt><tt class="py-op">)</tt> </tt>
+<a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outx</tt><tt class="py-op">,</tt> <tt class="py-name">outy</tt><tt class="py-op">,</tt> <tt class="py-name">outz</tt> </tt>
+<a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L495"></a><tt class="py-lineno">495</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outx</tt><tt class="py-op">,</tt> <tt class="py-name">outy</tt> </tt>
+</div><a name="L496"></a><tt class="py-lineno">496</tt>  <tt class="py-line"> </tt>
+<a name="_copytobuffer_return_scalar"></a><div id="_copytobuffer_return_scalar-def"><a name="L497"></a><tt class="py-lineno">497</tt> <a class="py-toggle" href="#" id="_copytobuffer_return_scalar-toggle" onclick="return toggle('_copytobuffer_return_scalar');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#_copytobuffer_return_scalar">_copytobuffer_return_scalar</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op [...]
+</div><div id="_copytobuffer_return_scalar-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_copytobuffer_return_scalar-expanded"><a name="L498"></a><tt class="py-lineno">498</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L499"></a><tt class="py-lineno">499</tt>  <tt class="py-line">        <tt class="py-comment"># inx,isfloat,islist,istuple</tt> </tt>
+<a name="L500"></a><tt class="py-lineno">500</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">,</tt><tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">True</tt><tt class="py-op" [...]
+<a name="L501"></a><tt class="py-lineno">501</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
+<a name="L502"></a><tt class="py-lineno">502</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">'input must be an array, list, tuple or scalar'</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L503"></a><tt class="py-lineno">503</tt>  <tt class="py-line"> </tt>
+<a name="_copytobuffer"></a><div id="_copytobuffer-def"><a name="L504"></a><tt class="py-lineno">504</tt> <a class="py-toggle" href="#" id="_copytobuffer-toggle" onclick="return toggle('_copytobuffer');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#_copytobuffer">_copytobuffer</a><tt class="py-op">(</tt><tt class="py-param">x</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_copytobuffer-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_copytobuffer-expanded"><a name="L505"></a><tt class="py-lineno">505</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L506"></a><tt class="py-lineno">506</tt>  <tt class="py-line"><tt class="py-docstring">    return a copy of x as an object that supports the python Buffer</tt> </tt>
+<a name="L507"></a><tt class="py-lineno">507</tt>  <tt class="py-line"><tt class="py-docstring">    API (python array if input is float, list or tuple, numpy array</tt> </tt>
+<a name="L508"></a><tt class="py-lineno">508</tt>  <tt class="py-line"><tt class="py-docstring">    if input is a numpy array). returns copyofx, isfloat, islist,</tt> </tt>
+<a name="L509"></a><tt class="py-lineno">509</tt>  <tt class="py-line"><tt class="py-docstring">    istuple (islist is True if input is a list, istuple is true if</tt> </tt>
+<a name="L510"></a><tt class="py-lineno">510</tt>  <tt class="py-line"><tt class="py-docstring">    input is a tuple, isfloat is true if input is a float).</tt> </tt>
+<a name="L511"></a><tt class="py-lineno">511</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L512"></a><tt class="py-lineno">512</tt>  <tt class="py-line">    <tt class="py-comment"># make sure x supports Buffer API and contains doubles.</tt> </tt>
+<a name="L513"></a><tt class="py-lineno">513</tt>  <tt class="py-line">    <tt class="py-name">isfloat</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">;</tt> <tt class="py-name">islist</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">;</tt> <tt class="py-name">istuple</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
+<a name="L514"></a><tt class="py-lineno">514</tt>  <tt class="py-line">    <tt class="py-comment"># first, if it's a numpy array scalar convert to float</tt> </tt>
+<a name="L515"></a><tt class="py-lineno">515</tt>  <tt class="py-line">    <tt class="py-comment"># (array scalars don't support buffer API)</tt> </tt>
+<a name="L516"></a><tt class="py-lineno">516</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">,</tt><tt class="py-string">'shape'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L517"></a><tt class="py-lineno">517</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">shape</tt> <tt class="py-op">==</tt> <tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L518"></a><tt class="py-lineno">518</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">_copytobuffer_return_scalar</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
+<a name="L519"></a><tt class="py-lineno">519</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L520"></a><tt class="py-lineno">520</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L521"></a><tt class="py-lineno">521</tt>  <tt class="py-line">                <tt class="py-comment"># typecast numpy arrays to double.</tt> </tt>
+<a name="L522"></a><tt class="py-lineno">522</tt>  <tt class="py-line">                <tt class="py-comment"># (this makes a copy - which is crucial</tt> </tt>
+<a name="L523"></a><tt class="py-lineno">523</tt>  <tt class="py-line">                <tt class="py-comment">#  since buffer is modified in place)</tt> </tt>
+<a name="L524"></a><tt class="py-lineno">524</tt>  <tt class="py-line">                <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">dtype</tt><tt class="py-op">.</tt><tt class="py-name">char</tt> </tt>
+<a name="L525"></a><tt class="py-lineno">525</tt>  <tt class="py-line">                <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">astype</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
+<a name="L526"></a><tt class="py-lineno">526</tt>  <tt class="py-line">                <tt class="py-comment"># inx,isfloat,islist,istuple</tt> </tt>
+<a name="L527"></a><tt class="py-lineno">527</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">False</tt> </tt>
+<a name="L528"></a><tt class="py-lineno">528</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
+<a name="L529"></a><tt class="py-lineno">529</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> <tt class="py-comment"># perhaps they are Numeric/numarrays?</tt> </tt>
+<a name="L530"></a><tt class="py-lineno">530</tt>  <tt class="py-line">                    <tt class="py-comment"># sorry, not tested yet.</tt> </tt>
+<a name="L531"></a><tt class="py-lineno">531</tt>  <tt class="py-line">                    <tt class="py-comment"># i don't know Numeric/numarrays has `shape'.</tt> </tt>
+<a name="L532"></a><tt class="py-lineno">532</tt>  <tt class="py-line">                    <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">typecode</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L533"></a><tt class="py-lineno">533</tt>  <tt class="py-line">                    <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">x</tt><tt class="py-op">.</tt><tt class="py-name">astype</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">)</tt> </tt>
+<a name="L534"></a><tt class="py-lineno">534</tt>  <tt class="py-line">                    <tt class="py-comment"># inx,isfloat,islist,istuple</tt> </tt>
+<a name="L535"></a><tt class="py-lineno">535</tt>  <tt class="py-line">                    <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">False</tt><tt class="py-op">,</tt><tt class="py-name">False</tt> </tt>
+<a name="L536"></a><tt class="py-lineno">536</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
+<a name="L537"></a><tt class="py-lineno">537</tt>  <tt class="py-line">                    <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">'input must be an array, list, tuple or scalar'</tt><tt class="py-op">)</tt> </tt>
+<a name="L538"></a><tt class="py-lineno">538</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L539"></a><tt class="py-lineno">539</tt>  <tt class="py-line">        <tt class="py-comment"># perhaps they are regular python arrays?</tt> </tt>
+<a name="L540"></a><tt class="py-lineno">540</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">,</tt> <tt class="py-string">'typecode'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L541"></a><tt class="py-lineno">541</tt>  <tt class="py-line">            <tt class="py-comment">#x.typecode</tt> </tt>
+<a name="L542"></a><tt class="py-lineno">542</tt>  <tt class="py-line">            <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">,</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
+<a name="L543"></a><tt class="py-lineno">543</tt>  <tt class="py-line">        <tt class="py-comment"># try to convert to python array</tt> </tt>
+<a name="L544"></a><tt class="py-lineno">544</tt>  <tt class="py-line">        <tt class="py-comment"># a list.</tt> </tt>
+<a name="L545"></a><tt class="py-lineno">545</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">list</tt><tt class="py-op">:</tt> </tt>
+<a name="L546"></a><tt class="py-lineno">546</tt>  <tt class="py-line">            <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">,</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
+<a name="L547"></a><tt class="py-lineno">547</tt>  <tt class="py-line">            <tt class="py-name">islist</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
+<a name="L548"></a><tt class="py-lineno">548</tt>  <tt class="py-line">        <tt class="py-comment"># a tuple.</tt> </tt>
+<a name="L549"></a><tt class="py-lineno">549</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">tuple</tt><tt class="py-op">:</tt> </tt>
+<a name="L550"></a><tt class="py-lineno">550</tt>  <tt class="py-line">            <tt class="py-name">inx</tt> <tt class="py-op">=</tt> <tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-string">'d'</tt><tt class="py-op">,</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
+<a name="L551"></a><tt class="py-lineno">551</tt>  <tt class="py-line">            <tt class="py-name">istuple</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
+<a name="L552"></a><tt class="py-lineno">552</tt>  <tt class="py-line">        <tt class="py-comment"># a scalar?</tt> </tt>
+<a name="L553"></a><tt class="py-lineno">553</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L554"></a><tt class="py-lineno">554</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">_copytobuffer_return_scalar</tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt>
+<a name="L555"></a><tt class="py-lineno">555</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">isfloat</tt><tt class="py-op">,</tt><tt class="py-name">islist</tt><tt class="py-op">,</tt><tt class="py-name">istuple</tt> </tt>
+</div><a name="L556"></a><tt class="py-lineno">556</tt>  <tt class="py-line"> </tt>
+<a name="_convertback"></a><div id="_convertback-def"><a name="L557"></a><tt class="py-lineno">557</tt> <a class="py-toggle" href="#" id="_convertback-toggle" onclick="return toggle('_convertback');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#_convertback">_convertback</a><tt class="py-op">(</tt><tt class="py-param">isfloat</tt><tt class="py-op">,</tt><tt class="py-param">islist</tt><tt class="py-op">,</tt><tt class="py-param" [...]
+</div><div id="_convertback-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_convertback-expanded"><a name="L558"></a><tt class="py-lineno">558</tt>  <tt class="py-line">    <tt class="py-comment"># if inputs were lists, tuples or floats, convert back to original type.</tt> </tt>
+<a name="L559"></a><tt class="py-lineno">559</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">isfloat</tt><tt class="py-op">:</tt> </tt>
+<a name="L560"></a><tt class="py-lineno">560</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
+<a name="L561"></a><tt class="py-lineno">561</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">islist</tt><tt class="py-op">:</tt> </tt>
+<a name="L562"></a><tt class="py-lineno">562</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt><tt class="py-op">.</tt><tt class="py-name">tolist</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L563"></a><tt class="py-lineno">563</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">istuple</tt><tt class="py-op">:</tt> </tt>
+<a name="L564"></a><tt class="py-lineno">564</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">inx</tt><tt class="py-op">)</tt> </tt>
+<a name="L565"></a><tt class="py-lineno">565</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L566"></a><tt class="py-lineno">566</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">inx</tt> </tt>
+</div><a name="L567"></a><tt class="py-lineno">567</tt>  <tt class="py-line"> </tt>
+<a name="_dict2string"></a><div id="_dict2string-def"><a name="L568"></a><tt class="py-lineno">568</tt> <a class="py-toggle" href="#" id="_dict2string-toggle" onclick="return toggle('_dict2string');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#_dict2string">_dict2string</a><tt class="py-op">(</tt><tt class="py-param">projparams</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="_dict2string-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_dict2string-expanded"><a name="L569"></a><tt class="py-lineno">569</tt>  <tt class="py-line">    <tt class="py-comment"># convert a dict to a proj4 string.</tt> </tt>
+<a name="L570"></a><tt class="py-lineno">570</tt>  <tt class="py-line">    <tt class="py-name">pjargs</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
+<a name="L571"></a><tt class="py-lineno">571</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt><tt class="py-name">value</tt> <tt class="py-keyword">in</tt> <tt class="py-name">projparams</tt><tt class="py-op">.</tt><tt class="py-name">items</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L572"></a><tt class="py-lineno">572</tt>  <tt class="py-line">        <tt class="py-name">pjargs</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-string">'+'</tt><tt class="py-op">+</tt><tt class="py-name">key</tt><tt class="py-op">+</tt><tt class="py-string">"="</tt><tt class="py-op">+</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py [...]
+<a name="L573"></a><tt class="py-lineno">573</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-name">pjargs</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L574"></a><tt class="py-lineno">574</tt>  <tt class="py-line"> </tt>
+<a name="Geod"></a><div id="Geod-def"><a name="L575"></a><tt class="py-lineno">575</tt> <a class="py-toggle" href="#" id="Geod-toggle" onclick="return toggle('Geod');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pyproj.Geod-class.html">Geod</a><tt class="py-op">(</tt><tt class="py-base-class">_proj</tt><tt class="py-op">.</tt><tt class="py-base-class">Geod</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Geod-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Geod-expanded"><a name="L576"></a><tt class="py-lineno">576</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L577"></a><tt class="py-lineno">577</tt>  <tt class="py-line"><tt class="py-docstring">    performs forward and inverse geodetic, or Great Circle,</tt> </tt>
+<a name="L578"></a><tt class="py-lineno">578</tt>  <tt class="py-line"><tt class="py-docstring">    computations.  The forward computation (using the 'fwd' method)</tt> </tt>
+<a name="L579"></a><tt class="py-lineno">579</tt>  <tt class="py-line"><tt class="py-docstring">    involves determining latitude, longitude and back azimuth of a</tt> </tt>
+<a name="L580"></a><tt class="py-lineno">580</tt>  <tt class="py-line"><tt class="py-docstring">    computations.  The forward computation (using the 'fwd' method)</tt> </tt>
+<a name="L581"></a><tt class="py-lineno">581</tt>  <tt class="py-line"><tt class="py-docstring">    involves determining latitude, longitude and back azimuth of a</tt> </tt>
+<a name="L582"></a><tt class="py-lineno">582</tt>  <tt class="py-line"><tt class="py-docstring">    terminus point given the latitude and longitude of an initial</tt> </tt>
+<a name="L583"></a><tt class="py-lineno">583</tt>  <tt class="py-line"><tt class="py-docstring">    point, plus azimuth and distance. The inverse computation (using</tt> </tt>
+<a name="L584"></a><tt class="py-lineno">584</tt>  <tt class="py-line"><tt class="py-docstring">    the 'inv' method) involves determining the forward and back</tt> </tt>
+<a name="L585"></a><tt class="py-lineno">585</tt>  <tt class="py-line"><tt class="py-docstring">    azimuths and distance given the latitudes and longitudes of an</tt> </tt>
+<a name="L586"></a><tt class="py-lineno">586</tt>  <tt class="py-line"><tt class="py-docstring">    initial and terminus point.</tt> </tt>
+<a name="L587"></a><tt class="py-lineno">587</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="Geod.__new__"></a><div id="Geod.__new__-def"><a name="L588"></a><tt class="py-lineno">588</tt> <a class="py-toggle" href="#" id="Geod.__new__-toggle" onclick="return toggle('Geod.__new__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Geod-class.html#__new__">__new__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">initstring</tt><tt class="py-op">=</tt><tt class="py-name"> [...]
+</div><div id="Geod.__new__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Geod.__new__-expanded"><a name="L589"></a><tt class="py-lineno">589</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L590"></a><tt class="py-lineno">590</tt>  <tt class="py-line"><tt class="py-docstring">        initialize a Geod class instance.</tt> </tt>
+<a name="L591"></a><tt class="py-lineno">591</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L592"></a><tt class="py-lineno">592</tt>  <tt class="py-line"><tt class="py-docstring">        Geodetic parameters for specifying the ellipsoid</tt> </tt>
+<a name="L593"></a><tt class="py-lineno">593</tt>  <tt class="py-line"><tt class="py-docstring">        can be given in a dictionary 'initparams', as keyword arguments,</tt> </tt>
+<a name="L594"></a><tt class="py-lineno">594</tt>  <tt class="py-line"><tt class="py-docstring">        or as as proj4 geod initialization string.</tt> </tt>
+<a name="L595"></a><tt class="py-lineno">595</tt>  <tt class="py-line"><tt class="py-docstring">        Following is a list of the ellipsoids that may be defined using the</tt> </tt>
+<a name="L596"></a><tt class="py-lineno">596</tt>  <tt class="py-line"><tt class="py-docstring">        'ellps' keyword (these are stored in the model variable pj_ellps)::</tt> </tt>
+<a name="L597"></a><tt class="py-lineno">597</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L598"></a><tt class="py-lineno">598</tt>  <tt class="py-line"><tt class="py-docstring">           MERIT a=6378137.0      rf=298.257       MERIT 1983</tt> </tt>
+<a name="L599"></a><tt class="py-lineno">599</tt>  <tt class="py-line"><tt class="py-docstring">           SGS85 a=6378136.0      rf=298.257       Soviet Geodetic System 85</tt> </tt>
+<a name="L600"></a><tt class="py-lineno">600</tt>  <tt class="py-line"><tt class="py-docstring">           GRS80 a=6378137.0      rf=298.257222101 GRS 1980(IUGG, 1980)</tt> </tt>
+<a name="L601"></a><tt class="py-lineno">601</tt>  <tt class="py-line"><tt class="py-docstring">           IAU76 a=6378140.0      rf=298.257       IAU 1976</tt> </tt>
+<a name="L602"></a><tt class="py-lineno">602</tt>  <tt class="py-line"><tt class="py-docstring">           airy a=6377563.396     b=6356256.910    Airy 1830</tt> </tt>
+<a name="L603"></a><tt class="py-lineno">603</tt>  <tt class="py-line"><tt class="py-docstring">           APL4.9 a=6378137.0.    rf=298.25        Appl. Physics. 1965</tt> </tt>
+<a name="L604"></a><tt class="py-lineno">604</tt>  <tt class="py-line"><tt class="py-docstring">           airy a=6377563.396     b=6356256.910    Airy 1830</tt> </tt>
+<a name="L605"></a><tt class="py-lineno">605</tt>  <tt class="py-line"><tt class="py-docstring">           APL4.9 a=6378137.0.    rf=298.25        Appl. Physics. 1965</tt> </tt>
+<a name="L606"></a><tt class="py-lineno">606</tt>  <tt class="py-line"><tt class="py-docstring">           NWL9D a=6378145.0.     rf=298.25        Naval Weapons Lab., 1965</tt> </tt>
+<a name="L607"></a><tt class="py-lineno">607</tt>  <tt class="py-line"><tt class="py-docstring">           mod_airy a=6377340.189 b=6356034.446    Modified Airy</tt> </tt>
+<a name="L608"></a><tt class="py-lineno">608</tt>  <tt class="py-line"><tt class="py-docstring">           andrae a=6377104.43    rf=300.0         Andrae 1876 (Den., Iclnd.)</tt> </tt>
+<a name="L609"></a><tt class="py-lineno">609</tt>  <tt class="py-line"><tt class="py-docstring">           aust_SA a=6378160.0    rf=298.25        Australian Natl & S. Amer. 1969</tt> </tt>
+<a name="L610"></a><tt class="py-lineno">610</tt>  <tt class="py-line"><tt class="py-docstring">           GRS67 a=6378160.0      rf=298.247167427 GRS 67(IUGG 1967)</tt> </tt>
+<a name="L611"></a><tt class="py-lineno">611</tt>  <tt class="py-line"><tt class="py-docstring">           bessel a=6377397.155   rf=299.1528128   Bessel 1841</tt> </tt>
+<a name="L612"></a><tt class="py-lineno">612</tt>  <tt class="py-line"><tt class="py-docstring">           bess_nam a=6377483.865 rf=299.1528128   Bessel 1841 (Namibia)</tt> </tt>
+<a name="L613"></a><tt class="py-lineno">613</tt>  <tt class="py-line"><tt class="py-docstring">           clrk66 a=6378206.4     b=6356583.8      Clarke 1866</tt> </tt>
+<a name="L614"></a><tt class="py-lineno">614</tt>  <tt class="py-line"><tt class="py-docstring">           clrk80 a=6378249.145   rf=293.4663      Clarke 1880 mod.</tt> </tt>
+<a name="L615"></a><tt class="py-lineno">615</tt>  <tt class="py-line"><tt class="py-docstring">           CPM a=6375738.7        rf=334.29        Comm. des Poids et Mesures 1799</tt> </tt>
+<a name="L616"></a><tt class="py-lineno">616</tt>  <tt class="py-line"><tt class="py-docstring">           delmbr a=6376428.      rf=311.5         Delambre 1810 (Belgium)</tt> </tt>
+<a name="L617"></a><tt class="py-lineno">617</tt>  <tt class="py-line"><tt class="py-docstring">           engelis a=6378136.05   rf=298.2566      Engelis 1985</tt> </tt>
+<a name="L618"></a><tt class="py-lineno">618</tt>  <tt class="py-line"><tt class="py-docstring">           evrst30 a=6377276.345  rf=300.8017      Everest 1830</tt> </tt>
+<a name="L619"></a><tt class="py-lineno">619</tt>  <tt class="py-line"><tt class="py-docstring">           evrst48 a=6377304.063  rf=300.8017      Everest 1948</tt> </tt>
+<a name="L620"></a><tt class="py-lineno">620</tt>  <tt class="py-line"><tt class="py-docstring">           evrst56 a=6377301.243  rf=300.8017      Everest 1956</tt> </tt>
+<a name="L621"></a><tt class="py-lineno">621</tt>  <tt class="py-line"><tt class="py-docstring">           evrst69 a=6377295.664  rf=300.8017      Everest 1969</tt> </tt>
+<a name="L622"></a><tt class="py-lineno">622</tt>  <tt class="py-line"><tt class="py-docstring">           evrstSS a=6377298.556  rf=300.8017      Everest (Sabah & Sarawak)</tt> </tt>
+<a name="L623"></a><tt class="py-lineno">623</tt>  <tt class="py-line"><tt class="py-docstring">           fschr60 a=6378166.     rf=298.3         Fischer (Mercury Datum) 1960</tt> </tt>
+<a name="L624"></a><tt class="py-lineno">624</tt>  <tt class="py-line"><tt class="py-docstring">           fschr60m a=6378155.    rf=298.3         Modified Fischer 1960</tt> </tt>
+<a name="L625"></a><tt class="py-lineno">625</tt>  <tt class="py-line"><tt class="py-docstring">           fschr68 a=6378150.     rf=298.3         Fischer 1968</tt> </tt>
+<a name="L626"></a><tt class="py-lineno">626</tt>  <tt class="py-line"><tt class="py-docstring">           helmert a=6378200.     rf=298.3         Helmert 1906</tt> </tt>
+<a name="L627"></a><tt class="py-lineno">627</tt>  <tt class="py-line"><tt class="py-docstring">           hough a=6378270.0      rf=297.          Hough</tt> </tt>
+<a name="L628"></a><tt class="py-lineno">628</tt>  <tt class="py-line"><tt class="py-docstring">           helmert a=6378200.     rf=298.3         Helmert 1906</tt> </tt>
+<a name="L629"></a><tt class="py-lineno">629</tt>  <tt class="py-line"><tt class="py-docstring">           hough a=6378270.0      rf=297.          Hough</tt> </tt>
+<a name="L630"></a><tt class="py-lineno">630</tt>  <tt class="py-line"><tt class="py-docstring">           intl a=6378388.0       rf=297.          International 1909 (Hayford)</tt> </tt>
+<a name="L631"></a><tt class="py-lineno">631</tt>  <tt class="py-line"><tt class="py-docstring">           krass a=6378245.0      rf=298.3         Krassovsky, 1942</tt> </tt>
+<a name="L632"></a><tt class="py-lineno">632</tt>  <tt class="py-line"><tt class="py-docstring">           kaula a=6378163.       rf=298.24        Kaula 1961</tt> </tt>
+<a name="L633"></a><tt class="py-lineno">633</tt>  <tt class="py-line"><tt class="py-docstring">           lerch a=6378139.       rf=298.257       Lerch 1979</tt> </tt>
+<a name="L634"></a><tt class="py-lineno">634</tt>  <tt class="py-line"><tt class="py-docstring">           mprts a=6397300.       rf=191.          Maupertius 1738</tt> </tt>
+<a name="L635"></a><tt class="py-lineno">635</tt>  <tt class="py-line"><tt class="py-docstring">           new_intl a=6378157.5   b=6356772.2      New International 1967</tt> </tt>
+<a name="L636"></a><tt class="py-lineno">636</tt>  <tt class="py-line"><tt class="py-docstring">           plessis a=6376523.     b=6355863.       Plessis 1817 (France)</tt> </tt>
+<a name="L637"></a><tt class="py-lineno">637</tt>  <tt class="py-line"><tt class="py-docstring">           SEasia a=6378155.0     b=6356773.3205   Southeast Asia</tt> </tt>
+<a name="L638"></a><tt class="py-lineno">638</tt>  <tt class="py-line"><tt class="py-docstring">           walbeck a=6376896.0    b=6355834.8467   Walbeck</tt> </tt>
+<a name="L639"></a><tt class="py-lineno">639</tt>  <tt class="py-line"><tt class="py-docstring">           WGS60 a=6378165.0      rf=298.3         WGS 60</tt> </tt>
+<a name="L640"></a><tt class="py-lineno">640</tt>  <tt class="py-line"><tt class="py-docstring">           WGS66 a=6378145.0      rf=298.25        WGS 66</tt> </tt>
+<a name="L641"></a><tt class="py-lineno">641</tt>  <tt class="py-line"><tt class="py-docstring">           WGS72 a=6378135.0      rf=298.26        WGS 72</tt> </tt>
+<a name="L642"></a><tt class="py-lineno">642</tt>  <tt class="py-line"><tt class="py-docstring">           WGS84 a=6378137.0      rf=298.257223563 WGS 84</tt> </tt>
+<a name="L643"></a><tt class="py-lineno">643</tt>  <tt class="py-line"><tt class="py-docstring">           sphere a=6370997.0     b=6370997.0      Normal Sphere (r=6370997)</tt> </tt>
+<a name="L644"></a><tt class="py-lineno">644</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L645"></a><tt class="py-lineno">645</tt>  <tt class="py-line"><tt class="py-docstring">        The parameters of the ellipsoid may also be set directly using</tt> </tt>
+<a name="L646"></a><tt class="py-lineno">646</tt>  <tt class="py-line"><tt class="py-docstring">        the 'a' (semi-major or equatorial axis radius) keyword, and</tt> </tt>
+<a name="L647"></a><tt class="py-lineno">647</tt>  <tt class="py-line"><tt class="py-docstring">        any one of the following keywords: 'b' (semi-minor,</tt> </tt>
+<a name="L648"></a><tt class="py-lineno">648</tt>  <tt class="py-line"><tt class="py-docstring">        or polar axis radius), 'e' (eccentricity), 'es' (eccentricity</tt> </tt>
+<a name="L649"></a><tt class="py-lineno">649</tt>  <tt class="py-line"><tt class="py-docstring">        squared), 'f' (flattening), or 'rf' (reciprocal flattening).</tt> </tt>
+<a name="L650"></a><tt class="py-lineno">650</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L651"></a><tt class="py-lineno">651</tt>  <tt class="py-line"><tt class="py-docstring">        See the proj documentation (http://trac.osgeo.org/proj/) for more</tt> </tt>
 <a name="L652"></a><tt class="py-lineno">652</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L653"></a><tt class="py-lineno">653</tt>  <tt class="py-line"><tt class="py-docstring">        Example usage:</tt> </tt>
-<a name="L654"></a><tt class="py-lineno">654</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L655"></a><tt class="py-lineno">655</tt>  <tt class="py-line"><tt class="py-docstring">        >>> from pyproj import Geod</tt> </tt>
-<a name="L656"></a><tt class="py-lineno">656</tt>  <tt class="py-line"><tt class="py-docstring">        >>> g = Geod(ellps='clrk66') # Use Clarke 1966 ellipsoid.</tt> </tt>
-<a name="L657"></a><tt class="py-lineno">657</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # specify the lat/lons of some cities.</tt> </tt>
-<a name="L658"></a><tt class="py-lineno">658</tt>  <tt class="py-line"><tt class="py-docstring">        >>> boston_lat = 42.+(15./60.); boston_lon = -71.-(7./60.)</tt> </tt>
-<a name="L659"></a><tt class="py-lineno">659</tt>  <tt class="py-line"><tt class="py-docstring">        >>> portland_lat = 45.+(31./60.); portland_lon = -123.-(41./60.)</tt> </tt>
-<a name="L660"></a><tt class="py-lineno">660</tt>  <tt class="py-line"><tt class="py-docstring">        >>> newyork_lat = 40.+(47./60.); newyork_lon = -73.-(58./60.)</tt> </tt>
-<a name="L661"></a><tt class="py-lineno">661</tt>  <tt class="py-line"><tt class="py-docstring">        >>> london_lat = 51.+(32./60.); london_lon = -(5./60.)</tt> </tt>
-<a name="L662"></a><tt class="py-lineno">662</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # compute forward and back azimuths, plus distance</tt> </tt>
-<a name="L663"></a><tt class="py-lineno">663</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # between Boston and Portland.</tt> </tt>
-<a name="L664"></a><tt class="py-lineno">664</tt>  <tt class="py-line"><tt class="py-docstring">        >>> az12,az21,dist = g.inv(boston_lon,boston_lat,portland_lon,portland_lat)</tt> </tt>
-<a name="L665"></a><tt class="py-lineno">665</tt>  <tt class="py-line"><tt class="py-docstring">        >>> "%7.3f %6.3f %12.3f" % (az12,az21,dist)</tt> </tt>
-<a name="L666"></a><tt class="py-lineno">666</tt>  <tt class="py-line"><tt class="py-docstring">        '-66.531 75.654  4164192.708'</tt> </tt>
-<a name="L667"></a><tt class="py-lineno">667</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # compute latitude, longitude and back azimuth of Portland,</tt> </tt>
-<a name="L668"></a><tt class="py-lineno">668</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # given Boston lat/lon, forward azimuth and distance to Portland.</tt> </tt>
-<a name="L669"></a><tt class="py-lineno">669</tt>  <tt class="py-line"><tt class="py-docstring">        >>> endlon, endlat, backaz = g.fwd(boston_lon, boston_lat, az12, dist)</tt> </tt>
-<a name="L670"></a><tt class="py-lineno">670</tt>  <tt class="py-line"><tt class="py-docstring">        >>> "%6.3f  %6.3f %13.3f" % (endlat,endlon,backaz)</tt> </tt>
-<a name="L671"></a><tt class="py-lineno">671</tt>  <tt class="py-line"><tt class="py-docstring">        '45.517  -123.683        75.654'</tt> </tt>
-<a name="L672"></a><tt class="py-lineno">672</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # compute the azimuths, distances from New York to several</tt> </tt>
-<a name="L673"></a><tt class="py-lineno">673</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # cities (pass a list)</tt> </tt>
-<a name="L674"></a><tt class="py-lineno">674</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lons1 = 3*[newyork_lon]; lats1 = 3*[newyork_lat]</tt> </tt>
-<a name="L675"></a><tt class="py-lineno">675</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lons2 = [boston_lon, portland_lon, london_lon]</tt> </tt>
-<a name="L676"></a><tt class="py-lineno">676</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lats2 = [boston_lat, portland_lat, london_lat]</tt> </tt>
-<a name="L677"></a><tt class="py-lineno">677</tt>  <tt class="py-line"><tt class="py-docstring">        >>> az12,az21,dist = g.inv(lons1,lats1,lons2,lats2)</tt> </tt>
-<a name="L678"></a><tt class="py-lineno">678</tt>  <tt class="py-line"><tt class="py-docstring">        >>> for faz,baz,d in list(zip(az12,az21,dist)): "%7.3f %7.3f %9.3f" % (faz,baz,d)</tt> </tt>
-<a name="L679"></a><tt class="py-lineno">679</tt>  <tt class="py-line"><tt class="py-docstring">        ' 54.663 -123.448 288303.720'</tt> </tt>
-<a name="L680"></a><tt class="py-lineno">680</tt>  <tt class="py-line"><tt class="py-docstring">        '-65.463  79.342 4013037.318'</tt> </tt>
-<a name="L681"></a><tt class="py-lineno">681</tt>  <tt class="py-line"><tt class="py-docstring">        ' 51.254 -71.576 5579916.651'</tt> </tt>
-<a name="L682"></a><tt class="py-lineno">682</tt>  <tt class="py-line"><tt class="py-docstring">        >>> g2 = Geod('+ellps=clrk66') # use proj4 style initialization string</tt> </tt>
-<a name="L683"></a><tt class="py-lineno">683</tt>  <tt class="py-line"><tt class="py-docstring">        >>> az12,az21,dist = g2.inv(boston_lon,boston_lat,portland_lon,portland_lat)</tt> </tt>
-<a name="L684"></a><tt class="py-lineno">684</tt>  <tt class="py-line"><tt class="py-docstring">        >>> "%7.3f %6.3f %12.3f" % (az12,az21,dist)</tt> </tt>
-<a name="L685"></a><tt class="py-lineno">685</tt>  <tt class="py-line"><tt class="py-docstring">        '-66.531 75.654  4164192.708'</tt> </tt>
-<a name="L686"></a><tt class="py-lineno">686</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L687"></a><tt class="py-lineno">687</tt>  <tt class="py-line">        <tt class="py-comment"># if initparams is a proj-type init string,</tt> </tt>
-<a name="L688"></a><tt class="py-lineno">688</tt>  <tt class="py-line">        <tt class="py-comment"># convert to dict.</tt> </tt>
-<a name="L689"></a><tt class="py-lineno">689</tt>  <tt class="py-line">        <tt class="py-name">ellpsd</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
-<a name="L690"></a><tt class="py-lineno">690</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">initstring</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
-<a name="L691"></a><tt class="py-lineno">691</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">kvpair</tt> <tt class="py-keyword">in</tt> <tt class="py-name">initstring</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L692"></a><tt class="py-lineno">692</tt>  <tt class="py-line">                <tt class="py-name">k</tt><tt class="py-op">,</tt><tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">kvpair</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt> </tt>
-<a name="L693"></a><tt class="py-lineno">693</tt>  <tt class="py-line">                <tt class="py-name">k</tt> <tt class="py-op">=</tt> <tt class="py-name">k</tt><tt class="py-op">.</tt><tt class="py-name">lstrip</tt><tt class="py-op">(</tt><tt class="py-string">'+'</tt><tt class="py-op">)</tt> </tt>
-<a name="L694"></a><tt class="py-lineno">694</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">k</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'a'</tt><tt class="py-op">,</tt><tt class="py-string">'b'</tt><tt class="py-op">,</tt><tt class="py-string">'rf'</tt><tt class="py-op">,</tt><tt class="py-string">'f'</tt><tt class="py-op">,</tt><tt class="py-string">'es'</tt><tt class="py-op">,</tt><tt class="py-string [...]
-<a name="L695"></a><tt class="py-lineno">695</tt>  <tt class="py-line">                    <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> </tt>
-<a name="L696"></a><tt class="py-lineno">696</tt>  <tt class="py-line">                <tt class="py-name">ellpsd</tt><tt class="py-op">[</tt><tt class="py-name">k</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt> </tt>
-<a name="L697"></a><tt class="py-lineno">697</tt>  <tt class="py-line">        <tt class="py-comment"># merge this dict with kwargs dict.</tt> </tt>
-<a name="L698"></a><tt class="py-lineno">698</tt>  <tt class="py-line">        <tt class="py-name">kwargs</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">items</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py- [...]
-<a name="L699"></a><tt class="py-lineno">699</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sphere</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
-<a name="L700"></a><tt class="py-lineno">700</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'ellps'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
-<a name="L701"></a><tt class="py-lineno">701</tt>  <tt class="py-line">            <tt class="py-comment"># ellipse name given, look up in pj_ellps dict</tt> </tt>
-<a name="L702"></a><tt class="py-lineno">702</tt>  <tt class="py-line">            <tt class="py-name">ellps_dict</tt> <tt class="py-op">=</tt> <tt id="link-14" class="py-name"><a title="pyproj.pj_ellps" class="py-name" href="#" onclick="return doclink('link-14', 'pj_ellps', 'link-4');">pj_ellps</a></tt><tt class="py-op">[</tt><tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'ellps'</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> </tt>
-<a name="L703"></a><tt class="py-lineno">703</tt>  <tt class="py-line">            <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">[</tt><tt class="py-string">'a'</tt><tt class="py-op">]</tt> </tt>
-<a name="L704"></a><tt class="py-lineno">704</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">[</tt><tt class="py-string">'description'</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-string">'Normal Sphere'</tt><tt class="py-op">:</tt> </tt>
-<a name="L705"></a><tt class="py-lineno">705</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sphere</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
-<a name="L706"></a><tt class="py-lineno">706</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'b'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">:</tt> </tt>
-<a name="L707"></a><tt class="py-lineno">707</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">[</tt><tt class="py-string">'b'</tt><tt class="py-op">]</tt> </tt>
-<a name="L708"></a><tt class="py-lineno">708</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">b</tt> <tt class="py-op">*</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt> <tt class="py-op">/</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">*</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
-<a name="L709"></a><tt class="py-lineno">709</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">-</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">a</tt> </tt>
-<a name="L710"></a><tt class="py-lineno">710</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'rf'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">:</tt> </tt>
-<a name="L711"></a><tt class="py-lineno">711</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt><tt class="py-op">/</tt><tt class="py-name">ellps_dict</tt><tt class="py-op">[</tt><tt class="py-string">'rf'</tt><tt class="py-op">]</tt> </tt>
-<a name="L712"></a><tt class="py-lineno">712</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
+<a name="L653"></a><tt class="py-lineno">653</tt>  <tt class="py-line"><tt class="py-docstring">        See the proj documentation (http://trac.osgeo.org/proj/) for more</tt> </tt>
+<a name="L654"></a><tt class="py-lineno">654</tt>  <tt class="py-line"><tt class="py-docstring">        information about specifying ellipsoid parameters (specifically,</tt> </tt>
+<a name="L655"></a><tt class="py-lineno">655</tt>  <tt class="py-line"><tt class="py-docstring">        the chapter 'Specifying the Earth's figure' in the main Proj</tt> </tt>
+<a name="L656"></a><tt class="py-lineno">656</tt>  <tt class="py-line"><tt class="py-docstring">        users manual).</tt> </tt>
+<a name="L657"></a><tt class="py-lineno">657</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L658"></a><tt class="py-lineno">658</tt>  <tt class="py-line"><tt class="py-docstring">        Example usage:</tt> </tt>
+<a name="L659"></a><tt class="py-lineno">659</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L660"></a><tt class="py-lineno">660</tt>  <tt class="py-line"><tt class="py-docstring">        >>> from pyproj import Geod</tt> </tt>
+<a name="L661"></a><tt class="py-lineno">661</tt>  <tt class="py-line"><tt class="py-docstring">        >>> g = Geod(ellps='clrk66') # Use Clarke 1966 ellipsoid.</tt> </tt>
+<a name="L662"></a><tt class="py-lineno">662</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # specify the lat/lons of some cities.</tt> </tt>
+<a name="L663"></a><tt class="py-lineno">663</tt>  <tt class="py-line"><tt class="py-docstring">        >>> boston_lat = 42.+(15./60.); boston_lon = -71.-(7./60.)</tt> </tt>
+<a name="L664"></a><tt class="py-lineno">664</tt>  <tt class="py-line"><tt class="py-docstring">        >>> portland_lat = 45.+(31./60.); portland_lon = -123.-(41./60.)</tt> </tt>
+<a name="L665"></a><tt class="py-lineno">665</tt>  <tt class="py-line"><tt class="py-docstring">        >>> newyork_lat = 40.+(47./60.); newyork_lon = -73.-(58./60.)</tt> </tt>
+<a name="L666"></a><tt class="py-lineno">666</tt>  <tt class="py-line"><tt class="py-docstring">        >>> london_lat = 51.+(32./60.); london_lon = -(5./60.)</tt> </tt>
+<a name="L667"></a><tt class="py-lineno">667</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # compute forward and back azimuths, plus distance</tt> </tt>
+<a name="L668"></a><tt class="py-lineno">668</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # between Boston and Portland.</tt> </tt>
+<a name="L669"></a><tt class="py-lineno">669</tt>  <tt class="py-line"><tt class="py-docstring">        >>> az12,az21,dist = g.inv(boston_lon,boston_lat,portland_lon,portland_lat)</tt> </tt>
+<a name="L670"></a><tt class="py-lineno">670</tt>  <tt class="py-line"><tt class="py-docstring">        >>> "%7.3f %6.3f %12.3f" % (az12,az21,dist)</tt> </tt>
+<a name="L671"></a><tt class="py-lineno">671</tt>  <tt class="py-line"><tt class="py-docstring">        '-66.531 75.654  4164192.708'</tt> </tt>
+<a name="L672"></a><tt class="py-lineno">672</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # compute latitude, longitude and back azimuth of Portland,</tt> </tt>
+<a name="L673"></a><tt class="py-lineno">673</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # given Boston lat/lon, forward azimuth and distance to Portland.</tt> </tt>
+<a name="L674"></a><tt class="py-lineno">674</tt>  <tt class="py-line"><tt class="py-docstring">        >>> endlon, endlat, backaz = g.fwd(boston_lon, boston_lat, az12, dist)</tt> </tt>
+<a name="L675"></a><tt class="py-lineno">675</tt>  <tt class="py-line"><tt class="py-docstring">        >>> "%6.3f  %6.3f %13.3f" % (endlat,endlon,backaz)</tt> </tt>
+<a name="L676"></a><tt class="py-lineno">676</tt>  <tt class="py-line"><tt class="py-docstring">        '45.517  -123.683        75.654'</tt> </tt>
+<a name="L677"></a><tt class="py-lineno">677</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # compute the azimuths, distances from New York to several</tt> </tt>
+<a name="L678"></a><tt class="py-lineno">678</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # cities (pass a list)</tt> </tt>
+<a name="L679"></a><tt class="py-lineno">679</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lons1 = 3*[newyork_lon]; lats1 = 3*[newyork_lat]</tt> </tt>
+<a name="L680"></a><tt class="py-lineno">680</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lons2 = [boston_lon, portland_lon, london_lon]</tt> </tt>
+<a name="L681"></a><tt class="py-lineno">681</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lats2 = [boston_lat, portland_lat, london_lat]</tt> </tt>
+<a name="L682"></a><tt class="py-lineno">682</tt>  <tt class="py-line"><tt class="py-docstring">        >>> az12,az21,dist = g.inv(lons1,lats1,lons2,lats2)</tt> </tt>
+<a name="L683"></a><tt class="py-lineno">683</tt>  <tt class="py-line"><tt class="py-docstring">        >>> for faz,baz,d in list(zip(az12,az21,dist)): "%7.3f %7.3f %9.3f" % (faz,baz,d)</tt> </tt>
+<a name="L684"></a><tt class="py-lineno">684</tt>  <tt class="py-line"><tt class="py-docstring">        ' 54.663 -123.448 288303.720'</tt> </tt>
+<a name="L685"></a><tt class="py-lineno">685</tt>  <tt class="py-line"><tt class="py-docstring">        '-65.463  79.342 4013037.318'</tt> </tt>
+<a name="L686"></a><tt class="py-lineno">686</tt>  <tt class="py-line"><tt class="py-docstring">        ' 51.254 -71.576 5579916.651'</tt> </tt>
+<a name="L687"></a><tt class="py-lineno">687</tt>  <tt class="py-line"><tt class="py-docstring">        >>> g2 = Geod('+ellps=clrk66') # use proj4 style initialization string</tt> </tt>
+<a name="L688"></a><tt class="py-lineno">688</tt>  <tt class="py-line"><tt class="py-docstring">        >>> az12,az21,dist = g2.inv(boston_lon,boston_lat,portland_lon,portland_lat)</tt> </tt>
+<a name="L689"></a><tt class="py-lineno">689</tt>  <tt class="py-line"><tt class="py-docstring">        >>> "%7.3f %6.3f %12.3f" % (az12,az21,dist)</tt> </tt>
+<a name="L690"></a><tt class="py-lineno">690</tt>  <tt class="py-line"><tt class="py-docstring">        '-66.531 75.654  4164192.708'</tt> </tt>
+<a name="L691"></a><tt class="py-lineno">691</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L692"></a><tt class="py-lineno">692</tt>  <tt class="py-line">        <tt class="py-comment"># if initparams is a proj-type init string,</tt> </tt>
+<a name="L693"></a><tt class="py-lineno">693</tt>  <tt class="py-line">        <tt class="py-comment"># convert to dict.</tt> </tt>
+<a name="L694"></a><tt class="py-lineno">694</tt>  <tt class="py-line">        <tt class="py-name">ellpsd</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
+<a name="L695"></a><tt class="py-lineno">695</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">initstring</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
+<a name="L696"></a><tt class="py-lineno">696</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">kvpair</tt> <tt class="py-keyword">in</tt> <tt class="py-name">initstring</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L697"></a><tt class="py-lineno">697</tt>  <tt class="py-line">                <tt class="py-name">k</tt><tt class="py-op">,</tt><tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">kvpair</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">'='</tt><tt class="py-op">)</tt> </tt>
+<a name="L698"></a><tt class="py-lineno">698</tt>  <tt class="py-line">                <tt class="py-name">k</tt> <tt class="py-op">=</tt> <tt class="py-name">k</tt><tt class="py-op">.</tt><tt class="py-name">lstrip</tt><tt class="py-op">(</tt><tt class="py-string">'+'</tt><tt class="py-op">)</tt> </tt>
+<a name="L699"></a><tt class="py-lineno">699</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">k</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-string">'a'</tt><tt class="py-op">,</tt><tt class="py-string">'b'</tt><tt class="py-op">,</tt><tt class="py-string">'rf'</tt><tt class="py-op">,</tt><tt class="py-string">'f'</tt><tt class="py-op">,</tt><tt class="py-string">'es'</tt><tt class="py-op">,</tt><tt class="py-string [...]
+<a name="L700"></a><tt class="py-lineno">700</tt>  <tt class="py-line">                    <tt class="py-name">v</tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">v</tt><tt class="py-op">)</tt> </tt>
+<a name="L701"></a><tt class="py-lineno">701</tt>  <tt class="py-line">                <tt class="py-name">ellpsd</tt><tt class="py-op">[</tt><tt class="py-name">k</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">v</tt> </tt>
+<a name="L702"></a><tt class="py-lineno">702</tt>  <tt class="py-line">        <tt class="py-comment"># merge this dict with kwargs dict.</tt> </tt>
+<a name="L703"></a><tt class="py-lineno">703</tt>  <tt class="py-line">        <tt class="py-name">kwargs</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">items</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py- [...]
+<a name="L704"></a><tt class="py-lineno">704</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sphere</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
+<a name="L705"></a><tt class="py-lineno">705</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'ellps'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
+<a name="L706"></a><tt class="py-lineno">706</tt>  <tt class="py-line">            <tt class="py-comment"># ellipse name given, look up in pj_ellps dict</tt> </tt>
+<a name="L707"></a><tt class="py-lineno">707</tt>  <tt class="py-line">            <tt class="py-name">ellps_dict</tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name"><a title="pyproj.pj_ellps" class="py-name" href="#" onclick="return doclink('link-16', 'pj_ellps', 'link-4');">pj_ellps</a></tt><tt class="py-op">[</tt><tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'ellps'</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> </tt>
+<a name="L708"></a><tt class="py-lineno">708</tt>  <tt class="py-line">            <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">[</tt><tt class="py-string">'a'</tt><tt class="py-op">]</tt> </tt>
+<a name="L709"></a><tt class="py-lineno">709</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">[</tt><tt class="py-string">'description'</tt><tt class="py-op">]</tt><tt class="py-op">==</tt><tt class="py-string">'Normal Sphere'</tt><tt class="py-op">:</tt> </tt>
+<a name="L710"></a><tt class="py-lineno">710</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sphere</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
+<a name="L711"></a><tt class="py-lineno">711</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'b'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">:</tt> </tt>
+<a name="L712"></a><tt class="py-lineno">712</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">[</tt><tt class="py-string">'b'</tt><tt class="py-op">]</tt> </tt>
 <a name="L713"></a><tt class="py-lineno">713</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">b</tt> <tt class="py-op">*</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt> <tt class="py-op">/</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">*</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
-<a name="L714"></a><tt class="py-lineno">714</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L715"></a><tt class="py-lineno">715</tt>  <tt class="py-line">            <tt class="py-comment"># a (semi-major axis) and one of</tt> </tt>
-<a name="L716"></a><tt class="py-lineno">716</tt>  <tt class="py-line">            <tt class="py-comment"># b the semi-minor axis</tt> </tt>
-<a name="L717"></a><tt class="py-lineno">717</tt>  <tt class="py-line">            <tt class="py-comment"># rf the reciprocal flattening</tt> </tt>
-<a name="L718"></a><tt class="py-lineno">718</tt>  <tt class="py-line">            <tt class="py-comment"># f flattening</tt> </tt>
-<a name="L719"></a><tt class="py-lineno">719</tt>  <tt class="py-line">            <tt class="py-comment"># es eccentricity squared</tt> </tt>
-<a name="L720"></a><tt class="py-lineno">720</tt>  <tt class="py-line">            <tt class="py-comment"># must be given.</tt> </tt>
-<a name="L721"></a><tt class="py-lineno">721</tt>  <tt class="py-line">            <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'a'</tt><tt class="py-op">]</tt> </tt>
-<a name="L722"></a><tt class="py-lineno">722</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'b'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
-<a name="L723"></a><tt class="py-lineno">723</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'b'</tt><tt class="py-op">]</tt> </tt>
-<a name="L724"></a><tt class="py-lineno">724</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">b</tt> <tt class="py-op">*</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt> <tt class="py-op">/</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">*</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
-<a name="L725"></a><tt class="py-lineno">725</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">-</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">a</tt> </tt>
-<a name="L726"></a><tt class="py-lineno">726</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'rf'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
-<a name="L727"></a><tt class="py-lineno">727</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt><tt class="py-op">/</tt><tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'rf'</tt><tt class="py-op">]</tt> </tt>
-<a name="L728"></a><tt class="py-lineno">728</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
+<a name="L714"></a><tt class="py-lineno">714</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">-</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">a</tt> </tt>
+<a name="L715"></a><tt class="py-lineno">715</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'rf'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">ellps_dict</tt><tt class="py-op">:</tt> </tt>
+<a name="L716"></a><tt class="py-lineno">716</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt><tt class="py-op">/</tt><tt class="py-name">ellps_dict</tt><tt class="py-op">[</tt><tt class="py-string">'rf'</tt><tt class="py-op">]</tt> </tt>
+<a name="L717"></a><tt class="py-lineno">717</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
+<a name="L718"></a><tt class="py-lineno">718</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">b</tt> <tt class="py-op">*</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt> <tt class="py-op">/</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">*</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
+<a name="L719"></a><tt class="py-lineno">719</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L720"></a><tt class="py-lineno">720</tt>  <tt class="py-line">            <tt class="py-comment"># a (semi-major axis) and one of</tt> </tt>
+<a name="L721"></a><tt class="py-lineno">721</tt>  <tt class="py-line">            <tt class="py-comment"># b the semi-minor axis</tt> </tt>
+<a name="L722"></a><tt class="py-lineno">722</tt>  <tt class="py-line">            <tt class="py-comment"># rf the reciprocal flattening</tt> </tt>
+<a name="L723"></a><tt class="py-lineno">723</tt>  <tt class="py-line">            <tt class="py-comment"># f flattening</tt> </tt>
+<a name="L724"></a><tt class="py-lineno">724</tt>  <tt class="py-line">            <tt class="py-comment"># es eccentricity squared</tt> </tt>
+<a name="L725"></a><tt class="py-lineno">725</tt>  <tt class="py-line">            <tt class="py-comment"># must be given.</tt> </tt>
+<a name="L726"></a><tt class="py-lineno">726</tt>  <tt class="py-line">            <tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'a'</tt><tt class="py-op">]</tt> </tt>
+<a name="L727"></a><tt class="py-lineno">727</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-string">'b'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
+<a name="L728"></a><tt class="py-lineno">728</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'b'</tt><tt class="py-op">]</tt> </tt>
 <a name="L729"></a><tt class="py-lineno">729</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">b</tt> <tt class="py-op">*</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt> <tt class="py-op">/</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">*</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
-<a name="L730"></a><tt class="py-lineno">730</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'f'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
-<a name="L731"></a><tt class="py-lineno">731</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'f'</tt><tt class="py-op">]</tt> </tt>
-<a name="L732"></a><tt class="py-lineno">732</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
-<a name="L733"></a><tt class="py-lineno">733</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">/</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">**</tt><tt class="py-number">2</tt> </tt>
-<a name="L734"></a><tt class="py-lineno">734</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'es'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
-<a name="L735"></a><tt class="py-lineno">735</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'es'</tt><tt class="py-op">]</tt> </tt>
-<a name="L736"></a><tt class="py-lineno">736</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">sqrt</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">**</tt><tt class="py-number">2</tt> <tt class="py-op">-</tt> <tt class="py-name">es</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">**</tt><tt class="py-number">2</tt><tt class="p [...]
-<a name="L737"></a><tt class="py-lineno">737</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">-</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">a</tt> </tt>
-<a name="L738"></a><tt class="py-lineno">738</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'e'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
-<a name="L739"></a><tt class="py-lineno">739</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'e'</tt><tt class="py-op">]</tt><tt class="py-op">**</tt><tt class="py-number">2</tt> </tt>
-<a name="L740"></a><tt class="py-lineno">740</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">sqrt</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">**</tt><tt class="py-number">2</tt> <tt class="py-op">-</tt> <tt class="py-name">es</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">**</tt><tt class="py-number">2</tt><tt class="p [...]
-<a name="L741"></a><tt class="py-lineno">741</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">-</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">a</tt> </tt>
-<a name="L742"></a><tt class="py-lineno">742</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L743"></a><tt class="py-lineno">743</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt> </tt>
-<a name="L744"></a><tt class="py-lineno">744</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-number">0.</tt> </tt>
-<a name="L745"></a><tt class="py-lineno">745</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">0.</tt> </tt>
-<a name="L746"></a><tt class="py-lineno">746</tt>  <tt class="py-line">                <tt class="py-comment">#msg='ellipse name or a, plus one of f,es,b must be given'</tt> </tt>
-<a name="L747"></a><tt class="py-lineno">747</tt>  <tt class="py-line">                <tt class="py-comment">#raise ValueError(msg)</tt> </tt>
-<a name="L748"></a><tt class="py-lineno">748</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">fabs</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-op"><</tt> <tt class="py-number">1.e-8</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sphere</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
-<a name="L749"></a><tt class="py-lineno">749</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt> </tt>
-<a name="L750"></a><tt class="py-lineno">750</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">b</tt> </tt>
-<a name="L751"></a><tt class="py-lineno">751</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
-<a name="L752"></a><tt class="py-lineno">752</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-name">es</tt> </tt>
-<a name="L753"></a><tt class="py-lineno">753</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Class pyproj.Geod=pyproj.Geod-class.html"><a title="pyproj.Geod" class="py-name" href="#" onclick="return doclink('link-15', 'Geod', 'link-15');">Geod</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="pyproj.Geod.__new__
-pyproj.Proj.__new__" class="py-name" href="#" onclick="return doclink('link-16', '__new__', 'link-7');">__new__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L754"></a><tt class="py-lineno">754</tt>  <tt class="py-line"> </tt>
-<a name="Geod.fwd"></a><div id="Geod.fwd-def"><a name="L755"></a><tt class="py-lineno">755</tt> <a class="py-toggle" href="#" id="Geod.fwd-toggle" onclick="return toggle('Geod.fwd');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Geod-class.html#fwd">fwd</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">lons</tt><tt class="py-op">,</tt> <tt class="py-param">lats</tt><tt class="py-op">, [...]
-</div><div id="Geod.fwd-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Geod.fwd-expanded"><a name="L756"></a><tt class="py-lineno">756</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L757"></a><tt class="py-lineno">757</tt>  <tt class="py-line"><tt class="py-docstring">        forward transformation - Returns longitudes, latitudes and back</tt> </tt>
-<a name="L758"></a><tt class="py-lineno">758</tt>  <tt class="py-line"><tt class="py-docstring">        azimuths of terminus points given longitudes (lons) and</tt> </tt>
-<a name="L759"></a><tt class="py-lineno">759</tt>  <tt class="py-line"><tt class="py-docstring">        latitudes (lats) of initial points, plus forward azimuths (az)</tt> </tt>
-<a name="L760"></a><tt class="py-lineno">760</tt>  <tt class="py-line"><tt class="py-docstring">        and distances (dist).</tt> </tt>
-<a name="L761"></a><tt class="py-lineno">761</tt>  <tt class="py-line"><tt class="py-docstring">        latitudes (lats) of initial points, plus forward azimuths (az)</tt> </tt>
-<a name="L762"></a><tt class="py-lineno">762</tt>  <tt class="py-line"><tt class="py-docstring">        and distances (dist).</tt> </tt>
-<a name="L763"></a><tt class="py-lineno">763</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L764"></a><tt class="py-lineno">764</tt>  <tt class="py-line"><tt class="py-docstring">        Works with numpy and regular python array objects, python</tt> </tt>
-<a name="L765"></a><tt class="py-lineno">765</tt>  <tt class="py-line"><tt class="py-docstring">        sequences and scalars.</tt> </tt>
-<a name="L766"></a><tt class="py-lineno">766</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L767"></a><tt class="py-lineno">767</tt>  <tt class="py-line"><tt class="py-docstring">        if radians=True, lons/lats and azimuths are radians instead of</tt> </tt>
-<a name="L768"></a><tt class="py-lineno">768</tt>  <tt class="py-line"><tt class="py-docstring">        degrees. Distances are in meters.</tt> </tt>
-<a name="L769"></a><tt class="py-lineno">769</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L770"></a><tt class="py-lineno">770</tt>  <tt class="py-line">        <tt class="py-comment"># process inputs, making copies that support buffer API.</tt> </tt>
-<a name="L771"></a><tt class="py-lineno">771</tt>  <tt class="py-line">        <tt class="py-name">inx</tt><tt class="py-op">,</tt> <tt class="py-name">xisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">xislist</tt><tt class="py-op">,</tt> <tt class="py-name">xistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lons</tt><tt class="py-op">)</tt> </tt>
-<a name="L772"></a><tt class="py-lineno">772</tt>  <tt class="py-line">        <tt class="py-name">iny</tt><tt class="py-op">,</tt> <tt class="py-name">yisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">yislist</tt><tt class="py-op">,</tt> <tt class="py-name">yistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lats</tt><tt class="py-op">)</tt> </tt>
-<a name="L773"></a><tt class="py-lineno">773</tt>  <tt class="py-line">        <tt class="py-name">inz</tt><tt class="py-op">,</tt> <tt class="py-name">zisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">zislist</tt><tt class="py-op">,</tt> <tt class="py-name">zistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">az</tt><tt class="py-op">)</tt> </tt>
-<a name="L774"></a><tt class="py-lineno">774</tt>  <tt class="py-line">        <tt class="py-name">ind</tt><tt class="py-op">,</tt> <tt class="py-name">disfloat</tt><tt class="py-op">,</tt> <tt class="py-name">dislist</tt><tt class="py-op">,</tt> <tt class="py-name">distuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">dist</tt><tt class="py-op">)</tt> </tt>
-<a name="L775"></a><tt class="py-lineno">775</tt>  <tt class="py-line">        <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="pyproj.Geod" class="py-name" href="#" onclick="return doclink('link-17', 'Geod', 'link-15');">Geod</a></tt><tt class="py-op">.</tt><tt class="py-name">_fwd</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">inx</tt><tt class="py-op">,</tt> <tt class="py-name">iny</ [...]
-<a name="L776"></a><tt class="py-lineno">776</tt>  <tt class="py-line">        <tt class="py-comment"># if inputs were lists, tuples or floats, convert back.</tt> </tt>
-<a name="L777"></a><tt class="py-lineno">777</tt>  <tt class="py-line">        <tt class="py-name">outx</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">xisfloat</tt><tt class="py-op">,</tt><tt class="py-name">xislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">)</tt> </tt>
-<a name="L778"></a><tt class="py-lineno">778</tt>  <tt class="py-line">        <tt class="py-name">outy</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">yisfloat</tt><tt class="py-op">,</tt><tt class="py-name">yislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt><tt class="py-op">)</tt> </tt>
-<a name="L779"></a><tt class="py-lineno">779</tt>  <tt class="py-line">        <tt class="py-name">outz</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">zisfloat</tt><tt class="py-op">,</tt><tt class="py-name">zislist</tt><tt class="py-op">,</tt><tt class="py-name">zistuple</tt><tt class="py-op">,</tt><tt class="py-name">inz</tt><tt class="py-op">)</tt> </tt>
-<a name="L780"></a><tt class="py-lineno">780</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outx</tt><tt class="py-op">,</tt> <tt class="py-name">outy</tt><tt class="py-op">,</tt> <tt class="py-name">outz</tt> </tt>
-</div><a name="L781"></a><tt class="py-lineno">781</tt>  <tt class="py-line"> </tt>
-<a name="Geod.inv"></a><div id="Geod.inv-def"><a name="L782"></a><tt class="py-lineno">782</tt> <a class="py-toggle" href="#" id="Geod.inv-toggle" onclick="return toggle('Geod.inv');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Geod-class.html#inv">inv</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">lons1</tt><tt class="py-op">,</tt><tt class="py-param">lats1</tt><tt class="py-op">, [...]
-</div><div id="Geod.inv-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Geod.inv-expanded"><a name="L783"></a><tt class="py-lineno">783</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L784"></a><tt class="py-lineno">784</tt>  <tt class="py-line"><tt class="py-docstring">        inverse transformation - Returns forward and back azimuths, plus</tt> </tt>
-<a name="L785"></a><tt class="py-lineno">785</tt>  <tt class="py-line"><tt class="py-docstring">        distances between initial points (specified by lons1, lats1) and</tt> </tt>
-<a name="L786"></a><tt class="py-lineno">786</tt>  <tt class="py-line"><tt class="py-docstring">        terminus points (specified by lons2, lats2).</tt> </tt>
-<a name="L787"></a><tt class="py-lineno">787</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L788"></a><tt class="py-lineno">788</tt>  <tt class="py-line"><tt class="py-docstring">        Works with numpy and regular python array objects, python</tt> </tt>
-<a name="L789"></a><tt class="py-lineno">789</tt>  <tt class="py-line"><tt class="py-docstring">        sequences and scalars.</tt> </tt>
-<a name="L790"></a><tt class="py-lineno">790</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L791"></a><tt class="py-lineno">791</tt>  <tt class="py-line"><tt class="py-docstring">        if radians=True, lons/lats and azimuths are radians instead of</tt> </tt>
-<a name="L792"></a><tt class="py-lineno">792</tt>  <tt class="py-line"><tt class="py-docstring">        degrees. Distances are in meters.</tt> </tt>
-<a name="L793"></a><tt class="py-lineno">793</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L794"></a><tt class="py-lineno">794</tt>  <tt class="py-line">        <tt class="py-comment"># process inputs, making copies that support buffer API.</tt> </tt>
-<a name="L795"></a><tt class="py-lineno">795</tt>  <tt class="py-line">        <tt class="py-name">inx</tt><tt class="py-op">,</tt> <tt class="py-name">xisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">xislist</tt><tt class="py-op">,</tt> <tt class="py-name">xistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lons1</tt><tt class="py-op">)</tt> </tt>
-<a name="L796"></a><tt class="py-lineno">796</tt>  <tt class="py-line">        <tt class="py-name">iny</tt><tt class="py-op">,</tt> <tt class="py-name">yisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">yislist</tt><tt class="py-op">,</tt> <tt class="py-name">yistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lats1</tt><tt class="py-op">)</tt> </tt>
-<a name="L797"></a><tt class="py-lineno">797</tt>  <tt class="py-line">        <tt class="py-name">inz</tt><tt class="py-op">,</tt> <tt class="py-name">zisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">zislist</tt><tt class="py-op">,</tt> <tt class="py-name">zistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lons2</tt><tt class="py-op">)</tt> </tt>
-<a name="L798"></a><tt class="py-lineno">798</tt>  <tt class="py-line">        <tt class="py-name">ind</tt><tt class="py-op">,</tt> <tt class="py-name">disfloat</tt><tt class="py-op">,</tt> <tt class="py-name">dislist</tt><tt class="py-op">,</tt> <tt class="py-name">distuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lats2</tt><tt class="py-op">)</tt> </tt>
-<a name="L799"></a><tt class="py-lineno">799</tt>  <tt class="py-line">        <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="pyproj.Geod" class="py-name" href="#" onclick="return doclink('link-18', 'Geod', 'link-15');">Geod</a></tt><tt class="py-op">.</tt><tt class="py-name">_inv</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt [...]
-<a name="L800"></a><tt class="py-lineno">800</tt>  <tt class="py-line">        <tt class="py-comment"># if inputs were lists, tuples or floats, convert back.</tt> </tt>
-<a name="L801"></a><tt class="py-lineno">801</tt>  <tt class="py-line">        <tt class="py-name">outx</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">xisfloat</tt><tt class="py-op">,</tt><tt class="py-name">xislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">)</tt> </tt>
-<a name="L802"></a><tt class="py-lineno">802</tt>  <tt class="py-line">        <tt class="py-name">outy</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">yisfloat</tt><tt class="py-op">,</tt><tt class="py-name">yislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt><tt class="py-op">)</tt> </tt>
-<a name="L803"></a><tt class="py-lineno">803</tt>  <tt class="py-line">        <tt class="py-name">outz</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">zisfloat</tt><tt class="py-op">,</tt><tt class="py-name">zislist</tt><tt class="py-op">,</tt><tt class="py-name">zistuple</tt><tt class="py-op">,</tt><tt class="py-name">inz</tt><tt class="py-op">)</tt> </tt>
-<a name="L804"></a><tt class="py-lineno">804</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outx</tt><tt class="py-op">,</tt> <tt class="py-name">outy</tt><tt class="py-op">,</tt> <tt class="py-name">outz</tt> </tt>
-</div><a name="L805"></a><tt class="py-lineno">805</tt>  <tt class="py-line"> </tt>
-<a name="Geod.npts"></a><div id="Geod.npts-def"><a name="L806"></a><tt class="py-lineno">806</tt> <a class="py-toggle" href="#" id="Geod.npts-toggle" onclick="return toggle('Geod.npts');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Geod-class.html#npts">npts</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">lon1</tt><tt class="py-op">,</tt> <tt class="py-param">lat1</tt><tt class="py [...]
-</div><div id="Geod.npts-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Geod.npts-expanded"><a name="L807"></a><tt class="py-lineno">807</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L808"></a><tt class="py-lineno">808</tt>  <tt class="py-line"><tt class="py-docstring">        Given a single initial point and terminus point (specified by</tt> </tt>
-<a name="L809"></a><tt class="py-lineno">809</tt>  <tt class="py-line"><tt class="py-docstring">        python floats lon1,lat1 and lon2,lat2), returns a list of</tt> </tt>
-<a name="L810"></a><tt class="py-lineno">810</tt>  <tt class="py-line"><tt class="py-docstring">        longitude/latitude pairs describing npts equally spaced</tt> </tt>
-<a name="L811"></a><tt class="py-lineno">811</tt>  <tt class="py-line"><tt class="py-docstring">        intermediate points along the geodesic between the initial and</tt> </tt>
-<a name="L812"></a><tt class="py-lineno">812</tt>  <tt class="py-line"><tt class="py-docstring">        terminus points.</tt> </tt>
-<a name="L813"></a><tt class="py-lineno">813</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L814"></a><tt class="py-lineno">814</tt>  <tt class="py-line"><tt class="py-docstring">        if radians=True, lons/lats are radians instead of degrees.</tt> </tt>
-<a name="L815"></a><tt class="py-lineno">815</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L816"></a><tt class="py-lineno">816</tt>  <tt class="py-line"><tt class="py-docstring">        Example usage:</tt> </tt>
-<a name="L817"></a><tt class="py-lineno">817</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L818"></a><tt class="py-lineno">818</tt>  <tt class="py-line"><tt class="py-docstring">        >>> from pyproj import Geod</tt> </tt>
-<a name="L819"></a><tt class="py-lineno">819</tt>  <tt class="py-line"><tt class="py-docstring">        >>> g = Geod(ellps='clrk66') # Use Clarke 1966 ellipsoid.</tt> </tt>
-<a name="L820"></a><tt class="py-lineno">820</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # specify the lat/lons of Boston and Portland.</tt> </tt>
-<a name="L821"></a><tt class="py-lineno">821</tt>  <tt class="py-line"><tt class="py-docstring">        >>> g = Geod(ellps='clrk66') # Use Clarke 1966 ellipsoid.</tt> </tt>
-<a name="L822"></a><tt class="py-lineno">822</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # specify the lat/lons of Boston and Portland.</tt> </tt>
-<a name="L823"></a><tt class="py-lineno">823</tt>  <tt class="py-line"><tt class="py-docstring">        >>> boston_lat = 42.+(15./60.); boston_lon = -71.-(7./60.)</tt> </tt>
-<a name="L824"></a><tt class="py-lineno">824</tt>  <tt class="py-line"><tt class="py-docstring">        >>> portland_lat = 45.+(31./60.); portland_lon = -123.-(41./60.)</tt> </tt>
-<a name="L825"></a><tt class="py-lineno">825</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # find ten equally spaced points between Boston and Portland.</tt> </tt>
-<a name="L826"></a><tt class="py-lineno">826</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lonlats = g.npts(boston_lon,boston_lat,portland_lon,portland_lat,10)</tt> </tt>
-<a name="L827"></a><tt class="py-lineno">827</tt>  <tt class="py-line"><tt class="py-docstring">        >>> for lon,lat in lonlats: '%6.3f  %7.3f' % (lat, lon)</tt> </tt>
-<a name="L828"></a><tt class="py-lineno">828</tt>  <tt class="py-line"><tt class="py-docstring">        '43.528  -75.414'</tt> </tt>
-<a name="L829"></a><tt class="py-lineno">829</tt>  <tt class="py-line"><tt class="py-docstring">        '44.637  -79.883'</tt> </tt>
-<a name="L830"></a><tt class="py-lineno">830</tt>  <tt class="py-line"><tt class="py-docstring">        '45.565  -84.512'</tt> </tt>
-<a name="L831"></a><tt class="py-lineno">831</tt>  <tt class="py-line"><tt class="py-docstring">        '46.299  -89.279'</tt> </tt>
-<a name="L832"></a><tt class="py-lineno">832</tt>  <tt class="py-line"><tt class="py-docstring">        '46.830  -94.156'</tt> </tt>
-<a name="L833"></a><tt class="py-lineno">833</tt>  <tt class="py-line"><tt class="py-docstring">        '47.149  -99.112'</tt> </tt>
-<a name="L834"></a><tt class="py-lineno">834</tt>  <tt class="py-line"><tt class="py-docstring">        '47.251  -104.106'</tt> </tt>
-<a name="L835"></a><tt class="py-lineno">835</tt>  <tt class="py-line"><tt class="py-docstring">        '47.136  -109.100'</tt> </tt>
-<a name="L836"></a><tt class="py-lineno">836</tt>  <tt class="py-line"><tt class="py-docstring">        '46.805  -114.051'</tt> </tt>
-<a name="L837"></a><tt class="py-lineno">837</tt>  <tt class="py-line"><tt class="py-docstring">        '46.262  -118.924'</tt> </tt>
-<a name="L838"></a><tt class="py-lineno">838</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # test with radians=True (inputs/outputs in radians, not degrees)</tt> </tt>
-<a name="L839"></a><tt class="py-lineno">839</tt>  <tt class="py-line"><tt class="py-docstring">        >>> import math</tt> </tt>
-<a name="L840"></a><tt class="py-lineno">840</tt>  <tt class="py-line"><tt class="py-docstring">        >>> dg2rad = math.radians(1.)</tt> </tt>
-<a name="L841"></a><tt class="py-lineno">841</tt>  <tt class="py-line"><tt class="py-docstring">        >>> rad2dg = math.degrees(1.)</tt> </tt>
-<a name="L842"></a><tt class="py-lineno">842</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lonlats = g.npts(dg2rad*boston_lon,dg2rad*boston_lat,dg2rad*portland_lon,dg2rad*portland_lat,10,radians=True)</tt> </tt>
-<a name="L843"></a><tt class="py-lineno">843</tt>  <tt class="py-line"><tt class="py-docstring">        >>> for lon,lat in lonlats: '%6.3f  %7.3f' % (rad2dg*lat, rad2dg*lon)</tt> </tt>
-<a name="L844"></a><tt class="py-lineno">844</tt>  <tt class="py-line"><tt class="py-docstring">        '43.528  -75.414'</tt> </tt>
-<a name="L845"></a><tt class="py-lineno">845</tt>  <tt class="py-line"><tt class="py-docstring">        '44.637  -79.883'</tt> </tt>
-<a name="L846"></a><tt class="py-lineno">846</tt>  <tt class="py-line"><tt class="py-docstring">        '45.565  -84.512'</tt> </tt>
-<a name="L847"></a><tt class="py-lineno">847</tt>  <tt class="py-line"><tt class="py-docstring">        '46.299  -89.279'</tt> </tt>
-<a name="L848"></a><tt class="py-lineno">848</tt>  <tt class="py-line"><tt class="py-docstring">        '46.830  -94.156'</tt> </tt>
-<a name="L849"></a><tt class="py-lineno">849</tt>  <tt class="py-line"><tt class="py-docstring">        '47.149  -99.112'</tt> </tt>
-<a name="L850"></a><tt class="py-lineno">850</tt>  <tt class="py-line"><tt class="py-docstring">        '47.251  -104.106'</tt> </tt>
-<a name="L851"></a><tt class="py-lineno">851</tt>  <tt class="py-line"><tt class="py-docstring">        '47.136  -109.100'</tt> </tt>
-<a name="L852"></a><tt class="py-lineno">852</tt>  <tt class="py-line"><tt class="py-docstring">        '46.805  -114.051'</tt> </tt>
-<a name="L853"></a><tt class="py-lineno">853</tt>  <tt class="py-line"><tt class="py-docstring">        '46.262  -118.924'</tt> </tt>
-<a name="L854"></a><tt class="py-lineno">854</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L855"></a><tt class="py-lineno">855</tt>  <tt class="py-line">        <tt class="py-name">lons</tt><tt class="py-op">,</tt> <tt class="py-name">lats</tt> <tt class="py-op">=</tt> <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="pyproj.Geod" class="py-name" href="#" onclick="return doclink('link-19', 'Geod', 'link-15');">Geod</a></tt><tt class="py-op">.</tt><tt class="py-name">_npts</tt><tt class="py-op">(</tt><tt class="py-name">se [...]
-<a name="L856"></a><tt class="py-lineno">856</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">zip</tt><tt class="py-op">(</tt><tt class="py-name">lons</tt><tt class="py-op">,</tt> <tt class="py-name">lats</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div></div><a name="L857"></a><tt class="py-lineno">857</tt>  <tt class="py-line"> </tt>
-<a name="test"></a><div id="test-def"><a name="L858"></a><tt class="py-lineno">858</tt> <a class="py-toggle" href="#" id="test-toggle" onclick="return toggle('test');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#test">test</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="test-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="test-expanded"><a name="L859"></a><tt class="py-lineno">859</tt>  <tt class="py-line">    <tt class="py-docstring">"""run the examples in the docstrings using the doctest module"""</tt> </tt>
-<a name="L860"></a><tt class="py-lineno">860</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt><tt class="py-op">,</tt> <tt id="link-21" class="py-name"><a title="pyproj" class="py-name" href="#" onclick="return doclink('link-21', 'pyproj', 'link-0');">pyproj</a></tt> </tt>
-<a name="L861"></a><tt class="py-lineno">861</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt id="link-22" class="py-name"><a title="pyproj" class="py-name" href="#" onclick="return doclink('link-22', 'pyproj', 'link-0');">pyproj</a></tt><tt class="py-op">,</tt><tt class="py-name">verbose</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L862"></a><tt class="py-lineno">862</tt>  <tt class="py-line"> </tt>
-<a name="L863"></a><tt class="py-lineno">863</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">"__main__"</tt><tt class="py-op">:</tt> <tt id="link-23" class="py-name" targets="Function pyproj.test()=pyproj-module.html#test"><a title="pyproj.test" class="py-name" href="#" onclick="return doclink('link-23', 'test', 'link-23');">test</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L864"></a><tt class="py-lineno">864</tt>  <tt class="py-line"> </tt><script type="text/javascript">
+<a name="L730"></a><tt class="py-lineno">730</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">-</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">a</tt> </tt>
+<a name="L731"></a><tt class="py-lineno">731</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'rf'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
+<a name="L732"></a><tt class="py-lineno">732</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt><tt class="py-op">/</tt><tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'rf'</tt><tt class="py-op">]</tt> </tt>
+<a name="L733"></a><tt class="py-lineno">733</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
+<a name="L734"></a><tt class="py-lineno">734</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">b</tt> <tt class="py-op">*</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt> <tt class="py-op">/</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">*</tt> <tt class="py-name">a</tt><tt class="py-op">)</tt> </tt>
+<a name="L735"></a><tt class="py-lineno">735</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'f'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
+<a name="L736"></a><tt class="py-lineno">736</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'f'</tt><tt class="py-op">]</tt> </tt>
+<a name="L737"></a><tt class="py-lineno">737</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt><tt class="py-op">*</tt><tt class="py-op">(</tt><tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
+<a name="L738"></a><tt class="py-lineno">738</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">1.</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">b</tt><tt class="py-op">/</tt><tt class="py-name">a</tt><tt class="py-op">)</tt><tt class="py-op">**</tt><tt class="py-number">2</tt> </tt>
+<a name="L739"></a><tt class="py-lineno">739</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'es'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
+<a name="L740"></a><tt class="py-lineno">740</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'es'</tt><tt class="py-op">]</tt> </tt>
+<a name="L741"></a><tt class="py-lineno">741</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">sqrt</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">**</tt><tt class="py-number">2</tt> <tt class="py-op">-</tt> <tt class="py-name">es</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">**</tt><tt class="py-number">2</tt><tt class="p [...]
+<a name="L742"></a><tt class="py-lineno">742</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">-</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">a</tt> </tt>
+<a name="L743"></a><tt class="py-lineno">743</tt>  <tt class="py-line">            <tt class="py-keyword">elif</tt> <tt class="py-string">'e'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">kwargs</tt><tt class="py-op">:</tt> </tt>
+<a name="L744"></a><tt class="py-lineno">744</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">[</tt><tt class="py-string">'e'</tt><tt class="py-op">]</tt><tt class="py-op">**</tt><tt class="py-number">2</tt> </tt>
+<a name="L745"></a><tt class="py-lineno">745</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">sqrt</tt><tt class="py-op">(</tt><tt class="py-name">a</tt><tt class="py-op">**</tt><tt class="py-number">2</tt> <tt class="py-op">-</tt> <tt class="py-name">es</tt><tt class="py-op">*</tt><tt class="py-name">a</tt><tt class="py-op">**</tt><tt class="py-number">2</tt><tt class="p [...]
+<a name="L746"></a><tt class="py-lineno">746</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">a</tt> <tt class="py-op">-</tt> <tt class="py-name">b</tt><tt class="py-op">)</tt><tt class="py-op">/</tt><tt class="py-name">a</tt> </tt>
+<a name="L747"></a><tt class="py-lineno">747</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L748"></a><tt class="py-lineno">748</tt>  <tt class="py-line">                <tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt> </tt>
+<a name="L749"></a><tt class="py-lineno">749</tt>  <tt class="py-line">                <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-number">0.</tt> </tt>
+<a name="L750"></a><tt class="py-lineno">750</tt>  <tt class="py-line">                <tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-number">0.</tt> </tt>
+<a name="L751"></a><tt class="py-lineno">751</tt>  <tt class="py-line">                <tt class="py-comment">#msg='ellipse name or a, plus one of f,es,b must be given'</tt> </tt>
+<a name="L752"></a><tt class="py-lineno">752</tt>  <tt class="py-line">                <tt class="py-comment">#raise ValueError(msg)</tt> </tt>
+<a name="L753"></a><tt class="py-lineno">753</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">fabs</tt><tt class="py-op">(</tt><tt class="py-name">f</tt><tt class="py-op">)</tt> <tt class="py-op"><</tt> <tt class="py-number">1.e-8</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sphere</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
+<a name="L754"></a><tt class="py-lineno">754</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">a</tt> <tt class="py-op">=</tt> <tt class="py-name">a</tt> </tt>
+<a name="L755"></a><tt class="py-lineno">755</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">b</tt> <tt class="py-op">=</tt> <tt class="py-name">b</tt> </tt>
+<a name="L756"></a><tt class="py-lineno">756</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt> </tt>
+<a name="L757"></a><tt class="py-lineno">757</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">es</tt> <tt class="py-op">=</tt> <tt class="py-name">es</tt> </tt>
+<a name="L758"></a><tt class="py-lineno">758</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Class pyproj.Geod=pyproj.Geod-class.html"><a title="pyproj.Geod" class="py-name" href="#" onclick="return doclink('link-17', 'Geod', 'link-17');">Geod</a></tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="pyproj.Geod.__new__
+pyproj.Proj.__new__" class="py-name" href="#" onclick="return doclink('link-18', '__new__', 'link-7');">__new__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">a</tt><tt class="py-op">,</tt> <tt class="py-name">f</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L759"></a><tt class="py-lineno">759</tt>  <tt class="py-line"> </tt>
+<a name="Geod.fwd"></a><div id="Geod.fwd-def"><a name="L760"></a><tt class="py-lineno">760</tt> <a class="py-toggle" href="#" id="Geod.fwd-toggle" onclick="return toggle('Geod.fwd');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Geod-class.html#fwd">fwd</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">lons</tt><tt class="py-op">,</tt> <tt class="py-param">lats</tt><tt class="py-op">, [...]
+</div><div id="Geod.fwd-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Geod.fwd-expanded"><a name="L761"></a><tt class="py-lineno">761</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L762"></a><tt class="py-lineno">762</tt>  <tt class="py-line"><tt class="py-docstring">        forward transformation - Returns longitudes, latitudes and back</tt> </tt>
+<a name="L763"></a><tt class="py-lineno">763</tt>  <tt class="py-line"><tt class="py-docstring">        azimuths of terminus points given longitudes (lons) and</tt> </tt>
+<a name="L764"></a><tt class="py-lineno">764</tt>  <tt class="py-line"><tt class="py-docstring">        latitudes (lats) of initial points, plus forward azimuths (az)</tt> </tt>
+<a name="L765"></a><tt class="py-lineno">765</tt>  <tt class="py-line"><tt class="py-docstring">        and distances (dist).</tt> </tt>
+<a name="L766"></a><tt class="py-lineno">766</tt>  <tt class="py-line"><tt class="py-docstring">        latitudes (lats) of initial points, plus forward azimuths (az)</tt> </tt>
+<a name="L767"></a><tt class="py-lineno">767</tt>  <tt class="py-line"><tt class="py-docstring">        and distances (dist).</tt> </tt>
+<a name="L768"></a><tt class="py-lineno">768</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L769"></a><tt class="py-lineno">769</tt>  <tt class="py-line"><tt class="py-docstring">        Works with numpy and regular python array objects, python</tt> </tt>
+<a name="L770"></a><tt class="py-lineno">770</tt>  <tt class="py-line"><tt class="py-docstring">        sequences and scalars.</tt> </tt>
+<a name="L771"></a><tt class="py-lineno">771</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L772"></a><tt class="py-lineno">772</tt>  <tt class="py-line"><tt class="py-docstring">        if radians=True, lons/lats and azimuths are radians instead of</tt> </tt>
+<a name="L773"></a><tt class="py-lineno">773</tt>  <tt class="py-line"><tt class="py-docstring">        degrees. Distances are in meters.</tt> </tt>
+<a name="L774"></a><tt class="py-lineno">774</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L775"></a><tt class="py-lineno">775</tt>  <tt class="py-line">        <tt class="py-comment"># process inputs, making copies that support buffer API.</tt> </tt>
+<a name="L776"></a><tt class="py-lineno">776</tt>  <tt class="py-line">        <tt class="py-name">inx</tt><tt class="py-op">,</tt> <tt class="py-name">xisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">xislist</tt><tt class="py-op">,</tt> <tt class="py-name">xistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lons</tt><tt class="py-op">)</tt> </tt>
+<a name="L777"></a><tt class="py-lineno">777</tt>  <tt class="py-line">        <tt class="py-name">iny</tt><tt class="py-op">,</tt> <tt class="py-name">yisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">yislist</tt><tt class="py-op">,</tt> <tt class="py-name">yistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lats</tt><tt class="py-op">)</tt> </tt>
+<a name="L778"></a><tt class="py-lineno">778</tt>  <tt class="py-line">        <tt class="py-name">inz</tt><tt class="py-op">,</tt> <tt class="py-name">zisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">zislist</tt><tt class="py-op">,</tt> <tt class="py-name">zistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">az</tt><tt class="py-op">)</tt> </tt>
+<a name="L779"></a><tt class="py-lineno">779</tt>  <tt class="py-line">        <tt class="py-name">ind</tt><tt class="py-op">,</tt> <tt class="py-name">disfloat</tt><tt class="py-op">,</tt> <tt class="py-name">dislist</tt><tt class="py-op">,</tt> <tt class="py-name">distuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">dist</tt><tt class="py-op">)</tt> </tt>
+<a name="L780"></a><tt class="py-lineno">780</tt>  <tt class="py-line">        <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="pyproj.Geod" class="py-name" href="#" onclick="return doclink('link-19', 'Geod', 'link-17');">Geod</a></tt><tt class="py-op">.</tt><tt class="py-name">_fwd</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">inx</tt><tt class="py-op">,</tt> <tt class="py-name">iny</ [...]
+<a name="L781"></a><tt class="py-lineno">781</tt>  <tt class="py-line">        <tt class="py-comment"># if inputs were lists, tuples or floats, convert back.</tt> </tt>
+<a name="L782"></a><tt class="py-lineno">782</tt>  <tt class="py-line">        <tt class="py-name">outx</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">xisfloat</tt><tt class="py-op">,</tt><tt class="py-name">xislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">)</tt> </tt>
+<a name="L783"></a><tt class="py-lineno">783</tt>  <tt class="py-line">        <tt class="py-name">outy</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">yisfloat</tt><tt class="py-op">,</tt><tt class="py-name">yislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt><tt class="py-op">)</tt> </tt>
+<a name="L784"></a><tt class="py-lineno">784</tt>  <tt class="py-line">        <tt class="py-name">outz</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">zisfloat</tt><tt class="py-op">,</tt><tt class="py-name">zislist</tt><tt class="py-op">,</tt><tt class="py-name">zistuple</tt><tt class="py-op">,</tt><tt class="py-name">inz</tt><tt class="py-op">)</tt> </tt>
+<a name="L785"></a><tt class="py-lineno">785</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outx</tt><tt class="py-op">,</tt> <tt class="py-name">outy</tt><tt class="py-op">,</tt> <tt class="py-name">outz</tt> </tt>
+</div><a name="L786"></a><tt class="py-lineno">786</tt>  <tt class="py-line"> </tt>
+<a name="Geod.inv"></a><div id="Geod.inv-def"><a name="L787"></a><tt class="py-lineno">787</tt> <a class="py-toggle" href="#" id="Geod.inv-toggle" onclick="return toggle('Geod.inv');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Geod-class.html#inv">inv</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">lons1</tt><tt class="py-op">,</tt><tt class="py-param">lats1</tt><tt class="py-op">, [...]
+</div><div id="Geod.inv-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Geod.inv-expanded"><a name="L788"></a><tt class="py-lineno">788</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L789"></a><tt class="py-lineno">789</tt>  <tt class="py-line"><tt class="py-docstring">        inverse transformation - Returns forward and back azimuths, plus</tt> </tt>
+<a name="L790"></a><tt class="py-lineno">790</tt>  <tt class="py-line"><tt class="py-docstring">        distances between initial points (specified by lons1, lats1) and</tt> </tt>
+<a name="L791"></a><tt class="py-lineno">791</tt>  <tt class="py-line"><tt class="py-docstring">        terminus points (specified by lons2, lats2).</tt> </tt>
+<a name="L792"></a><tt class="py-lineno">792</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L793"></a><tt class="py-lineno">793</tt>  <tt class="py-line"><tt class="py-docstring">        Works with numpy and regular python array objects, python</tt> </tt>
+<a name="L794"></a><tt class="py-lineno">794</tt>  <tt class="py-line"><tt class="py-docstring">        sequences and scalars.</tt> </tt>
+<a name="L795"></a><tt class="py-lineno">795</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L796"></a><tt class="py-lineno">796</tt>  <tt class="py-line"><tt class="py-docstring">        if radians=True, lons/lats and azimuths are radians instead of</tt> </tt>
+<a name="L797"></a><tt class="py-lineno">797</tt>  <tt class="py-line"><tt class="py-docstring">        degrees. Distances are in meters.</tt> </tt>
+<a name="L798"></a><tt class="py-lineno">798</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L799"></a><tt class="py-lineno">799</tt>  <tt class="py-line">        <tt class="py-comment"># process inputs, making copies that support buffer API.</tt> </tt>
+<a name="L800"></a><tt class="py-lineno">800</tt>  <tt class="py-line">        <tt class="py-name">inx</tt><tt class="py-op">,</tt> <tt class="py-name">xisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">xislist</tt><tt class="py-op">,</tt> <tt class="py-name">xistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lons1</tt><tt class="py-op">)</tt> </tt>
+<a name="L801"></a><tt class="py-lineno">801</tt>  <tt class="py-line">        <tt class="py-name">iny</tt><tt class="py-op">,</tt> <tt class="py-name">yisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">yislist</tt><tt class="py-op">,</tt> <tt class="py-name">yistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lats1</tt><tt class="py-op">)</tt> </tt>
+<a name="L802"></a><tt class="py-lineno">802</tt>  <tt class="py-line">        <tt class="py-name">inz</tt><tt class="py-op">,</tt> <tt class="py-name">zisfloat</tt><tt class="py-op">,</tt> <tt class="py-name">zislist</tt><tt class="py-op">,</tt> <tt class="py-name">zistuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lons2</tt><tt class="py-op">)</tt> </tt>
+<a name="L803"></a><tt class="py-lineno">803</tt>  <tt class="py-line">        <tt class="py-name">ind</tt><tt class="py-op">,</tt> <tt class="py-name">disfloat</tt><tt class="py-op">,</tt> <tt class="py-name">dislist</tt><tt class="py-op">,</tt> <tt class="py-name">distuple</tt> <tt class="py-op">=</tt> <tt class="py-name">_copytobuffer</tt><tt class="py-op">(</tt><tt class="py-name">lats2</tt><tt class="py-op">)</tt> </tt>
+<a name="L804"></a><tt class="py-lineno">804</tt>  <tt class="py-line">        <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="pyproj.Geod" class="py-name" href="#" onclick="return doclink('link-20', 'Geod', 'link-17');">Geod</a></tt><tt class="py-op">.</tt><tt class="py-name">_inv</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt [...]
+<a name="L805"></a><tt class="py-lineno">805</tt>  <tt class="py-line">        <tt class="py-comment"># if inputs were lists, tuples or floats, convert back.</tt> </tt>
+<a name="L806"></a><tt class="py-lineno">806</tt>  <tt class="py-line">        <tt class="py-name">outx</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">xisfloat</tt><tt class="py-op">,</tt><tt class="py-name">xislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">inx</tt><tt class="py-op">)</tt> </tt>
+<a name="L807"></a><tt class="py-lineno">807</tt>  <tt class="py-line">        <tt class="py-name">outy</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">yisfloat</tt><tt class="py-op">,</tt><tt class="py-name">yislist</tt><tt class="py-op">,</tt><tt class="py-name">xistuple</tt><tt class="py-op">,</tt><tt class="py-name">iny</tt><tt class="py-op">)</tt> </tt>
+<a name="L808"></a><tt class="py-lineno">808</tt>  <tt class="py-line">        <tt class="py-name">outz</tt> <tt class="py-op">=</tt> <tt class="py-name">_convertback</tt><tt class="py-op">(</tt><tt class="py-name">zisfloat</tt><tt class="py-op">,</tt><tt class="py-name">zislist</tt><tt class="py-op">,</tt><tt class="py-name">zistuple</tt><tt class="py-op">,</tt><tt class="py-name">inz</tt><tt class="py-op">)</tt> </tt>
+<a name="L809"></a><tt class="py-lineno">809</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">outx</tt><tt class="py-op">,</tt> <tt class="py-name">outy</tt><tt class="py-op">,</tt> <tt class="py-name">outz</tt> </tt>
+</div><a name="L810"></a><tt class="py-lineno">810</tt>  <tt class="py-line"> </tt>
+<a name="Geod.npts"></a><div id="Geod.npts-def"><a name="L811"></a><tt class="py-lineno">811</tt> <a class="py-toggle" href="#" id="Geod.npts-toggle" onclick="return toggle('Geod.npts');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj.Geod-class.html#npts">npts</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">lon1</tt><tt class="py-op">,</tt> <tt class="py-param">lat1</tt><tt class="py [...]
+</div><div id="Geod.npts-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Geod.npts-expanded"><a name="L812"></a><tt class="py-lineno">812</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L813"></a><tt class="py-lineno">813</tt>  <tt class="py-line"><tt class="py-docstring">        Given a single initial point and terminus point (specified by</tt> </tt>
+<a name="L814"></a><tt class="py-lineno">814</tt>  <tt class="py-line"><tt class="py-docstring">        python floats lon1,lat1 and lon2,lat2), returns a list of</tt> </tt>
+<a name="L815"></a><tt class="py-lineno">815</tt>  <tt class="py-line"><tt class="py-docstring">        longitude/latitude pairs describing npts equally spaced</tt> </tt>
+<a name="L816"></a><tt class="py-lineno">816</tt>  <tt class="py-line"><tt class="py-docstring">        intermediate points along the geodesic between the initial and</tt> </tt>
+<a name="L817"></a><tt class="py-lineno">817</tt>  <tt class="py-line"><tt class="py-docstring">        terminus points.</tt> </tt>
+<a name="L818"></a><tt class="py-lineno">818</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L819"></a><tt class="py-lineno">819</tt>  <tt class="py-line"><tt class="py-docstring">        if radians=True, lons/lats are radians instead of degrees.</tt> </tt>
+<a name="L820"></a><tt class="py-lineno">820</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L821"></a><tt class="py-lineno">821</tt>  <tt class="py-line"><tt class="py-docstring">        Example usage:</tt> </tt>
+<a name="L822"></a><tt class="py-lineno">822</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L823"></a><tt class="py-lineno">823</tt>  <tt class="py-line"><tt class="py-docstring">        >>> from pyproj import Geod</tt> </tt>
+<a name="L824"></a><tt class="py-lineno">824</tt>  <tt class="py-line"><tt class="py-docstring">        >>> g = Geod(ellps='clrk66') # Use Clarke 1966 ellipsoid.</tt> </tt>
+<a name="L825"></a><tt class="py-lineno">825</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # specify the lat/lons of Boston and Portland.</tt> </tt>
+<a name="L826"></a><tt class="py-lineno">826</tt>  <tt class="py-line"><tt class="py-docstring">        >>> g = Geod(ellps='clrk66') # Use Clarke 1966 ellipsoid.</tt> </tt>
+<a name="L827"></a><tt class="py-lineno">827</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # specify the lat/lons of Boston and Portland.</tt> </tt>
+<a name="L828"></a><tt class="py-lineno">828</tt>  <tt class="py-line"><tt class="py-docstring">        >>> boston_lat = 42.+(15./60.); boston_lon = -71.-(7./60.)</tt> </tt>
+<a name="L829"></a><tt class="py-lineno">829</tt>  <tt class="py-line"><tt class="py-docstring">        >>> portland_lat = 45.+(31./60.); portland_lon = -123.-(41./60.)</tt> </tt>
+<a name="L830"></a><tt class="py-lineno">830</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # find ten equally spaced points between Boston and Portland.</tt> </tt>
+<a name="L831"></a><tt class="py-lineno">831</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lonlats = g.npts(boston_lon,boston_lat,portland_lon,portland_lat,10)</tt> </tt>
+<a name="L832"></a><tt class="py-lineno">832</tt>  <tt class="py-line"><tt class="py-docstring">        >>> for lon,lat in lonlats: '%6.3f  %7.3f' % (lat, lon)</tt> </tt>
+<a name="L833"></a><tt class="py-lineno">833</tt>  <tt class="py-line"><tt class="py-docstring">        '43.528  -75.414'</tt> </tt>
+<a name="L834"></a><tt class="py-lineno">834</tt>  <tt class="py-line"><tt class="py-docstring">        '44.637  -79.883'</tt> </tt>
+<a name="L835"></a><tt class="py-lineno">835</tt>  <tt class="py-line"><tt class="py-docstring">        '45.565  -84.512'</tt> </tt>
+<a name="L836"></a><tt class="py-lineno">836</tt>  <tt class="py-line"><tt class="py-docstring">        '46.299  -89.279'</tt> </tt>
+<a name="L837"></a><tt class="py-lineno">837</tt>  <tt class="py-line"><tt class="py-docstring">        '46.830  -94.156'</tt> </tt>
+<a name="L838"></a><tt class="py-lineno">838</tt>  <tt class="py-line"><tt class="py-docstring">        '47.149  -99.112'</tt> </tt>
+<a name="L839"></a><tt class="py-lineno">839</tt>  <tt class="py-line"><tt class="py-docstring">        '47.251  -104.106'</tt> </tt>
+<a name="L840"></a><tt class="py-lineno">840</tt>  <tt class="py-line"><tt class="py-docstring">        '47.136  -109.100'</tt> </tt>
+<a name="L841"></a><tt class="py-lineno">841</tt>  <tt class="py-line"><tt class="py-docstring">        '46.805  -114.051'</tt> </tt>
+<a name="L842"></a><tt class="py-lineno">842</tt>  <tt class="py-line"><tt class="py-docstring">        '46.262  -118.924'</tt> </tt>
+<a name="L843"></a><tt class="py-lineno">843</tt>  <tt class="py-line"><tt class="py-docstring">        >>> # test with radians=True (inputs/outputs in radians, not degrees)</tt> </tt>
+<a name="L844"></a><tt class="py-lineno">844</tt>  <tt class="py-line"><tt class="py-docstring">        >>> import math</tt> </tt>
+<a name="L845"></a><tt class="py-lineno">845</tt>  <tt class="py-line"><tt class="py-docstring">        >>> dg2rad = math.radians(1.)</tt> </tt>
+<a name="L846"></a><tt class="py-lineno">846</tt>  <tt class="py-line"><tt class="py-docstring">        >>> rad2dg = math.degrees(1.)</tt> </tt>
+<a name="L847"></a><tt class="py-lineno">847</tt>  <tt class="py-line"><tt class="py-docstring">        >>> lonlats = g.npts(dg2rad*boston_lon,dg2rad*boston_lat,dg2rad*portland_lon,dg2rad*portland_lat,10,radians=True)</tt> </tt>
+<a name="L848"></a><tt class="py-lineno">848</tt>  <tt class="py-line"><tt class="py-docstring">        >>> for lon,lat in lonlats: '%6.3f  %7.3f' % (rad2dg*lat, rad2dg*lon)</tt> </tt>
+<a name="L849"></a><tt class="py-lineno">849</tt>  <tt class="py-line"><tt class="py-docstring">        '43.528  -75.414'</tt> </tt>
+<a name="L850"></a><tt class="py-lineno">850</tt>  <tt class="py-line"><tt class="py-docstring">        '44.637  -79.883'</tt> </tt>
+<a name="L851"></a><tt class="py-lineno">851</tt>  <tt class="py-line"><tt class="py-docstring">        '45.565  -84.512'</tt> </tt>
+<a name="L852"></a><tt class="py-lineno">852</tt>  <tt class="py-line"><tt class="py-docstring">        '46.299  -89.279'</tt> </tt>
+<a name="L853"></a><tt class="py-lineno">853</tt>  <tt class="py-line"><tt class="py-docstring">        '46.830  -94.156'</tt> </tt>
+<a name="L854"></a><tt class="py-lineno">854</tt>  <tt class="py-line"><tt class="py-docstring">        '47.149  -99.112'</tt> </tt>
+<a name="L855"></a><tt class="py-lineno">855</tt>  <tt class="py-line"><tt class="py-docstring">        '47.251  -104.106'</tt> </tt>
+<a name="L856"></a><tt class="py-lineno">856</tt>  <tt class="py-line"><tt class="py-docstring">        '47.136  -109.100'</tt> </tt>
+<a name="L857"></a><tt class="py-lineno">857</tt>  <tt class="py-line"><tt class="py-docstring">        '46.805  -114.051'</tt> </tt>
+<a name="L858"></a><tt class="py-lineno">858</tt>  <tt class="py-line"><tt class="py-docstring">        '46.262  -118.924'</tt> </tt>
+<a name="L859"></a><tt class="py-lineno">859</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L860"></a><tt class="py-lineno">860</tt>  <tt class="py-line">        <tt class="py-name">lons</tt><tt class="py-op">,</tt> <tt class="py-name">lats</tt> <tt class="py-op">=</tt> <tt class="py-name">_proj</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="pyproj.Geod" class="py-name" href="#" onclick="return doclink('link-21', 'Geod', 'link-17');">Geod</a></tt><tt class="py-op">.</tt><tt class="py-name">_npts</tt><tt class="py-op">(</tt><tt class="py-name">se [...]
+<a name="L861"></a><tt class="py-lineno">861</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt class="py-name">zip</tt><tt class="py-op">(</tt><tt class="py-name">lons</tt><tt class="py-op">,</tt> <tt class="py-name">lats</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+</div></div><a name="L862"></a><tt class="py-lineno">862</tt>  <tt class="py-line"> </tt>
+<a name="test"></a><div id="test-def"><a name="L863"></a><tt class="py-lineno">863</tt> <a class="py-toggle" href="#" id="test-toggle" onclick="return toggle('test');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyproj-module.html#test">test</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="test-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="test-expanded"><a name="L864"></a><tt class="py-lineno">864</tt>  <tt class="py-line">    <tt class="py-docstring">"""run the examples in the docstrings using the doctest module"""</tt> </tt>
+<a name="L865"></a><tt class="py-lineno">865</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt><tt class="py-op">,</tt> <tt id="link-23" class="py-name"><a title="pyproj" class="py-name" href="#" onclick="return doclink('link-23', 'pyproj', 'link-0');">pyproj</a></tt> </tt>
+<a name="L866"></a><tt class="py-lineno">866</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt id="link-24" class="py-name"><a title="pyproj" class="py-name" href="#" onclick="return doclink('link-24', 'pyproj', 'link-0');">pyproj</a></tt><tt class="py-op">,</tt><tt class="py-name">verbose</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L867"></a><tt class="py-lineno">867</tt>  <tt class="py-line"> </tt>
+<a name="L868"></a><tt class="py-lineno">868</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">"__main__"</tt><tt class="py-op">:</tt> <tt id="link-25" class="py-name" targets="Function pyproj.test()=pyproj-module.html#test"><a title="pyproj.test" class="py-name" href="#" onclick="return doclink('link-25', 'test', 'link-25');">test</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L869"></a><tt class="py-lineno">869</tt>  <tt class="py-line"> </tt><script type="text/javascript">
 <!--
 expandto(location.href);
 // -->
@@ -947,7 +952,7 @@ expandto(location.href);
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Jan 11 09:07:23 2013
+    Generated by Epydoc 3.0.1 on Mon Dec 29 15:13:06 2014
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/pyproj.Geod-class.html b/docs/pyproj.Geod-class.html
index a2db5ad..790adc5 100644
--- a/docs/pyproj.Geod-class.html
+++ b/docs/pyproj.Geod-class.html
@@ -507,7 +507,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Jan 11 09:07:23 2013
+    Generated by Epydoc 3.0.1 on Mon Dec 29 15:13:06 2014
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/pyproj.Proj-class.html b/docs/pyproj.Proj-class.html
index f12496e..5c7e33b 100644
--- a/docs/pyproj.Proj-class.html
+++ b/docs/pyproj.Proj-class.html
@@ -145,6 +145,23 @@ object --+
       
     </td>
   </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="pyproj.Proj-class.html#to_latlong" class="summary-sig-name">to_latlong</a>(<span class="summary-sig-arg">self</span>)</span><br />
+      returns an equivalent Proj in the corresponding lon/lat coordinates.</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="pyproj-pysrc.html#Proj.to_latlong">source code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
   <tr>
     <td colspan="2" class="summary">
     <p class="indent-wrapped-lines"><b>Inherited from <code><i>unreachable</i>.Proj</code></b>:
@@ -368,6 +385,29 @@ object --+
   </dl>
 </td></tr></table>
 </div>
+<a name="to_latlong"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">to_latlong</span>(<span class="sig-arg">self</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="pyproj-pysrc.html#Proj.to_latlong">source code</a></span> 
+    </td>
+  </tr></table>
+  
+  <p>returns an equivalent Proj in the corresponding lon/lat coordinates. 
+  (see pj_latlong_from_proj() in the Proj.4 C API)</p>
+  <dl class="fields">
+    <dt>Overrides:
+        <i>unreachable</i>.Proj.to_latlong
+    </dt>
+  </dl>
+</td></tr></table>
+</div>
 <br />
 <!-- ==================== NAVIGATION BAR ==================== -->
 <table class="navbar" border="0" width="100%" cellpadding="0"
@@ -395,7 +435,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Fri Jan 11 09:07:23 2013
+    Generated by Epydoc 3.0.1 on Mon Dec 29 15:13:06 2014
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/lib/pyproj/__init__.py b/lib/pyproj/__init__.py
index bd22065..3e5cc27 100644
--- a/lib/pyproj/__init__.py
+++ b/lib/pyproj/__init__.py
@@ -23,7 +23,7 @@ scalars or numpy/Numeric/numarray arrays. Optimized for objects
 that support the Python buffer protocol (regular python and
 numpy array objects).
 
-Download: http://code.google.com/p/pyproj/downloads/list
+Download: http://python.org/pypi/pyproj
 
 Requirements: python 2.4 or higher.
 
@@ -391,6 +391,11 @@ class Proj(_proj.Proj):
         outy = _convertback(yisfloat,yislist,xistuple,iny)
         return outx, outy
 
+    def to_latlong(self):
+        """returns an equivalent Proj in the corresponding lon/lat
+        coordinates. (see pj_latlong_from_proj() in the Proj.4 C API)"""
+        return _proj.Proj.to_latlong(self)
+
     def is_latlong(self):
         """returns True if projection in geographic (lon/lat) coordinates"""
         return _proj.Proj.is_latlong(self)
diff --git a/lib/pyproj/data/epsg b/lib/pyproj/data/epsg
index 128ff7c..89acd4c 100644
--- a/lib/pyproj/data/epsg
+++ b/lib/pyproj/data/epsg
@@ -303,9 +303,9 @@
 # Carthage
 <4223> +proj=longlat +datum=carthage +no_defs  <>
 # Chua
-<4224> +proj=longlat +ellps=intl +towgs84=-134,229,-29,0,0,0,0 +no_defs  <>
+<4224> +proj=longlat +ellps=intl +towgs84=-143.87,243.37,-33.52,0,0,0,0 +no_defs  <>
 # Corrego Alegre 1970-72
-<4225> +proj=longlat +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +no_defs  <>
+<4225> +proj=longlat +ellps=intl +towgs84=-205.57,168.77,-4.12,0,0,0,0 +no_defs  <>
 # Cote d'Ivoire
 <4226> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  <>
 # Deir ez Zor
@@ -502,7 +502,7 @@
 <4470> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # Cadastre 1997
 <4475> +proj=longlat +ellps=intl +towgs84=-381.788,-57.501,-256.673,0,0,0,0 +no_defs  <>
-# Mexican Datum of 1993
+# Mexico ITRF92
 <4483> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # China Geodetic Coordinate System 2000
 <4490> +proj=longlat +ellps=GRS80 +no_defs  <>
@@ -547,7 +547,7 @@
 # NAD83(CSRS)
 <4617> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # SAD69
-<4618> +proj=longlat +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +no_defs  <>
+<4618> +proj=longlat +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +no_defs  <>
 # SWEREF99
 <4619> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # Point 58
@@ -736,14 +736,14 @@
 <4721> +proj=longlat +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +no_defs  <>
 # South Georgia 1968
 <4722> +proj=longlat +ellps=intl +towgs84=-794,119,-298,0,0,0,0 +no_defs  <>
-# Grand Cayman 1959
-<4723> +proj=longlat +ellps=clrk66 +towgs84=67.8,106.1,138.8,0,0,0,0 +no_defs  <>
+# GCGD59
+<4723> +proj=longlat +ellps=clrk66 +towgs84=-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925 +no_defs  <>
 # Diego Garcia 1969
 <4724> +proj=longlat +ellps=intl +towgs84=208,-435,-229,0,0,0,0 +no_defs  <>
 # Johnston Island 1961
 <4725> +proj=longlat +ellps=intl +towgs84=189,-79,-202,0,0,0,0 +no_defs  <>
-# Little Cayman 1961
-<4726> +proj=longlat +ellps=clrk66 +towgs84=42,124,147,0,0,0,0 +no_defs  <>
+# SIGD61
+<4726> +proj=longlat +ellps=clrk66 +towgs84=8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081 +no_defs  <>
 # Midway 1961
 <4727> +proj=longlat +ellps=intl +towgs84=403,-81,277,0,0,0,0 +no_defs  <>
 # Pico de las Nieves 1984
@@ -885,7 +885,7 @@
 # SLD99
 <5233> +proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=-0.293,766.95,87.713,0.195704,1.69507,3.47302,-0.039338 +no_defs  <>
 # GDBD2009
-<5246> +proj=longlat +ellps=GRS80 +no_defs  <>
+<5246> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # TUREF
 <5252> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # DRUKREF 03
@@ -909,7 +909,7 @@
 # SIRGAS_ES2007.8
 <5393> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # Ocotepeque 1935
-<5451> +proj=longlat +ellps=clrk66 +towgs84=213.11,9.37,-74.95,0,0,0,0 +no_defs  <>
+<5451> +proj=longlat +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 +no_defs  <>
 # Sibun Gorge 1922
 <5464> +proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs  <>
 # Panama-Colon 1911
@@ -919,15 +919,35 @@
 # Corrego Alegre 1961
 <5524> +proj=longlat +ellps=intl +no_defs  <>
 # SAD69(96)
-<5527> +proj=longlat +ellps=aust_SA +no_defs  <>
+<5527> +proj=longlat +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +no_defs  <>
 # PNG94
 <5546> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
-# Ukraine 2000
+# UCS-2000
 <5561> +proj=longlat +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +no_defs  <>
 # FEH2010
 <5593> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # DB_REF
 <5681> +proj=longlat +ellps=bessel +no_defs  <>
+# TGD2005
+<5886> +proj=longlat +ellps=GRS80 +no_defs  <>
+# CIGD11
+<6135> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
+# Nepal 1981
+<6207> +proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=293.17,726.18,245.36,0,0,0,0 +no_defs  <>
+# NAD83(2011)
+<6318> +proj=longlat +ellps=GRS80 +no_defs  <>
+# NAD83(PA11)
+<6322> +proj=longlat +ellps=GRS80 +no_defs  <>
+# NAD83(MA11)
+<6325> +proj=longlat +ellps=GRS80 +no_defs  <>
+# Mexico ITRF2008
+<6365> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
+# JGD2011
+<6668> +proj=longlat +ellps=GRS80 +no_defs  <>
+# RDN2008
+<6706> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
+# NAD83(CORS96)
+<6783> +proj=longlat +ellps=GRS80 +no_defs  <>
 # Anguilla 1957 / British West Indies Grid
 <2000> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs  <>
 # Antigua 1943 / British West Indies Grid
@@ -2909,13 +2929,13 @@
 <2989> +proj=utm +zone=20 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # Reunion 1947 / TM Reunion (deprecated)
 <2990> +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=50000 +y_0=160000 +ellps=intl +towgs84=94,-948,-1262,0,0,0,0 +units=m +no_defs  <>
-# NAD83 / Oregon Lambert
+# NAD83 / Oregon LCC (m)
 <2991> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +datum=NAD83 +units=m +no_defs  <>
-# NAD83 / Oregon Lambert (ft)
+# NAD83 / Oregon GIC Lambert (ft)
 <2992> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +datum=NAD83 +units=ft +no_defs  <>
-# NAD83(HARN) / Oregon Lambert
+# NAD83(HARN) / Oregon LCC (m)
 <2993> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(HARN) / Oregon Lambert (ft)
+# NAD83(HARN) / Oregon GIC Lambert (ft)
 <2994> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs  <>
 # IGN53 Mare / UTM zone 58S
 <2995> +proj=utm +zone=58 +south +ellps=intl +towgs84=287.58,177.78,-135.41,0,0,0,0 +units=m +no_defs  <>
@@ -3646,10 +3666,10 @@
 <3354> +proj=utm +zone=32 +south +ellps=intl +units=m +no_defs  <>
 # Egypt Gulf of Suez S-650 TL / Red Belt
 <3355> +proj=tmerc +lat_0=30 +lon_0=31 +k=1 +x_0=615000 +y_0=810000 +ellps=helmert +towgs84=-146.21,112.63,4.05,0,0,0,0 +units=m +no_defs  <>
-# Grand Cayman 1959 / UTM zone 17N
-<3356> +proj=utm +zone=17 +ellps=clrk66 +towgs84=67.8,106.1,138.8,0,0,0,0 +units=m +no_defs  <>
-# Little Cayman 1961 / UTM zone 17N
-<3357> +proj=utm +zone=17 +ellps=clrk66 +towgs84=42,124,147,0,0,0,0 +units=m +no_defs  <>
+# Grand Cayman 1959 / UTM zone 17N (deprecated)
+<3356> +proj=utm +zone=17 +ellps=clrk66 +towgs84=-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925 +units=m +no_defs  <>
+# Little Cayman 1961 / UTM zone 17N (deprecated)
+<3357> +proj=utm +zone=17 +ellps=clrk66 +towgs84=8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081 +units=m +no_defs  <>
 # NAD83(HARN) / North Carolina
 <3358> +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # NAD83(HARN) / North Carolina (ftUS) (deprecated)
@@ -3768,37 +3788,37 @@
 <3415> +proj=lcc +lat_1=18 +lat_2=24 +lat_0=21 +lon_0=114 +x_0=500000 +y_0=500000 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  <>
 # ETRS89 / Austria Lambert
 <3416> +proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83 / Iowa North (ft US)
+# NAD83 / Iowa North (ftUS)
 <3417> +proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +datum=NAD83 +units=us-ft +no_defs  <>
-# NAD83 / Iowa South (ft US)
+# NAD83 / Iowa South (ftUS)
 <3418> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +datum=NAD83 +units=us-ft +no_defs  <>
-# NAD83 / Kansas North (ft US)
+# NAD83 / Kansas North (ftUS)
 <3419> +proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +datum=NAD83 +units=us-ft +no_defs  <>
-# NAD83 / Kansas South (ft US)
+# NAD83 / Kansas South (ftUS)
 <3420> +proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +datum=NAD83 +units=us-ft +no_defs  <>
-# NAD83 / Nevada East (ft US)
+# NAD83 / Nevada East (ftUS)
 <3421> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +datum=NAD83 +units=us-ft +no_defs  <>
-# NAD83 / Nevada Central (ft US)
+# NAD83 / Nevada Central (ftUS)
 <3422> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +datum=NAD83 +units=us-ft +no_defs  <>
-# NAD83 / Nevada West (ft US)
+# NAD83 / Nevada West (ftUS)
 <3423> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +datum=NAD83 +units=us-ft +no_defs  <>
-# NAD83 / New Jersey (ft US)
+# NAD83 / New Jersey (ftUS)
 <3424> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +datum=NAD83 +units=us-ft +no_defs  <>
-# NAD83(HARN) / Iowa North (ft US)
+# NAD83(HARN) / Iowa North (ftUS)
 <3425> +proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
-# NAD83(HARN) / Iowa South (ft US)
+# NAD83(HARN) / Iowa South (ftUS)
 <3426> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
-# NAD83(HARN) / Kansas North (ft US)
+# NAD83(HARN) / Kansas North (ftUS)
 <3427> +proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
-# NAD83(HARN) / Kansas South (ft US)
+# NAD83(HARN) / Kansas South (ftUS)
 <3428> +proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
-# NAD83(HARN) / Nevada East (ft US)
+# NAD83(HARN) / Nevada East (ftUS)
 <3429> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
-# NAD83(HARN) / Nevada Central (ft US)
+# NAD83(HARN) / Nevada Central (ftUS)
 <3430> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
-# NAD83(HARN) / Nevada West (ft US)
+# NAD83(HARN) / Nevada West (ftUS)
 <3431> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
-# NAD83(HARN) / New Jersey (ft US)
+# NAD83(HARN) / New Jersey (ftUS)
 <3432> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83 / Arkansas North (ftUS)
 <3433> +proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +datum=NAD83 +units=us-ft +no_defs  <>
@@ -4008,19 +4028,19 @@
 <3535> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / Iowa North
 <3536> +proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(NSRS2007) / Iowa North (ft US)
+# NAD83(NSRS2007) / Iowa North (ftUS)
 <3537> +proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / Iowa South
 <3538> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(NSRS2007) / Iowa South (ft US)
+# NAD83(NSRS2007) / Iowa South (ftUS)
 <3539> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / Kansas North
 <3540> +proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(NSRS2007) / Kansas North (ft US)
+# NAD83(NSRS2007) / Kansas North (ftUS)
 <3541> +proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / Kansas South
 <3542> +proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(NSRS2007) / Kansas South (ft US)
+# NAD83(NSRS2007) / Kansas South (ftUS)
 <3543> +proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / Kentucky North
 <3544> +proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
@@ -4150,15 +4170,15 @@
 <3606> +proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # NAD83(NSRS2007) / Nevada Central
 <3607> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(NSRS2007) / Nevada Central (ft US)
+# NAD83(NSRS2007) / Nevada Central (ftUS)
 <3608> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / Nevada East
 <3609> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(NSRS2007) / Nevada East (ft US)
+# NAD83(NSRS2007) / Nevada East (ftUS)
 <3610> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / Nevada West
 <3611> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(NSRS2007) / Nevada West (ft US)
+# NAD83(NSRS2007) / Nevada West (ftUS)
 <3612> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / New Hampshire
 <3613> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
@@ -4166,7 +4186,7 @@
 <3614> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / New Jersey
 <3615> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(NSRS2007) / New Jersey (ft US)
+# NAD83(NSRS2007) / New Jersey (ftUS)
 <3616> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
 # NAD83(NSRS2007) / New Mexico Central
 <3617> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
@@ -4220,9 +4240,9 @@
 <3641> +proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # NAD83(NSRS2007) / Oklahoma South (ftUS)
 <3642> +proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
-# NAD83(NSRS2007) / Oregon Lambert
+# NAD83(NSRS2007) / Oregon LCC (m)
 <3643> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# NAD83(NSRS2007) / Oregon Lambert (ft)
+# NAD83(NSRS2007) / Oregon GIC Lambert (ft)
 <3644> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs  <>
 # NAD83(NSRS2007) / Oregon North
 <3645> +proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
@@ -4742,7 +4762,7 @@
 # RGRDC 2005 / UTM zone 35S
 <4063> +proj=utm +zone=35 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # Chua / UTM zone 23S
-<4071> +proj=utm +zone=23 +south +ellps=intl +towgs84=-134,229,-29,0,0,0,0 +units=m +no_defs  <>
+<4071> +proj=utm +zone=23 +south +ellps=intl +towgs84=-143.87,243.37,-33.52,0,0,0,0 +units=m +no_defs  <>
 # REGCAN95 / UTM zone 27N
 <4082> +proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # REGCAN95 / UTM zone 28N
@@ -4849,19 +4869,19 @@
 <4467> +proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # RGM04 / UTM zone 38S
 <4471> +proj=utm +zone=38 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# Cadastre 1997 / UTM zone 38S
+# Cadastre 1997 / UTM zone 38S (deprecated)
 <4474> +proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs  <>
-# Mexican Datum of 1993 / UTM zone 11N
+# Mexico ITRF92 / UTM zone 11N
 <4484> +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# Mexican Datum of 1993 / UTM zone 12N
+# Mexico ITRF92 / UTM zone 12N
 <4485> +proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# Mexican Datum of 1993 / UTM zone 13N
+# Mexico ITRF92 / UTM zone 13N
 <4486> +proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# Mexican Datum of 1993 / UTM zone 14N
+# Mexico ITRF92 / UTM zone 14N
 <4487> +proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# Mexican Datum of 1993 / UTM zone 15N
+# Mexico ITRF92 / UTM zone 15N
 <4488> +proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# Mexican Datum of 1993 / UTM zone 16N
+# Mexico ITRF92 / UTM zone 16N
 <4489> +proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # CGCS2000 / Gauss-Kruger zone 13
 <4491> +proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
@@ -5317,7 +5337,7 @@
 # ETRS89 / LCC Germany (E-N)
 <5243> +proj=lcc +lat_1=48.66666666666666 +lat_2=53.66666666666666 +lat_0=51 +lon_0=10.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # GDBD2009 / Brunei BRSO
-<5247> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs  <>
+<5247> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +no_uoff +gamma=53.13010236111111 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # TUREF / TM27
 <5253> +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # TUREF / TM30
@@ -5443,21 +5463,21 @@
 # SIRGAS 2000 / UTM zone 26S
 <5396> +proj=utm +zone=26 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # Ocotepeque 1935 / Costa Rica Norte
-<5456> +proj=lcc +lat_1=10.46666666666667 +lat_0=10.46666666666667 +lon_0=-84.33333333333333 +k_0=0.99995696 +x_0=500000 +y_0=271820.522 +ellps=clrk66 +towgs84=213.11,9.37,-74.95,0,0,0,0 +units=m +no_defs  <>
+<5456> +proj=lcc +lat_1=10.46666666666667 +lat_0=10.46666666666667 +lon_0=-84.33333333333333 +k_0=0.99995696 +x_0=500000 +y_0=271820.522 +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 +units=m +no_defs  <>
 # Ocotepeque 1935 / Costa Rica Sur
-<5457> +proj=lcc +lat_1=9 +lat_0=9 +lon_0=-83.66666666666667 +k_0=0.99995696 +x_0=500000 +y_0=327987.436 +ellps=clrk66 +towgs84=213.11,9.37,-74.95,0,0,0,0 +units=m +no_defs  <>
+<5457> +proj=lcc +lat_1=9 +lat_0=9 +lon_0=-83.66666666666667 +k_0=0.99995696 +x_0=500000 +y_0=327987.436 +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 +units=m +no_defs  <>
 # Ocotepeque 1935 / Guatemala Norte (deprecated)
 <5458> +proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=500000 +y_0=292209.579 +datum=NAD27 +units=m +no_defs  <>
 # Ocotepeque 1935 / Guatemala Sur
-<5459> +proj=lcc +lat_1=14.9 +lat_0=14.9 +lon_0=-90.33333333333333 +k_0=0.99989906 +x_0=500000 +y_0=325992.681 +ellps=clrk66 +towgs84=213.11,9.37,-74.95,0,0,0,0 +units=m +no_defs  <>
+<5459> +proj=lcc +lat_1=14.9 +lat_0=14.9 +lon_0=-90.33333333333333 +k_0=0.99989906 +x_0=500000 +y_0=325992.681 +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 +units=m +no_defs  <>
 # Ocotepeque 1935 / El Salvador Lambert
-<5460> +proj=lcc +lat_1=13.78333333333333 +lat_0=13.78333333333333 +lon_0=-89 +k_0=0.99996704 +x_0=500000 +y_0=295809.184 +ellps=clrk66 +towgs84=213.11,9.37,-74.95,0,0,0,0 +units=m +no_defs  <>
+<5460> +proj=lcc +lat_1=13.78333333333333 +lat_0=13.78333333333333 +lon_0=-89 +k_0=0.99996704 +x_0=500000 +y_0=295809.184 +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 +units=m +no_defs  <>
 # Ocotepeque 1935 / Nicaragua Norte
-<5461> +proj=lcc +lat_1=13.86666666666667 +lat_0=13.86666666666667 +lon_0=-85.5 +k_0=0.99990314 +x_0=500000 +y_0=359891.816 +ellps=clrk66 +towgs84=213.11,9.37,-74.95,0,0,0,0 +units=m +no_defs  <>
+<5461> +proj=lcc +lat_1=13.86666666666667 +lat_0=13.86666666666667 +lon_0=-85.5 +k_0=0.99990314 +x_0=500000 +y_0=359891.816 +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 +units=m +no_defs  <>
 # Ocotepeque 1935 / Nicaragua Sur
-<5462> +proj=lcc +lat_1=11.73333333333333 +lat_0=11.73333333333333 +lon_0=-85.5 +k_0=0.9999222800000001 +x_0=500000 +y_0=288876.327 +ellps=clrk66 +towgs84=213.11,9.37,-74.95,0,0,0,0 +units=m +no_defs  <>
+<5462> +proj=lcc +lat_1=11.73333333333333 +lat_0=11.73333333333333 +lon_0=-85.5 +k_0=0.9999222800000001 +x_0=500000 +y_0=288876.327 +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 17N
-<5463> +proj=utm +zone=17 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<5463> +proj=utm +zone=17 +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # Sibun Gorge 1922 / Colony Grid (deprecated)
 <5466> +proj=tmerc +lat_0=17.06124194444444 +lon_0=-88.6318575 +k=1 +x_0=66220.02833082761 +y_0=135779.5099885299 +a=6378293.645208759 +b=6356617.987679838 +units=m +no_defs  <>
 # Panama-Colon 1911 / Panama Lambert
@@ -5493,17 +5513,17 @@
 # WGS 84 / Gabon TM 2011
 <5523> +proj=tmerc +lat_0=0 +lon_0=11.5 +k=0.9996 +x_0=1500000 +y_0=5500000 +datum=WGS84 +units=m +no_defs  <>
 # SAD69(96) / Brazil Polyconic
-<5530> +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs  <>
+<5530> +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +units=m +no_defs  <>
 # SAD69(96) / UTM zone 21S
-<5531> +proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs  <>
+<5531> +proj=utm +zone=21 +south +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +units=m +no_defs  <>
 # SAD69(96) / UTM zone 22S (deprecated)
-<5532> +proj=utm +zone=22 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<5532> +proj=utm +zone=22 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69(96) / UTM zone 23S
-<5533> +proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs  <>
+<5533> +proj=utm +zone=23 +south +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +units=m +no_defs  <>
 # SAD69(96) / UTM zone 24S
-<5534> +proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs  <>
+<5534> +proj=utm +zone=24 +south +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +units=m +no_defs  <>
 # SAD69(96) / UTM zone 25S
-<5535> +proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs  <>
+<5535> +proj=utm +zone=25 +south +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +units=m +no_defs  <>
 # Corrego Alegre 1961 / UTM zone 21S
 <5536> +proj=utm +zone=21 +south +ellps=intl +units=m +no_defs  <>
 # Corrego Alegre 1961 / UTM zone 22S
@@ -5519,50 +5539,50 @@
 # PNG94 / PNGMG94 zone 56
 <5552> +proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # Ocotepeque 1935 / Guatemala Norte
-<5559> +proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=500000 +y_0=292209.579 +ellps=clrk66 +towgs84=213.11,9.37,-74.95,0,0,0,0 +units=m +no_defs  <>
-# Ukraine 2000 / Gauss-Kruger zone 4
+<5559> +proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=500000 +y_0=292209.579 +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 +units=m +no_defs  <>
+# UCS-2000 / Gauss-Kruger zone 4
 <5562> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / Gauss-Kruger zone 5
+# UCS-2000 / Gauss-Kruger zone 5
 <5563> +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / Gauss-Kruger zone 6
+# UCS-2000 / Gauss-Kruger zone 6
 <5564> +proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / Gauss-Kruger zone 7
+# UCS-2000 / Gauss-Kruger zone 7
 <5565> +proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / Gauss-Kruger CM 21E
+# UCS-2000 / Gauss-Kruger CM 21E
 <5566> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / Gauss-Kruger CM 27E
+# UCS-2000 / Gauss-Kruger CM 27E
 <5567> +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / Gauss-Kruger CM 33E
+# UCS-2000 / Gauss-Kruger CM 33E
 <5568> +proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / Gauss-Kruger CM 39E
+# UCS-2000 / Gauss-Kruger CM 39E
 <5569> +proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger zone 7
+# UCS-2000 / 3-degree Gauss-Kruger zone 7 (deprecated)
 <5570> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger zone 8
+# UCS-2000 / 3-degree Gauss-Kruger zone 8 (deprecated)
 <5571> +proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger zone 9
+# UCS-2000 / 3-degree Gauss-Kruger zone 9 (deprecated)
 <5572> +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger zone 10
+# UCS-2000 / 3-degree Gauss-Kruger zone 10 (deprecated)
 <5573> +proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger zone 11
+# UCS-2000 / 3-degree Gauss-Kruger zone 11 (deprecated)
 <5574> +proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger zone 12
+# UCS-2000 / 3-degree Gauss-Kruger zone 12 (deprecated)
 <5575> +proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger zone 13
+# UCS-2000 / 3-degree Gauss-Kruger zone 13 (deprecated)
 <5576> +proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger CM 21E
+# UCS-2000 / 3-degree Gauss-Kruger CM 21E (deprecated)
 <5577> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger CM 24E
+# UCS-2000 / 3-degree Gauss-Kruger CM 24E (deprecated)
 <5578> +proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger CM 27E
+# UCS-2000 / 3-degree Gauss-Kruger CM 27E (deprecated)
 <5579> +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger CM 30E
+# UCS-2000 / 3-degree Gauss-Kruger CM 30E (deprecated)
 <5580> +proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger CM 33E
+# UCS-2000 / 3-degree Gauss-Kruger CM 33E (deprecated)
 <5581> +proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger CM 36E
+# UCS-2000 / 3-degree Gauss-Kruger CM 36E (deprecated)
 <5582> +proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
-# Ukraine 2000 / 3-degree Gauss-Kruger CM 39E
+# UCS-2000 / 3-degree Gauss-Kruger CM 39E (deprecated)
 <5583> +proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
 # NAD27 / New Brunswick Stereographic (NAD27)
 <5588> +proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=304800 +y_0=304800 +datum=NAD27 +units=ft +no_defs  <>
@@ -5690,7 +5710,1012 @@
 # RGRDC 2005 / Congo TM zone 30
 <5844> +proj=tmerc +lat_0=0 +lon_0=30 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # SAD69(96) / UTM zone 22S
-<5858> +proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs  <>
+<5858> +proj=utm +zone=22 +south +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +units=m +no_defs  <>
+# SAD69(96) / UTM zone 18S
+<5875> +proj=utm +zone=18 +south +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +units=m +no_defs  <>
+# SAD69(96) / UTM zone 19S
+<5876> +proj=utm +zone=19 +south +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +units=m +no_defs  <>
+# SAD69(96) / UTM zone 20S
+<5877> +proj=utm +zone=20 +south +ellps=aust_SA +towgs84=-67.35,3.88,-38.22,0,0,0,0 +units=m +no_defs  <>
+# Cadastre 1997 / UTM zone 38S
+<5879> +proj=utm +zone=38 +south +ellps=intl +towgs84=-381.788,-57.501,-256.673,0,0,0,0 +units=m +no_defs  <>
+# SIRGAS 2000 / Brazil Polyconic
+<5880> +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# TGD2005 / Tonga Map Grid
+<5887> +proj=tmerc +lat_0=0 +lon_0=-177 +k=0.9996 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs  <>
+# JAXA Snow Depth Polar Stereographic North
+<5890> +proj=stere +lat_0=90 +lat_ts=70 +lon_0=90 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone A1
+<5921> +proj=lcc +lat_1=85 +lat_2=77 +lat_0=81.31722600000001 +lon_0=-111 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone A2
+<5922> +proj=lcc +lat_1=85 +lat_2=77 +lat_0=81.31722600000001 +lon_0=-39 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone A3
+<5923> +proj=lcc +lat_1=85 +lat_2=77 +lat_0=81.31722600000001 +lon_0=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone A4
+<5924> +proj=lcc +lat_1=85 +lat_2=77 +lat_0=81.31722600000001 +lon_0=105 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone A5
+<5925> +proj=lcc +lat_1=85 +lat_2=77 +lat_0=81.31722600000001 +lon_0=177 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone B1
+<5926> +proj=lcc +lat_1=77 +lat_2=69 +lat_0=73.15574086111111 +lon_0=-111 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone B2
+<5927> +proj=lcc +lat_1=77 +lat_2=69 +lat_0=73.15574086111111 +lon_0=-39 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone B3
+<5928> +proj=lcc +lat_1=77 +lat_2=69 +lat_0=73.15574086111111 +lon_0=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone B4
+<5929> +proj=lcc +lat_1=77 +lat_2=69 +lat_0=73.15574086111111 +lon_0=105 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone B5
+<5930> +proj=lcc +lat_1=77 +lat_2=69 +lat_0=73.15574086111111 +lon_0=177 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone C1
+<5931> +proj=lcc +lat_1=69 +lat_2=61 +lat_0=65.10127088888888 +lon_0=-111 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone C2
+<5932> +proj=lcc +lat_1=69 +lat_2=61 +lat_0=65.10127088888888 +lon_0=-39 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone C3
+<5933> +proj=lcc +lat_1=69 +lat_2=61 +lat_0=65.10127088888888 +lon_0=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone C4
+<5934> +proj=lcc +lat_1=69 +lat_2=61 +lat_0=65.10127088888888 +lon_0=105 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic Regional zone C5
+<5935> +proj=lcc +lat_1=69 +lat_2=61 +lat_0=65.10127088888888 +lon_0=177 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Alaska Polar Stereographic
+<5936> +proj=stere +lat_0=90 +lat_ts=90 +lon_0=-150 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Canada Polar Stereographic
+<5937> +proj=stere +lat_0=90 +lat_ts=90 +lon_0=-100 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Greenland Polar Stereographic
+<5938> +proj=stere +lat_0=90 +lat_ts=90 +lon_0=-33 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Norway Polar Stereographic
+<5939> +proj=stere +lat_0=90 +lat_ts=90 +lon_0=18 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Russia Polar Stereographic
+<5940> +proj=stere +lat_0=90 +lat_ts=90 +lon_0=105 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 1-25
+<6050> +proj=lcc +lat_1=87 +lat_2=83.66666666666667 +lat_0=85.43711833333333 +lon_0=-30 +x_0=25500000 +y_0=1500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 2-18
+<6051> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=-52 +x_0=18500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 2-20
+<6052> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=-12 +x_0=20500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 3-29
+<6053> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=-69 +x_0=29500000 +y_0=3500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 3-31
+<6054> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=-39 +x_0=31500000 +y_0=3500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 3-33
+<6055> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=-10 +x_0=33500000 +y_0=3500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 4-20
+<6056> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=-64 +x_0=20500000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 4-22
+<6057> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=-39 +x_0=22500000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 4-24
+<6058> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=-14 +x_0=24500000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 5-41
+<6059> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-62 +x_0=41500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 5-43
+<6060> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-42 +x_0=43500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 5-45
+<6061> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-22 +x_0=45500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 6-26
+<6062> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-56 +x_0=26500000 +y_0=6500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 6-28
+<6063> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-38 +x_0=28500000 +y_0=6500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 6-30
+<6064> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-20 +x_0=30500000 +y_0=6500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 7-11
+<6065> +proj=lcc +lat_1=67 +lat_2=63.66666666666666 +lat_0=65.35103930555555 +lon_0=-51 +x_0=11500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 7-13
+<6066> +proj=lcc +lat_1=67 +lat_2=63.66666666666666 +lat_0=65.35103930555555 +lon_0=-34 +x_0=13500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 8-20
+<6067> +proj=lcc +lat_1=63.66666666666666 +lat_2=60.33333333333334 +lat_0=62.01530688888889 +lon_0=-52 +x_0=20500000 +y_0=8500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GR96 / EPSG Arctic zone 8-22
+<6068> +proj=lcc +lat_1=63.66666666666666 +lat_2=60.33333333333334 +lat_0=62.01530688888889 +lon_0=-37 +x_0=22500000 +y_0=8500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# ETRS89 / EPSG Arctic zone 2-22
+<6069> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=16 +x_0=22500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# ETRS89 / EPSG Arctic zone 3-11
+<6070> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=21 +x_0=11500000 +y_0=3500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# ETRS89 / EPSG Arctic zone 4-26
+<6071> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=10 +x_0=26500000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# ETRS89 / EPSG Arctic zone 4-28
+<6072> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=34 +x_0=28500000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# ETRS89 / EPSG Arctic zone 5-11
+<6073> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=14 +x_0=11500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# ETRS89 / EPSG Arctic zone 5-13
+<6074> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=34 +x_0=13500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 2-24
+<6075> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=53 +x_0=24500000 +y_0=2500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 2-26
+<6076> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=93 +x_0=26500000 +y_0=2500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 3-13
+<6077> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=52 +x_0=13500000 +y_0=3500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 3-15
+<6078> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=83 +x_0=15500000 +y_0=3500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 3-17
+<6079> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=114 +x_0=17500000 +y_0=3500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 3-19
+<6080> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=145 +x_0=19500000 +y_0=3500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 4-30
+<6081> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=58 +x_0=30500000 +y_0=4500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 4-32
+<6082> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=82 +x_0=32500000 +y_0=4500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 4-34
+<6083> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=106 +x_0=34500000 +y_0=4500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 4-36
+<6084> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=130 +x_0=36500000 +y_0=4500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 4-38
+<6085> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=154 +x_0=38500000 +y_0=4500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 4-40
+<6086> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=179 +x_0=40500000 +y_0=4500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 5-15
+<6087> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=54 +x_0=15500000 +y_0=5500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 5-17
+<6088> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=74 +x_0=17500000 +y_0=5500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 5-19
+<6089> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=95 +x_0=19500000 +y_0=5500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 5-21
+<6090> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=116 +x_0=21500000 +y_0=5500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 5-23
+<6091> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=137 +x_0=23500000 +y_0=5500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 5-25
+<6092> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=158 +x_0=25500000 +y_0=5500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 5-27
+<6093> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=179 +x_0=27500000 +y_0=5500000 +datum=WGS84 +units=m +no_defs  <>
+# NAD83(NSRS2007) / EPSG Arctic zone 5-29
+<6094> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-163 +x_0=29500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(NSRS2007) / EPSG Arctic zone 5-31
+<6095> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-147 +x_0=31500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(NSRS2007) / EPSG Arctic zone 6-14
+<6096> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-165 +x_0=14500000 +y_0=6500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(NSRS2007) / EPSG Arctic zone 6-16
+<6097> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-147 +x_0=16500000 +y_0=6500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 1-23
+<6098> +proj=lcc +lat_1=87 +lat_2=83.66666666666667 +lat_0=85.43711833333333 +lon_0=-90 +x_0=23500000 +y_0=1500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 2-14
+<6099> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=-115 +x_0=14500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 2-16
+<6100> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=-75 +x_0=16500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 3-25
+<6101> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=-129 +x_0=25500000 +y_0=3500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 3-27
+<6102> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=-99 +x_0=27500000 +y_0=3500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 3-29
+<6103> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=-69 +x_0=29500000 +y_0=3500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 4-14
+<6104> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=-129 +x_0=14500000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 4-16
+<6105> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=-104 +x_0=16500000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 4-18
+<6106> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=-79 +x_0=18500000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 5-33
+<6107> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-131 +x_0=33500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 5-35
+<6108> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-111 +x_0=35500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 5-37
+<6109> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-91 +x_0=37500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 5-39
+<6110> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-71 +x_0=39500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 6-18
+<6111> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-132 +x_0=18500000 +y_0=6500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 6-20
+<6112> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-113 +x_0=20500000 +y_0=6500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 6-22
+<6113> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-94 +x_0=22500000 +y_0=6500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CSRS) / EPSG Arctic zone 6-24
+<6114> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-75 +x_0=24500000 +y_0=6500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 1-27
+<6115> +proj=lcc +lat_1=87 +lat_2=83.66666666666667 +lat_0=85.43711833333333 +lon_0=30 +x_0=27500000 +y_0=1500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 1-29
+<6116> +proj=lcc +lat_1=87 +lat_2=83.66666666666667 +lat_0=85.43711833333333 +lon_0=90 +x_0=29500000 +y_0=1500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 1-31
+<6117> +proj=lcc +lat_1=87 +lat_2=83.66666666666667 +lat_0=85.43711833333333 +lon_0=150 +x_0=31500000 +y_0=1500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 1-21
+<6118> +proj=lcc +lat_1=87 +lat_2=83.66666666666667 +lat_0=85.43711833333333 +lon_0=-150 +x_0=21500000 +y_0=1500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 2-28
+<6119> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=133 +x_0=28500000 +y_0=2500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 2-10
+<6120> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=166 +x_0=10500000 +y_0=2500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 2-12
+<6121> +proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333333 +lat_0=82.05842488888888 +lon_0=-154 +x_0=12500000 +y_0=2500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 3-21
+<6122> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=176 +x_0=21500000 +y_0=3500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 3-23
+<6123> +proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.70733752777778 +lon_0=-153 +x_0=23500000 +y_0=3500000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / EPSG Arctic zone 4-12
+<6124> +proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.36440330555556 +lon_0=-155 +x_0=12500000 +y_0=4500000 +datum=WGS84 +units=m +no_defs  <>
+# ETRS89 / EPSG Arctic zone 5-47
+<6125> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-5 +x_0=47500000 +y_0=5500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# Grand Cayman National Grid 1959
+<6128> +proj=utm +zone=17 +ellps=clrk66 +towgs84=-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925 +units=ft +no_defs  <>
+# Sister Islands National Grid 1961
+<6129> +proj=utm +zone=17 +ellps=clrk66 +towgs84=8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081 +units=ft +no_defs  <>
+# Cayman Islands National Grid 2011 (deprecated)
+<6141> +proj=lcc +lat_1=19.33333333333333 +lat_2=19.7 +lat_0=19.33333333333333 +lon_0=80.56666666666666 +x_0=899160 +y_0=579120 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs  <>
+# NAD27 / Michigan North
+# Unable to translate coordinate system EPSG:6200 into PROJ.4 format.
+#
+# NAD27 / Michigan Central
+# Unable to translate coordinate system EPSG:6201 into PROJ.4 format.
+#
+# NAD27 / Michigan South
+# Unable to translate coordinate system EPSG:6202 into PROJ.4 format.
+#
+# Macedonian State Coordinate System
+<6204> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=500000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m +no_defs  <>
+# SIRGAS 2000 / UTM zone 23N
+<6210> +proj=utm +zone=23 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# SIRGAS 2000 / UTM zone 24N
+<6211> +proj=utm +zone=24 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# MAGNA-SIRGAS / Arauca urban grid
+# Unable to translate coordinate system EPSG:6244 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Armenia urban grid
+# Unable to translate coordinate system EPSG:6245 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Barranquilla urban grid
+# Unable to translate coordinate system EPSG:6246 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Bogota urban grid
+# Unable to translate coordinate system EPSG:6247 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Bucaramanga urban grid
+# Unable to translate coordinate system EPSG:6248 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Cali urban grid
+# Unable to translate coordinate system EPSG:6249 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Cartagena urban grid
+# Unable to translate coordinate system EPSG:6250 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Cucuta urban grid
+# Unable to translate coordinate system EPSG:6251 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Florencia urban grid
+# Unable to translate coordinate system EPSG:6252 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Ibague urban grid
+# Unable to translate coordinate system EPSG:6253 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Inirida urban grid
+# Unable to translate coordinate system EPSG:6254 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Leticia urban grid
+# Unable to translate coordinate system EPSG:6255 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Manizales urban grid
+# Unable to translate coordinate system EPSG:6256 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Medellin urban grid
+# Unable to translate coordinate system EPSG:6257 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Mitu urban grid
+# Unable to translate coordinate system EPSG:6258 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Mocoa urban grid
+# Unable to translate coordinate system EPSG:6259 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Monteria urban grid
+# Unable to translate coordinate system EPSG:6260 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Neiva urban grid
+# Unable to translate coordinate system EPSG:6261 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Pasto urban grid
+# Unable to translate coordinate system EPSG:6262 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Pereira urban grid
+# Unable to translate coordinate system EPSG:6263 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Popayan urban grid
+# Unable to translate coordinate system EPSG:6264 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Puerto Carreno urban grid
+# Unable to translate coordinate system EPSG:6265 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Quibdo urban grid
+# Unable to translate coordinate system EPSG:6266 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Riohacha urban grid
+# Unable to translate coordinate system EPSG:6267 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / San Andres urban grid
+# Unable to translate coordinate system EPSG:6268 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / San Jose del Guaviare urban grid
+# Unable to translate coordinate system EPSG:6269 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Santa Marta urban grid
+# Unable to translate coordinate system EPSG:6270 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Sucre urban grid
+# Unable to translate coordinate system EPSG:6271 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Tunja urban grid
+# Unable to translate coordinate system EPSG:6272 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Valledupar urban grid
+# Unable to translate coordinate system EPSG:6273 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Villavicencio urban grid
+# Unable to translate coordinate system EPSG:6274 into PROJ.4 format.
+#
+# MAGNA-SIRGAS / Yopal urban grid
+# Unable to translate coordinate system EPSG:6275 into PROJ.4 format.
+#
+# Macedonia State Coordinate System zone 7
+<6316> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 59N
+<6328> +proj=utm +zone=59 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 60N
+<6329> +proj=utm +zone=60 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 1N
+<6330> +proj=utm +zone=1 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 2N
+<6331> +proj=utm +zone=2 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 3N
+<6332> +proj=utm +zone=3 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 4N
+<6333> +proj=utm +zone=4 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 5N
+<6334> +proj=utm +zone=5 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 6N
+<6335> +proj=utm +zone=6 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 7N
+<6336> +proj=utm +zone=7 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 8N
+<6337> +proj=utm +zone=8 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 9N
+<6338> +proj=utm +zone=9 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 10N
+<6339> +proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 11N
+<6340> +proj=utm +zone=11 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 12N
+<6341> +proj=utm +zone=12 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 13N
+<6342> +proj=utm +zone=13 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 14N
+<6343> +proj=utm +zone=14 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 15N
+<6344> +proj=utm +zone=15 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 16N
+<6345> +proj=utm +zone=16 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 17N
+<6346> +proj=utm +zone=17 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 18N
+<6347> +proj=utm +zone=18 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / UTM zone 19N
+<6348> +proj=utm +zone=19 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Conus Albers
+<6350> +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / EPSG Arctic zone 5-29
+<6351> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-163 +x_0=29500000 +y_0=5500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / EPSG Arctic zone 5-31
+<6352> +proj=lcc +lat_1=73.66666666666667 +lat_2=70.33333333333333 +lat_0=72.02500919444445 +lon_0=-147 +x_0=31500000 +y_0=5500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / EPSG Arctic zone 6-14
+<6353> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-165 +x_0=14500000 +y_0=6500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / EPSG Arctic zone 6-16
+<6354> +proj=lcc +lat_1=70.33333333333333 +lat_2=67 +lat_0=68.68747555555557 +lon_0=-147 +x_0=16500000 +y_0=6500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alabama East
+<6355> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alabama West
+<6356> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# Mexico ITRF92 / LCC
+<6362> +proj=lcc +lat_1=17.5 +lat_2=29.5 +lat_0=12 +lon_0=-102 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# Mexico ITRF2008 / UTM zone 11N
+<6366> +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# Mexico ITRF2008 / UTM zone 12N
+<6367> +proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# Mexico ITRF2008 / UTM zone 13N
+<6368> +proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# Mexico ITRF2008 / UTM zone 14N
+<6369> +proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# Mexico ITRF2008 / UTM zone 15N
+<6370> +proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# Mexico ITRF2008 / UTM zone 16N
+<6371> +proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# Mexico ITRF2008 / LCC
+<6372> +proj=lcc +lat_1=17.5 +lat_2=29.5 +lat_0=12 +lon_0=-102 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# UCS-2000 / Ukraine TM zone 7
+<6381> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=300000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
+# UCS-2000 / Ukraine TM zone 8
+<6382> +proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=300000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
+# UCS-2000 / Ukraine TM zone 9
+<6383> +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=300000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
+# UCS-2000 / Ukraine TM zone 10
+<6384> +proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=300000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
+# UCS-2000 / Ukraine TM zone 11
+<6385> +proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=300000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
+# UCS-2000 / Ukraine TM zone 12
+<6386> +proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=300000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
+# UCS-2000 / Ukraine TM zone 13
+<6387> +proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=300000 +y_0=0 +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +units=m +no_defs  <>
+# Cayman Islands National Grid 2011
+<6391> +proj=lcc +lat_1=19.33333333333333 +lat_2=19.7 +lat_0=19.33333333333333 +lon_0=-80.56666666666666 +x_0=899160 +y_0=579120 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs  <>
+# NAD83(2011) / Alaska Albers
+<6393> +proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 1
+<6394> +proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +no_uoff +gamma=323.1301023611111 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 2
+<6395> +proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 3
+<6396> +proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 4
+<6397> +proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 5
+<6398> +proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 6
+<6399> +proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 7
+<6400> +proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 8
+<6401> +proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 9
+<6402> +proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Alaska zone 10
+<6403> +proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Arizona Central
+<6404> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Arizona Central (ft)
+<6405> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Arizona East
+<6406> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Arizona East (ft)
+<6407> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Arizona West
+<6408> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Arizona West (ft)
+<6409> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Arkansas North
+<6410> +proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Arkansas North (ftUS)
+<6411> +proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Arkansas South
+<6412> +proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Arkansas South (ftUS)
+<6413> +proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / California Albers
+<6414> +proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / California zone 1
+<6415> +proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / California zone 1 (ftUS)
+<6416> +proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / California zone 2
+<6417> +proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / California zone 2 (ftUS)
+<6418> +proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / California zone 3
+<6419> +proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / California zone 3 (ftUS)
+<6420> +proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / California zone 4
+<6421> +proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / California zone 4 (ftUS)
+<6422> +proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / California zone 5
+<6423> +proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / California zone 5 (ftUS)
+<6424> +proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / California zone 6
+<6425> +proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / California zone 6 (ftUS)
+<6426> +proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Colorado Central
+<6427> +proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Colorado Central (ftUS)
+<6428> +proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Colorado North
+<6429> +proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Colorado North (ftUS)
+<6430> +proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Colorado South
+<6431> +proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Colorado South (ftUS)
+<6432> +proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Connecticut
+<6433> +proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Connecticut (ftUS)
+<6434> +proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Delaware
+<6435> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Delaware (ftUS)
+<6436> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Florida East
+<6437> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Florida East (ftUS)
+<6438> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Florida GDL Albers
+<6439> +proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Florida North
+<6440> +proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Florida North (ftUS)
+<6441> +proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Florida West
+<6442> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Florida West (ftUS)
+<6443> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Georgia East
+<6444> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Georgia East (ftUS)
+<6445> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Georgia West
+<6446> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Georgia West (ftUS)
+<6447> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Idaho Central
+<6448> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Idaho Central (ftUS)
+<6449> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Idaho East
+<6450> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Idaho East (ftUS)
+<6451> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Idaho West
+<6452> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Idaho West (ftUS)
+<6453> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Illinois East
+<6454> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Illinois East (ftUS)
+<6455> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Illinois West
+<6456> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Illinois West (ftUS)
+<6457> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Indiana East
+<6458> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Indiana East (ftUS)
+<6459> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Indiana West
+<6460> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Indiana West (ftUS)
+<6461> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Iowa North
+<6462> +proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Iowa North (ftUS)
+<6463> +proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Iowa South
+<6464> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Iowa South (ftUS)
+<6465> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Kansas North
+<6466> +proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Kansas North (ftUS)
+<6467> +proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Kansas South
+<6468> +proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Kansas South (ftUS)
+<6469> +proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Kentucky North
+<6470> +proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Kentucky North (ftUS)
+<6471> +proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Kentucky Single Zone
+<6472> +proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Kentucky Single Zone (ftUS)
+<6473> +proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Kentucky South
+<6474> +proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Kentucky South (ftUS)
+<6475> +proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Louisiana North
+<6476> +proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Louisiana North (ftUS)
+<6477> +proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Louisiana South
+<6478> +proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Louisiana South (ftUS)
+<6479> +proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Maine CS2000 Central
+<6480> +proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Maine CS2000 East
+<6481> +proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Maine CS2000 West
+<6482> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Maine East
+<6483> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Maine East (ftUS)
+<6484> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Maine West
+<6485> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Maine West (ftUS)
+<6486> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Maryland
+<6487> +proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Maryland (ftUS)
+<6488> +proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Massachusetts Island
+<6489> +proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Massachusetts Island (ftUS)
+<6490> +proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Massachusetts Mainland
+<6491> +proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Massachusetts Mainland (ftUS)
+<6492> +proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Michigan Central
+<6493> +proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Michigan Central (ft)
+<6494> +proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Michigan North
+<6495> +proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Michigan North (ft)
+<6496> +proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Michigan Oblique Mercator
+<6497> +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +no_uoff +gamma=337.25556 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Michigan South
+<6498> +proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Michigan South (ft)
+<6499> +proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Minnesota Central
+<6500> +proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Minnesota Central (ftUS)
+<6501> +proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Minnesota North
+<6502> +proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Minnesota North (ftUS)
+<6503> +proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Minnesota South
+<6504> +proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Minnesota South (ftUS)
+<6505> +proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Mississippi East
+<6506> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Mississippi East (ftUS)
+<6507> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Mississippi TM
+<6508> +proj=tmerc +lat_0=32.5 +lon_0=-89.75 +k=0.9998335 +x_0=500000 +y_0=1300000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Mississippi West
+<6509> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Mississippi West (ftUS)
+<6510> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Missouri Central
+<6511> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Missouri East
+<6512> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Missouri West
+<6513> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Montana
+<6514> +proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Montana (ft)
+<6515> +proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Nebraska
+<6516> +proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Nebraska (ftUS) (deprecated)
+<6517> +proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(2011) / Nevada Central
+<6518> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Nevada Central (ftUS)
+<6519> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Nevada East
+<6520> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Nevada East (ftUS)
+<6521> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Nevada West
+<6522> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Nevada West (ftUS)
+<6523> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / New Hampshire
+<6524> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / New Hampshire (ftUS)
+<6525> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / New Jersey
+<6526> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / New Jersey (ftUS)
+<6527> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / New Mexico Central
+<6528> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / New Mexico Central (ftUS)
+<6529> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / New Mexico East
+<6530> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / New Mexico East (ftUS)
+<6531> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / New Mexico West
+<6532> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / New Mexico West (ftUS)
+<6533> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / New York Central
+<6534> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / New York Central (ftUS)
+<6535> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / New York East
+<6536> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / New York East (ftUS)
+<6537> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / New York Long Island
+<6538> +proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / New York Long Island (ftUS)
+<6539> +proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / New York West
+<6540> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / New York West (ftUS)
+<6541> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / North Carolina
+<6542> +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / North Carolina (ftUS)
+<6543> +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / North Dakota North
+<6544> +proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / North Dakota North (ft)
+<6545> +proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / North Dakota South
+<6546> +proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / North Dakota South (ft)
+<6547> +proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Ohio North
+<6548> +proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Ohio North (ftUS)
+<6549> +proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Ohio South
+<6550> +proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Ohio South (ftUS)
+<6551> +proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Oklahoma North
+<6552> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oklahoma North (ftUS)
+<6553> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Oklahoma South
+<6554> +proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oklahoma South (ftUS)
+<6555> +proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Oregon LCC (m)
+<6556> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon GIC Lambert (ft)
+<6557> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon North
+<6558> +proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon North (ft)
+<6559> +proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon South
+<6560> +proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon South (ft)
+<6561> +proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Pennsylvania North
+<6562> +proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Pennsylvania North (ftUS)
+<6563> +proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Pennsylvania South
+<6564> +proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Pennsylvania South (ftUS)
+<6565> +proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Puerto Rico and Virgin Is.
+<6566> +proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Rhode Island
+<6567> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Rhode Island (ftUS)
+<6568> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / South Carolina
+<6569> +proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / South Carolina (ft)
+<6570> +proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / South Dakota North
+<6571> +proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / South Dakota North (ftUS)
+<6572> +proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / South Dakota South
+<6573> +proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / South Dakota South (ftUS)
+<6574> +proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Tennessee
+<6575> +proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Tennessee (ftUS)
+<6576> +proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Texas Central
+<6577> +proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Texas Central (ftUS)
+<6578> +proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Texas Centric Albers Equal Area
+<6579> +proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Texas Centric Lambert Conformal
+<6580> +proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Texas North
+<6581> +proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Texas North (ftUS)
+<6582> +proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Texas North Central
+<6583> +proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Texas North Central (ftUS)
+<6584> +proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Texas South
+<6585> +proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Texas South (ftUS)
+<6586> +proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Texas South Central
+<6587> +proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Texas South Central (ftUS)
+<6588> +proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Vermont
+<6589> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Vermont (ftUS)
+<6590> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Virginia Lambert
+<6591> +proj=lcc +lat_1=37 +lat_2=39.5 +lat_0=36 +lon_0=-79.5 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Virginia North
+<6592> +proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Virginia North (ftUS)
+<6593> +proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Virginia South
+<6594> +proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Virginia South (ftUS)
+<6595> +proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Washington North
+<6596> +proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Washington North (ftUS)
+<6597> +proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Washington South
+<6598> +proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Washington South (ftUS)
+<6599> +proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / West Virginia North
+<6600> +proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / West Virginia North (ftUS)
+<6601> +proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / West Virginia South
+<6602> +proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / West Virginia South (ftUS)
+<6603> +proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Wisconsin Central (deprecated)
+<6604> +proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(2011) / Wisconsin Central (ftUS)
+<6605> +proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Wisconsin North
+<6606> +proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Wisconsin North (ftUS)
+<6607> +proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Wisconsin South
+<6608> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Wisconsin South (ftUS)
+<6609> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Wisconsin Transverse Mercator
+<6610> +proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Wyoming East
+<6611> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Wyoming East (ftUS)
+<6612> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Wyoming East Central
+<6613> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Wyoming East Central (ftUS)
+<6614> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Wyoming West
+<6615> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Wyoming West (ftUS)
+<6616> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Wyoming West Central
+<6617> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Wyoming West Central (ftUS)
+<6618> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Utah Central
+<6619> +proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Utah North
+<6620> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Utah South
+<6621> +proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CSRS) / Quebec Lambert
+<6622> +proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83 / Quebec Albers
+<6623> +proj=aea +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs  <>
+# NAD83(CSRS) / Quebec Albers
+<6624> +proj=aea +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(2011) / Utah Central (ftUS)
+<6625> +proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Utah North (ftUS)
+<6626> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(2011) / Utah South (ftUS)
+<6627> +proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(PA11) / Hawaii zone 1
+<6628> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(PA11) / Hawaii zone 2
+<6629> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(PA11) / Hawaii zone 3
+<6630> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(PA11) / Hawaii zone 4
+<6631> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(PA11) / Hawaii zone 5
+<6632> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(PA11) / Hawaii zone 3 (ftUS)
+<6633> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(PA11) / UTM zone 4N
+<6634> +proj=utm +zone=4 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(PA11) / UTM zone 5N
+<6635> +proj=utm +zone=5 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(PA11) / UTM zone 2S
+<6636> +proj=utm +zone=2 +south +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(MA11) / Guam Map Grid
+<6637> +proj=tmerc +lat_0=13.5 +lon_0=144.75 +k=1 +x_0=100000 +y_0=200000 +ellps=GRS80 +units=m +no_defs  <>
+# Karbala 1979 / Iraq National Grid
+<6646> +proj=tmerc +lat_0=29.02626833333333 +lon_0=46.5 +k=0.9994 +x_0=800000 +y_0=0 +ellps=clrk80 +towgs84=70.995,-335.916,262.898,0,0,0,0 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS I
+<6669> +proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS II
+<6670> +proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS III
+<6671> +proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS IV
+<6672> +proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS V
+<6673> +proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS VI
+<6674> +proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS VII
+<6675> +proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS VIII
+<6676> +proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS IX
+<6677> +proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS X
+<6678> +proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS XI
+<6679> +proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS XII
+<6680> +proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS XIII
+<6681> +proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS XIV
+<6682> +proj=tmerc +lat_0=26 +lon_0=142 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS XV
+<6683> +proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS XVI
+<6684> +proj=tmerc +lat_0=26 +lon_0=124 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS XVII
+<6685> +proj=tmerc +lat_0=26 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS XVIII
+<6686> +proj=tmerc +lat_0=20 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / Japan Plane Rectangular CS XIX
+<6687> +proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / UTM zone 51N
+<6688> +proj=utm +zone=51 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / UTM zone 52N
+<6689> +proj=utm +zone=52 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / UTM zone 53N
+<6690> +proj=utm +zone=53 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / UTM zone 54N
+<6691> +proj=utm +zone=54 +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011 / UTM zone 55N
+<6692> +proj=utm +zone=55 +ellps=GRS80 +units=m +no_defs  <>
+# WGS 84 / TM 60 SW
+<6703> +proj=tmerc +lat_0=0 +lon_0=-60 +k=0.9996 +x_0=500000 +y_0=10000000 +datum=WGS84 +units=m +no_defs  <>
+# RDN2008 / TM32
+<6707> +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# RDN2008 / TM33
+<6708> +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# RDN2008 / TM34
+<6709> +proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# WGS 84 / CIG92
+<6720> +proj=tmerc +lat_0=0 +lon_0=105.625 +k=1.000024 +x_0=50000 +y_0=1300000 +datum=WGS84 +units=m +no_defs  <>
+# GDA94 / CIG94
+<6721> +proj=tmerc +lat_0=0 +lon_0=105.625 +k=1.00002514 +x_0=50000 +y_0=1300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# WGS 84 / CKIG92
+<6722> +proj=tmerc +lat_0=0 +lon_0=96.875 +k=1 +x_0=50000 +y_0=1400000 +datum=WGS84 +units=m +no_defs  <>
+# GDA94 / CKIG94
+<6723> +proj=tmerc +lat_0=0 +lon_0=96.875 +k=0.99999387 +x_0=50000 +y_0=1500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GDA94 / MGA zone 41
+<6732> +proj=utm +zone=41 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GDA94 / MGA zone 42
+<6733> +proj=utm +zone=42 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GDA94 / MGA zone 43
+<6734> +proj=utm +zone=43 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GDA94 / MGA zone 44
+<6735> +proj=utm +zone=44 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GDA94 / MGA zone 46
+<6736> +proj=utm +zone=46 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GDA94 / MGA zone 47
+<6737> +proj=utm +zone=47 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GDA94 / MGA zone 59
+<6738> +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(CORS96) / Oregon LCC (m)
+<6867> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CORS96) / Oregon GIC Lambert (ft)
+<6868> +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# ETRS89 / Albania 2010
+<6870> +proj=tmerc +lat_0=0 +lon_0=20 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# RDN2008 / Italy zone
+<6875> +proj=tmerc +lat_0=0 +lon_0=12 +k=0.9985000000000001 +x_0=7000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# RDN2008 / Zone 12
+<6876> +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=3000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(2011) / Wisconsin Central
+<6879> +proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Nebraska (ftUS)
+<6880> +proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs  <>
+# NAD83(CORS96) / Oregon North
+<6884> +proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CORS96) / Oregon North (ft)
+<6885> +proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(CORS96) / Oregon South
+<6886> +proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CORS96) / Oregon South (ft)
+<6887> +proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
 # Pulkovo 1995 / Gauss-Kruger zone 4
 <20004> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.22 +units=m +no_defs  <>
 # Pulkovo 1995 / Gauss-Kruger zone 5
@@ -6095,15 +7120,15 @@
 # Carthage / Sud Tunisie
 <22392> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=9.9 +k_0=0.999625769 +x_0=500000 +y_0=300000 +datum=carthage +units=m +no_defs  <>
 # Corrego Alegre 1970-72 / UTM zone 21S
-<22521> +proj=utm +zone=21 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs  <>
+<22521> +proj=utm +zone=21 +south +ellps=intl +towgs84=-205.57,168.77,-4.12,0,0,0,0 +units=m +no_defs  <>
 # Corrego Alegre 1970-72 / UTM zone 22S
-<22522> +proj=utm +zone=22 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs  <>
+<22522> +proj=utm +zone=22 +south +ellps=intl +towgs84=-205.57,168.77,-4.12,0,0,0,0 +units=m +no_defs  <>
 # Corrego Alegre 1970-72 / UTM zone 23S
-<22523> +proj=utm +zone=23 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs  <>
+<22523> +proj=utm +zone=23 +south +ellps=intl +towgs84=-205.57,168.77,-4.12,0,0,0,0 +units=m +no_defs  <>
 # Corrego Alegre 1970-72 / UTM zone 24S
-<22524> +proj=utm +zone=24 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs  <>
+<22524> +proj=utm +zone=24 +south +ellps=intl +towgs84=-205.57,168.77,-4.12,0,0,0,0 +units=m +no_defs  <>
 # Corrego Alegre 1970-72 / UTM zone 25S
-<22525> +proj=utm +zone=25 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs  <>
+<22525> +proj=utm +zone=25 +south +ellps=intl +towgs84=-205.57,168.77,-4.12,0,0,0,0 +units=m +no_defs  <>
 # Deir ez Zor / Levant Zone
 <22700> +proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-190.421,8.532,238.69,0,0,0,0 +units=m +no_defs  <>
 # Deir ez Zor / Syria Lambert
@@ -6608,11 +7633,11 @@
 <26802> +proj=tmerc +lat_0=41.5 +lon_0=-85.75 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs  <>
 # NAD Michigan / Michigan West (deprecated)
 <26803> +proj=tmerc +lat_0=41.5 +lon_0=-88.75 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs  <>
-# NAD Michigan / Michigan North
+# NAD Michigan / Michigan North (deprecated)
 <26811> +proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs  <>
-# NAD Michigan / Michigan Central
+# NAD Michigan / Michigan Central (deprecated)
 <26812> +proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs  <>
-# NAD Michigan / Michigan South
+# NAD Michigan / Michigan South (deprecated)
 <26813> +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs  <>
 # NAD83 / Maine East (ftUS) (deprecated)
 <26814> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +datum=NAD83 +units=m +no_defs  <>
@@ -7056,7 +8081,7 @@
 <28193> +proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs  <>
 # Pointe Noire / UTM zone 32S
 <28232> +proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +towgs84=-148,51,-291,0,0,0,0 +units=m +no_defs  <>
-# GDA94 / MGA zone 48 (deprecated)
+# GDA94 / MGA zone 48
 <28348> +proj=utm +zone=48 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # GDA94 / MGA zone 49
 <28349> +proj=utm +zone=49 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
@@ -7211,7 +8236,7 @@
 # SAD69 / Brazil Polyconic (deprecated)
 <29100> +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / Brazil Polyconic
-<29101> +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29101> +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 18N (deprecated)
 <29118> +proj=utm +zone=18 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 19N (deprecated)
@@ -7223,15 +8248,15 @@
 # SAD69 / UTM zone 22N (deprecated)
 <29122> +proj=utm +zone=22 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 18N
-<29168> +proj=utm +zone=18 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29168> +proj=utm +zone=18 +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 19N
-<29169> +proj=utm +zone=19 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29169> +proj=utm +zone=19 +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 20N
-<29170> +proj=utm +zone=20 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29170> +proj=utm +zone=20 +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 21N
-<29171> +proj=utm +zone=21 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29171> +proj=utm +zone=21 +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 22N
-<29172> +proj=utm +zone=22 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29172> +proj=utm +zone=22 +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 17S (deprecated)
 <29177> +proj=utm +zone=17 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 18S (deprecated)
@@ -7251,23 +8276,23 @@
 # SAD69 / UTM zone 25S (deprecated)
 <29185> +proj=utm +zone=25 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 17S
-<29187> +proj=utm +zone=17 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29187> +proj=utm +zone=17 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 18S
-<29188> +proj=utm +zone=18 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29188> +proj=utm +zone=18 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 19S
-<29189> +proj=utm +zone=19 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29189> +proj=utm +zone=19 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 20S
-<29190> +proj=utm +zone=20 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29190> +proj=utm +zone=20 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 21S
-<29191> +proj=utm +zone=21 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29191> +proj=utm +zone=21 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 22S
-<29192> +proj=utm +zone=22 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29192> +proj=utm +zone=22 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 23S
-<29193> +proj=utm +zone=23 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29193> +proj=utm +zone=23 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 24S
-<29194> +proj=utm +zone=24 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29194> +proj=utm +zone=24 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # SAD69 / UTM zone 25S
-<29195> +proj=utm +zone=25 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs  <>
+<29195> +proj=utm +zone=25 +south +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +units=m +no_defs  <>
 # Sapper Hill 1943 / UTM zone 20S
 <29220> +proj=utm +zone=20 +south +ellps=intl +towgs84=-355,21,72,0,0,0,0 +units=m +no_defs  <>
 # Sapper Hill 1943 / UTM zone 21S
@@ -8626,3 +9651,579 @@
 <32761> +proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs  <>
 # WGS 84 / TM 36 SE
 <32766> +proj=tmerc +lat_0=0 +lon_0=36 +k=0.9996 +x_0=500000 +y_0=10000000 +datum=WGS84 +units=m +no_defs  <>
+# TWD97
+<3822> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# IGRS
+<3887> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# MOLDREF99
+<4000> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGRDC 2005
+<4039> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# SREF98
+<4073> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# REGCAN95
+<4079> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# WGS 84 (geocentric)
+<4328> +proj=geocent +datum=WGS84 +units=m +no_defs  <>
+# ITRF88 (geocentric)
+<4330> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF89 (geocentric)
+<4331> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF90 (geocentric)
+<4332> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF91 (geocentric)
+<4333> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF92 (geocentric)
+<4334> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF93 (geocentric)
+<4335> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF94 (geocentric)
+<4336> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF96 (geocentric)
+<4337> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF97 (geocentric)
+<4338> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Australian Antarctic (geocentric)
+<4340> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# EST97 (geocentric)
+<4342> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# CHTRF95 (geocentric)
+<4344> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRS89 (geocentric)
+<4346> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# GDA94 (geocentric)
+<4348> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Hartebeesthoek94 (geocentric)
+<4350> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# IRENET95 (geocentric)
+<4352> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# JGD2000 (geocentric)
+<4354> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# LKS94 (ETRS89) (geocentric)
+<4356> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Moznet (geocentric)
+<4358> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# NAD83(CSRS) (geocentric)
+<4360> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(HARN) (geocentric)
+<4362> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NZGD2000 (geocentric)
+<4364> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# POSGAR 98 (geocentric)
+<4366> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# REGVEN (geocentric)
+<4368> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGF93 (geocentric)
+<4370> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGFG95 (geocentric)
+<4372> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGR92 (geocentric)
+<4374> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# SIRGAS (geocentric)
+<4376> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# SWEREF99 (geocentric)
+<4378> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Yemen NGN96 (geocentric)
+<4380> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# RGNC 1991 (geocentric)
+<4382> +proj=geocent +ellps=intl +units=m +no_defs  <>
+# RRAF 1991 (geocentric)
+<4384> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# ITRF2000 (geocentric)
+<4385> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ISN93 (geocentric)
+<4387> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# LKS92 (geocentric)
+<4389> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGSPM06
+<4465> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGM04
+<4468> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Cadastre 1997
+<4473> +proj=geocent +ellps=intl +units=m +no_defs  <>
+# China Geodetic Coordinate System 2000
+<4479> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Mexico ITRF92
+<4481> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RRAF 1991
+<4556> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Slovenia 1996
+<4882> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RSRGD2000
+<4884> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# BDA2000
+<4886> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# HTRS96
+<4888> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# WGS 66
+<4890> +proj=geocent +ellps=WGS66 +units=m +no_defs  <>
+# NAD83(NSRS2007)
+<4892> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# JAD2001
+<4894> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# ITRF2005
+<4896> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# DGN95
+<4897> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# LGD2006
+<4899> +proj=geocent +ellps=intl +units=m +no_defs  <>
+# RGNC91-93
+<4906> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# GR96
+<4908> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF88
+<4910> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF89
+<4911> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF90
+<4912> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF91
+<4913> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF92
+<4914> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF93
+<4915> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF94
+<4916> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF96
+<4917> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF97
+<4918> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF2000
+<4919> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# GDM2000
+<4920> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# PZ-90
+<4922> +proj=geocent +a=6378136 +b=6356751.361745712 +units=m +no_defs  <>
+# Mauritania 1999
+<4924> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Korea 2000
+<4926> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# POSGAR 94
+<4928> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# Australian Antarctic
+<4930> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# CHTRF95
+<4932> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# EST97
+<4934> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRS89
+<4936> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# GDA94
+<4938> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Hartebeesthoek94
+<4940> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# IRENET95
+<4942> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ISN93
+<4944> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# JGD2000
+<4946> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# LKS92
+<4948> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# LKS94
+<4950> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Moznet
+<4952> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# NAD83(CSRS)
+<4954> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(HARN)
+<4956> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NZGD2000
+<4958> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# POSGAR 98
+<4960> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# REGVEN
+<4962> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGF93
+<4964> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGFG95
+<4966> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGNC 1991
+<4968> +proj=geocent +ellps=intl +units=m +no_defs  <>
+# RGR92
+<4970> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RRAF 1991
+<4972> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# SIRGAS 1995
+<4974> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# SWEREF99
+<4976> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# WGS 84
+<4978> +proj=geocent +datum=WGS84 +units=m +no_defs  <>
+# Yemen NGN96
+<4980> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# IGM95
+<4982> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# WGS 72
+<4984> +proj=geocent +ellps=WGS72 +units=m +no_defs  <>
+# WGS 72BE
+<4986> +proj=geocent +ellps=WGS72 +units=m +no_defs  <>
+# SIRGAS 2000
+<4988> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Lao 1993
+<4990> +proj=geocent +ellps=krass +units=m +no_defs  <>
+# Lao 1997
+<4992> +proj=geocent +ellps=krass +units=m +no_defs  <>
+# PRS92
+<4994> +proj=geocent +ellps=clrk66 +units=m +no_defs  <>
+# MAGNA-SIRGAS
+<4996> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGPF
+<4998> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# PTRA08
+<5011> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# GDBD2009
+<5244> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# TUREF
+<5250> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# DRUKREF 03
+<5262> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ISN2004
+<5322> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF2008
+<5332> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# POSGAR 2007
+<5341> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# MARGEN
+<5352> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# SIRGAS-Chile
+<5358> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# CR05
+<5363> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# MACARIO SOLIS
+<5368> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Peru96
+<5369> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# SIRGAS-ROU98
+<5379> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# SIRGAS_ES2007.8
+<5391> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RGAF09
+<5487> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# PNG94
+<5544> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# UCS-2000
+<5558> +proj=geocent +ellps=krass +units=m +no_defs  <>
+# FEH2010
+<5591> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# DB_REF
+<5828> +proj=geocent +ellps=bessel +units=m +no_defs  <>
+# TGD2005
+<5884> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# CIGD11
+<6133> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011)
+<6317> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(PA11)
+<6320> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(MA11)
+<6323> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# Mexico ITRF2008
+<6363> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# JGD2011
+<6666> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# RDN2008
+<6704> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CORS96)
+<6781> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# KKJ / Finland Uniform Coordinate System + N60 height
+<3901> +proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl +towgs84=-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496 +units=m +vunits=m +no_defs  <>
+# ETRS89 / TM35FIN(N,E) + N60 height
+<3902> +proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / TM35FIN(N,E) + N2000 height
+<3903> +proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / DKTM1 + DVR90 height
+<4097> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.99998 +x_0=200000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / DKTM2 + DVR90 height
+<4098> +proj=tmerc +lat_0=0 +lon_0=10 +k=0.99998 +x_0=400000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / DKTM3 + DVR90 height
+<4099> +proj=tmerc +lat_0=0 +lon_0=11.75 +k=0.99998 +x_0=600000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / DKTM4 + DVR90 height
+<4100> +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=800000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / Faroe TM + FVR09 height
+<5318> +proj=tmerc +lat_0=0 +lon_0=-7 +k=0.999997 +x_0=200000 +y_0=-6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83 + NAVD88 height
+<5498> +proj=longlat +datum=NAD83 +geoidgrids=g2012a_conus.gtx,g2012a_alaska.gtx,g2012a_guam.gtx,g2012a_hawaii.gtx,g2012a_puertorico.gtx,g2012a_samoa.gtx +vunits=m +no_defs  <>
+# NAD83(HARN) + NAVD88 height
+<5499> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +geoidgrids=g2012a_conus.gtx,g2012a_alaska.gtx,g2012a_guam.gtx,g2012a_hawaii.gtx,g2012a_puertorico.gtx,g2012a_samoa.gtx +vunits=m +no_defs  <>
+# NAD83(NSRS2007) + NAVD88 height
+<5500> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +geoidgrids=g2012a_conus.gtx,g2012a_alaska.gtx,g2012a_guam.gtx,g2012a_hawaii.gtx,g2012a_puertorico.gtx,g2012a_samoa.gtx +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 31N + DHHN92 height
+<5554> +proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 32N + DHHN92 height
+<5555> +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 33N + DHHN92 height
+<5556> +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# FEH2010 / Fehmarnbelt TM + FCSVR10 height
+<5598> +proj=tmerc +lat_0=0 +lon_0=11.33333333333333 +k=1 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 + RH2000 height
+<5628> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs  <>
+# RGF93 / Lambert-93 + NGF-IGN69 height
+<5698> +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# RGF93 / Lambert-93 + NGF-IGN78 height
+<5699> +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NTF (Paris) / Lambert zone I + NGF-IGN69 height
+<5707> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# NTF (Paris) / Lambert zone IV + NGF-IGN78 height
+<5708> +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# DB_REF / 3-degree Gauss-Kruger zone 2 (E-N) + DHHN92 height
+<5832> +proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +units=m +vunits=m +no_defs  <>
+# DB_REF / 3-degree Gauss-Kruger zone 3 (E-N) + DHHN92 height
+<5833> +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +units=m +vunits=m +no_defs  <>
+# DB_REF / 3-degree Gauss-Kruger zone 4 (E-N) + DHHN92 height
+<5834> +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +vunits=m +no_defs  <>
+# DB_REF / 3-degree Gauss-Kruger zone 5 (E-N) + DHHN92 height
+<5835> +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +vunits=m +no_defs  <>
+# SWEREF99 TM + RH2000 height
+<5845> +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 12 00 + RH2000 height
+<5846> +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 13 30 + RH2000 height
+<5847> +proj=tmerc +lat_0=0 +lon_0=13.5 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 15 00 + RH2000 height
+<5848> +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 16 30 + RH2000 height
+<5849> +proj=tmerc +lat_0=0 +lon_0=16.5 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 18 00 + RH2000 height
+<5850> +proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 14 15 + RH2000 height
+<5851> +proj=tmerc +lat_0=0 +lon_0=14.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 15 45 + RH2000 height
+<5852> +proj=tmerc +lat_0=0 +lon_0=15.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 17 15 + RH2000 height
+<5853> +proj=tmerc +lat_0=0 +lon_0=17.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 18 45 + RH2000 height
+<5854> +proj=tmerc +lat_0=0 +lon_0=18.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 20 15 + RH2000 height
+<5855> +proj=tmerc +lat_0=0 +lon_0=20.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 21 45 + RH2000 height
+<5856> +proj=tmerc +lat_0=0 +lon_0=21.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SWEREF99 23 15 + RH2000 height
+<5857> +proj=tmerc +lat_0=0 +lon_0=23.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 + NN2000 height
+<5942> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 5 + NN2000 height
+<5945> +proj=tmerc +lat_0=58 +lon_0=5.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 6 + NN2000 height
+<5946> +proj=tmerc +lat_0=58 +lon_0=6.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 7 + NN2000 height
+<5947> +proj=tmerc +lat_0=58 +lon_0=7.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 8 + NN2000 height
+<5948> +proj=tmerc +lat_0=58 +lon_0=8.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 9 + NN2000 height
+<5949> +proj=tmerc +lat_0=58 +lon_0=9.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 10 + NN2000 height
+<5950> +proj=tmerc +lat_0=58 +lon_0=10.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 11 + NN2000 height
+<5951> +proj=tmerc +lat_0=58 +lon_0=11.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 12 + NN2000 height
+<5952> +proj=tmerc +lat_0=58 +lon_0=12.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 13 + NN2000 height
+<5953> +proj=tmerc +lat_0=58 +lon_0=13.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 14 + NN2000 height
+<5954> +proj=tmerc +lat_0=58 +lon_0=14.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 15 + NN2000 height
+<5955> +proj=tmerc +lat_0=58 +lon_0=15.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 16 + NN2000 height
+<5956> +proj=tmerc +lat_0=58 +lon_0=16.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 17 + NN2000 height
+<5957> +proj=tmerc +lat_0=58 +lon_0=17.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 18 + NN2000 height
+<5958> +proj=tmerc +lat_0=58 +lon_0=18.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 19 + NN2000 height
+<5959> +proj=tmerc +lat_0=58 +lon_0=19.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 20 + NN2000 height
+<5960> +proj=tmerc +lat_0=58 +lon_0=20.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 21 + NN2000 height
+<5961> +proj=tmerc +lat_0=58 +lon_0=21.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 22 + NN2000 height
+<5962> +proj=tmerc +lat_0=58 +lon_0=22.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 23 + NN2000 height
+<5963> +proj=tmerc +lat_0=58 +lon_0=23.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 24 + NN2000 height
+<5964> +proj=tmerc +lat_0=58 +lon_0=24.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 25 + NN2000 height
+<5965> +proj=tmerc +lat_0=58 +lon_0=25.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 26 + NN2000 height
+<5966> +proj=tmerc +lat_0=58 +lon_0=26.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 27 + NN2000 height
+<5967> +proj=tmerc +lat_0=58 +lon_0=27.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 28 + NN2000 height
+<5968> +proj=tmerc +lat_0=58 +lon_0=28.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 29 + NN2000 height
+<5969> +proj=tmerc +lat_0=58 +lon_0=29.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 30 + NN2000 height
+<5970> +proj=tmerc +lat_0=58 +lon_0=30.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 31 + NN2000 height
+<5971> +proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 32 + NN2000 height
+<5972> +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 33 + NN2000 height
+<5973> +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 34 + NN2000 height
+<5974> +proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 35 + NN2000 height
+<5975> +proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 36 + NN2000 height
+<5976> +proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 + NN54 height
+<6144> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 5 + NN54 height
+<6145> +proj=tmerc +lat_0=58 +lon_0=5.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 6 + NN54 height
+<6146> +proj=tmerc +lat_0=58 +lon_0=6.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 7 + NN54 height
+<6147> +proj=tmerc +lat_0=58 +lon_0=7.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 8 + NN54 height
+<6148> +proj=tmerc +lat_0=58 +lon_0=8.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 9 + NN54 height
+<6149> +proj=tmerc +lat_0=58 +lon_0=9.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 10 + NN54 height
+<6150> +proj=tmerc +lat_0=58 +lon_0=10.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 11 + NN54 height
+<6151> +proj=tmerc +lat_0=58 +lon_0=11.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 12 + NN54 height
+<6152> +proj=tmerc +lat_0=58 +lon_0=12.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 13 + NN54 height
+<6153> +proj=tmerc +lat_0=58 +lon_0=13.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 14 + NN54 height
+<6154> +proj=tmerc +lat_0=58 +lon_0=14.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 15 + NN54 height
+<6155> +proj=tmerc +lat_0=58 +lon_0=15.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 16 + NN54 height
+<6156> +proj=tmerc +lat_0=58 +lon_0=16.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 17 + NN54 height
+<6157> +proj=tmerc +lat_0=58 +lon_0=17.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 18 + NN54 height
+<6158> +proj=tmerc +lat_0=58 +lon_0=18.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 19 + NN54 height
+<6159> +proj=tmerc +lat_0=58 +lon_0=19.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 20 + NN54 height
+<6160> +proj=tmerc +lat_0=58 +lon_0=20.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 21 + NN54 height
+<6161> +proj=tmerc +lat_0=58 +lon_0=21.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 22 + NN54 height
+<6162> +proj=tmerc +lat_0=58 +lon_0=22.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 23 + NN54 height
+<6163> +proj=tmerc +lat_0=58 +lon_0=23.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 24 + NN54 height
+<6164> +proj=tmerc +lat_0=58 +lon_0=24.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 25 + NN54 height
+<6165> +proj=tmerc +lat_0=58 +lon_0=25.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 26 + NN54 height
+<6166> +proj=tmerc +lat_0=58 +lon_0=26.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 27 + NN54 height
+<6167> +proj=tmerc +lat_0=58 +lon_0=27.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 28 + NN54 height
+<6168> +proj=tmerc +lat_0=58 +lon_0=28.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 29 + NN54 height
+<6169> +proj=tmerc +lat_0=58 +lon_0=29.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / NTM zone 30 + NN54 height
+<6170> +proj=tmerc +lat_0=58 +lon_0=30.5 +k=1 +x_0=100000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 31 + NN54 height
+<6171> +proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 32 + NN54 height
+<6172> +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 33 + NN54 height
+<6173> +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 34 + NN54 height
+<6174> +proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 35 + NN54 height
+<6175> +proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 36 + NN54 height
+<6176> +proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# Belge 1972 / Belgian Lambert 72 + Ostend height
+<6190> +proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=5400088.438 +ellps=intl +towgs84=-106.869,52.2978,-103.724,0.3366,-0.457,1.8422,-1.2747 +units=m +vunits=m +no_defs  <>
+# NAD83(2011) + NAVD88 height
+<6349> +proj=longlat +ellps=GRS80 +geoidgrids=g2012a_conus.gtx,g2012a_alaska.gtx,g2012a_guam.gtx,g2012a_hawaii.gtx,g2012a_puertorico.gtx,g2012a_samoa.gtx +vunits=m +no_defs  <>
+# NAD83(CSRS) + CGVD2013 height
+<6649> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 7N + CGVD2013 height
+<6650> +proj=utm +zone=7 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 8N + CGVD2013 height
+<6651> +proj=utm +zone=8 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 9N + CGVD2013 height
+<6652> +proj=utm +zone=9 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 10N + CGVD2013 height
+<6653> +proj=utm +zone=10 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 11N + CGVD2013 height
+<6654> +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 12N + CGVD2013 height
+<6655> +proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 13N + CGVD2013 height
+<6656> +proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 14N + CGVD2013 height
+<6657> +proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 15N + CGVD2013 height
+<6658> +proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 16N + CGVD2013 height
+<6659> +proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 17N + CGVD2013 height
+<6660> +proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 18N + CGVD2013 height
+<6661> +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 19N + CGVD2013 height
+<6662> +proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 20N + CGVD2013 height
+<6663> +proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 21N + CGVD2013 height
+<6664> +proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NAD83(CSRS) / UTM zone 22N + CGVD2013 height
+<6665> +proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# JGD2000 + JGD2000 (vertical) height
+<6696> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs  <>
+# JGD2011 + JGD2011 (vertical) height
+<6697> +proj=longlat +ellps=GRS80 +vunits=m +no_defs  <>
+# Tokyo + JSLD72 height
+<6700> +proj=longlat +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0 +vunits=m +no_defs  <>
+# WGS 84 / Pseudo-Mercator +  EGM2008 geoid height
+<6871> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +geoidgrids=egm08_25.gtx +vunits=m +no_defs  <>
+# NTF (Paris) + NGF IGN69 height
+<7400> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +vunits=m +no_defs  <>
+# NTF (Paris) / France II + NGF Lallemand
+<7401> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# NTF (Paris) / France II + NGF IGN69
+<7402> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# NTF (Paris) / France III + NGF IGN69
+<7403> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# RT90 + RH70 height
+<7404> +proj=longlat +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +vunits=m +no_defs  <>
+# OSGB 1936 / British National Grid + ODN height
+<7405> +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +vunits=m +no_defs  <>
+# NAD27 + NGVD29 height
+<7406> +proj=longlat +datum=NAD27 +vunits=us-ft +no_defs  <>
+# NAD27 / Texas North + NGVD29 height
+<7407> +proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +vunits=us-ft +no_defs  <>
+# RD/NAP
+<7408> +proj=longlat +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +vunits=m +no_defs  <>
+# ETRS89 + EVRF2000 height
+<7409> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs  <>
+# PSHD93
+<7410> +proj=longlat +ellps=clrk80 +towgs84=-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101 +vunits=m +no_defs  <>
+# NTF (Paris) / Lambert zone II + NGF Lallemand height
+<7411> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# NTF (Paris) / Lambert zone II + NGF IGN69
+<7412> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# NTF (Paris) / Lambert zone III + NGF IGN69
+<7413> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# Tokyo + JSLD69 height
+<7414> +proj=longlat +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0 +vunits=m +no_defs  <>
+# Amersfoort / RD New + NAP height
+<7415> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 32N + DVR90 height
+<7416> +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / UTM zone 33N + DVR90 height
+<7417> +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / Kp2000 Jutland + DVR90 height
+<7418> +proj=tmerc +lat_0=0 +lon_0=9.5 +k=0.99995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / Kp2000 Zealand + DVR90 height
+<7419> +proj=tmerc +lat_0=0 +lon_0=12 +k=0.99995 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# ETRS89 / Kp2000 Bornholm + DVR90 height
+<7420> +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# NTF (Paris) / Lambert zone II + NGF-IGN69 height
+<7421> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# NTF (Paris) / Lambert zone III + NGF-IGN69 height
+<7422> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +no_defs  <>
+# ETRS89 + EVRF2007 height
+<7423> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs  <>
diff --git a/lib/pyproj/data/ntv2_out.dist b/lib/pyproj/data/ntv2_out.dist
index 61dff4f..5ce26e6 100644
--- a/lib/pyproj/data/ntv2_out.dist
+++ b/lib/pyproj/data/ntv2_out.dist
@@ -1,11 +1,11 @@
 ##############################################################
 Point in the ONwinsor subgrid.
-82d00'00.000"W 42d00'00.000"N 0.0	81d59'59.61037"W	42d0'0.1602"N 0.000
-82d00'01.000"W 42d00'00.000"N 0.0	82d0'0.610403"W	42d0'0.160204"N 0.000
-82d00'02.000"W 42d00'00.000"N 0.0	82d0'1.610436"W	42d0'0.160209"N 0.000
-84d00'00.000"W 42d00'00.000"N 0.0	83d59'59.85928"W	42d0'0.18003"N 0.000
+82d00'00.000"W 42d00'00.000"N 0.0	81d59'59.6104"W	42d0'0.1602"N 0.000
+82d00'01.000"W 42d00'00.000"N 0.0	82d0'0.6104"W	42d0'0.1602"N 0.000
+82d00'02.000"W 42d00'00.000"N 0.0	82d0'1.6104"W	42d0'0.1602"N 0.000
+84d00'00.000"W 42d00'00.000"N 0.0	83d59'59.8593"W	42d0'0.18"N 0.000
 ##############################################################
 Try with NTv2 and NTv1 together ... falls back to NTv1
-99d00'00.000"W 65d00'00.000"N 0.0	99d0'1.58847"W	65d0'1.34815"N 0.000
-111d00'00.000"W 46d00'00.000"N 0.0	111d0'3.15487"W	45d59'59.75279"N 0.000
+99d00'00.000"W 65d00'00.000"N 0.0	99d0'1.5885"W	65d0'1.3482"N 0.000
+111d00'00.000"W 46d00'00.000"N 0.0	111d0'3.1549"W	45d59'59.7528"N 0.000
 111d00'00.000"W 47d30'00.000"N 0.0	111d0'2.7989"W	47d29'59.9896"N 0.000
diff --git a/lib/pyproj/data/testntv2 b/lib/pyproj/data/testntv2
index 4a4cfb2..5a9e1a7 100755
--- a/lib/pyproj/data/testntv2
+++ b/lib/pyproj/data/testntv2
@@ -35,7 +35,7 @@ echo "##############################################################" >> ${OUT}
 echo Point in the ONwinsor subgrid. >> ${OUT}
 #
 $EXE +proj=latlong +ellps=clrk66 +nadgrids=ntv2_0.gsb \
- +to +proj=latlong +datum=NAD83 -E -w6 >>${OUT} <<EOF
+ +to +proj=latlong +datum=NAD83 -E -w4 >>${OUT} <<EOF
 82d00'00.000"W 42d00'00.000"N 0.0
 82d00'01.000"W 42d00'00.000"N 0.0
 82d00'02.000"W 42d00'00.000"N 0.0
@@ -46,7 +46,7 @@ echo "##############################################################" >> ${OUT}
 echo Try with NTv2 and NTv1 together ... falls back to NTv1 >> ${OUT}
 #
 $EXE +proj=latlong +ellps=clrk66 +nadgrids=ntv2_0.gsb,ntv1_can.dat,conus \
- +to +proj=latlong +datum=NAD83 -E -w6 >>${OUT} <<EOF
+ +to +proj=latlong +datum=NAD83 -E -w4 >>${OUT} <<EOF
 99d00'00.000"W 65d00'00.000"N 0.0
 111d00'00.000"W 46d00'00.000"N 0.0
 111d00'00.000"W 47d30'00.000"N 0.0
diff --git a/lib/pyproj/data/testvarious b/lib/pyproj/data/testvarious
index 31a86c9..4c427cd 100755
--- a/lib/pyproj/data/testvarious
+++ b/lib/pyproj/data/testvarious
@@ -7,7 +7,7 @@ EXE=$1
 
 usage()
 {
-    echo "Usage: ${0} <path to 'cs2cs' program>" 
+    echo "Usage: ${0} <path to 'cs2cs' program>"
     echo
     exit 1
 }
@@ -131,8 +131,8 @@ EOF
 #echo "#############################################################" >> ${OUT}
 #echo Test conversion between geocentric latlong and geodetic latlong >> ${OUT}
 #
-# The +geoc flag does not currently work with pj_transform() so this is 
-# disabled. 
+# The +geoc flag does not currently work with pj_transform() so this is
+# disabled.
 #
 #$EXE +proj=latlong +datum=WGS84 +geoc \
 # +to +proj=latlong +datum=WGS84  \
@@ -192,10 +192,10 @@ $EXE +proj=etmerc +k=0.998 +lon_0=-20 +datum=WGS84 +x_0=10000 +y_0=20000 \
  +to +proj=latlong +datum=WGS84 \
  -E >>${OUT} <<EOF
 10000 20000
-500000 2000000  
-1000000 2000000  
-2000000 2000000  
-4000000 2000000  
+500000 2000000
+1000000 2000000
+2000000 2000000
+4000000 2000000
 EOF
 #
 echo "##############################################################" >> ${OUT}
@@ -205,10 +205,10 @@ $EXE +proj=latlong +datum=WGS84 \
  +to +proj=etmerc +k=0.998 +lon_0=-20 +datum=WGS84 +x_0=10000 +y_0=20000 \
  -E >>${OUT} <<EOF
 0dN 0.000
-15d22'16.108"W	17d52'53.478"N 0.000  
-10d40'55.532"W	17d42'48.526"N 0.000  
-1d32'21.33"W	17d3'47.233"N 0.000  
-15d4'42.357"E	14d48'56.372"N 0.000  
+15d22'16.108"W	17d52'53.478"N 0.000
+10d40'55.532"W	17d42'48.526"N 0.000
+1d32'21.33"W	17d3'47.233"N 0.000
+15d4'42.357"E	14d48'56.372"N 0.000
 EOF
 #
 echo "##############################################################" >> ${OUT}
@@ -218,10 +218,10 @@ $EXE +proj=tmerc +k=0.998 +lon_0=-20 +datum=WGS84 +x_0=10000 +y_0=20000 \
  +to +proj=latlong +datum=WGS84 \
  -E >>${OUT} <<EOF
 10000 20000
-500000 2000000  
-1000000 2000000  
-2000000 2000000  
-4000000 2000000  
+500000 2000000
+1000000 2000000
+2000000 2000000
+4000000 2000000
 EOF
 #
 echo "##############################################################" >> ${OUT}
@@ -231,10 +231,10 @@ $EXE +proj=latlong +datum=WGS84 \
  +to +proj=tmerc +k=0.998 +lon_0=-20 +datum=WGS84 +x_0=10000 +y_0=20000 \
  -E >>${OUT} <<EOF
 0dN 0.000
-15d22'16.108"W	17d52'53.478"N 0.000  
-10d40'55.532"W	17d42'48.526"N 0.000  
-1d32'21.33"W	17d3'47.233"N 0.000  
-15d4'42.357"E	14d48'56.372"N 0.000  
+15d22'16.108"W	17d52'53.478"N 0.000
+10d40'55.532"W	17d42'48.526"N 0.000
+1d32'21.33"W	17d3'47.233"N 0.000
+15d4'42.357"E	14d48'56.372"N 0.000
 EOF
 #
 echo "##############################################################" >> ${OUT}
@@ -243,67 +243,197 @@ echo "Test robinson projection (#113)" >> ${OUT}
 $EXE +proj=latlong +datum=WGS84 \
  +to +proj=robin +datum=WGS84 \
  -E >>${OUT} <<EOF
--30 40 
+-30 40
 -35 45
+20 40
+EOF
+$EXE +proj=robin +datum=WGS84 \
+ +to +proj=latlong +datum=WGS84 \
+ -E >>${OUT} <<EOF
+-2612095.95     4276351.58 0.00
+-2963455.42     4805073.65 0.00
+1741397.30      4276351.58 0.00
 EOF
 echo "##############################################################" >> ${OUT}
-echo "Test forward projection on sphere" >> ${OUT}
+echo "Test healpix forward projection on sphere" >> ${OUT}
 $EXE +proj=latlong +a=1 +lon_0=0 \
  +to +proj=healpix +a=1 +lon_0=0  -f '%.'5'f' \
  -E >>${OUT} <<EOF
 0 41.81031
 -90 0
 EOF
-echo "Test inverse projection on sphere" >> ${OUT}
+$EXE +proj=latlong +R=5 \
+ +to +proj=healpix +R=5 -f '%.'5'f' \
+ -E >>${OUT} <<EOF
+0 0
+0 41.810314895778596
+0 -41.810314895778596
+90.0 0
+-90.0 0
+-180 0
+-180 90.0
+-180 -90.0
+0 60.0
+0 -60.0
+EOF
+echo "Test healpix inverse projection on sphere" >> ${OUT}
 $EXE +proj=latlong +a=1 +lon_0=0 \
  +to +proj=healpix +a=1 +lon_0=0  -f '%.'5'f' -I\
  -E >>${OUT} <<EOF
 0 0.7853981633974483
 -1.5707963267948966 0
 EOF
-echo "Test forward projection on ellipsoid" >> ${OUT}
+$EXE +proj=latlong +a=5 \
+ +to +proj=healpix +a=5 -f '%.'5'f' -I\
+ -E >>${OUT} <<EOF
+0.0 0.0
+0.0 3.9269908169872414
+0.0 -3.9269908169872414
+7.853981633974483 0.0
+-7.853981633974483 0.0
+-15.707963267948966 0.0
+-11.780972450961723 7.853981633974483
+-11.780972450961723 -7.853981633974483
+1.437378399445537 5.364369216432778
+1.437378399445537 -5.364369216432778
+EOF
+echo "Test healpix forward projection on ellipsoid" >> ${OUT}
 $EXE +proj=latlong +a=1 +lon_0=0 +ellps=WGS84 \
  +to +proj=healpix +a=1 +lon_0=0 +ellps=WGS84 -f '%.'5'f' \
  -E >>${OUT} <<EOF
 0 41.937853904844985
 -90 0
 EOF
-echo "Test inverse projection on ellipsoid" >> ${OUT}
+$EXE +proj=latlong +a=5 +e=0.8 +r_a=4.3220011711888882\
+ +to +proj=healpix +a=5 +e=0.8 +r_a=4.3220011711888882 -f '%.'5'f' \
+ -E >>${OUT} <<EOF
+0 0
+0 41.810314895778596
+0 -41.810314895778596
+90.0 0
+-90.0 0
+-180 0
+-180 90.0
+-180 -90.0
+0 60.0
+0 -60.0
+EOF
+echo "Test healpix inverse projection on ellipsoid" >> ${OUT}
 $EXE +proj=latlong +a=1 +lon_0=0 +ellps=WGS84 \
  +to +proj=healpix +a=1 +lon_0=0 +ellps=WGS84 -f '%.'5'f' -I\
  -E >>${OUT} <<EOF
 0 0.7853981633974483
 -1.5707963267948966 0
 EOF
-echo "##############################################################" >> ${OUT}
-echo "Test forward projection on sphere" >> ${OUT}
-$EXE +proj=latlong +a=1 +lon_0=0 \
- +to +proj=rhealpix +a=1 +lon_0=0 +npole=0 +spole=0 -f '%.'5'f' \
+$EXE +proj=latlong +a=5 +e=0.8 +r_a=4.3220011711888882\
+ +to +proj=healpix +a=5 +e=0.8 +r_a=4.3220011711888882 -f '%.'5'f' -I\
  -E >>${OUT} <<EOF
-0 41.81031
--90 0
+0.0 0.0
+0.0 2.0547874222147415
+0.0 -2.0547874222147415
+6.788983564106746 0.0
+-6.788983564106746 0.0
+-13.577967128213492 0.0
+-10.183475346160119 6.788983564106746
+-10.183475346160119 -6.788983564106746
+0.0 3.351278550178025
+0.0 -3.351278550178025
 EOF
-echo "Test inverse projection on sphere" >> ${OUT}
-$EXE +proj=latlong +a=1 +lon_0=0 \
- +to +proj=rhealpix +a=1 +lon_0=0 +npole=0 +spole=0 -f '%.'5'f' -I\
- -E >>${OUT} <<EOF
-0 0.7853981633974483
--1.5707963267948966 0
+
+echo "##############################################################" >> ${OUT}
+echo "Test rHEALPix forward projection on sphere north=0 south=0" >> ${OUT}
+$EXE +proj=latlong +R=5 \
+ +to +proj=rhealpix +R=5 +north_square=0 +south_square=0 -f '%.'5'f' \
+  -E >>${OUT} <<EOF
+-180 30.0
+-180 -25.714285714285715
+0 0
+60.0 41.809314895778598
 EOF
-echo "Test forward projection on ellipsoid" >> ${OUT}
-$EXE +proj=latlong +a=1 +lon_0=0 +ellps=WGS84 \
- +to +proj=rhealpix +a=1 +lon_0=0 +ellps=WGS84 +npole=0 +spole=0 -f '%.'5'f' \
- -E >>${OUT} <<EOF
-0 41.937853904844985
--90 0
+
+echo "##############################################################" >> ${OUT}
+echo "Test rHEALPix forward projection on sphere north=1 south=1" >> ${OUT}
+$EXE +proj=latlong +R=5 \
+ +to +proj=rhealpix +R=5 +north_square=1 +south_square=1 -f '%.'5'f' \
+  -E >>${OUT} <<EOF
+-180 30.0
+-180 -25.714285714285715
+0 0
+60.0 41.809314895778598
 EOF
-echo "Test inverse projection on ellipsoid" >> ${OUT}
-$EXE +proj=latlong +a=1 +lon_0=0 +ellps=WGS84 \
- +to +proj=rhealpix +a=1 +lon_0=0 -I +ellps=WGS84 +npole=0 +spole=0 -f '%.'5'f'\
+
+echo "##############################################################" >> ${OUT}
+echo "Test rHEALPix inverse projection on sphere north=0 south=0" >> ${OUT}
+$EXE +proj=latlong +R=5 \
+ +to +proj=rhealpix +R=5 +north_square=0 +south_square=0 -f '%.'5'f' -I\
+  -E >>${OUT} <<EOF
+0.0 0.0
+0.0 3.9269908169872414
+0.0 -3.9269908169872414
+7.853981633974483 0.0
+-7.853981633974483 0.0
+EOF
+
+echo "##############################################################" >> ${OUT}
+echo "Test rHEALPix inverse projection on sphere north=1 south=1" >> ${OUT}
+$EXE +proj=latlong +R=5 \
+ +to +proj=rhealpix +R=5 +north_square=1 +south_square=1 -f '%.'5'f' -I\
+  -E >>${OUT} <<EOF
+0.0 0.0
+0.0 3.9269908169872414
+0.0 -3.9269908169872414
+7.853981633974483 0.0
+-7.853981633974483 0.0
+EOF
+
+echo "##############################################################" >> ${OUT}
+echo "Test rHEALPix forward projection on ellipsoid north=0 south=0" >> ${OUT}
+$EXE +proj=latlong +a=5 +e=0.8 +r_a=4.3220011711888882\
+ +to +proj=rhealpix +a=5 +e=0.8 +r_a=4.3220011711888882 +north_square=0 +south_square=0 -f '%.'5'f' \
+  -E >>${OUT} <<EOF
+0 0
+0 41.810314895778596
+0 -41.810314895778596
+90.0 0
+-90.0 0
+EOF
+
+echo "##############################################################" >> ${OUT}
+echo "Test rHEALPix forward projection on ellipsoid north=1 south=1" >> ${OUT}
+$EXE +proj=latlong +a=5 +e=0.8 +r_a=4.3220011711888882\
+ +to +proj=rhealpix +a=5 +e=0.8 +r_a=4.3220011711888882 +north_square=1 +south_square=1 -f '%.'5'f' \
+  -E >>${OUT} <<EOF
+0 0
+0 41.810314895778596
+0 -41.810314895778596
+90.0 0
+-90.0 0
+EOF
+
+echo "##############################################################" >> ${OUT}
+echo "Test rHEALPix inverse projection on ellipsoid north=0 south=0" >> ${OUT}
+$EXE +proj=latlong +a=5 +e=0.8 +r_a=4.3220011711888882\
+ +to +proj=rhealpix +a=5 -I +e=0.8 +r_a=4.3220011711888882 +north_square=0 +south_square=0 -f '%.'5'f'\
+  -E >>${OUT} <<EOF
+0.0 0.0
+0.0 2.0547874222147415
+0.0 -2.0547874222147415
+6.788983564106746 0.0
+-6.788983564106746 0.0
+EOF
+
+echo "##############################################################" >> ${OUT}
+echo "Test rHEALPix inverse projection on ellipsoid north=1 south=1" >> ${OUT}
+$EXE +proj=latlong +a=5 +e=0.8 +r_a=4.3220011711888882\
+ +to +proj=rhealpix +a=5 -I +e=0.8 +r_a=4.3220011711888882 +north_square=1 +south_square=1 -f '%.'5'f'\
  -E >>${OUT} <<EOF
-0 0.7853981633974483
--1.5707963267948966 0
+0.0 0.0
+0.0 2.0547874222147415
+0.0 -2.0547874222147415
+6.788983564106746 0.0
+-6.788983564106746 0.0
 EOF
+
 echo "##############################################################" >> ${OUT}
 echo "Test geos projection" >> ${OUT}
 echo "Test geos on a sphere" >> ${OUT}
@@ -340,7 +470,7 @@ $EXE +proj=latlong +ellps=sphere \
 EOF
 echo "Test geos on a sphere with alternate sweep" >> ${OUT}
 $EXE +proj=latlong +ellps=sphere \
- +to +proj=geos +h=35785831.0 +lon_0=0 +ellps=sphere +sweep=y -E >>${OUT} <<EOF
+ +to +proj=geos +h=35785831.0 +lon_0=0 +ellps=sphere +sweep=x -E >>${OUT} <<EOF
 16d11'8" 58d35'31"
 -43d11'47" -22d54'30"
 18d25'26" -33d55'31"
@@ -348,7 +478,7 @@ $EXE +proj=latlong +ellps=sphere \
 EOF
 echo "Test geos on a ellipsoid with alternate sweep" >> ${OUT}
 $EXE +proj=latlong +ellps=sphere \
- +to +proj=geos +h=35785831.0 +lon_0=0 +ellps=WGS84 +sweep=y -E >>${OUT} <<EOF
+ +to +proj=geos +h=35785831.0 +lon_0=0 +ellps=WGS84 +sweep=x -E >>${OUT} <<EOF
 16d11'8" 58d35'31"
 -43d11'47" -22d54'30"
 18d25'26" -33d55'31"
@@ -356,7 +486,7 @@ $EXE +proj=latlong +ellps=sphere \
 EOF
 echo "Test inv geos on a sphere with alternate sweep" >> ${OUT}
 $EXE +proj=latlong +ellps=sphere \
- +to +proj=geos +h=35785831.0 +lon_0=0 +ellps=sphere +sweep=y -I -E >>${OUT} <<EOF
+ +to +proj=geos +h=35785831.0 +lon_0=0 +ellps=sphere +sweep=x -I -E >>${OUT} <<EOF
 841586.28 4961396.21
 -3772913.22 -2339604.71
 1601377.77 -3415545.15
@@ -364,7 +494,7 @@ $EXE +proj=latlong +ellps=sphere \
 EOF
 echo "Test inv geos on a ellipsoid with alternate sweep" >> ${OUT}
 $EXE +proj=latlong +ellps=sphere \
- +to +proj=geos +h=35785831.0 +lon_0=0 +ellps=WGS84 +sweep=y -I -E >>${OUT} <<EOF
+ +to +proj=geos +h=35785831.0 +lon_0=0 +ellps=WGS84 +sweep=x -I -E >>${OUT} <<EOF
 844731.03 4946509.59
 -3779077.27 -2327750.87
 1605067.15 -3400461.47
@@ -415,8 +545,160 @@ $EXE +proj=pconic  +units=m +lat_1=20n +lat_2=60n +lon_0=60W +datum=WGS84 \
  -E >>${OUT} <<EOF
 -2240096.40 -6940342.15
 EOF
+echo "##############################################################" >> ${OUT}
+echo "Test laea" >> ${OUT}
+#
+$EXE -f '%.12f' \
+     +proj=laea +lat_0=45 +lon_0=-100 +units=m +datum=WGS84 +no_defs \
+ +to +proj=latlong +datum=WGS84 \
+ -E >>${OUT} <<EOF
+-6086629.0 4488761.0
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test forward calcofi projection" >> ${OUT}
+$EXE +proj=latlong +ellps=clrk66 \
+ +to +proj=calcofi +ellps=clrk66 \
+ -E >>${OUT} <<EOF
+120d40'42.273"W	38d56'50.766"N
+121d9'W	34d9'N
+123d59'56.066"W	30d25'4.617"N
+EOF
+echo "Test inverse calcofi projection" >> ${OUT}
+$EXE +proj=calcofi +ellps=clrk66 \
+ +to +proj=longlat +ellps=clrk66 \
+ -E >>${OUT} <<EOF
+60 20
+80 60
+90 120
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Check inverse error handling with ob_tran (#225)" >> ${OUT}
+$EXE +proj=ob_tran \
+    +o_proj=moll +o_lon_p=LON_POLE +o_lat_p=LAT_POLE +lon_0=180 +ellps=WGS84 \
+ -E >>${OUT} <<EOF
+300000 400000
+20000000 30000000
+EOF
+echo "Test inverse handling" >> ${OUT}
+$EXE -I +proj=ob_tran \
+    +o_proj=moll +o_lon_p=LON_POLE +o_lat_p=LAT_POLE +lon_0=180 +ellps=WGS84 \
+ -E >>${OUT} <<EOF
+10 20
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test MGI datum gives expected results (#207)" >> ${OUT}
+#
+$EXE -f '%.14f' \
+     +proj=latlong +datum=WGS84 \
+ +to +init=epsg:31284 \
+ -E >>${OUT} <<EOF
+16.33 48.20
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test omerc sensitivity with locations 90d from origin(#114)" >> ${OUT}
+#
+$EXE -f '%.14f' \
+     +proj=latlong +ellps=WGS84 \
+ +to +proj=omerc +ellps=WGS84 +lon_1=62.581150 +lat_1=74.856102 \
+                 +lon_2=53.942810 +lat_2=74.905884 +units=km +no_rot +no_defs \
+ -E >>${OUT} <<EOF
+56.958381652832 72.8798
+56.9584 72.8798
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test omerc differences between poles (#190)" >> ${OUT}
+# First, north pole.
+$EXE -f '%.3f' \
+     +proj=latlong +ellps=WGS84 \
+ +to +proj=omerc +ellps=WGS84 +datum=WGS84 +no_rot \
+                 +lon_1=-27 +lat_1=70 +lon_2=-38 +lat_2=80 +lat_0=70 \
+ -E >>${OUT} <<EOF
+-27 70
+-27 80
+-27 89.9
+163 89.9
+163 80
+EOF
+# Again, for the south pole.
+$EXE -f '%.3f' \
+     +proj=latlong +ellps=WGS84 \
+ +to +proj=omerc +ellps=WGS84 +datum=WGS84 +no_rot \
+                 +lon_1=-27 +lat_1=-70 +lon_2=-38 +lat_2=-80 +lat_0=-70 \
+ -E >>${OUT} <<EOF
+-27 -70
+-27 -80
+-27 -89.9
+163 -89.9
+163 -80
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test qsc" >> ${OUT}
+#
+$EXE -f '%.13f' \
+     +proj=latlong +datum=WGS84 \
+ +to +proj=qsc +datum=WGS84 +no_defs \
+ -E >>${OUT} <<EOF
+13 -10
+EOF
+$EXE -f '%.13f' \
+     +proj=qsc +datum=WGS84 +no_defs \
+ +to +proj=latlong +datum=WGS84 \
+ -E >>${OUT} <<EOF
+2073986.94908809568733	-1680858.27222427958623
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test bug 229" >> ${OUT}
+#
+$EXE -f '%.13f' \
+     +init=epsg:4326 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0 \
+ +to +proj=latlong +datum=WGS84 +no_defs \
+ -E >>${OUT} <<EOF
+13 -10
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test bug 229 (2)" >> ${OUT}
+#
+$EXE -f '%.13f' \
+     +init=epsg:4326 +to +init=epsg:4326 \
+ -E >>${OUT} <<EOF
+13 -10
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test bug 244 " >> ${OUT}
+#
+$EXE -f '%.12f' \
+     +init=epsg:4326 \
+     +to +proj=aeqd +lon_0=130.0 +lat_0=40.0 +a=6378137 +b=6378137 +units=m +no_defs \
+ -E >>${OUT} <<EOF
+-140.100000 -87.000000
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test bug 244 (2)" >> ${OUT}
+#
+$EXE -f '%.12f' \
+     +proj=aeqd +lon_0=130.0 +lat_0=40.0 +a=6378137 +b=6378137 +units=m +no_defs \
+     +to +init=epsg:4326 \
+ -E >>${OUT} <<EOF
+987122.4183302754536 -14429896.5395309105515
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test bug 245 (use +datum=carthage)" >> ${OUT}
+#
+$EXE -f '%.12f' \
+     +proj=longlat +datum=WGS84 +nodefs +to +proj=utm +zone=32 +datum=carthage +nodefs \
+ -E >>${OUT} <<EOF
+10 34
+EOF
+echo "##############################################################" >> ${OUT}
+echo "Test bug 245 (use expension of +datum=carthage)" >> ${OUT}
+#
+$EXE -f '%.12f' \
+     +proj=longlat +datum=WGS84 +nodefs +to +proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-263.0,6.0,431.0 +nodefs \
+ -E >>${OUT} <<EOF
+10 34
+EOF
 ##############################################################################
-# Done! 
+# Done!
 # do 'diff' with distribution results
 echo "diff ${OUT} with ${OUT}.dist"
 diff -b ${OUT} ${OUT}.dist
diff --git a/lib/pyproj/data/tv_out.dist b/lib/pyproj/data/tv_out.dist
index 20d00d3..a9d5120 100644
--- a/lib/pyproj/data/tv_out.dist
+++ b/lib/pyproj/data/tv_out.dist
@@ -58,61 +58,146 @@ Test RSO Borneo projection (re: ticket 62)
 ##############################################################
 Test extended transverse mercator (#97)
 10000 20000	20dW	0dN 0.000
-500000 2000000	15d22'16.108"W	17d52'53.478"N 0.000  
-1000000 2000000	10d40'55.532"W	17d42'48.526"N 0.000  
-2000000 2000000	1d32'21.33"W	17d3'47.233"N 0.000  
-4000000 2000000	15d4'42.357"E	14d48'56.372"N 0.000  
+500000 2000000	15d22'16.108"W	17d52'53.478"N 0.000
+1000000 2000000	10d40'55.532"W	17d42'48.526"N 0.000
+2000000 2000000	1d32'21.33"W	17d3'47.233"N 0.000
+4000000 2000000	15d4'42.357"E	14d48'56.372"N 0.000
 ##############################################################
 Test extended transverse mercator inverse (#97)
 0dN 0.000	2278817.00	20000.00 0.00
-15d22'16.108"W	17d52'53.478"N 0.000	499999.99	2000000.01 0.00  
-10d40'55.532"W	17d42'48.526"N 0.000	999999.99	1999999.99 0.00  
-1d32'21.33"W	17d3'47.233"N 0.000	2000000.00	1999999.99 0.00  
-15d4'42.357"E	14d48'56.372"N 0.000	4000000.00	2000000.01 0.00  
+15d22'16.108"W	17d52'53.478"N 0.000	499999.99	2000000.01 0.00
+10d40'55.532"W	17d42'48.526"N 0.000	999999.99	1999999.99 0.00
+1d32'21.33"W	17d3'47.233"N 0.000	2000000.00	1999999.99 0.00
+15d4'42.357"E	14d48'56.372"N 0.000	4000000.00	2000000.01 0.00
 ##############################################################
 Test transverse mercator (#97)
 10000 20000	20dW	0dN 0.000
-500000 2000000	15d22'16.108"W	17d52'53.478"N 0.000  
-1000000 2000000	10d40'55.532"W	17d42'48.526"N 0.000  
-2000000 2000000	1d32'21.399"W	17d3'47.244"N 0.000  
-4000000 2000000	15d4'6.539"E	14d49'7.331"N 0.000  
+500000 2000000	15d22'16.108"W	17d52'53.478"N 0.000
+1000000 2000000	10d40'55.532"W	17d42'48.526"N 0.000
+2000000 2000000	1d32'21.399"W	17d3'47.244"N 0.000
+4000000 2000000	15d4'6.539"E	14d49'7.331"N 0.000
 ##############################################################
 Test transverse mercator inverse (#97)
 0dN 0.000	2278812.96	20000.00 0.00
-15d22'16.108"W	17d52'53.478"N 0.000	499999.99	2000000.01 0.00  
-10d40'55.532"W	17d42'48.526"N 0.000	999999.99	1999999.99 0.00  
-1d32'21.33"W	17d3'47.233"N 0.000	2000000.03	1999999.62 0.00  
-15d4'42.357"E	14d48'56.372"N 0.000	3999967.33	1999855.31 0.00  
+15d22'16.108"W	17d52'53.478"N 0.000	499999.99	2000000.01 0.00
+10d40'55.532"W	17d42'48.526"N 0.000	999999.99	1999999.99 0.00
+1d32'21.33"W	17d3'47.233"N 0.000	2000000.03	1999999.62 0.00
+15d4'42.357"E	14d48'56.372"N 0.000	3999967.33	1999855.31 0.00
 ##############################################################
 Test robinson projection (#113)
--30 40	-2612095.95	4276351.58 0.00 
+-30 40	-2612095.95	4276351.58 0.00
 -35 45	-2963455.42	4805073.65 0.00
+20 40	1741397.30	4276351.58 0.00
+-2612095.95     4276351.58 0.00	30d0'0.004"W	40d0'0.066"N 0.000
+-2963455.42     4805073.65 0.00	35dW	45dN 0.000
+1741397.30      4276351.58 0.00	20d0'0.002"E	40d0'0.066"N 0.000
 ##############################################################
-Test forward projection on sphere
+Test healpix forward projection on sphere
 0 41.81031	0.00000	0.78540 0.00000
 -90 0	-1.57080	0.00000 0.00000
-Test inverse projection on sphere
+0 0	0.00000	0.00000 0.00000
+0 41.810314895778596	0.00000	3.92699 0.00000
+0 -41.810314895778596	0.00000	-3.92699 0.00000
+90.0 0	7.85398	0.00000 0.00000
+-90.0 0	-7.85398	0.00000 0.00000
+-180 0	-15.70796	0.00000 0.00000
+-180 90.0	-19.63495	7.85398 0.00000
+-180 -90.0	-19.63495	-7.85398 0.00000
+0 60.0	1.43738	5.36437 0.00000
+0 -60.0	1.43738	-5.36437 0.00000
+Test healpix inverse projection on sphere
 0 0.7853981633974483	0.00000	41.81031 0.00000
 -1.5707963267948966 0	-90.00000	0.00000 0.00000
-Test forward projection on ellipsoid
-0 41.937853904844985	0.00000	0.78540 0.00000
--90 0	-1.57080	0.00000 0.00000
-Test inverse projection on ellipsoid
-0 0.7853981633974483	0.00000	41.93785 0.00000
--1.5707963267948966 0	-90.00000	0.00000 0.00000
+0.0 0.0	0.00000	0.00000 0.00000
+0.0 3.9269908169872414	0.00000	41.81031 0.00000
+0.0 -3.9269908169872414	0.00000	-41.81031 0.00000
+7.853981633974483 0.0	90.00000	0.00000 0.00000
+-7.853981633974483 0.0	-90.00000	0.00000 0.00000
+-15.707963267948966 0.0	-180.00000	0.00000 0.00000
+-11.780972450961723 7.853981633974483	-180.00000	90.00000 0.00000
+-11.780972450961723 -7.853981633974483	-180.00000	-90.00000 0.00000
+1.437378399445537 5.364369216432778	0.00000	60.00000 0.00000
+1.437378399445537 -5.364369216432778	0.00000	-60.00000 0.00000
+Test healpix forward projection on ellipsoid
+0 41.937853904844985	0.00000	0.78452 0.00000
+-90 0	-1.56904	0.00000 0.00000
+0 0	0.00000	0.00000 0.00000
+0 41.810314895778596	0.00000	2.05479 0.00000
+0 -41.810314895778596	0.00000	-2.05479 0.00000
+90.0 0	6.78898	0.00000 0.00000
+-90.0 0	-6.78898	0.00000 0.00000
+-180 0	-13.57797	0.00000 0.00000
+-180 90.0	-16.97246	6.78898 0.00000
+-180 -90.0	-16.97246	-6.78898 0.00000
+0 60.0	0.00000	3.35128 0.00000
+0 -60.0	0.00000	-3.35128 0.00000
+Test healpix inverse projection on ellipsoid
+0 0.7853981633974483	*	* 0.00000
+-1.5707963267948966 0	-90.10072	0.00000 0.00000
+0.0 0.0	0.00000	0.00000 0.00000
+0.0 2.0547874222147415	0.00000	39.58811 0.00000
+0.0 -2.0547874222147415	0.00000	-39.58811 0.00000
+6.788983564106746 0.0	90.00000	0.00000 0.00000
+-6.788983564106746 0.0	-90.00000	0.00000 0.00000
+-13.577967128213492 0.0	-180.00000	0.00000 0.00000
+-10.183475346160119 6.788983564106746	-180.00000	90.00000 0.00000
+-10.183475346160119 -6.788983564106746	-180.00000	-90.00000 0.00000
+0.0 3.351278550178025	0.00000	59.23640 0.00000
+0.0 -3.351278550178025	0.00000	-59.23640 0.00000
 ##############################################################
-Test forward projection on sphere
-0 41.81031	0.00000	0.78540 0.00000
--90 0	-1.57080	0.00000 0.00000
-Test inverse projection on sphere
-0 0.7853981633974483	0.00000	41.81031 0.00000
--1.5707963267948966 0	-90.00000	0.00000 0.00000
-Test forward projection on ellipsoid
-0 41.937853904844985	0.00000	0.78540 0.00000
--90 0	-1.57080	0.00000 0.00000
-Test inverse projection on ellipsoid
-0 0.7853981633974483	0.00000	41.93785 0.00000
--1.5707963267948966 0	-90.00000	0.00000 0.00000
+Test rHEALPix forward projection on sphere north=0 south=0
+-180 30.0	-15.70796	2.94524 0.00000
+-180 -25.714285714285715	-15.70796	-2.55579 0.00000
+0 0	0.00000	0.00000 0.00000
+60.0 41.809314895778598	5.23599	3.92691 0.00000
+##############################################################
+Test rHEALPix forward projection on sphere north=1 south=1
+-180 30.0	-15.70796	2.94524 0.00000
+-180 -25.714285714285715	-15.70796	-2.55579 0.00000
+0 0	0.00000	0.00000 0.00000
+60.0 41.809314895778598	5.23599	3.92691 0.00000
+##############################################################
+Test rHEALPix inverse projection on sphere north=0 south=0
+0.0 0.0	0.00000	0.00000 0.00000
+0.0 3.9269908169872414	0.00000	41.81031 0.00000
+0.0 -3.9269908169872414	0.00000	-41.81031 0.00000
+7.853981633974483 0.0	90.00000	0.00000 0.00000
+-7.853981633974483 0.0	-90.00000	0.00000 0.00000
+##############################################################
+Test rHEALPix inverse projection on sphere north=1 south=1
+0.0 0.0	0.00000	0.00000 0.00000
+0.0 3.9269908169872414	0.00000	41.81031 0.00000
+0.0 -3.9269908169872414	0.00000	-41.81031 0.00000
+7.853981633974483 0.0	90.00000	0.00000 0.00000
+-7.853981633974483 0.0	-90.00000	0.00000 0.00000
+##############################################################
+Test rHEALPix forward projection on ellipsoid north=0 south=0
+0 0	0.00000	0.00000 0.00000
+0 41.810314895778596	0.00000	2.05479 0.00000
+0 -41.810314895778596	0.00000	-2.05479 0.00000
+90.0 0	6.78898	0.00000 0.00000
+-90.0 0	-6.78898	0.00000 0.00000
+##############################################################
+Test rHEALPix forward projection on ellipsoid north=1 south=1
+0 0	0.00000	0.00000 0.00000
+0 41.810314895778596	0.00000	2.05479 0.00000
+0 -41.810314895778596	0.00000	-2.05479 0.00000
+90.0 0	6.78898	0.00000 0.00000
+-90.0 0	-6.78898	0.00000 0.00000
+##############################################################
+Test rHEALPix inverse projection on ellipsoid north=0 south=0
+0.0 0.0	0.00000	0.00000 0.00000
+0.0 2.0547874222147415	0.00000	39.58811 0.00000
+0.0 -2.0547874222147415	0.00000	-39.58811 0.00000
+6.788983564106746 0.0	90.00000	0.00000 0.00000
+-6.788983564106746 0.0	-90.00000	0.00000 0.00000
+##############################################################
+Test rHEALPix inverse projection on ellipsoid north=1 south=1
+0.0 0.0	0.00000	0.00000 0.00000
+0.0 2.0547874222147415	0.00000	39.58811 0.00000
+0.0 -2.0547874222147415	0.00000	-39.58811 0.00000
+6.788983564106746 0.0	90.00000	0.00000 0.00000
+-6.788983564106746 0.0	-90.00000	0.00000 0.00000
 ##############################################################
 Test geos projection
 Test geos on a sphere
@@ -186,3 +271,62 @@ Test the natural earth projection
 Test pconic (#148)
 -70.4 -23.65	-2240096.40	-6940342.15 0.00
 -2240096.40 -6940342.15	70d24'W	23d39'S 0.000
+##############################################################
+Test laea
+-6086629.0 4488761.0	156.058637988599	37.765458298678 0.000000000000
+##############################################################
+Test forward calcofi projection
+120d40'42.273"W	38d56'50.766"N	60.00	20.00 0.00
+121d9'W	34d9'N	80.00	60.00 0.00
+123d59'56.066"W	30d25'4.617"N	90.00	120.00 0.00
+Test inverse calcofi projection
+60 20	120d40'42.273"W	38d56'50.766"N 0.000
+80 60	121d9'W	34d9'N 0.000
+90 120	123d59'56.066"W	30d25'4.617"N 0.000
+##############################################################
+Check inverse error handling with ob_tran (#225)
+300000 400000	42d45'22.377"W	85d35'28.083"N 0.000
+20000000 30000000	*	* 0.000
+Test inverse handling
+10 20	-1384841.19	7581707.88 0.00
+##############################################################
+Test MGI datum gives expected results (#207)
+16.33 48.20	595710.37321015028283	5357598.46457545924932 -44.49510847218335
+##############################################################
+Test omerc sensitivity with locations 90d from origin(#114)
+56.958381652832 72.8798	-9985.16336452572614	-227.67701050320997 0.00000000000000
+56.9584 72.8798	9985.16263662453457	-227.67701050313340 0.00000000000000
+##############################################################
+Test omerc differences between poles (#190)
+-27 70	7846957.203	0.000 0.000
+-27 80	8944338.041	204911.652 0.000
+-27 89.9	10033520.737	402158.063 0.000
+163 89.9	10055728.173	404099.799 0.000
+163 80	11163496.121	397796.828 0.000
+-27 -70	-7846957.203	0.000 0.000
+-27 -80	-8944338.041	204911.652 0.000
+-27 -89.9	-10033520.737	402158.063 0.000
+163 -89.9	-10055728.173	404099.799 0.000
+163 -80	-11163496.121	397796.828 0.000
+##############################################################
+Test qsc
+13 -10	2073986.9490880956873	-1680858.2722242795862 0.0000000000000
+2073986.94908809568733	-1680858.27222427958623	13.0000000000000	-10.0000000000000 0.0000000000000
+##############################################################
+Test bug 229
+13 -10	13.0000000000000	-10.0000000000000 0.0000000000000
+##############################################################
+Test bug 229 (2)
+13 -10	13.0000000000000	-10.0000000000000 0.0000000000000
+##############################################################
+Test bug 244 
+-140.100000 -87.000000	987122.418330275454	-14429896.539530910552 0.000000000000
+##############################################################
+Test bug 244 (2)
+987122.4183302754536 -14429896.5395309105515	-140.100000000000	-87.000000000000 0.000000000000
+##############################################################
+Test bug 245 (use +datum=carthage)
+10 34	592302.981946153101	3762148.734061029274 -30.311017032713
+##############################################################
+Test bug 245 (use expension of +datum=carthage)
+10 34	592302.981946153101	3762148.734061030205 -30.311017032713
diff --git a/setup-proj.py b/setup-proj.py
index 3579917..6d2f797 100644
--- a/setup-proj.py
+++ b/setup-proj.py
@@ -18,7 +18,8 @@ if proj_incdir is None and proj_dir is not None:
     incdirs.append(os.path.join(proj_dir,'include'))
 
 pyprojext =\
-Extension("pyproj._proj",["_proj.c"],include_dirs=incdirs,library_dirs=libdirs,libraries=libraries)
+Extension("pyproj._proj",["_proj.c"],include_dirs=incdirs,library_dirs=libdirs,\
+runtime_library_dirs=libdirs,libraries=libraries)
 
 # over-write default data directory.
 pyproj_datadir = os.path.join(os.path.join(proj_dir,'share'),'proj')
@@ -31,7 +32,7 @@ packages          = ['pyproj']
 package_dirs       = {'':'lib'}
 
 setup(name = "pyproj",
-  version = "1.9.3",
+  version = "1.9.4",
   description = "Python interface to PROJ.4 library",
   long_description  = """
 Performs cartographic transformations between geographic (lat/lon)
@@ -39,7 +40,7 @@ and map projection (x/y) coordinates. Can also transform directly
 from one map projection coordinate system to another.
 Coordinates can be given as numpy arrays, python arrays, lists or scalars.
 Optimized for numpy arrays.""",
-  url               = "http://code.google.com/p/pyproj",
+  url               = "https://github.com/jswhit/pyproj",
   download_url      = "http://python.org/pypi/pyproj",
   author            = "Jeff Whitaker",
   author_email      = "jeffrey.s.whitaker at noaa.gov",
diff --git a/setup.py b/setup.py
index f5d1531..6443d57 100644
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,8 @@ extensions = [Extension("pyproj._proj",deps+['_proj.c'],include_dirs = ['src'])]
 pathout = os.path.join('lib',os.path.join('pyproj','data'))
 if sys.argv[1] != 'sdist':
     cc = ccompiler.new_compiler()
-    #sysconfig.customize_compiler(cc) # doesn't work in python 3.3
+    sysconfig.get_config_vars()
+    sysconfig.customize_compiler(cc)
     cc.set_include_dirs(['src'])
     objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
     execname = 'nad2bin'
@@ -31,7 +32,7 @@ datafiles = [os.path.join('data',os.path.basename(f)) for f in datafiles]
 package_data = {'pyproj':datafiles}
 
 setup(name = "pyproj",
-  version = "1.9.3",
+  version = "1.9.4",
   description = "Python interface to PROJ.4 library",
   long_description  = """
 Performs cartographic transformations between geographic (lat/lon)
@@ -39,7 +40,7 @@ and map projection (x/y) coordinates. Can also transform directly
 from one map projection coordinate system to another.
 Coordinates can be given as numpy arrays, python arrays, lists or scalars.
 Optimized for numpy arrays.""",
-  url               = "http://code.google.com/p/pyproj",
+  url               = "https://github.com/jswhit/pyproj",
   download_url      = "http://python.org/pypi/pyproj",
   author            = "Jeff Whitaker",
   author_email      = "jeffrey.s.whitaker at noaa.gov",
@@ -47,8 +48,8 @@ Optimized for numpy arrays.""",
   license           = "OSI Approved",
   keywords          = ["python","map projections","GIS","mapping","maps"],
   classifiers       = ["Development Status :: 4 - Beta",
-                       "Intended Audience :: Science/Research", 
-                       "License :: OSI Approved", 
+                       "Intended Audience :: Science/Research",
+                       "License :: OSI Approved",
                        "Topic :: Software Development :: Libraries :: Python Modules",
                        "Topic :: Scientific/Engineering :: GIS",
                        "Topic :: Scientific/Engineering :: Mathematics",
diff --git a/src/PJ_aeqd.c b/src/PJ_aeqd.c
index 6ff2871..0da1ea2 100644
--- a/src/PJ_aeqd.c
+++ b/src/PJ_aeqd.c
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: PJ_aeqd.c 1856 2010-06-11 03:26:04Z warmerdam $
+ * $Id: PJ_aeqd.c 2520 2014-09-13 20:19:37Z hobu $
  *
  * Project:  PROJ.4
  * Purpose:  Implementation of the aeqd (Azimuthal Equidistant) projection.
@@ -40,7 +40,7 @@
 #define PJ_LIB__
 #include	<projects.h>
 
-PJ_CVSID("$Id: PJ_aeqd.c 1856 2010-06-11 03:26:04Z warmerdam $");
+PJ_CVSID("$Id: PJ_aeqd.c 2520 2014-09-13 20:19:37Z hobu $");
 
 PROJ_HEAD(aeqd, "Azimuthal Equidistant") "\n\tAzi, Sph&Ell\n\tlat_0 guam";
 
@@ -210,7 +210,7 @@ INVERSE(s_inverse); /* spherical */
 			xy.y = (cosc - P->sinph0 * sin(lp.phi)) * c_rh;
 			xy.x *= sinc * P->cosph0;
 		}
-		lp.lam = xy.y == 0. ? 0. : atan2(xy.x, xy.y);
+		lp.lam = atan2(xy.x, xy.y);
 	} else if (P->mode == N_POLE) {
 		lp.phi = HALFPI - c_rh;
 		lp.lam = atan2(xy.x, -xy.y);
diff --git a/src/PJ_aitoff.c b/src/PJ_aitoff.c
index 1e39b2f..2606b63 100644
--- a/src/PJ_aitoff.c
+++ b/src/PJ_aitoff.c
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: PJ_aitoff.c 1856 2010-06-11 03:26:04Z warmerdam $
+ * $Id: PJ_aitoff.c 2369 2013-06-26 05:54:00Z warmerdam $
  *
  * Project:  PROJ.4
  * Purpose:  Implementation of the aitoff (Aitoff) and wintri (Winkel Tripel)
@@ -34,10 +34,10 @@
 #define PJ_LIB__
 #include <projects.h>
 
-PJ_CVSID("$Id: PJ_aitoff.c 1856 2010-06-11 03:26:04Z warmerdam $");
+PJ_CVSID("$Id: PJ_aitoff.c 2369 2013-06-26 05:54:00Z warmerdam $");
 
-PROJ_HEAD(aitoff, "Aitoff") "\n\tMisc Sph";
-PROJ_HEAD(wintri, "Winkel Tripel") "\n\tMisc Sph\n\tlat_1";
+PROJ_HEAD(aitoff, "Aitoff") "\n\tMisc Sph, no inv.";
+PROJ_HEAD(wintri, "Winkel Tripel") "\n\tMisc Sph, no inv.\n\tlat_1";
 
 FORWARD(s_forward); /* spheroid */
 	double c, d;
diff --git a/src/PJ_calcofi.c b/src/PJ_calcofi.c
new file mode 100644
index 0000000..2d14293
--- /dev/null
+++ b/src/PJ_calcofi.c
@@ -0,0 +1,138 @@
+#define PJ_LIB__
+#include <projects.h>
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+#include <proj_api.h>
+#include <errno.h>
+
+/* Conversions for the California Cooperative Oceanic Fisheries Investigations 
+Line/Station coordinate system following the algorithm of:
+Eber, L.E., and  R.P. Hewitt. 1979. Conversion algorithms for the CALCOFI 
+station grid. California Cooperative Oceanic Fisheries Investigations Reports 
+20:135-137. (corrected for typographical errors). 
+http://www.calcofi.org/publications/calcofireports/v20/Vol_20_Eber___Hewitt.pdf
+They assume 1 unit of CalCOFI Line == 1/5 degree in longitude or 
+meridional units at reference point O, and similarly 1 unit of CalCOFI 
+Station == 1/15 of a degree at O. 
+By convention, CalCOFI Line/Station conversions use Clarke 1866 but we use 
+whatever ellipsoid is provided. */
+
+PROJ_HEAD(calcofi, 
+    "Cal Coop Ocean Fish Invest Lines/Stations") "\n\tCyl, Sph&Ell";
+
+#define EPS10 1.e-10
+#define DEG_TO_LINE 5
+#define DEG_TO_STATION 15
+#define LINE_TO_RAD 0.0034906585039886592
+#define STATION_TO_RAD 0.0011635528346628863
+#define PT_O_LINE 80 /* reference point O is at line 80,  */
+#define PT_O_STATION 60 /* station 60,  */
+#define PT_O_LAMBDA -2.1144663887911301 /* lon -121.15 and */
+#define PT_O_PHI 0.59602993955606354 /* lat 34.15 */
+#define ROTATION_ANGLE 0.52359877559829882 /*CalCOFI angle of 30 deg in rad */
+FORWARD(e_forward); /* ellipsoid */
+    double oy; /* pt O y value in Mercator */
+    double l1; /* l1 and l2 are distances calculated using trig that sum
+               to the east/west distance between point O and point xy */
+    double l2;
+    double ry; /* r is the point on the same station as o (60) and the same 
+               line as xy xy, r, o form a right triangle */
+    /* if the user has specified +lon_0 or +k0 for some reason, 
+    we're going to ignore it so that xy is consistent with point O */
+    lp.lam = lp.lam + P->lam0;
+    if (fabs(fabs(lp.phi) - HALFPI) <= EPS10) F_ERROR;
+    xy.x = lp.lam;
+    xy.y = -log(pj_tsfn(lp.phi, sin(lp.phi), P->e)); /* Mercator transform xy*/
+    oy = -log(pj_tsfn(PT_O_PHI, sin(PT_O_PHI), P->e));
+    l1 = (xy.y - oy) * tan(ROTATION_ANGLE);
+    l2 = -xy.x - l1 + PT_O_LAMBDA;
+    ry = l2 * cos(ROTATION_ANGLE) * sin(ROTATION_ANGLE) + xy.y;
+    ry = pj_phi2(P->ctx, exp(-ry), P->e); /*inverse Mercator*/
+    xy.x = PT_O_LINE - RAD_TO_DEG * 
+        (ry - PT_O_PHI) * DEG_TO_LINE / cos(ROTATION_ANGLE); 
+    xy.y = PT_O_STATION + RAD_TO_DEG * 
+        (ry - lp.phi) * DEG_TO_STATION / sin(ROTATION_ANGLE);
+    /* set a = 1, x0 = 0, and y0 = 0 so that no further unit adjustments
+    are done */
+    P->a = 1;
+    P->x0 = 0;
+    P->y0 = 0;
+    return (xy);
+}
+FORWARD(s_forward); /* spheroid */
+    double oy;
+    double l1;
+    double l2;
+    double ry;
+    lp.lam = lp.lam + P->lam0;
+    if (fabs(fabs(lp.phi) - HALFPI) <= EPS10) F_ERROR;
+    xy.x = lp.lam;
+    xy.y = log(tan(FORTPI + .5 * lp.phi));
+    oy = log(tan(FORTPI + .5 * PT_O_PHI));
+    l1 = (xy.y - oy) * tan(ROTATION_ANGLE);
+    l2 = -xy.x - l1 + PT_O_LAMBDA;
+    ry = l2 * cos(ROTATION_ANGLE) * sin(ROTATION_ANGLE) + xy.y;
+    ry = HALFPI - 2. * atan(exp(-ry)); 
+    xy.x = PT_O_LINE - RAD_TO_DEG * 
+        (ry - PT_O_PHI) * DEG_TO_LINE / cos(ROTATION_ANGLE); 
+    xy.y = PT_O_STATION + RAD_TO_DEG * 
+        (ry - lp.phi) * DEG_TO_STATION / sin(ROTATION_ANGLE);
+    P->a = 1;
+    P->x0 = 0;
+    P->y0 = 0;
+    return (xy);
+}
+INVERSE(e_inverse); /* ellipsoid */
+    double ry; /* y value of point r */
+    double oymctr; /* Mercator-transformed y value of point O */
+    double rymctr; /* Mercator-transformed ry */
+    double xymctr; /* Mercator-transformed xy.y */
+    double l1;
+    double l2;
+    /* turn x and y back into Line/Station */
+    xy.x /= P->ra;
+    xy.y /= P->ra;
+    ry = PT_O_PHI - LINE_TO_RAD * (xy.x - PT_O_LINE) * 
+        cos(ROTATION_ANGLE);
+    lp.phi = ry - STATION_TO_RAD * (xy.y - PT_O_STATION) * sin(ROTATION_ANGLE);
+    oymctr = -log(pj_tsfn(PT_O_PHI, sin(PT_O_PHI), P->e));
+    rymctr = -log(pj_tsfn(ry, sin(ry), P->e));
+    xymctr = -log(pj_tsfn(lp.phi, sin(lp.phi), P->e));
+    l1 = (xymctr - oymctr) * tan(ROTATION_ANGLE);
+    l2 = (rymctr - xymctr) / (cos(ROTATION_ANGLE) * sin(ROTATION_ANGLE));
+    lp.lam = PT_O_LAMBDA - (l1 + l2);
+    P->over = 1;
+    return (lp);
+}
+INVERSE(s_inverse); /* spheroid */
+    double ry;
+    double oymctr;
+    double rymctr;
+    double xymctr;
+    double l1;
+    double l2;
+    xy.x /= P->ra;
+    xy.y /= P->ra;
+    ry = PT_O_PHI - LINE_TO_RAD * (xy.x - PT_O_LINE) * 
+        cos(ROTATION_ANGLE);
+    lp.phi = ry - STATION_TO_RAD * (xy.y - PT_O_STATION) * sin(ROTATION_ANGLE);
+    oymctr = log(tan(FORTPI + .5 * PT_O_PHI));
+    rymctr = log(tan(FORTPI + .5 * ry));
+    xymctr = log(tan(FORTPI + .5 * lp.phi));
+    l1 = (xymctr - oymctr) * tan(ROTATION_ANGLE);
+    l2 = (rymctr - xymctr) / (cos(ROTATION_ANGLE) * sin(ROTATION_ANGLE));
+    lp.lam = PT_O_LAMBDA - (l1 + l2);
+    P->over = 1;
+    return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(calcofi)
+    if (P->es) { /* ellipsoid */
+        P->inv = e_inverse;
+        P->fwd = e_forward;
+    } else { /* sphere */
+        P->inv = s_inverse;
+        P->fwd = s_forward;
+    }
+ENDENTRY(P)
diff --git a/src/PJ_geos.c b/src/PJ_geos.c
index 53f2f27..76fa1d9 100644
--- a/src/PJ_geos.c
+++ b/src/PJ_geos.c
@@ -5,7 +5,7 @@
 ** Copyright (c) 2012   Martin Raspaud
 */
 static const char
-LIBPROJ_ID[] = "$Id: PJ_geos.c 2176 2012-02-27 07:56:32Z warmerdam $";
+LIBPROJ_ID[] = "$Id: PJ_geos.c 2411 2013-12-09 18:13:15Z warmerdam $";
 /*
 ** See also (section 4.4.3.2):
 **   http://www.eumetsat.int/en/area4/msg/news/us_doc/cgms_03_26.pdf
@@ -170,7 +170,7 @@ ENTRY0(geos)
                 (P->sweep_axis[0] != 'x' &&
                  P->sweep_axis[0] != 'y'))
               E_ERROR(-49);
-            if (P->sweep_axis[0] == 'y')
+            if (P->sweep_axis[0] == 'x')
               P->flip_axis = 1;
             else
               P->flip_axis = 0;
diff --git a/src/PJ_hammer.c b/src/PJ_hammer.c
index fb5f3de..719a2ce 100644
--- a/src/PJ_hammer.c
+++ b/src/PJ_hammer.c
@@ -2,10 +2,9 @@
 	double w; \
 	double m, rm;
 #define PJ_LIB__
-# define EPS 1.0e-10
 # include	<projects.h>
 PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
-	"\n\tMisc Sph, \n\tW= M=";
+	"\n\tMisc Sph, no inv.\n\tW= M=";
 FORWARD(s_forward); /* spheroid */
 	double cosphi, d;
 
@@ -14,19 +13,6 @@ FORWARD(s_forward); /* spheroid */
 	xy.y = P->rm * d * sin(lp.phi);
 	return (xy);
 }
-INVERSE(s_inverse); /* spheroid */
-        double z;
-	z = sqrt(1. - 0.25*P->w*P->w*xy.x*xy.x - 0.25*xy.y*xy.y);
-	if (fabs(2.*z*z-1.) < EPS) {
-           lp.lam = HUGE_VAL;
-           lp.phi = HUGE_VAL;
-           pj_errno = -14;
-	} else {
-	   lp.lam = aatan2(P->w * xy.x * z,2. * z * z - 1)/P->w;
-	   lp.phi = aasin(P->ctx,z * xy.y);
-        }
-	return (lp);
-}
 FREEUP; if (P) pj_dalloc(P); }
 ENTRY0(hammer)
 	if (pj_param(P->ctx, P->params, "tW").i) {
@@ -39,5 +25,5 @@ ENTRY0(hammer)
 		P->m = 1.;
 	P->rm = 1. / P->m;
 	P->m /= P->w;
-	P->es = 0.; P->fwd = s_forward; P->inv = s_inverse;
+	P->es = 0.; P->fwd = s_forward;
 ENDENTRY(P)
diff --git a/src/PJ_hammer.c.diff b/src/PJ_hammer.c.diff
new file mode 100644
index 0000000..5fb8a47
--- /dev/null
+++ b/src/PJ_hammer.c.diff
@@ -0,0 +1,41 @@
+--- ../../proj/src/PJ_hammer.c	2011-12-15 09:24:19.000000000 -0700
++++ PJ_hammer.c	2012-04-02 15:37:13.000000000 -0600
+@@ -2,9 +2,10 @@
+ 	double w; \
+ 	double m, rm;
+ #define PJ_LIB__
++# define EPS 1.0e-10
+ # include	<projects.h>
+ PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
+-	"\n\tMisc Sph, no inv.\n\tW= M=";
++	"\n\tMisc Sph, \n\tW= M=";
+ FORWARD(s_forward); /* spheroid */
+ 	double cosphi, d;
+ 
+@@ -13,6 +14,19 @@
+ 	xy.y = P->rm * d * sin(lp.phi);
+ 	return (xy);
+ }
++INVERSE(s_inverse); /* spheroid */
++        double z;
++	z = sqrt(1. - 0.25*P->w*P->w*xy.x*xy.x - 0.25*xy.y*xy.y);
++	if (fabs(2.*z*z-1.) < EPS) {
++           lp.lam = HUGE_VAL;
++           lp.phi = HUGE_VAL;
++           pj_errno = -14;
++	} else {
++	   lp.lam = aatan2(P->w * xy.x * z,2. * z * z - 1)/P->w;
++	   lp.phi = aasin(P->ctx,z * xy.y);
++        }
++	return (lp);
++}
+ FREEUP; if (P) pj_dalloc(P); }
+ ENTRY0(hammer)
+ 	if (pj_param(P->ctx, P->params, "tW").i) {
+@@ -25,5 +39,5 @@
+ 		P->m = 1.;
+ 	P->rm = 1. / P->m;
+ 	P->m /= P->w;
+-	P->es = 0.; P->fwd = s_forward;
++	P->es = 0.; P->fwd = s_forward; P->inv = s_inverse;
+ ENDENTRY(P)
diff --git a/src/PJ_healpix.c b/src/PJ_healpix.c
index 30f3a5a..2cc918b 100644
--- a/src/PJ_healpix.c
+++ b/src/PJ_healpix.c
@@ -1,11 +1,13 @@
 /******************************************************************************
  * $Id: PJ_healpix.c 1504 2011-10-18 14:58:57Z landcare $
  *
- * Project:  PROJ.4
- * Purpose:  Implementation of the healpix projection.
- *           Definition: http://code.scenzgrid.org/index.php/p/scenzgrid-py/source/tree/master/docs/scenzgrid.pdf
- * Author:   Alex Raichev & Michael Speth , spethm at landcareresearch.co.nz
- *
+ * Project: PROJ.4
+ * Purpose: Implementation of the HEALPix and rHEALPix projections.
+ *          For background see <http://code.scenzgrid.org/index.php/p/scenzgrid-py/source/tree/master/docs/rhealpix_dggs.pdf>.
+ * Authors: Alex Raichev (raichev at cs.auckland.ac.nz) 
+ *          Michael Speth (spethm at landcareresearch.co.nz)
+ * Notes:   Raichev implemented these projections in Python and 
+ *          Speth translated them into C here.   
  ******************************************************************************
  * Copyright (c) 2001, Thomas Flemming, tf at ttqv.com
  *
@@ -17,7 +19,7 @@
  * Software is furnished to do so, subject to the following conditions:
  *
  * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
+ * in all copies or substcounteral portions of the Software.
  *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
@@ -28,122 +30,52 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  *****************************************************************************/
-
-#define PROJ_PARMS__ \
-    int npole;\
-    int spole;
-
-#define PJ_LIB__
+# define PROJ_PARMS__ \
+    int north_square; \
+    int south_square; \
+    double qp; \
+    double *apa;
+# define PJ_LIB__    
 # include	<projects.h>
 PROJ_HEAD(healpix, "HEALPix") "\n\tSph., Ellps.";
-PROJ_HEAD(rhealpix, "rHEALPix") "\n\tSph., Ellps.\n\tnpole= spole=";
+PROJ_HEAD(rhealpix, "rHEALPix") "\n\tSph., Ellps.\n\tnorth_square= south_square=";
 # include	<stdio.h>
-# define R1 {{ 0,-1},{ 1, 0}}	/** Matrix for anticlockwise rotation by pi/2 **/
-# define R2 {{-1, 0},{ 0,-1}}	/** Matrix for anticlockwise rotation by pi (R1 X R1) X = dot product **/
-# define R3 {{ 0, 1},{-1, 0}}	/** Matrix for anticlockwise rotation by 3*pi/2 (R2 X R1) **/
-# define IDENT {{1,0},{0,1}}
-/**
- * 0 - Identity matrix<br>
- * 1 - Counter-clockwise rotation by PI/2<br>
- * 2 - Counter-clockwise rotation by PI<br>
- * 3 - Counter-clockwise rotation by 3*PI/2<br>
- * 4 - Counter-clockwise rotation by 3*PI/2<br>
- * 5 - Counter-clockwise rotation by PI<br>
- * 6 - Counter-clockwise rotation by PI/2<br>
- **/
-# define ROT { IDENT, R1, R2, R3, R3, R2, R1}
-# define RFACTOR 3 /** Used for returning the rotation matrix **/
-/** Used for calculating if a point is within the HEALPix projection for sphere. **/
-# define EPS 1e-12
+/* Matrix for counterclockwise rotation by pi/2: */
+# define R1 {{ 0,-1},{ 1, 0}}	
+/* Matrix for counterclockwise rotation by pi: */
+# define R2 {{-1, 0},{ 0,-1}}	
+/* Matrix for counterclockwise rotation by 3*pi/2:  */
+# define R3 {{ 0, 1},{-1, 0}}	
+/* Identity matrix */
+# define IDENT {{1, 0},{0, 1}}
+/* IDENT, R1, R2, R3, R1 inverse, R2 inverse, R3 inverse:*/
+# define ROT {IDENT, R1, R2, R3, R3, R2, R1}
+/* Fuzz to handle rounding errors: */
+# define EPS 1e-15
 typedef struct {
-    int cn; // the number 0 -> 4 indicating the position of the polar cap.
-    double x,y;  // the coordinates of the pole points (point of most extreme latitude on the polar caps).
-    enum Region { north, south, equatorial } region;
+    int cn; /* An integer 0--3 indicating the position of the polar cap. */
+    double x, y;  /* Coordinates of the pole point (point of most extreme latitude on the polar caps). */
+    enum Region {north, south, equatorial} region;
 } CapMap;
 typedef struct {
-    double x,y;
+    double x, y;
 } Point;
 double rot[7][2][2] = ROT;
 
 /**
-    NOTES:  Alex Raichev implemented the math in python and this is a port of his work.
-	    The healpix projection is a Lambert cylindrical equal-area projection for
-	    equaltorial latitudes and an interrupted Colignon projection for polar  
-	    latitudes.
- **/
-
-/**
  * Returns the sign of the double.
  * @param v the parameter whose sign is returned.
  * @return 1 for positive number, -1 for negative, and 0 for zero.
  **/
-double sign (double v) {
+double pj_sign (double v) {
     return v > 0 ? 1 : (v < 0 ? -1 : 0);
 }
 /**
- * Scales the number by a factor.
- * @param num the number to be scaled.
- * @param factor the factor to scale the number by.
- * @param isInverse 1 for scaling the number by 1 / factor and 0 for scaling by the factor.
- * @return the scaled number.
- **/
-double scale_number(double num, double factor, int isInverse){
-    if(isInverse == 1){
-	return num * 1.0/factor;
-    }
-    return num * factor;
-}
-/**
- * Scales all the items of the array by a factor.
- * @param xy
- **/
-void scale_array(XY *array, double k, int inverse){
-    double c = 0;
-    if (inverse == 1) {
-	c = 1.0/k;
-    }else{
-	c = k;
-    }
-    array->x *= c;
-    array->y *= c;
-}
-/**
- * Given an angle return its equivalent angle.
- * @param x the angle to convert
- * @return the equivalent angle such that -PI <= the angle returend <= PI
- **/
-double standardize_lon(double x){
-    if(x < -1*PI || x >= PI){
-	x = x - 2*PI*floor(x/(2*PI));	
-	if(x >= PI){
-	    x = x - 2*PI;
-	}
-    }
-    return x;
-}
-/**
- * Given an angle, return its unit-circle equivalent angle.
- * @param x the angel to convert.
- * @return the equivalent angle such that -PI/2 <= the angle returned <= PI/2.
- **/
-double standardize_lat(double x){
-    if( x < -PI/2.0 || x > PI/2){
-	x = x-2.0*PI*floor(x/(2.0*PI));
-	if(x > PI/2.0 && x <= 3.0*PI/2){
-	    x = PI - x;
-	}else{
-	    x = x - 2*PI;
-	}
-    }
-    return x;
-}
-/**
- * Returns the index of the 2d array in rot.
- * @param index range from -3 to 3.
- * @return the index into the rot 3d array.
+ * Return the index of the matrix in ROT.
+ * @param index ranges from -3 to 3.
  */
-static int get_rotate_index(int index){
-    switch(index){
+static int get_rotate_index(int index) {
+    switch(index) {
 	case 0:
 	    return 0;
 	case 1:
@@ -162,542 +94,480 @@ static int get_rotate_index(int index){
     return 0;
 }
 /**
- * Calculates if the point lies on or within the polygon.
- * Very good explination of how this works: http://paulbourke.net/geometry/insidepoly/
+ * Return 1 if point (testx, testy) lies in the interior of the polygon 
+ * determined by the vertices in vert, and return 0 otherwise.
+ * See http://paulbourke.net/geometry/polygonmesh/ for more details.
  * @param nvert the number of vertices in the polygon.
- * @param vert the x,y-coordinates of the polygon's vertices
- * @param testx the x-coordinate of the test point.
- * @param testy the y-coordinate of the test point.
- * @return 1 if on or within the bounds of the polygon, and 0 otherwise.
+ * @param vert the (x, y)-coordinates of the polygon's vertices
  **/
-static
-int pnpoly(int nvert, double vert[][2], double testx, double testy){
-    
-    int i,j,c = 0;
+static int pnpoly(int nvert, double vert[][2], double testx, double testy) {
+    int i, c = 0;
     int counter = 0;
     double xinters;
-    Point p1,p2;
-
-    // check for boundrary cases
-    for(i = 0; i < nvert; i++){
-	if(testx == vert[i][0] && testy == vert[i][1]){
-	    return 1;
-	}
+    Point p1, p2;
+    /* Check for boundrary cases */
+    for (i = 0; i < nvert; i++) {
+        if (testx == vert[i][0] && testy == vert[i][1]) {
+            return 1;
+        }
     }
-
-    // initialize p1
     p1.x = vert[0][0];
     p1.y = vert[0][1];
-    
-    for(i = 1; i < nvert; i++){
-	p2.x = vert[i % nvert][0];
-	p2.y = vert[i % nvert][1];
-
-	if(testy > MIN(p1.y,p2.y)){
-	    if (testy <= MAX(p1.y,p2.y)) {
-		if (testx <= MAX(p1.x,p2.x)) {
-		    if (p1.y != p2.y) {
-			xinters = (testy-p1.y)*(p2.x-p1.x)/(p2.y-p1.y)+p1.x;
-			if (p1.x == p2.x || testx <= xinters){
-			    counter++;
-			}
-		    }
-		}
-	    }
-	}
-	p1 = p2;
+    for (i = 1; i < nvert; i++) {
+        p2.x = vert[i % nvert][0];
+        p2.y = vert[i % nvert][1];
+        if (testy > MIN(p1.y, p2.y)) {
+            if (testy <= MAX(p1.y, p2.y)) {
+                if (testx <= MAX(p1.x, p2.x)) {
+                    if (p1.y != p2.y) {
+                        xinters = (testy-p1.y)*(p2.x-p1.x)/(p2.y-p1.y)+p1.x;
+                        if (p1.x == p2.x || testx <= xinters) {
+                            counter++;
+                        }
+                    }
+                }
+            }
+        }
+        p1 = p2;
     }
-    if(counter % 2 == 0){
-	return 0;
-    }else{
-	return 1;
+    if (counter % 2 == 0) {
+        return 0;
+    } else {
+        return 1;
     }
     return c;
 }
 /**
- * Calculates if the coordinates are within the image of projection.
- * @param x the x-coordinate to check.
- * @param y the y-coordinate to check.
- * @param proj 0 for healpix and 1 for rhealpix.
- * @param npole the positions of the polar squares, only used for rhealpix.
- * @param spole the positions of the polar squares, only used for rhealpix.
- * @return 1 if the coordinate is within the projection and 0 otherwise.
+ * Return 1 if (x, y) lies in (the interior or boundary of) the image of the
+ * HEALPix projection (in case proj=0) or in the image the rHEALPix projection 
+ * (in case proj=1), and return 0 otherwise.
+ * @param north_square the position of the north polar square (rHEALPix only)       
+ * @param south_square the position of the south polar square (rHEALPix only)  
  **/
-int in_image(double x, double y, int proj, int npole, int spole){
-    if(proj == 0){
-	double healpixVertsJit[][2] = {
-	    {-1.0*PI-EPS    ,PI/4.0},
-	    {-3.0*PI/4.0    ,PI/2.0+EPS},
-	    {-1.0*PI/2.0    ,PI/4.0+EPS},
-	    {-1.0*PI/4.0    ,PI/2.0+EPS},
-	    {0.0	    ,PI/4.0+EPS},
-	    {PI/4.0	    ,PI/2.0+EPS},
-	    {PI/2.0	    ,PI/4.0+EPS},
-	    {3.0*PI/4.0	    ,PI/2.0+EPS},
-	    {PI+EPS	    ,PI/4.0},
-	    {PI+EPS	    ,-1.0*PI/4.0},
-	    {3.0*PI/4.0	    ,-1.0*PI/2.0-EPS},
-	    {PI/2.0	    ,-1.0*PI/4.0-EPS},
-	    {PI/4.0	    ,-1.0*PI/2.0-EPS},
-	    {0.0	    ,-1.0*PI/4.0-EPS},
-	    {-1.0*PI/4.0    ,-1.0*PI/2.0-EPS},
-	    {-1.0*PI/2.0    ,-1.0*PI/4.0-EPS},
-	    {-3.0*PI/4.0    ,-1.0*PI/2.0-EPS},
-	    {-1.0*PI-EPS    ,-1.0*PI/4.0}};
-	return pnpoly((int)sizeof(healpixVertsJit)/sizeof(healpixVertsJit[0]),
-                  healpixVertsJit,x,y);
-    }else{
-	// Used for calculating if a point is within the rHEALPix projection for sphere.
-	double rhealpixVertsJit[][2] = {
-	    {-1.0*PI-EPS			,PI/4.0+EPS},
-	    {-1.0*PI + npole*PI/2.0-EPS		,PI/4.0+EPS},
-	    {-1.0*PI + npole*PI/2.0-EPS		,3*PI/4.0+EPS},
-	    {-1.0*PI + (npole + 1.0)*PI/2.0+EPS ,3*PI/4.0+EPS},
-	    {-1.0*PI + (npole + 1.0)*PI/2.0+EPS ,PI/4.0+EPS},
-	    {PI+EPS				,PI/4.0+EPS},
-	    {PI+EPS				,-1.0*PI/4.0-EPS},
-	    {-1.0*PI + (spole + 1.0)*PI/2.0+EPS ,-1.0*PI/4.0-EPS},
-	    {-1.0*PI + (spole + 1.0)*PI/2.0+EPS ,-3.0*PI/4.0-EPS},
-	    {-1.0*PI + spole*PI/2.0-EPS		,-3.0*PI/4.0-EPS},
-	    {-1.0*PI + spole*PI/2.0-EPS		,-1.0*PI/4.0-EPS},
-	    {-1.0*PI-EPS			,-1.0*PI/4.0-EPS}};
-	return pnpoly((int)sizeof(rhealpixVertsJit)/sizeof(rhealpixVertsJit[0]),
-                  rhealpixVertsJit,x,y);
+int in_image(double x, double y, int proj, int north_square, int south_square) {
+    if (proj == 0) {
+    	double healpixVertsJit[][2] = {
+    	    {-1.0*PI- EPS, PI/4.0},
+    	    {-3.0*PI/4.0, PI/2.0 + EPS},
+    	    {-1.0*PI/2.0, PI/4.0 + EPS},
+    	    {-1.0*PI/4.0, PI/2.0 + EPS},
+    	    {0.0, PI/4.0 + EPS},
+    	    {PI/4.0, PI/2.0 + EPS},
+    	    {PI/2.0, PI/4.0 + EPS},
+    	    {3.0*PI/4.0, PI/2.0 + EPS},
+    	    {PI+ EPS, PI/4.0},
+    	    {PI+ EPS, -1.0*PI/4.0},
+    	    {3.0*PI/4.0, -1.0*PI/2.0 - EPS},
+    	    {PI/2.0, -1.0*PI/4.0 - EPS},
+    	    {PI/4.0, -1.0*PI/2.0 - EPS},
+    	    {0.0, -1.0*PI/4.0 - EPS},
+    	    {-1.0*PI/4.0, -1.0*PI/2.0 - EPS},
+    	    {-1.0*PI/2.0, -1.0*PI/4.0 - EPS},
+    	    {-3.0*PI/4.0, -1.0*PI/2.0 - EPS},
+    	    {-1.0*PI - EPS, -1.0*PI/4.0}
+    	};
+    	return pnpoly((int)sizeof(healpixVertsJit)/
+    	              sizeof(healpixVertsJit[0]), healpixVertsJit, x, y);
+    } else {
+    	double rhealpixVertsJit[][2] = {
+    	    {-1.0*PI - EPS, PI/4.0 + EPS},
+    	    {-1.0*PI + north_square*PI/2.0- EPS, PI/4.0 + EPS},
+    	    {-1.0*PI + north_square*PI/2.0- EPS, 3*PI/4.0 + EPS},
+    	    {-1.0*PI + (north_square + 1.0)*PI/2.0 + EPS, 3*PI/4.0 + EPS},
+    	    {-1.0*PI + (north_square + 1.0)*PI/2.0 + EPS, PI/4.0 + EPS},
+    	    {PI + EPS, PI/4.0 + EPS},
+    	    {PI + EPS, -1.0*PI/4.0 - EPS},
+    	    {-1.0*PI + (south_square + 1.0)*PI/2.0 + EPS, -1.0*PI/4.0 - EPS},
+    	    {-1.0*PI + (south_square + 1.0)*PI/2.0 + EPS, -3.0*PI/4.0 - EPS},
+    	    {-1.0*PI + south_square*PI/2.0 - EPS, -3.0*PI/4.0 - EPS},
+    	    {-1.0*PI + south_square*PI/2.0 - EPS, -1.0*PI/4.0 - EPS},
+    	    {-1.0*PI - EPS, -1.0*PI/4.0 - EPS}};
+    	return pnpoly((int)sizeof(rhealpixVertsJit)/
+    	              sizeof(rhealpixVertsJit[0]), rhealpixVertsJit, x, y);
     }
 }
 /**
- * Returns an authalic latitude of the point given a point of geographic 
- * latitude phi on an ellipse of eccentricity e.
- * pj_authlat is the inverse of the alex's auth_lat.
- * @param phi
- * @param e
- * @param inverse 1 for inverse or 0 otherwise.
- * @return the authalic latitude of the point.
+ * Return the authalic latitude of latitude alpha (if inverse=0) or
+ * return the approximate latitude of authalic latitude alpha (if inverse=1).    
+ * P contains the relavent ellipsoid parameters. 
  **/
-double auth_lat(double phi, double e, int inverse){
-    if(inverse == 0){
-	double q_numerator = ((1.0 - pow(e,2.0)) * sin(phi));
-	double q_demonitor =  (1.0 - (pow(e*sin(phi),2.0)));
-	double q_subtractor =  - (1.0 - pow(e,2.0)) / (2.0*e) * log((1.0 - e*sin(phi)) / (1.0+e*sin(phi)));
-	double q = ((1.0 - pow(e,2.0)) * sin(phi)) / (1.0 - (pow(e*sin(phi),2.0))) - 
-	(1.0 - pow(e,2.0)) / (2.0*e) * log((1.0 - e*sin(phi)) / (1.0+e*sin(phi)));
-
-	double qp = 1.0 - (1.0-pow(e,2.0)) / (2.0*e)*log((1.0 - e) / (1.0 + e));
-	double ratio = q/qp;
-	// Rounding errors
-	if( fabsl(ratio) > 1){
-	    ratio = sign(ratio);
-	}
-	return asin(ratio);
+double auth_lat(PJ *P, double alpha, int inverse) {
+    if (inverse == 0) {
+        /* Authalic latitude. */
+        double q = pj_qsfn(sin(alpha), P->e, 1.0 - P->es);
+        double qp = P->qp; 
+	    double ratio = q/qp;
+	    if (fabsl(ratio) > 1) {
+	        /* Rounding error. */
+	        ratio = pj_sign(ratio);
+	    }
+	    return asin(ratio);
+    } else {
+        /* Approximation to inverse authalic latitude. */
+        return pj_authlat(alpha, P->apa);
     }
-    return phi + (pow(e,2) / 3.0 + 31*pow(e,4) / 180.0 + 517.0*pow(e,6)/5040.0) * sin(2.0*phi)
-    + (23.0*pow(e,4)/360.0 + 251.0*pow(e,6)/3780.0)*sin(4.0*phi)
-    + 761.0*pow(e,6)/45360.0 * sin(6.0*phi);
 }
 /**
- * Compute the forward signature functions of the HEALPix 
- * projection of a sphere with radius `R` and central meridian `lon0`. 
+ * Return the HEALPix projection of the longitude-latitude point lp on
+ * the unit sphere.
 **/
-XY healpix_sphere(LP lp, PJ *P){
-    double lam = standardize_lon(lp.lam);
-    double phi = standardize_lat(lp.phi);
-    double phi0 = aasin(P->ctx, 2.0/3.0);
+XY healpix_sphere(LP lp) {
+    double lam = lp.lam;
+    double phi = lp.phi;
+    double phi0 = asin(2.0/3.0);
     XY xy;
-    // equatorial region
-    if( fabsl(phi) <= phi0) {
-	xy.x = lam;
-	xy.y = 3.0*PI/8.0*sin(phi);
+    /* equatorial region */
+    if ( fabsl(phi) <= phi0) {
+	    xy.x = lam;
+	    xy.y = 3.0*PI/8.0*sin(phi);
     } else {
-	double lamc;
-	double sigma = sqrt(3.0 * (1 - fabsl(sin(phi))));
-	double cn = floor(2 * lam / PI + 2);
-	if (cn >= 4) {
-	    cn = 3;
-	}
-	lamc = -3*PI/4 + (PI/2)*cn;
-	xy.x = lamc + (lam - lamc) * sigma;
-	xy.y = sign(phi)*PI/4 * (2 - sigma);
+	    double lamc;
+	    double sigma = sqrt(3.0*(1 - fabsl(sin(phi))));
+	    double cn = floor(2*lam / PI + 2);
+	    if (cn >= 4) {
+	        cn = 3;
+	    }
+	    lamc = -3*PI/4 + (PI/2)*cn;
+	    xy.x = lamc + (lam - lamc)*sigma;
+	    xy.y = pj_sign(phi)*PI/4*(2 - sigma);
     }
-    xy.x = scale_number(xy.x,P->a,0);
-    xy.y = scale_number(xy.y,P->a,0);
     return xy;
 }
 /**
- * Compute the inverse signature functions of the HEALPix 
- * projection of a sphere with radius `R` and central meridian `lon0`. 
+ * Return the inverse of healpix_sphere(). 
 **/
-LP healpix_sphere_inv(XY xy, PJ *P){
-    double x,y,y0;
-    double cn;
-    double xc;
-    double tau;
+LP healpix_sphere_inverse(XY xy) {
     LP lp; 
-    // Scale down to radius 1 sphere
-    x = scale_number(xy.x,P->a,1);
-    y = scale_number(xy.y,P->a,1);
-    y0 = PI/4.0;
-    // Equatorial region.
-    if(fabsl(y) <= y0){
-	lp.lam = x;
-	lp.phi = asin(8.0*y/(3.0*PI));	
-    } else if(fabsl(y) < PI/2.0){
-	cn = floor(2.0 * x/PI + 2.0);
-	if(cn >= 4){
-	    cn = 3;
-	}
-	xc = -3.0 * PI/4.0 + (PI/2.0)*cn;
-	tau = 2.0 - 4.0*fabsl(y)/PI;
-	lp.lam = xc + (x - xc)/tau;	
-	lp.phi = sign(y)*asin(1.0 - pow(tau , 2.0)/3.0);
+    double x = xy.x;
+    double y = xy.y;
+    double y0 = PI/4.0;
+    /* Equatorial region. */
+    if (fabsl(y) <= y0) {
+	    lp.lam = x;
+	    lp.phi = asin(8.0*y/(3.0*PI));	
+    } else if (fabsl(y) < PI/2.0) {
+	    double cn = floor(2.0*x/PI + 2.0);
+        double xc, tau;
+	    if (cn >= 4) {
+	        cn = 3;
+	    }
+	    xc = -3.0*PI/4.0 + (PI/2.0)*cn;
+	    tau = 2.0 - 4.0*fabsl(y)/PI;
+	    lp.lam = xc + (x - xc)/tau;	
+	    lp.phi = pj_sign(y)*asin(1.0 - pow(tau , 2.0)/3.0);
     } else {
-	lp.lam = -1.0*PI - P->lam0;
-	lp.phi = sign(y)*PI/2.0;
+	    lp.lam = -1.0*PI;
+	    lp.phi = pj_sign(y)*PI/2.0;
     }
     return (lp);
 }
 /**
- * Adds one vector to another of length 2.
- * @param a the first term.
- * @param b the second term.
- * @param ret holds the summation of the vectors.
+ * Return the vector sum a + b, where a and b are 2-dimensional vectors.
+ * @param ret holds a + b.
  **/
-static void vector_add(double a[], double b[],double * ret){
+static void vector_add(double a[2], double b[2], double *ret) {
     int i;
-    for(i = 0; i < 2; i++){
-	ret[i] = a[i] + b[i];
+    for(i = 0; i < 2; i++) {
+	    ret[i] = a[i] + b[i];
     }
 }
 /**
- * Subs tracts one vector from another of length 2.
- * @param a the minuend.
- * @param b the subtrahend.
- * @param ret the difference of the vectors where the difference is the result of a minus b.
+ * Return the vector difference a - b, where a and b are 2-dimensional vectors.
+ * @param ret holds a - b.
  **/
-static void vector_sub(double a[], double b[], double * ret){
+static void vector_sub(double a[2], double b[2], double*ret) {
     int i;
-    for(i = 0; i < 2; i++){
-	ret[i] = a[i] - b[i];
+    for(i = 0; i < 2; i++) { 
+	    ret[i] = a[i] - b[i];
     }
 }
 /**
- * Calculates the dot product of the arrays.
- * @param a the array that will be used to calculate the dot product.
- *  Must contain the same number of columns as b's rows.  Must be a matrix with equal lengthed rows and columns.
- * @param b the array that will be used to calculate the dot product; must contain the same number of rows as a's columns.
- * @param length the size of the b array.  Note, a's column size must equal b's length.
- * @param ret the dot product of a and b.
+ * Return the 2 x 1 matrix product a*b, where a is a 2 x 2 matrix and 
+ * b is a 2 x 1 matrix.
+ * @param ret holds a*b.
  **/
-static void dot_product(double a[2][2], double b[], double * ret){
-    int i,j;
+static void dot_product(double a[2][2], double b[2], double *ret) {
+    int i, j;
     int length = 2;
-    for(i = 0; i < length; i++){
-	ret[i] = 0;
-	for(j = 0; j < length; j++){
-	    ret[i] += a[i][j]*b[j];
-	}
+    for(i = 0; i < length; i++) {
+	    ret[i] = 0;
+	    for(j = 0; j < length; j++) {
+	        ret[i] += a[i][j]*b[j];
+	    }
     }
 }
 /**
- * Returns the polar cap number, pole point coordinates, and region
- * for x,y in the HEALPix projection of the sphere of radius R.
- * @param x coordinate in the HEALPix or rHEALPix.
- * @param y coordinate in the HEALPix or rHEALPix.
- * @param npole integer between 0 and 3 indicating the position of the north pole.
- * @param spole integer between 0 and 3 indicating teh position of the south pole.
- * @param inverse 1 computes the rHEALPix projection and 0 computes forward.
- * @return a structure containing the cap poles.
+ * Return the number of the polar cap, the pole point coordinates, and 
+ * the region that (x, y) lies in.
+ * If inverse=0, then assume (x,y) lies in the image of the HEALPix 
+ * projection of the unit sphere.
+ * If inverse=1, then assume (x,y) lies in the image of the 
+ * (north_square, south_square)-rHEALPix projection of the unit sphere.
  **/
-static CapMap get_cap(double x, double y, double R, int npole, int spole, int inverse){
+static CapMap get_cap(double x, double y, int north_square, int south_square,
+                      int inverse) {
     CapMap capmap;
     double c;
-
     capmap.x = x;
     capmap.y = y;
-
-    if(inverse == 0){
-	if(y > R*PI/4.0){
-	    capmap.region = north;
-	    c = R*PI/2.0; 
-	}else if(y < -1*R*PI/4.0){
-	    capmap.region = south;
-	    c = -1*R*PI/2.0;
-	}else{
-	    capmap.region = equatorial;
-	    capmap.cn = 0;
-	    return capmap;
-	}
-	// polar region
-	if(x < -1*R*PI/2.0){
-	    capmap.cn = 0;
-	    capmap.x = (-1*R*3.0*PI/4.0);
-	    capmap.y = c;
-	}else if(x >= -1*R*PI/2.0 && x < 0){
-	    capmap.cn = 1;
-	    capmap.x = -1*R*PI/4.0;
-	    capmap.y = c;
-	}else if(x >= 0 && x < R*PI/2.0){
-	    capmap.cn = 2;
-	    capmap.x = R*PI/4.0;
-	    capmap.y = c;
-	}else{
-	    capmap.cn = 3;
-	    capmap.x = R*3.0*PI/4.0;
-	    capmap.y = c;
-	}
-	return capmap;
-    }else{
-	double c;
-	double eps;
-	if(y > R*PI/4.0){
-	    capmap.region = north;
-	    capmap.x = R*(-3.0*PI/4.0 + npole*PI/2.0); 
-	    capmap.y = R*PI/2.0;
-	    x = x - npole*R*PI/2.0;
-	}else if(y < -1*R*PI/4.0){
-	    capmap.region = south;
-	    capmap.x = R*(-3.0*PI/4.0 + spole*PI/2); 
-	    capmap.y = -1*R*PI/2.0;
-	    x = x - spole*R*PI/2.0;
-	}else{
-	    capmap.region = equatorial;
-	    capmap.cn = 0;
-	    return capmap;
-	}
-	// Polar Region, find # of HEALPix polar cap number that
-	// x,y moves to when rHEALPix polar square is disassembled.
-	eps = R*1e-15; // Kludge.  Fuzz to avoid some rounding errors.
-	if(capmap.region == north){
-	    if(y >= -1*x - R*PI/4.0 - eps && y < x + R*5.0*PI/4.0 - eps){
-		capmap.cn = (npole + 1) % 4;
-	    }else if(y > -1*x -1*R*PI/4.0 + eps && y >= x + R*5.0*PI/4.0 - eps){
-		capmap.cn = (npole + 2) % 4;
-	    }else if(y <= -1*x -1*R*PI/4.0 + eps && y > x + R*5.0*PI/4.0 + eps){
-		capmap.cn = (npole + 3) % 4;
-	    }else{
-		capmap.cn = npole;
-	    }
-	}else if(capmap.region == south){
-	    if(y <= x + R*PI/4.0 + eps && y > -1*x - R*5.0*PI/4 + eps){
-		capmap.cn = (spole + 1) % 4;
-	    }else if(y < x + R*PI/4.0 - eps && y <= -1*x - R*5.0*PI/4.0 + eps){
-		capmap.cn = (spole + 2) % 4;
-	    }else if(y >= x + R*PI/4.0 - eps && y < -1*x - R*5.0*PI/4.0 - eps){
-		capmap.cn = (spole + 3) % 4;
-	    }else {
-		capmap.cn = spole;
-	    }
-	}
-	return capmap;
+    if (inverse == 0) {
+    	if (y > PI/4.0) {
+    	    capmap.region = north;
+    	    c = PI/2.0; 
+    	} else if (y < -1*PI/4.0) {
+    	    capmap.region = south;
+    	    c = -1*PI/2.0;
+    	} else {
+    	    capmap.region = equatorial;
+    	    capmap.cn = 0;
+    	    return capmap;
+    	}
+    	/* polar region */
+    	if (x < -1*PI/2.0) {
+    	    capmap.cn = 0;
+    	    capmap.x = (-1*3.0*PI/4.0);
+    	    capmap.y = c;
+    	} else if (x >= -1*PI/2.0 && x < 0) {
+    	    capmap.cn = 1;
+    	    capmap.x = -1*PI/4.0;
+    	    capmap.y = c;
+    	} else if (x >= 0 && x < PI/2.0) {
+    	    capmap.cn = 2;
+    	    capmap.x = PI/4.0;
+    	    capmap.y = c;
+    	} else {
+    	    capmap.cn = 3;
+    	    capmap.x = 3.0*PI/4.0;
+    	    capmap.y = c;
+    	}
+    	return capmap;
+    } else {
+    	double eps;
+    	if (y > PI/4.0) {
+    	    capmap.region = north;
+    	    capmap.x = (-3.0*PI/4.0 + north_square*PI/2.0); 
+    	    capmap.y = PI/2.0;
+    	    x = x - north_square*PI/2.0;
+    	} else if (y < -1*PI/4.0) {
+    	    capmap.region = south;
+    	    capmap.x = (-3.0*PI/4.0 + south_square*PI/2); 
+    	    capmap.y = -1*PI/2.0;
+    	    x = x - south_square*PI/2.0;
+    	} else {
+    	    capmap.region = equatorial;
+    	    capmap.cn = 0;
+    	    return capmap;
+    	}
+    	/* Polar Region, find the HEALPix polar cap number that 
+    	   x, y moves to when rHEALPix polar square is disassembled. */
+    	eps = 1e-15; /* Kludge.  Fuzz to avoid some rounding errors. */
+    	if (capmap.region == north) {
+    	    if (y >= -1*x - PI/4.0 - eps && y < x + 5.0*PI/4.0 - eps) {
+    		    capmap.cn = (north_square + 1) % 4;
+    	    } else if (y > -1*x -1*PI/4.0 + eps && y >= x + 5.0*PI/4.0 - eps) {
+    		    capmap.cn = (north_square + 2) % 4;
+    	    } else if (y <= -1*x -1*PI/4.0 + eps && y > x + 5.0*PI/4.0 + eps) {
+    		    capmap.cn = (north_square + 3) % 4;
+    	    } else {
+    		    capmap.cn = north_square;
+    	    }
+    	} else if (capmap.region == south) {
+    	    if (y <= x + PI/4.0 + eps && y > -1*x - 5.0*PI/4 + eps) {
+    		    capmap.cn = (south_square + 1) % 4;
+    	    } else if (y < x + PI/4.0 - eps && y <= -1*x - 5.0*PI/4.0 + eps) {
+    		    capmap.cn = (south_square + 2) % 4;
+    	    } else if (y >= x + PI/4.0 - eps && y < -1*x - 5.0*PI/4.0 - eps) {
+    		    capmap.cn = (south_square + 3) % 4;
+    	    } else {
+    		    capmap.cn = south_square;
+    	    }
+    	}
+    	return capmap;
     }
 }
 /**
- * Rearrange point x,y in the HEALPix projection by
+ * Rearrange point (x, y) in the HEALPix projection by 
  * combining the polar caps into two polar squares.
- * Put the north polar square in position npole and
- * the south polar square in position spole.
- * @param x coordinate in the HEALPix projection of the sphere.
- * @param y coordinate in the HEALPix projection of the sphere.
- * @param R - the Sphere's radius.
- * @param npole integer between 0 and 3 indicating the position
- * of the north polar square.
- * @param spole integer between 0 and 3 indicating the position
- * of the south polar square.
- * @param inverse 1 to uncombine the polar caps and 0 to combine.
+ * Put the north polar square in position north_square and 
+ * the south polar square in position south_square.
+ * If inverse=1, then uncombine the polar caps.
+ * @param north_square integer between 0 and 3.
+ * @param south_square integer between 0 and 3.
  **/
-static XY combine_caps(double x, double y, double R, int npole, int spole, int inverse){
+static XY combine_caps(double x, double y, int north_square, int south_square,
+                       int inverse) {
     XY xy;
     double v[2];
     double a[2];
     double vector[2];
-    double tmpVect[2];
     double v_min_c[2];
     double ret_dot[2];
-    double ret_add[2];
-    CapMap capmap = get_cap(x,y,R,npole,spole,inverse);
-
-    if(capmap.region == equatorial){
-	xy.x = capmap.x;
-	xy.y = capmap.y;
-	return xy;
+    CapMap capmap = get_cap(x, y, north_square, south_square, inverse);
+    if (capmap.region == equatorial) {
+	    xy.x = capmap.x;
+	    xy.y = capmap.y;
+	    return xy;
     }
     v[0] = x;
     v[1] = y;
-    if(inverse == 0){
-	// compute forward function by rotating, translating, and shifting xy.
-	int pole = 0;
-	double (*tmpRot)[2];
-	double c[2] = {capmap.x,capmap.y};
-	if(capmap.region == north){
-	    pole = npole;
-	    a[0] = R * (-3.0*PI/4.0 + pole * PI/2);
-	    a[1] = R * (PI/2.0 + pole * 0);
-
-	    tmpRot = rot[get_rotate_index(capmap.cn - pole)];
-	    vector_sub(v,c,v_min_c);	
-	    dot_product(tmpRot,v_min_c,ret_dot);
-	    vector_add(ret_dot, a, vector);
-
-	}else {
-	    pole = spole;
-	    a[0] = R * (-3.0*PI/4.0 + pole * PI/2);
-	    a[1] = R * (PI/-2.0 + pole * 0);
-
-	    tmpRot = rot[get_rotate_index(-1*(capmap.cn - pole))];
-	    vector_sub(v,c,v_min_c);	
-	    dot_product(tmpRot,v_min_c,ret_dot);
-
-	    vector_add(ret_dot, a, vector);
-	}
-
-	xy.x = vector[0];
-	xy.y = vector[1];
-	return xy;
-    }else{
-	// compute inverse function.
-	// get the current position of rHEALPix polar squares
-	int cn;
-	int pole = 0;
-	double (*tmpRot)[2];
-	double c[2] = {capmap.x,capmap.y};
-	// disassemble
-	if(capmap.region == north){
-	    pole = npole;
-	    a[0] = R * (-3.0*PI/4.0 + capmap.cn * PI/2);
-	    a[1] = R * (PI/2.0 + capmap.cn * 0);
-
-	    tmpRot = rot[get_rotate_index(-1*(capmap.cn - pole))];
-	    vector_sub(v,c,v_min_c);	
-	    dot_product(tmpRot,v_min_c,ret_dot);
-	    vector_add(ret_dot, a, vector);
-
-	}else{
-	    pole = spole;
-	    a[0] = R * (-3.0*PI/4.0 + capmap.cn * PI/2);
-	    a[1] = R * (PI/-2.0 + capmap.cn * 0);
-
-	    tmpRot = rot[get_rotate_index(capmap.cn - pole)];
-	    vector_sub(v,c,v_min_c);	
-	    dot_product(tmpRot,v_min_c,ret_dot);
-	    vector_add(ret_dot, a, vector);
-	}
-	xy.x = vector[0];
-	xy.y = vector[1];
-	return xy;
+    if (inverse == 0) {
+        /* Rotate (x, y) about its polar cap tip and then translate it to  
+           north_square or south_square. */
+    	int pole = 0;
+    	double (*tmpRot)[2];
+    	double c[2] = {capmap.x, capmap.y};
+    	if (capmap.region == north) {
+    	    pole = north_square;
+    	    a[0] =  (-3.0*PI/4.0 + pole*PI/2);
+    	    a[1] =  (PI/2.0 + pole*0);
+    	    tmpRot = rot[get_rotate_index(capmap.cn - pole)];
+    	    vector_sub(v, c, v_min_c);	
+    	    dot_product(tmpRot, v_min_c, ret_dot);
+    	    vector_add(ret_dot, a, vector);
+    	} else {
+    	    pole = south_square;
+    	    a[0] =  (-3.0*PI/4.0 + pole*PI/2);
+    	    a[1] =  (PI/-2.0 + pole*0);
+    	    tmpRot = rot[get_rotate_index(-1*(capmap.cn - pole))];
+    	    vector_sub(v, c, v_min_c);	
+    	    dot_product(tmpRot, v_min_c, ret_dot);
+    	    vector_add(ret_dot, a, vector);
+    	}
+    	xy.x = vector[0];
+    	xy.y = vector[1];
+    	return xy;
+    } else {
+        /* Inverse function.
+         Unrotate (x, y) and then translate it back. */
+    	int pole = 0;
+    	double (*tmpRot)[2];
+    	double c[2] = {capmap.x, capmap.y};
+    	/* disassemble */
+    	if (capmap.region == north) {
+    	    pole = north_square;
+    	    a[0] =  (-3.0*PI/4.0 + capmap.cn*PI/2);
+    	    a[1] =  (PI/2.0 + capmap.cn*0);
+    	    tmpRot = rot[get_rotate_index(-1*(capmap.cn - pole))];
+    	    vector_sub(v, c, v_min_c);	
+    	    dot_product(tmpRot, v_min_c, ret_dot);
+    	    vector_add(ret_dot, a, vector);
+    	} else {
+    	    pole = south_square;
+    	    a[0] =  (-3.0*PI/4.0 + capmap.cn*PI/2);
+    	    a[1] =  (PI/-2.0 + capmap.cn*0);
+    	    tmpRot = rot[get_rotate_index(capmap.cn - pole)];
+    	    vector_sub(v, c, v_min_c);	
+    	    dot_product(tmpRot, v_min_c, ret_dot);
+    	    vector_add(ret_dot, a, vector);
+    	}
+    	xy.x = vector[0];
+    	xy.y = vector[1];
+    	return xy;
     }
 }
-FORWARD(e_healpix_forward); /* ellipsoidal */
-    //int r1[][2] = R1;
-    double bet = auth_lat(lp.phi, P->e, 0);
-    lp.phi = bet;
-    P->a = P->ra;
-    return healpix_sphere(lp,P);
+FORWARD(s_healpix_forward); /* sphere  */
+    (void) xy;
+    return healpix_sphere(lp);
 }
-FORWARD(s_healpix_forward); /* spheroid */
-    return healpix_sphere(lp, P);
+FORWARD(e_healpix_forward); /* ellipsoid  */
+    (void) xy;
+    lp.phi = auth_lat(P, lp.phi, 0);
+    return healpix_sphere(lp);
 }
-INVERSE(e_healpix_inverse); /* ellipsoidal */
-    double bet, x, y;
-    P->a = P->ra;
-
-    // Scale down to radius 1 sphere before checking x,y
-    x = scale_number(xy.x,P->a,1);
-    y = scale_number(xy.y,P->a,1);
-    // check if the point is in the image
-    if(in_image(x,y,0,0,0) == 0){
-	lp.lam = HUGE_VAL;
-	lp.phi = HUGE_VAL;
-	pj_ctx_set_errno( P->ctx, -15);
-	return lp;
+INVERSE(s_healpix_inverse); /* sphere */
+    /* Check whether (x, y) lies in the HEALPix image */
+    if (in_image(xy.x, xy.y, 0, 0, 0) == 0) {
+	    lp.lam = HUGE_VAL;
+	    lp.phi = HUGE_VAL;
+	    pj_ctx_set_errno(P->ctx, -15);
+	    return lp;
     }
-
-    lp = healpix_sphere_inv(xy, P);
-
-    lp.phi = auth_lat(lp.phi,P->e,1);
-    
-    return (lp);
+    return healpix_sphere_inverse(xy);
 }
-INVERSE(s_healpix_inverse); /* spheroid */
-    double x = xy.x;
-    double y = xy.y;
-    // Scale down to radius 1 sphere before checking x,y
-    x = scale_number(x,P->a,1);
-    y = scale_number(y,P->a,1);
-    // check if the point is in the image
-    if(in_image(x,y,0,0,0) == 0){
-	lp.lam = HUGE_VAL;
-	lp.phi = HUGE_VAL;
-	pj_ctx_set_errno( P->ctx, -15);
-	return lp;
+INVERSE(e_healpix_inverse); /* ellipsoid */
+    /* Check whether (x, y) lies in the HEALPix image. */
+    if (in_image(xy.x, xy.y, 0, 0, 0) == 0) {
+	    lp.lam = HUGE_VAL;
+	    lp.phi = HUGE_VAL;
+	    pj_ctx_set_errno(P->ctx, -15);
+	    return lp;
     }
-    return healpix_sphere_inv(xy, P);
+    lp = healpix_sphere_inverse(xy);
+    lp.phi = auth_lat(P, lp.phi, 1);
+    return (lp);
 }
-FORWARD(e_rhealpix_forward); /* ellipsoidal */
-    double bet = auth_lat(lp.phi,P->e,0);
-    lp.phi = bet;
-    xy = healpix_sphere(lp,P);
-    return combine_caps(xy.x, xy.y, P->a, P->npole, P->spole, 0);
+FORWARD(s_rhealpix_forward); /* sphere */
+    xy = healpix_sphere(lp);
+    return combine_caps(xy.x, xy.y, P->north_square, P->south_square, 0);
 }
-FORWARD(s_rhealpix_forward); /* spheroid */
-    // Compute forward function.
-    xy = healpix_sphere(lp,P);
-    return combine_caps(xy.x, xy.y, P->a, P->npole, P->spole, 0);
+FORWARD(e_rhealpix_forward); /* ellipsoid */
+    lp.phi = auth_lat(P, lp.phi, 0);
+    xy = healpix_sphere(lp);
+    return combine_caps(xy.x, xy.y, P->north_square, P->south_square, 0);
 }
-INVERSE(e_rhealpix_inverse); /* ellipsoidal */
-    double x = scale_number(xy.x,P->a,1);
-    double y = scale_number(xy.y,P->a,1);
-    // check for out of bounds coordinates
-    if(in_image(x,y,1,P->npole,P->spole) == 0){
-	lp.lam = HUGE_VAL;
-	lp.phi = HUGE_VAL;
-	pj_ctx_set_errno( P->ctx, -15);
-	return lp;
+INVERSE(s_rhealpix_inverse); /* sphere */
+    /* Check whether (x, y) lies in the rHEALPix image. */
+    if (in_image(xy.x, xy.y, 1, P->north_square, P->south_square) == 0) {
+	    lp.lam = HUGE_VAL;
+	    lp.phi = HUGE_VAL;
+	    pj_ctx_set_errno(P->ctx, -15);
+	    return lp;
     }
-
-    xy = combine_caps(xy.x,xy.y,P->a,P->npole,P->spole,1);
-    lp = healpix_sphere_inv(xy, P);
-    lp.phi = auth_lat(lp.phi,P->e,1);
-    return lp;
+    xy = combine_caps(xy.x, xy.y, P->north_square, P->south_square, 1);
+    return healpix_sphere_inverse(xy);
 }
-INVERSE(s_rhealpix_inverse); /* spheroid */
-    double x = scale_number(xy.x,P->a,1);
-    double y = scale_number(xy.y,P->a,1);
-    // check for out of bounds coordinates
-    if(in_image(x,y,1,P->npole,P->spole) == 0){
-	lp.lam = HUGE_VAL;
-	lp.phi = HUGE_VAL;
-	pj_ctx_set_errno( P->ctx, -15);
-	return lp;
+INVERSE(e_rhealpix_inverse); /* ellipsoid */
+    /* Check whether (x, y) lies in the rHEALPix image. */
+    if (in_image(xy.x, xy.y, 1, P->north_square, P->south_square) == 0) {
+	    lp.lam = HUGE_VAL;
+	    lp.phi = HUGE_VAL;
+	    pj_ctx_set_errno(P->ctx, -15);
+	    return lp;
     }
-    xy = combine_caps(xy.x,xy.y,P->a,P->npole,P->spole,1);
-    return healpix_sphere_inv(xy, P);
+    xy = combine_caps(xy.x, xy.y, P->north_square, P->south_square, 1);
+    lp = healpix_sphere_inverse(xy);
+    lp.phi = auth_lat(P, lp.phi, 1);
+    return lp;
 }
 FREEUP;
-    if (P) {
-	pj_dalloc(P);
-    }
+	if (P) {
+		if (P->apa)
+			pj_dalloc(P->apa);
+		pj_dalloc(P);
+	}
 }
-ENTRY0(healpix)
-    if(P->es){
-	P->inv = e_healpix_inverse; P->fwd = e_healpix_forward;
-    }else{
-	P->inv = s_healpix_inverse; P->fwd = s_healpix_forward;
+ENTRY1(healpix, apa)
+    if (P->es) {
+        P->apa = pj_authset(P->es); /* For auth_lat(). */
+        P->qp = pj_qsfn(1.0, P->e, P->one_es); /* For auth_lat(). */
+    	P->a = P->a*sqrt(0.5*P->qp); /* Set P->a to authalic radius. */
+        P->ra = 1.0/P->a;
+    	P->fwd = e_healpix_forward;
+    	P->inv = e_healpix_inverse; 
+    } else {
+    	P->fwd = s_healpix_forward;
+    	P->inv = s_healpix_inverse; 
     }
 ENDENTRY(P)
-ENTRY0(rhealpix)
-    P->npole = pj_param(P->ctx, P->params,"inpole").i;
-    P->spole = pj_param(P->ctx,P->params,"ispole").i;
-    
-    // check for valid npole and spole inputs
-    if(P->npole < 0 || P->npole > 3){
-	E_ERROR(-47);
+ENTRY1(rhealpix, apa)
+    P->north_square = pj_param(P->ctx, P->params,"inorth_square").i;
+    P->south_square = pj_param(P->ctx, P->params,"isouth_square").i;
+    /* Check for valid north_square and south_square inputs. */
+    if (P->north_square < 0 || P->north_square > 3) {
+	    E_ERROR(-47);
     }
-    if(P->spole < 0 || P->spole > 3){
-	E_ERROR(-47);
+    if (P->south_square < 0 || P->south_square > 3) {
+	    E_ERROR(-47);
     }
-
-    if(P->es){
-	P->inv = e_rhealpix_inverse; P->fwd = e_rhealpix_forward;
-    }else{
-	P->inv = s_rhealpix_inverse; P->fwd = s_rhealpix_forward;
+    if (P->es) {
+        P->apa = pj_authset(P->es); /* For auth_lat(). */
+        P->qp = pj_qsfn(1.0, P->e, P->one_es); /* For auth_lat(). */
+	    P->a = P->a*sqrt(0.5*P->qp); /* Set P->a to authalic radius. */
+        P->ra = 1.0/P->a;
+	    P->fwd = e_rhealpix_forward;
+	    P->inv = e_rhealpix_inverse; 
+    } else {
+	    P->fwd = s_rhealpix_forward;
+	    P->inv = s_rhealpix_inverse; 
     }
 ENDENTRY(P)
diff --git a/src/PJ_isea.c b/src/PJ_isea.c
index fb38aff..c68861d 100644
--- a/src/PJ_isea.c
+++ b/src/PJ_isea.c
@@ -919,7 +919,6 @@ int isea_hex(struct isea_dgg *g, int tri,
 	struct isea_pt v;
 	int sidelength;
 	int d, i, x, y, quad;
-	double oddsl;
 
 	quad = isea_ptdi(g, tri, pt, &v);
 
@@ -935,8 +934,6 @@ int isea_hex(struct isea_dgg *g, int tri,
 	if (g->aperture == 3 && g->resolution % 2 != 0) {
 		int offset = (int)(pow(3.0, g->resolution - 1) + 0.5);
 
-		oddsl = (pow(2.0, g->resolution) + 1.0) / 2.0;
-
 		d += offset * ((g->quad-1) % 5);
 		i += offset * ((g->quad-1) % 5);
 
@@ -979,13 +976,12 @@ ISEA_STATIC
 struct isea_pt
 isea_forward(struct isea_dgg *g, struct isea_geo *in)
 {
-	int             tri, downtri, quad;
+	int             tri, downtri;
 	struct isea_pt  out, coord;
 
 	tri = isea_transform(g, in, &out);
 
 	downtri = (((tri - 1) / 5) % 2 == 1);
-	quad = ((tri - 1) % 5) + ((tri - 1) / 10) * 5 + 1;
 
 	if (g->output == ISEA_PLANE) {
 		isea_tri_plane(tri, &out, g->radius);
diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c
index 34e0f6b..4ddba9a 100644
--- a/src/PJ_ob_tran.c
+++ b/src/PJ_ob_tran.c
@@ -80,6 +80,7 @@ ENTRY1(ob_tran, link)
 	/* copy existing header into new */
 	P->es = 0.; /* force to spherical */
 	P->link->params = P->params;
+        P->link->ctx = P->ctx;
 	P->link->over = P->over;
 	P->link->geoc = P->geoc;
 	P->link->a = P->a;
diff --git a/src/PJ_omerc.c b/src/PJ_omerc.c
index c8888a8..310d774 100644
--- a/src/PJ_omerc.c
+++ b/src/PJ_omerc.c
@@ -48,8 +48,11 @@ FORWARD(e_forward); /* ellipsoid */
 			F_ERROR;
 		v = 0.5 * P->ArB * log((1. - U)/(1. + U));
 		temp = cos(P->B * lp.lam);
-		u = (fabs(temp) < TOL) ? P->AB * lp.lam :
-			P->ArB * atan2((S * P->cosgam + V * P->singam) , temp); 
+                if(fabs(temp) < TOL) {
+                    u = P->A * lp.lam;
+                } else {
+                    u = P->ArB * atan2((S * P->cosgam + V * P->singam), temp);
+                }
 	} else {
 		v = lp.phi > 0 ? P->v_pole_n : P->v_pole_s;
 		u = P->ArB * lp.phi;
@@ -93,8 +96,8 @@ INVERSE(e_inverse); /* ellipsoid */
 }
 FREEUP; if (P) pj_dalloc(P); }
 ENTRY0(omerc)
-	double con, com, cosph0, D, F, H, L, sinph0, p, J, gamma,
-		gamma0, lamc, lam1, lam2, phi1, phi2, alpha_c;
+	double con, com, cosph0, D, F, H, L, sinph0, p, J, gamma=0,
+		gamma0, lamc=0, lam1=0, lam2=0, phi1=0, phi2=0, alpha_c;
 	int alp, gam, no_off = 0;
 
 	P->no_rot = pj_param(P->ctx, P->params, "tno_rot").i;
@@ -109,6 +112,12 @@ ENTRY0(omerc)
                     pj_param(P->ctx, P->params, "tno_off").i
                     /* for backward compatibility */
                     || pj_param(P->ctx, P->params, "tno_uoff").i;
+        if( no_off )
+        {
+            /* Mark the parameter as used, so that the pj_get_def() return them */
+            pj_param(P->ctx, P->params, "sno_uoff");
+            pj_param(P->ctx, P->params, "sno_off");
+        }
 	} else {
 		lam1 = pj_param(P->ctx, P->params, "rlon_1").f;
 		phi1 = pj_param(P->ctx, P->params, "rlat_1").f;
diff --git a/src/PJ_putp3.c b/src/PJ_putp3.c
index 46e2500..298ce55 100644
--- a/src/PJ_putp3.c
+++ b/src/PJ_putp3.c
@@ -3,7 +3,7 @@
 #define PJ_LIB__
 # include	<projects.h>
 PROJ_HEAD(putp3, "Putnins P3") "\n\tPCyl., Sph.";
-PROJ_HEAD(putp3p, "Putnins P3'") "\n\tPCyl., no inv., Sph.";
+PROJ_HEAD(putp3p, "Putnins P3'") "\n\tPCyl., Sph.";
 #define C	0.79788456
 #define RPISQ	0.1013211836
 FORWARD(s_forward); /* spheroid */
diff --git a/src/PJ_qsc.c b/src/PJ_qsc.c
new file mode 100644
index 0000000..1c7a443
--- /dev/null
+++ b/src/PJ_qsc.c
@@ -0,0 +1,375 @@
+/*
+ * This implements the Quadrilateralized Spherical Cube (QSC) projection.
+ *
+ * Copyright (c) 2011, 2012  Martin Lambers <marlam at marlam.de>
+ *
+ * The QSC projection was introduced in:
+ * [OL76]
+ * E.M. O'Neill and R.E. Laubscher, "Extended Studies of a Quadrilateralized
+ * Spherical Cube Earth Data Base", Naval Environmental Prediction Research
+ * Facility Tech. Report NEPRF 3-76 (CSC), May 1976.
+ *
+ * The preceding shift from an ellipsoid to a sphere, which allows to apply
+ * this projection to ellipsoids as used in the Ellipsoidal Cube Map model,
+ * is described in
+ * [LK12]
+ * M. Lambers and A. Kolb, "Ellipsoidal Cube Maps for Accurate Rendering of
+ * Planetary-Scale Terrain Data", Proc. Pacfic Graphics (Short Papers), Sep.
+ * 2012
+ *
+ * You have to choose one of the following projection centers,
+ * corresponding to the centers of the six cube faces:
+ * phi0 = 0.0, lam0 = 0.0       ("front" face)
+ * phi0 = 0.0, lam0 = 90.0      ("right" face)
+ * phi0 = 0.0, lam0 = 180.0     ("back" face)
+ * phi0 = 0.0, lam0 = -90.0     ("left" face)
+ * phi0 = 90.0                  ("top" face)
+ * phi0 = -90.0                 ("bottom" face)
+ * Other projection centers will not work!
+ *
+ * In the projection code below, each cube face is handled differently.
+ * See the computation of the face parameter in the ENTRY0(qsc) function
+ * and the handling of different face values (FACE_*) in the forward and
+ * inverse projections.
+ *
+ * Furthermore, the projection is originally only defined for theta angles
+ * between (-1/4 * PI) and (+1/4 * PI) on the current cube face. This area
+ * of definition is named AREA_0 in the projection code below. The other
+ * three areas of a cube face are handled by rotation of AREA_0.
+ */
+
+#define PROJ_PARMS__ \
+        int face; \
+        double a_squared; \
+        double b; \
+        double one_minus_f; \
+        double one_minus_f_squared;
+#define PJ_LIB__
+#include        <projects.h>
+PROJ_HEAD(qsc, "Quadrilateralized Spherical Cube") "\n\tAzi, Sph.";
+#define EPS10 1.e-10
+
+/* The six cube faces. */
+#define FACE_FRONT  0
+#define FACE_RIGHT  1
+#define FACE_BACK   2
+#define FACE_LEFT   3
+#define FACE_TOP    4
+#define FACE_BOTTOM 5
+
+/* The four areas on a cube face. AREA_0 is the area of definition,
+ * the other three areas are counted counterclockwise. */
+#define AREA_0 0
+#define AREA_1 1
+#define AREA_2 2
+#define AREA_3 3
+
+/* Helper function for forward projection: compute the theta angle
+ * and determine the area number. */
+static double
+qsc_fwd_equat_face_theta(double phi, double y, double x, int *area) {
+        double theta;
+        if (phi < EPS10) {
+            *area = AREA_0;
+            theta = 0.0;
+        } else {
+            theta = atan2(y, x);
+            if (fabs(theta) <= FORTPI) {
+                *area = AREA_0;
+            } else if (theta > FORTPI && theta <= HALFPI + FORTPI) {
+                *area = AREA_1;
+                theta -= HALFPI;
+            } else if (theta > HALFPI + FORTPI || theta <= -(HALFPI + FORTPI)) {
+                *area = AREA_2;
+                theta = (theta >= 0.0 ? theta - PI : theta + PI);
+            } else {
+                *area = AREA_3;
+                theta += HALFPI;
+            }
+        }
+        return (theta);
+}
+
+/* Helper function: shift the longitude. */
+static double
+qsc_shift_lon_origin(double lon, double offset) {
+        double slon = lon + offset;
+        if (slon < -PI) {
+            slon += TWOPI;
+        } else if (slon > +PI) {
+            slon -= TWOPI;
+        }
+        return slon;
+}
+
+/* Forward projection, ellipsoid */
+FORWARD(e_forward);
+        double lat, lon;
+        double sinlat, coslat;
+        double sinlon, coslon;
+        double q, r, s;
+        double theta, phi;
+        double t, mu, nu;
+        int area;
+
+        /* Convert the geodetic latitude to a geocentric latitude.
+         * This corresponds to the shift from the ellipsoid to the sphere
+         * described in [LK12]. */
+        if (P->es) {
+            lat = atan(P->one_minus_f_squared * tan(lp.phi));
+        } else {
+            lat = lp.phi;
+        }
+
+        /* Convert the input lat, lon into theta, phi as used by QSC.
+         * This depends on the cube face and the area on it.
+         * For the top and bottom face, we can compute theta and phi
+         * directly from phi, lam. For the other faces, we must use
+         * unit sphere cartesian coordinates as an intermediate step. */
+        lon = lp.lam;
+        if (P->face != FACE_TOP && P->face != FACE_BOTTOM) {
+            if (P->face == FACE_RIGHT) {
+                lon = qsc_shift_lon_origin(lon, +HALFPI);
+            } else if (P->face == FACE_BACK) {
+                lon = qsc_shift_lon_origin(lon, +PI);
+            } else if (P->face == FACE_LEFT) {
+                lon = qsc_shift_lon_origin(lon, -HALFPI);
+            }
+            sinlat = sin(lat);
+            coslat = cos(lat);
+            sinlon = sin(lon);
+            coslon = cos(lon);
+            q = coslat * coslon;
+            r = coslat * sinlon;
+            s = sinlat;
+        }
+        if (P->face == FACE_FRONT) {
+            phi = acos(q);
+            theta = qsc_fwd_equat_face_theta(phi, s, r, &area);
+        } else if (P->face == FACE_RIGHT) {
+            phi = acos(r);
+            theta = qsc_fwd_equat_face_theta(phi, s, -q, &area);
+        } else if (P->face == FACE_BACK) {
+            phi = acos(-q);
+            theta = qsc_fwd_equat_face_theta(phi, s, -r, &area);
+        } else if (P->face == FACE_LEFT) {
+            phi = acos(-r);
+            theta = qsc_fwd_equat_face_theta(phi, s, q, &area);
+        } else if (P->face == FACE_TOP) {
+            phi = HALFPI - lat;
+            if (lon >= FORTPI && lon <= HALFPI + FORTPI) {
+                area = AREA_0;
+                theta = lon - HALFPI;
+            } else if (lon > HALFPI + FORTPI || lon <= -(HALFPI + FORTPI)) {
+                area = AREA_1;
+                theta = (lon > 0.0 ? lon - PI : lon + PI);
+            } else if (lon > -(HALFPI + FORTPI) && lon <= -FORTPI) {
+                area = AREA_2;
+                theta = lon + HALFPI;
+            } else {
+                area = AREA_3;
+                theta = lon;
+            }
+        } else /* P->face == FACE_BOTTOM */ {
+            phi = HALFPI + lat;
+            if (lon >= FORTPI && lon <= HALFPI + FORTPI) {
+                area = AREA_0;
+                theta = -lon + HALFPI;
+            } else if (lon < FORTPI && lon >= -FORTPI) {
+                area = AREA_1;
+                theta = -lon;
+            } else if (lon < -FORTPI && lon >= -(HALFPI + FORTPI)) {
+                area = AREA_2;
+                theta = -lon - HALFPI;
+            } else {
+                area = AREA_3;
+                theta = (lon > 0.0 ? -lon + PI : -lon - PI);
+            }
+        }
+
+        /* Compute mu and nu for the area of definition.
+         * For mu, see Eq. (3-21) in [OL76], but note the typos:
+         * compare with Eq. (3-14). For nu, see Eq. (3-38). */
+        mu = atan((12.0 / PI) * (theta + acos(sin(theta) * cos(FORTPI)) - HALFPI));
+        t = sqrt((1.0 - cos(phi)) / (cos(mu) * cos(mu)) / (1.0 - cos(atan(1.0 / cos(theta)))));
+        /* nu = atan(t);        We don't really need nu, just t, see below. */
+
+        /* Apply the result to the real area. */
+        if (area == AREA_1) {
+            mu += HALFPI;
+        } else if (area == AREA_2) {
+            mu += PI;
+        } else if (area == AREA_3) {
+            mu += HALFPI + PI;
+        }
+
+        /* Now compute x, y from mu and nu */
+        /* t = tan(nu); */
+        xy.x = t * cos(mu);
+        xy.y = t * sin(mu);
+        return (xy);
+}
+
+/* Inverse projection, ellipsoid */
+INVERSE(e_inverse);
+        double mu, nu, cosmu, tannu;
+        double tantheta, theta, cosphi, phi;
+        double t;
+        int area;
+
+        /* Convert the input x, y to the mu and nu angles as used by QSC.
+         * This depends on the area of the cube face. */
+        nu = atan(sqrt(xy.x * xy.x + xy.y * xy.y));
+        mu = atan2(xy.y, xy.x);
+        if (xy.x >= 0.0 && xy.x >= fabs(xy.y)) {
+            area = AREA_0;
+        } else if (xy.y >= 0.0 && xy.y >= fabs(xy.x)) {
+            area = AREA_1;
+            mu -= HALFPI;
+        } else if (xy.x < 0.0 && -xy.x >= fabs(xy.y)) {
+            area = AREA_2;
+            mu = (mu < 0.0 ? mu + PI : mu - PI);
+        } else {
+            area = AREA_3;
+            mu += HALFPI;
+        }
+
+        /* Compute phi and theta for the area of definition.
+         * The inverse projection is not described in the original paper, but some
+         * good hints can be found here (as of 2011-12-14):
+         * http://fits.gsfc.nasa.gov/fitsbits/saf.93/saf.9302
+         * (search for "Message-Id: <9302181759.AA25477 at fits.cv.nrao.edu>") */
+        t = (PI / 12.0) * tan(mu);
+        tantheta = sin(t) / (cos(t) - (1.0 / sqrt(2.0)));
+        theta = atan(tantheta);
+        cosmu = cos(mu);
+        tannu = tan(nu);
+        cosphi = 1.0 - cosmu * cosmu * tannu * tannu * (1.0 - cos(atan(1.0 / cos(theta))));
+        if (cosphi < -1.0) {
+            cosphi = -1.0;
+        } else if (cosphi > +1.0) {
+            cosphi = +1.0;
+        }
+
+        /* Apply the result to the real area on the cube face.
+         * For the top and bottom face, we can compute phi and lam directly.
+         * For the other faces, we must use unit sphere cartesian coordinates
+         * as an intermediate step. */
+        if (P->face == FACE_TOP) {
+            phi = acos(cosphi);
+            lp.phi = HALFPI - phi;
+            if (area == AREA_0) {
+                lp.lam = theta + HALFPI;
+            } else if (area == AREA_1) {
+                lp.lam = (theta < 0.0 ? theta + PI : theta - PI);
+            } else if (area == AREA_2) {
+                lp.lam = theta - HALFPI;
+            } else /* area == AREA_3 */ {
+                lp.lam = theta;
+            }
+        } else if (P->face == FACE_BOTTOM) {
+            phi = acos(cosphi);
+            lp.phi = phi - HALFPI;
+            if (area == AREA_0) {
+                lp.lam = -theta + HALFPI;
+            } else if (area == AREA_1) {
+                lp.lam = -theta;
+            } else if (area == AREA_2) {
+                lp.lam = -theta - HALFPI;
+            } else /* area == AREA_3 */ {
+                lp.lam = (theta < 0.0 ? -theta - PI : -theta + PI);
+            }
+        } else {
+            /* Compute phi and lam via cartesian unit sphere coordinates. */
+            double q, r, s, t;
+            q = cosphi;
+            t = q * q;
+            if (t >= 1.0) {
+                s = 0.0;
+            } else {
+                s = sqrt(1.0 - t) * sin(theta);
+            }
+            t += s * s;
+            if (t >= 1.0) {
+                r = 0.0;
+            } else {
+                r = sqrt(1.0 - t);
+            }
+            /* Rotate q,r,s into the correct area. */
+            if (area == AREA_1) {
+                t = r;
+                r = -s;
+                s = t;
+            } else if (area == AREA_2) {
+                r = -r;
+                s = -s;
+            } else if (area == AREA_3) {
+                t = r;
+                r = s;
+                s = -t;
+            }
+            /* Rotate q,r,s into the correct cube face. */
+            if (P->face == FACE_RIGHT) {
+                t = q;
+                q = -r;
+                r = t;
+            } else if (P->face == FACE_BACK) {
+                q = -q;
+                r = -r;
+            } else if (P->face == FACE_LEFT) {
+                t = q;
+                q = r;
+                r = -t;
+            }
+            /* Now compute phi and lam from the unit sphere coordinates. */
+            lp.phi = acos(-s) - HALFPI;
+            lp.lam = atan2(r, q);
+            if (P->face == FACE_RIGHT) {
+                lp.lam = qsc_shift_lon_origin(lp.lam, -HALFPI);
+            } else if (P->face == FACE_BACK) {
+                lp.lam = qsc_shift_lon_origin(lp.lam, -PI);
+            } else if (P->face == FACE_LEFT) {
+                lp.lam = qsc_shift_lon_origin(lp.lam, +HALFPI);
+            }
+        }
+
+        /* Apply the shift from the sphere to the ellipsoid as described
+         * in [LK12]. */
+        if (P->es) {
+            int invert_sign;
+            double tanphi, xa;
+            invert_sign = (lp.phi < 0.0 ? 1 : 0);
+            tanphi = tan(lp.phi);
+            xa = P->b / sqrt(tanphi * tanphi + P->one_minus_f_squared);
+            lp.phi = atan(sqrt(P->a * P->a - xa * xa) / (P->one_minus_f * xa));
+            if (invert_sign) {
+                lp.phi = -lp.phi;
+            }
+        }
+        return (lp);
+}
+FREEUP; if (P) pj_dalloc(P); }
+ENTRY0(qsc)
+        P->inv = e_inverse;
+        P->fwd = e_forward;
+        /* Determine the cube face from the center of projection. */
+        if (P->phi0 >= HALFPI - FORTPI / 2.0) {
+            P->face = FACE_TOP;
+        } else if (P->phi0 <= -(HALFPI - FORTPI / 2.0)) {
+            P->face = FACE_BOTTOM;
+        } else if (fabs(P->lam0) <= FORTPI) {
+            P->face = FACE_FRONT;
+        } else if (fabs(P->lam0) <= HALFPI + FORTPI) {
+            P->face = (P->lam0 > 0.0 ? FACE_RIGHT : FACE_LEFT);
+        } else {
+            P->face = FACE_BACK;
+        }
+        /* Fill in useful values for the ellipsoid <-> sphere shift
+         * described in [LK12]. */
+        if (P->es) {
+            P->a_squared = P->a * P->a;
+            P->b = P->a * sqrt(1.0 - P->es);
+            P->one_minus_f = 1.0 - (P->a - P->b) / P->a;
+            P->one_minus_f_squared = P->one_minus_f * P->one_minus_f;
+        }
+ENDENTRY(P)
diff --git a/src/PJ_robin.c b/src/PJ_robin.c
index 71dac1e..39513e2 100644
--- a/src/PJ_robin.c
+++ b/src/PJ_robin.c
@@ -3,49 +3,62 @@
 PROJ_HEAD(robin, "Robinson") "\n\tPCyl., Sph.";
 #define V(C,z) (C.c0 + z * (C.c1 + z * (C.c2 + z * C.c3)))
 #define DV(C,z) (C.c1 + z * (C.c2 + C.c2 + z * 3. * C.c3))
-/* note: following terms based upon 5 deg. intervals in degrees. */
-static struct COEFS {
+
+/* 
+note: following terms based upon 5 deg. intervals in degrees.
+
+Some background on these coefficients is available at:
+
+http://article.gmane.org/gmane.comp.gis.proj-4.devel/6039
+http://trac.osgeo.org/proj/ticket/113
+*/
+
+struct COEFS {
 	float c0, c1, c2, c3;
-} X[] = {
-    {1,	-5.67239e-12,	-7.15511e-05,	3.11028e-06},
-    {0.9986,	-0.000482241,	-2.4897e-05,	-1.33094e-06},
-    {0.9954,	-0.000831031,	-4.4861e-05,	-9.86588e-07},
-    {0.99,	-0.00135363,	-5.96598e-05,	3.67749e-06},
-    {0.9822,	-0.00167442,	-4.4975e-06,	-5.72394e-06},
-    {0.973,	-0.00214869,	-9.03565e-05,	1.88767e-08},
-    {0.96,	-0.00305084,	-9.00732e-05,	1.64869e-06},
-    {0.9427,	-0.00382792,	-6.53428e-05,	-2.61493e-06},
-    {0.9216,	-0.00467747,	-0.000104566,	4.8122e-06},
-    {0.8962,	-0.00536222,	-3.23834e-05,	-5.43445e-06},
-    {0.8679,	-0.00609364,	-0.0001139,	3.32521e-06},
-    {0.835,	-0.00698325,	-6.40219e-05,	9.34582e-07},
-    {0.7986,	-0.00755337,	-5.00038e-05,	9.35532e-07},
-    {0.7597,	-0.00798325,	-3.59716e-05,	-2.27604e-06},
-    {0.7186,	-0.00851366,	-7.0112e-05,	-8.63072e-06},
-    {0.6732,	-0.00986209,	-0.000199572,	1.91978e-05},
-    {0.6213,	-0.010418,	8.83948e-05,	6.24031e-06},
-    {0.5722,	-0.00906601,	0.000181999,	6.24033e-06},
-    {0.5322, 0.,0.,0.}  },
-Y[] = {
-    {0,	0.0124,	3.72529e-10,	1.15484e-09},
-    {0.062,	0.0124001,	1.76951e-08,	-5.92321e-09},
-    {0.124,	0.0123998,	-7.09668e-08,	2.25753e-08},
-    {0.186,	0.0124008,	2.66917e-07,	-8.44523e-08},
-    {0.248,	0.0123971,	-9.99682e-07,	3.15569e-07},
-    {0.31,	0.0124108,	3.73349e-06,	-1.1779e-06},
-    {0.372,	0.0123598,	-1.3935e-05,	4.39588e-06},
-    {0.434,	0.0125501,	5.20034e-05,	-1.00051e-05},
-    {0.4958,	0.0123198,	-9.80735e-05,	9.22397e-06},
-    {0.5571,	0.0120308,	4.02857e-05,	-5.2901e-06},
-    {0.6176,	0.0120369,	-3.90662e-05,	7.36117e-07},
-    {0.6769,	0.0117015,	-2.80246e-05,	-8.54283e-07},
-    {0.7346,	0.0113572,	-4.08389e-05,	-5.18524e-07},
-    {0.7903,	0.0109099,	-4.86169e-05,	-1.0718e-06},
-    {0.8435,	0.0103433,	-6.46934e-05,	5.36384e-09},
-    {0.8936,	0.00969679,	-6.46129e-05,	-8.54894e-06},
-    {0.9394,	0.00840949,	-0.000192847,	-4.21023e-06},
-    {0.9761,	0.00616525,	-0.000256001,	-4.21021e-06},
-    {1., 0.,0.,0} };
+};
+
+static const struct COEFS X[] = {
+    {1, 2.2199e-17, -7.15515e-05, 3.1103e-06},
+    {0.9986, -0.000482243, -2.4897e-05, -1.3309e-06},
+    {0.9954, -0.00083103, -4.48605e-05, -9.86701e-07},
+    {0.99, -0.00135364, -5.9661e-05, 3.6777e-06},
+    {0.9822, -0.00167442, -4.49547e-06, -5.72411e-06},
+    {0.973, -0.00214868, -9.03571e-05, 1.8736e-08},
+    {0.96, -0.00305085, -9.00761e-05, 1.64917e-06},
+    {0.9427, -0.00382792, -6.53386e-05, -2.6154e-06},
+    {0.9216, -0.00467746, -0.00010457, 4.81243e-06},
+    {0.8962, -0.00536223, -3.23831e-05, -5.43432e-06},
+    {0.8679, -0.00609363, -0.000113898, 3.32484e-06},
+    {0.835, -0.00698325, -6.40253e-05, 9.34959e-07},
+    {0.7986, -0.00755338, -5.00009e-05, 9.35324e-07},
+    {0.7597, -0.00798324, -3.5971e-05, -2.27626e-06},
+    {0.7186, -0.00851367, -7.01149e-05, -8.6303e-06},
+    {0.6732, -0.00986209, -0.000199569, 1.91974e-05},
+    {0.6213, -0.010418, 8.83923e-05, 6.24051e-06},
+    {0.5722, -0.00906601, 0.000182, 6.24051e-06},
+    {0.5322, -0.00677797, 0.000275608, 6.24051e-06}
+};
+static const struct COEFS Y[] = {
+    {-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11},
+    {0.062, 0.0124, -1.26793e-09, 4.22642e-10},
+    {0.124, 0.0124, 5.07171e-09, -1.60604e-09},
+    {0.186, 0.0123999, -1.90189e-08, 6.00152e-09},
+    {0.248, 0.0124002, 7.10039e-08, -2.24e-08},
+    {0.31, 0.0123992, -2.64997e-07, 8.35986e-08},
+    {0.372, 0.0124029, 9.88983e-07, -3.11994e-07},
+    {0.434, 0.0123893, -3.69093e-06, -4.35621e-07},
+    {0.4958, 0.0123198, -1.02252e-05, -3.45523e-07},
+    {0.5571, 0.0121916, -1.54081e-05, -5.82288e-07},
+    {0.6176, 0.0119938, -2.41424e-05, -5.25327e-07},
+    {0.6769, 0.011713, -3.20223e-05, -5.16405e-07},
+    {0.7346, 0.0113541, -3.97684e-05, -6.09052e-07},
+    {0.7903, 0.0109107, -4.89042e-05, -1.04739e-06},
+    {0.8435, 0.0103431, -6.4615e-05, -1.40374e-09},
+    {0.8936, 0.00969686, -6.4636e-05, -8.547e-06},
+    {0.9394, 0.00840947, -0.000192841, -4.2106e-06},
+    {0.9761, 0.00616527, -0.000256, -4.2106e-06},
+    {1, 0.00328947, -0.000319159, -4.2106e-06}
+};
 #define FXC	0.8487
 #define FYC	1.3523
 #define C1	11.45915590261646417544
diff --git a/src/PJ_urm5.c b/src/PJ_urm5.c
index 6928bb3..9159df6 100644
--- a/src/PJ_urm5.c
+++ b/src/PJ_urm5.c
@@ -2,7 +2,7 @@
 	double m, rmn, q3, n;
 #define PJ_LIB__
 # include	<projects.h>
-PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph.\n\tn= q= alphi=";
+PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph., no inv.\n\tn= q= alpha=";
 FORWARD(s_forward); /* spheroid */
 	double t;
 
diff --git a/src/README b/src/README
new file mode 100644
index 0000000..ea3a508
--- /dev/null
+++ b/src/README
@@ -0,0 +1,4 @@
+all the files here are directly copied from proj svn, except for PJ_hammer.c
+which is patched to enable the inverse transform.
+
+Currently up-to-date with r2406 proj svn (20131105).
diff --git a/src/geod_interface.c b/src/geod_interface.c
index c144a35..dc75728 100644
--- a/src/geod_interface.c
+++ b/src/geod_interface.c
@@ -2,20 +2,20 @@
 #include "geod_interface.h"
 
 void geod_ini(void) {
-  GeodesicInit(&GlobalGeodesic, geod_a, geod_f);
+  geod_init(&GlobalGeodesic, geod_a, geod_f);
 }
 
 void geod_pre(void) {
   double
     degree = PI/180,
     lat1 = phi1 / degree, lon1 = lam1 /degree, azi1 = al12 / degree;
-  GeodesicLineInit(&GlobalGeodesicLine, &GlobalGeodesic,
+  geod_lineinit(&GlobalGeodesicLine, &GlobalGeodesic,
 		   lat1, lon1, azi1, 0U);
 }
 
 void geod_for(void) {
   double degree = PI/180, s12 = geod_S, lat2, lon2, azi2;
-  Position(&GlobalGeodesicLine, s12, &lat2, &lon2, &azi2);
+  geod_position(&GlobalGeodesicLine, s12, &lat2, &lon2, &azi2);
   azi2 += azi2 >= 0 ? -180 : 180; /* Compute back azimuth */
   phi2 = lat2 * degree;
   lam2 = lon2 * degree;
@@ -28,7 +28,7 @@ void geod_inv(void) {
     lat1 = phi1 / degree, lon1 = lam1 / degree,
     lat2 = phi2 / degree, lon2 = lam2 / degree,
     azi1, azi2, s12;
-  Inverse(&GlobalGeodesic, lat1, lon1, lat2, lon2, &s12, &azi1, &azi2);
+  geod_inverse(&GlobalGeodesic, lat1, lon1, lat2, lon2, &s12, &azi1, &azi2);
   azi2 += azi2 >= 0 ? -180 : 180; /* Compute back azimuth */
   al12 = azi1 * degree; al21 = azi2 * degree; geod_S = s12;
 }
diff --git a/src/geod_interface.h b/src/geod_interface.h
index 161c757..255d505 100644
--- a/src/geod_interface.h
+++ b/src/geod_interface.h
@@ -27,8 +27,8 @@ GEOD_EXTERN struct geodesic {
 # define al21	GEODESIC.ALPHA21
 # define geod_S	GEODESIC.DIST
     
-GEOD_EXTERN struct Geodesic GlobalGeodesic;
-GEOD_EXTERN struct GeodesicLine GlobalGeodesicLine;
+GEOD_EXTERN struct geod_geodesic GlobalGeodesic;
+GEOD_EXTERN struct geod_geodesicline GlobalGeodesicLine;
 GEOD_EXTERN int n_alpha, n_S;
 GEOD_EXTERN double to_meter, fr_meter, del_alpha;
 	
diff --git a/src/geodesic.c b/src/geodesic.c
index 794439a..bd9fc96 100644
--- a/src/geodesic.c
+++ b/src/geodesic.c
@@ -1,19 +1,26 @@
+/**
+ * \file geodesic.c
+ * \brief Implementation of the geodesic routines in C
+ *
+ * For the full documentation see geodesic.h.
+ **********************************************************************/
+
+/** @cond SKIP */
+
 /*
  * This is a C implementation of the geodesic algorithms described in
  *
- *   C. F. F. Karney
- *   Algorithms for geodesics
- *   J. Geodesy (2012)
+ *   C. F. F. Karney,
+ *   Algorithms for geodesics,
+ *   J. Geodesy <b>87</b>, 43--55 (2013);
  *   http://dx.doi.org/10.1007/s00190-012-0578-z
  *   Addenda: http://geographiclib.sf.net/geod-addenda.html
  *
  * See the comments in geodesic.h for documentation.
  *
- * Copyright (c) Charles Karney (2012) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2012-2013) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
- *
- * This file was distributed with GeographicLib 1.27.
  */
 
 #include "geodesic.h"
@@ -117,6 +124,19 @@ static real cbrtx(real x) {
   return x < 0 ? -y : y;
 }
 
+static real sumx(real u, real v, real* t) {
+  volatile real s = u + v;
+  volatile real up = s - v;
+  volatile real vpp = s - up;
+  up -= u;
+  vpp -= v;
+  *t = -(up + vpp);
+  /* error-free sum:
+   * u + v =       s      + t
+   *       = round(u + v) + t */
+  return s;
+}
+
 static real minx(real x, real y)
 { return x < y ? x : y; }
 
@@ -137,21 +157,30 @@ static real AngNormalize(real x)
 static real AngNormalize2(real x)
 { return AngNormalize(fmod(x, (real)(360))); }
 
+static real AngDiff(real x, real y) {
+  real t, d = sumx(-x, y, &t);
+  if ((d - (real)(180)) + t > (real)(0))       /* y - x > 180 */
+    d -= (real)(360);                          /* exact */
+  else if ((d + (real)(180)) + t <= (real)(0)) /* y - x <= -180 */
+    d += (real)(360);                          /* exact */
+  return d + t;
+}
+
 static real AngRound(real x) {
-  const real z = (real)(0.0625); /* 1/16 */
+  const real z = 1/(real)(16);
   volatile real y = fabs(x);
   /* The compiler mustn't "simplify" z - (z - y) to y */
   y = y < z ? z - (z - y) : y;
   return x < 0 ? -y : y;
 }
 
-static void A3coeff(struct Geodesic* g);
-static void C3coeff(struct Geodesic* g);
-static void C4coeff(struct Geodesic* g);
+static void A3coeff(struct geod_geodesic* g);
+static void C3coeff(struct geod_geodesic* g);
+static void C4coeff(struct geod_geodesic* g);
 static real SinCosSeries(boolx sinp,
                          real sinx, real cosx,
                          const real c[], int n);
-static void Lengths(const struct Geodesic* g,
+static void Lengths(const struct geod_geodesic* g,
                     real eps, real sig12,
                     real ssig1, real csig1, real dn1,
                     real ssig2, real csig2, real dn2,
@@ -161,16 +190,18 @@ static void Lengths(const struct Geodesic* g,
                     /* Scratch areas of the right size */
                     real C1a[], real C2a[]);
 static real Astroid(real x, real y);
-static real InverseStart(const struct Geodesic* g,
+static real InverseStart(const struct geod_geodesic* g,
                          real sbet1, real cbet1, real dn1,
                          real sbet2, real cbet2, real dn2,
                          real lam12,
                          real* psalp1, real* pcalp1,
                          /* Only updated if return val >= 0 */
                          real* psalp2, real* pcalp2,
+                         /* Only updated for short lines */
+                         real* pdnm,
                          /* Scratch areas of the right size */
                          real C1a[], real C2a[]);
-static real Lambda12(const struct Geodesic* g,
+static real Lambda12(const struct geod_geodesic* g,
                      real sbet1, real cbet1, real dn1,
                      real sbet2, real cbet2, real dn2,
                      real salp1, real calp1,
@@ -182,16 +213,22 @@ static real Lambda12(const struct Geodesic* g,
                      boolx diffp, real* pdlam12,
                      /* Scratch areas of the right size */
                      real C1a[], real C2a[], real C3a[]);
-static real A3f(const struct Geodesic* g, real eps);
-static void C3f(const struct Geodesic* g, real eps, real c[]);
-static void C4f(const struct Geodesic* g, real eps, real c[]);
+static real A3f(const struct geod_geodesic* g, real eps);
+static void C3f(const struct geod_geodesic* g, real eps, real c[]);
+static void C4f(const struct geod_geodesic* g, real eps, real c[]);
 static real A1m1f(real eps);
 static void C1f(real eps, real c[]);
 static void C1pf(real eps, real c[]);
 static real A2m1f(real eps);
 static void C2f(real eps, real c[]);
-
-void GeodesicInit(struct Geodesic* g, real a, real f) {
+static int transit(real lon1, real lon2);
+static void accini(real s[]);
+static void acccopy(const real s[], real t[]);
+static void accadd(real s[], real y);
+static real accsum(const real s[], real y);
+static void accneg(real s[]);
+
+void geod_init(struct geod_geodesic* g, real a, real f) {
   if (!init) Init();
   g->a = a;
   g->f = f <= 1 ? f : 1/f;
@@ -204,16 +241,26 @@ void GeodesicInit(struct Geodesic* g, real a, real f) {
            (g->e2 == 0 ? 1 :
             (g->e2 > 0 ? atanhx(sqrt(g->e2)) : atan(sqrt(-g->e2))) /
             sqrt(fabs(g->e2))))/2; /* authalic radius squared */
-  /* The sig12 threshold for "really short" */
-  g->etol2 = 0.01 * tol2 / maxx((real)(0.1), sqrt(fabs(g->e2)));
+  /* The sig12 threshold for "really short".  Using the auxiliary sphere
+   * solution with dnm computed at (bet1 + bet2) / 2, the relative error in the
+   * azimuth consistency check is sig12^2 * abs(f) * min(1, 1-f/2) / 2.  (Error
+   * measured for 1/100 < b/a < 100 and abs(f) >= 1/1000.  For a given f and
+   * sig12, the max error occurs for lines near the pole.  If the old rule for
+   * computing dnm = (dn1 + dn2)/2 is used, then the error increases by a
+   * factor of 2.)  Setting this equal to epsilon gives sig12 = etol2.  Here
+   * 0.1 is a safety factor (error decreased by 100) and max(0.001, abs(f))
+   * stops etol2 getting too large in the nearly spherical case. */
+  g->etol2 = 0.1 * tol2 /
+    sqrt( maxx((real)(0.001), fabs(g->f)) * minx((real)(1), 1 - g->f/2) / 2 );
+
   A3coeff(g);
   C3coeff(g);
   C4coeff(g);
 }
 
-void GeodesicLineInit(struct GeodesicLine* l,
-                      const struct Geodesic* g,
-                      real lat1, real lon1, real azi1, unsigned caps) {
+void geod_lineinit(struct geod_geodesicline* l,
+                   const struct geod_geodesic* g,
+                   real lat1, real lon1, real azi1, unsigned caps) {
   real alp1, cbet1, sbet1, phi, eps;
   l->a = g->a;
   l->f = g->f;
@@ -221,23 +268,12 @@ void GeodesicLineInit(struct GeodesicLine* l,
   l->c2 = g->c2;
   l->f1 = g->f1;
   /* If caps is 0 assume the standard direct calculation */
-  l->caps = (caps ? caps : DISTANCE_IN | LONGITUDE) |
-    LATITUDE | AZIMUTH; /* Always allow latitude and azimuth */
+  l->caps = (caps ? caps : GEOD_DISTANCE_IN | GEOD_LONGITUDE) |
+    GEOD_LATITUDE | GEOD_AZIMUTH; /* Always allow latitude and azimuth */
 
-  azi1 = AngNormalize(azi1);
+  /* Guard against underflow in salp0 */
+  azi1 = AngRound(AngNormalize(azi1));
   lon1 = AngNormalize(lon1);
-  if (lat1 == 90) {
-    lon1 += lon1 < 0 ? 180 : -180;
-    lon1 = AngNormalize(lon1 - azi1);
-    azi1 = -180;
-  } else if (lat1 == -90) {
-    lon1 = AngNormalize(lon1 + azi1);
-    azi1 = 0;
-  } else {
-    /* Guard against underflow in salp0 */
-    azi1 = AngRound(azi1);
-  }
-
   l->lat1 = lat1;
   l->lon1 = lon1;
   l->azi1 = azi1;
@@ -245,7 +281,7 @@ void GeodesicLineInit(struct GeodesicLine* l,
   alp1 = azi1 * degree;
   /* Enforce sin(pi) == 0 and cos(pi/2) == 0.  Better to face the ensuing
    * problems directly than to skirt them. */
-  l->salp1 =     azi1  == -180 ? 0 : sin(alp1);
+  l->salp1 =      azi1  == -180 ? 0 : sin(alp1);
   l->calp1 = fabs(azi1) ==   90 ? 0 : cos(alp1);
   phi = lat1 * degree;
   /* Ensure cbet1 = +epsilon at poles */
@@ -312,12 +348,12 @@ void GeodesicLineInit(struct GeodesicLine* l,
   }
 }
 
-real GenPosition(const struct GeodesicLine* l,
-                 boolx arcmode, real s12_a12,
-                 real* plat2, real* plon2, real* pazi2,
-                 real* ps12, real* pm12,
-                 real* pM12, real* pM21,
-                 real* pS12) {
+real geod_genposition(const struct geod_geodesicline* l,
+                      boolx arcmode, real s12_a12,
+                      real* plat2, real* plon2, real* pazi2,
+                      real* ps12, real* pm12,
+                      real* pM12, real* pM21,
+                      real* pS12) {
   real lat2 = 0, lon2 = 0, azi2 = 0, s12 = 0,
     m12 = 0, M12 = 0, M21 = 0, S12 = 0;
   /* Avoid warning about uninitialized B12. */
@@ -325,16 +361,17 @@ real GenPosition(const struct GeodesicLine* l,
   real omg12, lam12, lon12;
   real ssig2, csig2, sbet2, cbet2, somg2, comg2, salp2, calp2, dn2;
   unsigned outmask =
-    (plat2 ? LATITUDE : 0U) |
-    (plon2 ? LONGITUDE : 0U) |
-    (pazi2 ? AZIMUTH : 0U) |
-    (ps12 ? DISTANCE : 0U) |
-    (pm12 ? REDUCEDLENGTH : 0U) |
-    (pM12 || pM21 ? GEODESICSCALE : 0U) |
-    (pS12 ? AREA : 0U);
+    (plat2 ? GEOD_LATITUDE : 0U) |
+    (plon2 ? GEOD_LONGITUDE : 0U) |
+    (pazi2 ? GEOD_AZIMUTH : 0U) |
+    (ps12 ? GEOD_DISTANCE : 0U) |
+    (pm12 ? GEOD_REDUCEDLENGTH : 0U) |
+    (pM12 || pM21 ? GEOD_GEODESICSCALE : 0U) |
+    (pS12 ? GEOD_AREA : 0U);
 
   outmask &= l->caps & OUT_ALL;
-  if (!( TRUE /*Init()*/ && (arcmode || (l->caps & DISTANCE_IN & OUT_ALL)) ))
+  if (!( TRUE /*Init()*/ &&
+         (arcmode || (l->caps & GEOD_DISTANCE_IN & OUT_ALL)) ))
     /* Uninitialized or impossible distance calculation requested */
     return NaN;
 
@@ -397,7 +434,7 @@ real GenPosition(const struct GeodesicLine* l,
   ssig2 = l->ssig1 * csig12 + l->csig1 * ssig12;
   csig2 = l->csig1 * csig12 - l->ssig1 * ssig12;
   dn2 = sqrt(1 + l->k2 * sq(ssig2));
-  if (outmask & (DISTANCE | REDUCEDLENGTH | GEODESICSCALE)) {
+  if (outmask & (GEOD_DISTANCE | GEOD_REDUCEDLENGTH | GEOD_GEODESICSCALE)) {
     if (arcmode || fabs(l->f) > 0.01)
       B12 = SinCosSeries(TRUE, ssig2, csig2, l->C1a, nC1);
     AB1 = (1 + l->A1m1) * (B12 - l->B11);
@@ -417,10 +454,10 @@ real GenPosition(const struct GeodesicLine* l,
   omg12 = atan2(somg2 * l->comg1 - comg2 * l->somg1,
                 comg2 * l->comg1 + somg2 * l->somg1);
 
-  if (outmask & DISTANCE)
+  if (outmask & GEOD_DISTANCE)
     s12 = arcmode ? l->b * ((1 + l->A1m1) * sig12 + AB1) : s12_a12;
 
-  if (outmask & LONGITUDE) {
+  if (outmask & GEOD_LONGITUDE) {
     lam12 = omg12 + l->A3c *
       ( sig12 + (SinCosSeries(TRUE, ssig2, csig2, l->C3a, nC3-1)
                  - l->B31));
@@ -431,31 +468,31 @@ real GenPosition(const struct GeodesicLine* l,
     lon2 = AngNormalize(l->lon1 + lon12);
   }
 
-  if (outmask & LATITUDE)
+  if (outmask & GEOD_LATITUDE)
     lat2 = atan2(sbet2, l->f1 * cbet2) / degree;
 
-  if (outmask & AZIMUTH)
+  if (outmask & GEOD_AZIMUTH)
     /* minus signs give range [-180, 180). 0- converts -0 to +0. */
     azi2 = 0 - atan2(-salp2, calp2) / degree;
 
-  if (outmask & (REDUCEDLENGTH | GEODESICSCALE)) {
+  if (outmask & (GEOD_REDUCEDLENGTH | GEOD_GEODESICSCALE)) {
     real
       B22 = SinCosSeries(TRUE, ssig2, csig2, l->C2a, nC2),
       AB2 = (1 + l->A2m1) * (B22 - l->B21),
       J12 = (l->A1m1 - l->A2m1) * sig12 + (AB1 - AB2);
-    if (outmask & REDUCEDLENGTH)
+    if (outmask & GEOD_REDUCEDLENGTH)
       /* Add parens around (csig1 * ssig2) and (ssig1 * csig2) to ensure
        * accurate cancellation in the case of coincident points. */
       m12 = l->b * ((dn2 * (l->csig1 * ssig2) - l->dn1 * (l->ssig1 * csig2))
                     - l->csig1 * csig2 * J12);
-    if (outmask & GEODESICSCALE) {
+    if (outmask & GEOD_GEODESICSCALE) {
       real t = l->k2 * (ssig2 - l->ssig1) * (ssig2 + l->ssig1) / (l->dn1 + dn2);
       M12 = csig12 + (t *  ssig2 -  csig2 * J12) * l->ssig1 / l->dn1;
       M21 = csig12 - (t * l->ssig1 - l->csig1 * J12) *  ssig2 /  dn2;
     }
   }
 
-  if (outmask & AREA) {
+  if (outmask & GEOD_AREA) {
     real
       B42 = SinCosSeries(FALSE, ssig2, csig2, l->C4a, nC4);
     real salp12, calp12;
@@ -488,66 +525,66 @@ real GenPosition(const struct GeodesicLine* l,
     S12 = l->c2 * atan2(salp12, calp12) + l->A4 * (B42 - l->B41);
   }
 
-  if (outmask & LATITUDE)
+  if (outmask & GEOD_LATITUDE)
     *plat2 = lat2;
-  if (outmask & LONGITUDE)
+  if (outmask & GEOD_LONGITUDE)
     *plon2 = lon2;
-  if (outmask & AZIMUTH)
+  if (outmask & GEOD_AZIMUTH)
     *pazi2 = azi2;
-  if (outmask & DISTANCE)
+  if (outmask & GEOD_DISTANCE)
     *ps12 = s12;
-  if (outmask & REDUCEDLENGTH)
+  if (outmask & GEOD_REDUCEDLENGTH)
     *pm12 = m12;
-  if (outmask & GEODESICSCALE) {
+  if (outmask & GEOD_GEODESICSCALE) {
     if (pM12) *pM12 = M12;
     if (pM21) *pM21 = M21;
   }
-  if (outmask & AREA)
+  if (outmask & GEOD_AREA)
     *pS12 = S12;
 
   return arcmode ? s12_a12 : sig12 / degree;
 }
 
-void Position(const struct GeodesicLine* l, real s12,
-              real* plat2, real* plon2, real* pazi2) {
-  GenPosition(l, FALSE, s12, plat2, plon2, pazi2, 0, 0, 0, 0, 0);
+void geod_position(const struct geod_geodesicline* l, real s12,
+                   real* plat2, real* plon2, real* pazi2) {
+  geod_genposition(l, FALSE, s12, plat2, plon2, pazi2, 0, 0, 0, 0, 0);
 }
 
-real GenDirect(const struct Geodesic* g,
-               real lat1, real lon1, real azi1,
-               boolx arcmode, real s12_a12,
-               real* plat2, real* plon2, real* pazi2,
-               real* ps12, real* pm12, real* pM12, real* pM21,
-               real* pS12) {
-  struct GeodesicLine l;
+real geod_gendirect(const struct geod_geodesic* g,
+                    real lat1, real lon1, real azi1,
+                    boolx arcmode, real s12_a12,
+                    real* plat2, real* plon2, real* pazi2,
+                    real* ps12, real* pm12, real* pM12, real* pM21,
+                    real* pS12) {
+  struct geod_geodesicline l;
   unsigned outmask =
-    (plat2 ? LATITUDE : 0U) |
-    (plon2 ? LONGITUDE : 0U) |
-    (pazi2 ? AZIMUTH : 0U) |
-    (ps12 ? DISTANCE : 0U) |
-    (pm12 ? REDUCEDLENGTH : 0U) |
-    (pM12 || pM21 ? GEODESICSCALE : 0U) |
-    (pS12 ? AREA : 0U);
-
-  GeodesicLineInit(&l, g, lat1, lon1, azi1,
-                   /* Automatically supply DISTANCE_IN if necessary */
-                   outmask | (arcmode ? NONE : DISTANCE_IN));
-  return GenPosition(&l, arcmode, s12_a12,
-                     plat2, plon2, pazi2, ps12, pm12, pM12, pM21, pS12);
+    (plat2 ? GEOD_LATITUDE : 0U) |
+    (plon2 ? GEOD_LONGITUDE : 0U) |
+    (pazi2 ? GEOD_AZIMUTH : 0U) |
+    (ps12 ? GEOD_DISTANCE : 0U) |
+    (pm12 ? GEOD_REDUCEDLENGTH : 0U) |
+    (pM12 || pM21 ? GEOD_GEODESICSCALE : 0U) |
+    (pS12 ? GEOD_AREA : 0U);
+
+  geod_lineinit(&l, g, lat1, lon1, azi1,
+                /* Automatically supply GEOD_DISTANCE_IN if necessary */
+                outmask | (arcmode ? GEOD_NONE : GEOD_DISTANCE_IN));
+  return geod_genposition(&l, arcmode, s12_a12,
+                          plat2, plon2, pazi2, ps12, pm12, pM12, pM21, pS12);
 }
 
-void Direct(const struct Geodesic* g,
-            real lat1, real lon1, real azi1,
-            real s12,
-            real* plat2, real* plon2, real* pazi2) {
-  GenDirect(g, lat1, lon1, azi1, FALSE, s12, plat2, plon2, pazi2,
-            0, 0, 0, 0, 0);
+void geod_direct(const struct geod_geodesic* g,
+                 real lat1, real lon1, real azi1,
+                 real s12,
+                 real* plat2, real* plon2, real* pazi2) {
+  geod_gendirect(g, lat1, lon1, azi1, FALSE, s12, plat2, plon2, pazi2,
+                 0, 0, 0, 0, 0);
 }
 
-real GenInverse(const struct Geodesic* g,
-                real lat1, real lon1, real lat2, real lon2,
-                real* ps12, real* pazi1, real* pazi2,
-                real* pm12, real* pM12, real* pM21, real* pS12) {
+real geod_geninverse(const struct geod_geodesic* g,
+                     real lat1, real lon1, real lat2, real lon2,
+                     real* ps12, real* pazi1, real* pazi2,
+                     real* pm12, real* pM12, real* pM21, real* pS12) {
   real s12 = 0, azi1 = 0, azi2 = 0, m12 = 0, M12 = 0, M21 = 0, S12 = 0;
   real lon12;
   int latsign, lonsign, swapp;
@@ -560,23 +597,22 @@ real GenInverse(const struct Geodesic* g,
   real omg12 = 0;
 
   unsigned outmask =
-    (ps12 ? DISTANCE : 0U) |
-    (pazi1 || pazi2 ? AZIMUTH : 0U) |
-    (pm12 ? REDUCEDLENGTH : 0U) |
-    (pM12 || pM21 ? GEODESICSCALE : 0U) |
-    (pS12 ? AREA : 0U);
+    (ps12 ? GEOD_DISTANCE : 0U) |
+    (pazi1 || pazi2 ? GEOD_AZIMUTH : 0U) |
+    (pm12 ? GEOD_REDUCEDLENGTH : 0U) |
+    (pM12 || pM21 ? GEOD_GEODESICSCALE : 0U) |
+    (pS12 ? GEOD_AREA : 0U);
 
   outmask &= OUT_ALL;
-  lon12 = AngNormalize(AngNormalize(lon2) -
-                            AngNormalize(lon1));
-  /* If very close to being on the same meridian, then make it so.
-   * Not sure this is necessary... */
+  /* Compute longitude difference (AngDiff does this carefully).  Result is
+   * in [-180, 180] but -180 is only for west-going geodesics.  180 is for
+   * east-going and meridional geodesics. */
+  lon12 = AngDiff(AngNormalize(lon1), AngNormalize(lon2));
+  /* If very close to being on the same half-meridian, then make it so. */
   lon12 = AngRound(lon12);
   /* Make longitude difference positive. */
   lonsign = lon12 >= 0 ? 1 : -1;
   lon12 *= lonsign;
-  if (lon12 == 180)
-    lonsign = 1;
   /* If really close to the equator, treat as on equator. */
   lat1 = AngRound(lat1);
   lat2 = AngRound(lat2);
@@ -637,7 +673,6 @@ real GenInverse(const struct Geodesic* g,
   slam12 = lon12 == 180 ? 0 : sin(lam12);
   clam12 = cos(lam12);      /* lon12 == 90 isn't interesting */
 
-
   meridian = lat1 == -90 || slam12 == 0;
 
   if (meridian) {
@@ -660,7 +695,7 @@ real GenInverse(const struct Geodesic* g,
       real dummy;
       Lengths(g, g->n, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2,
               cbet1, cbet2, &s12x, &m12x, &dummy,
-              (outmask & GEODESICSCALE) != 0U, &M12, &M21, C1a, C2a);
+              (outmask & GEOD_GEODESICSCALE) != 0U, &M12, &M21, C1a, C2a);
     }
     /* Add the check for sig12 since zero length geodesics might yield m12 <
      * 0.  Test case was
@@ -688,7 +723,7 @@ real GenInverse(const struct Geodesic* g,
     s12x = g->a * lam12;
     sig12 = omg12 = lam12 / g->f1;
     m12x = g->b * sin(sig12);
-    if (outmask & GEODESICSCALE)
+    if (outmask & GEOD_GEODESICSCALE)
       M12 = M21 = cos(sig12);
     a12 = lon12 / g->f1;
 
@@ -698,17 +733,17 @@ real GenInverse(const struct Geodesic* g,
      * meridian and geodesic is neither meridional or equatorial. */
 
     /* Figure a starting point for Newton's method */
+    real dnm = 0;
     sig12 = InverseStart(g, sbet1, cbet1, dn1, sbet2, cbet2, dn2,
                          lam12,
-                         &salp1, &calp1, &salp2, &calp2,
+                         &salp1, &calp1, &salp2, &calp2, &dnm,
                          C1a, C2a);
 
     if (sig12 >= 0) {
-      /* Short lines (InverseStart sets salp2, calp2) */
-      real dnm = (dn1 + dn2) / 2;
+      /* Short lines (InverseStart sets salp2, calp2, dnm) */
       s12x = sig12 * g->b * dnm;
       m12x = sq(dnm) * g->b * sin(sig12 / dnm);
-      if (outmask & GEODESICSCALE)
+      if (outmask & GEOD_GEODESICSCALE)
         M12 = M21 = cos(sig12 / dnm);
       a12 = sig12 / degree;
       omg12 = lam12 / (g->f1 * dnm);
@@ -739,13 +774,13 @@ real GenInverse(const struct Geodesic* g,
                         &eps, &omg12, numit < maxit1, &dv, C1a, C2a, C3a)
                - lam12);
         /* 2 * tol0 is approximately 1 ulp for a number in [0, pi]. */
-        if (tripb || fabs(v) < (tripn ? 8 : 2) * tol0) break;
+        /* Reversed test to allow escape with NaNs */
+        if (tripb || !(fabs(v) >= (tripn ? 8 : 2) * tol0)) break;
         /* Update bracketing values */
-        if (v > 0 && (numit > maxit1 || calp1/salp1 > calp1b/salp1b)) {
-          salp1b = salp1; calp1b = calp1;
-        } else if (numit > maxit1 || calp1/salp1 < calp1a/salp1a) {
-          salp1a = salp1; calp1a = calp1;
-        }
+        if (v > 0 && (numit > maxit1 || calp1/salp1 > calp1b/salp1b))
+          { salp1b = salp1; calp1b = calp1; }
+        else if (v < 0 && (numit > maxit1 || calp1/salp1 < calp1a/salp1a))
+          { salp1a = salp1; calp1a = calp1; }
         if (numit < maxit1 && dv > 0) {
           real
             dalp1 = -v/dv;
@@ -782,7 +817,7 @@ real GenInverse(const struct Geodesic* g,
         real dummy;
         Lengths(g, eps, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2,
                 cbet1, cbet2, &s12x, &m12x, &dummy,
-                (outmask & GEODESICSCALE) != 0U, &M12, &M21, C1a, C2a);
+                (outmask & GEOD_GEODESICSCALE) != 0U, &M12, &M21, C1a, C2a);
       }
       m12x *= g->b;
       s12x *= g->b;
@@ -791,13 +826,13 @@ real GenInverse(const struct Geodesic* g,
     }
   }
 
-  if (outmask & DISTANCE)
+  if (outmask & GEOD_DISTANCE)
     s12 = 0 + s12x;             /* Convert -0 to 0 */
 
-  if (outmask & REDUCEDLENGTH)
+  if (outmask & GEOD_REDUCEDLENGTH)
     m12 = 0 + m12x;             /* Convert -0 to 0 */
 
-  if (outmask & AREA) {
+  if (outmask & GEOD_AREA) {
     real
       /* From Lambda12: sin(alp1) * cos(bet1) = sin(alp0) */
       salp0 = salp1 * cbet1,
@@ -860,47 +895,45 @@ real GenInverse(const struct Geodesic* g,
   if (swapp < 0) {
     swapx(&salp1, &salp2);
     swapx(&calp1, &calp2);
-    if (outmask & GEODESICSCALE)
+    if (outmask & GEOD_GEODESICSCALE)
       swapx(&M12, &M21);
   }
 
   salp1 *= swapp * lonsign; calp1 *= swapp * latsign;
   salp2 *= swapp * lonsign; calp2 *= swapp * latsign;
 
-  if (outmask & AZIMUTH) {
+  if (outmask & GEOD_AZIMUTH) {
     /* minus signs give range [-180, 180). 0- converts -0 to +0. */
     azi1 = 0 - atan2(-salp1, calp1) / degree;
     azi2 = 0 - atan2(-salp2, calp2) / degree;
   }
 
-  if (outmask & DISTANCE)
+  if (outmask & GEOD_DISTANCE)
     *ps12 = s12;
-  if (outmask & AZIMUTH) {
+  if (outmask & GEOD_AZIMUTH) {
     if (pazi1) *pazi1 = azi1;
     if (pazi2) *pazi2 = azi2;
   }
-  if (outmask & REDUCEDLENGTH)
+  if (outmask & GEOD_REDUCEDLENGTH)
     *pm12 = m12;
-  if (outmask & GEODESICSCALE) {
+  if (outmask & GEOD_GEODESICSCALE) {
     if (pM12) *pM12 = M12;
     if (pM21) *pM21 = M21;
   }
-  if (outmask & AREA)
+  if (outmask & GEOD_AREA)
     *pS12 = S12;
 
   /* Returned value in [0, 180] */
   return a12;
 }
 
-void Inverse(const struct Geodesic* g,
-             double lat1, double lon1, double lat2, double lon2,
-             double* ps12, double* pazi1, double* pazi2) {
-  GenInverse(g, lat1, lon1, lat2, lon2, ps12, pazi1, pazi2, 0, 0, 0, 0);
+void geod_inverse(const struct geod_geodesic* g,
+                  real lat1, real lon1, real lat2, real lon2,
+                  real* ps12, real* pazi1, real* pazi2) {
+  geod_geninverse(g, lat1, lon1, lat2, lon2, ps12, pazi1, pazi2, 0, 0, 0, 0);
 }
 
-real SinCosSeries(boolx sinp,
-                  real sinx, real cosx,
-                  const real c[], int n) {
+real SinCosSeries(boolx sinp, real sinx, real cosx, const real c[], int n) {
   /* Evaluate
    * y = sinp ? sum(c[i] * sin( 2*i    * x), i, 1, n) :
    *            sum(c[i] * cos((2*i+1) * x), i, 0, n-1)
@@ -922,7 +955,7 @@ real SinCosSeries(boolx sinp,
     : cosx * (y0 - y1);         /* cos(x) * (y0 - y1) */
 }
 
-void Lengths(const struct Geodesic* g,
+void Lengths(const struct geod_geodesic* g,
              real eps, real sig12,
              real ssig1, real csig1, real dn1,
              real ssig2, real csig2, real dn2,
@@ -1019,16 +1052,18 @@ real Astroid(real x, real y) {
   return k;
 }
 
-real InverseStart(const struct Geodesic* g,
+real InverseStart(const struct geod_geodesic* g,
                   real sbet1, real cbet1, real dn1,
                   real sbet2, real cbet2, real dn2,
                   real lam12,
                   real* psalp1, real* pcalp1,
                   /* Only updated if return val >= 0 */
                   real* psalp2, real* pcalp2,
+                  /* Only updated for short lines */
+                  real* pdnm,
                   /* Scratch areas of the right size */
                   real C1a[], real C2a[]) {
-  real salp1 = 0, calp1 = 0, salp2 = 0, calp2 = 0;
+  real salp1 = 0, calp1 = 0, salp2 = 0, calp2 = 0, dnm = 0;
 
   /* Return a starting point for Newton's method in salp1 and calp1 (function
    * value is -1).  If Newton's method doesn't need to be used, return also
@@ -1056,11 +1091,17 @@ real InverseStart(const struct Geodesic* g,
   real sbet12a = sbet2 * cbet1 + cbet2 * sbet1;
 #endif
   boolx shortline = cbet12 >= 0 && sbet12 < (real)(0.5) &&
-    lam12 <= pi / 6;
-  real
-    omg12 = !shortline ? lam12 : lam12 / (g->f1 * (dn1 + dn2) / 2),
-    somg12 = sin(omg12), comg12 = cos(omg12);
-  real ssig12, csig12;
+    cbet2 * lam12 < (real)(0.5);
+  real omg12 = lam12, somg12, comg12, ssig12, csig12;
+  if (shortline) {
+    real sbetm2 = sq(sbet1 + sbet2);
+    /* sin((bet1+bet2)/2)^2
+     * =  (sbet1 + sbet2)^2 / ((sbet1 + sbet2)^2 + (cbet1 + cbet2)^2) */
+    sbetm2 /= sbetm2 + sq(cbet1 + cbet2);
+    dnm = sqrt(1 + g->ep2 * sbetm2);
+    omg12 /= g->f1 * dnm;
+  }
+  somg12 = sin(omg12); comg12 = cos(omg12);
 
   salp1 = cbet2 * somg12;
   calp1 = comg12 >= 0 ?
@@ -1073,7 +1114,8 @@ real InverseStart(const struct Geodesic* g,
   if (shortline && ssig12 < g->etol2) {
     /* really short lines */
     salp2 = cbet1 * somg12;
-    calp2 = sbet12 - cbet1 * sbet2 * sq(somg12) / (1 + comg12);
+    calp2 = sbet12 - cbet1 * sbet2 *
+      (comg12 >= 0 ? sq(somg12) / (1 + comg12) : 1 - comg12);
     SinCosNorm(&salp2, &calp2);
     /* Set return value */
     sig12 = atan2(ssig12, csig12);
@@ -1180,6 +1222,8 @@ real InverseStart(const struct Geodesic* g,
 
   *psalp1 = salp1;
   *pcalp1 = calp1;
+  if (shortline)
+    *pdnm = dnm;
   if (sig12 >= 0) {
     *psalp2 = salp2;
     *pcalp2 = calp2;
@@ -1187,7 +1231,7 @@ real InverseStart(const struct Geodesic* g,
   return sig12;
 }
 
-real Lambda12(const struct Geodesic* g,
+real Lambda12(const struct geod_geodesic* g,
               real sbet1, real cbet1, real dn1,
               real sbet2, real cbet2, real dn2,
               real salp1, real calp1,
@@ -1286,7 +1330,7 @@ real Lambda12(const struct Geodesic* g,
   return lam12;
 }
 
-real A3f(const struct Geodesic* g, real eps) {
+real A3f(const struct geod_geodesic* g, real eps) {
   /* Evaluate sum(A3x[k] * eps^k, k, 0, nA3x-1) by Horner's method */
   real v = 0;
   int i;
@@ -1295,7 +1339,7 @@ real A3f(const struct Geodesic* g, real eps) {
   return v;
 }
 
-void C3f(const struct Geodesic* g, real eps, real c[]) {
+void C3f(const struct geod_geodesic* g, real eps, real c[]) {
   /* Evaluate C3 coeffs by Horner's method
    * Elements c[1] thru c[nC3 - 1] are set */
   int i, j, k;
@@ -1313,7 +1357,7 @@ void C3f(const struct Geodesic* g, real eps, real c[]) {
   }
 }
 
-void C4f(const struct Geodesic* g, real eps, real c[]) {
+void C4f(const struct geod_geodesic* g, real eps, real c[]) {
   /* Evaluate C4 coeffs by Horner's method
    * Elements c[0] thru c[nC4 - 1] are set */
   int i, j, k;
@@ -1404,7 +1448,7 @@ void C2f(real eps, real c[])  {
 }
 
 /* The scale factor A3 = mean value of (d/dsigma)I3 */
-void A3coeff(struct Geodesic* g) {
+void A3coeff(struct geod_geodesic* g) {
   g->A3x[0] = 1;
   g->A3x[1] = (g->n-1)/2;
   g->A3x[2] = (g->n*(3*g->n-1)-2)/8;
@@ -1414,7 +1458,7 @@ void A3coeff(struct Geodesic* g) {
 }
 
 /* The coefficients C3[l] in the Fourier expansion of B3 */
-void C3coeff(struct Geodesic* g) {
+void C3coeff(struct geod_geodesic* g) {
   g->C3x[0] = (1-g->n)/4;
   g->C3x[1] = (1-g->n*g->n)/8;
   g->C3x[2] = ((3-g->n)*g->n+3)/64;
@@ -1435,7 +1479,7 @@ void C3coeff(struct Geodesic* g) {
 /* Generated by Maxima on 2012-10-19 08:02:34-04:00 */
 
 /* The coefficients C4[l] in the Fourier expansion of I4 */
-void C4coeff(struct Geodesic* g) {
+void C4coeff(struct geod_geodesic* g) {
   g->C4x[0] = (g->n*(g->n*(g->n*(g->n*(100*g->n+208)+572)+3432)-12012)+30030)/
     45045;
   g->C4x[1] = (g->n*(g->n*(g->n*(64*g->n+624)-4576)+6864)-3003)/15015;
@@ -1459,3 +1503,268 @@ void C4coeff(struct Geodesic* g) {
   g->C4x[19] = -128/(real)(135135);
   g->C4x[20] = 128/(real)(99099);
 }
+
+int transit(real lon1, real lon2) {
+  real lon12;
+  /* Return 1 or -1 if crossing prime meridian in east or west direction.
+   * Otherwise return zero. */
+  /* Compute lon12 the same way as Geodesic::Inverse. */
+  lon1 = AngNormalize(lon1);
+  lon2 = AngNormalize(lon2);
+  lon12 = AngDiff(lon1, lon2);
+  return lon1 < 0 && lon2 >= 0 && lon12 > 0 ? 1 :
+    (lon2 < 0 && lon1 >= 0 && lon12 < 0 ? -1 : 0);
+}
+
+void accini(real s[]) {
+  /* Initialize an accumulator; this is an array with two elements. */
+  s[0] = s[1] = 0;
+}
+
+void acccopy(const real s[], real t[]) {
+  /* Copy an accumulator; t = s. */
+  t[0] = s[0]; t[1] = s[1];
+}
+
+void accadd(real s[], real y) {
+  /* Add y to an accumulator. */
+  real u, z = sumx(y, s[1], &u);
+  s[0] = sumx(z, s[0], &s[1]);
+  if (s[0] == 0)
+    s[0] = u;
+  else
+    s[1] = s[1] + u;
+}
+
+real accsum(const real s[], real y) {
+  /* Return accumulator + y (but don't add to accumulator). */
+  real t[2];
+  acccopy(s, t);
+  accadd(t, y);
+  return t[0];
+}
+
+void accneg(real s[]) {
+  /* Negate an accumulator. */
+  s[0] = -s[0]; s[1] = -s[1];
+}
+
+void geod_polygon_init(struct geod_polygon* p, boolx polylinep) {
+  p->lat0 = p->lon0 = p->lat = p->lon = NaN;
+  p->polyline = (polylinep != 0);
+  accini(p->P);
+  accini(p->A);
+  p->num = p->crossings = 0;
+}
+
+void geod_polygon_addpoint(const struct geod_geodesic* g,
+                           struct geod_polygon* p,
+                           real lat, real lon) {
+  lon = AngNormalize(lon);
+  if (p->num == 0) {
+    p->lat0 = p->lat = lat;
+    p->lon0 = p->lon = lon;
+  } else {
+    real s12, S12;
+    geod_geninverse(g, p->lat, p->lon, lat, lon,
+                    &s12, 0, 0, 0, 0, 0, p->polyline ? 0 : &S12);
+    accadd(p->P, s12);
+    if (!p->polyline) {
+      accadd(p->A, S12);
+      p->crossings += transit(p->lon, lon);
+    }
+    p->lat = lat; p->lon = lon;
+  }
+  ++p->num;
+}
+
+void geod_polygon_addedge(const struct geod_geodesic* g,
+                          struct geod_polygon* p,
+                          real azi, real s) {
+  if (p->num) {                 /* Do nothing is num is zero */
+    real lat, lon, S12;
+    geod_gendirect(g, p->lat, p->lon, azi, FALSE, s,
+                   &lat, &lon, 0,
+                   0, 0, 0, 0, p->polyline ? 0 : &S12);
+    accadd(p->P, s);
+    if (!p->polyline) {
+      accadd(p->A, S12);
+      p->crossings += transit(p->lon, lon);
+    }
+    p->lat = lat; p->lon = lon;
+    ++p->num;
+  }
+}
+
+unsigned geod_polygon_compute(const struct geod_geodesic* g,
+                              const struct geod_polygon* p,
+                              boolx reverse, boolx sign,
+                              real* pA, real* pP) {
+  real s12, S12, t[2], area0;
+  int crossings;
+  if (p->num < 2) {
+    if (pP) *pP = 0;
+    if (!p->polyline && pA) *pA = 0;
+    return p->num;
+  }
+  if (p->polyline) {
+    if (pP) *pP = p->P[0];
+    return p->num;
+  }
+  geod_geninverse(g, p->lat, p->lon, p->lat0, p->lon0,
+                  &s12, 0, 0, 0, 0, 0, &S12);
+  if (pP) *pP = accsum(p->P, s12);
+  acccopy(p->A, t);
+  accadd(t, S12);
+  crossings = p->crossings + transit(p->lon, p->lon0);
+  area0 = 4 * pi * g->c2;
+  if (crossings & 1)
+    accadd(t, (t[0] < 0 ? 1 : -1) * area0/2);
+  /* area is with the clockwise sense.  If !reverse convert to
+   * counter-clockwise convention. */
+  if (!reverse)
+    accneg(t);
+  /* If sign put area in (-area0/2, area0/2], else put area in [0, area0) */
+  if (sign) {
+    if (t[0] > area0/2)
+      accadd(t, -area0);
+    else if (t[0] <= -area0/2)
+      accadd(t, +area0);
+  } else {
+    if (t[0] >= area0)
+      accadd(t, -area0);
+    else if (t[0] < 0)
+      accadd(t, +area0);
+  }
+  if (pA) *pA = 0 + t[0];
+  return p->num;
+}
+
+unsigned geod_polygon_testpoint(const struct geod_geodesic* g,
+                                const struct geod_polygon* p,
+                                real lat, real lon,
+                                boolx reverse, boolx sign,
+                                real* pA, real* pP) {
+  real perimeter, tempsum, area0;
+  int crossings, i;
+  unsigned num = p->num + 1;
+  if (num == 1) {
+    if (pP) *pP = 0;
+    if (!p->polyline && pA) *pA = 0;
+    return num;
+  }
+  perimeter = p->P[0];
+  tempsum = p->polyline ? 0 : p->A[0];
+  crossings = p->crossings;
+  for (i = 0; i < (p->polyline ? 1 : 2); ++i) {
+    real s12, S12;
+    geod_geninverse(g,
+                    i == 0 ? p->lat  : lat, i == 0 ? p->lon  : lon,
+                    i != 0 ? p->lat0 : lat, i != 0 ? p->lon0 : lon,
+                    &s12, 0, 0, 0, 0, 0, p->polyline ? 0 : &S12);
+    perimeter += s12;
+    if (!p->polyline) {
+      tempsum += S12;
+      crossings += transit(i == 0 ? p->lon  : lon,
+                           i != 0 ? p->lon0 : lon);
+    }
+  }
+
+  if (pP) *pP = perimeter;
+  if (p->polyline)
+    return num;
+
+  area0 = 4 * pi * g->c2;
+  if (crossings & 1)
+    tempsum += (tempsum < 0 ? 1 : -1) * area0/2;
+  /* area is with the clockwise sense.  If !reverse convert to
+   * counter-clockwise convention. */
+  if (!reverse)
+    tempsum *= -1;
+  /* If sign put area in (-area0/2, area0/2], else put area in [0, area0) */
+  if (sign) {
+    if (tempsum > area0/2)
+      tempsum -= area0;
+    else if (tempsum <= -area0/2)
+      tempsum += area0;
+  } else {
+    if (tempsum >= area0)
+      tempsum -= area0;
+    else if (tempsum < 0)
+      tempsum += area0;
+  }
+  if (pA) *pA = 0 + tempsum;
+  return num;
+}
+
+unsigned geod_polygon_testedge(const struct geod_geodesic* g,
+                               const struct geod_polygon* p,
+                               real azi, real s,
+                               boolx reverse, boolx sign,
+                               real* pA, real* pP) {
+  real perimeter, tempsum, area0;
+  int crossings;
+  unsigned num = p->num + 1;
+  if (num == 1) {               /* we don't have a starting point! */
+    if (pP) *pP = NaN;
+    if (!p->polyline && pA) *pA = NaN;
+    return 0;
+  }
+  perimeter = p->P[0] + s;
+  if (p->polyline) {
+    if (pP) *pP = perimeter;
+    return num;
+  }
+
+  tempsum = p->A[0];
+  crossings = p->crossings;
+  {
+    real lat, lon, s12, S12;
+    geod_gendirect(g, p->lat, p->lon, azi, FALSE, s,
+                   &lat, &lon, 0,
+                   0, 0, 0, 0, &S12);
+    tempsum += S12;
+    crossings += transit(p->lon, lon);
+    geod_geninverse(g, lat,  lon, p->lat0,  p->lon0,
+                    &s12, 0, 0, 0, 0, 0, &S12);
+    perimeter += s12;
+    tempsum += S12;
+    crossings += transit(lon, p->lon0);
+  }
+
+  area0 = 4 * pi * g->c2;
+  if (crossings & 1)
+    tempsum += (tempsum < 0 ? 1 : -1) * area0/2;
+  /* area is with the clockwise sense.  If !reverse convert to
+   * counter-clockwise convention. */
+  if (!reverse)
+    tempsum *= -1;
+  /* If sign put area in (-area0/2, area0/2], else put area in [0, area0) */
+  if (sign) {
+    if (tempsum > area0/2)
+      tempsum -= area0;
+    else if (tempsum <= -area0/2)
+      tempsum += area0;
+  } else {
+    if (tempsum >= area0)
+      tempsum -= area0;
+    else if (tempsum < 0)
+      tempsum += area0;
+  }
+  if (pP) *pP = perimeter;
+  if (pA) *pA = 0 + tempsum;
+  return num;
+}
+
+void geod_polygonarea(const struct geod_geodesic* g,
+                      real lats[], real lons[], int n,
+                      real* pA, real* pP) {
+  int i;
+  struct geod_polygon p;
+  geod_polygon_init(&p, FALSE);
+  for (i = 0; i < n; ++i)
+    geod_polygon_addpoint(g, &p, lats[i], lons[i]);
+  geod_polygon_compute(g, &p, FALSE, TRUE, pA, pP);
+}
+
+/** @endcond */
diff --git a/src/geodesic.h b/src/geodesic.h
index acf5d87..6998500 100644
--- a/src/geodesic.h
+++ b/src/geodesic.h
@@ -1,202 +1,741 @@
-/*
- * This is a C implementation of the geodesic algorithms described in
- *
- *   C. F. F. Karney,
- *   Algorithms for geodesics,
- *   J. Geodesy (2012);
- *   http://dx.doi.org/10.1007/s00190-012-0578-z
- *   Addenda: http://geographiclib.sf.net/geod-addenda.html
+/**
+ * \file geodesic.h
+ * \brief Header for the geodesic routines in C
  *
+ * This an implementation in C of the geodesic algorithms described in
+ * - C. F. F. Karney,
+ *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   Algorithms for geodesics</a>,
+ *   J. Geodesy <b>87</b>, 43--55 (2013);
+ *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   10.1007/s00190-012-0578-z</a>;
+ *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
+ *   geod-addenda.html</a>.
+ * .
  * The principal advantages of these algorithms over previous ones (e.g.,
  * Vincenty, 1975) are
- *   * accurate to round off for abs(f) < 1/50;
- *   * the solution of the inverse problem is always found;
- *   * differential and integral properties of geodesics are computed.
+ * - accurate to round off for |<i>f</i>| < 1/50;
+ * - the solution of the inverse problem is always found;
+ * - differential and integral properties of geodesics are computed.
  *
- * The shortest path between two points on the ellipsoid at (lat1, lon1) and
- * (lat2, lon2) is called the geodesic.  Its length is s12 and the geodesic
- * from point 1 to point 2 has forward azimuths azi1 and azi2 at the two end
- * points.
+ * The shortest path between two points on the ellipsoid at (\e lat1, \e
+ * lon1) and (\e lat2, \e lon2) is called the geodesic.  Its length is
+ * \e s12 and the geodesic from point 1 to point 2 has forward azimuths
+ * \e azi1 and \e azi2 at the two end points.
  *
  * Traditionally two geodesic problems are considered:
- *   * the direct problem -- given lat1, lon1, s12, and azi1, determine
- *     lat2, lon2, and azi2.
- *   * the inverse problem -- given lat1, lon1, lat2, lon2, determine
- *     s12, azi1, and azi2.
+ * - the direct problem -- given \e lat1, \e lon1, \e s12, and \e azi1,
+ *   determine \e lat2, \e lon2, and \e azi2.  This is solved by the function
+ *   geod_direct().
+ * - the inverse problem -- given \e lat1, \e lon1, and \e lat2, \e lon2,
+ *   determine \e s12, \e azi1, and \e azi2.  This is solved by the function
+ *   geod_inverse().
  *
- * The ellipsoid is specified by its equatorial radius a (typically in meters)
- * and flattening f.  The routines are accurate to round off with double
- * precision arithmetic provided that abs(f) < 1/50; for the WGS84 ellipsoid,
- * the errors are less than 15 nanometers.  (Reasonably accurate results are
- * obtained for abs(f) < 1/5.)  Latitudes, longitudes, and azimuths are in
- * degrees.  Latitudes must lie in [-90,90] and longitudes and azimuths must
- * lie in [-540,540).  The returned values for longitude and azimuths are in
- * [-180,180).  The distance s12 is measured in meters (more precisely the same
- * units as a).
+ * The ellipsoid is specified by its equatorial radius \e a (typically in
+ * meters) and flattening \e f.  The routines are accurate to round off with
+ * double precision arithmetic provided that |<i>f</i>| < 1/50; for the
+ * WGS84 ellipsoid, the errors are less than 15 nanometers.  (Reasonably
+ * accurate results are obtained for |<i>f</i>| < 1/5.)  For a prolate
+ * ellipsoid, specify \e f < 0.
  *
  * The routines also calculate several other quantities of interest
- *   * SS12 is the area between the geodesic from point 1 to point 2 and the
- *     equator; i.e., it is the area, measured counter-clockwise, of the
- *     quadrilateral with corners (lat1,lon1), (0,lon1), (0,lon2), and
- *     (lat2,lon2).  It is given in meters^2.
- *   * m12, the reduced length of the geodesic is defined such that if the
- *     initial azimuth is perturbed by dazi1 (radians) then the second point is
- *     displaced by m12 dazi1 in the direction perpendicular to the geodesic.
- *     m12 is given in meters.  On a curved surface the reduced length obeys a
- *     symmetry relation, m12 + m21 = 0.  On a flat surface, we have m12 = s12.
- *   * MM12 and MM21 are geodesic scales.  If two geodesics are parallel at
- *     point 1 and separated by a small distance dt, then they are separated by
- *     a distance MM12 dt at point 2.  MM21 is defined similarly (with the
- *     geodesics being parallel to one another at point 2).  MM12 and MM21 are
- *     dimensionless quantities.  On a flat surface, we have MM12 = MM21 = 1.
- *   * a12 is the arc length on the auxiliary sphere.  This is a construct for
- *     converting the problem to one in spherical trigonometry.  a12 is
- *     measured in degrees.  The spherical arc length from one equator crossing
- *     to the next is always 180 degrees.
- *
- * Simple interface
- *
- *    #include "geodesic.h"
- *
- *    double a, f, lat1, lon1, azi1, lat2, lon2, azi2, s12;
- *    struct Geodesic g;
- *
- *    GeodesicInit(&g, a, f);
- *    Direct(&g, lat1, lon1, azi1, s12, &lat2, &lon2, &azi2);
- *    Inverse(&g, lat1, lon1, lat2, lon2, &s12, &azi1, &azi2);
- *
- * GeodesicInit initalizes g for the ellipsoid.  Subsequent calls to Direct and
- * Inverse solve the direct and inverse geodesic problems.
- *
- * Returning auxiliary quantities (continued from the previous example):
- *
- *    double a12, s12_a12, m12, M12, M21, S12;
- *    a12 = GenDirect(&g, lat1, lon1, azi1, 0, s12,
- *                    &lat1, &lat2, &azi2, 0, &m12, &M12, &M21, &S21);
- *    GenDirect(&g, lat1, lon1, azi1, 1, a12,
- *              &lat1, &lat2, &azi2, &s12, &m12, &M12, &M21, &S21);
- *    a12 = GenInverse(&g, lat1, lon1, lat2, lon2, &s12, &azi1, &azi2,
- *                     &m12, &M12, &M21, &S12);
- *
- * GenDirect is a generalized version of Direct allowing the return of the
- * auxiliary quantities.  With the first variant (arcmode = 0), the length of
- * the geodesic is specified by the true length s12 and the arc length a12 is
- * returned as the function value.  In the second variant (arcmode = 1), the
- * length is specified by the arc length a12 (in degrees), and the true length
- * is returned via &s12.
- *
- *    a12 = GenInverse(&g, lat1, lon1, lat2, lon2, &s12, &azi1, &azi2,
- *                     &m12, &M12, &M21, &S12);
+ * - \e S12 is the area between the geodesic from point 1 to point 2 and the
+ *   equator; i.e., it is the area, measured counter-clockwise, of the
+ *   quadrilateral with corners (\e lat1,\e lon1), (0,\e lon1), (0,\e lon2),
+ *   and (\e lat2,\e lon2).
+ * - \e m12, the reduced length of the geodesic is defined such that if
+ *   the initial azimuth is perturbed by \e dazi1 (radians) then the
+ *   second point is displaced by \e m12 \e dazi1 in the direction
+ *   perpendicular to the geodesic.  On a curved surface the reduced
+ *   length obeys a symmetry relation, \e m12 + \e m21 = 0.  On a flat
+ *   surface, we have \e m12 = \e s12.
+ * - \e M12 and \e M21 are geodesic scales.  If two geodesics are
+ *   parallel at point 1 and separated by a small distance \e dt, then
+ *   they are separated by a distance \e M12 \e dt at point 2.  \e M21
+ *   is defined similarly (with the geodesics being parallel to one
+ *   another at point 2).  On a flat surface, we have \e M12 = \e M21
+ *   = 1.
+ * - \e a12 is the arc length on the auxiliary sphere.  This is a
+ *   construct for converting the problem to one in spherical
+ *   trigonometry.  \e a12 is measured in degrees.  The spherical arc
+ *   length from one equator crossing to the next is always 180°.
  *
- * GenInverse is a generalized version of Inverse allowing the return of the
- * auxiliary quantities.
+ * If points 1, 2, and 3 lie on a single geodesic, then the following
+ * addition rules hold:
+ * - \e s13 = \e s12 + \e s23
+ * - \e a13 = \e a12 + \e a23
+ * - \e S13 = \e S12 + \e S23
+ * - \e m13 = \e m12 \e M23 + \e m23 \e M21
+ * - \e M13 = \e M12 \e M23 − (1 − \e M12 \e M21) \e
+ *   m23 / \e m12
+ * - \e M31 = \e M32 \e M21 − (1 − \e M23 \e M32) \e
+ *   m12 / \e m23
  *
- * Any of the "return" arguments &s12, etc. in these routines may be replaced
- * by 0, if you do not need some quantities computed.
+ * The shortest distance returned by the solution of the inverse problem is
+ * (obviously) uniquely defined.  However, in a few special cases there are
+ * multiple azimuths which yield the same shortest distance.  Here is a
+ * catalog of those cases:
+ * - \e lat1 = −\e lat2 (with neither at a pole).  If \e azi1 = \e
+ *   azi2, the geodesic is unique.  Otherwise there are two geodesics
+ *   and the second one is obtained by setting [\e azi1, \e azi2] = [\e
+ *   azi2, \e azi1], [\e M12, \e M21] = [\e M21, \e M12], \e S12 =
+ *   −\e S12.  (This occurs when the longitude difference is near
+ *   ±180° for oblate ellipsoids.)
+ * - \e lon2 = \e lon1 ± 180° (with neither at a pole).  If
+ *   \e azi1 = 0° or ±180°, the geodesic is unique.
+ *   Otherwise there are two geodesics and the second one is obtained by
+ *   setting [\e azi1, \e azi2] = [−\e azi1, −\e azi2], \e
+ *   S12 = −\e S12.  (This occurs when the \e lat2 is near
+ *   −\e lat1 for prolate ellipsoids.)
+ * - Points 1 and 2 at opposite poles.  There are infinitely many
+ *   geodesics which can be generated by setting [\e azi1, \e azi2] =
+ *   [\e azi1, \e azi2] + [\e d, −\e d], for arbitrary \e d.  (For
+ *   spheres, this prescription applies when points 1 and 2 are
+ *   antipodal.)
+ * - \e s12 = 0 (coincident points).  There are infinitely many geodesics
+ *   which can be generated by setting [\e azi1, \e azi2] = [\e azi1, \e
+ *   azi2] + [\e d, \e d], for arbitrary \e d.
  *
- * Computing multiple points on a geodesic.  This may be accomplished by
- * repeated invocations of Direct varying s12.  However, it is more efficient
- * to create a GeodesicLine object, as follows.
+ * These routines are a simple transcription of the corresponding C++ classes
+ * in <a href="http://geographiclib.sf.net"> GeographicLib</a>.  The "class
+ * data" is represented by the structs geod_geodesic, geod_geodesicline,
+ * geod_polygon and pointers to these objects are passed as initial arguments
+ * to the member functions.  Most of the internal comments have been retained.
+ * However, in the process of transcription some documentation has been lost
+ * and the documentation for the C++ classes, GeographicLib::Geodesic,
+ * GeographicLib::GeodesicLine, and GeographicLib::PolygonArea, should be
+ * consulted.  The C++ code remains the "reference implementation".  Think
+ * twice about restructuring the internals of the C code since this may make
+ * porting fixes from the C++ code more difficult.
  *
- *    struct GeodesicLine l;
- *    int caps = 0;
- *
- *    GeodesicLineInit(&l, &g, a, f, lat1, lon1, azi1, caps);
- *    Position(l, s12, &lat2, &lon2, &azi2)
- *
- * caps is a bit mask specifying the capabilities of the GeodesicLine object.
- * It should be an or'ed combination of
- *
- *    LATITUDE        compute lat2 (in effect this is always set)
- *    LONGITUDE       compute lon2
- *    AZIMUTH         compute azi2 (in effect this is always set)
- *    DISTANCE        compute s12
- *    DISTANCE_IN     allow the length to be specified in terms of distance
- *    REDUCEDLENGTH   compute m12
- *    GEODESICSCALE   compute M12 and M21
- *    AREA            compute S12
- *    ALL             all of the above
- *
- * caps = 0 is treated as LATITUDE | LONGITUDE | AZIMUTH | DISTANCE_IN (to
- * support the solution "standard" direct problem).
- *
- * There's also a generalized version of Position
- *
- *    a12 = GenPosition(&l, arcmode, s12_a12,
- *                      &lat2, &lon2, &azi2, &s12, &m12, &M12, &M21, &S12);
- *
- * See the documentation on GenDirect for the meaning of arcmode.
- *
- * Copyright (c) Charles Karney (2012) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2012-2013) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
  *
- * This file was distributed with GeographicLib 1.27.
- */
+ * This library was distributed with
+ * <a href="../index.html">GeographicLib</a> 1.32.
+ **********************************************************************/
 
 #if !defined(GEODESIC_H)
 #define GEODESIC_H 1
 
+/**
+ * The major version of the geodesic library.  (This tracks the version of
+ * GeographicLib.)
+ **********************************************************************/
+#define GEODESIC_VERSION_MAJOR 1
+/**
+ * The minor version of the geodesic library.  (This tracks the version of
+ * GeographicLib.)
+ **********************************************************************/
+#define GEODESIC_VERSION_MINOR 32
+/**
+ * The patch level of the geodesic library.  (This tracks the version of
+ * GeographicLib.)
+ **********************************************************************/
+#define GEODESIC_VERSION_PATCH 0
+
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
-  struct Geodesic {
-    double a, f, f1, e2, ep2, n, b, c2, etol2;
+  /**
+   * The struct containing information about the ellipsoid.  This must be
+   * initialized by geod_init() before use.
+   **********************************************************************/
+  struct geod_geodesic {
+    double a;                   /**< the equatorial radius */
+    double f;                   /**< the flattening */
+    /**< @cond SKIP */
+    double f1, e2, ep2, n, b, c2, etol2;
     double A3x[6], C3x[15], C4x[21];
+    /**< @endcond */
   };
 
-  struct GeodesicLine {
-    double lat1, lon1, azi1;
-    double a, f, b, c2, f1, salp0, calp0, k2,
+  /**
+   * The struct containing information about a single geodesic.  This must be
+   * initialized by geod_lineinit() before use.
+   **********************************************************************/
+  struct geod_geodesicline {
+    double lat1;                /**< the starting latitude */
+    double lon1;                /**< the starting longitude */
+    double azi1;                /**< the starting azimuth */
+    double a;                   /**< the equatorial radius */
+    double f;                   /**< the flattening */
+    /**< @cond SKIP */
+    double b, c2, f1, salp0, calp0, k2,
       salp1, calp1, ssig1, csig1, dn1, stau1, ctau1, somg1, comg1,
       A1m1, A2m1, A3c, B11, B21, B31, A4, B41;
     double C1a[6+1], C1pa[6+1], C2a[6+1], C3a[6], C4a[6];
-    unsigned caps;
+    /**< @endcond */
+    unsigned caps;              /**< the capabilities */
   };
 
-  void GeodesicInit(struct Geodesic* g, double a, double f);
-  void GeodesicLineInit(struct GeodesicLine* l,
-                        const struct Geodesic* g,
-                        double lat1, double lon1, double azi1, unsigned caps);
-
-  void Direct(const struct Geodesic* g,
-              double lat1, double lon1, double azi1, double s12,
-              double* plat2, double* plon2, double* pazi2);
-  void Inverse(const struct Geodesic* g,
-               double lat1, double lon1, double lat2, double lon2,
-               double* ps12, double* pazi1, double* pazi2);
-  void Position(const struct GeodesicLine* l, double s12,
-                double* plat2, double* plon2, double* pazi2);
-
-  double GenDirect(const struct Geodesic* g,
-                   double lat1, double lon1, double azi1,
-                   int arcmode, double s12_a12,
-                   double* plat2, double* plon2, double* pazi2,
-                   double* ps12, double* pm12, double* pM12, double* pM21,
-                   double* pS12);
-  double GenInverse(const struct Geodesic* g,
+  /**
+   * The struct for accumulating information about a geodesic polygon.  This is
+   * used for computing the perimeter and area of a polygon.  This must be
+   * initialized by geod_polygon_init() before use.
+   **********************************************************************/
+  struct geod_polygon {
+    double lat;                 /**< the current latitude */
+    double lon;                 /**< the current longitude */
+    /**< @cond SKIP */
+    double lat0;
+    double lon0;
+    double A[2];
+    double P[2];
+    int polyline;
+    int crossings;
+    /**< @endcond */
+    unsigned num;               /**< the number of points so far */
+  };
+
+  /**
+   * Initialize a geod_geodesic object.
+   *
+   * @param[out] g a pointer to the object to be initialized.
+   * @param[in] a the equatorial radius (meters).
+   * @param[in] f the flattening.
+   **********************************************************************/
+  void geod_init(struct geod_geodesic* g, double a, double f);
+
+  /**
+   * Initialize a geod_geodesicline object.
+   *
+   * @param[out] l a pointer to the object to be initialized.
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in] lat1 latitude of point 1 (degrees).
+   * @param[in] lon1 longitude of point 1 (degrees).
+   * @param[in] azi1 azimuth at point 1 (degrees).
+   * @param[in] caps bitor'ed combination of geod_mask() values specifying the
+   *   capabilities the geod_geodesicline object should possess, i.e., which
+   *   quantities can be returned in calls to geod_position() and
+   *   geod_genposition().
+   *
+   * \e g must have been initialized with a call to geod_init().  \e lat1
+   * should be in the range [−90°, 90°]; \e lon1 and \e azi1
+   * should be in the range [−540°, 540°).
+   *
+   * The geod_mask values are [see geod_mask()]:
+   * - \e caps |= GEOD_LATITUDE for the latitude \e lat2; this is
+   *   added automatically,
+   * - \e caps |= GEOD_LONGITUDE for the latitude \e lon2,
+   * - \e caps |= GEOD_AZIMUTH for the latitude \e azi2; this is
+   *   added automatically,
+   * - \e caps |= GEOD_DISTANCE for the distance \e s12,
+   * - \e caps |= GEOD_REDUCEDLENGTH for the reduced length \e m12,
+   * - \e caps |= GEOD_GEODESICSCALE for the geodesic scales \e M12
+   *   and \e M21,
+   * - \e caps |= GEOD_AREA for the area \e S12,
+   * - \e caps |= GEOD_DISTANCE_IN permits the length of the
+   *   geodesic to be given in terms of \e s12; without this capability the
+   *   length can only be specified in terms of arc length.
+   * .
+   * A value of \e caps = 0 is treated as GEOD_LATITUDE | GEOD_LONGITUDE |
+   * GEOD_AZIMUTH | GEOD_DISTANCE_IN (to support the solution of the "standard"
+   * direct problem).
+   **********************************************************************/
+  void geod_lineinit(struct geod_geodesicline* l,
+                     const struct geod_geodesic* g,
+                     double lat1, double lon1, double azi1, unsigned caps);
+
+  /**
+   * Solve the direct geodesic problem.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in] lat1 latitude of point 1 (degrees).
+   * @param[in] lon1 longitude of point 1 (degrees).
+   * @param[in] azi1 azimuth at point 1 (degrees).
+   * @param[in] s12 distance between point 1 and point 2 (meters); it can be
+   *   negative.
+   * @param[out] plat2 pointer to the latitude of point 2 (degrees).
+   * @param[out] plon2 pointer to the longitude of point 2 (degrees).
+   * @param[out] pazi2 pointer to the (forward) azimuth at point 2 (degrees).
+   *
+   * \e g must have been initialized with a call to geod_init().  \e lat1
+   * should be in the range [−90°, 90°]; \e lon1 and \e azi1
+   * should be in the range [−540°, 540°).  The values of \e lon2
+   * and \e azi2 returned are in the range [−180°, 180°).  Any of
+   * the "return" arguments \e plat2, etc., may be replaced by 0, if you do not
+   * need some quantities computed.
+   *
+   * If either point is at a pole, the azimuth is defined by keeping the
+   * longitude fixed, writing \e lat = ±(90° − ε), and
+   * taking the limit ε → 0+.  An arc length greater that 180°
+   * signifies a geodesic which is not a shortest path.  (For a prolate
+   * ellipsoid, an additional condition is necessary for a shortest path: the
+   * longitudinal extent must not exceed of 180°.)
+   *
+   * Example, determine the point 10000 km NE of JFK:
+   @code
+   struct geod_geodesic g;
+   double lat, lon;
+   geod_init(&g, 6378137, 1/298.257223563);
+   geod_direct(&g, 40.64, -73.78, 45.0, 10e6, &lat, &lon, 0);
+   printf("%.5f %.5f\n", lat, lon);
+   @endcode
+   **********************************************************************/
+  void geod_direct(const struct geod_geodesic* g,
+                   double lat1, double lon1, double azi1, double s12,
+                   double* plat2, double* plon2, double* pazi2);
+
+  /**
+   * Solve the inverse geodesic problem.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in] lat1 latitude of point 1 (degrees).
+   * @param[in] lon1 longitude of point 1 (degrees).
+   * @param[in] lat2 latitude of point 2 (degrees).
+   * @param[in] lon2 longitude of point 2 (degrees).
+   * @param[out] ps12 pointer to the distance between point 1 and point 2
+   *   (meters).
+   * @param[out] pazi1 pointer to the azimuth at point 1 (degrees).
+   * @param[out] pazi2 pointer to the (forward) azimuth at point 2 (degrees).
+   *
+   * \e g must have been initialized with a call to geod_init().  \e lat1
+   * and \e lat2 should be in the range [−90°, 90°]; \e lon1 and
+   * \e lon2 should be in the range [−540°, 540°).  The values of
+   * \e azi1 and \e azi2 returned are in the range [−180°, 180°).
+   * Any of the "return" arguments \e ps12, etc., may be replaced by 0, if you
+   * do not need some quantities computed.
+   *
+   * If either point is at a pole, the azimuth is defined by keeping the
+   * longitude fixed, writing \e lat = ±(90° − ε), and
+   * taking the limit ε → 0+.
+   *
+   * The solution to the inverse problem is found using Newton's method.  If
+   * this fails to converge (this is very unlikely in geodetic applications
+   * but does occur for very eccentric ellipsoids), then the bisection method
+   * is used to refine the solution.
+   *
+   * Example, determine the distance between JFK and Singapore Changi Airport:
+   @code
+   struct geod_geodesic g;
+   double s12;
+   geod_init(&g, 6378137, 1/298.257223563);
+   geod_inverse(&g, 40.64, -73.78, 1.36, 103.99, &s12, 0, 0);
+   printf("%.3f\n", s12);
+   @endcode
+   **********************************************************************/
+  void geod_inverse(const struct geod_geodesic* g,
                     double lat1, double lon1, double lat2, double lon2,
-                    double* ps12, double* pazi1, double* pazi2,
-                    double* pm12, double* pM12, double* pM21, double* pS12);
-  double GenPosition(const struct GeodesicLine* l,
-                     int arcmode, double s12_a12,
-                     double* plat2, double* plon2, double* pazi2,
-                     double* ps12, double* pm12,
-                     double* pM12, double* pM21,
-                     double* pS12);
-
-  enum mask {
-    NONE          = 0U,
-    LATITUDE      = 1U<<7  | 0U,
-    LONGITUDE     = 1U<<8  | 1U<<3,
-    AZIMUTH       = 1U<<9  | 0U,
-    DISTANCE      = 1U<<10 | 1U<<0,
-    DISTANCE_IN   = 1U<<11 | 1U<<0 | 1U<<1,
-    REDUCEDLENGTH = 1U<<12 | 1U<<0 | 1U<<2,
-    GEODESICSCALE = 1U<<13 | 1U<<0 | 1U<<2,
-    AREA          = 1U<<14 | 1U<<4,
-    ALL           = 0x7F80U| 0x1FU
+                    double* ps12, double* pazi1, double* pazi2);
+
+  /**
+   * Compute the position along a geod_geodesicline.
+   *
+   * @param[in] l a pointer to the geod_geodesicline object specifying the
+   *   geodesic line.
+   * @param[in] s12 distance between point 1 and point 2 (meters); it can be
+   *   negative.
+   * @param[out] plat2 pointer to the latitude of point 2 (degrees).
+   * @param[out] plon2 pointer to the longitude of point 2 (degrees); requires
+   *   that \e l was initialized with \e caps |= GEOD_LONGITUDE.
+   * @param[out] pazi2 pointer to the (forward) azimuth at point 2 (degrees).
+   *
+   * \e l must have been initialized with a call to geod_lineinit() with \e
+   * caps |= GEOD_DISTANCE_IN.  The values of \e lon2 and \e azi2 returned are
+   * in the range [−180°, 180°).  Any of the "return" arguments
+   * \e plat2, etc., may be replaced by 0, if you do not need some quantities
+   * computed.
+   *
+   * Example, compute way points between JFK and Singapore Changi Airport
+   * the "obvious" way using geod_direct():
+   @code
+   struct geod_geodesic g;
+   double s12, azi1, lat[101],lon[101];
+   int i;
+   geod_init(&g, 6378137, 1/298.257223563);
+   geod_inverse(&g, 40.64, -73.78, 1.36, 103.99, &s12, &azi1, 0);
+   for (i = 0; i < 101; ++i) {
+     geod_direct(&g, 40.64, -73.78, azi1, i * s12 * 0.01, lat + i, lon + i, 0);
+     printf("%.5f %.5f\n", lat[i], lon[i]);
+   }
+   @endcode
+   * A faster way using geod_position():
+   @code
+   struct geod_geodesic g;
+   struct geod_geodesicline l;
+   double s12, azi1, lat[101],lon[101];
+   int i;
+   geod_init(&g, 6378137, 1/298.257223563);
+   geod_inverse(&g, 40.64, -73.78, 1.36, 103.99, &s12, &azi1, 0);
+   geod_lineinit(&l, &g, 40.64, -73.78, azi1, 0);
+   for (i = 0; i < 101; ++i) {
+     geod_position(&l, i * s12 * 0.01, lat + i, lon + i, 0);
+     printf("%.5f %.5f\n", lat[i], lon[i]);
+   }
+   @endcode
+   **********************************************************************/
+  void geod_position(const struct geod_geodesicline* l, double s12,
+                     double* plat2, double* plon2, double* pazi2);
+
+  /**
+   * The general direct geodesic problem.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in] lat1 latitude of point 1 (degrees).
+   * @param[in] lon1 longitude of point 1 (degrees).
+   * @param[in] azi1 azimuth at point 1 (degrees).
+   * @param[in] arcmode flag determining the meaning of the \e
+   *   s12_a12.
+   * @param[in] s12_a12 if \e arcmode is 0, this is the distance between
+   *   point 1 and point 2 (meters); otherwise it is the arc length between
+   *   point 1 and point 2 (degrees); it can be negative.
+   * @param[out] plat2 pointer to the latitude of point 2 (degrees).
+   * @param[out] plon2 pointer to the longitude of point 2 (degrees).
+   * @param[out] pazi2 pointer to the (forward) azimuth at point 2 (degrees).
+   * @param[out] ps12 pointer to the distance between point 1 and point 2
+   *   (meters).
+   * @param[out] pm12 pointer to the reduced length of geodesic (meters).
+   * @param[out] pM12 pointer to the geodesic scale of point 2 relative to
+   *   point 1 (dimensionless).
+   * @param[out] pM21 pointer to the geodesic scale of point 1 relative to
+   *   point 2 (dimensionless).
+   * @param[out] pS12 pointer to the area under the geodesic
+   *   (meters<sup>2</sup>).
+   * @return \e a12 arc length of between point 1 and point 2 (degrees).
+   *
+   * \e g must have been initialized with a call to geod_init().  \e lat1
+   * should be in the range [−90°, 90°]; \e lon1 and \e azi1
+   * should be in the range [−540°, 540°).  The function value \e
+   * a12 equals \e s12_a12 is \e arcmode is non-zero.  Any of the "return"
+   * arguments \e plat2, etc., may be replaced by 0, if you do not need some
+   * quantities computed.
+   **********************************************************************/
+  double geod_gendirect(const struct geod_geodesic* g,
+                        double lat1, double lon1, double azi1,
+                        int arcmode, double s12_a12,
+                        double* plat2, double* plon2, double* pazi2,
+                        double* ps12, double* pm12, double* pM12, double* pM21,
+                        double* pS12);
+
+  /**
+   * The general inverse geodesic calculation.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in] lat1 latitude of point 1 (degrees).
+   * @param[in] lon1 longitude of point 1 (degrees).
+   * @param[in] lat2 latitude of point 2 (degrees).
+   * @param[in] lon2 longitude of point 2 (degrees).
+   * @param[out] ps12 pointer to the distance between point 1 and point 2
+   *  (meters).
+   * @param[out] pazi1 pointer to the azimuth at point 1 (degrees).
+   * @param[out] pazi2 pointer to the (forward) azimuth at point 2 (degrees).
+   * @param[out] pm12 pointer to the reduced length of geodesic (meters).
+   * @param[out] pM12 pointer to the geodesic scale of point 2 relative to
+   *   point 1 (dimensionless).
+   * @param[out] pM21 pointer to the geodesic scale of point 1 relative to
+   *   point 2 (dimensionless).
+   * @param[out] pS12 pointer to the area under the geodesic
+   *   (meters<sup>2</sup>).
+   * @return \e a12 arc length of between point 1 and point 2 (degrees).
+   *
+   * \e g must have been initialized with a call to geod_init().  \e lat1
+   * and \e lat2 should be in the range [−90°, 90°]; \e lon1 and
+   * \e lon2 should be in the range [−540°, 540°).  Any of the
+   * "return" arguments \e ps12, etc., may be replaced by 0, if you do not need
+   * some quantities computed.
+   **********************************************************************/
+  double geod_geninverse(const struct geod_geodesic* g,
+                         double lat1, double lon1, double lat2, double lon2,
+                         double* ps12, double* pazi1, double* pazi2,
+                         double* pm12, double* pM12, double* pM21,
+                         double* pS12);
+
+  /**
+   * The general position function.
+   *
+   * @param[in] l a pointer to the geod_geodesicline object specifying the
+   *   geodesic line.
+   * @param[in] arcmode flag determining the meaning of the second parameter;
+   *   if arcmode is 0, then \e l must have been initialized with \e caps |=
+   *   GEOD_DISTANCE_IN.
+   * @param[in] s12_a12 if \e arcmode is 0, this is the distance between
+   *   point 1 and point 2 (meters); otherwise it is the arc length between
+   *   point 1 and point 2 (degrees); it can be negative.
+   * @param[out] plat2 pointer to the latitude of point 2 (degrees).
+   * @param[out] plon2 pointer to the longitude of point 2 (degrees); requires
+   *   that \e l was initialized with \e caps |= GEOD_LONGITUDE.
+   * @param[out] pazi2 pointer to the (forward) azimuth at point 2 (degrees).
+   * @param[out] ps12 pointer to the distance between point 1 and point 2
+   *   (meters); requires that \e l was initialized with \e caps |=
+   *   GEOD_DISTANCE.
+   * @param[out] pm12 pointer to the reduced length of geodesic (meters);
+   *   requires that \e l was initialized with \e caps |= GEOD_REDUCEDLENGTH.
+   * @param[out] pM12 pointer to the geodesic scale of point 2 relative to
+   *   point 1 (dimensionless); requires that \e l was initialized with \e caps
+   *   |= GEOD_GEODESICSCALE.
+   * @param[out] pM21 pointer to the geodesic scale of point 1 relative to
+   *   point 2 (dimensionless); requires that \e l was initialized with \e caps
+   *   |= GEOD_GEODESICSCALE.
+   * @param[out] pS12 pointer to the area under the geodesic
+   *   (meters<sup>2</sup>); requires that \e l was initialized with \e caps |=
+   *   GEOD_AREA.
+   * @return \e a12 arc length of between point 1 and point 2 (degrees).
+   *
+   * \e l must have been initialized with a call to geod_lineinit() with \e
+   * caps |= GEOD_DISTANCE_IN.  The values of \e lon2 and \e azi2 returned are
+   * in the range [−180°, 180°).  Any of the "return" arguments
+   * \e plat2, etc., may be replaced by 0, if you do not need some quantities
+   * computed.  Requesting a value which \e l is not capable of computing is
+   * not an error; the corresponding argument will not be altered.
+   *
+   * Example, compute way points between JFK and Singapore Changi Airport
+   * using geod_genposition().  In this example, the points are evenly space in
+   * arc length (and so only approximately equally space in distance).  This is
+   * faster than using geod_position() would be appropriate if drawing the path
+   * on a map.
+   @code
+   struct geod_geodesic g;
+   struct geod_geodesicline l;
+   double a12, azi1, lat[101],lon[101];
+   int i;
+   geod_init(&g, 6378137, 1/298.257223563);
+   a12 = geod_geninverse(&g, 40.64, -73.78, 1.36, 103.99,
+                         0, &azi1, 0, 0, 0, 0, 0);
+   geod_lineinit(&l, &g, 40.64, -73.78, azi1, GEOD_LATITUDE | GEOD_LONGITUDE);
+   for (i = 0; i < 101; ++i) {
+     geod_genposition(&l, 1, i * a12 * 0.01,
+                      lat + i, lon + i, 0, 0, 0, 0, 0, 0);
+     printf("%.5f %.5f\n", lat[i], lon[i]);
+   }
+   @endcode
+   **********************************************************************/
+  double geod_genposition(const struct geod_geodesicline* l,
+                          int arcmode, double s12_a12,
+                          double* plat2, double* plon2, double* pazi2,
+                          double* ps12, double* pm12,
+                          double* pM12, double* pM21,
+                          double* pS12);
+
+  /**
+   * Initialize a geod_polygon object.
+   *
+   * @param[out] p a pointer to the object to be initialized.
+   * @param[in] polylinep non-zero if a polyline instead of a polygon.
+   *
+   * If \e polylinep is zero, then the sequence of vertices and edges added by
+   * geod_polygon_addpoint() and geod_polygon_addedge() define a polygon and
+   * the perimeter and area are returned by geod_polygon_compute().  If \e
+   * polylinep is non-zero, then the vertices and edges define a polyline and
+   * only the perimeter is returned by geod_polygon_compute().
+   *
+   * An example of the use of this function is given in the documentation for
+   * geod_polygon_compute().
+   **********************************************************************/
+  void geod_polygon_init(struct geod_polygon* p, int polylinep);
+
+  /**
+   * Add a point to the polygon or polyline.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in,out] p a pointer to the geod_polygon object specifying the
+   *   polygon.
+   * @param[in] lat the latitude of the point (degrees).
+   * @param[in] lon the longitude of the point (degrees).
+   *
+   * \e g and \e p must have been initialized with calls to geod_init() and
+   * geod_polygon_init(), respectively.  The same \e g must be used for all the
+   * points and edges in a polygon.  \e lat should be in the range
+   * [−90°, 90°] and \e lon should be in the range
+   * [−540°, 540°).
+   *
+   * An example of the use of this function is given in the documentation for
+   * geod_polygon_compute().
+   **********************************************************************/
+  void geod_polygon_addpoint(const struct geod_geodesic* g,
+                             struct geod_polygon* p,
+                             double lat, double lon);
+
+  /**
+   * Add an edge to the polygon or polyline.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in,out] p a pointer to the geod_polygon object specifying the
+   *   polygon.
+   * @param[in] azi azimuth at current point (degrees).
+   * @param[in] s distance from current point to next point (meters).
+   *
+   * \e g and \e p must have been initialized with calls to geod_init() and
+   * geod_polygon_init(), respectively.  The same \e g must be used for all the
+   * points and edges in a polygon.  \e azi should be in the range
+   * [−540°, 540°).  This does nothing if no points have been
+   * added yet.  The \e lat and \e lon fields of \e p give the location of
+   * the new vertex.
+   **********************************************************************/
+  void geod_polygon_addedge(const struct geod_geodesic* g,
+                            struct geod_polygon* p,
+                            double azi, double s);
+
+  /**
+   * Return the results for a polygon.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in] p a pointer to the geod_polygon object specifying the polygon.
+   * @param[in] reverse if non-zero then clockwise (instead of
+   *   counter-clockwise) traversal counts as a positive area.
+   * @param[in] sign if non-zero then return a signed result for the area if
+   *   the polygon is traversed in the "wrong" direction instead of returning
+   *   the area for the rest of the earth.
+   * @param[out] pA pointer to the area of the polygon (meters<sup>2</sup>);
+   *   only set if \e polyline is non-zero in the call to geod_polygon_init().
+   * @param[out] pP pointer to the perimeter of the polygon or length of the
+   *   polyline (meters).
+   * @return the number of points.
+   *
+   * Only simple polygons (which are not self-intersecting) are allowed.
+   * There's no need to "close" the polygon by repeating the first vertex.  Set
+   * \e pA or \e pP to zero, if you do not want the corresponding quantity
+   * returned.
+   *
+   * Example, compute the perimeter and area of the geodesic triangle with
+   * vertices (0°N,0°E), (0°N,90°E), (90°N,0°E).
+   @code
+   double A, P;
+   int n;
+   struct geod_geodesic g;
+   struct geod_polygon p;
+   geod_init(&g, 6378137, 1/298.257223563);
+   geod_polygon_init(&p, 0);
+
+   geod_polygon_addpoint(&g, &p,  0,  0);
+   geod_polygon_addpoint(&g, &p,  0, 90);
+   geod_polygon_addpoint(&g, &p, 90,  0);
+   n = geod_polygon_compute(&g, &p, 0, 1, &A, &P);
+   printf("%d %.8f %.3f\n", n, P, A);
+   @endcode
+   **********************************************************************/
+  unsigned geod_polygon_compute(const struct geod_geodesic* g,
+                                const struct geod_polygon* p,
+                                int reverse, int sign,
+                                double* pA, double* pP);
+
+  /**
+   * Return the results assuming a tentative final test point is added;
+   * however, the data for the test point is not saved.  This lets you report a
+   * running result for the perimeter and area as the user moves the mouse
+   * cursor.  Ordinary floating point arithmetic is used to accumulate the data
+   * for the test point; thus the area and perimeter returned are less accurate
+   * than if geod_polygon_addpoint() and geod_polygon_compute() are used.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in] p a pointer to the geod_polygon object specifying the polygon.
+   * @param[in] lat the latitude of the test point (degrees).
+   * @param[in] lon the longitude of the test point (degrees).
+   * @param[in] reverse if non-zero then clockwise (instead of
+   *   counter-clockwise) traversal counts as a positive area.
+   * @param[in] sign if non-zero then return a signed result for the area if
+   *   the polygon is traversed in the "wrong" direction instead of returning
+   *   the area for the rest of the earth.
+   * @param[out] pA pointer to the area of the polygon (meters<sup>2</sup>);
+   *   only set if \e polyline is non-zero in the call to geod_polygon_init().
+   * @param[out] pP pointer to the perimeter of the polygon or length of the
+   *   polyline (meters).
+   * @return the number of points.
+   *
+   * \e lat should be in the range [−90°, 90°] and \e
+   * lon should be in the range [−540°, 540°).
+   **********************************************************************/
+  unsigned geod_polygon_testpoint(const struct geod_geodesic* g,
+                                  const struct geod_polygon* p,
+                                  double lat, double lon,
+                                  int reverse, int sign,
+                                  double* pA, double* pP);
+
+  /**
+   * Return the results assuming a tentative final test point is added via an
+   * azimuth and distance; however, the data for the test point is not saved.
+   * This lets you report a running result for the perimeter and area as the
+   * user moves the mouse cursor.  Ordinary floating point arithmetic is used
+   * to accumulate the data for the test point; thus the area and perimeter
+   * returned are less accurate than if geod_polygon_addedge() and
+   * geod_polygon_compute() are used.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in] p a pointer to the geod_polygon object specifying the polygon.
+   * @param[in] azi azimuth at current point (degrees).
+   * @param[in] s distance from current point to final test point (meters).
+   * @param[in] reverse if non-zero then clockwise (instead of
+   *   counter-clockwise) traversal counts as a positive area.
+   * @param[in] sign if non-zero then return a signed result for the area if
+   *   the polygon is traversed in the "wrong" direction instead of returning
+   *   the area for the rest of the earth.
+   * @param[out] pA pointer to the area of the polygon (meters<sup>2</sup>);
+   *   only set if \e polyline is non-zero in the call to geod_polygon_init().
+   * @param[out] pP pointer to the perimeter of the polygon or length of the
+   *   polyline (meters).
+   * @return the number of points.
+   *
+   * \e azi should be in the range [−540°, 540°).
+   **********************************************************************/
+  unsigned geod_polygon_testedge(const struct geod_geodesic* g,
+                                 const struct geod_polygon* p,
+                                 double azi, double s,
+                                 int reverse, int sign,
+                                 double* pA, double* pP);
+
+  /**
+   * A simple interface for computing the area of a geodesic polygon.
+   *
+   * @param[in] g a pointer to the geod_geodesic object specifying the
+   *   ellipsoid.
+   * @param[in] lats an array of latitudes of the polygon vertices (degrees).
+   * @param[in] lons an array of longitudes of the polygon vertices (degrees).
+   * @param[in] n the number of vertices.
+   * @param[out] pA pointer to the area of the polygon (meters<sup>2</sup>).
+   * @param[out] pP pointer to the perimeter of the polygon (meters).
+   *
+   * \e lats should be in the range [−90°, 90°]; \e lons should
+   * be in the range [−540°, 540°).
+   *
+   * Only simple polygons (which are not self-intersecting) are allowed.
+   * There's no need to "close" the polygon by repeating the first vertex.  The
+   * area returned is signed with counter-clockwise traversal being treated as
+   * positive.
+   *
+   * Example, compute the area of Antarctic:
+   @code
+   double
+     lats[] = {-72.9, -71.9, -74.9, -74.3, -77.5, -77.4, -71.7, -65.9, -65.7,
+               -66.6, -66.9, -69.8, -70.0, -71.0, -77.3, -77.9, -74.7},
+     lons[] = {-74, -102, -102, -131, -163, 163, 172, 140, 113,
+                88, 59, 25, -4, -14, -33, -46, -61};
+   struct geod_geodesic g;
+   double A, P;
+   geod_init(&g, 6378137, 1/298.257223563);
+   geod_polygonarea(&g, lats, lons, (sizeof lats) / (sizeof lats[0]), &A, &P);
+   printf("%.0f %.2f\n", A, P);
+   @endcode
+   **********************************************************************/
+  void geod_polygonarea(const struct geod_geodesic* g,
+                        double lats[], double lons[], int n,
+                        double* pA, double* pP);
+
+  /**
+   * mask values for the the \e caps argument to geod_lineinit().
+   **********************************************************************/
+  enum geod_mask {
+    GEOD_NONE         = 0U,                     /**< Calculate nothing */
+    GEOD_LATITUDE     = 1U<<7  | 0U,            /**< Calculate latitude */
+    GEOD_LONGITUDE    = 1U<<8  | 1U<<3,         /**< Calculate longitude */
+    GEOD_AZIMUTH      = 1U<<9  | 0U,            /**< Calculate azimuth */
+    GEOD_DISTANCE     = 1U<<10 | 1U<<0,         /**< Calculate distance */
+    GEOD_DISTANCE_IN  = 1U<<11 | 1U<<0 | 1U<<1, /**< Allow distance as input  */
+    GEOD_REDUCEDLENGTH= 1U<<12 | 1U<<0 | 1U<<2, /**< Calculate reduced length */
+    GEOD_GEODESICSCALE= 1U<<13 | 1U<<0 | 1U<<2, /**< Calculate geodesic scale */
+    GEOD_AREA         = 1U<<14 | 1U<<4,         /**< Calculate reduced length */
+    GEOD_ALL          = 0x7F80U| 0x1FU          /**< Calculate everything */
   };
 
 #if defined(__cplusplus)
diff --git a/src/mk_cheby.c b/src/mk_cheby.c
index 57ca092..0ff0a22 100644
--- a/src/mk_cheby.c
+++ b/src/mk_cheby.c
@@ -1,161 +1,177 @@
 #include <projects.h>
-	static void /* sum coefficients less than res */
+static void /* sum coefficients less than res */
 eval(projUV **w, int nu, int nv, double res, projUV *resid) {
-	int i, j;
-	double ab;
-	projUV *s;
+    int i, j;
+    double ab;
+    projUV *s;
 
-	resid->u = resid->v = 0.;
-	for (i = 0; i < nu; ++i)
-		for (s = w[i], j = 0; j < nv; ++j, ++s) {
-			if ((ab = fabs(s->u)) < res)
-				resid->u += ab;
-			if ((ab = fabs(s->v)) < res)
-				resid->v += ab;
-		}
+    resid->u = resid->v = 0.;
+    for (i = 0; i < nu; ++i)
+        for (s = w[i], j = 0; j < nv; ++j, ++s) {
+            if ((ab = fabs(s->u)) < res)
+                resid->u += ab;
+            if ((ab = fabs(s->v)) < res)
+                resid->v += ab;
+        }
 }
-	static Tseries * /* create power series structure */
+static Tseries * /* create power series structure */
 makeT(int nru, int nrv) {
-	Tseries *T;
-	int i;
+    Tseries *T;
+    int i;
 
-	if ((T = (Tseries *)pj_malloc(sizeof(Tseries))) &&
-		(T->cu = (struct PW_COEF *)pj_malloc(
-			sizeof(struct PW_COEF) * nru)) &&
-		(T->cv = (struct PW_COEF *)pj_malloc(
-			sizeof(struct PW_COEF) * nrv))) {
-		for (i = 0; i < nru; ++i)
-			T->cu[i].c = 0;
-		for (i = 0; i < nrv; ++i)
-			T->cv[i].c = 0;
-		return T;
-	} else
-		return 0;
+    if ((T = (Tseries *)pj_malloc(sizeof(Tseries))) &&
+        (T->cu = (struct PW_COEF *)pj_malloc(
+            sizeof(struct PW_COEF) * nru)) &&
+        (T->cv = (struct PW_COEF *)pj_malloc(
+            sizeof(struct PW_COEF) * nrv))) {
+        for (i = 0; i < nru; ++i)
+            T->cu[i].c = 0;
+        for (i = 0; i < nrv; ++i)
+            T->cv[i].c = 0;
+        return T;
+    } else
+        return 0;
 }
-	Tseries *
+Tseries *
 mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV), 
-	int nu, int nv, int power) {
-	int j, i, nru, nrv, *ncu, *ncv;
-	Tseries *T;
-	projUV **w;
-	double cutres;
+         int nu, int nv, int power) {
+    int j, i, nru, nrv, *ncu, *ncv;
+    Tseries *T;
+    projUV **w;
+    double cutres;
 
-	if (!(w = (projUV **)vector2(nu, nv, sizeof(projUV))) ||
-		!(ncu = (int *)vector1(nu + nv, sizeof(int))))
-		return 0;
-	ncv = ncu + nu;
-	if (!bchgen(a, b, nu, nv, w, func)) {
-		projUV *s;
-		double ab, *p;
+    if (!(w = (projUV **)vector2(nu, nv, sizeof(projUV))) ||
+        !(ncu = (int *)vector1(nu + nv, sizeof(int))))
+        return 0;
+    ncv = ncu + nu;
+    if (!bchgen(a, b, nu, nv, w, func)) {
+        projUV *s;
+        double ab, *p;
 
-		/* analyse coefficients and adjust until residual OK */
-		cutres = res;
-		for (i = 4; i ; --i) {
-			eval(w, nu, nv, cutres, resid);
-			if (resid->u < res && resid->v < res)
-				break;
-			cutres *= 0.5;
-		}
-		if (i <= 0) /* warn of too many tries */
-			resid->u = - resid->u;
-		/* apply cut resolution and set pointers */
-		nru = nrv = 0;
-		for (j = 0; j < nu; ++j) {
-			ncu[j] = ncv[j] = 0; /* clear column maxes */
-			for (s = w[j], i = 0; i < nv; ++i, ++s) {
-				if ((ab = fabs(s->u)) < cutres) /* < resolution ? */
-					s->u = 0.;		/* clear coefficient */
-				else
-					ncu[j] = i + 1;	/* update column max */
-				if ((ab = fabs(s->v)) < cutres) /* same for v coef's */
-					s->v = 0.;
-				else
-					ncv[j] = i + 1;
-			}
-			if (ncu[j]) nru = j + 1;	/* update row max */
-			if (ncv[j]) nrv = j + 1;
-		}
-		if (power) { /* convert to bivariate power series */
-			if (!bch2bps(a, b, w, nu, nv))
-				goto error;
-			/* possible change in some row counts, so readjust */
-			nru = nrv = 0;
-			for (j = 0; j < nu; ++j) {
-				ncu[j] = ncv[j] = 0; /* clear column maxes */
-				for (s = w[j], i = 0; i < nv; ++i, ++s) {
-					if (s->u)
-						ncu[j] = i + 1;	/* update column max */
-					if (s->v)
-						ncv[j] = i + 1;
-				}
-				if (ncu[j]) nru = j + 1;	/* update row max */
-				if (ncv[j]) nrv = j + 1;
-			}
-			if ((T = makeT(nru, nrv)) != NULL ) {
-				T->a = a;
-				T->b = b;
-				T->mu = nru - 1;
-				T->mv = nrv - 1;
-				T->power = 1;
-				for (i = 0; i < nru; ++i) /* store coefficient rows for u */
-                                    if ((T->cu[i].m = ncu[i]) != 0)
-						if ((p = T->cu[i].c =
-								(double *)pj_malloc(sizeof(double) * ncu[i])))
-							for (j = 0; j < ncu[i]; ++j)
-								*p++ = (w[i] + j)->u;
-						else
-							goto error;
-				for (i = 0; i < nrv; ++i) /* same for v */
-                                    if ((T->cv[i].m = ncv[i]) != 0)
-						if ((p = T->cv[i].c =
-								(double *)pj_malloc(sizeof(double) * ncv[i])))
-							for (j = 0; j < ncv[i]; ++j)
-								*p++ = (w[i] + j)->v;
-						else
-							goto error;
-			}
-		} else if ((T = makeT(nru, nrv)) != NULL) {
-			/* else make returned Chebyshev coefficient structure */
-			T->mu = nru - 1; /* save row degree */
-			T->mv = nrv - 1;
-			T->a.u = a.u + b.u; /* set argument scaling */
-			T->a.v = a.v + b.v;
-			T->b.u = 1. / (b.u - a.u);
-			T->b.v = 1. / (b.v - a.v);
-			T->power = 0;
-			for (i = 0; i < nru; ++i) /* store coefficient rows for u */
-                            if ((T->cu[i].m = ncu[i]) != 0) 
-					if ((p = T->cu[i].c =
-							(double *)pj_malloc(sizeof(double) * ncu[i])))
-						for (j = 0; j < ncu[i]; ++j)
-							*p++ = (w[i] + j)->u;
-					else
-						goto error;
-			for (i = 0; i < nrv; ++i) /* same for v */
-                            if ((T->cv[i].m = ncv[i]) != 0)
-					if ((p = T->cv[i].c =
-							(double *)pj_malloc(sizeof(double) * ncv[i])))
-						for (j = 0; j < ncv[i]; ++j)
-							*p++ = (w[i] + j)->v;
-					else
-						goto error;
-		} else
-			goto error;
-	}
-	goto gohome;
-error:
-	if (T) { /* pj_dalloc up possible allocations */
-		for (i = 0; i <= T->mu; ++i)
-			if (T->cu[i].c)
-				pj_dalloc(T->cu[i].c);
-		for (i = 0; i <= T->mv; ++i)
-			if (T->cv[i].c)
-				pj_dalloc(T->cv[i].c);
-		pj_dalloc(T);
-	}
-	T = 0;
-gohome:
-	freev2((void **) w, nu);
-	pj_dalloc(ncu);
-	return T;
+        /* analyse coefficients and adjust until residual OK */
+        cutres = res;
+        for (i = 4; i ; --i) {
+            eval(w, nu, nv, cutres, resid);
+            if (resid->u < res && resid->v < res)
+                break;
+            cutres *= 0.5;
+        }
+        if (i <= 0) /* warn of too many tries */
+            resid->u = - resid->u;
+        /* apply cut resolution and set pointers */
+        nru = nrv = 0;
+        for (j = 0; j < nu; ++j) {
+            ncu[j] = ncv[j] = 0; /* clear column maxes */
+            for (s = w[j], i = 0; i < nv; ++i, ++s) {
+                if ((ab = fabs(s->u)) < cutres) /* < resolution ? */
+                    s->u = 0.;		/* clear coefficient */
+                else
+                    ncu[j] = i + 1;	/* update column max */
+                if ((ab = fabs(s->v)) < cutres) /* same for v coef's */
+                    s->v = 0.;
+                else
+                    ncv[j] = i + 1;
+            }
+            if (ncu[j]) nru = j + 1;	/* update row max */
+            if (ncv[j]) nrv = j + 1;
+        }
+        if (power) { /* convert to bivariate power series */
+            if (!bch2bps(a, b, w, nu, nv))
+                goto error;
+            /* possible change in some row counts, so readjust */
+            nru = nrv = 0;
+            for (j = 0; j < nu; ++j) {
+                ncu[j] = ncv[j] = 0; /* clear column maxes */
+                for (s = w[j], i = 0; i < nv; ++i, ++s) {
+                    if (s->u)
+                        ncu[j] = i + 1;	/* update column max */
+                    if (s->v)
+                        ncv[j] = i + 1;
+                }
+                if (ncu[j]) nru = j + 1;	/* update row max */
+                if (ncv[j]) nrv = j + 1;
+            }
+            if ((T = makeT(nru, nrv)) != NULL ) {
+                T->a = a;
+                T->b = b;
+                T->mu = nru - 1;
+                T->mv = nrv - 1;
+                T->power = 1;
+                for (i = 0; i < nru; ++i) /* store coefficient rows for u */
+                {
+                    if ((T->cu[i].m = ncu[i]) != 0)
+                    {
+                        if ((p = T->cu[i].c =
+                             (double *)pj_malloc(sizeof(double) * ncu[i])))
+                            for (j = 0; j < ncu[i]; ++j)
+                                *p++ = (w[i] + j)->u;
+                        else
+                            goto error;
+                    }
+                }
+                for (i = 0; i < nrv; ++i) /* same for v */
+                {
+                    if ((T->cv[i].m = ncv[i]) != 0)
+                    {
+                        if ((p = T->cv[i].c =
+                             (double *)pj_malloc(sizeof(double) * ncv[i])))
+                            for (j = 0; j < ncv[i]; ++j)
+                                *p++ = (w[i] + j)->v;
+                        else
+                            goto error;
+                    }
+                }
+            }
+        } else if ((T = makeT(nru, nrv)) != NULL) {
+            /* else make returned Chebyshev coefficient structure */
+            T->mu = nru - 1; /* save row degree */
+            T->mv = nrv - 1;
+            T->a.u = a.u + b.u; /* set argument scaling */
+            T->a.v = a.v + b.v;
+            T->b.u = 1. / (b.u - a.u);
+            T->b.v = 1. / (b.v - a.v);
+            T->power = 0;
+            for (i = 0; i < nru; ++i) /* store coefficient rows for u */
+            {
+                if ((T->cu[i].m = ncu[i]) != 0) 
+                {
+                    if ((p = T->cu[i].c =
+                         (double *)pj_malloc(sizeof(double) * ncu[i])))
+                        for (j = 0; j < ncu[i]; ++j)
+                            *p++ = (w[i] + j)->u;
+                    else
+                        goto error;
+                }
+            }
+            for (i = 0; i < nrv; ++i) /* same for v */
+            {
+                if ((T->cv[i].m = ncv[i]) != 0)
+                {
+                    if ((p = T->cv[i].c =
+                         (double *)pj_malloc(sizeof(double) * ncv[i])))
+                        for (j = 0; j < ncv[i]; ++j)
+                            *p++ = (w[i] + j)->v;
+                    else
+                        goto error;
+                }
+            }
+        } else
+            goto error;
+    }
+    goto gohome;
+  error:
+    if (T) { /* pj_dalloc up possible allocations */
+        for (i = 0; i <= T->mu; ++i)
+            if (T->cu[i].c)
+                pj_dalloc(T->cu[i].c);
+        for (i = 0; i <= T->mv; ++i)
+            if (T->cv[i].c)
+                pj_dalloc(T->cv[i].c);
+        pj_dalloc(T);
+    }
+    T = 0;
+  gohome:
+    freev2((void **) w, nu);
+    pj_dalloc(ncu);
+    return T;
 }
diff --git a/src/nad_init.c b/src/nad_init.c
index 70c47fb..6c2787c 100644
--- a/src/nad_init.c
+++ b/src/nad_init.c
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: nad_init.c 2142 2012-01-25 19:23:31Z warmerdam $
+ * $Id: nad_init.c 2345 2013-06-22 07:54:57Z warmerdam $
  *
  * Project:  PROJ.4
  * Purpose:  Load datum shift files into memory.
@@ -82,18 +82,18 @@ static void swap_words( void *data_in, int word_size, int word_count )
 /*      Load the data portion of a ctable formatted grid.               */
 /************************************************************************/
 
-int nad_ctable_load( projCtx ctx, struct CTABLE *ct, FILE *fid )
+int nad_ctable_load( projCtx ctx, struct CTABLE *ct, PAFile fid )
 
 {
     int  a_size;
 
-    fseek( fid, sizeof(struct CTABLE), SEEK_SET );
+    pj_ctx_fseek( ctx, fid, sizeof(struct CTABLE), SEEK_SET );
 
     /* read all the actual shift values */
     a_size = ct->lim.lam * ct->lim.phi;
     ct->cvs = (FLP *) pj_malloc(sizeof(FLP) * a_size);
     if( ct->cvs == NULL 
-        || fread(ct->cvs, sizeof(FLP), a_size, fid) != a_size )
+        || pj_ctx_fread(ctx, ct->cvs, sizeof(FLP), a_size, fid) != a_size )
     {
         pj_dalloc( ct->cvs );
         ct->cvs = NULL;
@@ -113,7 +113,7 @@ int nad_ctable_load( projCtx ctx, struct CTABLE *ct, FILE *fid )
 /*      Read the header portion of a "ctable" format grid.              */
 /************************************************************************/
 
-struct CTABLE *nad_ctable_init( projCtx ctx, FILE * fid )
+struct CTABLE *nad_ctable_init( projCtx ctx, PAFile fid )
 {
     struct CTABLE *ct;
     int		id_end;
@@ -121,7 +121,7 @@ struct CTABLE *nad_ctable_init( projCtx ctx, FILE * fid )
     /* read the table header */
     ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
     if( ct == NULL 
-        || fread( ct, sizeof(struct CTABLE), 1, fid ) != 1 )
+        || pj_ctx_fread( ctx, ct, sizeof(struct CTABLE), 1, fid ) != 1 )
     {
         pj_ctx_set_errno( ctx, -38 );
         return NULL;
@@ -155,18 +155,18 @@ struct CTABLE *nad_ctable_init( projCtx ctx, FILE * fid )
 /*      Load the data portion of a ctable2 formatted grid.              */
 /************************************************************************/
 
-int nad_ctable2_load( projCtx ctx, struct CTABLE *ct, FILE *fid )
+int nad_ctable2_load( projCtx ctx, struct CTABLE *ct, PAFile fid )
 
 {
     int  a_size;
 
-    fseek( fid, 160, SEEK_SET );
+    pj_ctx_fseek( ctx, fid, 160, SEEK_SET );
 
     /* read all the actual shift values */
     a_size = ct->lim.lam * ct->lim.phi;
     ct->cvs = (FLP *) pj_malloc(sizeof(FLP) * a_size);
     if( ct->cvs == NULL 
-        || fread(ct->cvs, sizeof(FLP), a_size, fid) != a_size )
+        || pj_ctx_fread(ctx, ct->cvs, sizeof(FLP), a_size, fid) != a_size )
     {
         pj_dalloc( ct->cvs );
         ct->cvs = NULL;
@@ -195,13 +195,13 @@ int nad_ctable2_load( projCtx ctx, struct CTABLE *ct, FILE *fid )
 /*      Read the header portion of a "ctable2" format grid.             */
 /************************************************************************/
 
-struct CTABLE *nad_ctable2_init( projCtx ctx, FILE * fid )
+struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid )
 {
     struct CTABLE *ct;
     int		id_end;
     char        header[160];
 
-    if( fread( header, sizeof(header), 1, fid ) != 1 )
+    if( pj_ctx_fread( ctx, header, sizeof(header), 1, fid ) != 1 )
     {
         pj_ctx_set_errno( ctx, -38 );
         return NULL;
@@ -268,7 +268,7 @@ struct CTABLE *nad_init(projCtx ctx, char *name)
 {
     char 	fname[MAX_PATH_FILENAME+1];
     struct CTABLE *ct;
-    FILE 	*fid;
+    PAFile      fid;
 
     ctx->last_errno = 0;
 
@@ -290,7 +290,7 @@ struct CTABLE *nad_init(projCtx ctx, char *name)
         }
     }
 
-    fclose(fid);
+    pj_ctx_fclose(ctx, fid);
     return ct;
 }
 
diff --git a/src/pj_apply_gridshift.c b/src/pj_apply_gridshift.c
index bd0f254..4e7681a 100644
--- a/src/pj_apply_gridshift.c
+++ b/src/pj_apply_gridshift.c
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: pj_apply_gridshift.c 2219 2012-06-19 04:18:00Z warmerdam $
+ * $Id: pj_apply_gridshift.c 2548 2014-09-17 06:21:09Z warmerdam $
  *
  * Project:  PROJ.4
  * Purpose:  Apply datum shifts based on grid shift files (normally NAD27 to
@@ -156,7 +156,7 @@ int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **tables, int grid_count,
                 continue;
 
             /* If we have child nodes, check to see if any of them apply. */
-            if( gi->child != NULL )
+            while( gi->child )
             {
                 PJ_GRIDINFO *child;
 
@@ -177,12 +177,14 @@ int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **tables, int grid_count,
                     break;
                 }
 
-                /* we found a more refined child node to use */
-                if( child != NULL )
-                {
-                    gi = child;
-                    ct = child->ct;
-                }
+                /* If we didn't find a child then nothing more to do */
+
+                if( child == NULL ) break;
+
+                /* Otherwise use the child, first checking it's children */
+
+                gi = child;
+                ct = child->ct;
             }
 
             /* load the grid shift info if we don't have it. */
diff --git a/src/pj_apply_vgridshift.c b/src/pj_apply_vgridshift.c
index 1570d7f..d26e902 100644
--- a/src/pj_apply_vgridshift.c
+++ b/src/pj_apply_vgridshift.c
@@ -101,7 +101,7 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
                 continue;
 
             /* If we have child nodes, check to see if any of them apply. */
-            if( gi->child != NULL )
+            while( gi->child != NULL )
             {
                 PJ_GRIDINFO *child;
 
@@ -117,12 +117,15 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
                     break;
                 }
 
-                /* we found a more refined child node to use */
-                if( child != NULL )
+                /* we didn't find a more refined child node to use, so go with current grid */
+                if( child == NULL )
                 {
-                    gi = child;
-                    ct = child->ct;
+                    break;
                 }
+
+                /* Otherwise let's try for childrens children .. */
+                gi = child;
+                ct = child->ct;
             }
 
             /* load the grid shift info if we don't have it. */
diff --git a/src/pj_ctx.c b/src/pj_ctx.c
index a9dc7ab..048baf4 100644
--- a/src/pj_ctx.c
+++ b/src/pj_ctx.c
@@ -33,7 +33,7 @@
 PJ_CVSID("$Id$");
 
 static projCtx_t default_context;
-static int       default_context_initialized = 0;
+static volatile int       default_context_initialized = 0;
 
 /************************************************************************/
 /*                             pj_get_ctx()                             */
@@ -68,11 +68,11 @@ projCtx pj_get_default_ctx()
 
     if( !default_context_initialized )
     {
-        default_context_initialized = 1;
         default_context.last_errno = 0;
         default_context.debug_level = PJ_LOG_NONE;
         default_context.logger = pj_stderr_logger;
         default_context.app_data = NULL;
+        default_context.fileapi = pj_get_default_fileapi();
 
         if( getenv("PROJ_DEBUG") != NULL )
         {
@@ -81,6 +81,7 @@ projCtx pj_get_default_ctx()
             else
                 default_context.debug_level = PJ_LOG_DEBUG_MINOR;
         }
+        default_context_initialized = 1;
     }
 
     pj_release_lock();
@@ -176,4 +177,24 @@ void *pj_ctx_get_app_data( projCtx ctx )
     return ctx->app_data;
 }
 
+/************************************************************************/
+/*                         pj_ctx_set_fileapi()                         */
+/************************************************************************/
+
+void pj_ctx_set_fileapi( projCtx ctx, projFileAPI *fileapi )
+
+{
+    ctx->fileapi = fileapi;
+}
+
+/************************************************************************/
+/*                         pj_ctx_get_fileapi()                         */
+/************************************************************************/
+
+projFileAPI *pj_ctx_get_fileapi( projCtx ctx )
+
+{
+    return ctx->fileapi;
+}
+
 
diff --git a/src/pj_datums.c b/src/pj_datums.c
index 973cc05..114b88c 100644
--- a/src/pj_datums.c
+++ b/src/pj_datums.c
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: pj_datums.c 2085 2011-08-07 22:17:18Z warmerdam $
+ * $Id: pj_datums.c 2553 2014-09-17 09:07:29Z rouault $
  *
  * Project:  PROJ.4
  * Purpose:  Built in datum list.
@@ -49,8 +49,8 @@ C_NAMESPACE_VAR struct PJ_DATUMS pj_datums[] = {
                                                      "clrk66", 
 				"North_American_Datum_1927",
 "potsdam",  "towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7",  "bessel",  "Potsdam Rauenberg 1950 DHDN",
-"carthage",  "towgs84=-263.0,6.0,431.0",  "clark80",  "Carthage 1934 Tunisia",
-"hermannskogel", "towgs84=653.0,-212.0,449.0",  "bessel",  "Hermannskogel",
+"carthage",  "towgs84=-263.0,6.0,431.0",  "clrk80ign",  "Carthage 1934 Tunisia",
+"hermannskogel", "towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232",  "bessel",  "Hermannskogel",
 "ire65",  "towgs84=482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",  "mod_airy",  "Ireland 1965",
 "nzgd49",    "towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993", "intl", "New Zealand Geodetic Datum 1949",
 "OSGB36",    "towgs84=446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894", "airy", "Airy 1830",
diff --git a/src/pj_ell_set.c b/src/pj_ell_set.c
index c0d4adc..857bd78 100644
--- a/src/pj_ell_set.c
+++ b/src/pj_ell_set.c
@@ -19,12 +19,12 @@ pj_ell_set(projCtx ctx, paralist *pl, double *a, double *es) {
         /* check for varying forms of ellipsoid input */
 	*a = *es = 0.;
 	/* R takes precedence */
-	if (pj_param(NULL, pl, "tR").i)
-		*a = pj_param(NULL,pl, "dR").f;
+	if (pj_param(ctx, pl, "tR").i)
+		*a = pj_param(ctx,pl, "dR").f;
 	else { /* probable elliptical figure */
 
 		/* check if ellps present and temporarily append its values to pl */
-                if ((name = pj_param(NULL,pl, "sellps").s) != NULL) {
+        if ((name = pj_param(ctx,pl, "sellps").s) != NULL) {
 			char *s;
 
 			for (start = pl; start && start->next ; start = start->next) ;
@@ -34,50 +34,50 @@ pj_ell_set(projCtx ctx, paralist *pl, double *a, double *es) {
 			curr = curr->next = pj_mkparam(pj_ellps[i].major);
 			curr = curr->next = pj_mkparam(pj_ellps[i].ell);
 		}
-		*a = pj_param(NULL,pl, "da").f;
-		if (pj_param(NULL,pl, "tes").i) /* eccentricity squared */
-			*es = pj_param(NULL,pl, "des").f;
-		else if (pj_param(NULL,pl, "te").i) { /* eccentricity */
-			e = pj_param(NULL,pl, "de").f;
+		*a = pj_param(ctx,pl, "da").f;
+		if (pj_param(ctx,pl, "tes").i) /* eccentricity squared */
+			*es = pj_param(ctx,pl, "des").f;
+		else if (pj_param(ctx,pl, "te").i) { /* eccentricity */
+			e = pj_param(ctx,pl, "de").f;
 			*es = e * e;
-		} else if (pj_param(NULL,pl, "trf").i) { /* recip flattening */
-			*es = pj_param(NULL,pl, "drf").f;
+		} else if (pj_param(ctx,pl, "trf").i) { /* recip flattening */
+			*es = pj_param(ctx,pl, "drf").f;
 			if (!*es) {
 				pj_ctx_set_errno( ctx, -10);
 				goto bomb;
 			}
 			*es = 1./ *es;
 			*es = *es * (2. - *es);
-		} else if (pj_param(NULL,pl, "tf").i) { /* flattening */
-			*es = pj_param(NULL,pl, "df").f;
+		} else if (pj_param(ctx,pl, "tf").i) { /* flattening */
+			*es = pj_param(ctx,pl, "df").f;
 			*es = *es * (2. - *es);
-		} else if (pj_param(NULL,pl, "tb").i) { /* minor axis */
-			b = pj_param(NULL,pl, "db").f;
+		} else if (pj_param(ctx,pl, "tb").i) { /* minor axis */
+			b = pj_param(ctx,pl, "db").f;
 			*es = 1. - (b * b) / (*a * *a);
 		}     /* else *es == 0. and sphere of radius *a */
 		if (!b)
 			b = *a * sqrt(1. - *es);
 		/* following options turn ellipsoid into equivalent sphere */
-		if (pj_param(NULL,pl, "bR_A").i) { /* sphere--area of ellipsoid */
+		if (pj_param(ctx,pl, "bR_A").i) { /* sphere--area of ellipsoid */
 			*a *= 1. - *es * (SIXTH + *es * (RA4 + *es * RA6));
 			*es = 0.;
-		} else if (pj_param(NULL,pl, "bR_V").i) { /* sphere--vol. of ellipsoid */
+		} else if (pj_param(ctx,pl, "bR_V").i) { /* sphere--vol. of ellipsoid */
 			*a *= 1. - *es * (SIXTH + *es * (RV4 + *es * RV6));
 			*es = 0.;
-		} else if (pj_param(NULL,pl, "bR_a").i) { /* sphere--arithmetic mean */
+		} else if (pj_param(ctx,pl, "bR_a").i) { /* sphere--arithmetic mean */
 			*a = .5 * (*a + b);
 			*es = 0.;
-		} else if (pj_param(NULL,pl, "bR_g").i) { /* sphere--geometric mean */
+		} else if (pj_param(ctx,pl, "bR_g").i) { /* sphere--geometric mean */
 			*a = sqrt(*a * b);
 			*es = 0.;
-		} else if (pj_param(NULL,pl, "bR_h").i) { /* sphere--harmonic mean */
+		} else if (pj_param(ctx,pl, "bR_h").i) { /* sphere--harmonic mean */
 			*a = 2. * *a * b / (*a + b);
 			*es = 0.;
-		} else if ((i = pj_param(NULL,pl, "tR_lat_a").i) || /* sphere--arith. */
-			pj_param(NULL,pl, "tR_lat_g").i) { /* or geom. mean at latitude */
+		} else if ((i = pj_param(ctx,pl, "tR_lat_a").i) || /* sphere--arith. */
+			pj_param(ctx,pl, "tR_lat_g").i) { /* or geom. mean at latitude */
 			double tmp;
 
-			tmp = sin(pj_param(NULL,pl, i ? "rR_lat_a" : "rR_lat_g").f);
+			tmp = sin(pj_param(ctx,pl, i ? "rR_lat_a" : "rR_lat_g").f);
 			if (fabs(tmp) > HALFPI) {
                                 pj_ctx_set_errno(ctx,-11);
 				goto bomb;
diff --git a/src/pj_ellps.c b/src/pj_ellps.c
index 6852192..3da162b 100644
--- a/src/pj_ellps.c
+++ b/src/pj_ellps.c
@@ -19,6 +19,7 @@ pj_ellps[] = {
 "bess_nam",	"a=6377483.865", "rf=299.1528128", "Bessel 1841 (Namibia)",
 "clrk66",	"a=6378206.4", "b=6356583.8", "Clarke 1866",
 "clrk80",	"a=6378249.145", "rf=293.4663", "Clarke 1880 mod.",
+"clrk80ign","a=6378249.2", "rf=293.4660212936269", "Clarke 1880 (IGN).",
 "CPM",  	"a=6375738.7", "rf=334.29", "Comm. des Poids et Mesures 1799",
 "delmbr",	"a=6376428.",  "rf=311.5", "Delambre 1810 (Belgium)",
 "engelis",	"a=6378136.05", "rf=298.2566", "Engelis 1985",
diff --git a/src/pj_fileapi.c b/src/pj_fileapi.c
new file mode 100644
index 0000000..c0b3369
--- /dev/null
+++ b/src/pj_fileapi.c
@@ -0,0 +1,203 @@
+/******************************************************************************
+ * $Id$
+ *
+ * Project:  PROJ.4
+ * Purpose:  Implementation of the pj_ctx_* file api, and the default stdio
+ *           based implementation.
+ * Author:   Frank Warmerdam, warmerdam at pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2013, Frank Warmerdam
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *****************************************************************************/
+
+#include <projects.h>
+#include <string.h>
+
+PJ_CVSID("$Id$");
+
+static PAFile pj_stdio_fopen(projCtx ctx, const char *filename, 
+                             const char *access);
+static size_t pj_stdio_fread(void *buffer, size_t size, size_t nmemb, 
+                             PAFile file);
+static int pj_stdio_fseek(PAFile file, long offset, int whence);
+static long pj_stdio_ftell(PAFile file);
+static void pj_stdio_fclose(PAFile file);
+
+static projFileAPI default_fileapi = { 
+    pj_stdio_fopen, 
+    pj_stdio_fread,
+    pj_stdio_fseek,
+    pj_stdio_ftell,
+    pj_stdio_fclose
+};
+
+typedef struct {
+    projCtx ctx;
+    FILE *fp;
+} stdio_pafile;
+
+/************************************************************************/
+/*                       pj_get_default_fileapi()                       */
+/************************************************************************/
+
+projFileAPI *pj_get_default_fileapi() 
+{
+    return &default_fileapi;
+}
+
+/************************************************************************/
+/*                           pj_stdio_fopen()                           */
+/************************************************************************/
+
+static PAFile pj_stdio_fopen(projCtx ctx, const char *filename, 
+                             const char *access)
+{
+    stdio_pafile *pafile;
+    FILE *fp;
+
+    fp = fopen(filename, access);
+    if (fp == NULL) 
+    {
+        return NULL;
+    }
+
+    pafile = (stdio_pafile *) malloc(sizeof(stdio_pafile));
+    pafile->fp = fp;
+    pafile->ctx = ctx;
+    return (PAFile) pafile;
+}
+
+/************************************************************************/
+/*                           pj_stdio_fread()                           */
+/************************************************************************/
+
+static size_t pj_stdio_fread(void *buffer, size_t size, size_t nmemb, 
+                             PAFile file)
+{
+    stdio_pafile *pafile = (stdio_pafile *) file;
+    return fread(buffer, size, nmemb, pafile->fp);
+}
+
+/************************************************************************/
+/*                           pj_stdio_fseek()                           */
+/************************************************************************/
+static int pj_stdio_fseek(PAFile file, long offset, int whence)
+{
+    stdio_pafile *pafile = (stdio_pafile *) file;
+    return fseek(pafile->fp, offset, whence);
+}
+
+/************************************************************************/
+/*                           pj_stdio_ftell()                           */
+/************************************************************************/
+static long pj_stdio_ftell(PAFile file)
+{
+    stdio_pafile *pafile = (stdio_pafile *) file;
+    return ftell(pafile->fp);
+}
+
+/************************************************************************/
+/*                          pj_stdio_fclose()                           */
+/************************************************************************/
+static void pj_stdio_fclose(PAFile file)
+{
+    stdio_pafile *pafile = (stdio_pafile *) file;
+    fclose(pafile->fp);
+    free(pafile);
+}
+
+/************************************************************************/
+/*                            pj_ctx_fopen()                            */
+/*                                                                      */
+/*      Open a file using the provided file io hooks.                   */
+/************************************************************************/
+
+PAFile pj_ctx_fopen(projCtx ctx, const char *filename, const char *access)
+{
+    return ctx->fileapi->FOpen(ctx, filename, access);
+}
+
+/************************************************************************/
+/*                            pj_ctx_fread()                            */
+/************************************************************************/
+size_t pj_ctx_fread(projCtx ctx, void *buffer, size_t size, size_t nmemb, PAFile file)
+{
+    return ctx->fileapi->FRead(buffer, size, nmemb, file);
+}
+
+/************************************************************************/
+/*                            pj_ctx_fseek()                            */
+/************************************************************************/
+int    pj_ctx_fseek(projCtx ctx, PAFile file, long offset, int whence)
+{
+    return ctx->fileapi->FSeek(file, offset, whence);
+}
+
+/************************************************************************/
+/*                            pj_ctx_ftell()                            */
+/************************************************************************/
+long   pj_ctx_ftell(projCtx ctx, PAFile file)
+{
+    return ctx->fileapi->FTell(file);
+}
+
+/************************************************************************/
+/*                           pj_ctx_fclose()                            */
+/************************************************************************/
+void   pj_ctx_fclose(projCtx ctx, PAFile file)
+{
+    ctx->fileapi->FClose(file);
+}
+
+/************************************************************************/
+/*                            pj_ctx_fgets()                            */
+/*                                                                      */
+/*      A not very optimal implementation of fgets on top of            */
+/*      fread().  If we end up using this a lot more care should be     */
+/*      taken.                                                          */
+/************************************************************************/
+
+char *pj_ctx_fgets(projCtx ctx, char *line, int size, PAFile file) 
+{
+    long start = pj_ctx_ftell(ctx, file);
+    size_t bytes_read;
+    int i;
+
+    line[size-1] = '\0';
+    bytes_read = pj_ctx_fread(ctx, line, 1, size-1, file);
+    if(bytes_read == 0)
+        return NULL;
+    if(bytes_read < size) 
+    {
+        line[bytes_read] = '\0';
+    }
+    
+    for( i = 0; i < size-2; i++) 
+    {
+        if (line[i] == '\n') 
+        {
+            line[i+1] = '\0';
+            pj_ctx_fseek(ctx, file, start + i + 1, SEEK_SET);
+            break;
+        }
+    }
+    return line;
+}
diff --git a/src/pj_gc_reader.c b/src/pj_gc_reader.c
index e22aa99..1845fca 100644
--- a/src/pj_gc_reader.c
+++ b/src/pj_gc_reader.c
@@ -31,8 +31,9 @@
 
 #include <projects.h>
 #include <string.h>
+#include <ctype.h>
 
-static int pj_gc_readentry( projCtx ctx, FILE *fp, PJ_GridCatalogEntry *entry );
+static int pj_gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry);
 static void pj_gc_sortcatalog( projCtx ctx, PJ_GridCatalog *catalog );
 
 /************************************************************************/
@@ -43,17 +44,17 @@ static void pj_gc_sortcatalog( projCtx ctx, PJ_GridCatalog *catalog );
 
 PJ_GridCatalog *pj_gc_readcatalog( projCtx ctx, const char *catalog_name )
 {
-    FILE *fp;
+    PAFile fid;
     PJ_GridCatalog *catalog;
-    int entry_max, err;
+    int entry_max;
     char line[302];
     
-    fp = pj_open_lib( ctx, (char *) catalog_name, "r" );
-    if (fp == NULL) 
+    fid = pj_open_lib( ctx, (char *) catalog_name, "r" );
+    if (fid == NULL) 
         return NULL;
 
     /* discard title line */
-    fgets(line, sizeof(line)-1, fp);
+    pj_ctx_fgets(ctx, line, sizeof(line)-1, fid);
 
     catalog = (PJ_GridCatalog *) calloc(1,sizeof(PJ_GridCatalog));
     if( !catalog )
@@ -65,7 +66,7 @@ PJ_GridCatalog *pj_gc_readcatalog( projCtx ctx, const char *catalog_name )
     catalog->entries = (PJ_GridCatalogEntry *) 
         malloc(entry_max * sizeof(PJ_GridCatalogEntry));
     
-    while( pj_gc_readentry( ctx, fp, 
+    while( pj_gc_readentry( ctx, fid, 
                             catalog->entries+catalog->entry_count) == 0)
     {
         catalog->entry_count++;
@@ -105,12 +106,12 @@ static void pj_gc_sortcatalog( projCtx ctx, PJ_GridCatalog *catalog )
 /*      token count.                                                    */
 /************************************************************************/
 
-static int pj_gc_read_csv_line( projCtx ctx, FILE *fp, 
+static int pj_gc_read_csv_line( projCtx ctx, PAFile fid, 
                                 char **tokens, int max_tokens ) 
 {
     char line[302];
    
-    while( fgets(line, sizeof(line)-1, fp) != NULL )
+    while( pj_ctx_fgets(ctx, line, sizeof(line)-1, fid) != NULL )
     {
         char *next = line;
         int token_count = 0;
@@ -180,7 +181,7 @@ double pj_gc_parsedate( projCtx ctx, const char *date_string )
 /*        gridname,ll_long,ll_lat,ur_long,ur_lat,priority,date          */
 /************************************************************************/
 
-static int pj_gc_readentry( projCtx ctx, FILE *fp, PJ_GridCatalogEntry *entry ) 
+static int pj_gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry) 
 {
 #define MAX_TOKENS 30
     char *tokens[MAX_TOKENS];
@@ -189,7 +190,7 @@ static int pj_gc_readentry( projCtx ctx, FILE *fp, PJ_GridCatalogEntry *entry )
 
     memset( entry, 0, sizeof(PJ_GridCatalogEntry) );
     
-    token_count = pj_gc_read_csv_line( ctx, fp, tokens, MAX_TOKENS );
+    token_count = pj_gc_read_csv_line( ctx, fid, tokens, MAX_TOKENS );
     if( token_count < 5 )
     {
         error = 1; /* TODO: need real error codes */
diff --git a/src/pj_gridcatalog.c b/src/pj_gridcatalog.c
index 359e9fa..76f52c8 100644
--- a/src/pj_gridcatalog.c
+++ b/src/pj_gridcatalog.c
@@ -119,7 +119,6 @@ int pj_gc_apply_gridshift( PJ *defn, int inverse,
     {
         long io = i * point_offset;
         LP   input, output_after, output_before;
-        int  itable;
         double mix_ratio;
         PJ_GRIDINFO *gi;
 
diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c
index a91cfc9..3761717 100644
--- a/src/pj_gridinfo.c
+++ b/src/pj_gridinfo.c
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: pj_gridinfo.c 2142 2012-01-25 19:23:31Z warmerdam $
+ * $Id: pj_gridinfo.c 2548 2014-09-17 06:21:09Z warmerdam $
  *
  * Project:  PROJ.4
  * Purpose:  Functions for handling individual PJ_GRIDINFO's.  Includes
@@ -41,7 +41,7 @@
  * TODO - mloskot: re-implement porting friendly assert
  */
 # define assert(exp)	((void)0)
-#else
+#else/
 # include <assert.h>
 #endif /* _WIN32_WCE */
 
@@ -62,16 +62,16 @@ static void swap_words( unsigned char *data, int word_size, int word_count )
     for( word = 0; word < word_count; word++ )
     {
         int	i;
-        
+
         for( i = 0; i < word_size/2; i++ )
         {
             int	t;
-            
+
             t = data[i];
             data[i] = data[word_size-i-1];
             data[word_size-i-1] = t;
         }
-        
+
         data += word_size;
     }
 }
@@ -99,7 +99,7 @@ void pj_gridinfo_free( projCtx ctx, PJ_GRIDINFO *gi )
 
     if( gi->ct != NULL )
         nad_free( gi->ct );
-    
+
     free( gi->gridname );
     if( gi->filename != NULL )
         free( gi->filename );
@@ -118,28 +118,43 @@ void pj_gridinfo_free( projCtx ctx, PJ_GRIDINFO *gi )
 int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
 
 {
+    struct CTABLE ct_tmp;
+
     if( gi == NULL || gi->ct == NULL )
         return 0;
 
+    pj_acquire_lock();
+    if( gi->ct->cvs != NULL )
+    {
+        pj_release_lock();
+        return 1;
+    }
+
+    memcpy(&ct_tmp, gi->ct, sizeof(struct CTABLE));
+
 /* -------------------------------------------------------------------- */
 /*      Original platform specific CTable format.                       */
 /* -------------------------------------------------------------------- */
     if( strcmp(gi->format,"ctable") == 0 )
     {
-        FILE *fid;
+        PAFile fid;
         int result;
 
         fid = pj_open_lib( ctx, gi->filename, "rb" );
-        
+
         if( fid == NULL )
         {
             pj_ctx_set_errno( ctx, -38 );
+            pj_release_lock();
             return 0;
         }
 
-        result = nad_ctable_load( ctx, gi->ct, fid );
+        result = nad_ctable_load( ctx, &ct_tmp, fid );
+
+        pj_ctx_fclose( ctx, fid );
 
-        fclose( fid );
+        gi->ct->cvs = ct_tmp.cvs;
+        pj_release_lock();
 
         return result;
     }
@@ -149,21 +164,25 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
 /* -------------------------------------------------------------------- */
     else if( strcmp(gi->format,"ctable2") == 0 )
     {
-        FILE *fid;
+        PAFile fid;
         int result;
 
         fid = pj_open_lib( ctx, gi->filename, "rb" );
-        
+
         if( fid == NULL )
         {
             pj_ctx_set_errno( ctx, -38 );
+            pj_release_lock();
             return 0;
         }
 
-        result = nad_ctable2_load( ctx, gi->ct, fid );
+        result = nad_ctable2_load( ctx, &ct_tmp, fid );
+
+        pj_ctx_fclose( ctx, fid );
 
-        fclose( fid );
+        gi->ct->cvs = ct_tmp.cvs;
 
+        pj_release_lock();
         return result;
     }
 
@@ -178,37 +197,40 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
     {
         double	*row_buf;
         int	row;
-        FILE *fid;
+        PAFile fid;
 
         fid = pj_open_lib( ctx, gi->filename, "rb" );
-        
+
         if( fid == NULL )
         {
             pj_ctx_set_errno( ctx, -38 );
+            pj_release_lock();
             return 0;
         }
 
-        fseek( fid, gi->grid_offset, SEEK_SET );
+        pj_ctx_fseek( ctx, fid, gi->grid_offset, SEEK_SET );
 
         row_buf = (double *) pj_malloc(gi->ct->lim.lam * sizeof(double) * 2);
-        gi->ct->cvs = (FLP *) pj_malloc(gi->ct->lim.lam*gi->ct->lim.phi*sizeof(FLP));
-        if( row_buf == NULL || gi->ct->cvs == NULL )
+        ct_tmp.cvs = (FLP *) pj_malloc(gi->ct->lim.lam*gi->ct->lim.phi*sizeof(FLP));
+        if( row_buf == NULL || ct_tmp.cvs == NULL )
         {
             pj_ctx_set_errno( ctx, -38 );
+            pj_release_lock();
             return 0;
         }
-        
+
         for( row = 0; row < gi->ct->lim.phi; row++ )
         {
             int	    i;
             FLP     *cvs;
             double  *diff_seconds;
 
-            if( fread( row_buf, sizeof(double), gi->ct->lim.lam * 2, fid ) 
+            if( pj_ctx_fread( ctx, row_buf,
+                              sizeof(double), gi->ct->lim.lam * 2, fid )
                 != 2 * gi->ct->lim.lam )
             {
                 pj_dalloc( row_buf );
-                pj_dalloc( gi->ct->cvs );
+                pj_dalloc( ct_tmp.cvs );
                 pj_ctx_set_errno( ctx, -38 );
                 return 0;
             }
@@ -221,7 +243,7 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
 
             for( i = 0; i < gi->ct->lim.lam; i++ )
             {
-                cvs = gi->ct->cvs + (row) * gi->ct->lim.lam
+                cvs = ct_tmp.cvs + (row) * gi->ct->lim.lam
                     + (gi->ct->lim.lam - i - 1);
 
                 cvs->phi = *(diff_seconds++) * ((PI/180.0) / 3600.0);
@@ -231,7 +253,10 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
 
         pj_dalloc( row_buf );
 
-        fclose( fid );
+        pj_ctx_fclose( ctx, fid );
+
+        gi->ct->cvs = ct_tmp.cvs;
+        pj_release_lock();
 
         return 1;
     }
@@ -247,47 +272,50 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
     {
         float	*row_buf;
         int	row;
-        FILE *fid;
+        PAFile fid;
 
-        pj_log( ctx, PJ_LOG_DEBUG_MINOR, 
+        pj_log( ctx, PJ_LOG_DEBUG_MINOR,
                 "NTv2 - loading grid %s", gi->ct->id );
 
         fid = pj_open_lib( ctx, gi->filename, "rb" );
-        
+
         if( fid == NULL )
         {
             pj_ctx_set_errno( ctx, -38 );
+            pj_release_lock();
             return 0;
         }
 
-        fseek( fid, gi->grid_offset, SEEK_SET );
+        pj_ctx_fseek( ctx, fid, gi->grid_offset, SEEK_SET );
 
         row_buf = (float *) pj_malloc(gi->ct->lim.lam * sizeof(float) * 4);
-        gi->ct->cvs = (FLP *) pj_malloc(gi->ct->lim.lam*gi->ct->lim.phi*sizeof(FLP));
-        if( row_buf == NULL || gi->ct->cvs == NULL )
+        ct_tmp.cvs = (FLP *) pj_malloc(gi->ct->lim.lam*gi->ct->lim.phi*sizeof(FLP));
+        if( row_buf == NULL || ct_tmp.cvs == NULL )
         {
             pj_ctx_set_errno( ctx, -38 );
+            pj_release_lock();
             return 0;
         }
-        
+
         for( row = 0; row < gi->ct->lim.phi; row++ )
         {
             int	    i;
             FLP     *cvs;
             float   *diff_seconds;
 
-            if( fread( row_buf, sizeof(float), gi->ct->lim.lam*4, fid ) 
+            if( pj_ctx_fread( ctx, row_buf, sizeof(float),
+                              gi->ct->lim.lam*4, fid )
                 != 4 * gi->ct->lim.lam )
             {
                 pj_dalloc( row_buf );
-                pj_dalloc( gi->ct->cvs );
-                gi->ct->cvs = NULL;
+                pj_dalloc( ct_tmp.cvs );
                 pj_ctx_set_errno( ctx, -38 );
+                pj_release_lock();
                 return 0;
             }
 
             if( !IS_LSB )
-                swap_words( (unsigned char *) row_buf, 4, 
+                swap_words( (unsigned char *) row_buf, 4,
                             gi->ct->lim.lam*4 );
 
             /* convert seconds to radians */
@@ -295,7 +323,7 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
 
             for( i = 0; i < gi->ct->lim.lam; i++ )
             {
-                cvs = gi->ct->cvs + (row) * gi->ct->lim.lam
+                cvs = ct_tmp.cvs + (row) * gi->ct->lim.lam
                     + (gi->ct->lim.lam - i - 1);
 
                 cvs->phi = *(diff_seconds++) * ((PI/180.0) / 3600.0);
@@ -306,8 +334,11 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
 
         pj_dalloc( row_buf );
 
-        fclose( fid );
+        pj_ctx_fclose( ctx, fid );
 
+        gi->ct->cvs = ct_tmp.cvs;
+
+        pj_release_lock();
         return 1;
     }
 
@@ -317,41 +348,47 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
     else if( strcmp(gi->format,"gtx") == 0 )
     {
         int   words = gi->ct->lim.lam * gi->ct->lim.phi;
-        FILE *fid;
+        PAFile fid;
 
         fid = pj_open_lib( ctx, gi->filename, "rb" );
-        
+
         if( fid == NULL )
         {
             pj_ctx_set_errno( ctx, -38 );
+            pj_release_lock();
             return 0;
         }
 
-        fseek( fid, gi->grid_offset, SEEK_SET );
+        pj_ctx_fseek( ctx, fid, gi->grid_offset, SEEK_SET );
 
-        gi->ct->cvs = (FLP *) pj_malloc(words*sizeof(float));
-        if( gi->ct->cvs == NULL )
+        ct_tmp.cvs = (FLP *) pj_malloc(words*sizeof(float));
+        if( ct_tmp.cvs == NULL )
         {
             pj_ctx_set_errno( ctx, -38 );
+            pj_release_lock();
             return 0;
         }
-        
-        if( fread( gi->ct->cvs, sizeof(float), words, fid ) != words )
+
+        if( pj_ctx_fread( ctx, ct_tmp.cvs, sizeof(float), words, fid )
+            != words )
         {
-            pj_dalloc( gi->ct->cvs );
-            gi->ct->cvs = NULL;
+            pj_dalloc( ct_tmp.cvs );
+            pj_release_lock();
             return 0;
         }
 
         if( IS_LSB )
-            swap_words( (unsigned char *) gi->ct->cvs, 4, words );
+            swap_words( (unsigned char *) ct_tmp.cvs, 4, words );
 
-        fclose( fid );
+        pj_ctx_fclose( ctx, fid );
+        gi->ct->cvs = ct_tmp.cvs;
+        pj_release_lock();
         return 1;
     }
 
     else
     {
+        pj_release_lock();
         return 0;
     }
 }
@@ -359,11 +396,32 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
 /************************************************************************/
 /*                       pj_gridinfo_init_ntv2()                        */
 /*                                                                      */
-/*      Load a ntv2 (.gsb) file.                                        */
+/*      Seek a parent grid file by name from a grid list                */
 /************************************************************************/
 
-static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
+static PJ_GRIDINFO* pj_gridinfo_parent( PJ_GRIDINFO *gilist, 
+        const char *name, int length )
+{
+    while( gilist )
+    {
+        if( strncmp(gilist->ct->id,name,length) == 0 ) return gilist;
+        if( gilist->child )
+        {
+            PJ_GRIDINFO *parent=pj_gridinfo_parent( gilist->child, name, length );
+            if( parent ) return parent;
+        }
+        gilist=gilist->next;
+    }
+    return gilist;
+}
+
+/************************************************************************/
+/*                       pj_gridinfo_init_ntv2()                        */
+/*                                                                      */
+/*      Load a ntv2 (.gsb) file.                                        */
+/************************************************************************/
 
+static int pj_gridinfo_init_ntv2( projCtx ctx, PAFile fid, PJ_GRIDINFO *gilist )
 {
     unsigned char header[11*16];
     int num_subfiles, subfile;
@@ -381,7 +439,7 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
 /* -------------------------------------------------------------------- */
 /*      Read the overview header.                                       */
 /* -------------------------------------------------------------------- */
-    if( fread( header, sizeof(header), 1, fid ) != 1 )
+    if( pj_ctx_fread( ctx, header, sizeof(header), 1, fid ) != 1 )
     {
         pj_ctx_set_errno( ctx, -38 );
         return 0;
@@ -419,7 +477,7 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
 /* -------------------------------------------------------------------- */
 /*      Read header.                                                    */
 /* -------------------------------------------------------------------- */
-        if( fread( header, sizeof(header), 1, fid ) != 1 )
+        if( pj_ctx_fread( ctx, header, sizeof(header), 1, fid ) != 1 )
         {
             pj_ctx_set_errno( ctx, -38 );
             return 0;
@@ -430,7 +488,7 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
             pj_ctx_set_errno( ctx, -38 );
             return 0;
         }
-        
+
 /* -------------------------------------------------------------------- */
 /*      Byte swap interesting fields if needed.                         */
 /* -------------------------------------------------------------------- */
@@ -444,7 +502,7 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
             swap_words( header+8+16*9, 8, 1 );
             swap_words( header+8+16*10, 4, 1 );
         }
-        
+
 /* -------------------------------------------------------------------- */
 /*      Initialize a corresponding "ct" structure.                      */
 /* -------------------------------------------------------------------- */
@@ -466,11 +524,11 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
 
         pj_log( ctx, PJ_LOG_DEBUG_MINOR,
                 "NTv2 %s %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)\n",
-                ct->id, 
+                ct->id,
                 ct->lim.lam, ct->lim.phi,
                 ct->ll.lam/3600.0, ct->ll.phi/3600.0,
                 ur.lam/3600.0, ur.phi/3600.0 );
-        
+
         ct->ll.lam *= DEG_TO_RAD/3600.0;
         ct->ll.phi *= DEG_TO_RAD/3600.0;
         ct->del.lam *= DEG_TO_RAD/3600.0;
@@ -481,7 +539,7 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
         {
             pj_log( ctx, PJ_LOG_ERROR,
                     "GS_COUNT(%d) does not match expected cells (%dx%d=%d)\n",
-                    gs_count, ct->lim.lam, ct->lim.phi, 
+                    gs_count, ct->lim.lam, ct->lim.phi,
                     ct->lim.lam * ct->lim.phi );
             pj_ctx_set_errno( ctx, -38 );
             return 0;
@@ -499,7 +557,7 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
         {
             gi = (PJ_GRIDINFO *) pj_malloc(sizeof(PJ_GRIDINFO));
             memset( gi, 0, sizeof(PJ_GRIDINFO) );
-    
+
             gi->gridname = strdup( gilist->gridname );
             gi->filename = strdup( gilist->filename );
             gi->next = NULL;
@@ -507,7 +565,7 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
 
         gi->ct = ct;
         gi->format = "ntv2";
-        gi->grid_offset = ftell( fid );
+        gi->grid_offset = pj_ctx_ftell( ctx, fid );
 
 /* -------------------------------------------------------------------- */
 /*      Attach to the correct list or sublist.                          */
@@ -526,37 +584,37 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
         else
         {
             PJ_GRIDINFO *lnk;
-            PJ_GRIDINFO *gp = gilist;
-            
-            while( gp != NULL 
-                   && strncmp(gp->ct->id,(const char*)header+24,8) != 0 )
-                gp = gp->next;
+            PJ_GRIDINFO *gp = pj_gridinfo_parent(gilist,
+                                                 (const char*)header+24,8);
 
             if( gp == NULL )
             {
                 pj_log( ctx, PJ_LOG_ERROR,
                         "pj_gridinfo_init_ntv2(): "
-                        "failed to find parent %8.8s for %s.\n", 
+                        "failed to find parent %8.8s for %s.\n",
                         (const char *) header+24, gi->ct->id );
 
-                for( lnk = gp; lnk->next != NULL; lnk = lnk->next ) {}
+                for( lnk = gilist; lnk->next != NULL; lnk = lnk->next ) {}
                 lnk->next = gi;
             }
-            else if( gp->child == NULL )
-            {
-                gp->child = gi;
-            }
             else
             {
-                for( lnk = gp->child; lnk->next != NULL; lnk = lnk->next ) {}
-                lnk->next = gi;
+                if( gp->child == NULL )
+                {
+                    gp->child = gi;
+                }
+                else
+                {
+                    for( lnk = gp->child; lnk->next != NULL; lnk = lnk->next ) {}
+                    lnk->next = gi;
+                }
             }
         }
 
 /* -------------------------------------------------------------------- */
 /*      Seek past the data.                                             */
 /* -------------------------------------------------------------------- */
-        fseek( fid, gs_count * 16, SEEK_CUR );
+        pj_ctx_fseek( ctx, fid, gs_count * 16, SEEK_CUR );
     }
 
     return 1;
@@ -568,13 +626,13 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, FILE *fid, PJ_GRIDINFO *gilist )
 /*      Load an NTv1 style Canadian grid shift file.                    */
 /************************************************************************/
 
-static int pj_gridinfo_init_ntv1( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
+static int pj_gridinfo_init_ntv1( projCtx ctx, PAFile fid, PJ_GRIDINFO *gi )
 
 {
     unsigned char header[176];
     struct CTABLE *ct;
     LP		ur;
-    
+
     assert( sizeof(int) == 4 );
     assert( sizeof(double) == 8 );
     if( sizeof(int) != 4 || sizeof(double) != 8 )
@@ -588,7 +646,7 @@ static int pj_gridinfo_init_ntv1( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
 /* -------------------------------------------------------------------- */
 /*      Read the header.                                                */
 /* -------------------------------------------------------------------- */
-    if( fread( header, sizeof(header), 1, fid ) != 1 )
+    if( pj_ctx_fread( ctx, header, sizeof(header), 1, fid ) != 1 )
     {
         pj_ctx_set_errno( ctx, -38 );
         return 0;
@@ -610,7 +668,7 @@ static int pj_gridinfo_init_ntv1( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
 
     if( *((int *) (header+8)) != 12 )
     {
-        pj_log( ctx, PJ_LOG_ERROR, 
+        pj_log( ctx, PJ_LOG_ERROR,
                 "NTv1 grid shift file has wrong record count, corrupt?" );
         pj_ctx_set_errno( ctx, -38 );
         return 0;
@@ -643,7 +701,7 @@ static int pj_gridinfo_init_ntv1( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
     ct->cvs = NULL;
 
     gi->ct = ct;
-    gi->grid_offset = ftell( fid );
+    gi->grid_offset = pj_ctx_ftell( ctx, fid );
     gi->format = "ntv1";
 
     return 1;
@@ -655,7 +713,7 @@ static int pj_gridinfo_init_ntv1( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
 /*      Load a NOAA .gtx vertical datum shift file.                     */
 /************************************************************************/
 
-static int pj_gridinfo_init_gtx( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
+static int pj_gridinfo_init_gtx( projCtx ctx, PAFile fid, PJ_GRIDINFO *gi )
 
 {
     unsigned char header[40];
@@ -676,7 +734,7 @@ static int pj_gridinfo_init_gtx( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
 /* -------------------------------------------------------------------- */
 /*      Read the header.                                                */
 /* -------------------------------------------------------------------- */
-    if( fread( header, sizeof(header), 1, fid ) != 1 )
+    if( pj_ctx_fread( ctx, header, sizeof(header), 1, fid ) != 1 )
     {
         pj_ctx_set_errno( ctx, -38 );
         return 0;
@@ -699,10 +757,10 @@ static int pj_gridinfo_init_gtx( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
     memcpy( &rows, header+32, 4 );
     memcpy( &columns, header+36, 4 );
 
-    if( xorigin < -360 || xorigin > 360 
+    if( xorigin < -360 || xorigin > 360
         || yorigin < -90 || yorigin > 90 )
     {
-        pj_log( ctx, PJ_LOG_ERROR, 
+        pj_log( ctx, PJ_LOG_ERROR,
                 "gtx file header has invalid extents, corrupt?");
         pj_ctx_set_errno( ctx, -38 );
         return 0;
@@ -722,7 +780,7 @@ static int pj_gridinfo_init_gtx( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
     ct->lim.phi = rows;
 
     /* some GTX files come in 0-360 and we shift them back into the
-       expected -180 to 180 range if possible.  This does not solve 
+       expected -180 to 180 range if possible.  This does not solve
        problems with grids spanning the dateline. */
     if( ct->ll.lam >= 180.0 )
         ct->ll.lam -= 360.0;
@@ -736,9 +794,9 @@ static int pj_gridinfo_init_gtx( projCtx ctx, FILE * fid, PJ_GRIDINFO *gi )
     pj_log( ctx, PJ_LOG_DEBUG_MINOR,
             "GTX %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)",
             ct->lim.lam, ct->lim.phi,
-            ct->ll.lam, ct->ll.phi, 
+            ct->ll.lam, ct->ll.phi,
             ct->ll.lam + (columns-1)*xstep, ct->ll.phi + (rows-1)*ystep);
-    
+
     ct->ll.lam *= DEG_TO_RAD;
     ct->ll.phi *= DEG_TO_RAD;
     ct->del.lam *= DEG_TO_RAD;
@@ -766,7 +824,7 @@ PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname )
 {
     char 	fname[MAX_PATH_FILENAME+1];
     PJ_GRIDINFO *gilist;
-    FILE 	*fp;
+    PAFile 	fp;
     char	header[160];
 
     errno = pj_errno = 0;
@@ -778,7 +836,7 @@ PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname )
 /* -------------------------------------------------------------------- */
     gilist = (PJ_GRIDINFO *) pj_malloc(sizeof(PJ_GRIDINFO));
     memset( gilist, 0, sizeof(PJ_GRIDINFO) );
-    
+
     gilist->gridname = strdup( gridname );
     gilist->filename = NULL;
     gilist->format = "missing";
@@ -796,37 +854,37 @@ PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname )
     }
 
     gilist->filename = strdup(fname);
-    
+
 /* -------------------------------------------------------------------- */
 /*      Load a header, to determine the file type.                      */
 /* -------------------------------------------------------------------- */
-    if( fread( header, sizeof(header), 1, fp ) != 1 )
+    if( pj_ctx_fread( ctx, header, sizeof(header), 1, fp ) != 1 )
     {
-        fclose( fp );
+        pj_ctx_fclose( ctx, fp );
         pj_ctx_set_errno( ctx, -38 );
         return gilist;
     }
 
-    fseek( fp, SEEK_SET, 0 );
+    pj_ctx_fseek( ctx, fp, SEEK_SET, 0 );
 
 /* -------------------------------------------------------------------- */
 /*      Determine file type.                                            */
 /* -------------------------------------------------------------------- */
-    if( strncmp(header + 0, "HEADER", 6) == 0 
-        && strncmp(header + 96, "W GRID", 6) == 0 
+    if( strncmp(header + 0, "HEADER", 6) == 0
+        && strncmp(header + 96, "W GRID", 6) == 0
         && strncmp(header + 144, "TO      NAD83   ", 16) == 0 )
     {
         pj_gridinfo_init_ntv1( ctx, fp, gilist );
     }
-    
-    else if( strncmp(header + 0, "NUM_OREC", 8) == 0 
+
+    else if( strncmp(header + 0, "NUM_OREC", 8) == 0
              && strncmp(header + 48, "GS_TYPE", 7) == 0 )
     {
         pj_gridinfo_init_ntv2( ctx, fp, gilist );
     }
 
-    else if( strlen(gridname) > 4 
-             && (strcmp(gridname+strlen(gridname)-3,"gtx") == 0 
+    else if( strlen(gridname) > 4
+             && (strcmp(gridname+strlen(gridname)-3,"gtx") == 0
                  || strcmp(gridname+strlen(gridname)-3,"GTX") == 0) )
     {
         pj_gridinfo_init_gtx( ctx, fp, gilist );
@@ -839,32 +897,38 @@ PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname )
         gilist->format = "ctable2";
         gilist->ct = ct;
 
-        pj_log( ctx, PJ_LOG_DEBUG_MAJOR, 
+        pj_log( ctx, PJ_LOG_DEBUG_MAJOR,
                 "Ctable2 %s %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)\n",
-                ct->id, 
+                ct->id,
                 ct->lim.lam, ct->lim.phi,
                 ct->ll.lam * RAD_TO_DEG, ct->ll.phi * RAD_TO_DEG,
-                (ct->ll.lam + (ct->lim.lam-1)*ct->del.lam) * RAD_TO_DEG, 
+                (ct->ll.lam + (ct->lim.lam-1)*ct->del.lam) * RAD_TO_DEG,
                 (ct->ll.phi + (ct->lim.phi-1)*ct->del.phi) * RAD_TO_DEG );
     }
 
     else
     {
         struct CTABLE *ct = nad_ctable_init( ctx, fp );
-
-        gilist->format = "ctable";
-        gilist->ct = ct;
-
-        pj_log( ctx, PJ_LOG_DEBUG_MAJOR, 
-                "Ctable %s %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)\n",
-                ct->id, 
-                ct->lim.lam, ct->lim.phi,
-                ct->ll.lam * RAD_TO_DEG, ct->ll.phi * RAD_TO_DEG,
-                (ct->ll.lam + (ct->lim.lam-1)*ct->del.lam) * RAD_TO_DEG, 
-                (ct->ll.phi + (ct->lim.phi-1)*ct->del.phi) * RAD_TO_DEG );
+        if (ct == NULL)
+        {
+            pj_log( ctx, PJ_LOG_DEBUG_MAJOR,
+                    "CTABLE ct is NULL.");
+        } else
+        {
+            gilist->format = "ctable";
+            gilist->ct = ct;
+
+            pj_log( ctx, PJ_LOG_DEBUG_MAJOR,
+                    "Ctable %s %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)\n",
+                    ct->id,
+                    ct->lim.lam, ct->lim.phi,
+                    ct->ll.lam * RAD_TO_DEG, ct->ll.phi * RAD_TO_DEG,
+                    (ct->ll.lam + (ct->lim.lam-1)*ct->del.lam) * RAD_TO_DEG,
+                    (ct->ll.phi + (ct->lim.phi-1)*ct->del.phi) * RAD_TO_DEG );
+        }
     }
 
-    fclose(fp);
+    pj_ctx_fclose(ctx, fp);
 
     return gilist;
 }
diff --git a/src/pj_init.c b/src/pj_init.c
index a129061..c238af3 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: pj_init.c 2305 2012-12-18 00:31:55Z warmerdam $
+ * $Id: pj_init.c 2482 2014-08-18 22:43:04Z hobu $
  *
  * Project:  PROJ.4
  * Purpose:  Initialize projection object from string definition.  Includes
@@ -35,48 +35,186 @@
 #include <string.h>
 #include <errno.h>
 #include <locale.h>
+#include <ctype.h>
 
-PJ_CVSID("$Id: pj_init.c 2305 2012-12-18 00:31:55Z warmerdam $");
+PJ_CVSID("$Id: pj_init.c 2482 2014-08-18 22:43:04Z hobu $");
+
+typedef struct {
+    projCtx ctx;
+    PAFile fid;
+    char buffer[8193];
+    int buffer_filled;
+    int at_eof;
+} pj_read_state;
+
+/************************************************************************/
+/*                            fill_buffer()                             */
+/************************************************************************/
+
+static const char *fill_buffer(pj_read_state *state, const char *last_char)
+{
+    size_t bytes_read;
+    int char_remaining, char_requested;
+
+/* -------------------------------------------------------------------- */
+/*      Don't bother trying to read more if we are at eof, or if the    */
+/*      buffer is still over half full.                                 */
+/* -------------------------------------------------------------------- */
+    if (last_char == NULL)
+        last_char = state->buffer;
+
+    if (state->at_eof)
+        return last_char;
+
+    char_remaining = state->buffer_filled - (last_char - state->buffer);
+    if (char_remaining >= sizeof(state->buffer) / 2)
+        return last_char;
+
+/* -------------------------------------------------------------------- */
+/*      Move the existing data to the start of the buffer.              */
+/* -------------------------------------------------------------------- */
+    memmove(state->buffer, last_char, char_remaining);
+    state->buffer_filled = char_remaining;
+    last_char = state->buffer;
+
+/* -------------------------------------------------------------------- */
+/*      Refill.                                                         */
+/* -------------------------------------------------------------------- */
+    char_requested = sizeof(state->buffer) - state->buffer_filled - 1;
+    bytes_read = pj_ctx_fread( state->ctx, state->buffer + state->buffer_filled,
+                               1, char_requested, state->fid );
+    if (bytes_read < char_requested)
+    {
+        state->at_eof = 1;
+        state->buffer[state->buffer_filled + bytes_read] = '\0';
+    }
+
+    state->buffer_filled += bytes_read;
+    return last_char;
+}
 
 /************************************************************************/
 /*                              get_opt()                               */
 /************************************************************************/
 static paralist *
-get_opt(projCtx ctx, paralist **start, FILE *fid, char *name, paralist *next) {
-    char sword[302], *word = sword+1;
-    int first = 1, len, c;
+get_opt(projCtx ctx, paralist **start, PAFile fid, char *name, paralist *next,
+        int *found_def) {
+    pj_read_state *state = (pj_read_state*) calloc(1,sizeof(pj_read_state));
+    char sword[302];
+    int len;
+    int in_target = 0;
+    const char *next_char = NULL;
+
+    state->fid = fid;
+    state->ctx = ctx;
+    next_char = fill_buffer(state, NULL);
+    if(found_def)
+        *found_def = 0;
 
     len = strlen(name);
     *sword = 't';
-    while (fscanf(fid, "%300s", word) == 1) {
-        if (*word == '#') /* skip comments */
-            while((c = fgetc(fid)) != EOF && c != '\n') ;
-        else if (*word == '<') { /* control name */
-            if (first && !strncmp(name, word + 1, len)
-                && word[len + 1] == '>')
-                first = 0;
-            else if (!first && *word == '<') {
-                while((c = fgetc(fid)) != EOF && c != '\n') ;
+
+    /* loop till we find our target keyword */
+    while (*next_char) 
+    {
+        next_char = fill_buffer(state, next_char);
+
+        /* Skip white space. */
+        while( isspace(*next_char) )
+            next_char++;
+
+        next_char = fill_buffer(state, next_char);
+        
+        /* for comments, skip past end of line. */
+        if( *next_char == '#' ) 
+        {
+            while( *next_char && *next_char != '\n' )
+                next_char++;
+
+            next_char = fill_buffer(state, next_char);
+            if (*next_char == '\n')
+                next_char++;
+            if (*next_char == '\r')
+                next_char++;
+            
+        } 
+
+        /* Is this our target? */
+        else if( *next_char == '<' ) 
+        {
+            /* terminate processing target on the next block definition */
+            if (in_target)
                 break;
+
+            next_char++;
+            if (strncmp(name, next_char, len) == 0
+                && next_char[len] == '>') 
+            {
+                /* skip past target word */
+                next_char += len + 1;
+                in_target = 1;
+                if(found_def)
+                    *found_def = 1;
             }
-        } else if (!first && !pj_param(ctx, *start, sword).i) {
-            /* don't default ellipse if datum, ellps or any earth model
-               information is set. */
-            if( strncmp(word,"ellps=",6) != 0 
-                || (!pj_param(ctx, *start, "tdatum").i 
-                    && !pj_param(ctx, *start, "tellps").i 
-                    && !pj_param(ctx, *start, "ta").i 
-                    && !pj_param(ctx, *start, "tb").i 
-                    && !pj_param(ctx, *start, "trf").i 
-                    && !pj_param(ctx, *start, "tf").i) )
+            else 
             {
-                next = next->next = pj_mkparam(word);
+                /* skip past end of line */
+                while( *next_char && *next_char != '\n' )
+                    next_char++;
             }
         }
-    }
+        else if (in_target) 
+        {
+            const char *start_of_word = next_char;
+            int word_len = 0;
+
+            if (*start_of_word == '+')
+            {
+                start_of_word++;
+                next_char++;
+            }
+
+            /* capture parameter */
+            while( *next_char && !isspace(*next_char) )
+            {
+                next_char++;
+                word_len++;
+            }
+
+            strncpy(sword+1, start_of_word, word_len);
+            sword[word_len+1] = '\0';
+
+            /* do not override existing parameter value of same name */
+            if (!pj_param(ctx, *start, sword).i) {
+                /* don't default ellipse if datum, ellps or any earth model
+                   information is set. */
+                if( strncmp(sword+1,"ellps=",6) != 0 
+                    || (!pj_param(ctx, *start, "tdatum").i 
+                        && !pj_param(ctx, *start, "tellps").i 
+                        && !pj_param(ctx, *start, "ta").i 
+                        && !pj_param(ctx, *start, "tb").i 
+                        && !pj_param(ctx, *start, "trf").i 
+                        && !pj_param(ctx, *start, "tf").i) )
+                {
+                    next = next->next = pj_mkparam(sword+1);
+                }
+            }
+            
+        }
+        else 
+        {
+            /* skip past word */
+            while( *next_char && !isspace(*next_char) )
+                next_char++;
+            
+        }
+    }        
 
     if (errno == 25)
         errno = 0;
+
+    free(state);
+
     return next;
 }
 
@@ -85,13 +223,13 @@ get_opt(projCtx ctx, paralist **start, FILE *fid, char *name, paralist *next) {
 /************************************************************************/
 static paralist *
 get_defaults(projCtx ctx, paralist **start, paralist *next, char *name) {
-    FILE *fid;
+    PAFile fid;
 
     if ( (fid = pj_open_lib(ctx,"proj_def.dat", "rt")) != NULL) {
-        next = get_opt(ctx, start, fid, "general", next);
-        rewind(fid);
-        next = get_opt(ctx, start, fid, name, next);
-        (void)fclose(fid);
+        next = get_opt(ctx, start, fid, "general", next, NULL);
+        pj_ctx_fseek(ctx, fid, 0, SEEK_SET);
+        next = get_opt(ctx, start, fid, name, next, NULL);
+        pj_ctx_fclose(ctx, fid);
     }
     if (errno)
         errno = 0; /* don't care if can't open file */
@@ -104,9 +242,10 @@ get_defaults(projCtx ctx, paralist **start, paralist *next, char *name) {
 /*                              get_init()                              */
 /************************************************************************/
 static paralist *
-get_init(projCtx ctx, paralist **start, paralist *next, char *name) {
+get_init(projCtx ctx, paralist **start, paralist *next, char *name,
+         int *found_def) {
     char fname[MAX_PATH_FILENAME+ID_TAG_MAX+3], *opt;
-    FILE *fid;
+    PAFile fid;
     paralist *init_items = NULL;
     const paralist *orig_next = next;
 
@@ -122,6 +261,7 @@ get_init(projCtx ctx, paralist **start, paralist *next, char *name) {
         next->next = init_items;
         while( next->next != NULL )
             next = next->next;
+        *found_def = 1;
         return next;
     }
 
@@ -133,10 +273,10 @@ get_init(projCtx ctx, paralist **start, paralist *next, char *name) {
     else { pj_ctx_set_errno(ctx,-3); return NULL; }
 
     if ( (fid = pj_open_lib(ctx,fname, "rt")) != NULL)
-        next = get_opt(ctx, start, fid, opt, next);
+        next = get_opt(ctx, start, fid, opt, next, found_def);
     else
         return NULL;
-    (void)fclose(fid);
+    pj_ctx_fclose(ctx, fid);
     if (errno == 25)
         errno = 0; /* unknown problem with some sys errno<-25 */
 
@@ -257,6 +397,11 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
     ctx->last_errno = 0;
     start = NULL;
 
+    /*
+    ** MS Visual Studio 2012+ may have problems in multithreaded cases
+    ** as discussed in this ticket:
+    ** http://trac.osgeo.org/proj/ticket/226
+    */
     old_locale = setlocale(LC_NUMERIC, NULL);
     if (old_locale != NULL) {
        if (strcmp(old_locale,"C") != 0) {
@@ -278,10 +423,13 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
     /* check if +init present */
     if (pj_param(ctx, start, "tinit").i) {
         paralist *last = curr;
+        int found_def = 0;
 
-        if (!(curr = get_init(ctx,&start, curr, pj_param(ctx, start, "sinit").s)))
+        if (!(curr = get_init(ctx,&start, curr,
+                              pj_param(ctx, start, "sinit").s,
+                              &found_def)))
             goto bum_call;
-        if (curr == last) { pj_ctx_set_errno( ctx, -2); goto bum_call; }
+        if (!found_def) { pj_ctx_set_errno( ctx, -2); goto bum_call; }
     }
 
     /* find projection selection */
diff --git a/src/pj_list.h b/src/pj_list.h
index 8230f92..194bcc6 100644
--- a/src/pj_list.h
+++ b/src/pj_list.h
@@ -16,6 +16,7 @@ PROJ_HEAD(bacon, "Bacon Globular")
 PROJ_HEAD(bipc, "Bipolar conic of western hemisphere")
 PROJ_HEAD(boggs, "Boggs Eumorphic")
 PROJ_HEAD(bonne, "Bonne (Werner lat_1=90)")
+PROJ_HEAD(calcofi, "Cal Coop Ocean Fish Invest Lines/Stations")
 PROJ_HEAD(cass, "Cassini")
 PROJ_HEAD(cc, "Central Cylindrical")
 PROJ_HEAD(cea, "Equal Area Cylindrical")
@@ -106,6 +107,7 @@ PROJ_HEAD(putp5p, "Putnins P5'")
 PROJ_HEAD(putp6, "Putnins P6")
 PROJ_HEAD(putp6p, "Putnins P6'")
 PROJ_HEAD(qua_aut, "Quartic Authalic")
+PROJ_HEAD(qsc, "Quadrilateralized Spherical Cube")
 PROJ_HEAD(robin, "Robinson")
 PROJ_HEAD(rouss, "Roussilhe Stereographic")
 PROJ_HEAD(rpoly, "Rectangular Polyconic")
diff --git a/src/pj_mutex.c b/src/pj_mutex.c
index 39cedbc..ee5a655 100644
--- a/src/pj_mutex.c
+++ b/src/pj_mutex.c
@@ -47,8 +47,6 @@ PJ_CVSID("$Id: pj_transform.c 1504 2009-01-06 02:11:57Z warmerdam $");
 #  define MUTEX_stub
 #endif
 
-static void pj_init_lock();
-
 /************************************************************************/
 /* ==================================================================== */
 /*                      stub mutex implementation                       */
@@ -96,7 +94,9 @@ void pj_cleanup_lock()
 
 #include "pthread.h"
 
-static pthread_mutex_t pj_core_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t pj_precreated_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t pj_core_lock;
+static int pj_core_lock_created = 0;
 
 /************************************************************************/
 /*                          pj_acquire_lock()                           */
@@ -106,6 +106,29 @@ static pthread_mutex_t pj_core_lock = PTHREAD_MUTEX_INITIALIZER;
 
 void pj_acquire_lock()
 {
+    if (!pj_core_lock_created) {
+        /*
+        ** We need to ensure the core mutex is created in recursive mode
+        ** and there is no portable way of doing that using automatic
+        ** initialization so we have pj_precreated_lock only for the purpose
+        ** of protecting the creation of the core lock.
+        */
+        pthread_mutexattr_t mutex_attr;
+
+        pthread_mutex_lock( &pj_precreated_lock);
+
+        pthread_mutexattr_init(&mutex_attr);
+#ifndef PTHREAD_MUTEX_RECURSIVE
+        pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE_NP);
+#else
+        pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE);
+#endif
+        pthread_mutex_init(&pj_core_lock, &mutex_attr);
+        pj_core_lock_created = 1;
+
+        pthread_mutex_unlock( &pj_precreated_lock );
+    }
+
     pthread_mutex_lock( &pj_core_lock);
 }
 
@@ -142,6 +165,17 @@ void pj_cleanup_lock()
 static HANDLE mutex_lock = NULL;
 
 /************************************************************************/
+/*                            pj_init_lock()                            */
+/************************************************************************/
+
+static void pj_init_lock()
+
+{
+    if( mutex_lock == NULL )
+        mutex_lock = CreateMutex( NULL, FALSE, NULL );
+}
+
+/************************************************************************/
 /*                          pj_acquire_lock()                           */
 /*                                                                      */
 /*      Acquire the PROJ.4 lock.                                        */
@@ -181,16 +215,4 @@ void pj_cleanup_lock()
     }
 }
 
-/************************************************************************/
-/*                            pj_init_lock()                            */
-/************************************************************************/
-
-static void pj_init_lock()
-
-{
-    if( mutex_lock == NULL )
-        mutex_lock = CreateMutex( NULL, FALSE, NULL );
-}
-
 #endif // def MUTEX_win32
-
diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c
index 23e1427..db4dcab 100644
--- a/src/pj_open_lib.c
+++ b/src/pj_open_lib.c
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: pj_open_lib.c 2130 2011-12-15 01:20:23Z warmerdam $
+ * $Id: pj_open_lib.c 2372 2013-06-26 21:44:00Z warmerdam $
  *
  * Project:  PROJ.4
  * Purpose:  Implementation of pj_open_lib(), and pj_set_finder().  These
@@ -36,7 +36,7 @@
 #include <string.h>
 #include <errno.h>
 
-PJ_CVSID("$Id: pj_open_lib.c 2130 2011-12-15 01:20:23Z warmerdam $");
+PJ_CVSID("$Id: pj_open_lib.c 2372 2013-06-26 21:44:00Z warmerdam $");
 
 static const char *(*pj_finder)(const char *) = NULL;
 static int path_count = 0;
@@ -98,11 +98,11 @@ void pj_set_searchpath ( int count, const char **path )
 /*                            pj_open_lib()                             */
 /************************************************************************/
 
-FILE *
-pj_open_lib(projCtx ctx, char *name, char *mode) {
+PAFile
+pj_open_lib(projCtx ctx, const char *name, const char *mode) {
     char fname[MAX_PATH_FILENAME+1];
     const char *sysname;
-    FILE *fid;
+    PAFile fid;
     int n = 0;
     int i;
 #ifdef WIN32
@@ -145,7 +145,7 @@ pj_open_lib(projCtx ctx, char *name, char *mode) {
     } else /* just try it bare bones */
         sysname = name;
 
-    if ((fid = fopen(sysname, mode)) != NULL)
+    if ((fid = pj_ctx_fopen(ctx, sysname, mode)) != NULL)
         errno = 0;
 
     /* If none of those work and we have a search path, try it */
@@ -155,7 +155,7 @@ pj_open_lib(projCtx ctx, char *name, char *mode) {
         {
             sprintf(fname, "%s%c%s", search_path[i], DIR_CHAR, name);
             sysname = fname;
-            fid = fopen (sysname, mode);
+            fid = pj_ctx_fopen(ctx, sysname, mode);
         }
         if (fid)
             errno = 0;
diff --git a/src/pj_release.c b/src/pj_release.c
index 1b6e54a..c1d4f69 100644
--- a/src/pj_release.c
+++ b/src/pj_release.c
@@ -2,7 +2,7 @@
 
 #include <projects.h>
 
-char const pj_release[]="Rel. 4.8.0, 6 March 2012";
+char const pj_release[]="Rel. 4.9.0, 13 September 2014";
 
 const char *pj_get_release()
 
diff --git a/src/proj.def b/src/proj.def
new file mode 100644
index 0000000..f4d60ca
--- /dev/null
+++ b/src/proj.def
@@ -0,0 +1,56 @@
+VERSION   1.2
+EXPORTS
+	pj_init		@1
+	pj_fwd		@2
+	pj_inv		@3
+	pj_free		@4
+	pj_transform	@5
+        pj_geocentric_to_geodetic @6
+        pj_geodetic_to_geocentric @7
+        pj_deallocate_grids       @8
+        pj_init_plus              @9
+        pj_latlong_from_proj      @10
+        pj_is_latlong             @11
+	pj_get_errno_ref	  @12
+	pj_set_finder             @13
+	pj_strerrno		  @14
+	pj_errno                  @15
+	pj_get_def		  @16
+	pj_dalloc                 @17
+        pj_is_geocent             @18
+        pj_get_release            @19
+	pj_malloc		  @20
+	pj_pr_list		  @21
+	pj_compare_datums	  @22
+	pj_apply_gridshift	  @23
+	pj_datum_transform        @24
+	pj_set_searchpath         @25
+	dmstor			  @26
+	pj_get_ellps_ref          @27
+	pj_get_datums_ref         @28
+	pj_get_units_ref          @29
+	pj_get_list_ref           @30
+	pj_get_prime_meridians_ref @31
+	rtodms                    @32
+	set_rtodms                @33
+	pj_factors                @34
+        mk_cheby                  @35
+	adjlon                    @36
+	pj_param		  @37
+	pj_ell_set		  @38
+	pj_mkparam		  @39
+	pj_init_ctx		  @40
+	pj_init_plus_ctx	  @41
+	pj_get_default_ctx        @42
+	pj_get_ctx                @43
+	pj_set_ctx                @44
+	pj_ctx_alloc		  @45
+	pj_ctx_free		  @46
+	pj_ctx_get_errno	  @47
+	pj_ctx_set_errno          @48
+	pj_ctx_set_debug          @49
+	pj_ctx_set_logger         @50
+	pj_ctx_set_app_data       @51
+	pj_ctx_get_app_data       @52
+	pj_log 			  @53
+	pj_clear_initcache @54
diff --git a/src/proj_api.h b/src/proj_api.h
index 8367776..b892113 100644
--- a/src/proj_api.h
+++ b/src/proj_api.h
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: proj_api.h 2160 2012-02-15 23:51:45Z warmerdam $
+ * $Id: proj_api.h 2372 2013-06-26 21:44:00Z warmerdam $
  *
  * Project:  PROJ.4
  * Purpose:  Public (application) include file for PROJ.4 API, and constants.
@@ -40,7 +40,7 @@ extern "C" {
 #endif
 
 /* Try to update this every version! */
-#define PJ_VERSION 480
+#define PJ_VERSION 490
 
 extern char const pj_release[]; /* global release id string */
 
@@ -63,6 +63,16 @@ extern int pj_errno;	/* global error return code */
 #   define projLP       LP
 #endif
 
+/* file reading api, like stdio */
+typedef int *PAFile;
+typedef struct projFileAPI_t {
+    PAFile  (*FOpen)(projCtx ctx, const char *filename, const char *access);
+    size_t  (*FRead)(void *buffer, size_t size, size_t nmemb, PAFile file);
+    int     (*FSeek)(PAFile file, long offset, int whence);
+    long    (*FTell)(PAFile file);
+    void    (*FClose)(PAFile);
+} projFileAPI;
+
 /* procedure prototypes */
 
 projXY pj_fwd(projLP, projPJ);
@@ -117,10 +127,24 @@ void pj_ctx_set_debug( projCtx, int );
 void pj_ctx_set_logger( projCtx, void (*)(void *, int, const char *) );
 void pj_ctx_set_app_data( projCtx, void * );
 void *pj_ctx_get_app_data( projCtx );
+void pj_ctx_set_fileapi( projCtx, projFileAPI *);
+projFileAPI *pj_ctx_get_fileapi( projCtx );
 
 void pj_log( projCtx ctx, int level, const char *fmt, ... );
 void pj_stderr_logger( void *, int, const char * );
 
+/* file api */
+projFileAPI *pj_get_default_fileapi();
+
+PAFile pj_ctx_fopen(projCtx ctx, const char *filename, const char *access);
+size_t pj_ctx_fread(projCtx ctx, void *buffer, size_t size, size_t nmemb, PAFile file);
+int    pj_ctx_fseek(projCtx ctx, PAFile file, long offset, int whence);
+long   pj_ctx_ftell(projCtx ctx, PAFile file);
+void   pj_ctx_fclose(projCtx ctx, PAFile file);
+char  *pj_ctx_fgets(projCtx ctx, char *line, int size, PAFile file);
+
+PAFile pj_open_lib(projCtx, const char *, const char *);
+
 #define PJ_LOG_NONE        0
 #define PJ_LOG_ERROR       1
 #define PJ_LOG_DEBUG_MAJOR 2
diff --git a/src/proj_etmerc.c b/src/proj_etmerc.c
index 3a38960..1097eb3 100644
--- a/src/proj_etmerc.c
+++ b/src/proj_etmerc.c
@@ -37,14 +37,13 @@
  * Division, Kort og Matrikelstyrelsen (KMS), Copenhagen, Denmark
 */
 
-
 #define PROJ_PARMS__ \
-	double    Qn;    /* Merid. quad., scaled to the projection */ \
-	double    Zb;    /* Radius vector in polar coord. systems  */ \
-	double    cgb[5]; /* Constants for Gauss -> Geo lat */ \
-	double    cbg[5]; /* Constants for Geo lat -> Gauss */ \
-	double    utg[5]; /* Constants for transv. merc. -> geo */ \
-	double    gtu[5]; /* Constants for geo -> transv. merc. */
+    double    Qn;    /* Merid. quad., scaled to the projection */ \
+    double    Zb;    /* Radius vector in polar coord. systems  */ \
+    double    cgb[6]; /* Constants for Gauss -> Geo lat */ \
+    double    cbg[6]; /* Constants for Geo lat -> Gauss */ \
+    double    utg[6]; /* Constants for transv. merc. -> geo */ \
+    double    gtu[6]; /* Constants for geo -> transv. merc. */
 
 #define PROJ_LIB__
 #define PJ_LIB__
@@ -54,199 +53,237 @@
 PROJ_HEAD(etmerc, "Extended Transverse Mercator")
     "\n\tCyl, Sph\n\tlat_ts=(0)\nlat_0=(0)";
 
-#define FABS(x) ((x)<0?-(x):(x))
+#define PROJ_ETMERC_ORDER 6
+
+#ifdef _GNU_SOURCE
+    inline
+#endif
+    static double
+log1py(double x) {              /* Compute log(1+x) accurately */
+    volatile double
+      y = 1 + x,
+      z = y - 1;
+    /* Here's the explanation for this magic: y = 1 + z, exactly, and z
+     * approx x, thus log(y)/z (which is nearly constant near z = 0) returns
+     * a good approximation to the true log(1 + x)/x.  The multiplication x *
+     * (log(y)/z) introduces little additional error. */
+    return z == 0 ? x : x * log(y) / z;
+}
+
+#ifdef _GNU_SOURCE
+    inline
+#endif
+    static double
+asinhy(double x) {              /* Compute asinh(x) accurately */
+    double y = fabs(x);         /* Enforce odd parity */
+    y = log1py(y * (1 + y/(hypot(1.0, y) + 1)));
+    return x < 0 ? -y : y;
+}
 
 #ifdef _GNU_SOURCE
     inline
 #endif
-	static double
+    static double
 gatg(double *p1, int len_p1, double B) {
-	double *p;
-	double h = 0., h1, h2 = 0., cos_2B;
+    double *p;
+    double h = 0, h1, h2 = 0, cos_2B;
 
-	cos_2B = 2.*cos(2.0*B);
-   	for (p = p1 + len_p1, h1 = *--p; p - p1; h2 = h1, h1 = h)
-   		h = -h2 + cos_2B*h1 + *--p;
-   	return (B + h*sin(2.0*B));
+    cos_2B = 2*cos(2*B);
+    for (p = p1 + len_p1, h1 = *--p; p - p1; h2 = h1, h1 = h)
+        h = -h2 + cos_2B*h1 + *--p;
+    return (B + h*sin(2*B));
 }
 
 #ifdef _GNU_SOURCE
     inline
 #endif
-	static double
+    static double
 clenS(double *a, int size, double arg_r, double arg_i, double *R, double *I) {
-	double      *p, r, i, hr, hr1, hr2, hi, hi1, hi2;
-	double      sin_arg_r, cos_arg_r, sinh_arg_i, cosh_arg_i;
-	double      exp_arg_i, pxe_arg_i;
+    double      *p, r, i, hr, hr1, hr2, hi, hi1, hi2;
+    double      sin_arg_r, cos_arg_r, sinh_arg_i, cosh_arg_i;
 
-	/* arguments */
-	p = a + size;
+    /* arguments */
+    p = a + size;
 #ifdef _GNU_SOURCE
-	sincos(arg_r, &sin_arg_r, &cos_arg_r);
+    sincos(arg_r, &sin_arg_r, &cos_arg_r);
 #else
-	sin_arg_r  = sin(arg_r);
-	cos_arg_r  = cos(arg_r);
+    sin_arg_r  = sin(arg_r);
+    cos_arg_r  = cos(arg_r);
 #endif
-    exp_arg_i  = exp( arg_i);
-    pxe_arg_i  = exp(-arg_i);
-	sinh_arg_i = (exp_arg_i-pxe_arg_i)/2;
-	cosh_arg_i = (exp_arg_i+pxe_arg_i)/2;
-	r          =  2.0*cos_arg_r*cosh_arg_i;
-	i          = -2.0*sin_arg_r*sinh_arg_i;
-	/* summation loop */
-	for (hi1 = hr1 = hi = 0.0, hr = *--p; a - p;) {
-		hr2 = hr1;
-		hi2 = hi1;
-		hr1 = hr;
-		hi1 = hi;
-		hr  = -hr2 + r*hr1 - i*hi1 + *--p;
-		hi  = -hi2 + i*hr1 + r*hi1;
-	}
-	r   = sin_arg_r*cosh_arg_i;
-	i   = cos_arg_r*sinh_arg_i;
-	*R  = r*hr - i*hi;
-	*I  = r*hi + i*hr;
-	return(*R);
+    sinh_arg_i = sinh(arg_i);
+    cosh_arg_i = cosh(arg_i);
+    r          =  2*cos_arg_r*cosh_arg_i;
+    i          = -2*sin_arg_r*sinh_arg_i;
+    /* summation loop */
+    for (hi1 = hr1 = hi = 0, hr = *--p; a - p;) {
+        hr2 = hr1;
+        hi2 = hi1;
+        hr1 = hr;
+        hi1 = hi;
+        hr  = -hr2 + r*hr1 - i*hi1 + *--p;
+        hi  = -hi2 + i*hr1 + r*hi1;
+    }
+    r   = sin_arg_r*cosh_arg_i;
+    i   = cos_arg_r*sinh_arg_i;
+    *R  = r*hr - i*hi;
+    *I  = r*hi + i*hr;
+    return(*R);
 }
-	static double
+    static double
 clens(double *a, int size, double arg_r) {
-	double      *p, r, hr, hr1, hr2, cos_arg_r;
-
-	p = a + size;
-	cos_arg_r  = cos(arg_r);
-	r          =  2.0*cos_arg_r;
-	/* summation loop */
-	for (hr1 = 0.0, hr = *--p; a - p;) {
-		hr2 = hr1;
-		hr1 = hr;
-		hr  = -hr2 + r*hr1 + *--p;
-	}
-	return(sin(arg_r)*hr);
-}
+    double      *p, r, hr, hr1, hr2, cos_arg_r;
 
+    p = a + size;
+    cos_arg_r  = cos(arg_r);
+    r          =  2*cos_arg_r;
+    /* summation loop */
+    for (hr1 = 0, hr = *--p; a - p;) {
+        hr2 = hr1;
+        hr1 = hr;
+        hr  = -hr2 + r*hr1 + *--p;
+    }
+    return(sin(arg_r)*hr);
+}
 
 FORWARD(e_forward); /* ellipsoid */
-	double sin_Cn, cos_Cn, cos_Ce, sin_Ce, dCn, dCe;
-	double Cn = lp.phi, Ce = lp.lam;
+    double sin_Cn, cos_Cn, cos_Ce, sin_Ce, dCn, dCe;
+    double Cn = lp.phi, Ce = lp.lam;
 
-	/* ell. LAT, LNG -> Gaussian LAT, LNG */
-	Cn  = gatg(P->cbg, 5, Cn);
-	/* Gaussian LAT, LNG -> compl. sph. LAT */
+    /* ell. LAT, LNG -> Gaussian LAT, LNG */
+    Cn  = gatg(P->cbg, PROJ_ETMERC_ORDER, Cn);
+    /* Gaussian LAT, LNG -> compl. sph. LAT */
 #ifdef _GNU_SOURCE
-	sincos(Cn, &sin_Cn, &cos_Cn);
-	sincos(Ce, &sin_Ce, &cos_Ce);
+    sincos(Cn, &sin_Cn, &cos_Cn);
+    sincos(Ce, &sin_Ce, &cos_Ce);
 #else
-	sin_Cn = sin(Cn);
-	cos_Cn = cos(Cn);
-	sin_Ce = sin(Ce);
-	cos_Ce = cos(Ce);
+    sin_Cn = sin(Cn);
+    cos_Cn = cos(Cn);
+    sin_Ce = sin(Ce);
+    cos_Ce = cos(Ce);
 #endif
 
-	Cn     = atan2(sin_Cn, cos_Ce*cos_Cn);
-	Ce     = atan2(sin_Ce*cos_Cn, hypot(sin_Cn, cos_Cn*cos_Ce));
-	/* compl. sph. N, E -> ell. norm. N, E */
-	Ce  = log(tan(FORTPI + Ce*0.5));
-	Cn += clenS(P->gtu, 5, 2.*Cn, 2.*Ce, &dCn, &dCe);
-	Ce += dCe;
-	if (FABS(Ce) <= 2.623395162778) {
-		xy.y  = P->Qn * Cn + P->Zb;  /* Northing */
-		xy.x  = P->Qn * Ce;  /* Easting  */
-	} else
-		xy.x = xy.y = HUGE_VAL;
-	return (xy);
+    Cn     = atan2(sin_Cn, cos_Ce*cos_Cn);
+    Ce     = atan2(sin_Ce*cos_Cn, hypot(sin_Cn, cos_Cn*cos_Ce));
+    /* compl. sph. N, E -> ell. norm. N, E */
+    Ce  = asinhy(tan(Ce));     /* Replaces: Ce  = log(tan(FORTPI + Ce*0.5)); */
+    Cn += clenS(P->gtu, PROJ_ETMERC_ORDER, 2*Cn, 2*Ce, &dCn, &dCe);
+    Ce += dCe;
+    if (fabs(Ce) <= 2.623395162778) {
+        xy.y  = P->Qn * Cn + P->Zb;  /* Northing */
+        xy.x  = P->Qn * Ce;  /* Easting  */
+    } else
+        xy.x = xy.y = HUGE_VAL;
+    return (xy);
 }
 
-
 INVERSE(e_inverse); /* ellipsoid */
-	double sin_Cn, cos_Cn, cos_Ce, sin_Ce, dCn, dCe;
-	double Cn = xy.y, Ce = xy.x;
-
-	/* normalize N, E */
-	Cn = (Cn - P->Zb)/P->Qn;
-	Ce = Ce/P->Qn;
-	if (FABS(Ce) <= 2.623395162778) { /* 150 degrees */
-	/* norm. N, E -> compl. sph. LAT, LNG */
-		Cn += clenS(P->utg, 5, 2.*Cn, 2.*Ce, &dCn, &dCe);
-		Ce += dCe;
-		Ce = 2.0*(atan(exp(Ce)) - FORTPI);
-		/* compl. sph. LAT -> Gaussian LAT, LNG */
+    double sin_Cn, cos_Cn, cos_Ce, sin_Ce, dCn, dCe;
+    double Cn = xy.y, Ce = xy.x;
+
+    /* normalize N, E */
+    Cn = (Cn - P->Zb)/P->Qn;
+    Ce = Ce/P->Qn;
+    if (fabs(Ce) <= 2.623395162778) { /* 150 degrees */
+    /* norm. N, E -> compl. sph. LAT, LNG */
+        Cn += clenS(P->utg, PROJ_ETMERC_ORDER, 2*Cn, 2*Ce, &dCn, &dCe);
+        Ce += dCe;
+        Ce = atan(sinh(Ce)); /* Replaces: Ce = 2*(atan(exp(Ce)) - FORTPI); */
+        /* compl. sph. LAT -> Gaussian LAT, LNG */
 #ifdef _GNU_SOURCE
-    	sincos(Cn, &sin_Cn, &cos_Cn);
-    	sincos(Ce, &sin_Ce, &cos_Ce);
+        sincos(Cn, &sin_Cn, &cos_Cn);
+        sincos(Ce, &sin_Ce, &cos_Ce);
 #else
-    	sin_Cn = sin(Cn);
-    	cos_Cn = cos(Cn);
-    	sin_Ce = sin(Ce);
-    	cos_Ce = cos(Ce);
+        sin_Cn = sin(Cn);
+        cos_Cn = cos(Cn);
+        sin_Ce = sin(Ce);
+        cos_Ce = cos(Ce);
 #endif
-		Ce     = atan2(sin_Ce, cos_Ce*cos_Cn);
-		Cn     = atan2(sin_Cn*cos_Ce, hypot(sin_Ce, cos_Ce*cos_Cn));
-		/* Gaussian LAT, LNG -> ell. LAT, LNG */
-		lp.phi = gatg(P->cgb,  5, Cn);
-		lp.lam = Ce;
-	}
-	else
-		lp.phi = lp.lam = HUGE_VAL;
-	return (lp);
+        Ce     = atan2(sin_Ce, cos_Ce*cos_Cn);
+        Cn     = atan2(sin_Cn*cos_Ce, hypot(sin_Ce, cos_Ce*cos_Cn));
+        /* Gaussian LAT, LNG -> ell. LAT, LNG */
+        lp.phi = gatg(P->cgb,  PROJ_ETMERC_ORDER, Cn);
+        lp.lam = Ce;
+    }
+    else
+        lp.phi = lp.lam = HUGE_VAL;
+    return (lp);
 }
 
-
 FREEUP; if (P) free(P); }
 
-
 ENTRY0(etmerc)
-	double f, n, np, Z;
-
-	if (P->es <= 0.) E_ERROR(-34);
-	f = 1. - sqrt(1. - P->es);
-	/* third flattening */
-	np = n = f/(2.0 - f);
-
-	/* COEF. OF TRIG SERIES GEO <-> GAUSS */
-	/* cgb := Gaussian -> Geodetic, KW p190 - 191 (61) - (62) */
-	/* cbg := Geodetic -> Gaussian, KW p186 - 187 (51) - (52) */
-	/* 5 degree : Engsager and Poder: ICC2007 */
-	P->cgb[0] = n*( 2.0 + n*(-2.0/3.0  + n*(-2.0      + n*(116.0/45.0 + n*(26.0/45.0)))));
-	P->cbg[0] = n*(-2.0 + n*( 2.0/3.0  + n*( 4.0/3.0  + n*(-82.0/45.0 + n*(32.0/45.0)))));
-	np     *= n;
-	P->cgb[1] = np*(7.0/3.0     + n*( -8.0/5.0  + n*(-227.0/45.0 + n*(2704.0/315.0))));
-	P->cbg[1] = np*(5.0/3.0     + n*(-16.0/15.0 + n*( -13.0/ 9.0 + n*( 904.0/315.0))));
-	np     *= n;
-	P->cgb[2] = np*( 56.0/15.0  + n*(-136.0/35.0 + n*(1262.0/105.0)));
-	P->cbg[2] = np*(-26.0/15.0  + n*(  34.0/21.0 + n*(   8.0/  5.0)));
-	np     *= n;
-	P->cgb[3] = np*(4279.0/630.0 + n*(-322.0/35.0));
-	P->cbg[3] = np*(1237.0/630.0 + n*( -12.0/ 5.0));
-	np     *= n;
-	P->cgb[4] = np*(4174.0/315.0);
-	P->cbg[4] = np*(-734.0/315.0);
-
-	/* Constants of the projections */
-	/* Transverse Mercator (UTM, ITM, etc) */
-	np = n*n;
-	/* Norm. mer. quad, K&W p.50 (96), p.19 (38b), p.5 (2) */
-	P->Qn = P->k0/(1 + n) * (1. + np*(1./4.0 + np*(1./64.0 + np/256.0)));
-	/* coef of trig series */
-	/* utg := ell. N, E -> sph. N, E,  KW p194 (65) */
-	/* gtu := sph. N, E -> ell. N, E,  KW p196 (69) */
-	P->utg[0] = n*(-0.5  + n*( 2.0/3.0 + n*(-37.0/96.0 + n*( 1.0/360.0 + n*(  81.0/512.0)))));
-	P->gtu[0] = n*( 0.5  + n*(-2.0/3.0 + n*(  5.0/16.0 + n*(41.0/180.0 + n*(-127.0/288.0)))));
-	P->utg[1] = np*(-1.0/48.0 + n*(-1.0/15.0 + n*(437.0/1440.0 + n*(-46.0/105.0))));
-	P->gtu[1] = np*(13.0/48.0 + n*(-3.0/5.0  + n*(557.0/1440.0 + n*(281.0/630.0))));
-	np      *= n;
-	P->utg[2] = np*(-17.0/480.0 + n*(  37.0/840.0 + n*(  209.0/ 4480.0)));
-	P->gtu[2] = np*( 61.0/240.0 + n*(-103.0/140.0 + n*(15061.0/26880.0)));
-	np      *= n;
-	P->utg[3] = np*(-4397.0/161280.0 + n*(  11.0/504.0));
-	P->gtu[3] = np*(49561.0/161280.0 + n*(-179.0/168.0));
-	np     *= n;
-	P->utg[4] = np*(-4583.0/161280.0);
-	P->gtu[4] = np*(34729.0/ 80640.0);
-	/* Gaussian latitude value of the origin latitude */
-	Z = gatg(P->cbg, 5, P->phi0);
-	/* Origin northing minus true northing at the origin latitude */
-	/* i.e. true northing = N - P->Zb                         */
-	P->Zb  = - P->Qn*(Z + clens(P->gtu, 5, 2.0*Z));
-	P->inv = e_inverse;
-	P->fwd = e_forward;
+    double f, n, np, Z;
+
+    if (P->es <= 0) E_ERROR(-34);
+    f = P->es / (1 + sqrt(1 -  P->es)); /* Replaces: f = 1 - sqrt(1-P->es); */
+    /* third flattening */
+    np = n = f/(2 - f);
+
+    /* COEF. OF TRIG SERIES GEO <-> GAUSS */
+    /* cgb := Gaussian -> Geodetic, KW p190 - 191 (61) - (62) */
+    /* cbg := Geodetic -> Gaussian, KW p186 - 187 (51) - (52) */
+    /* PROJ_ETMERC_ORDER = 6th degree : Engsager and Poder: ICC2007 */
+    P->cgb[0] = n*( 2 + n*(-2/3.0  + n*(-2      + n*(116/45.0 + n*(26/45.0 +
+                n*(-2854/675.0 ))))));
+    P->cbg[0] = n*(-2 + n*( 2/3.0  + n*( 4/3.0  + n*(-82/45.0 + n*(32/45.0 +
+                n*( 4642/4725.0))))));
+    np     *= n;
+    P->cgb[1] = np*(7/3.0 + n*( -8/5.0  + n*(-227/45.0 + n*(2704/315.0 +
+                n*( 2323/945.0)))));
+    P->cbg[1] = np*(5/3.0 + n*(-16/15.0 + n*( -13/9.0  + n*( 904/315.0 +
+                n*(-1522/945.0)))));
+    np     *= n;
+    /* n^5 coeff corrected from 1262/105 -> -1262/105 */
+    P->cgb[2] = np*( 56/15.0  + n*(-136/35.0 + n*(-1262/105.0 +
+                n*( 73814/2835.0))));
+    P->cbg[2] = np*(-26/15.0  + n*(  34/21.0 + n*(    8/5.0   +
+                n*(-12686/2835.0))));
+    np     *= n;
+    /* n^5 coeff corrected from 322/35 -> 332/35 */
+    P->cgb[3] = np*(4279/630.0 + n*(-332/35.0 + n*(-399572/14175.0)));
+    P->cbg[3] = np*(1237/630.0 + n*( -12/5.0  + n*( -24832/14175.0)));
+    np     *= n;
+    P->cgb[4] = np*(4174/315.0 + n*(-144838/6237.0 ));
+    P->cbg[4] = np*(-734/315.0 + n*( 109598/31185.0));
+    np     *= n;
+    P->cgb[5] = np*(601676/22275.0 );
+    P->cbg[5] = np*(444337/155925.0);
+
+    /* Constants of the projections */
+    /* Transverse Mercator (UTM, ITM, etc) */
+    np = n*n;
+    /* Norm. mer. quad, K&W p.50 (96), p.19 (38b), p.5 (2) */
+    P->Qn = P->k0/(1 + n) * (1 + np*(1/4.0 + np*(1/64.0 + np/256.0)));
+    /* coef of trig series */
+    /* utg := ell. N, E -> sph. N, E,  KW p194 (65) */
+    /* gtu := sph. N, E -> ell. N, E,  KW p196 (69) */
+    P->utg[0] = n*(-0.5  + n*( 2/3.0 + n*(-37/96.0 + n*( 1/360.0 +
+                n*(  81/512.0 + n*(-96199/604800.0))))));
+    P->gtu[0] = n*( 0.5  + n*(-2/3.0 + n*(  5/16.0 + n*(41/180.0 +
+                n*(-127/288.0 + n*(  7891/37800.0 ))))));
+    P->utg[1] = np*(-1/48.0 + n*(-1/15.0 + n*(437/1440.0 + n*(-46/105.0 +
+                n*( 1118711/3870720.0)))));
+    P->gtu[1] = np*(13/48.0 + n*(-3/5.0  + n*(557/1440.0 + n*(281/630.0 +
+                n*(-1983433/1935360.0)))));
+    np      *= n;
+    P->utg[2] = np*(-17/480.0 + n*(  37/840.0 + n*(  209/4480.0  +
+                n*( -5569/90720.0 ))));
+    P->gtu[2] = np*( 61/240.0 + n*(-103/140.0 + n*(15061/26880.0 +
+                n*(167603/181440.0))));
+    np      *= n;
+    P->utg[3] = np*(-4397/161280.0 + n*(  11/504.0 + n*( 830251/7257600.0)));
+    P->gtu[3] = np*(49561/161280.0 + n*(-179/168.0 + n*(6601661/7257600.0)));
+    np     *= n;
+    P->utg[4] = np*(-4583/161280.0 + n*(  108847/3991680.0));
+    P->gtu[4] = np*(34729/80640.0  + n*(-3418889/1995840.0));
+    np     *= n;
+    P->utg[5] = np*(-20648693/638668800.0);
+    P->gtu[5] = np*(212378941/319334400.0);
+    /* Gaussian latitude value of the origin latitude */
+    Z = gatg(P->cbg, PROJ_ETMERC_ORDER, P->phi0);
+    /* Origin northing minus true northing at the origin latitude */
+    /* i.e. true northing = N - P->Zb                         */
+    P->Zb  = - P->Qn*(Z + clens(P->gtu, PROJ_ETMERC_ORDER, 2*Z));
+    P->inv = e_inverse;
+    P->fwd = e_forward;
 ENDENTRY(P)
diff --git a/src/projects.h b/src/projects.h
index d8690c9..b35e89e 100644
--- a/src/projects.h
+++ b/src/projects.h
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: projects.h 2219 2012-06-19 04:18:00Z warmerdam $
+ * $Id: projects.h 2356 2013-06-25 01:02:23Z warmerdam $
  *
  * Project:  PROJ.4
  * Purpose:  Primary (private) include file for PROJ.4 library.
@@ -100,10 +100,6 @@ extern double hypot(double, double);
 #define PI		3.14159265358979323846
 #define TWOPI		6.2831853071795864769
 
-/* environment parameter name */
-#ifndef PROJ_LIB
-#define PROJ_LIB "PROJ_LIB"
-#endif
 /* maximum tag id length for +init and default files */
 #ifndef ID_TAG_MAX
 #define ID_TAG_MAX 50
@@ -125,12 +121,15 @@ extern double hypot(double, double);
 #define DIR_CHAR '/'
 #endif
 
+struct projFileAPI_t;
+
 /* proj thread context */
 typedef struct {
     int	    last_errno;
     int     debug_level;
     void    (*logger)(void *, int, const char *);
     void    *app_data;
+    struct projFileAPI_t *fileapi;
 } projCtx_t;
 
 /* datum_type values */
@@ -421,7 +420,6 @@ double *pj_authset(double);
 double pj_authlat(double, double *);
 COMPLEX pj_zpoly1(COMPLEX, COMPLEX *, int);
 COMPLEX pj_zpolyd1(COMPLEX, COMPLEX *, int, COMPLEX *);
-FILE *pj_open_lib(projCtx, char *, char *);
 
 int pj_deriv(LP, double, PJ *, struct DERIVS *);
 int pj_factors(LP, PJ *, double, struct FACTORS *);
@@ -452,10 +450,10 @@ int bch2bps(projUV, projUV, projUV **, int, int);
 LP nad_intr(LP, struct CTABLE *);
 LP nad_cvt(LP, int, struct CTABLE *);
 struct CTABLE *nad_init(projCtx ctx, char *);
-struct CTABLE *nad_ctable_init( projCtx ctx, FILE * fid );
-int nad_ctable_load( projCtx ctx, struct CTABLE *, FILE * fid );
-struct CTABLE *nad_ctable2_init( projCtx ctx, FILE * fid );
-int nad_ctable2_load( projCtx ctx, struct CTABLE *, FILE * fid );
+struct CTABLE *nad_ctable_init( projCtx ctx, PAFile fid );
+int nad_ctable_load( projCtx ctx, struct CTABLE *, PAFile fid );
+struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid );
+int nad_ctable2_load( projCtx ctx, struct CTABLE *, PAFile fid );
 void nad_free(struct CTABLE *);
 
 /* higher level handling of datum grid shift files */
diff --git a/unittest/test.py b/unittest/test.py
new file mode 100644
index 0000000..762b483
--- /dev/null
+++ b/unittest/test.py
@@ -0,0 +1,52 @@
+"""Rewrite part of test.py in pyproj in the form of unittests."""
+import unittest
+from pyproj import Proj
+
+
+class BasicTest(unittest.TestCase):
+
+  def testProj4Version(self):
+    awips221 = Proj(proj='lcc',R=6371200,lat_1=50,lat_2=50,lon_0=-107)
+    #self.assertEqual(awips221.proj_version, 4.9)
+
+  def testProjAwips221(self):
+    # AWIPS is Advanced Weather Interactive Processing System
+    params = {'proj': 'lcc', 'R': 6371200, 'lat_1': 50, 'lat_2': 50,
+              'lon_0': -107}
+    nx = 349
+    ny = 277
+    awips221 = Proj(proj=params['proj'], R=params['R'],
+                    lat_1=params['lat_1'], lat_2=params['lat_2'],
+                    lon_0=params['lon_0'])
+    awips221_from_dict = Proj(params)
+
+    items = sorted([val for val in awips221.srs.split() if val])
+    items_dict = sorted([val for val in awips221_from_dict.srs.split() if val])
+    self.assertEqual(items, items_dict)
+
+    expected = sorted(('+units=m', '+proj=lcc', '+lat_2=50', '+lat_1=50',
+                      '+lon_0=-107','+R=6371200'))
+    self.assertEqual(items, expected)
+
+    point = awips221(-145.5,1.)
+    x, y = -5632642.22547495, 1636571.4883145525
+    self.assertAlmostEqual(point[0], x)
+    self.assertAlmostEqual(point[1], y)
+
+    pairs = [
+        [(-45,45), (4351601.20766915, 7606948.029327129)],
+        [(45,45), (5285389.07739382, 14223336.17467613)],
+        [(45,-45), (20394982.466924712, 21736546.456803113)],
+        [(-45,-45), (16791730.756976362, -3794425.4816524936)]
+        ]
+    for point_geog, expected in pairs:
+      point = awips221(*point_geog)
+      self.assertAlmostEqual(point[0], expected[0])
+      self.assertAlmostEqual(point[1], expected[1])
+      point_geog2 = awips221(*point, inverse=True)
+      self.assertAlmostEqual(point_geog[0], point_geog2[0])
+      self.assertAlmostEqual(point_geog[1], point_geog2[1])
+
+
+if __name__ == '__main__':
+  unittest.main()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-pyproj.git



More information about the Pkg-grass-devel mailing list