[proj] 02/18: New upstream version 5.0.0~rc1

Bas Couwenberg sebastic at debian.org
Fri Feb 2 20:55:47 UTC 2018


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

sebastic pushed a commit to branch experimental
in repository proj.

commit 99d6a3773cef2448b557d780a70d49c0fdb8c0c5
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Feb 2 17:37:08 2018 +0100

    New upstream version 5.0.0~rc1
---
 AUTHORS                                      |    8 +-
 CMakeLists.txt                               |   59 +-
 ChangeLog                                    |   22 +-
 Makefile.am                                  |    2 +-
 Makefile.in                                  |   46 +-
 NEWS                                         |  312 ++
 README                                       |  134 +-
 aclocal.m4                                   |  173 +-
 cmake/CMakeLists.txt                         |   14 +-
 cmake/Makefile.in                            |   24 +-
 cmake/Proj4InstallPath.cmake                 |   30 +-
 cmake/Proj4SystemInfo.cmake                  |    6 +
 cmake/Proj4Test.cmake                        |   25 +-
 cmake/policies.cmake                         |    1 -
 compile                                      |  347 --
 config.guess                                 |  233 +-
 config.sub                                   |   73 +-
 configure                                    | 2357 ++++------
 configure.ac                                 |   20 +-
 depcomp                                      |    2 +-
 install-sh                                   |  373 +-
 jniwrap/Makefile.in                          |   24 +-
 jniwrap/README                               |    2 +-
 jniwrap/doxygen.cfg                          |    4 +-
 jniwrap/org/Makefile.in                      |   24 +-
 jniwrap/org/proj4/Makefile.in                |   24 +-
 jniwrap/org/proj4/PJ.java                    |    4 +-
 ltmain.sh                                    | 5525 +++++++++---------------
 m4/libtool.m4                                | 2594 +++++------
 m4/ltoptions.m4                              |  127 +-
 m4/ltsugar.m4                                |    7 +-
 m4/ltversion.m4                              |   12 +-
 m4/lt~obsolete.m4                            |    7 +-
 man/Makefile.in                              |   24 +-
 man/man1/Makefile.in                         |   24 +-
 man/man1/cs2cs.1                             |    4 +-
 man/man1/geod.1                              |   10 +-
 man/man1/proj.1                              |    9 +-
 man/man3/Makefile.in                         |   24 +-
 man/man3/geodesic.3                          |   18 +-
 man/man3/pj_init.3                           |    4 +-
 missing                                      |    6 +-
 nad/CH                                       |    1 +
 nad/CMakeLists.txt                           |   25 +-
 nad/GL27                                     |    1 +
 nad/IGNF                                     |    1 +
 nad/ITRF2000                                 |   24 +
 nad/ITRF2008                                 |   61 +
 nad/ITRF2014                                 |   55 +
 nad/Makefile.am                              |    4 +-
 nad/Makefile.in                              |   29 +-
 nad/README                                   |    2 +-
 nad/epsg                                     |  695 ++-
 nad/esri                                     | 5909 +++++++++++++-------------
 nad/makefile.vc                              |    2 +-
 nad/nad27                                    |    1 +
 nad/nad83                                    |    1 +
 nad/other.extra                              |    2 +-
 nad/proj_outIGNF.dist                        |   10 +-
 nad/test27                                   |    2 +-
 nad/test83                                   |    2 +-
 nad/testIGNF                                 |    2 +-
 nad/testdatumfile                            |    2 +-
 nad/testflaky                                |    2 +-
 nad/testntv2                                 |    2 +-
 nad/testvarious                              |   15 +-
 nad/world                                    |   10 +-
 nmake.opt                                    |    6 +-
 src/CMakeLists.txt                           |   49 +-
 src/Makefile.am                              |   45 +-
 src/Makefile.in                              |  573 ++-
 src/PJ_aea.c                                 |  377 +-
 src/PJ_aeqd.c                                |  134 +-
 src/PJ_airy.c                                |  219 +-
 src/PJ_aitoff.c                              |  283 +-
 src/PJ_august.c                              |   40 +-
 src/PJ_axisswap.c                            |  295 ++
 src/PJ_bacon.c                               |  108 +-
 src/PJ_bipc.c                                |  109 +-
 src/PJ_boggs.c                               |   36 +-
 src/PJ_bonne.c                               |  214 +-
 src/PJ_calcofi.c                             |   83 +-
 src/PJ_cart.c                                |  219 +
 src/PJ_cass.c                                |   81 +-
 src/PJ_cc.c                                  |   75 +-
 src/PJ_ccon.c                                |  106 +
 src/PJ_cea.c                                 |   93 +-
 src/PJ_chamb.c                               |   55 +-
 src/PJ_collg.c                               |  103 +-
 src/PJ_comill.c                              |   60 +-
 src/PJ_crast.c                               |   55 -
 src/PJ_deformation.c                         |  315 ++
 src/PJ_denoy.c                               |   38 -
 src/PJ_eck1.c                                |   57 +-
 src/PJ_eck2.c                                |   63 +-
 src/PJ_eck3.c                                |  211 +-
 src/PJ_eck4.c                                |   60 +-
 src/PJ_eck5.c                                |   57 +-
 src/PJ_eqc.c                                 |   69 +-
 src/PJ_eqdc.c                                |  106 +-
 src/PJ_fahey.c                               |   56 -
 src/PJ_fouc_s.c                              |   71 +-
 src/PJ_gall.c                                |   57 -
 src/{pj_log.c => PJ_geoc.c}                  |   61 +-
 src/PJ_geos.c                                |  119 +-
 src/PJ_gins8.c                               |   44 +-
 src/PJ_gn_sinu.c                             |  246 +-
 src/PJ_gnom.c                                |   86 +-
 src/PJ_goode.c                               |   69 +-
 src/PJ_gstmerc.c                             |   67 +-
 src/PJ_hammer.c                              |   76 +-
 src/PJ_hatano.c                              |   65 +-
 src/PJ_healpix.c                             |  230 +-
 src/PJ_helmert.c                             |  612 +++
 src/PJ_hgridshift.c                          |   75 +
 src/PJ_horner.c                              |  487 +++
 src/PJ_igh.c                                 |   70 +-
 src/PJ_imw_p.c                               |  121 +-
 src/PJ_isea.c                                |  113 +-
 src/PJ_krovak.c                              |   79 +-
 src/PJ_labrd.c                               |   72 +-
 src/PJ_laea.c                                |  121 +-
 src/PJ_lagrng.c                              |   64 +-
 src/PJ_larr.c                                |   46 +-
 src/PJ_lask.c                                |   44 +-
 src/{pj_latlong.c => PJ_latlong.c}           |  108 +-
 src/PJ_lcc.c                                 |   98 +-
 src/PJ_lcca.c                                |  128 +-
 src/PJ_loxim.c                               |   69 +-
 src/PJ_lsat.c                                |   92 +-
 src/PJ_mbt_fps.c                             |   59 +-
 src/PJ_mbtfpp.c                              |   75 +-
 src/PJ_mbtfpq.c                              |   69 +-
 src/PJ_merc.c                                |   90 +-
 src/PJ_mill.c                                |   59 +-
 src/PJ_misrsom.c                             |  100 +-
 src/PJ_mod_ster.c                            |  312 +-
 src/PJ_moll.c                                |  161 +-
 src/PJ_molodensky.c                          |  314 ++
 src/PJ_natearth.c                            |   66 +-
 src/PJ_natearth2.c                           |   66 +-
 src/PJ_nell.c                                |   59 +-
 src/PJ_nell_h.c                              |   60 +-
 src/PJ_nocol.c                               |   46 +-
 src/PJ_nsper.c                               |  142 +-
 src/PJ_nzmg.c                                |   76 +-
 src/PJ_ob_tran.c                             |  194 +-
 src/PJ_ocea.c                                |   73 +-
 src/PJ_oea.c                                 |  162 +-
 src/PJ_omerc.c                               |   97 +-
 src/PJ_ortho.c                               |  164 +-
 src/PJ_patterson.c                           |   64 +-
 src/PJ_pipeline.c                            |  475 +++
 src/PJ_poly.c                                |  245 +-
 src/PJ_putp2.c                               |   58 +-
 src/PJ_putp3.c                               |  112 +-
 src/PJ_putp4p.c                              |  113 +-
 src/PJ_putp5.c                               |  109 +-
 src/PJ_putp6.c                               |  109 +-
 src/PJ_qsc.c                                 |  123 +-
 src/PJ_robin.c                               |  164 +-
 src/PJ_rpoly.c                               |   51 +-
 src/PJ_sch.c                                 |   90 +-
 src/PJ_sconics.c                             |  530 +--
 src/PJ_somerc.c                              |   91 +-
 src/PJ_stere.c                               |  192 +-
 src/PJ_sterea.c                              |   86 +-
 src/PJ_sts.c                                 |  260 +-
 src/PJ_tcc.c                                 |   45 +-
 src/PJ_tcea.c                                |   53 +-
 src/PJ_times.c                               |   58 -
 src/PJ_tmerc.c                               |  108 +-
 src/PJ_tpeqd.c                               |  215 +-
 src/PJ_unitconvert.c                         |  487 +++
 src/PJ_urm5.c                                |   51 +-
 src/PJ_urmfps.c                              |  150 +-
 src/PJ_vandg.c                               |   78 +-
 src/PJ_vandg2.c                              |   84 +-
 src/PJ_vandg4.c                              |   46 +-
 src/PJ_vgridshift.c                          |   77 +
 src/PJ_wag2.c                                |   56 +-
 src/PJ_wag3.c                                |   67 +-
 src/PJ_wag7.c                                |   41 +-
 src/PJ_wink1.c                               |   66 +-
 src/PJ_wink2.c                               |   48 +-
 src/aasincos.c                               |    1 -
 src/adjlon.c                                 |   25 +-
 src/bch2bps.c                                |   20 +-
 src/bin_cct.cmake                            |    9 +
 src/bin_gie.cmake                            |    9 +
 src/cct.c                                    |  353 ++
 src/cs2cs.c                                  |   38 +-
 src/dmstor.c                                 |    2 +-
 src/emess.c                                  |   17 +-
 src/emess.h                                  |    5 +-
 src/gen_cheb.c                               |   15 +-
 src/geocent.c                                |   15 +-
 src/geod.c                                   |   12 +-
 src/geod_set.c                               |    9 +-
 src/geodesic.c                               |  148 +-
 src/geodesic.h                               |   50 +-
 src/geodtest.c                               |  169 +-
 src/gie.c                                    | 1890 ++++++++
 src/jniproj.c                                |    2 +-
 src/lib_proj.cmake                           |   28 +-
 src/makefile.vc                              |   45 +-
 src/mk_cheby.c                               |   38 +-
 src/multistresstest.c                        |  158 +-
 src/nad2bin.c                                |   32 +-
 src/nad_cvt.c                                |  122 +-
 src/nad_init.c                               |   27 +-
 src/nad_intr.c                               |    4 +-
 src/optargpm.h                               |  621 +++
 src/p_series.c                               |    7 +-
 src/pj_apply_gridshift.c                     |  275 +-
 src/pj_apply_vgridshift.c                    |  295 +-
 src/pj_ctx.c                                 |   42 +-
 src/pj_datum_set.c                           |   12 +-
 src/pj_datums.c                              |   22 +-
 src/pj_deriv.c                               |   92 +-
 src/pj_ell_set.c                             |  806 +++-
 src/pj_ellps.c                               |   12 +-
 src/pj_factors.c                             |  175 +-
 src/pj_fileapi.c                             |   10 +-
 src/pj_fwd.c                                 |  297 +-
 src/pj_fwd3d.c                               |   47 -
 src/pj_gauss.c                               |  108 +-
 src/pj_gc_reader.c                           |   54 +-
 src/pj_generic_selftest.c                    |  197 -
 src/pj_geocent.c                             |   61 +-
 src/pj_gridcatalog.c                         |   11 +
 src/pj_gridinfo.c                            |  135 +-
 src/pj_gridlist.c                            |   29 +-
 src/pj_init.c                                |  839 ++--
 src/pj_initcache.c                           |   12 +-
 src/pj_internal.c                            |  493 +++
 src/pj_inv.c                                 |  288 +-
 src/pj_inv3d.c                               |   45 -
 src/pj_list.c                                |   34 +-
 src/pj_list.h                                |   14 +-
 src/pj_log.c                                 |   44 +-
 src/pj_malloc.c                              |  209 +-
 src/pj_mlfn.c                                |   28 +-
 src/pj_mutex.c                               |    2 +-
 src/pj_open_lib.c                            |   99 +-
 src/pj_param.c                               |  257 +-
 src/pj_phi2.c                                |   10 +-
 src/pj_pr_list.c                             |   18 +-
 src/pj_qsfn.c                                |   24 +-
 src/pj_release.c                             |    2 +-
 src/pj_run_selftests.c                       |   78 -
 src/pj_strerrno.c                            |  151 +-
 src/pj_strtod.c                              |   16 +-
 src/pj_transform.c                           |  124 +-
 src/pj_tsfn.c                                |   16 +-
 src/pj_units.c                               |   54 +-
 src/pj_zpoly1.c                              |    4 +-
 src/proj.c                                   |  552 +--
 src/proj.def                                 |   65 +-
 src/proj.h                                   |  387 ++
 src/proj_4D_api.c                            |  990 +++++
 src/proj_api.h                               |  105 +-
 src/proj_config.h.in                         |    3 +-
 src/proj_etmerc.c                            |  180 +-
 src/proj_internal.h                          |  141 +
 src/proj_mdist.c                             |   19 +-
 src/proj_rouss.c                             |   66 +-
 src/proj_strtod.c                            |  440 ++
 src/projects.h                               |  737 ++--
 src/rtodms.c                                 |    8 +-
 src/test228.c                                |   12 +-
 test-driver                                  |  127 +
 test/CMakeLists.txt                          |   46 +
 test/Makefile.am                             |   12 +
 {jniwrap => test}/Makefile.in                |   58 +-
 test/gie/4D-API_cs2cs-style.gie              |  161 +
 test/gie/GDA.gie                             |   76 +
 test/gie/Makefile.am                         |    9 +
 {jniwrap/org/proj4 => test/gie}/Makefile.in  |   41 +-
 test/gie/axisswap.gie                        |  111 +
 test/gie/builtins.gie                        | 4722 ++++++++++++++++++++
 test/gie/deformation.gie                     |   55 +
 test/gie/ellipsoid.gie                       |  162 +
 test/gie/more_builtins.gie                   |  371 ++
 test/gie/unitconvert.gie                     |   28 +
 test/gigs/5101.1-jhs.gie                     |  732 ++++
 test/gigs/5101.2-jhs.gie                     |  300 ++
 test/gigs/5101.3-jhs.gie                     |  300 ++
 test/gigs/5101.4-jhs-etmerc.gie              |  300 ++
 test/gigs/5102.1.gie                         |  252 ++
 test/gigs/5103.1.gie                         |  211 +
 test/gigs/5103.2.gie                         |  144 +
 test/gigs/5103.3.gie                         |  144 +
 test/gigs/5105.2.gie                         |  168 +
 test/gigs/5106.gie                           |  300 ++
 test/gigs/5107.gie                           |  180 +
 test/gigs/5109.gie                           |  180 +
 test/gigs/5111.1.gie                         |  450 ++
 test/gigs/5112.gie                           |   75 +
 test/gigs/5113.gie                           |   84 +
 test/gigs/5201.gie                           |  354 ++
 test/gigs/5208.gie                           |  208 +
 test/gigs/Makefile.am                        |   18 +
 {jniwrap/org/proj4 => test/gigs}/Makefile.in |   50 +-
 304 files changed, 35501 insertions(+), 22729 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index ea121aa..534ddd2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +1,5 @@
 Original Author:
-Gerald Evenden 
+Gerald Evenden
 
 Maintainer(s):
 Frank Warmerdam <warmerdam at pobox.com>
@@ -12,6 +12,8 @@ Craig Bruce <cbruce at cubewerx.com>
 Victor Osipkov <vctos at email.com>
 Andrea Antonello <andrea.antonello at hydrologis.com>
 Charles Karney <charles.karney at sri.com>
-Karsten Engsager 
+Karsten Engsager
 Knud Poder
-
+Kristian Evers <kreve at sdfe.dk>
+Thomas Knudsen <thokn at sdfe.dk>
+Even Rouault <even.rouault at spatialys.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cde21f0..1d1baef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,24 @@ cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
 project(PROJ4 C)
 set(PROJECT_INTERN_NAME PROJ)
 
+if (NOT CMAKE_VERSION VERSION_LESS 3.1)
+  cmake_policy(SET CMP0054 NEW)
+endif ()
+# Set warnings
+if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
+  # Suppress warning 4996 about sprintf, etc., being unsafe
+  set(CMAKE_C_FLAGS "/wd4996 /WX ${CMAKE_C_FLAGS}")
+elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
+  set(CMAKE_C_FLAGS "-std=c89 -Wall -Wextra -Wswitch -Werror \
+    -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat \
+    -Werror=format-security -Wshadow ${CMAKE_C_FLAGS}")
+elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
+  set(CMAKE_C_FLAGS "-std=c89 -Wall -Wextra -Wswitch -Werror \
+    -Wc99-extensions -Wc11-extensions -Wunused-parameter -Wmissing-prototypes \
+    -Wmissing-declarations -Wformat -Werror=format-security -Wshadow \
+    -Wfloat-conversion ${CMAKE_C_FLAGS}")
+endif()
+
 #################################################################################
 # PROJ4 CMake modules
 #################################################################################
@@ -31,9 +49,9 @@ colormsg(_HIBLUE_ "Configuring PROJ:")
 #PROJ version information
 #################################################################################
 include(Proj4Version)
-proj_version(MAJOR 4 MINOR 9 PATCH 3)
-set(PROJ_API_VERSION "12")
-set(PROJ_BUILD_VERSION "12.0.0")
+proj_version(MAJOR 5 MINOR 0 PATCH 0)
+set(PROJ_API_VERSION "13")
+set(PROJ_BUILD_VERSION "13.0.1")
 
 #################################################################################
 # Build features and variants
@@ -44,15 +62,6 @@ include(Proj4Mac)
 include(policies)
 
 #################################################################################
-# Self-test build config
-#################################################################################
-
-option(SELFTEST "Include self-test in build" OFF)
-if(SELFTEST)
-    add_definitions(-DPJ_SELFTEST)
-endif(SELFTEST)
-
-#################################################################################
 # threading configuration
 #################################################################################
 set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
@@ -65,6 +74,28 @@ if (HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
     add_definitions(-DHAVE_PTHREAD_MUTEX_RECURSIVE=1)
 endif()
 
+include (CheckCSourceCompiles)
+if (MSVC)
+  set (CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS} /WX")
+else ()
+  set (CMAKE_REQUIRED_LIBRARIES m)
+  set (CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS} -Werror")
+endif ()
+# Check whether the C99 math function: hypot, atanh, etc. are available.
+check_c_source_compiles (
+  "#include <math.h>
+int main() {
+  int q;
+  return (int)(hypot(3.0, 4.0) + atanh(0.8) + cbrt(8.0) +
+               remquo(100.0, 90.0, &q) +
+               remainder(100.0, 90.0) + copysign(1.0, -0.0));
+}\n" C99_MATH)
+if (C99_MATH)
+  add_definitions (-DHAVE_C99_MATH=1)
+else ()
+  add_definitions (-DHAVE_C99_MATH=0)
+endif ()
+
 boost_report_value(PROJ_PLATFORM_NAME)
 boost_report_value(PROJ_COMPILER_NAME)
 
@@ -88,7 +119,7 @@ if(PROJ4_TESTS)
 endif(PROJ4_TESTS)
 include(Proj4Test)
 
-# Put the libaries and binaries that get built into directories at the
+# Put the libraries and binaries that get built into directories at the
 # top of the build tree rather than in hard-to-find leaf
 # directories. This simplifies manual testing and the use of the build
 # tree rather than installed Boost libraries.
@@ -106,6 +137,7 @@ set(LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries in
 set(DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.")
 set(DOCDIR "${DEFAULT_DOCDIR}" CACHE PATH "The directory to install doc files into.")
 set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}" CACHE PATH "The directory to install includes into.")
+set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}" CACHE PATH "The directory to install cmake config files into.")
 
 #################################################################################
 # Build configured components
@@ -117,4 +149,5 @@ add_subdirectory(nad)
 add_subdirectory(src)
 add_subdirectory(man)
 add_subdirectory(cmake)
+add_subdirectory(test)
 
diff --git a/ChangeLog b/ChangeLog
index ece889c..779b6d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -215,7 +215,7 @@
 
 	* src/cs2cs.c: Support -I when there is no +to projection.
 
-	* src/PJ_ob_tran.c: Propogate ctx into sub-projection (#225).
+	* src/PJ_ob_tran.c: Propagate ctx into sub-projection (#225).
 
 2013-10-03  Frank Warmerdam  <warmerdam at pobox.com>
 
@@ -293,7 +293,7 @@
 
 	* src/geodesic.{c,h}: sync relative to GeographicLib 1.31. (#216)
 
-	* src/pj_fileapi.c, etc: Implement a virtual file api accessable
+	* src/pj_fileapi.c, etc: Implement a virtual file api accessible
 	through the context for init file and grid shift file access.
 
 	* src/mk_cheby.c: reformat, add braces to avoid warnings.
@@ -415,7 +415,7 @@
 
 2012-02-08  Frank Warmerdam  <warmerdam at pobox.com>
 
-	* src/pj_apply_gridshift.c: Ensure that one amoung many points
+	* src/pj_apply_gridshift.c: Ensure that one among many points
 	falling outside the grid areas will not cause the remainder to not
 	be datum shifted in a way that is hard to diagnose. (#45)
 
@@ -564,7 +564,7 @@
 
 2011-01-11  Frank Warmerdam  <warmerdam at pobox.com>
 
-	* src/PJ_goode.c: fix propogation of es and ctx to sub-projections.
+	* src/PJ_goode.c: fix propagation of es and ctx to sub-projections.
 
 2010-10-19  Frank Warmerdam  <warmerdam at pobox.com>
 
@@ -739,7 +739,7 @@
 	* src/PJ_gstmerc.c: Correction of a bug in inv() function :
 	the projected origin coordinates where descaled.
 
-	* nad/testIGNF: Add a comment on the mandatory existance of the world grid
+	* nad/testIGNF: Add a comment on the mandatory existence of the world grid
 	in order to make the test.
 
 	* ChangeLog: this comments
@@ -934,7 +934,7 @@
 	* src/projects.h: Ensure that WIN32 is defined on win32 systems.
 
 	* src/pj_open_lib.c: support drive letter prefixes on absolute
-	paths.  Support either \ or / as a dir delimeter on windows (bug 1499)
+	paths.  Support either \ or / as a dir delimiter on windows (bug 1499)
 
 2007-03-07  Frank Warmerdam  <warmerdam at pobox.com>
 
@@ -1067,7 +1067,7 @@ Rel. 4.5.0 2006-04-21
 
 2006-01-12  Frank Warmerdam  <warmerdam at pobox.com>
 
-	* geocent.c: Make global variables static. Amoung other things
+	* geocent.c: Make global variables static. Among other things
 	this avoids conflicts for apps that link in geotrans.
 
 2005-12-04  Frank Warmerdam  <warmerdam at pobox.com>
@@ -1466,7 +1466,7 @@ Rel. 4.4.4 2001/09/15
 
 	See http://bugzilla.remotesensing.org/show_bug.cgi?id=17
 
-	* nad/epsg: commited new updates with fixed units for us state plane
+	* nad/epsg: committed new updates with fixed units for us state plane
 	zones in feet, as reported by Marc-Andre.
 
 2001-08-23  Frank Warmerdam  <warmerdam at pobox.com>
@@ -1707,7 +1707,7 @@ Rel. 4.3.2 94/10/30 Base-line
 	Thanks to: Alejo Hausner (ah at cs.princeton.edu)
 
 95/9/10
-	Some minor file/internal name changes to facilitate xport to primative
+	Some minor file/internal name changes to facilitate xport to primitive
 	systems.  Documented entries unchanged.
 
 Rel. 4.3.1 94/2/16 Base-line
@@ -1794,7 +1794,7 @@ Rel. 4.2.2 93/9/30 Base-line
 	DOS distribution.
 
 93/11/28
-	Added "Final" figure line to begining of -V option ouput.  Allows
+	Added "Final" figure line to beginning of -V option output.  Allows
 	user to see results of +ellps and +R_V, etc. arguments.  "Feature,"
 	not an error.  Mod to proj.c.
 
@@ -1893,7 +1893,7 @@ Rel. 4.1.3 93/4/15 Base-line
 93/8/19
 	Minor general corrections.
 	Added nadcon conversion procedures and nad2nad program.
-	Projects.h modified to reflect nadcon prototypes and stuctures.
+	Projects.h modified to reflect nadcon prototypes and structures.
 	pj_open_lib extracted from pj_init and made global for use in nad_init.
 
 93/8/25
diff --git a/Makefile.am b/Makefile.am
index 3795cfd..692e8a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS	=	src man nad jniwrap cmake
+SUBDIRS	=	src man nad jniwrap cmake test
 
 EXTRA_DIST = makefile.vc nmake.opt CMakeLists.txt
 
diff --git a/Makefile.in b/Makefile.in
index 2306f66..ca8e327 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,17 +15,7 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -89,6 +79,11 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = .
+DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
+	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(srcdir)/proj.pc.in COPYING config.guess config.sub depcomp \
+	install-sh missing ltmain.sh
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -96,8 +91,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
-	$(am__configure_deps) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
@@ -189,9 +182,6 @@ ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/proj.pc.in AUTHORS \
-	COPYING ChangeLog INSTALL NEWS README compile config.guess \
-	config.sub depcomp install-sh ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -275,7 +265,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -345,7 +334,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -354,7 +342,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = src man nad jniwrap cmake
+SUBDIRS = src man nad jniwrap cmake test
 EXTRA_DIST = makefile.vc nmake.opt CMakeLists.txt
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = proj.pc
@@ -378,6 +366,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -616,16 +605,10 @@ dist-xz: distdir
 	$(am__post_remove_distdir)
 
 dist-tarZ: distdir
-	@echo WARNING: "Support for distribution archives compressed with" \
-		       "legacy program 'compress' is deprecated." >&2
-	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__post_remove_distdir)
 
 dist-shar: distdir
-	@echo WARNING: "Support for shar distribution archives is" \
-	               "deprecated." >&2
-	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
 dist-zip: distdir
@@ -659,17 +642,16 @@ distcheck: dist
 	esac
 	chmod -R a-w $(distdir)
 	chmod u+w $(distdir)
-	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+	mkdir $(distdir)/_build $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
 	  && am__cwd=`pwd` \
-	  && $(am__cd) $(distdir)/_build/sub \
-	  && ../../configure \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
-	    --srcdir=../.. --prefix="$$dc_install_base" \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
 	  && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -849,8 +831,6 @@ uninstall-am: uninstall-pkgconfigDATA
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am uninstall-pkgconfigDATA
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/NEWS b/NEWS
index 6dedc72..1f9aef2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,315 @@
+5.0.0 Release Notes
+-------------------
+
+This version of PROJ introduces some significant extensions and
+improvements to (primarily) the geodetic functionality of the system.
+
+The main driver for introducing the new features is the emergence of
+dynamic reference frames, the increasing use of high accuracy GNNS,
+and the related growing demand for accurate coordinate
+transformations.  While older versions of PROJ included some geodetic
+functionality, the new framework lays the foundation for turning PROJ
+into a generic geospatial coordinate transformation engine.
+
+The core of the library is still the well established projection code.
+The new functionality is primarily exposed in a new programming
+interface and a new command line utility, "cct" (for "Coordinate
+Conversion and Transformation").  The old programming interface is
+still available and can - to some extent - use the new geodetic
+transformation features.
+
+The internal architecture has also seen many changes and much
+improvement.  So far, these improvements respect the existing
+programming interface. But the process has revealed a need to simplify
+and reduce the code base, in order to support sustained active
+development.
+
+!!!
+!!! Therefore we have scheduled regular releases over the coming years
+!!! which will gradually remove the old programming interface.
+!!!
+!!! This will cause breaking changes with the next two major version
+!!! releases, which will affect all projects that depend on PROJ
+!!! (cf. section "deprecations" below).
+!!!
+
+The decision to break the existing API has not been easy, but has
+ultimately been deemed necessary to ensure the long term survival of
+the project. Not only by improving the maintainability immensely, but
+also by extending the potential user (and hence developer) community.
+
+The end goal is to deliver a generic coordinate transformation
+software package with a clean and concise code base appealing to
+both users and developers.
+
+
+VERSIONING AND NAMING
+---------------------
+
+For the first time in more than 25 years the major version number of
+the software is changed. The decision to do this is based on the many
+new features and new API. While backwards compatibility remains -
+except in a few rare corner cases - the addition of a new and improved
+programming interface warrants a new major release.
+
+The new major version number unfortunately leaves the project in a bit
+of a conundrum regarding the name. For the majority of the life-time
+of the product it has been known as PROJ.4, but since we have now
+reached version 5 the name is no longer aligned with the version
+number.
+
+Hence we have decided to decouple the name from the version number and
+from this version and onwards the product will simply be called PROJ.
+
+In recognition of the history of the software we are keeping PROJ.4 as
+the *name of the organizing project*. The same project team also
+produces the datum-grid package.
+
+In summary:
+
+o The PROJ.4 project provides the product PROJ, which is now at
+  version 5.0.0.
+
+o The foundational component of PROJ is the library libproj.
+
+o Other PROJ components include the application proj, which provides
+  a command line interface to libproj.
+
+o The PROJ.4 project also distributes the datum-grid package,
+  which at the time of writing is at version 1.6.0.
+
+
+ UPDATES
+ -------
+
+ o Introduced new API in proj.h.
+   - The new API is orthogonal to the existing proj_api.h API and the
+     internally used projects.h API.
+   - The new API adds the ability to transform spatiotemporal (4D)
+     coordinates.
+   - Functions in the new API use the "proj_" namespace.
+   - Data types in the new API use the "PJ_" namespace, with a few
+     historic exceptions such as XY, XYZ, LP and LPZ.
+
+ o Introduced the concept of "transformation pipelines" that makes it
+   possible to do complex geodetic transformations of spatiotemporal
+   coordinates by daisy chaining simple coordinate operations.
+
+ o Introduced cct, the Coordinate Conversion and Transformation
+   application.
+
+ o Introduced gie, the Geospatial Integrity Investigation Environment.
+   - Selftest invoked by -C flag in proj has been removed
+   - Ported approx. 1300 built-in selftests to gie format
+   - Ported approx. 1000 tests from the gigs test framework
+   - Added approx. 200 new tests
+
+ o Adopted terminology from the OGC/ISO-19100 geospatial standards
+   series. Key definitions are:
+   - At the most generic level, a *coordinate operation* is a change
+     of coordinates, based on a one-to-one relationship, from one
+     coordinate reference system to another.
+   - A *transformation* is a coordinate operation in which the two
+     coordinate reference systems are based on different datums, e.g.
+     a change from a global reference frame to a regional frame.
+   - A *conversion* is a coordinate operation in which both
+     coordinate reference systems are based on the same datum,
+     e.g. change of units of coordinates.
+   - A *projection* is a coordinate conversion from an ellipsoidal
+     coordinate system to a plane. Although projections are simply
+     conversions according to the standard, they are treated as
+     separate entities in PROJ as they make up the vast majority
+     of operations in the library.
+
+ o New operations:
+   - The pipeline operator (pipeline)
+   - Transformations:
+     + Helmert transform (helmert)
+     + Horner real and complex polynomial evaluation (horner)
+     + Horizontal gridshift (hgridshift)
+     + Vertical gridshift (vgridshift)
+     + Molodensky transform (molodensky)
+     + Kinematic gridshift with deformation model (deformation)
+   - Conversions:
+     + Unit conversion (unitconvert)
+     + Axis swap (axisswap)
+   - Projections:
+     + Central Conic projection (ccon)
+
+ o Significant documentation updates, including
+   - Overhaul of the structure of the documentation
+   - A better introduction to the use of PROJ
+   - A complete reference to the new proj.h API
+   - a complete rewrite of the section on geodesic calculations
+   - Figures for all projections
+
+ o New "free format" option for operation definitions, which
+   permits separating tokens by whitespace when specifying key/value-
+   pairs, e.g. "proj = merc lat_0 = 45".
+
+ o Added metadata to init-files that can be read with the
+   proj_init_info() function in the new proj.h API.
+
+ o Added ITRF2000, ITRF2008 and ITRF2014 init-files with ITRF
+   transformation parameters, including plate motion model
+   parameters.
+
+ o Added ellipsoid parameters for GSK2011, PZ90 and "danish". The
+   latter is similar to the already supported andrae ellipsoid,
+   but has a slightly different semimajor axis.
+
+ o Added Copenhagen prime meridian.
+
+ o Updated EPSG database to version 9.2.0.
+
+ o Geodesic library updated to version 1.49.1-c.
+
+ o Support for analytical partial derivatives has been removed.
+
+ o Improved performance in Winkel Tripel and Aitoff.
+
+ o Introduced pj_has_inverse() function to proj_api.h. Checks if an
+   operation has an inverse. Use this instead of checking whether
+   P->inv exists, since that can no longer be relied on.
+
+ o Removed support for Windows CE.
+
+ o Removed the VB6 COM interface.
+
+ BUG FIXES
+ ------------
+
+ All bug fix numbers refer to issues indexed at
+ https://github.com/OSGeo/proj.4/issues/
+
+ o Fixed incorrect convergence calculation in Lambert Conformal
+   Conic. #16.
+
+ o Handle ellipsoid parameters correctly when using +nadgrids=@null.
+   #22.
+
+ o Return correct latitude when using negative northings in
+   Transverse Mercator (tmerc). #138.
+
+ o Return correct result at origin in inverse Mod. Stererographic
+   of Alaska. #161.
+
+ o Return correct result at origin in inverse Mod. Stererographic
+   of 48 U.S. #162.
+
+ o Return correct result at origin in inverse Mod. Stererographic
+   of 50 U.S. #163.
+
+ o Return correct result at origin in inverse Lee Oblated
+   Stereographic. #164.
+
+ o Return correct result at origin in inverse Miller Oblated
+   Stereographic. #164.
+
+ o Fixed scaling and wrap-around issues in Oblique Cylindrical
+   Equal Area. #166.
+
+ o Corrected a coefficient error in inverse Transverse Mercator. #174.
+
+ o Respect -r flag when calling proj with -V. #184.
+
+ o Remove multiplication by 2 at the equator error in Stereographic
+   projection. #194.
+
+ o Allow +alpha=0 and +gamma=0 when using Oblique Mercator. #195.
+
+ o Return correct result of inverse Oblique Mercator when alpha is
+   between 90 and 270. #331.
+
+ o Avoid segmentation fault when accessing point outside grid. #369.
+
+ o Avoid segmentation fault on NaN input in Robin inverse. #463.
+
+ o Very verbose use of proj (-V) on Windows is fixed. #484.
+
+ o Fixed memory leak in General Oblique Transformation. #497.
+
+ o Equations for meridian convergence and partial derivatives have
+   been corrected for non-conformal projections. #526.
+
+ o Fixed scaling of cartesian coordiantes in pj_transform(). #726.
+
+ o Additional bug fixes courtesy of Googles OSS-Fuzz program:
+   https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=proj4
+
+
+ DEPRECATIONS
+ ------------
+
+ o The projects.h header and the functions related to it is
+   considered deprecated from version 5.0.0 and onwards.
+
+
+    !!!     PROJECTS.H WILL BE REMOVED FROM THE LIBRARY     !!!
+    !!!                 WITH VERSION 6.0.0                  !!!
+
+ o The nmake build system on Windows will not be supported from
+   version 6.0.0 on onwards. Use CMake instead.
+
+    !!! NMAKE BUILD SYSTEM WILL BE REMOVED FROM THE LIBRARY !!!
+    !!!                 WITH VERSION 6.0.0                  !!!
+
+ o The proj_api.h header and the functions related to it is
+   consided deprecated from version 5.0.0 and onwards.
+
+    !!!     PROJ_API.H WILL BE REMOVED FROM THE LIBRARY     !!!
+    !!!                 WITH VERSION 7.0.0                  !!!
+
+
+ THANKS TO
+ ------------
+
+ Version 5.0.0 is made possible by the following contributors:
+
+    Lukasz Komsta
+    Maxim Churilin
+    edechaux
+    dusanjovic
+    Zoltan Siki
+    Tom Fili
+    Nicolas David
+    Mike Toews
+    Micah Cochran
+    Luke Campbell
+    Ilya Oshchepkov
+    Adam Wulkiewicz
+    Jonas Tittmann
+    Mateusz Loskot
+    Etienne Jacques
+    Bas Couwenberg
+    Elliott Sales de Andrade
+    Charles Karney
+    Aaron Puchert
+    Julien Moquet
+    Charles Karney
+    Howard Butler
+    Even Rouault
+    Thomas Knudsen
+    Kristian Evers
+
+
+4.9.3 Release Notes
+-------------------
+
+ o UTM now uses etmerc, following NGA recommendations.  Tests adjusted
+   for tiny changes in values.
+
+ o new projections: Times, Natural Earth II, Compact Miller, Patterson
+   Cylindrical, and inverse for Hammer and Eckert-Greifendorff.
+
+ o runtime self tests are now opt-in instead of opt-out
+
+ o math constants moved to projects.h
+
+ o bugfixes
+
+ o New (optional) runtime self tests added to proj
+
 4.9.2 Release Notes
 -------------------
 
diff --git a/README b/README
index 70f9838..e2a9c71 100644
--- a/README
+++ b/README
@@ -1,130 +1,88 @@
-   -------------------- P R O J . 4 --------------------
+   --------------------  P R O J  --------------------
 
-This is Release 4.4 of cartographic projection software.
+PROJ is a generic coordinate transformation software, that transforms
+coordinates from one coordinate reference system (CRS) to another. This
+includes cartographic projections as well as geodetic transformations.
 
-PLEASE read the following information as well as READMEs in the src
-and nad directories.
+For more information on the PROJ.4 project please see the web page at:
 
-For more information on PROJ.4 maintenance please see the web page at:
+    http://proj4.org/
 
-  http://www.remotesensing.org/proj
-                or
-  http://proj.maptools.org/
+The PROJ.4 mailing list can be found at:
 
-   ---------------------------------------------------
+    http://lists.maptools.org/mailman/listinfo/proj
 
-Installation:
--------------
+See the NEWS file for changes between versions.
+
+The following command line utilities are included in the PROJ package:
+
+    - proj, for cartographic projection of geodetic coordinates
+    - cs2cs, for transformation from one CRS to another CRS.
+    - geod, for geodesic (great circle) computations.
+    - cct, for generic Coordinate Conversions and Transformations.
+    - gie, the Geospatial Integrity Investigation Environment.
+
+
+
+UNIX/Linux build and installation:
+---------------------------------
 
 FSF's configuration procedure is used to ease installation of the
-PROJ.4 system.
+PROJ system.
 
 The default destination path prefix for installed files is /usr/local.
 Results from the installation script will be placed into subdirectories
 bin, include, lib, man/man1 and man/man3.  If this default path prefix
 is proper, then execute:
 
-	./configure
+    ./configure
 
 If another path prefix is required, then execute:
 
-	./configure --prefix=/my/path
+    ./configure --prefix=/my/path
 
 In either case, the directory of the prefix path must exist and be
 writable by the installer.
 
 After executing configure, execute:
 
-	make
-        make install
+    make
+    make install
 
 The install target will create, if necessary, all required sub-directories.
 
-Windows Build
--------------
 
-PROJ.4 can be built with Microsoft Visual C/C++ using the makefile.vc
+Windows build and installation:
+-------------------------------
+
+PROJ can be built with Microsoft Visual C/C++ using the makefile.vc
 in the PROJ directory.  First edit the PROJ\nmake.opt and modify
 the INSTDIR value at the top to point to the directory where
 the PROJ tree shall be installed. If you want to install into
 C:\PROJ, it can remain unchanged.
-Then use the makefile.vc to build the software:
+Then use the makefile.vc to build the software e.g.:
 
-eg. 
-C:\> cd proj
-C:\PROJ> nmake /f makefile.vc
-C:\PROJ> nmake /f makefile.vc install-all
+    C:\> cd proj
+    C:\PROJ> nmake /f makefile.vc
+    C:\PROJ> nmake /f makefile.vc install-all
 
 Note that you have to have the VC++ environment variables, and path
 setup properly.  This may involve running the VCVARS32.BAT script out
-of the Visual C++ tree.  
-
-The makefile.vc builds proj.exe, proj.dll and proj.lib. 
+of the Visual C++ tree.
 
-It should also be possible to build using the Unix instructions
-and Cygwin32, but this hasn't been tested recently. 
+The makefile.vc builds proj.exe, proj.dll and proj.lib.
 
 
-   ---------------------------------------------------
-
 Distribution files and format.
 ------------------------------
 
 Sources are distributed in one or more files.  The principle elements
-of the system are in a compress tar file named `PROJ.4.x.tar.gz' where
-"x" will indicate level.sub-level of the release.  For U.S. users
-interested in NADCON datum shifting procedures, additional files
-containing conversion matricies are distributed with the name
-`PROJ.4.x.y.tar' where y is an uppercase letter starting with "A."
-These supplementary files will contain compressed files and thus
-the tar file is not compressed.
-
-Interim reports on Rel. 4 proj are available in PostScript form as
-*.ps.gz .  New and old users are strongly recommended to carefully read
-these manuals.  They are supplements and NOT a replacement for the full
-manual OF 90-284 (which new users should also obtain).
-
-   ---------------------------------------------------
-
-Principle new aspects of system:
---------------------------------
-
-ANSI X3.159-1989 C code.  Site must have ANSI C compiler and header files.
-
-Several method of determining radius from specified ellipsoid.
-
-Use of initialization files through +init=file:key.  Default projection
-specifications also may be defined in an ASCII file.
-
-+inv option REMOVED and -I may be used in its place.  Use of invproj
-alias of proj still functions as per Rel.3.
-
-+ellps=list and +proj=list REMOVED.  Use respective -le and -lp.
-
-+units= to specify cartesian coordinate system units.  To get list
-use -lu.
-
--v added to dump final cartographic parameters employed.
-
-Addition of computing scale factors and angular distortion added through
--S option.  Valuable for designing new projection parameter details.
-
--V option which verbosely lists projected point characteristics.
-
-Programmers may use projection library with calls to pj_init,
-pj_fwd, pj_inv and pj_transform.
-
-Program nad2nad for conversion of data to and from NAD27 and NAD83
-datums.
-
-Program cs2cs for converting between coordinate systems, with optional
-datum translation.
-
--------------------------------------------------------------
-
-Things currently left undone:
-----------------------------
-
-proj_def.dat NOT fully in place.  Needs additional settings for
-many of the projections.  Probably will not be completed until main
-manual rewritten.
+of the system are in a compress tar file named `PROJ-x.y.z.tar.gz' where
+"x" will indicate major release number, "y" indicates minor release
+number and "z" indicates the patch number of the release.
+
+In addition to the PROJ software package, a distribution of datum
+conversion grid files is also available. The grid package is
+distributed under the name `PROJ-datumgrid-x.y.zip', where "x" is the
+major release version and "y" the minor release version numbers. The
+grid package can be downloaded from the PROJ.4 website.
diff --git a/aclocal.m4 b/aclocal.m4
index 87e17ce..3831c8f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15'
+[am__api_version='1.13'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.13.4], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.13.4])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -103,14 +103,15 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 # configured tree to be moved without reconfiguration.
 
 AC_DEFUN([AM_AUX_DIR_EXPAND],
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
 ])
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,7 +142,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -332,7 +333,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -408,7 +409,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -417,12 +418,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
-dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
-m4_define([AC_PROG_CC],
-m4_defn([AC_PROG_CC])
-[_AM_PROG_CC_C_O
-])
-
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
 # -----------------------------------------------
@@ -498,8 +493,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target (and possibly the TAP driver).  The
-# system "awk" is bad on some platforms.
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -531,51 +526,6 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes.  So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
-  cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present.  This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-
-Please tell bug-automake at gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message.  This
-can help us improve future automake versions.
-
-END
-  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
-    echo 'Configuration will proceed anyway, since you have set the' >&2
-    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
-    echo >&2
-  else
-    cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
-    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
-  fi
-fi
-dnl The trailing newline in this macro's definition is deliberate, for
-dnl backward compatibility and to allow trailing 'dnl'-style comments
-dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 ])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
@@ -584,6 +534,7 @@ dnl mangled by Autoconf and run in a shell conditional statement.
 m4_define([_AC_COMPILER_EXEEXT],
 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
+
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
 # that is generated.  The stamp files are numbered to have different names.
@@ -605,7 +556,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -616,7 +567,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh+set}" != xset; then
+if test x"${install_sh}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -626,7 +577,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -647,7 +598,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -697,7 +648,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -738,7 +689,7 @@ fi
 # Obsolete and "removed" macros, that must however still report explicit
 # error messages when used, to smooth transition.
 #
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -765,7 +716,7 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -794,73 +745,9 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_PROG_CC_C_O
-# ---------------
-# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
-# to automatically call this.
-AC_DEFUN([_AM_PROG_CC_C_O],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-AC_LANG_PUSH([C])dnl
-AC_CACHE_CHECK(
-  [whether $CC understands -c and -o together],
-  [am_cv_prog_cc_c_o],
-  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
-  # Make sure it works both with $CC and with simple cc.
-  # Following AC_PROG_CC_C_O, we do the test twice because some
-  # compilers refuse to overwrite an existing .o file with -o,
-  # though they will create one.
-  am_cv_prog_cc_c_o=yes
-  for am_i in 1 2; do
-    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
-         && test -f conftest2.$ac_objext; then
-      : OK
-    else
-      am_cv_prog_cc_c_o=no
-      break
-    fi
-  done
-  rm -f core conftest*
-  unset am_i])
-if test "$am_cv_prog_cc_c_o" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-AC_LANG_POP([C])])
-
-# For backward compatibility.
-AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_RUN_LOG(COMMAND)
-# -------------------
-# Run COMMAND, save the exit status in ac_status, and log it.
-# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
-AC_DEFUN([AM_RUN_LOG],
-[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
-   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   (exit $ac_status); }])
-
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -941,7 +828,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1001,7 +888,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1029,7 +916,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1048,7 +935,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 742da0e..0fcde0c 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -2,13 +2,7 @@
 # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
 # path to the root from there.  (Note that the whole install tree can
 # be relocated.)
-if (NOT WIN32)
-  set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
-  set (PROJECT_ROOT_DIR "../../..")
-else ()
-  set (INSTALL_CMAKE_DIR "cmake")
-  set (PROJECT_ROOT_DIR "..")
-endif ()
+file(RELATIVE_PATH PROJECT_ROOT_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKECONFIGDIR} ${CMAKE_INSTALL_PREFIX})
 
 string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
 configure_file (project-config.cmake.in project-config.cmake @ONLY)
@@ -16,14 +10,14 @@ configure_file (project-config-version.cmake.in
   project-config-version.cmake @ONLY)
 install (FILES
   "${CMAKE_CURRENT_BINARY_DIR}/project-config.cmake"
-  DESTINATION "${INSTALL_CMAKE_DIR}"
+  DESTINATION "${CMAKECONFIGDIR}"
   RENAME "${PROJECT_NAME_LOWER}-config.cmake")
 install (FILES
   "${CMAKE_CURRENT_BINARY_DIR}/project-config-version.cmake"
-  DESTINATION "${INSTALL_CMAKE_DIR}"
+  DESTINATION "${CMAKECONFIGDIR}"
   RENAME "${PROJECT_NAME_LOWER}-config-version.cmake")
 # Make information about the cmake targets (the library and the tools)
 # available.
 install (EXPORT targets
   FILE ${PROJECT_NAME_LOWER}-targets.cmake
-  DESTINATION "${INSTALL_CMAKE_DIR}")
+  DESTINATION "${CMAKECONFIGDIR}")
diff --git a/cmake/Makefile.in b/cmake/Makefile.in
index f4e23be..aeb224c 100644
--- a/cmake/Makefile.in
+++ b/cmake/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -88,6 +78,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = cmake
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -120,7 +110,6 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -163,7 +152,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -233,7 +221,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -271,6 +258,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cmake/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu cmake/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -445,8 +433,6 @@ uninstall-am:
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/cmake/Proj4InstallPath.cmake b/cmake/Proj4InstallPath.cmake
index da1491c..b06777f 100644
--- a/cmake/Proj4InstallPath.cmake
+++ b/cmake/Proj4InstallPath.cmake
@@ -15,19 +15,29 @@ endif(UNIX)
 
 
 IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-	SET(CMAKE_INSTALL_PREFIX ${DEFAULT_PROJ_ROOT_DIR} CACHE PATH "Foo install
+	SET(CMAKE_INSTALL_PREFIX ${DEFAULT_PROJ_ROOT_DIR} CACHE PATH "Proj.4 install
 		 prefix" FORCE)
 ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
 
-#TODO 
+#TODO
 # for data install testing the PROJ_LIB envVar
 
+string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
 if(WIN32)
   set(DEFAULT_BIN_SUBDIR bin)
   set(DEFAULT_LIB_SUBDIR local/lib)
   set(DEFAULT_DATA_SUBDIR share)
   set(DEFAULT_INCLUDE_SUBDIR local/include)
   set(DEFAULT_DOC_SUBDIR share/doc/proj)
+  set(DEFAULT_CMAKE_SUBDIR local/lib/cmake/${PROJECT_NAME_LOWER})
+elseif(UNIX)
+  include(GNUInstallDirs)
+  set(DEFAULT_BIN_SUBDIR ${CMAKE_INSTALL_BINDIR})
+  set(DEFAULT_LIB_SUBDIR ${CMAKE_INSTALL_LIBDIR})
+  set(DEFAULT_DATA_SUBDIR ${CMAKE_INSTALL_DATAROOTDIR}/proj)
+  set(DEFAULT_INCLUDE_SUBDIR ${CMAKE_INSTALL_INCLUDEDIR})
+  set(DEFAULT_DOC_SUBDIR ${CMAKE_INSTALL_DOCDIR})
+  set(DEFAULT_CMAKE_SUBDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER})
 else()
   # Common locatoins for Unix and Mac OS X
   set(DEFAULT_BIN_SUBDIR bin)
@@ -35,9 +45,11 @@ else()
   set(DEFAULT_DATA_SUBDIR share/proj)
   set(DEFAULT_DOC_SUBDIR doc/proj)
   set(DEFAULT_INCLUDE_SUBDIR include)
+  set(DEFAULT_DOC_SUBDIR share/doc/proj)
+  set(DEFAULT_CMAKE_SUBDIR lib/cmake/${PROJECT_NAME_LOWER})
 endif()
 
-# Locations are changeable by user to customize layout of PDAL installation
+# Locations are changeable by user to customize layout of Proj.4 installation
 # (default values are platform-specific)
 set(PROJ_BIN_SUBDIR ${DEFAULT_BIN_SUBDIR} CACHE STRING
   "Subdirectory where executables will be installed")
@@ -48,20 +60,24 @@ set(PROJ_INCLUDE_SUBDIR ${DEFAULT_INCLUDE_SUBDIR} CACHE STRING
 set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING
   "Subdirectory where data will be installed")
 set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING
-  "Subdirectory where data will be installed")
+  "Subdirectory where doc will be installed")
+set(PROJ_CMAKE_SUBDIR ${DEFAULT_CMAKE_SUBDIR} CACHE STRING
+  "Subdirectory where cmake proj4-config file will be installed")
 
 # Mark *DIR variables as advanced and dedicated to use by power-users only.
 mark_as_advanced(PROJ_ROOT_DIR
                  PROJ_BIN_SUBDIR
-                 PROJ_LIB_SUBDIR 
-                 PROJ_INCLUDE_SUBDIR 
+                 PROJ_LIB_SUBDIR
+                 PROJ_INCLUDE_SUBDIR
                  PROJ_DATA_SUBDIR
-                 PROJ_DOC_SUBDIR )
+                 PROJ_DOC_SUBDIR
+                 PROJ_CMAKE_SUBDIR )
 
 set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}")
 set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}")
 set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}")
 set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}")
 set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}")
+set(DEFAULT_CMAKEDIR "${PROJ_CMAKE_SUBDIR}")
 
 
diff --git a/cmake/Proj4SystemInfo.cmake b/cmake/Proj4SystemInfo.cmake
index 294a50b..fda57ed 100644
--- a/cmake/Proj4SystemInfo.cmake
+++ b/cmake/Proj4SystemInfo.cmake
@@ -50,6 +50,12 @@ if(WIN32)
     if(MSVC_VERSION EQUAL 1800)
       set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013
     endif()
+    if(MSVC_VERSION EQUAL 1900) # CMake 3.1+
+      set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015
+    endif()
+    if(MSVC_VERSION GREATER 1900 AND MSVC_VERSION LESS 1920) # CMake 3.8+
+      set(PROJ_COMPILER_NAME "msvc-14.1") #Visual Studio 2017
+    endif()
   endif(MSVC)
   
   if(MINGW)
diff --git a/cmake/Proj4Test.cmake b/cmake/Proj4Test.cmake
index a289f0c..ec56afd 100644
--- a/cmake/Proj4Test.cmake
+++ b/cmake/Proj4Test.cmake
@@ -5,7 +5,7 @@
 function(proj_add_test_script_sh SH_NAME BIN_USE)
   if(UNIX)
     get_filename_component(testname ${SH_NAME} NAME_WE)
-    
+
     set(TEST_OK 1)
     if(ARGV2)
          set(TEST_OK 0)
@@ -14,19 +14,32 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
             set(TEST_OK 1)
          endif(EXISTS ${GRID_FULLNAME})
     endif(ARGV2)
-    
+
     if( CMAKE_VERSION VERSION_LESS 2.8.4 )
        set(TEST_OK 0)
        message(STATUS "test with bash script need a cmake version >= 2.8.4")
     endif()
- 
+
     if(${TEST_OK})
       add_test( NAME "${testname}"
                 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/nad
-                COMMAND  ${PROJECT_SOURCE_DIR}/nad/${SH_NAME} 
-                         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}} 
+                COMMAND  ${PROJECT_SOURCE_DIR}/nad/${SH_NAME}
+                         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}}
                )
     endif(${TEST_OK})
-    
+
   endif(UNIX)
 endfunction()
+
+
+function(proj_add_gie_test TESTNAME TESTCASE)
+
+    set(GIE_BIN "gie")
+    set(TESTFILE ${CMAKE_SOURCE_DIR}/test/${TESTCASE})
+    add_test( NAME ${TESTNAME}
+              WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test
+              COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GIE_BIN} 
+                      ${TESTFILE}
+            )
+
+endfunction()
diff --git a/cmake/policies.cmake b/cmake/policies.cmake
index c16fbc1..e1bfd53 100644
--- a/cmake/policies.cmake
+++ b/cmake/policies.cmake
@@ -1,5 +1,4 @@
 if (CMAKE_MAJOR_VERSION GREATER 2)
-    cmake_policy(SET CMP0022 OLD) # interface link libraries
     cmake_policy(SET CMP0042 NEW) # osx rpath
     cmake_policy(SET CMP0011 NEW) # policy setting
 endif()
diff --git a/compile b/compile
deleted file mode 100755
index a85b723..0000000
--- a/compile
+++ /dev/null
@@ -1,347 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand '-c -o'.
-
-scriptversion=2012-10-14.11; # UTC
-
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey at cygnus.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake at gnu.org> or send patches to
-# <automake-patches at gnu.org>.
-
-nl='
-'
-
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent tools from complaining about whitespace usage.
-IFS=" ""	$nl"
-
-file_conv=
-
-# func_file_conv build_file lazy
-# Convert a $build file to $host form and store it in $file
-# Currently only supports Windows hosts. If the determined conversion
-# type is listed in (the comma separated) LAZY, no conversion will
-# take place.
-func_file_conv ()
-{
-  file=$1
-  case $file in
-    / | /[!/]*) # absolute file, and not a UNC file
-      if test -z "$file_conv"; then
-	# lazily determine how to convert abs files
-	case `uname -s` in
-	  MINGW*)
-	    file_conv=mingw
-	    ;;
-	  CYGWIN*)
-	    file_conv=cygwin
-	    ;;
-	  *)
-	    file_conv=wine
-	    ;;
-	esac
-      fi
-      case $file_conv/,$2, in
-	*,$file_conv,*)
-	  ;;
-	mingw/*)
-	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
-	  ;;
-	cygwin/*)
-	  file=`cygpath -m "$file" || echo "$file"`
-	  ;;
-	wine/*)
-	  file=`winepath -w "$file" || echo "$file"`
-	  ;;
-      esac
-      ;;
-  esac
-}
-
-# func_cl_dashL linkdir
-# Make cl look for libraries in LINKDIR
-func_cl_dashL ()
-{
-  func_file_conv "$1"
-  if test -z "$lib_path"; then
-    lib_path=$file
-  else
-    lib_path="$lib_path;$file"
-  fi
-  linker_opts="$linker_opts -LIBPATH:$file"
-}
-
-# func_cl_dashl library
-# Do a library search-path lookup for cl
-func_cl_dashl ()
-{
-  lib=$1
-  found=no
-  save_IFS=$IFS
-  IFS=';'
-  for dir in $lib_path $LIB
-  do
-    IFS=$save_IFS
-    if $shared && test -f "$dir/$lib.dll.lib"; then
-      found=yes
-      lib=$dir/$lib.dll.lib
-      break
-    fi
-    if test -f "$dir/$lib.lib"; then
-      found=yes
-      lib=$dir/$lib.lib
-      break
-    fi
-    if test -f "$dir/lib$lib.a"; then
-      found=yes
-      lib=$dir/lib$lib.a
-      break
-    fi
-  done
-  IFS=$save_IFS
-
-  if test "$found" != yes; then
-    lib=$lib.lib
-  fi
-}
-
-# func_cl_wrapper cl arg...
-# Adjust compile command to suit cl
-func_cl_wrapper ()
-{
-  # Assume a capable shell
-  lib_path=
-  shared=:
-  linker_opts=
-  for arg
-  do
-    if test -n "$eat"; then
-      eat=
-    else
-      case $1 in
-	-o)
-	  # configure might choose to run compile as 'compile cc -o foo foo.c'.
-	  eat=1
-	  case $2 in
-	    *.o | *.[oO][bB][jJ])
-	      func_file_conv "$2"
-	      set x "$@" -Fo"$file"
-	      shift
-	      ;;
-	    *)
-	      func_file_conv "$2"
-	      set x "$@" -Fe"$file"
-	      shift
-	      ;;
-	  esac
-	  ;;
-	-I)
-	  eat=1
-	  func_file_conv "$2" mingw
-	  set x "$@" -I"$file"
-	  shift
-	  ;;
-	-I*)
-	  func_file_conv "${1#-I}" mingw
-	  set x "$@" -I"$file"
-	  shift
-	  ;;
-	-l)
-	  eat=1
-	  func_cl_dashl "$2"
-	  set x "$@" "$lib"
-	  shift
-	  ;;
-	-l*)
-	  func_cl_dashl "${1#-l}"
-	  set x "$@" "$lib"
-	  shift
-	  ;;
-	-L)
-	  eat=1
-	  func_cl_dashL "$2"
-	  ;;
-	-L*)
-	  func_cl_dashL "${1#-L}"
-	  ;;
-	-static)
-	  shared=false
-	  ;;
-	-Wl,*)
-	  arg=${1#-Wl,}
-	  save_ifs="$IFS"; IFS=','
-	  for flag in $arg; do
-	    IFS="$save_ifs"
-	    linker_opts="$linker_opts $flag"
-	  done
-	  IFS="$save_ifs"
-	  ;;
-	-Xlinker)
-	  eat=1
-	  linker_opts="$linker_opts $2"
-	  ;;
-	-*)
-	  set x "$@" "$1"
-	  shift
-	  ;;
-	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
-	  func_file_conv "$1"
-	  set x "$@" -Tp"$file"
-	  shift
-	  ;;
-	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
-	  func_file_conv "$1" mingw
-	  set x "$@" "$file"
-	  shift
-	  ;;
-	*)
-	  set x "$@" "$1"
-	  shift
-	  ;;
-      esac
-    fi
-    shift
-  done
-  if test -n "$linker_opts"; then
-    linker_opts="-link$linker_opts"
-  fi
-  exec "$@" $linker_opts
-  exit 1
-}
-
-eat=
-
-case $1 in
-  '')
-     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand '-c -o'.
-Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file 'INSTALL'.
-
-Report bugs to <bug-automake at gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
-    func_cl_wrapper "$@"      # Doesn't return...
-    ;;
-esac
-
-ofile=
-cfile=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-	# configure might choose to run compile as 'compile cc -o foo foo.c'.
-	# So we strip '-o arg' only if arg is an object.
-	eat=1
-	case $2 in
-	  *.o | *.obj)
-	    ofile=$2
-	    ;;
-	  *)
-	    set x "$@" -o "$2"
-	    shift
-	    ;;
-	esac
-	;;
-      *.c)
-	cfile=$1
-	set x "$@" "$1"
-	shift
-	;;
-      *)
-	set x "$@" "$1"
-	shift
-	;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no '-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # '.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use '[/\\:.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/config.guess b/config.guess
index 1659250..b79252d 100755
--- a/config.guess
+++ b/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2015-08-20'
+timestamp='2013-06-10'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@ timestamp='2015-08-20'
 # program.  This Exception is an additional permission under section 7
 # of the GNU General Public License, version 3 ("GPLv3").
 #
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+# Originally written by Per Bothner.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 #
-# Please send patches to <config-patches at gnu.org>.
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
 
 
 me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -149,7 +149,7 @@ Linux|GNU|GNU/*)
 	LIBC=gnu
 	#endif
 	EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
 	;;
 esac
 
@@ -168,27 +168,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-	    /sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || \
-	    echo unknown)`
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
 	case "${UNAME_MACHINE_ARCH}" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
-	    earmv*)
-		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine=${arch}${endian}-unknown
-		;;
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently, or will in the future.
 	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
@@ -204,13 +197,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		os=netbsd
 		;;
 	esac
-	# Determine ABI tags.
-	case "${UNAME_MACHINE_ARCH}" in
-	    earm*)
-		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
-		;;
-	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
@@ -221,13 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}${abi}"
+	echo "${machine}-${os}${release}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -249,9 +235,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 	exit ;;
-    *:Sortix:*:*)
-	echo ${UNAME_MACHINE}-unknown-sortix
-	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -596,9 +579,8 @@ EOF
 	else
 		IBM_ARCH=powerpc
 	fi
-	if [ -x /usr/bin/lslpp ] ; then
-		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
-			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
 	else
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
@@ -844,7 +826,7 @@ EOF
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
-    *:MSYS*:*)
+    i*:MSYS*:*)
 	echo ${UNAME_MACHINE}-pc-msys
 	exit ;;
     i*:windows32*:*)
@@ -950,9 +932,6 @@ EOF
     crisv32:Linux:*:*)
 	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
-    e2k:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
     frv:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
@@ -990,10 +969,10 @@ EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
-    openrisc*:Linux:*:*)
-	echo or1k-unknown-linux-${LIBC}
+    or1k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
-    or32:Linux:*:* | or1k*:Linux:*:*)
+    or32:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     padre:Linux:*:*)
@@ -1041,7 +1020,7 @@ EOF
 	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -1281,26 +1260,16 @@ EOF
 	if test "$UNAME_PROCESSOR" = unknown ; then
 	    UNAME_PROCESSOR=powerpc
 	fi
-	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
-	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		    grep IS_64BIT_ARCH >/dev/null
-		then
-		    case $UNAME_PROCESSOR in
-			i386) UNAME_PROCESSOR=x86_64 ;;
-			powerpc) UNAME_PROCESSOR=powerpc64 ;;
-		    esac
-		fi
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
 	    fi
-	elif test "$UNAME_PROCESSOR" = i386 ; then
-	    # Avoid executing cc on OS X 10.9, as it ships with a stub
-	    # that puts up a graphical alert prompting to install
-	    # developer tools.  Any system running Mac OS X 10.7 or
-	    # later (Darwin 11 and later) is required to have a 64-bit
-	    # processor. This is not true of the ARM version of Darwin
-	    # that Apple uses in portable devices.
-	    UNAME_PROCESSOR=x86_64
 	fi
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit ;;
@@ -1392,6 +1361,154 @@ EOF
 	exit ;;
 esac
 
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+	"4"
+#else
+	""
+#endif
+	); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
 cat >&2 <<EOF
 $0: unable to guess system type
 
diff --git a/config.sub b/config.sub
index 1acc966..c765b34 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2015-08-20'
+timestamp='2013-04-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ timestamp='2015-08-20'
 # of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches at gnu.org>.
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches at gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,7 +117,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -255,18 +255,16 @@ case $basic_machine in
 	| arc | arceb \
 	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
 	| avr | avr32 \
-	| ba \
 	| be32 | be64 \
 	| bfin \
-	| c4x | c8051 | clipper \
+	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| e2k | epiphany \
-	| fido | fr30 | frv | ft32 \
+	| epiphany \
+	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
-	| k1om \
 	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -284,10 +282,8 @@ case $basic_machine in
 	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa32r6 | mipsisa32r6el \
 	| mipsisa64 | mipsisa64el \
 	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64r6 | mipsisa64r6el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipsr5900 | mipsr5900el \
@@ -299,14 +295,14 @@ case $basic_machine in
 	| nds32 | nds32le | nds32be \
 	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
-	| open8 | or1k | or1knd | or32 \
+	| open8 \
+	| or1k | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
-	| riscv32 | riscv64 \
 	| rl78 | rx \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -314,7 +310,6 @@ case $basic_machine in
 	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
-	| visium \
 	| we32k \
 	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
@@ -329,10 +324,7 @@ case $basic_machine in
 	c6x)
 		basic_machine=tic6x-unknown
 		;;
-	leon|leon[3-9])
-		basic_machine=sparc-$basic_machine
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -377,20 +369,18 @@ case $basic_machine in
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
-	| ba-* \
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
-	| c8051-* | clipper-* | craynv-* | cydra-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
-	| e2k-* | elxsi-* \
+	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
-	| k1om-* \
 	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
@@ -410,10 +400,8 @@ case $basic_machine in
 	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa32r6-* | mipsisa32r6el-* \
 	| mipsisa64-* | mipsisa64el-* \
 	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64r6-* | mipsisa64r6el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipsr5900-* | mipsr5900el-* \
@@ -425,18 +413,16 @@ case $basic_machine in
 	| nios-* | nios2-* | nios2eb-* | nios2el-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| open8-* \
-	| or1k*-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| riscv32-* | riscv64-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
 	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile*-* \
@@ -444,7 +430,6 @@ case $basic_machine in
 	| ubicom32-* \
 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
 	| vax-* \
-	| visium-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
@@ -521,9 +506,6 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-aros
 		;;
-        asmjs)
-		basic_machine=asmjs-unknown
-		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -785,9 +767,6 @@ case $basic_machine in
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
-	leon-*|leon[3-9]-*)
-		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
-		;;
 	m68knommu)
 		basic_machine=m68k-unknown
 		os=-linux
@@ -815,7 +794,7 @@ case $basic_machine in
 		os=-mingw64
 		;;
 	mingw32)
-		basic_machine=i686-pc
+		basic_machine=i386-pc
 		os=-mingw32
 		;;
 	mingw32ce)
@@ -843,10 +822,6 @@ case $basic_machine in
 		basic_machine=powerpc-unknown
 		os=-morphos
 		;;
-	moxiebox)
-		basic_machine=moxie-unknown
-		os=-moxiebox
-		;;
 	msdos)
 		basic_machine=i386-pc
 		os=-msdos
@@ -855,7 +830,7 @@ case $basic_machine in
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
 	msys)
-		basic_machine=i686-pc
+		basic_machine=i386-pc
 		os=-msys
 		;;
 	mvs)
@@ -1031,7 +1006,7 @@ case $basic_machine in
 		;;
 	ppc64)	basic_machine=powerpc64-unknown
 		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
 		basic_machine=powerpc64le-unknown
@@ -1379,7 +1354,7 @@ case $os in
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
 	      | -sym* | -kopensolaris* | -plan9* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* | -cloudabi* | -sortix* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1392,14 +1367,14 @@ case $os in
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1571,9 +1546,6 @@ case $basic_machine in
 	c4x-* | tic4x-*)
 		os=-coff
 		;;
-	c8051-*)
-		os=-elf
-		;;
 	hexagon-*)
 		os=-elf
 		;;
@@ -1617,6 +1589,9 @@ case $basic_machine in
 	mips*-*)
 		os=-elf
 		;;
+	or1k-*)
+		os=-elf
+		;;
 	or32-*)
 		os=-coff
 		;;
diff --git a/configure b/configure
index 499b7d3..acc50da 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for PROJ.4 Projections 4.9.3.
+# Generated by GNU Autoconf 2.69 for PROJ.4 Projections 5.0.0.
 #
 # Report bugs to <warmerdam at pobox.com>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='PROJ.4 Projections'
 PACKAGE_TARNAME='proj'
-PACKAGE_VERSION='4.9.3'
-PACKAGE_STRING='PROJ.4 Projections 4.9.3'
+PACKAGE_VERSION='5.0.0'
+PACKAGE_STRING='PROJ.4 Projections 5.0.0'
 PACKAGE_BUGREPORT='warmerdam at pobox.com'
 PACKAGE_URL=''
 
@@ -639,7 +639,6 @@ THREAD_LIB
 MUTEX_SETTING
 JNI_INCLUDE
 CPP
-LT_SYS_LIBRARY_PATH
 OTOOL64
 OTOOL
 LIPO
@@ -733,7 +732,6 @@ infodir
 docdir
 oldincludedir
 includedir
-runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -762,7 +760,6 @@ enable_shared
 enable_static
 with_pic
 enable_fast_install
-with_aix_soname
 with_gnu_ld
 with_sysroot
 enable_libtool_lock
@@ -777,7 +774,6 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
-LT_SYS_LIBRARY_PATH
 CPP'
 
 
@@ -817,7 +813,6 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1070,15 +1065,6 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1216,7 +1202,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir runstatedir
+		libdir localedir mandir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1329,7 +1315,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures PROJ.4 Projections 4.9.3 to adapt to many kinds of systems.
+\`configure' configures PROJ.4 Projections 5.0.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1369,7 +1355,6 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1400,7 +1385,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of PROJ.4 Projections 4.9.3:";;
+     short | recursive ) echo "Configuration of PROJ.4 Projections 5.0.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1425,12 +1410,9 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
-  --with-aix-soname=aix|svr4|both
-                          shared library versioning (aka "SONAME") variant to
-                          provide on AIX, [default=aix].
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
-  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
-                          compiler's sysroot if not specified).
+  --with-sysroot=DIR Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).
   --with-jni=dir          Include Java/JNI support, add optional include dir
 
   --without-mutex         Disable real mutex locks (lacking pthreads)
@@ -1443,8 +1425,6 @@ Some influential environment variables:
   LIBS        libraries to pass to the linker, e.g. -l<library>
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
-  LT_SYS_LIBRARY_PATH
-              User-defined run-time library search path.
   CPP         C preprocessor
 
 Use these variables to override the choices made by `configure' or to help
@@ -1513,7 +1493,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-PROJ.4 Projections configure 4.9.3
+PROJ.4 Projections configure 5.0.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1928,7 +1908,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by PROJ.4 Projections $as_me 4.9.3, which was
+It was created by PROJ.4 Projections $as_me 5.0.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2313,7 +2293,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
-am__api_version='1.15'
+am__api_version='1.13'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2485,8 +2465,8 @@ test "$program_suffix" != NONE &&
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
 
 if test x"${MISSING+set}" != xset; then
   case $am_aux_dir in
@@ -2505,7 +2485,7 @@ else
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh+set}" != xset; then
+if test x"${install_sh}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -2799,7 +2779,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='proj'
- VERSION='4.9.3'
+ VERSION='5.0.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2833,8 +2813,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target (and possibly the TAP driver).  The
-# system "awk" is bad on some platforms.
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
@@ -2850,48 +2830,6 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes.  So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
-  cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present.  This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-
-Please tell bug-automake at gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message.  This
-can help us improve future automake versions.
-
-END
-  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
-    echo 'Configuration will proceed anyway, since you have set the' >&2
-    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
-    echo >&2
-  else
-    cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
-    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
-  fi
-fi
-
 ac_config_headers="$ac_config_headers src/proj_config.h"
 
 
@@ -3747,65 +3685,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-  # Make sure it works both with $CC and with simple cc.
-  # Following AC_PROG_CC_C_O, we do the test twice because some
-  # compilers refuse to overwrite an existing .o file with -o,
-  # though they will create one.
-  am_cv_prog_cc_c_o=yes
-  for am_i in 1 2; do
-    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
-   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); } \
-         && test -f conftest2.$ac_objext; then
-      : OK
-    else
-      am_cv_prog_cc_c_o=no
-      break
-    fi
-  done
-  rm -f core conftest*
-  unset am_i
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
-if test "$am_cv_prog_cc_c_o" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
 depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -4541,65 +4420,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-  # Make sure it works both with $CC and with simple cc.
-  # Following AC_PROG_CC_C_O, we do the test twice because some
-  # compilers refuse to overwrite an existing .o file with -o,
-  # though they will create one.
-  am_cv_prog_cc_c_o=yes
-  for am_i in 1 2; do
-    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
-   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); } \
-         && test -f conftest2.$ac_objext; then
-      : OK
-    else
-      am_cv_prog_cc_c_o=no
-      break
-    fi
-  done
-  rm -f core conftest*
-  unset am_i
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
-if test "$am_cv_prog_cc_c_o" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
 depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -4779,8 +4599,8 @@ esac
 
 
 
-macro_version='2.4.6'
-macro_revision='2.4.6'
+macro_version='2.4.2'
+macro_revision='1.3337'
 
 
 
@@ -4794,7 +4614,7 @@ macro_revision='2.4.6'
 
 
 
-ltmain=$ac_aux_dir/ltmain.sh
+ltmain="$ac_aux_dir/ltmain.sh"
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -4914,7 +4734,7 @@ func_echo_all ()
     $ECHO ""
 }
 
-case $ECHO in
+case "$ECHO" in
   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
 $as_echo "printf" >&6; } ;;
   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
@@ -5237,19 +5057,19 @@ test -z "$GREP" && GREP=grep
 
 # Check whether --with-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then :
-  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
 else
   with_gnu_ld=no
 fi
 
 ac_prog=ld
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
 $as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return, which upsets mingw
+    # gcc leaves a trailing carriage return which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -5263,7 +5083,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD=$ac_prog
+      test -z "$LD" && LD="$ac_prog"
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -5274,7 +5094,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
     with_gnu_ld=unknown
     ;;
   esac
-elif test yes = "$with_gnu_ld"; then
+elif test "$with_gnu_ld" = yes; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
 $as_echo_n "checking for GNU ld... " >&6; }
 else
@@ -5285,32 +5105,32 @@ if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
-  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS=$lt_save_ifs
+    IFS="$lt_save_ifs"
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD=$ac_dir/$ac_prog
+      lt_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-	test no != "$with_gnu_ld" && break
+	test "$with_gnu_ld" != no && break
 	;;
       *)
-	test yes != "$with_gnu_ld" && break
+	test "$with_gnu_ld" != yes && break
 	;;
       esac
     fi
   done
-  IFS=$lt_save_ifs
+  IFS="$lt_save_ifs"
 else
-  lt_cv_path_LD=$LD # Let the user override the test with a path.
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 fi
 fi
 
-LD=$lt_cv_path_LD
+LD="$lt_cv_path_LD"
 if test -n "$LD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
 $as_echo "$LD" >&6; }
@@ -5353,38 +5173,33 @@ if ${lt_cv_path_NM+:} false; then :
 else
   if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM=$NM
+  lt_cv_path_NM="$NM"
 else
-  lt_nm_to_check=${ac_tool_prefix}nm
+  lt_nm_to_check="${ac_tool_prefix}nm"
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm=$ac_dir/$lt_tmp_nm
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
 	#   nm: unknown option "B" ignored
 	# Tru64's nm complains that /dev/null is an invalid object file
-	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
-	case $build_os in
-	mingw*) lt_bad_file=conftest.nm/nofile ;;
-	*) lt_bad_file=/dev/null ;;
-	esac
-	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
-	*$lt_bad_file* | *'Invalid file or object type'*)
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
-	  break 2
+	  break
 	  ;;
 	*)
 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
-	    break 2
+	    break
 	    ;;
 	  *)
 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -5395,15 +5210,15 @@ else
 	esac
       fi
     done
-    IFS=$lt_save_ifs
+    IFS="$lt_save_ifs"
   done
   : ${lt_cv_path_NM=no}
 fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
 $as_echo "$lt_cv_path_NM" >&6; }
-if test no != "$lt_cv_path_NM"; then
-  NM=$lt_cv_path_NM
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
   if test -n "$DUMPBIN"; then :
@@ -5509,9 +5324,9 @@ esac
   fi
 fi
 
-    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
     *COFF*)
-      DUMPBIN="$DUMPBIN -symbols -headers"
+      DUMPBIN="$DUMPBIN -symbols"
       ;;
     *)
       DUMPBIN=:
@@ -5519,8 +5334,8 @@ fi
     esac
   fi
 
-  if test : != "$DUMPBIN"; then
-    NM=$DUMPBIN
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
   fi
 fi
 test -z "$NM" && NM=nm
@@ -5560,7 +5375,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
-  teststring=ABCD
+  teststring="ABCD"
 
   case $build_os in
   msdosdjgpp*)
@@ -5600,7 +5415,7 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -5650,23 +5465,22 @@ else
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len" && \
-       test undefined != "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8; do
+      for i in 1 2 3 4 5 6 7 8 ; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test 17 != "$i" # 1/2 MB should be enough
+	      test $i != 17 # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -5684,7 +5498,7 @@ else
 
 fi
 
-if test -n "$lt_cv_sys_max_cmd_len"; then
+if test -n $lt_cv_sys_max_cmd_len ; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
 else
@@ -5702,6 +5516,30 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
 : ${MV="mv -f"}
 : ${RM="rm -f"}
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
@@ -5824,13 +5662,13 @@ esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    if test yes != "$GCC"; then
+    if test "$GCC" != yes; then
       reload_cmds=false
     fi
     ;;
   darwin*)
-    if test yes = "$GCC"; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
@@ -5958,13 +5796,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# 'unknown' -- same as none, but documents that we really don't know.
+# `unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# that responds to the $file_magic_cmd with a given extended regex.
-# If you have 'file' or equivalent on your system and you're not sure
-# whether 'pass_all' will *always* work, you probably want this one.
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[4-9]*)
@@ -5991,7 +5829,8 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
@@ -6027,6 +5866,10 @@ freebsd* | dragonfly*)
   fi
   ;;
 
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -6065,11 +5908,11 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd* | netbsdelf*-gnu)
+netbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
   else
@@ -6087,8 +5930,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd* | bitrig*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -6141,9 +5984,6 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
-os2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 esac
 
 fi
@@ -6301,8 +6141,8 @@ else
 
 case $host_os in
 cygwin* | mingw* | pw32* | cegcc*)
-  # two different shell functions defined in ltmain.sh;
-  # decide which one to use based on capabilities of $DLLTOOL
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
   case `$DLLTOOL --help 2>&1` in
   *--identify-strict*)
     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -6314,7 +6154,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   ;;
 *)
   # fallback: assume linklib IS sharedlib
-  lt_cv_sharedlib_from_linklib_cmd=$ECHO
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
   ;;
 esac
 
@@ -6468,7 +6308,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-      if test 0 -eq "$ac_status"; then
+      if test "$ac_status" -eq 0; then
 	# Ensure the archiver fails upon bogus file names.
 	rm -f conftest.$ac_objext libconftest.a
 	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@@ -6476,7 +6316,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-	if test 0 -ne "$ac_status"; then
+	if test "$ac_status" -ne 0; then
           lt_cv_ar_at_file=@
         fi
       fi
@@ -6489,7 +6329,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
 $as_echo "$lt_cv_ar_at_file" >&6; }
 
-if test no = "$lt_cv_ar_at_file"; then
+if test "x$lt_cv_ar_at_file" = xno; then
   archiver_list_spec=
 else
   archiver_list_spec=$lt_cv_ar_at_file
@@ -6706,7 +6546,7 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  bitrig* | openbsd*)
+  openbsd*)
     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
@@ -6796,7 +6636,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[ABCDGISTW]'
   ;;
 hpux*)
-  if test ia64 = "$host_cpu"; then
+  if test "$host_cpu" = ia64; then
     symcode='[ABCDEGRST]'
   fi
   ;;
@@ -6829,44 +6669,14 @@ case `$NM -V 2>&1` in
   symcode='[ABCDGIRSTW]' ;;
 esac
 
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-  # Gets list of data symbols to import.
-  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
-  # Adjust the below global symbol transforms to fixup imported variables.
-  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
-  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
-  lt_c_name_lib_hook="\
-  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
-  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
-else
-  # Disable hooks by default.
-  lt_cv_sys_global_symbol_to_import=
-  lt_cdecl_hook=
-  lt_c_name_hook=
-  lt_c_name_lib_hook=
-fi
-
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
-$lt_cdecl_hook\
-" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
-$lt_c_name_hook\
-" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
-
-# Transform an extracted symbol line into symbol name with lib prefix and
-# symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
-$lt_c_name_lib_hook\
-" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -6884,24 +6694,21 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function,
-    # D for any global variable and I for any imported variable.
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
-"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
-"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
-"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
-"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -6949,11 +6756,11 @@ _LT_EOF
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
-/* DATA imports from DLLs on WIN32 can't be const, because runtime
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
    relocations are performed -- see ld's documentation on pseudo-relocs.  */
 # define LT_DLSYM_CONST
-#elif defined __osf__
+#elif defined(__osf__)
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
@@ -6979,7 +6786,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 	  cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -6999,13 +6806,13 @@ _LT_EOF
 	  mv conftest.$ac_objext conftstm.$ac_objext
 	  lt_globsym_save_LIBS=$LIBS
 	  lt_globsym_save_CFLAGS=$CFLAGS
-	  LIBS=conftstm.$ac_objext
+	  LIBS="conftstm.$ac_objext"
 	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
 	  LIBS=$lt_globsym_save_LIBS
@@ -7026,7 +6833,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test yes = "$pipe_works"; then
+  if test "$pipe_works" = yes; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -7079,16 +6886,6 @@ fi
 
 
 
-
-
-
-
-
-
-
-
-
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
 $as_echo_n "checking for sysroot... " >&6; }
 
@@ -7101,9 +6898,9 @@ fi
 
 
 lt_sysroot=
-case $with_sysroot in #(
+case ${with_sysroot} in #(
  yes)
-   if test yes = "$GCC"; then
+   if test "$GCC" = yes; then
      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
    fi
    ;; #(
@@ -7113,8 +6910,8 @@ case $with_sysroot in #(
  no|'')
    ;; #(
  *)
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
-$as_echo "$with_sysroot" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
    ;;
 esac
@@ -7126,99 +6923,18 @@ $as_echo "${lt_sysroot:-no}" >&6; }
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
-$as_echo_n "checking for a working dd... " >&6; }
-if ${ac_cv_path_lt_DD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-: ${lt_DD:=$DD}
-if test -z "$lt_DD"; then
-  ac_path_lt_DD_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in dd; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_lt_DD" || continue
-if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
-  cmp -s conftest.i conftest.out \
-  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
-fi
-      $ac_path_lt_DD_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_lt_DD"; then
-    :
-  fi
-else
-  ac_cv_path_lt_DD=$lt_DD
-fi
-
-rm -f conftest.i conftest2.i conftest.out
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
-$as_echo "$ac_cv_path_lt_DD" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
-$as_echo_n "checking how to truncate binary pipes... " >&6; }
-if ${lt_cv_truncate_bin+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-lt_cv_truncate_bin=
-if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
-  cmp -s conftest.i conftest.out \
-  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
-fi
-rm -f conftest.i conftest2.i conftest.out
-test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
-$as_echo "$lt_cv_truncate_bin" >&6; }
-
-
-
-
-
-
-
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-func_cc_basename ()
-{
-    for cc_temp in $*""; do
-      case $cc_temp in
-        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-        \-*) ;;
-        *) break;;
-      esac
-    done
-    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-}
-
 # Check whether --enable-libtool-lock was given.
 if test "${enable_libtool_lock+set}" = set; then :
   enableval=$enable_libtool_lock;
 fi
 
-test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
 case $host in
 ia64-*-hpux*)
-  # Find out what ABI is being produced by ac_compile, and set mode
-  # options accordingly.
+  # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7227,25 +6943,24 @@ ia64-*-hpux*)
   test $ac_status = 0; }; then
     case `/usr/bin/file conftest.$ac_objext` in
       *ELF-32*)
-	HPUX_IA64_MODE=32
+	HPUX_IA64_MODE="32"
 	;;
       *ELF-64*)
-	HPUX_IA64_MODE=64
+	HPUX_IA64_MODE="64"
 	;;
     esac
   fi
   rm -rf conftest*
   ;;
 *-*-irix6*)
-  # Find out what ABI is being produced by ac_compile, and set linker
-  # options accordingly.
+  # Find out which ABI we are using.
   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    if test yes = "$lt_cv_prog_gnu_ld"; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
       case `/usr/bin/file conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -melf32bsmip"
@@ -7274,50 +6989,9 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-mips64*-*linux*)
-  # Find out what ABI is being produced by ac_compile, and set linker
-  # options accordingly.
-  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-    emul=elf
-    case `/usr/bin/file conftest.$ac_objext` in
-      *32-bit*)
-	emul="${emul}32"
-	;;
-      *64-bit*)
-	emul="${emul}64"
-	;;
-    esac
-    case `/usr/bin/file conftest.$ac_objext` in
-      *MSB*)
-	emul="${emul}btsmip"
-	;;
-      *LSB*)
-	emul="${emul}ltsmip"
-	;;
-    esac
-    case `/usr/bin/file conftest.$ac_objext` in
-      *N32*)
-	emul="${emul}n32"
-	;;
-    esac
-    LD="${LD-ld} -m $emul"
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out what ABI is being produced by ac_compile, and set linker
-  # options accordingly.  Note that the listed cases only cover the
-  # situations where additional linker options are needed (such as when
-  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
-  # vice versa); the common cases where no linker options are needed do
-  # not appear in the list.
+  # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7331,19 +7005,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    case `/usr/bin/file conftest.o` in
-	      *x86-64*)
-		LD="${LD-ld} -m elf32_x86_64"
-		;;
-	      *)
-		LD="${LD-ld} -m elf_i386"
-		;;
-	    esac
-	    ;;
-	  powerpc64le-*linux*)
-	    LD="${LD-ld} -m elf32lppclinux"
+	    LD="${LD-ld} -m elf_i386"
 	    ;;
-	  powerpc64-*linux*)
+	  ppc64-*linux*|powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -7362,10 +7026,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  powerpcle-*linux*)
-	    LD="${LD-ld} -m elf64lppc"
-	    ;;
-	  powerpc-*linux*)
+	  ppc*-*linux*|powerpc*-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -7383,7 +7044,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS=$CFLAGS
+  SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
@@ -7423,14 +7084,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
 $as_echo "$lt_cv_cc_needs_belf" >&6; }
-  if test yes != "$lt_cv_cc_needs_belf"; then
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS=$SAVE_CFLAGS
+    CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
 *-*solaris*)
-  # Find out what ABI is being produced by ac_compile, and set linker
-  # options accordingly.
+  # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7442,7 +7102,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
       case $lt_cv_prog_gnu_ld in
       yes*)
         case $host in
-        i?86-*-solaris*|x86_64-*-solaris*)
+        i?86-*-solaris*)
           LD="${LD-ld} -m elf_x86_64"
           ;;
         sparc*-*-solaris*)
@@ -7451,7 +7111,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
         esac
         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
-          LD=${LD-ld}_sol2
+          LD="${LD-ld}_sol2"
         fi
         ;;
       *)
@@ -7467,7 +7127,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
   ;;
 esac
 
-need_locks=$enable_libtool_lock
+need_locks="$enable_libtool_lock"
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
@@ -7578,7 +7238,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test yes != "$lt_cv_path_mainfest_tool"; then
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
   MANIFEST_TOOL=:
 fi
 
@@ -8081,7 +7741,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
-      if test -z "$LT_MULTI_MODULE"; then
+      if test -z "${LT_MULTI_MODULE}"; then
 	# By default we will add the -single_module flag. You can override
 	# by either setting the environment variable LT_MULTI_MODULE
 	# non-empty at configure time, or by adding -multi_module to the
@@ -8099,7 +7759,7 @@ else
 	  cat conftest.err >&5
 	# Otherwise, if the output was created with a 0 exit code from
 	# the compiler, it worked.
-	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&5
@@ -8138,7 +7798,7 @@ else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-	LDFLAGS=$save_LDFLAGS
+	LDFLAGS="$save_LDFLAGS"
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
@@ -8167,7 +7827,7 @@ _LT_EOF
       _lt_result=$?
       if test -s conftest.err && $GREP force_load conftest.err; then
 	cat conftest.err >&5
-      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&5
@@ -8180,32 +7840,32 @@ fi
 $as_echo "$lt_cv_ld_force_load" >&6; }
     case $host_os in
     rhapsody* | darwin1.[012])
-      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-	10.[012][,.]*)
-	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	10.[012]*)
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 	10.*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test yes = "$lt_cv_apple_cc_single_mod"; then
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test yes = "$lt_cv_ld_exported_symbols_list"; then
-      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -8213,41 +7873,6 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
     ;;
   esac
 
-# func_munge_path_list VARIABLE PATH
-# -----------------------------------
-# VARIABLE is name of variable containing _space_ separated list of
-# directories to be munged by the contents of PATH, which is string
-# having a format:
-# "DIR[:DIR]:"
-#       string "DIR[ DIR]" will be prepended to VARIABLE
-# ":DIR[:DIR]"
-#       string "DIR[ DIR]" will be appended to VARIABLE
-# "DIRP[:DIRP]::[DIRA:]DIRA"
-#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
-#       "DIRA[ DIRA]" will be appended to VARIABLE
-# "DIR[:DIR]"
-#       VARIABLE will be replaced by "DIR[ DIR]"
-func_munge_path_list ()
-{
-    case x$2 in
-    x)
-        ;;
-    *:)
-        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
-        ;;
-    x:*)
-        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
-        ;;
-    *::*)
-        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
-        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
-        ;;
-    *)
-        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
-        ;;
-    esac
-}
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8551,14 +8176,14 @@ if test "${enable_shared+set}" = set; then :
     *)
       enable_shared=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
       for pkg in $enableval; do
-	IFS=$lt_save_ifs
+	IFS="$lt_save_ifs"
 	if test "X$pkg" = "X$p"; then
 	  enable_shared=yes
 	fi
       done
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       ;;
     esac
 else
@@ -8582,14 +8207,14 @@ if test "${enable_static+set}" = set; then :
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
       for pkg in $enableval; do
-	IFS=$lt_save_ifs
+	IFS="$lt_save_ifs"
 	if test "X$pkg" = "X$p"; then
 	  enable_static=yes
 	fi
       done
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       ;;
     esac
 else
@@ -8613,14 +8238,14 @@ if test "${with_pic+set}" = set; then :
     *)
       pic_mode=default
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
       for lt_pkg in $withval; do
-	IFS=$lt_save_ifs
+	IFS="$lt_save_ifs"
 	if test "X$lt_pkg" = "X$lt_p"; then
 	  pic_mode=yes
 	fi
       done
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       ;;
     esac
 else
@@ -8628,6 +8253,8 @@ else
 fi
 
 
+test -z "$pic_mode" && pic_mode=default
+
 
 
 
@@ -8643,14 +8270,14 @@ if test "${enable_fast_install+set}" = set; then :
     *)
       enable_fast_install=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
       for pkg in $enableval; do
-	IFS=$lt_save_ifs
+	IFS="$lt_save_ifs"
 	if test "X$pkg" = "X$p"; then
 	  enable_fast_install=yes
 	fi
       done
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       ;;
     esac
 else
@@ -8664,63 +8291,11 @@ fi
 
 
 
-  shared_archive_member_spec=
-case $host,$enable_shared in
-power*-*-aix[5-9]*,yes)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
-$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
-
-# Check whether --with-aix-soname was given.
-if test "${with_aix_soname+set}" = set; then :
-  withval=$with_aix_soname; case $withval in
-    aix|svr4|both)
-      ;;
-    *)
-      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
-      ;;
-    esac
-    lt_cv_with_aix_soname=$with_aix_soname
-else
-  if ${lt_cv_with_aix_soname+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_with_aix_soname=aix
-fi
-
-    with_aix_soname=$lt_cv_with_aix_soname
-fi
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
-$as_echo "$with_aix_soname" >&6; }
-  if test aix != "$with_aix_soname"; then
-    # For the AIX way of multilib, we name the shared archive member
-    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
-    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
-    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
-    # the AIX toolchain works better with OBJECT_MODE set (default 32).
-    if test 64 = "${OBJECT_MODE-32}"; then
-      shared_archive_member_spec=shr_64
-    else
-      shared_archive_member_spec=shr
-    fi
-  fi
-  ;;
-*)
-  with_aix_soname=aix
-  ;;
-esac
-
-
-
-
-
-
-
 
 
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS=$ltmain
+LIBTOOL_DEPS="$ltmain"
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -8769,7 +8344,7 @@ test -z "$LN_S" && LN_S="ln -s"
 
 
 
-if test -n "${ZSH_VERSION+set}"; then
+if test -n "${ZSH_VERSION+set}" ; then
    setopt NO_GLOB_SUBST
 fi
 
@@ -8808,7 +8383,7 @@ aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test set != "${COLLECT_NAMES+set}"; then
+  if test "X${COLLECT_NAMES+set}" != Xset; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
@@ -8819,14 +8394,14 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a '.a' archive for static linking (except MSVC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld=$lt_cv_prog_gnu_ld
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-old_CC=$CC
-old_CFLAGS=$CFLAGS
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -8835,8 +8410,15 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 test -z "$LD" && LD=ld
 test -z "$ac_objext" && ac_objext=o
 
-func_cc_basename $compiler
-cc_basename=$func_cc_basename_result
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 
 
 # Only perform the check for file, if the check method requires it
@@ -8851,22 +8433,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD=$MAGIC_CMD
-  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS=$lt_save_ifs
+    IFS="$lt_save_ifs"
     test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/${ac_tool_prefix}file"; then
-      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
@@ -8889,13 +8471,13 @@ _LT_EOF
       break
     fi
   done
-  IFS=$lt_save_ifs
-  MAGIC_CMD=$lt_save_MAGIC_CMD
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
   ;;
 esac
 fi
 
-MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 if test -n "$MAGIC_CMD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
@@ -8917,22 +8499,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD=$MAGIC_CMD
-  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS=$lt_save_ifs
+    IFS="$lt_save_ifs"
     test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/file"; then
-      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
@@ -8955,13 +8537,13 @@ _LT_EOF
       break
     fi
   done
-  IFS=$lt_save_ifs
-  MAGIC_CMD=$lt_save_MAGIC_CMD
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
   ;;
 esac
 fi
 
-MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 if test -n "$MAGIC_CMD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
@@ -8982,7 +8564,7 @@ esac
 
 # Use C for the default configuration in the libtool script
 
-lt_save_CC=$CC
+lt_save_CC="$CC"
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -9044,7 +8626,7 @@ if test -n "$compiler"; then
 
 lt_prog_compiler_no_builtin_flag=
 
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
   case $cc_basename in
   nvcc*)
     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
@@ -9060,7 +8642,7 @@ else
   lt_cv_prog_compiler_rtti_exceptions=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -9090,7 +8672,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
-if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
     :
@@ -9108,18 +8690,17 @@ lt_prog_compiler_pic=
 lt_prog_compiler_static=
 
 
-  if test yes = "$GCC"; then
+  if test "$GCC" = yes; then
     lt_prog_compiler_wl='-Wl,'
     lt_prog_compiler_static='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test ia64 = "$host_cpu"; then
+      if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static='-Bstatic'
       fi
-      lt_prog_compiler_pic='-fPIC'
       ;;
 
     amigaos*)
@@ -9130,8 +8711,8 @@ lt_prog_compiler_static=
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the '-m68020' flag to GCC prevents building anything better,
-            # like '-m68040'.
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -9147,11 +8728,6 @@ lt_prog_compiler_static=
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
       lt_prog_compiler_pic='-DDLL_EXPORT'
-      case $host_os in
-      os2*)
-	lt_prog_compiler_static='$wl-static'
-	;;
-      esac
       ;;
 
     darwin* | rhapsody*)
@@ -9222,7 +8798,7 @@ lt_prog_compiler_static=
     case $host_os in
     aix*)
       lt_prog_compiler_wl='-Wl,'
-      if test ia64 = "$host_cpu"; then
+      if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static='-Bstatic'
       else
@@ -9230,29 +8806,10 @@ lt_prog_compiler_static=
       fi
       ;;
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic='-fno-common'
-      case $cc_basename in
-      nagfor*)
-        # NAG Fortran compiler
-        lt_prog_compiler_wl='-Wl,-Wl,,'
-        lt_prog_compiler_pic='-PIC'
-        lt_prog_compiler_static='-Bstatic'
-        ;;
-      esac
-      ;;
-
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       lt_prog_compiler_pic='-DDLL_EXPORT'
-      case $host_os in
-      os2*)
-	lt_prog_compiler_static='$wl-static'
-	;;
-      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -9268,7 +8825,7 @@ lt_prog_compiler_static=
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='$wl-a ${wl}archive'
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -9277,9 +8834,9 @@ lt_prog_compiler_static=
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
-      # old Intel for x86_64, which still supported -KPIC.
+      # old Intel for x86_64 which still supported -KPIC.
       ecc*)
 	lt_prog_compiler_wl='-Wl,'
 	lt_prog_compiler_pic='-KPIC'
@@ -9304,12 +8861,6 @@ lt_prog_compiler_static=
 	lt_prog_compiler_pic='-PIC'
 	lt_prog_compiler_static='-Bstatic'
 	;;
-      tcc*)
-	# Fabrice Bellard et al's Tiny C Compiler
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='-fPIC'
-	lt_prog_compiler_static='-static'
-	;;
       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
@@ -9407,7 +8958,7 @@ lt_prog_compiler_static=
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec; then
+      if test -d /usr/nec ;then
 	lt_prog_compiler_pic='-Kconform_pic'
 	lt_prog_compiler_static='-Bstatic'
       fi
@@ -9436,7 +8987,7 @@ lt_prog_compiler_static=
   fi
 
 case $host_os in
-  # For platforms that do not support PIC, -DPIC is meaningless:
+  # For platforms which do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic=
     ;;
@@ -9468,7 +9019,7 @@ else
   lt_cv_prog_compiler_pic_works=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -9498,7 +9049,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
-if test yes = "$lt_cv_prog_compiler_pic_works"; then
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
     case $lt_prog_compiler_pic in
      "" | " "*) ;;
      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -9530,7 +9081,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
-   save_LDFLAGS=$LDFLAGS
+   save_LDFLAGS="$LDFLAGS"
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -9549,13 +9100,13 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS=$save_LDFLAGS
+   LDFLAGS="$save_LDFLAGS"
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-if test yes = "$lt_cv_prog_compiler_static_works"; then
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
     :
 else
     lt_prog_compiler_static=
@@ -9675,8 +9226,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
-hard_links=nottested
-if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -9688,9 +9239,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
 $as_echo "$hard_links" >&6; }
-  if test no = "$hard_links"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -9733,9 +9284,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # included in the symbol list
   include_expsyms=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ' (' and ')$', so one must not match beginning or
-  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
-  # as well as any symbol that contains 'd'.
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -9750,7 +9301,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test yes != "$GCC"; then
+    if test "$GCC" != yes; then
       with_gnu_ld=no
     fi
     ;;
@@ -9758,12 +9309,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd* | bitrig*)
+  openbsd*)
     with_gnu_ld=no
     ;;
-  linux* | k*bsd*-gnu | gnu*)
-    link_all_deplibs=no
-    ;;
   esac
 
   ld_shlibs=yes
@@ -9771,7 +9319,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # On some targets, GNU ld is compatible enough with the native linker
   # that we're better off using the native interface for both.
   lt_use_gnu_ld_interface=no
-  if test yes = "$with_gnu_ld"; then
+  if test "$with_gnu_ld" = yes; then
     case $host_os in
       aix*)
 	# The AIX port of GNU ld has always aspired to compatibility
@@ -9793,24 +9341,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     esac
   fi
 
-  if test yes = "$lt_use_gnu_ld_interface"; then
+  if test "$lt_use_gnu_ld_interface" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='$wl'
+    wlarc='${wl}'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
-    export_dynamic_flag_spec='$wl--export-dynamic'
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
     else
       whole_archive_flag_spec=
     fi
     supports_anon_versioning=no
-    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+    case `$LD -v 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -9823,7 +9371,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     case $host_os in
     aix[3-9]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test ia64 != "$host_cpu"; then
+      if test "$host_cpu" != ia64; then
 	ld_shlibs=no
 	cat <<_LT_EOF 1>&2
 
@@ -9842,7 +9390,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
@@ -9858,7 +9406,7 @@ _LT_EOF
 	allow_undefined_flag=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -9868,7 +9416,7 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
-      export_dynamic_flag_spec='$wl--export-all-symbols'
+      export_dynamic_flag_spec='${wl}--export-all-symbols'
       allow_undefined_flag=unsupported
       always_export_symbols=no
       enable_shared_with_static_runtimes=yes
@@ -9876,89 +9424,61 @@ _LT_EOF
       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file, use it as
-	# is; otherwise, prepend EXPORTS...
-	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
-          cp $export_symbols $output_objdir/$soname.def;
-        else
-          echo EXPORTS > $output_objdir/$soname.def;
-          cat $export_symbols >> $output_objdir/$soname.def;
-        fi~
-        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
 	ld_shlibs=no
       fi
       ;;
 
     haiku*)
-      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
       link_all_deplibs=yes
       ;;
 
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      allow_undefined_flag=unsupported
-      shrext_cmds=.dll
-      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	$ECHO EXPORTS >> $output_objdir/$libname.def~
-	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
-	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	emximp -o $lib $output_objdir/$libname.def'
-      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	$ECHO EXPORTS >> $output_objdir/$libname.def~
-	prefix_cmds="$SED"~
-	if test EXPORTS = "`$SED 1q $export_symbols`"; then
-	  prefix_cmds="$prefix_cmds -e 1d";
-	fi~
-	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
-	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
-	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	emximp -o $lib $output_objdir/$libname.def'
-      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
-      enable_shared_with_static_runtimes=yes
-      ;;
-
     interix[3-9]*)
       hardcode_direct=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
-      export_dynamic_flag_spec='$wl-E'
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test linux-dietlibc = "$host_os"; then
+      if test "$host_os" = linux-dietlibc; then
 	case $cc_basename in
 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
 	esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test no = "$tmp_diet"
+	 && test "$tmp_diet" = no
       then
 	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
 	pgf77* | pgf90* | pgf95* | pgfortran*)
 					# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -9969,47 +9489,42 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  whole_archive_flag_spec=
 	  tmp_sharedflag='--shared' ;;
-        nagfor*)                        # NAGFOR 5.3
-          tmp_sharedflag='-Wl,-shared' ;;
 	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
 	nvcc*)	# Cuda Compiler Driver 2.2
-	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  compiler_needs_object=yes
 	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  compiler_needs_object=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
 	  tmp_sharedflag='-G' ;;
 	esac
-	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-        if test yes = "$supports_anon_versioning"; then
+        if test "x$supports_anon_versioning" = xyes; then
           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-            echo "local: *; };" >> $output_objdir/$libname.ver~
-            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
         fi
 
 	case $cc_basename in
-	tcc*)
-	  export_dynamic_flag_spec='-rdynamic'
-	  ;;
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+	  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
-	  if test yes = "$supports_anon_versioning"; then
+	  if test "x$supports_anon_versioning" = xyes; then
 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-              echo "local: *; };" >> $output_objdir/$libname.ver~
-              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -10018,13 +9533,13 @@ _LT_EOF
       fi
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -10042,8 +9557,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -10055,7 +9570,7 @@ _LT_EOF
 	ld_shlibs=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -10070,9 +9585,9 @@ _LT_EOF
 	  # DT_RUNPATH tag from executables and libraries.  But doing so
 	  # requires that you compile everything twice, which is a pain.
 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
-	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 	  else
 	    ld_shlibs=no
 	  fi
@@ -10089,15 +9604,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
       ;;
     esac
 
-    if test no = "$ld_shlibs"; then
+    if test "$ld_shlibs" = no; then
       runpath_var=
       hardcode_libdir_flag_spec=
       export_dynamic_flag_spec=
@@ -10113,7 +9628,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       hardcode_minus_L=yes
-      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
 	hardcode_direct=unsupported
@@ -10121,57 +9636,34 @@ _LT_EOF
       ;;
 
     aix[4-9]*)
-      if test ia64 = "$host_cpu"; then
+      if test "$host_cpu" = ia64; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
 	aix_use_runtimelinking=no
 	exp_sym_flag='-Bexport'
-	no_entry_flag=
+	no_entry_flag=""
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
-	# Without the "-l" option, or with the "-B" option, AIX nm treats
-	# weak defined symbols like other global defined symbols, whereas
-	# GNU nm marks them as "W".
-	# While the 'weak' keyword is ignored in the Export File, we need
-	# it in the Import File for the 'aix-soname' feature, so we have
-	# to replace the "-B" option with "-P" for AIX nm.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# have runtime linking enabled, and use it for executables.
-	# For shared libraries, we enable/disable runtime linking
-	# depending on the kind of the shared library created -
-	# when "with_aix_soname,aix_use_runtimelinking" is:
-	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
-	# "aix,yes"  lib.so          shared, rtl:yes, for executables
-	#            lib.a           static archive
-	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
-	#            lib.a(lib.so.V) shared, rtl:no,  for executables
-	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
-	#            lib.a(lib.so.V) shared, rtl:no
-	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
-	#            lib.a           static archive
+	# need to do runtime linking.
 	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
 	  for ld_flag in $LDFLAGS; do
-	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 	    aix_use_runtimelinking=yes
 	    break
 	  fi
 	  done
-	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
-	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
-	    # so we don't have lib.a shared libs to link our executables.
-	    # We have to force runtime linking in this case.
-	    aix_use_runtimelinking=yes
-	    LDFLAGS="$LDFLAGS -Wl,-brtl"
-	  fi
 	  ;;
 	esac
 
@@ -10190,21 +9682,13 @@ _LT_EOF
       hardcode_direct_absolute=yes
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      file_list_spec='$wl-f,'
-      case $with_aix_soname,$aix_use_runtimelinking in
-      aix,*) ;; # traditional, no import file
-      svr4,* | *,yes) # use import file
-	# The Import File defines what to hardcode.
-	hardcode_direct=no
-	hardcode_direct_absolute=no
-	;;
-      esac
+      file_list_spec='${wl}-f,'
 
-      if test yes = "$GCC"; then
+      if test "$GCC" = yes; then
 	case $host_os in aix4.[012]|aix4.[012].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`$CC -print-prog-name=collect2`
+	  collect2name=`${CC} -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -10223,42 +9707,35 @@ _LT_EOF
 	  ;;
 	esac
 	shared_flag='-shared'
-	if test yes = "$aix_use_runtimelinking"; then
-	  shared_flag="$shared_flag "'$wl-G'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
 	fi
-	# Need to ensure runtime linking is disabled for the traditional
-	# shared library, or the linker may eventually find shared libraries
-	# /with/ Import File - we do not want to mix them.
-	shared_flag_aix='-shared'
-	shared_flag_svr4='-shared $wl-G'
       else
 	# not using gcc
-	if test ia64 = "$host_cpu"; then
+	if test "$host_cpu" = ia64; then
 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	# chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
 	else
-	  if test yes = "$aix_use_runtimelinking"; then
-	    shared_flag='$wl-G'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
 	  else
-	    shared_flag='$wl-bM:SRE'
+	    shared_flag='${wl}-bM:SRE'
 	  fi
-	  shared_flag_aix='$wl-bM:SRE'
-	  shared_flag_svr4='$wl-G'
 	fi
       fi
 
-      export_dynamic_flag_spec='$wl-bexpall'
+      export_dynamic_flag_spec='${wl}-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       always_export_symbols=yes
-      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+      if test "$aix_use_runtimelinking" = yes; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
 	allow_undefined_flag='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        if test set = "${lt_cv_aix_libpath+set}"; then
+        if test "${lt_cv_aix_libpath+set}" = set; then
   aix_libpath=$lt_cv_aix_libpath
 else
   if ${lt_cv_aix_libpath_+:} false; then :
@@ -10293,7 +9770,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_=/usr/lib:/lib
+    lt_cv_aix_libpath_="/usr/lib:/lib"
   fi
 
 fi
@@ -10301,17 +9778,17 @@ fi
   aix_libpath=$lt_cv_aix_libpath_
 fi
 
-        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
-	if test ia64 = "$host_cpu"; then
-	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
 	  allow_undefined_flag="-z nodefs"
-	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 if test set = "${lt_cv_aix_libpath+set}"; then
+	 if test "${lt_cv_aix_libpath+set}" = set; then
   aix_libpath=$lt_cv_aix_libpath
 else
   if ${lt_cv_aix_libpath_+:} false; then :
@@ -10346,7 +9823,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_=/usr/lib:/lib
+    lt_cv_aix_libpath_="/usr/lib:/lib"
   fi
 
 fi
@@ -10354,33 +9831,21 @@ fi
   aix_libpath=$lt_cv_aix_libpath_
 fi
 
-	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag=' $wl-bernotok'
-	  allow_undefined_flag=' $wl-berok'
-	  if test yes = "$with_gnu_ld"; then
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  if test "$with_gnu_ld" = yes; then
 	    # We only use this code for GNU lds that support --whole-archive.
-	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+	    whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 	  else
 	    # Exported symbols can be pulled into shared objects from archives
 	    whole_archive_flag_spec='$convenience'
 	  fi
 	  archive_cmds_need_lc=yes
-	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
-	  # -brtl affects multiple linker settings, -berok does not and is overridden later
-	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
-	  if test svr4 != "$with_aix_soname"; then
-	    # This is similar to how AIX traditionally builds its shared libraries.
-	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
-	  fi
-	  if test aix != "$with_aix_soname"; then
-	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) >  [...]
-	  else
-	    # used by -dlpreopen to get the symbols
-	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
-	  fi
-	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 	fi
       fi
       ;;
@@ -10389,7 +9854,7 @@ fi
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
@@ -10419,17 +9884,16 @@ fi
 	# Tell ltmain to make .lib files, not .a files.
 	libext=lib
 	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=.dll
+	shrext_cmds=".dll"
 	# FIXME: Setting linknames here is a bad hack.
-	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
-	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
-            cp "$export_symbols" "$output_objdir/$soname.def";
-            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
-          else
-            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
-          fi~
-          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-          linknames='
+	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
 	enable_shared_with_static_runtimes=yes
@@ -10438,18 +9902,18 @@ fi
 	# Don't use ranlib
 	old_postinstall_cmds='chmod 644 $oldlib'
 	postlink_cmds='lt_outputfile="@OUTPUT@"~
-          lt_tool_outputfile="@TOOL_OUTPUT@"~
-          case $lt_outputfile in
-            *.exe|*.EXE) ;;
-            *)
-              lt_outputfile=$lt_outputfile.exe
-              lt_tool_outputfile=$lt_tool_outputfile.exe
-              ;;
-          esac~
-          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
-            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-            $RM "$lt_outputfile.manifest";
-          fi'
+	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+	  case $lt_outputfile in
+	    *.exe|*.EXE) ;;
+	    *)
+	      lt_outputfile="$lt_outputfile.exe"
+	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+	      ;;
+	  esac~
+	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	    $RM "$lt_outputfile.manifest";
+	  fi'
 	;;
       *)
 	# Assume MSVC wrapper
@@ -10458,7 +9922,7 @@ fi
 	# Tell ltmain to make .lib files, not .a files.
 	libext=lib
 	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=.dll
+	shrext_cmds=".dll"
 	# FIXME: Setting linknames here is a bad hack.
 	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
 	# The linker will automatically build a .lib file if we build a DLL.
@@ -10477,24 +9941,24 @@ fi
   hardcode_direct=no
   hardcode_automatic=yes
   hardcode_shlibpath_var=unsupported
-  if test yes = "$lt_cv_ld_force_load"; then
-    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
 
   else
     whole_archive_flag_spec=''
   fi
   link_all_deplibs=yes
-  allow_undefined_flag=$_lt_dar_allow_undefined
+  allow_undefined_flag="$_lt_dar_allow_undefined"
   case $cc_basename in
-     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+     ifort*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test yes = "$_lt_dar_can_shared"; then
+  if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
-    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
-    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
-    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
   ld_shlibs=no
@@ -10536,33 +10000,33 @@ fi
       ;;
 
     hpux9*)
-      if test yes = "$GCC"; then
-	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+      if test "$GCC" = yes; then
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       else
-	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       fi
-      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
       hardcode_libdir_separator=:
       hardcode_direct=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       hardcode_minus_L=yes
-      export_dynamic_flag_spec='$wl-E'
+      export_dynamic_flag_spec='${wl}-E'
       ;;
 
     hpux10*)
-      if test yes,no = "$GCC,$with_gnu_ld"; then
-	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test no = "$with_gnu_ld"; then
-	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
 	hardcode_libdir_separator=:
 	hardcode_direct=yes
 	hardcode_direct_absolute=yes
-	export_dynamic_flag_spec='$wl-E'
+	export_dynamic_flag_spec='${wl}-E'
 	# hardcode_minus_L: Not really in the search PATH,
 	# but as the default location of the library.
 	hardcode_minus_L=yes
@@ -10570,25 +10034,25 @@ fi
       ;;
 
     hpux11*)
-      if test yes,no = "$GCC,$with_gnu_ld"; then
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
 
@@ -10600,7 +10064,7 @@ if ${lt_cv_prog_compiler__b+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler__b=no
-   save_LDFLAGS=$LDFLAGS
+   save_LDFLAGS="$LDFLAGS"
    LDFLAGS="$LDFLAGS -b"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -10619,14 +10083,14 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS=$save_LDFLAGS
+   LDFLAGS="$save_LDFLAGS"
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
 $as_echo "$lt_cv_prog_compiler__b" >&6; }
 
-if test yes = "$lt_cv_prog_compiler__b"; then
-    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 else
     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 fi
@@ -10634,8 +10098,8 @@ fi
 	  ;;
 	esac
       fi
-      if test no = "$with_gnu_ld"; then
-	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
 	hardcode_libdir_separator=:
 
 	case $host_cpu in
@@ -10646,7 +10110,7 @@ fi
 	*)
 	  hardcode_direct=yes
 	  hardcode_direct_absolute=yes
-	  export_dynamic_flag_spec='$wl-E'
+	  export_dynamic_flag_spec='${wl}-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
@@ -10657,8 +10121,8 @@ fi
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test yes = "$GCC"; then
-	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
@@ -10668,8 +10132,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >
 if ${lt_cv_irix_exported_symbol+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  save_LDFLAGS=$LDFLAGS
-	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+  save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
 	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int foo (void) { return 0; }
@@ -10681,36 +10145,25 @@ else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-           LDFLAGS=$save_LDFLAGS
+           LDFLAGS="$save_LDFLAGS"
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
-	if test yes = "$lt_cv_irix_exported_symbol"; then
-          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 	fi
-	link_all_deplibs=no
       else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       hardcode_libdir_separator=:
       inherit_rpath=yes
       link_all_deplibs=yes
       ;;
 
-    linux*)
-      case $cc_basename in
-      tcc*)
-	# Fabrice Bellard et al's Tiny C Compiler
-	ld_shlibs=yes
-	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-      esac
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -10724,7 +10177,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
     newsos6)
       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
-      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       hardcode_libdir_separator=:
       hardcode_shlibpath_var=no
       ;;
@@ -10732,19 +10185,27 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
     *nto* | *qnx*)
       ;;
 
-    openbsd* | bitrig*)
+    openbsd*)
       if test -f /usr/libexec/ld.so; then
 	hardcode_direct=yes
 	hardcode_shlibpath_var=no
 	hardcode_direct_absolute=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
-	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
-	  export_dynamic_flag_spec='$wl-E'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
 	else
-	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
 	fi
       else
 	ld_shlibs=no
@@ -10755,53 +10216,33 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       hardcode_libdir_flag_spec='-L$libdir'
       hardcode_minus_L=yes
       allow_undefined_flag=unsupported
-      shrext_cmds=.dll
-      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	$ECHO EXPORTS >> $output_objdir/$libname.def~
-	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
-	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	emximp -o $lib $output_objdir/$libname.def'
-      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	$ECHO EXPORTS >> $output_objdir/$libname.def~
-	prefix_cmds="$SED"~
-	if test EXPORTS = "`$SED 1q $export_symbols`"; then
-	  prefix_cmds="$prefix_cmds -e 1d";
-	fi~
-	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
-	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
-	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	emximp -o $lib $output_objdir/$libname.def'
-      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
-      enable_shared_with_static_runtimes=yes
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
-      if test yes = "$GCC"; then
-	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
-	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
 	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       hardcode_libdir_separator=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test yes = "$GCC"; then
-	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
-	archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
-	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       else
 	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	hardcode_libdir_flag_spec='-rpath $libdir'
@@ -10812,24 +10253,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
 
     solaris*)
       no_undefined_flag=' -z defs'
-      if test yes = "$GCC"; then
-	wlarc='$wl'
-	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
 	  wlarc=''
-	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 	  ;;
 	*)
-	  wlarc='$wl'
-	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  wlarc='${wl}'
+	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 	  ;;
 	esac
       fi
@@ -10839,11 +10280,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       solaris2.[0-5] | solaris2.[0-5].*) ;;
       *)
 	# The compiler driver will combine and reorder linker options,
-	# but understands '-z linker_flag'.  GCC discards it without '$wl',
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test yes = "$GCC"; then
-	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 	else
 	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
 	fi
@@ -10853,10 +10294,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       ;;
 
     sunos4*)
-      if test sequent = "$host_vendor"; then
+      if test "x$host_vendor" = xsequent; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -10905,43 +10346,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag='$wl-z,text'
+      no_undefined_flag='${wl}-z,text'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
       runpath_var='LD_RUN_PATH'
 
-      if test yes = "$GCC"; then
-	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We CANNOT use -z defs as we might desire, because we do not
+      # Note: We can NOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      no_undefined_flag='$wl-z,text'
-      allow_undefined_flag='$wl-z,nodefs'
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='$wl-R,$libdir'
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      export_dynamic_flag_spec='$wl-Bexport'
+      export_dynamic_flag_spec='${wl}-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test yes = "$GCC"; then
-	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -10956,10 +10397,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       ;;
     esac
 
-    if test sni = "$host_vendor"; then
+    if test x$host_vendor = xsni; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	export_dynamic_flag_spec='$wl-Blargedynsym'
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
 	;;
       esac
     fi
@@ -10967,7 +10408,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
 $as_echo "$ld_shlibs" >&6; }
-test no = "$ld_shlibs" && can_build_shared=no
+test "$ld_shlibs" = no && can_build_shared=no
 
 with_gnu_ld=$with_gnu_ld
 
@@ -10993,7 +10434,7 @@ x|xyes)
   # Assume -lc should be added
   archive_cmds_need_lc=yes
 
-  if test yes,yes = "$GCC,$enable_shared"; then
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
     case $archive_cmds in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -11208,14 +10649,14 @@ esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
   case $host_os in
-    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
-    *) lt_awk_arg='/^libraries:/' ;;
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
   esac
   case $host_os in
-    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
-    *) lt_sed_strip_eq='s|=/|/|g' ;;
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
   esac
   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
   case $lt_search_path_spec in
@@ -11231,35 +10672,28 @@ if test yes = "$GCC"; then
     ;;
   esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary...
+  # and add multilib dir if necessary.
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  # ...but if some path component already ends with the multilib dir we assume
-  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
-  case "$lt_multi_os_dir; $lt_search_path_spec " in
-  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
-    lt_multi_os_dir=
-    ;;
-  esac
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
   for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
-    elif test -n "$lt_multi_os_dir"; then
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
       test -d "$lt_sys_path" && \
 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS = " "; FS = "/|\n";} {
-  lt_foo = "";
-  lt_count = 0;
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo = "/" $lt_i lt_foo;
+          lt_foo="/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -11273,7 +10707,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
   # for these hosts.
   case $host_os in
     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
-      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
+      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
   esac
   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
@@ -11282,7 +10716,7 @@ fi
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=.so
+shrext_cmds=".so"
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -11299,16 +10733,14 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
-
-
 case $host_os in
 aix3*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='$libname$release$shared_ext$major'
+  soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
 aix[4-9]*)
@@ -11316,91 +10748,41 @@ aix[4-9]*)
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test ia64 = "$host_cpu"; then
+  if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
-    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line '#! .'.  This would cause the generated library to
-    # depend on '.', always an invalid library.  This was fixed in
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # Using Import Files as archive members, it is possible to support
-    # filename-based versioning of shared library archives on AIX. While
-    # this would work for both with and without runtime linking, it will
-    # prevent static linking of such archives. So we do filename-based
-    # shared library versioning with .so extension only, which is used
-    # when both runtime linking and shared linking is enabled.
-    # Unfortunately, runtime linking may impact performance, so we do
-    # not want this to be the default eventually. Also, we use the
-    # versioned .so libs for executables only if there is the -brtl
-    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
-    # To allow for filename-based versioning support, we need to create
-    # libNAME.so.V as an archive file, containing:
-    # *) an Import File, referring to the versioned filename of the
-    #    archive as well as the shared archive member, telling the
-    #    bitwidth (32 or 64) of that shared object, and providing the
-    #    list of exported symbols of that shared object, eventually
-    #    decorated with the 'weak' keyword
-    # *) the shared object with the F_LOADONLY flag set, to really avoid
-    #    it being seen by the linker.
-    # At run time we better use the real file rather than another symlink,
-    # but for link time we create the symlink libNAME.so -> libNAME.so.V
-
-    case $with_aix_soname,$aix_use_runtimelinking in
-    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    aix,yes) # traditional libtool
-      dynamic_linker='AIX unversionable lib.so'
+    if test "$aix_use_runtimelinking" = yes; then
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-      ;;
-    aix,no) # traditional AIX only
-      dynamic_linker='AIX lib.a(lib.so.V)'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='$libname$release.a $libname.a'
-      soname_spec='$libname$release$shared_ext$major'
-      ;;
-    svr4,*) # full svr4 only
-      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
-      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
-      # We do not specify a path in Import Files, so LIBPATH fires.
-      shlibpath_overrides_runpath=yes
-      ;;
-    *,yes) # both, prefer svr4
-      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
-      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
-      # unpreferred sharedlib libNAME.a needs extra handling
-      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
-      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
-      # We do not specify a path in Import Files, so LIBPATH fires.
-      shlibpath_overrides_runpath=yes
-      ;;
-    *,no) # both, prefer aix
-      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
-      library_names_spec='$libname$release.a $libname.a'
-      soname_spec='$libname$release$shared_ext$major'
-      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
-      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
-      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
-      ;;
-    esac
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -11410,18 +10792,18 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='$libname$shared_ext'
+  library_names_spec='${libname}${shared_ext}'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
@@ -11429,8 +10811,8 @@ beos*)
 bsdi[45]*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -11442,7 +10824,7 @@ bsdi[45]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=.dll
+  shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
 
@@ -11451,8 +10833,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \$file`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -11468,17 +10850,17 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
@@ -11487,8 +10869,8 @@ cygwin* | mingw* | pw32* | cegcc*)
   *,cl*)
     # Native MSVC
     libname_spec='$name'
-    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
-    library_names_spec='$libname.dll.lib'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
 
     case $build_os in
     mingw*)
@@ -11515,7 +10897,7 @@ cygwin* | mingw* | pw32* | cegcc*)
       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       ;;
     *)
-      sys_lib_search_path_spec=$LIB
+      sys_lib_search_path_spec="$LIB"
       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
         # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -11528,8 +10910,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     esac
 
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \$file`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname'
@@ -11542,7 +10924,7 @@ cygwin* | mingw* | pw32* | cegcc*)
 
   *)
     # Assume MSVC wrapper
-    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
   esac
@@ -11555,8 +10937,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
-  soname_spec='$libname$release$major$shared_ext'
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -11569,8 +10951,8 @@ dgux*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -11588,13 +10970,12 @@ freebsd* | dragonfly*)
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-      soname_spec='$libname$release$shared_ext$major'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
       need_version=yes
       ;;
   esac
@@ -11619,15 +11000,26 @@ freebsd* | dragonfly*)
   esac
   ;;
 
+gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 haiku*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=no
+  shlibpath_overrides_runpath=yes
   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
@@ -11645,15 +11037,14 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
-    if test 32 = "$HPUX_IA64_MODE"; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -11661,8 +11052,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -11671,8 +11062,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -11685,8 +11076,8 @@ interix[3-9]*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -11697,7 +11088,7 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test yes = "$lt_cv_prog_gnu_ld"; then
+	if test "$lt_cv_prog_gnu_ld" = yes; then
 		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
@@ -11705,8 +11096,8 @@ irix5* | irix6* | nonstopux*)
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='$libname$release$shared_ext$major'
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -11725,8 +11116,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
-  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
   hardcode_into_libs=yes
   ;;
 
@@ -11735,33 +11126,13 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-linux*android*)
-  version_type=none # Android doesn't support versioned libraries.
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext'
-  soname_spec='$libname$release$shared_ext'
-  finish_cmds=
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  dynamic_linker='Android linker'
-  # Don't embed -rpath directories since the linker doesn't support them.
-  hardcode_libdir_flag_spec='-L$libdir'
-  ;;
-
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -11805,15 +11176,14 @@ fi
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Ideally, we could use ldconfig to report *all* directores which are
-  # searched for libraries, however this is still not possible.  Aside from not
-  # being certain /sbin/ldconfig is available, command
-  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
-  # even though it is searched at run-time.  Try to do the best guess by
-  # appending ld.so.conf contents (and includes) to the search path.
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -11825,29 +11195,17 @@ fi
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -11857,7 +11215,7 @@ netbsd*)
 
 newsos6)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -11866,68 +11224,58 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd* | bitrig*)
+openbsd*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec=/usr/lib
+  sys_lib_dlsearch_path_spec="/usr/lib"
   need_lib_prefix=no
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
-    need_version=no
-  else
-    need_version=yes
-  fi
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
   ;;
 
 os2*)
   libname_spec='$name'
-  version_type=windows
-  shrext_cmds=.dll
-  need_version=no
+  shrext_cmds=".dll"
   need_lib_prefix=no
-  # OS/2 can only load a DLL with a base name of 8 characters or less.
-  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
-    v=$($ECHO $release$versuffix | tr -d .-);
-    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
-    $ECHO $n$v`$shared_ext'
-  library_names_spec='${libname}_dll.$libext'
+  library_names_spec='$libname${shared_ext} $libname.a'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=BEGINLIBPATH
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  postinstall_cmds='base_file=`basename \$file`~
-    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
-    dldir=$destdir/`dirname \$dlpath`~
-    test -d \$dldir || mkdir -p \$dldir~
-    $install_prog $dir/$dlname \$dldir/$dlname~
-    chmod a+x \$dldir/$dlname~
-    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-    fi'
-  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
-    dlpath=$dir/\$dldll~
-    $RM \$dlpath'
+  shlibpath_var=LIBPATH
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='$libname$release$shared_ext$major'
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
   ;;
 
 rdos*)
@@ -11938,8 +11286,8 @@ solaris*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -11949,11 +11297,11 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test yes = "$with_gnu_ld"; then
+  if test "$with_gnu_ld" = yes; then
     need_lib_prefix=no
   fi
   need_version=yes
@@ -11961,8 +11309,8 @@ sunos4*)
 
 sysv4 | sysv4.3*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -11983,24 +11331,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec; then
+  if test -d /usr/nec ;then
     version_type=linux # correct to gnu/linux during the next big refactor
-    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
-    soname_spec='$libname$shared_ext.$major'
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=sco
+  version_type=freebsd-elf
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test yes = "$with_gnu_ld"; then
+  if test "$with_gnu_ld" = yes; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -12018,7 +11366,7 @@ tpf*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
@@ -12026,8 +11374,8 @@ tpf*)
 
 uts4*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -12037,35 +11385,20 @@ uts4*)
 esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
 $as_echo "$dynamic_linker" >&6; }
-test no = "$dynamic_linker" && can_build_shared=no
+test "$dynamic_linker" = no && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
-  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
 fi
-
-if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
-  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 fi
 
-# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
-configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
-
-# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
-func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
-
-# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
-configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
-
-
-
-
-
-
 
 
 
@@ -12162,15 +11495,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" ||
    test -n "$runpath_var" ||
-   test yes = "$hardcode_automatic"; then
+   test "X$hardcode_automatic" = "Xyes" ; then
 
   # We can hardcode non-existent directories.
-  if test no != "$hardcode_direct" &&
+  if test "$hardcode_direct" != no &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
-     test no != "$hardcode_minus_L"; then
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
     # Linking always hardcodes the temporary library directory.
     hardcode_action=relink
   else
@@ -12185,12 +11518,12 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
 $as_echo "$hardcode_action" >&6; }
 
-if test relink = "$hardcode_action" ||
-   test yes = "$inherit_rpath"; then
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = yes; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test yes = "$shlibpath_overrides_runpath" ||
-     test no = "$enable_shared"; then
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -12200,7 +11533,7 @@ fi
 
 
 
-  if test yes != "$enable_dlopen"; then
+  if test "x$enable_dlopen" != xyes; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
   enable_dlopen_self_static=unknown
@@ -12210,23 +11543,23 @@ else
 
   case $host_os in
   beos*)
-    lt_cv_dlopen=load_add_on
+    lt_cv_dlopen="load_add_on"
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
   mingw* | pw32* | cegcc*)
-    lt_cv_dlopen=LoadLibrary
+    lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
 
   cygwin*)
-    lt_cv_dlopen=dlopen
+    lt_cv_dlopen="dlopen"
     lt_cv_dlopen_libs=
     ;;
 
   darwin*)
-    # if libdl is installed we need to link against it
+  # if libdl is installed we need to link against it
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
 if ${ac_cv_lib_dl_dlopen+:} false; then :
@@ -12264,10 +11597,10 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
 
-    lt_cv_dlopen=dyld
+    lt_cv_dlopen="dyld"
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
 
@@ -12275,18 +11608,10 @@ fi
 
     ;;
 
-  tpf*)
-    # Don't try to run any link tests for TPF.  We know it's impossible
-    # because TPF is a cross-compiler, and we know how we open DSOs.
-    lt_cv_dlopen=dlopen
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=no
-    ;;
-
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
 if test "x$ac_cv_func_shl_load" = xyes; then :
-  lt_cv_dlopen=shl_load
+  lt_cv_dlopen="shl_load"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 $as_echo_n "checking for shl_load in -ldld... " >&6; }
@@ -12325,11 +11650,11 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
-  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
 else
   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
 if test "x$ac_cv_func_dlopen" = xyes; then :
-  lt_cv_dlopen=dlopen
+  lt_cv_dlopen="dlopen"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
@@ -12368,7 +11693,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
@@ -12407,7 +11732,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
-  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
 $as_echo_n "checking for dld_link in -ldld... " >&6; }
@@ -12446,7 +11771,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
-  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
 fi
 
 
@@ -12467,21 +11792,21 @@ fi
     ;;
   esac
 
-  if test no = "$lt_cv_dlopen"; then
-    enable_dlopen=no
-  else
+  if test "x$lt_cv_dlopen" != xno; then
     enable_dlopen=yes
+  else
+    enable_dlopen=no
   fi
 
   case $lt_cv_dlopen in
   dlopen)
-    save_CPPFLAGS=$CPPFLAGS
-    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-    save_LDFLAGS=$LDFLAGS
+    save_LDFLAGS="$LDFLAGS"
     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS=$LIBS
+    save_LIBS="$LIBS"
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
@@ -12489,7 +11814,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
 if ${lt_cv_dlopen_self+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  	  if test yes = "$cross_compiling"; then :
+  	  if test "$cross_compiling" = yes; then :
   lt_cv_dlopen_self=cross
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -12536,9 +11861,9 @@ else
 #  endif
 #endif
 
-/* When -fvisibility=hidden is used, assume the code has been annotated
+/* When -fvisbility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -12568,7 +11893,7 @@ _LT_EOF
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -12588,14 +11913,14 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
 $as_echo "$lt_cv_dlopen_self" >&6; }
 
-    if test yes = "$lt_cv_dlopen_self"; then
+    if test "x$lt_cv_dlopen_self" = xyes; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
 if ${lt_cv_dlopen_self_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  	  if test yes = "$cross_compiling"; then :
+  	  if test "$cross_compiling" = yes; then :
   lt_cv_dlopen_self_static=cross
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -12642,9 +11967,9 @@ else
 #  endif
 #endif
 
-/* When -fvisibility=hidden is used, assume the code has been annotated
+/* When -fvisbility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -12674,7 +11999,7 @@ _LT_EOF
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -12695,9 +12020,9 @@ fi
 $as_echo "$lt_cv_dlopen_self_static" >&6; }
     fi
 
-    CPPFLAGS=$save_CPPFLAGS
-    LDFLAGS=$save_LDFLAGS
-    LIBS=$save_LIBS
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
     ;;
   esac
 
@@ -12741,7 +12066,7 @@ else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
   darwin*)
-    if test -n "$STRIP"; then
+    if test -n "$STRIP" ; then
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -12769,7 +12094,7 @@ fi
 
 
 
-  # Report what library types will actually be built
+  # Report which library types will actually be built
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
@@ -12777,13 +12102,13 @@ $as_echo "$can_build_shared" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
 $as_echo_n "checking whether to build shared libraries... " >&6; }
-  test no = "$can_build_shared" && enable_shared=no
+  test "$can_build_shared" = "no" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
   # are all built from PIC.
   case $host_os in
   aix3*)
-    test yes = "$enable_shared" && enable_static=no
+    test "$enable_shared" = yes && enable_static=no
     if test -n "$RANLIB"; then
       archive_cmds="$archive_cmds~\$RANLIB \$lib"
       postinstall_cmds='$RANLIB $lib'
@@ -12791,12 +12116,8 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
     ;;
 
   aix[4-9]*)
-    if test ia64 != "$host_cpu"; then
-      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
-      yes,aix,yes) ;;			# shared object as lib.so file only
-      yes,svr4,*) ;;			# shared object as lib.so archive member only
-      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
-      esac
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
     fi
     ;;
   esac
@@ -12806,7 +12127,7 @@ $as_echo "$enable_shared" >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
 $as_echo_n "checking whether to build static libraries... " >&6; }
   # Make sure either enable_shared or enable_static is yes.
-  test yes = "$enable_shared" || enable_static=yes
+  test "$enable_shared" = yes || enable_static=yes
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
 $as_echo "$enable_static" >&6; }
 
@@ -12820,7 +12141,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-CC=$lt_save_CC
+CC="$lt_save_CC"
 
 
 
@@ -12845,6 +12166,8 @@ CC=$lt_save_CC
 
 
 
+save_CFLAGS="$CFLAGS"
+CFLAGS=`echo "$CFLAGS" | sed "s/-Werror/ /"`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exp in -lm" >&5
 $as_echo_n "checking for exp in -lm... " >&6; }
 if ${ac_cv_lib_m_exp+:} false; then :
@@ -12890,6 +12213,7 @@ _ACEOF
 
 fi
 
+CFLAGS="$save_CFLAGS"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
@@ -13004,6 +12328,35 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
 fi
 
 
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wall -Werror"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 math functions" >&5
+$as_echo_n "checking for C99 math functions... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+int
+main ()
+{
+int q;
+         return (int)(hypot(3.0, 4.0) + atanh(0.8) + cbrt(8.0) +
+                      remquo(100.0, 90.0, &q) +
+                      remainder(100.0, 90.0) + copysign(1.0, -0.0));
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; };C99_MATH="-DHAVE_C99_MATH=1"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; };C99_MATH="-DHAVE_C99_MATH=0"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+CFLAGS="$save_CFLAGS $C99_MATH"
+
 ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
 if test "x$ac_cv_func_localeconv" = xyes; then :
 
@@ -13214,7 +12567,7 @@ MUTEX_SETTING=$MUTEX_SETTING
 THREAD_LIB=$THREAD_LIB
 
 
-ac_config_files="$ac_config_files Makefile cmake/Makefile src/Makefile man/Makefile man/man1/Makefile man/man3/Makefile nad/Makefile jniwrap/Makefile jniwrap/org/Makefile jniwrap/org/proj4/Makefile"
+ac_config_files="$ac_config_files Makefile cmake/Makefile src/Makefile test/Makefile test/gie/Makefile test/gigs/Makefile man/Makefile man/man1/Makefile man/man3/Makefile nad/Makefile jniwrap/Makefile jniwrap/org/Makefile jniwrap/org/proj4/Makefile"
 
 ac_config_files="$ac_config_files nad/install"
 
@@ -13755,7 +13108,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by PROJ.4 Projections $as_me 4.9.3, which was
+This file was extended by PROJ.4 Projections $as_me 5.0.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -13821,7 +13174,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-PROJ.4 Projections config.status 4.9.3
+PROJ.4 Projections config.status 5.0.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -13956,7 +13309,6 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
-shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
@@ -14006,13 +13358,10 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
-lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
-lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
@@ -14077,8 +13426,7 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
-configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
@@ -14129,12 +13477,9 @@ CFLAGS \
 compiler \
 lt_cv_sys_global_symbol_pipe \
 lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_import \
 lt_cv_sys_global_symbol_to_c_name_address \
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-lt_cv_nm_interface \
 nm_file_list_spec \
-lt_cv_truncate_bin \
 lt_prog_compiler_no_builtin_flag \
 lt_prog_compiler_pic \
 lt_prog_compiler_wl \
@@ -14169,7 +13514,7 @@ old_striplib \
 striplib; do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -14196,11 +13541,10 @@ postinstall_cmds \
 postuninstall_cmds \
 finish_cmds \
 sys_lib_search_path_spec \
-configure_time_dlsearch_path \
-configure_time_lt_sys_library_path; do
+sys_lib_dlsearch_path_spec; do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -14209,16 +13553,19 @@ configure_time_lt_sys_library_path; do
 done
 
 ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
 
-# See if we are running on zsh, and set the options that allow our
+# See if we are running on zsh, and set the options which allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}"; then
+if test -n "\${ZSH_VERSION+set}" ; then
    setopt NO_GLOB_SUBST
 fi
 
 
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'
 
@@ -14239,6 +13586,9 @@ do
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "cmake/Makefile") CONFIG_FILES="$CONFIG_FILES cmake/Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+    "test/gie/Makefile") CONFIG_FILES="$CONFIG_FILES test/gie/Makefile" ;;
+    "test/gigs/Makefile") CONFIG_FILES="$CONFIG_FILES test/gigs/Makefile" ;;
     "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
     "man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES man/man1/Makefile" ;;
     "man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES man/man3/Makefile" ;;
@@ -14938,53 +14288,55 @@ $as_echo X"$file" |
  ;;
     "libtool":C)
 
-    # See if we are running on zsh, and set the options that allow our
+    # See if we are running on zsh, and set the options which allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}"; then
+    if test -n "${ZSH_VERSION+set}" ; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile=${ofile}T
+    cfgfile="${ofile}T"
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-# Generated automatically by $as_me ($PACKAGE) $VERSION
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
-
-# Provide generalized library-building support services.
-# Written by Gordon Matzigkeit, 1996
-
-# Copyright (C) 2014 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of of the License, or
-# (at your option) any later version.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program or library that is built
-# using GNU Libtool, you may include this file under the  same
-# distribution terms that you use for the rest of that program.
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
 #
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 
 # The names of the tagged configurations supported by this script.
-available_tags=''
-
-# Configured defaults for sys_lib_dlsearch_path munging.
-: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+available_tags=""
 
 # ### BEGIN LIBTOOL CONFIG
 
@@ -15004,9 +14356,6 @@ pic_mode=$pic_mode
 # Whether or not to optimize for fast installation.
 fast_install=$enable_fast_install
 
-# Shared archive member basename,for filename based shared library versioning on AIX.
-shared_archive_member_spec=$shared_archive_member_spec
-
 # Shell to use when invoking shell scripts.
 SHELL=$lt_SHELL
 
@@ -15124,27 +14473,18 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 # Transform the output of nm in a proper C declaration.
 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
-# Transform the output of nm into a list of symbols to manually relocate.
-global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
-
 # Transform the output of nm in a C name address pair.
 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
 # Transform the output of nm in a C name address pair when lib prefix is needed.
 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
-# The name lister interface.
-nm_interface=$lt_lt_cv_nm_interface
-
 # Specify filename containing input files for \$NM.
 nm_file_list_spec=$lt_nm_file_list_spec
 
-# The root where to search for dependent libraries,and where our libraries should be installed.
+# The root where to search for dependent libraries,and in which our libraries should be installed.
 lt_sysroot=$lt_sysroot
 
-# Command to truncate a binary pipe.
-lt_truncate_bin=$lt_lt_cv_truncate_bin
-
 # The name of the directory that contains temporary libtool files.
 objdir=$objdir
 
@@ -15235,11 +14575,8 @@ hardcode_into_libs=$hardcode_into_libs
 # Compile-time system search path for libraries.
 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
-# Detected run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
-
-# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
-configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
 # Whether dlopen is supported.
 dlopen_support=$enable_dlopen
@@ -15332,13 +14669,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
 # DIR into the resulting binary.
 hardcode_direct=$hardcode_direct
 
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
 # DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
 # library is relocated.
 hardcode_direct_absolute=$hardcode_direct_absolute
 
@@ -15390,72 +14727,13 @@ hardcode_action=$hardcode_action
 
 _LT_EOF
 
-    cat <<'_LT_EOF' >> "$cfgfile"
-
-# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
-
-# func_munge_path_list VARIABLE PATH
-# -----------------------------------
-# VARIABLE is name of variable containing _space_ separated list of
-# directories to be munged by the contents of PATH, which is string
-# having a format:
-# "DIR[:DIR]:"
-#       string "DIR[ DIR]" will be prepended to VARIABLE
-# ":DIR[:DIR]"
-#       string "DIR[ DIR]" will be appended to VARIABLE
-# "DIRP[:DIRP]::[DIRA:]DIRA"
-#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
-#       "DIRA[ DIRA]" will be appended to VARIABLE
-# "DIR[:DIR]"
-#       VARIABLE will be replaced by "DIR[ DIR]"
-func_munge_path_list ()
-{
-    case x$2 in
-    x)
-        ;;
-    *:)
-        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
-        ;;
-    x:*)
-        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
-        ;;
-    *::*)
-        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
-        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
-        ;;
-    *)
-        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
-        ;;
-    esac
-}
-
-
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-func_cc_basename ()
-{
-    for cc_temp in $*""; do
-      case $cc_temp in
-        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-        \-*) ;;
-        *) break;;
-      esac
-    done
-    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-}
-
-
-# ### END FUNCTIONS SHARED WITH CONFIGURE
-
-_LT_EOF
-
   case $host_os in
   aix3*)
     cat <<\_LT_EOF >> "$cfgfile"
 # AIX sometimes has problems with the GCC collect2 program.  For some
 # reason, if we set the COLLECT_NAMES environment variable, the problems
 # vanish in a puff of smoke.
-if test set != "${COLLECT_NAMES+set}"; then
+if test "X${COLLECT_NAMES+set}" != Xset; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -15464,7 +14742,7 @@ _LT_EOF
   esac
 
 
-ltmain=$ac_aux_dir/ltmain.sh
+ltmain="$ac_aux_dir/ltmain.sh"
 
 
   # We use sed instead of cat because bash on DJGPP gets confused if
@@ -15474,6 +14752,165 @@ ltmain=$ac_aux_dir/ltmain.sh
   sed '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
    mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
diff --git a/configure.ac b/configure.ac
index 7c77490..4893646 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([PROJ.4 Projections], 4.9.3, [warmerdam at pobox.com], proj)
+AC_INIT([PROJ.4 Projections], 5.0.0, [warmerdam at pobox.com], proj)
 AC_CONFIG_MACRO_DIR([m4])
 AC_LANG(C)
 
@@ -21,11 +21,28 @@ AC_PROG_MAKE_SET
 AM_PROG_LIBTOOL
 
 dnl Checks for libraries.
+save_CFLAGS="$CFLAGS"
+CFLAGS=`echo "$CFLAGS" | sed "s/-Werror/ /"`
 AC_CHECK_LIB(m,exp,,,)
+CFLAGS="$save_CFLAGS"
 
 dnl We check for headers
 AC_HEADER_STDC
 
+dnl Check for C99 math functions
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wall -Werror"
+AC_MSG_CHECKING([for C99 math functions])
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+        [#include <math.h>],
+        [int q;
+         return (int)(hypot(3.0, 4.0) + atanh(0.8) + cbrt(8.0) +
+                      remquo(100.0, 90.0, &q) +
+                      remainder(100.0, 90.0) + copysign(1.0, -0.0));])],
+        [AC_MSG_RESULT([yes]);C99_MATH="-DHAVE_C99_MATH=1"],
+        [AC_MSG_RESULT([no]);C99_MATH="-DHAVE_C99_MATH=0"])
+CFLAGS="$save_CFLAGS $C99_MATH"
+
 AC_CHECK_FUNC(localeconv, [AC_DEFINE(HAVE_LOCALECONV,1,[Define to 1 if you have localeconv])])
 
 dnl ---------------------------------------------------------------------------
@@ -114,6 +131,7 @@ AC_SUBST(MUTEX_SETTING,$MUTEX_SETTING)
 AC_SUBST(THREAD_LIB,$THREAD_LIB)
 
 AC_CONFIG_FILES([Makefile cmake/Makefile src/Makefile
+                 test/Makefile test/gie/Makefile test/gigs/Makefile
                  man/Makefile man/man1/Makefile man/man3/Makefile nad/Makefile
                  jniwrap/Makefile jniwrap/org/Makefile jniwrap/org/proj4/Makefile])
 AC_CONFIG_FILES([nad/install], [chmod +x nad/install])
diff --git a/depcomp b/depcomp
index fc98710..4ebd5b3 100755
--- a/depcomp
+++ b/depcomp
@@ -3,7 +3,7 @@
 
 scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/install-sh b/install-sh
index 59990a1..377bb86 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2014-09-12.12; # UTC
+scriptversion=2011-11-20.07; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,15 +41,19 @@ scriptversion=2014-09-12.12; # UTC
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
-tab='	'
 nl='
 '
-IFS=" $tab$nl"
+IFS=" ""	$nl"
 
-# Set DOITPROG to "echo" to test this script.
+# set DOITPROG to echo to test this script
 
+# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-doit_exec=${doit:-exec}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -64,6 +68,17 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -82,7 +97,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-is_target_a_directory=possibly
+no_target_directory=
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -122,57 +137,46 @@ while test $# -ne 0; do
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-        shift;;
+	shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-        case $mode in
-          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
-            echo "$0: invalid mode: $mode" >&2
-            exit 1;;
-        esac
-        shift;;
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
 
     -o) chowncmd="$chownprog $2"
-        shift;;
+	shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t)
-        is_target_a_directory=always
-        dst_arg=$2
-        # Protect names problematic for 'test' and other utilities.
-        case $dst_arg in
-          -* | [=\(\)!]) dst_arg=./$dst_arg;;
-        esac
-        shift;;
+    -t) dst_arg=$2
+	# Protect names problematic for 'test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
+	shift;;
 
-    -T) is_target_a_directory=never;;
+    -T) no_target_directory=true;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --) shift
-        break;;
+    --)	shift
+	break;;
 
-    -*) echo "$0: invalid option: $1" >&2
-        exit 1;;
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
 
     *)  break;;
   esac
   shift
 done
 
-# We allow the use of options -d and -T together, by making -d
-# take the precedence; this is for compatibility with GNU install.
-
-if test -n "$dir_arg"; then
-  if test -n "$dst_arg"; then
-    echo "$0: target directory not allowed when installing a directory." >&2
-    exit 1
-  fi
-fi
-
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -204,15 +208,6 @@ if test $# -eq 0; then
 fi
 
 if test -z "$dir_arg"; then
-  if test $# -gt 1 || test "$is_target_a_directory" = always; then
-    if test ! -d "$dst_arg"; then
-      echo "$0: $dst_arg: Is not a directory." >&2
-      exit 1
-    fi
-  fi
-fi
-
-if test -z "$dir_arg"; then
   do_exit='(exit $ret); exit $ret'
   trap "ret=129; $do_exit" 1
   trap "ret=130; $do_exit" 2
@@ -228,16 +223,16 @@ if test -z "$dir_arg"; then
 
     *[0-7])
       if test -z "$stripcmd"; then
-        u_plus_rw=
+	u_plus_rw=
       else
-        u_plus_rw='% 200'
+	u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-        u_plus_rw=
+	u_plus_rw=
       else
-        u_plus_rw=,u+rw
+	u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -274,15 +269,41 @@ do
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
-      if test "$is_target_a_directory" = never; then
-        echo "$0: $dst_arg: Is a directory" >&2
-        exit 1
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
       fi
       dstdir=$dst
       dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
-      dstdir=`dirname "$dst"`
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
       test -d "$dstdir"
       dstdir_status=$?
     fi
@@ -293,81 +314,74 @@ do
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-        # Create intermediate dirs using mode 755 as modified by the umask.
-        # This is like FreeBSD 'install' as of 1997-10-28.
-        umask=`umask`
-        case $stripcmd.$umask in
-          # Optimize common cases.
-          *[2367][2367]) mkdir_umask=$umask;;
-          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-          *[0-7])
-            mkdir_umask=`expr $umask + 22 \
-              - $umask % 100 % 40 + $umask % 20 \
-              - $umask % 10 % 4 + $umask % 2
-            `;;
-          *) mkdir_umask=$umask,go-w;;
-        esac
-
-        # With -d, create the new directory with the user-specified mode.
-        # Otherwise, rely on $mkdir_umask.
-        if test -n "$dir_arg"; then
-          mkdir_mode=-m$mode
-        else
-          mkdir_mode=
-        fi
-
-        posix_mkdir=false
-        case $umask in
-          *[123567][0-7][0-7])
-            # POSIX mkdir -p sets u+wx bits regardless of umask, which
-            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-            ;;
-          *)
-            # $RANDOM is not portable (e.g. dash);  use it when possible to
-            # lower collision chance
-            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-            # As "mkdir -p" follows symlinks and we work in /tmp possibly;  so
-            # create the $tmpdir first (and fail if unsuccessful) to make sure
-            # that nobody tries to guess the $tmpdir name.
-            if (umask $mkdir_umask &&
-                $mkdirprog $mkdir_mode "$tmpdir" &&
-                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
-            then
-              if test -z "$dir_arg" || {
-                   # Check for POSIX incompatibilities with -m.
-                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                   # other-writable bit of parent directory when it shouldn't.
-                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                   test_tmpdir="$tmpdir/a"
-                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
-                   case $ls_ld_tmpdir in
-                     d????-?r-*) different_mode=700;;
-                     d????-?--*) different_mode=755;;
-                     *) false;;
-                   esac &&
-                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
-                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
-                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                   }
-                 }
-              then posix_mkdir=:
-              fi
-              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
-            else
-              # Remove any dirs left behind by ancient mkdir implementations.
-              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
-            fi
-            trap '' 0;;
-        esac;;
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
     esac
 
     if
       $posix_mkdir && (
-        umask $mkdir_umask &&
-        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
@@ -377,51 +391,53 @@ do
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-        /*) prefix='/';;
-        [-=\(\)!]*) prefix='./';;
-        *)  prefix='';;
+	/*) prefix='/';;
+	[-=\(\)!]*) prefix='./';;
+	*)  prefix='';;
       esac
 
+      eval "$initialize_posix_glob"
+
       oIFS=$IFS
       IFS=/
-      set -f
+      $posix_glob set -f
       set fnord $dstdir
       shift
-      set +f
+      $posix_glob set +f
       IFS=$oIFS
 
       prefixes=
 
       for d
       do
-        test X"$d" = X && continue
-
-        prefix=$prefix$d
-        if test -d "$prefix"; then
-          prefixes=
-        else
-          if $posix_mkdir; then
-            (umask=$mkdir_umask &&
-             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-            # Don't fail if two instances are running concurrently.
-            test -d "$prefix" || exit 1
-          else
-            case $prefix in
-              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-              *) qprefix=$prefix;;
-            esac
-            prefixes="$prefixes '$qprefix'"
-          fi
-        fi
-        prefix=$prefix/
+	test X"$d" = X && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-        # Don't fail if two instances are running concurrently.
-        (umask $mkdir_umask &&
-         eval "\$doit_exec \$mkdirprog $prefixes") ||
-          test -d "$dstdir" || exit 1
-        obsolete_mkdir_used=true
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -456,12 +472,15 @@ do
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
-       set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       set +f &&
+       $posix_glob set +f &&
+
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
@@ -474,24 +493,24 @@ do
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-        # Now remove or move aside any old file at destination location.
-        # We try this two ways since rm can't unlink itself on some
-        # systems and the destination file might be busy for other
-        # reasons.  In this case, the final cleanup might fail but the new
-        # file should still install successfully.
-        {
-          test ! -f "$dst" ||
-          $doit $rmcmd -f "$dst" 2>/dev/null ||
-          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-          } ||
-          { echo "$0: cannot unlink or rename $dst" >&2
-            (exit 1); exit 1
-          }
-        } &&
-
-        # Now rename the file to the real destination.
-        $doit $mvcmd "$dsttmp" "$dst"
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
diff --git a/jniwrap/Makefile.in b/jniwrap/Makefile.in
index ab018b6..2b096fb 100644
--- a/jniwrap/Makefile.in
+++ b/jniwrap/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -88,6 +78,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = jniwrap
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -155,7 +145,6 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -223,7 +212,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -293,7 +281,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -319,6 +306,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu jniwrap/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu jniwrap/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -614,8 +602,6 @@ uninstall-am:
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am
 
-.PRECIOUS: Makefile
-
 
 install-data-local:
 	echo In jniwrap
diff --git a/jniwrap/README b/jniwrap/README
index a7f4efc..1c047db 100644
--- a/jniwrap/README
+++ b/jniwrap/README
@@ -59,7 +59,7 @@ The documentation is held inside the code and can be retrieved by running
 doxygen inside the folder jniwrap. This will create the HTML format
 documentation inside of jniwrap/docs
 
-The standard way to achive this is to use an Ant target:
+The standard way to achieve this is to use an Ant target:
 
     ant do_make_help
 
diff --git a/jniwrap/doxygen.cfg b/jniwrap/doxygen.cfg
index a46a8bb..e1771b5 100644
--- a/jniwrap/doxygen.cfg
+++ b/jniwrap/doxygen.cfg
@@ -834,7 +834,7 @@ HTML_FILE_EXTENSION    = .html
 # standard header. Note that when using a custom header you are responsible
 # for the proper inclusion of any scripts and style sheets that doxygen
 # needs, which is dependent on the configuration options used.
-# It is adviced to generate a default header using "doxygen -w html
+# It is advised to generate a default header using "doxygen -w html
 # header.html footer.html stylesheet.css YourConfigFile" and then modify
 # that header. Note that the header is subject to change so you typically
 # have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW!
@@ -1108,7 +1108,7 @@ EXT_LINKS_IN_WINDOW    = NO
 
 FORMULA_FONTSIZE       = 10
 
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
 # generated for formulas are transparent PNGs. Transparent PNGs are
 # not supported properly for IE 6.0, but are supported on all modern browsers.
 # Note that when changing this option you need to delete any form_*.png files
diff --git a/jniwrap/org/Makefile.in b/jniwrap/org/Makefile.in
index cca1421..0201708 100644
--- a/jniwrap/org/Makefile.in
+++ b/jniwrap/org/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -88,6 +78,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = jniwrap/org
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -155,7 +145,6 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -223,7 +212,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -293,7 +281,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -318,6 +305,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu jniwrap/org/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu jniwrap/org/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -612,8 +600,6 @@ uninstall-am:
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/jniwrap/org/proj4/Makefile.in b/jniwrap/org/proj4/Makefile.in
index a3c9327..ca691ba 100644
--- a/jniwrap/org/proj4/Makefile.in
+++ b/jniwrap/org/proj4/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -88,6 +78,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = jniwrap/org/proj4
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -120,7 +110,6 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -163,7 +152,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -233,7 +221,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -258,6 +245,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu jniwrap/org/proj4/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu jniwrap/org/proj4/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -432,8 +420,6 @@ uninstall-am:
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/jniwrap/org/proj4/PJ.java b/jniwrap/org/proj4/PJ.java
index f82fe07..50e7a02 100644
--- a/jniwrap/org/proj4/PJ.java
+++ b/jniwrap/org/proj4/PJ.java
@@ -37,7 +37,7 @@ package org.proj4;
  * Proj.4 library. This class is the only place where such native methods are defined.
  * <p>
  * In the Proj.4 library, the {@code PJ} structure aggregates in a single place information usually
- * splitted in many different ISO 19111 interfaces: {@link org.opengis.referencing.datum.Ellipsoid},
+ * split in many different ISO 19111 interfaces: {@link org.opengis.referencing.datum.Ellipsoid},
  * {@link org.opengis.referencing.datum.Datum}, {@link org.opengis.referencing.datum.PrimeMeridian},
  * {@link org.opengis.referencing.cs.CoordinateSystem}, {@link org.opengis.referencing.crs.CoordinateReferenceSystem}
  * and their sub-interfaces. The relationship with the GeoAPI methods is indicated in the
@@ -285,7 +285,7 @@ public class PJ {
     /**
      * Deallocates the native PJ data structure. This method can be invoked only by the garbage
      * collector, and must be invoked exactly once (no more, no less).
-     * <strong>NEVER INVOKE THIS METHOD EXPLICITELY, NEVER OVERRIDE</strong>.
+     * <strong>NEVER INVOKE THIS METHOD EXPLICITLY, NEVER OVERRIDE</strong>.
      */
     @Override
     protected final native void finalize();
diff --git a/ltmain.sh b/ltmain.sh
index 147d758..63ae69d 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,12 +1,9 @@
-#! /bin/sh
-## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
-##               by inline-source v2014-01-03.01
 
-# libtool (GNU libtool) 2.4.6
-# Provide generalized library-building support services.
+# libtool (GNU libtool) 2.4.2
 # Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
 
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -26,2112 +23,881 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-PROGRAM=libtool
-PACKAGE=libtool
-VERSION="2.4.6 Debian-2.4.6-0.1"
-package_revision=2.4.6
-
-
-## ------ ##
-## Usage. ##
-## ------ ##
-
-# Run './libtool --help' for help with using this script from the
-# command line.
-
-
-## ------------------------------- ##
-## User overridable command paths. ##
-## ------------------------------- ##
-
-# After configure completes, it has a better idea of some of the
-# shell tools we need than the defaults used by the functions shared
-# with bootstrap, so set those here where they can still be over-
-# ridden by the user, but otherwise take precedence.
-
-: ${AUTOCONF="autoconf"}
-: ${AUTOMAKE="automake"}
-
-
-## -------------------------- ##
-## Source external libraries. ##
-## -------------------------- ##
-
-# Much of our low-level functionality needs to be sourced from external
-# libraries, which are installed to $pkgauxdir.
-
-# Set a version string for this script.
-scriptversion=2015-01-20.17; # UTC
-
-# General shell script boiler plate, and helper functions.
-# Written by Gary V. Vaughan, 2004
-
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# As a special exception to the GNU General Public License, if you distribute
-# this file as part of a program or library that is built using GNU Libtool,
-# you may include this file under the same distribution terms that you use
-# for the rest of that program.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-# Please report bugs or propose patches to gary at gnu.org.
-
-
-## ------ ##
-## Usage. ##
-## ------ ##
-
-# Evaluate this file near the top of your script to gain access to
-# the functions and variables defined here:
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
 #
-#   . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#       --config             show all configuration variables
+#       --debug              enable verbose shell tracing
+#   -n, --dry-run            display commands without modifying any files
+#       --features           display basic configuration information and exit
+#       --mode=MODE          use operation mode MODE
+#       --preserve-dup-deps  don't remove duplicate dependency libraries
+#       --quiet, --silent    don't print informational messages
+#       --no-quiet, --no-silent
+#                            print informational messages (default)
+#       --no-warn            don't display warning messages
+#       --tag=TAG            use configuration variables from tag TAG
+#   -v, --verbose            print more informational messages than default
+#       --no-verbose         don't print the extra informational messages
+#       --version            print version information
+#   -h, --help, --help-all   print short, long, or detailed help message
 #
-# If you need to override any of the default environment variable
-# settings, do that before evaluating this file.
-
-
-## -------------------- ##
-## Shell normalisation. ##
-## -------------------- ##
+# MODE must be one of the following:
+#
+#         clean              remove files from the build directory
+#         compile            compile a source file into a libtool object
+#         execute            automatically set library path, then run a program
+#         finish             complete the installation of libtool libraries
+#         install            install libraries or executables
+#         link               create a library or an executable
+#         uninstall          remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.  When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#         host-triplet:	$host
+#         shell:		$SHELL
+#         compiler:		$LTCC
+#         compiler flags:		$LTCFLAGS
+#         linker:		$LD (gnu? $with_gnu_ld)
+#         $progname:	(GNU libtool) 2.4.2
+#         automake:	$automake_version
+#         autoconf:	$autoconf_version
+#
+# Report bugs to <bug-libtool at gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
 
-# Some shells need a little help to be as Bourne compatible as possible.
-# Before doing anything else, make sure all that help has been provided!
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4.2
+TIMESTAMP=""
+package_revision=1.3337
 
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
-fi
-
-# NLS nuisances: We save the old values in case they are required later.
-_G_user_locale=
-_G_safe_locale=
-for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
-  eval "if test set = \"\${$_G_var+set}\"; then
-          save_$_G_var=\$$_G_var
-          $_G_var=C
-	  export $_G_var
-	  _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
-	  _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
-	fi"
-done
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# Make sure IFS has a sensible default
-sp=' '
-nl='
-'
-IFS="$sp	$nl"
-
-# There are apparently some retarded systems that use ';' as a PATH separator!
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
-
-
-## ------------------------- ##
-## Locate command utilities. ##
-## ------------------------- ##
-
-
-# func_executable_p FILE
-# ----------------------
-# Check that FILE is an executable regular file.
-func_executable_p ()
-{
-    test -f "$1" && test -x "$1"
-}
-
-
-# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
-# --------------------------------------------
-# Search for either a program that responds to --version with output
-# containing "GNU", or else returned by CHECK_FUNC otherwise, by
-# trying all the directories in PATH with each of the elements of
-# PROGS_LIST.
-#
-# CHECK_FUNC should accept the path to a candidate program, and
-# set $func_check_prog_result if it truncates its output less than
-# $_G_path_prog_max characters.
-func_path_progs ()
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
 {
-    _G_progs_list=$1
-    _G_check_func=$2
-    _G_PATH=${3-"$PATH"}
-
-    _G_path_prog_max=0
-    _G_path_prog_found=false
-    _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
-    for _G_dir in $_G_PATH; do
-      IFS=$_G_save_IFS
-      test -z "$_G_dir" && _G_dir=.
-      for _G_prog_name in $_G_progs_list; do
-        for _exeext in '' .EXE; do
-          _G_path_prog=$_G_dir/$_G_prog_name$_exeext
-          func_executable_p "$_G_path_prog" || continue
-          case `"$_G_path_prog" --version 2>&1` in
-            *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
-            *)     $_G_check_func $_G_path_prog
-		   func_path_progs_result=$func_check_prog_result
-		   ;;
-          esac
-          $_G_path_prog_found && break 3
-        done
-      done
-    done
-    IFS=$_G_save_IFS
-    test -z "$func_path_progs_result" && {
-      echo "no acceptable sed could be found in \$PATH" >&2
-      exit 1
-    }
-}
-
-
-# We want to be able to use the functions in this file before configure
-# has figured out where the best binaries are kept, which means we have
-# to search for them ourselves - except when the results are already set
-# where we skip the searches.
-
-# Unless the user overrides by setting SED, search the path for either GNU
-# sed, or the sed that truncates its output the least.
-test -z "$SED" && {
-  _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
-  for _G_i in 1 2 3 4 5 6 7; do
-    _G_sed_script=$_G_sed_script$nl$_G_sed_script
-  done
-  echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
-  _G_sed_script=
-
-  func_check_prog_sed ()
-  {
-    _G_path_prog=$1
-
-    _G_count=0
-    printf 0123456789 >conftest.in
-    while :
-    do
-      cat conftest.in conftest.in >conftest.tmp
-      mv conftest.tmp conftest.in
-      cp conftest.in conftest.nl
-      echo '' >> conftest.nl
-      "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
-      diff conftest.out conftest.nl >/dev/null 2>&1 || break
-      _G_count=`expr $_G_count + 1`
-      if test "$_G_count" -gt "$_G_path_prog_max"; then
-        # Best one so far, save it but keep looking for a better one
-        func_check_prog_result=$_G_path_prog
-        _G_path_prog_max=$_G_count
-      fi
-      # 10*(2^10) chars as input seems more than enough
-      test 10 -lt "$_G_count" && break
-    done
-    rm -f conftest.in conftest.tmp conftest.nl conftest.out
-  }
-
-  func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
-  rm -f conftest.sed
-  SED=$func_path_progs_result
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
 }
 
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+          save_$lt_var=\$$lt_var
+          $lt_var=C
+	  export $lt_var
+	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+	fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
 
-# Unless the user overrides by setting GREP, search the path for either GNU
-# grep, or the grep that truncates its output the least.
-test -z "$GREP" && {
-  func_check_prog_grep ()
-  {
-    _G_path_prog=$1
-
-    _G_count=0
-    _G_path_prog_max=0
-    printf 0123456789 >conftest.in
-    while :
-    do
-      cat conftest.in conftest.in >conftest.tmp
-      mv conftest.tmp conftest.in
-      cp conftest.in conftest.nl
-      echo 'GREP' >> conftest.nl
-      "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
-      diff conftest.out conftest.nl >/dev/null 2>&1 || break
-      _G_count=`expr $_G_count + 1`
-      if test "$_G_count" -gt "$_G_path_prog_max"; then
-        # Best one so far, save it but keep looking for a better one
-        func_check_prog_result=$_G_path_prog
-        _G_path_prog_max=$_G_count
-      fi
-      # 10*(2^10) chars as input seems more than enough
-      test 10 -lt "$_G_count" && break
-    done
-    rm -f conftest.in conftest.tmp conftest.nl conftest.out
-  }
+$lt_unset CDPATH
 
-  func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
-  GREP=$func_path_progs_result
-}
 
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
 
-## ------------------------------- ##
-## User overridable command paths. ##
-## ------------------------------- ##
 
-# All uppercase variable names are used for environment variables.  These
-# variables can be overridden by the user before calling a script that
-# uses them if a suitable command of that name is not already available
-# in the command search PATH.
 
 : ${CP="cp -f"}
-: ${ECHO="printf %s\n"}
-: ${EGREP="$GREP -E"}
-: ${FGREP="$GREP -F"}
-: ${LN_S="ln -s"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
 
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
 
-## -------------------- ##
-## Useful sed snippets. ##
-## -------------------- ##
+exit_status=$EXIT_SUCCESS
 
-sed_dirname='s|/[^/]*$||'
-sed_basename='s|^.*/||'
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
 
-# Same as above, but do not quote variable references.
-sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+} # func_dirname may be replaced by extended shell implementation
 
-# Sed substitution that turns a string into a regex matching for the
-# string literally.
-sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
 
-# Sed substitution that converts a w32 file name or path
-# that contains forward slashes, into one that contains
-# (escaped) backslashes.  A very naive implementation.
-sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-
-# Re-'\' parameter expansions in output of sed_double_quote_subst that
-# were '\'-ed in input to the same.  If an odd number of '\' preceded a
-# '$' in input to sed_double_quote_subst, that '$' was protected from
-# expansion.  Since each input '\' is now two '\'s, look for any number
-# of runs of four '\'s followed by two '\'s and then a '$'.  '\' that '$'.
-_G_bs='\\'
-_G_bs2='\\\\'
-_G_bs4='\\\\\\\\'
-_G_dollar='\$'
-sed_double_backslash="\
-  s/$_G_bs4/&\\
-/g
-  s/^$_G_bs2$_G_dollar/$_G_bs&/
-  s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
-  s/\n//g"
+# func_basename file
+func_basename ()
+{
+    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
 
 
-## ----------------- ##
-## Global variables. ##
-## ----------------- ##
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+    # Extract subdirectory from the argument.
+    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
 
-# Except for the global variables explicitly listed below, the following
-# functions in the '^func_' namespace, and the '^require_' namespace
-# variables initialised in the 'Resource management' section, sourcing
-# this file will not pollute your global namespace with anything
-# else. There's no portable way to scope variables in Bourne shell
-# though, so actually running these functions will sometimes place
-# results into a variable named after the function, and often use
-# temporary variables in the '^_G_' namespace. If you are careful to
-# avoid using those namespaces casually in your sourcing script, things
-# should continue to work as you expect. And, of course, you can freely
-# overwrite any of the functions or variables defined here before
-# calling anything to customize them.
 
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+    case ${2} in
+      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+    esac
+} # func_stripname may be replaced by extended shell implementation
 
-# Allow overriding, eg assuming that you follow the convention of
-# putting '$debug_cmd' at the start of all your functions, you can get
-# bash to show function call trace with:
-#
-#    debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
-debug_cmd=${debug_cmd-":"}
-exit_cmd=:
 
-# By convention, finish your script with:
-#
-#    exit $exit_status
-#
-# so that you can set exit_status to non-zero if you want to indicate
-# something went wrong during execution without actually bailing out at
-# the point of failure.
-exit_status=$EXIT_SUCCESS
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+		s@/\./@/@g
+		t dotsl
+		s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
 
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath=$0
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # Start from root dir and reassemble the path.
+  func_normal_abspath_result=
+  func_normal_abspath_tpath=$1
+  func_normal_abspath_altnamespace=
+  case $func_normal_abspath_tpath in
+    "")
+      # Empty path, that just means $cwd.
+      func_stripname '' '/' "`pwd`"
+      func_normal_abspath_result=$func_stripname_result
+      return
+    ;;
+    # The next three entries are used to spot a run of precisely
+    # two leading slashes without using negated character classes;
+    # we take advantage of case's first-match behaviour.
+    ///*)
+      # Unusual form of absolute path, do nothing.
+    ;;
+    //*)
+      # Not necessarily an ordinary path; POSIX reserves leading '//'
+      # and for example Cygwin uses it to access remote file shares
+      # over CIFS/SMB, so we conserve a leading double slash if found.
+      func_normal_abspath_altnamespace=/
+    ;;
+    /*)
+      # Absolute path, do nothing.
+    ;;
+    *)
+      # Relative path, prepend $cwd.
+      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+    ;;
+  esac
+  # Cancel out all the simple stuff to save iterations.  We also want
+  # the path to end with a slash for ease of parsing, so make sure
+  # there is one (and only one) here.
+  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+  while :; do
+    # Processed it all yet?
+    if test "$func_normal_abspath_tpath" = / ; then
+      # If we ascended to the root using ".." the result may be empty now.
+      if test -z "$func_normal_abspath_result" ; then
+        func_normal_abspath_result=/
+      fi
+      break
+    fi
+    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcdr"`
+    # Figure out what to do with it
+    case $func_normal_abspath_tcomponent in
+      "")
+        # Trailing empty path component, ignore it.
+      ;;
+      ..)
+        # Parent dir; strip last assembled component from result.
+        func_dirname "$func_normal_abspath_result"
+        func_normal_abspath_result=$func_dirname_result
+      ;;
+      *)
+        # Actual path component, append it.
+        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+      ;;
+    esac
+  done
+  # Restore leading double-slash if one was found on entry.
+  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  func_relative_path_result=
+  func_normal_abspath "$1"
+  func_relative_path_tlibdir=$func_normal_abspath_result
+  func_normal_abspath "$2"
+  func_relative_path_tbindir=$func_normal_abspath_result
+
+  # Ascend the tree starting from libdir
+  while :; do
+    # check if we have found a prefix of bindir
+    case $func_relative_path_tbindir in
+      $func_relative_path_tlibdir)
+        # found an exact match
+        func_relative_path_tcancelled=
+        break
+        ;;
+      $func_relative_path_tlibdir*)
+        # found a matching prefix
+        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+        func_relative_path_tcancelled=$func_stripname_result
+        if test -z "$func_relative_path_result"; then
+          func_relative_path_result=.
+        fi
+        break
+        ;;
+      *)
+        func_dirname $func_relative_path_tlibdir
+        func_relative_path_tlibdir=${func_dirname_result}
+        if test "x$func_relative_path_tlibdir" = x ; then
+          # Have to descend all the way to the root!
+          func_relative_path_result=../$func_relative_path_result
+          func_relative_path_tcancelled=$func_relative_path_tbindir
+          break
+        fi
+        func_relative_path_result=../$func_relative_path_result
+        ;;
+    esac
+  done
+
+  # Now calculate path; take care to avoid doubling-up slashes.
+  func_stripname '' '/' "$func_relative_path_result"
+  func_relative_path_result=$func_stripname_result
+  func_stripname '/' '/' "$func_relative_path_tcancelled"
+  if test "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
 
-# The name of this program.
-progname=`$ECHO "$progpath" |$SED "$sed_basename"`
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
 
-# Make sure we have an absolute progpath for reexecution:
+# Make sure we have an absolute path for reexecution:
 case $progpath in
   [\\/]*|[A-Za-z]:\\*) ;;
   *[\\/]*)
-     progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
+     progdir=$func_dirname_result
      progdir=`cd "$progdir" && pwd`
-     progpath=$progdir/$progname
+     progpath="$progdir/$progname"
      ;;
   *)
-     _G_IFS=$IFS
+     save_IFS="$IFS"
      IFS=${PATH_SEPARATOR-:}
      for progdir in $PATH; do
-       IFS=$_G_IFS
+       IFS="$save_IFS"
        test -x "$progdir/$progname" && break
      done
-     IFS=$_G_IFS
+     IFS="$save_IFS"
      test -n "$progdir" || progdir=`pwd`
-     progpath=$progdir/$progname
+     progpath="$progdir/$progname"
      ;;
 esac
 
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
-## ----------------- ##
-## Standard options. ##
-## ----------------- ##
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
 
-# The following options affect the operation of the functions defined
-# below, and should be set appropriately depending on run-time para-
-# meters passed on the command line.
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
 
+# Standard options:
 opt_dry_run=false
+opt_help=false
 opt_quiet=false
 opt_verbose=false
+opt_warning=:
 
-# Categories 'all' and 'none' are always available.  Append any others
-# you will pass as the first argument to func_warning from your own
-# code.
-warning_categories=
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
 
-# By default, display warnings according to 'opt_warning_types'.  Set
-# 'warning_func'  to ':' to elide all warnings, or func_fatal_error to
-# treat the next displayed warning as a fatal error.
-warning_func=func_warn_and_continue
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
 
-# Set to 'all' to display all warnings, 'none' to suppress all
-# warnings, or a space delimited list of some subset of
-# 'warning_categories' to display only the listed warnings.
-opt_warning_types=all
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
 
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
 
-## -------------------- ##
-## Resource management. ##
-## -------------------- ##
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
 
-# This section contains definitions for functions that each ensure a
-# particular resource (a file, or a non-empty configuration variable for
-# example) is available, and if appropriate to extract default values
-# from pertinent package files. Call them using their associated
-# 'require_*' variable to ensure that they are executed, at most, once.
-#
-# It's entirely deliberate that calling these functions can set
-# variables that don't obey the namespace limitations obeyed by the rest
-# of this file, in order that that they be as useful as possible to
-# callers.
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
 
+    # bash bug again:
+    :
+}
 
-# require_term_colors
-# -------------------
-# Allow display of bold text on terminals that support it.
-require_term_colors=func_require_term_colors
-func_require_term_colors ()
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
 {
-    $debug_cmd
-
-    test -t 1 && {
-      # COLORTERM and USE_ANSI_COLORS environment variables take
-      # precedence, because most terminfo databases neglect to describe
-      # whether color sequences are supported.
-      test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
-
-      if test 1 = "$USE_ANSI_COLORS"; then
-        # Standard ANSI escape sequences
-        tc_reset=''
-        tc_bold='';   tc_standout=''
-        tc_red='';   tc_green=''
-        tc_blue='';  tc_cyan=''
-      else
-        # Otherwise trust the terminfo database after all.
-        test -n "`tput sgr0 2>/dev/null`" && {
-          tc_reset=`tput sgr0`
-          test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
-          tc_standout=$tc_bold
-          test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
-          test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
-          test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
-          test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
-          test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
-        }
-      fi
-    }
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
 
-    require_term_colors=:
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
 }
+help="Try \`$progname --help' for more information."  ## default
 
 
-## ----------------- ##
-## Function library. ##
-## ----------------- ##
-
-# This section contains a variety of useful functions to call in your
-# scripts. Take note of the portable wrappers for features provided by
-# some modern shells, which will fall back to slower equivalents on
-# less featureful shells.
-
-
-# func_append VAR VALUE
-# ---------------------
-# Append VALUE onto the existing contents of VAR.
-
-  # We should try to minimise forks, especially on Windows where they are
-  # unreasonably slow, so skip the feature probes when bash or zsh are
-  # being used:
-  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
-    : ${_G_HAVE_ARITH_OP="yes"}
-    : ${_G_HAVE_XSI_OPS="yes"}
-    # The += operator was introduced in bash 3.1
-    case $BASH_VERSION in
-      [12].* | 3.0 | 3.0*) ;;
-      *)
-        : ${_G_HAVE_PLUSEQ_OP="yes"}
-        ;;
-    esac
-  fi
-
-  # _G_HAVE_PLUSEQ_OP
-  # Can be empty, in which case the shell is probed, "yes" if += is
-  # useable or anything else if it does not work.
-  test -z "$_G_HAVE_PLUSEQ_OP" \
-    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
-    && _G_HAVE_PLUSEQ_OP=yes
-
-if test yes = "$_G_HAVE_PLUSEQ_OP"
-then
-  # This is an XSI compatible shell, allowing a faster implementation...
-  eval 'func_append ()
-  {
-    $debug_cmd
-
-    eval "$1+=\$2"
-  }'
-else
-  # ...otherwise fall back to using expr, which is often a shell builtin.
-  func_append ()
-  {
-    $debug_cmd
-
-    eval "$1=\$$1\$2"
-  }
-fi
-
-
-# func_append_quoted VAR VALUE
-# ----------------------------
-# Quote VALUE and append to the end of shell variable VAR, separated
-# by a space.
-if test yes = "$_G_HAVE_PLUSEQ_OP"; then
-  eval 'func_append_quoted ()
-  {
-    $debug_cmd
-
-    func_quote_for_eval "$2"
-    eval "$1+=\\ \$func_quote_for_eval_result"
-  }'
-else
-  func_append_quoted ()
-  {
-    $debug_cmd
-
-    func_quote_for_eval "$2"
-    eval "$1=\$$1\\ \$func_quote_for_eval_result"
-  }
-fi
-
-
-# func_append_uniq VAR VALUE
-# --------------------------
-# Append unique VALUE onto the existing contents of VAR, assuming
-# entries are delimited by the first character of VALUE.  For example:
-#
-#   func_append_uniq options " --another-option option-argument"
-#
-# will only append to $options if " --another-option option-argument "
-# is not already present somewhere in $options already (note spaces at
-# each end implied by leading space in second argument).
-func_append_uniq ()
-{
-    $debug_cmd
-
-    eval _G_current_value='`$ECHO $'$1'`'
-    _G_delim=`expr "$2" : '\(.\)'`
-
-    case $_G_delim$_G_current_value$_G_delim in
-      *"$2$_G_delim"*) ;;
-      *) func_append "$@" ;;
-    esac
-}
-
-
-# func_arith TERM...
-# ------------------
-# Set func_arith_result to the result of evaluating TERMs.
-  test -z "$_G_HAVE_ARITH_OP" \
-    && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
-    && _G_HAVE_ARITH_OP=yes
-
-if test yes = "$_G_HAVE_ARITH_OP"; then
-  eval 'func_arith ()
-  {
-    $debug_cmd
-
-    func_arith_result=$(( $* ))
-  }'
-else
-  func_arith ()
-  {
-    $debug_cmd
-
-    func_arith_result=`expr "$@"`
-  }
-fi
-
-
-# func_basename FILE
-# ------------------
-# Set func_basename_result to FILE with everything up to and including
-# the last / stripped.
-if test yes = "$_G_HAVE_XSI_OPS"; then
-  # If this shell supports suffix pattern removal, then use it to avoid
-  # forking. Hide the definitions single quotes in case the shell chokes
-  # on unsupported syntax...
-  _b='func_basename_result=${1##*/}'
-  _d='case $1 in
-        */*) func_dirname_result=${1%/*}$2 ;;
-        *  ) func_dirname_result=$3        ;;
-      esac'
-
-else
-  # ...otherwise fall back to using sed.
-  _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
-  _d='func_dirname_result=`$ECHO "$1"  |$SED "$sed_dirname"`
-      if test "X$func_dirname_result" = "X$1"; then
-        func_dirname_result=$3
-      else
-        func_append func_dirname_result "$2"
-      fi'
-fi
-
-eval 'func_basename ()
-{
-    $debug_cmd
-
-    '"$_b"'
-}'
-
-
-# func_dirname FILE APPEND NONDIR_REPLACEMENT
-# -------------------------------------------
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-eval 'func_dirname ()
-{
-    $debug_cmd
-
-    '"$_d"'
-}'
-
-
-# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
-# --------------------------------------------------------
-# Perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# For efficiency, we do not delegate to the functions above but instead
-# duplicate the functionality here.
-eval 'func_dirname_and_basename ()
-{
-    $debug_cmd
-
-    '"$_b"'
-    '"$_d"'
-}'
-
-
-# func_echo ARG...
-# ----------------
-# Echo program name prefixed message.
-func_echo ()
-{
-    $debug_cmd
-
-    _G_message=$*
-
-    func_echo_IFS=$IFS
-    IFS=$nl
-    for _G_line in $_G_message; do
-      IFS=$func_echo_IFS
-      $ECHO "$progname: $_G_line"
-    done
-    IFS=$func_echo_IFS
-}
-
-
-# func_echo_all ARG...
-# --------------------
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
-    $ECHO "$*"
-}
-
-
-# func_echo_infix_1 INFIX ARG...
-# ------------------------------
-# Echo program name, followed by INFIX on the first line, with any
-# additional lines not showing INFIX.
-func_echo_infix_1 ()
-{
-    $debug_cmd
-
-    $require_term_colors
-
-    _G_infix=$1; shift
-    _G_indent=$_G_infix
-    _G_prefix="$progname: $_G_infix: "
-    _G_message=$*
-
-    # Strip color escape sequences before counting printable length
-    for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
-    do
-      test -n "$_G_tc" && {
-        _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
-        _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
-      }
-    done
-    _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`"  " ## exclude from sc_prohibit_nested_quotes
-
-    func_echo_infix_1_IFS=$IFS
-    IFS=$nl
-    for _G_line in $_G_message; do
-      IFS=$func_echo_infix_1_IFS
-      $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
-      _G_prefix=$_G_indent
-    done
-    IFS=$func_echo_infix_1_IFS
-}
-
-
-# func_error ARG...
-# -----------------
-# Echo program name prefixed message to standard error.
-func_error ()
-{
-    $debug_cmd
-
-    $require_term_colors
-
-    func_echo_infix_1 "  $tc_standout${tc_red}error$tc_reset" "$*" >&2
-}
-
-
-# func_fatal_error ARG...
-# -----------------------
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
-    $debug_cmd
-
-    func_error "$*"
-    exit $EXIT_FAILURE
-}
-
-
-# func_grep EXPRESSION FILENAME
-# -----------------------------
+# func_grep expression filename
 # Check whether EXPRESSION matches any line of FILENAME, without output.
 func_grep ()
 {
-    $debug_cmd
-
     $GREP "$1" "$2" >/dev/null 2>&1
 }
 
 
-# func_len STRING
-# ---------------
-# Set func_len_result to the length of STRING. STRING may not
-# start with a hyphen.
-  test -z "$_G_HAVE_XSI_OPS" \
-    && (eval 'x=a/b/c;
-      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
-    && _G_HAVE_XSI_OPS=yes
-
-if test yes = "$_G_HAVE_XSI_OPS"; then
-  eval 'func_len ()
-  {
-    $debug_cmd
-
-    func_len_result=${#1}
-  }'
-else
-  func_len ()
-  {
-    $debug_cmd
-
-    func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-  }
-fi
-
-
-# func_mkdir_p DIRECTORY-PATH
-# ---------------------------
+# func_mkdir_p directory-path
 # Make sure the entire path to DIRECTORY-PATH is available.
 func_mkdir_p ()
 {
-    $debug_cmd
-
-    _G_directory_path=$1
-    _G_dir_list=
+    my_directory_path="$1"
+    my_dir_list=
 
-    if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
 
-      # Protect directory names starting with '-'
-      case $_G_directory_path in
-        -*) _G_directory_path=./$_G_directory_path ;;
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
       esac
 
       # While some portion of DIR does not yet exist...
-      while test ! -d "$_G_directory_path"; do
+      while test ! -d "$my_directory_path"; do
         # ...make a list in topmost first order.  Use a colon delimited
 	# list incase some portion of path contains whitespace.
-        _G_dir_list=$_G_directory_path:$_G_dir_list
+        my_dir_list="$my_directory_path:$my_dir_list"
 
         # If the last portion added has no slash in it, the list is done
-        case $_G_directory_path in */*) ;; *) break ;; esac
+        case $my_directory_path in */*) ;; *) break ;; esac
 
         # ...otherwise throw away the child directory and loop
-        _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
       done
-      _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
 
-      func_mkdir_p_IFS=$IFS; IFS=:
-      for _G_dir in $_G_dir_list; do
-	IFS=$func_mkdir_p_IFS
-        # mkdir can fail with a 'File exist' error if two processes
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+	IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
         # try to create one of the directories concurrently.  Don't
         # stop in that case!
-        $MKDIR "$_G_dir" 2>/dev/null || :
+        $MKDIR "$my_dir" 2>/dev/null || :
       done
-      IFS=$func_mkdir_p_IFS
+      IFS="$save_mkdir_p_IFS"
 
       # Bail out if we (or some other process) failed to create a directory.
-      test -d "$_G_directory_path" || \
-        func_fatal_error "Failed to create '$1'"
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
     fi
 }
 
 
-# func_mktempdir [BASENAME]
-# -------------------------
+# func_mktempdir [string]
 # Make a temporary directory that won't clash with other running
 # libtool processes, and avoids race conditions if possible.  If
-# given, BASENAME is the basename for that directory.
+# given, STRING is the basename for that directory.
 func_mktempdir ()
 {
-    $debug_cmd
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
 
-    _G_template=${TMPDIR-/tmp}/${1-$progname}
-
-    if test : = "$opt_dry_run"; then
+    if test "$opt_dry_run" = ":"; then
       # Return a directory name, but don't create it in dry-run mode
-      _G_tmpdir=$_G_template-$$
+      my_tmpdir="${my_template}-$$"
     else
 
       # If mktemp works, use that first and foremost
-      _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
 
-      if test ! -d "$_G_tmpdir"; then
+      if test ! -d "$my_tmpdir"; then
         # Failing that, at least try and use $RANDOM to avoid a race
-        _G_tmpdir=$_G_template-${RANDOM-0}$$
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
 
-        func_mktempdir_umask=`umask`
+        save_mktempdir_umask=`umask`
         umask 0077
-        $MKDIR "$_G_tmpdir"
-        umask $func_mktempdir_umask
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
       fi
 
       # If we're not in dry-run mode, bomb out on failure
-      test -d "$_G_tmpdir" || \
-        func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
-    fi
-
-    $ECHO "$_G_tmpdir"
-}
-
-
-# func_normal_abspath PATH
-# ------------------------
-# Remove doubled-up and trailing slashes, "." path components,
-# and cancel out any ".." path components in PATH after making
-# it an absolute path.
-func_normal_abspath ()
-{
-    $debug_cmd
-
-    # These SED scripts presuppose an absolute path with a trailing slash.
-    _G_pathcar='s|^/\([^/]*\).*$|\1|'
-    _G_pathcdr='s|^/[^/]*||'
-    _G_removedotparts=':dotsl
-		s|/\./|/|g
-		t dotsl
-		s|/\.$|/|'
-    _G_collapseslashes='s|/\{1,\}|/|g'
-    _G_finalslash='s|/*$|/|'
-
-    # Start from root dir and reassemble the path.
-    func_normal_abspath_result=
-    func_normal_abspath_tpath=$1
-    func_normal_abspath_altnamespace=
-    case $func_normal_abspath_tpath in
-      "")
-        # Empty path, that just means $cwd.
-        func_stripname '' '/' "`pwd`"
-        func_normal_abspath_result=$func_stripname_result
-        return
-        ;;
-      # The next three entries are used to spot a run of precisely
-      # two leading slashes without using negated character classes;
-      # we take advantage of case's first-match behaviour.
-      ///*)
-        # Unusual form of absolute path, do nothing.
-        ;;
-      //*)
-        # Not necessarily an ordinary path; POSIX reserves leading '//'
-        # and for example Cygwin uses it to access remote file shares
-        # over CIFS/SMB, so we conserve a leading double slash if found.
-        func_normal_abspath_altnamespace=/
-        ;;
-      /*)
-        # Absolute path, do nothing.
-        ;;
-      *)
-        # Relative path, prepend $cwd.
-        func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
-        ;;
-    esac
-
-    # Cancel out all the simple stuff to save iterations.  We also want
-    # the path to end with a slash for ease of parsing, so make sure
-    # there is one (and only one) here.
-    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-          -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
-    while :; do
-      # Processed it all yet?
-      if test / = "$func_normal_abspath_tpath"; then
-        # If we ascended to the root using ".." the result may be empty now.
-        if test -z "$func_normal_abspath_result"; then
-          func_normal_abspath_result=/
-        fi
-        break
-      fi
-      func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
-          -e "$_G_pathcar"`
-      func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-          -e "$_G_pathcdr"`
-      # Figure out what to do with it
-      case $func_normal_abspath_tcomponent in
-        "")
-          # Trailing empty path component, ignore it.
-          ;;
-        ..)
-          # Parent dir; strip last assembled component from result.
-          func_dirname "$func_normal_abspath_result"
-          func_normal_abspath_result=$func_dirname_result
-          ;;
-        *)
-          # Actual path component, append it.
-          func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
-          ;;
-      esac
-    done
-    # Restore leading double-slash if one was found on entry.
-    func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
-}
-
-
-# func_notquiet ARG...
-# --------------------
-# Echo program name prefixed message only when not in quiet mode.
-func_notquiet ()
-{
-    $debug_cmd
-
-    $opt_quiet || func_echo ${1+"$@"}
-
-    # A bug in bash halts the script if the last line of a function
-    # fails when set -e is in force, so we need another command to
-    # work around that:
-    :
-}
-
-
-# func_relative_path SRCDIR DSTDIR
-# --------------------------------
-# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
-func_relative_path ()
-{
-    $debug_cmd
-
-    func_relative_path_result=
-    func_normal_abspath "$1"
-    func_relative_path_tlibdir=$func_normal_abspath_result
-    func_normal_abspath "$2"
-    func_relative_path_tbindir=$func_normal_abspath_result
-
-    # Ascend the tree starting from libdir
-    while :; do
-      # check if we have found a prefix of bindir
-      case $func_relative_path_tbindir in
-        $func_relative_path_tlibdir)
-          # found an exact match
-          func_relative_path_tcancelled=
-          break
-          ;;
-        $func_relative_path_tlibdir*)
-          # found a matching prefix
-          func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
-          func_relative_path_tcancelled=$func_stripname_result
-          if test -z "$func_relative_path_result"; then
-            func_relative_path_result=.
-          fi
-          break
-          ;;
-        *)
-          func_dirname $func_relative_path_tlibdir
-          func_relative_path_tlibdir=$func_dirname_result
-          if test -z "$func_relative_path_tlibdir"; then
-            # Have to descend all the way to the root!
-            func_relative_path_result=../$func_relative_path_result
-            func_relative_path_tcancelled=$func_relative_path_tbindir
-            break
-          fi
-          func_relative_path_result=../$func_relative_path_result
-          ;;
-      esac
-    done
-
-    # Now calculate path; take care to avoid doubling-up slashes.
-    func_stripname '' '/' "$func_relative_path_result"
-    func_relative_path_result=$func_stripname_result
-    func_stripname '/' '/' "$func_relative_path_tcancelled"
-    if test -n "$func_stripname_result"; then
-      func_append func_relative_path_result "/$func_stripname_result"
-    fi
-
-    # Normalisation. If bindir is libdir, return '.' else relative path.
-    if test -n "$func_relative_path_result"; then
-      func_stripname './' '' "$func_relative_path_result"
-      func_relative_path_result=$func_stripname_result
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
     fi
 
-    test -n "$func_relative_path_result" || func_relative_path_result=.
-
-    :
+    $ECHO "$my_tmpdir"
 }
 
 
-# func_quote_for_eval ARG...
-# --------------------------
-# Aesthetically quote ARGs to be evaled later.
-# This function returns two values:
-#   i) func_quote_for_eval_result
-#      double-quoted, suitable for a subsequent eval
-#  ii) func_quote_for_eval_unquoted_result
-#      has all characters that are still active within double
-#      quotes backslashified.
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
 func_quote_for_eval ()
 {
-    $debug_cmd
-
-    func_quote_for_eval_unquoted_result=
-    func_quote_for_eval_result=
-    while test 0 -lt $#; do
-      case $1 in
-        *[\\\`\"\$]*)
-	  _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
-        *)
-          _G_unquoted_arg=$1 ;;
-      esac
-      if test -n "$func_quote_for_eval_unquoted_result"; then
-	func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
-      else
-        func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
-      fi
-
-      case $_G_unquoted_arg in
-        # Double-quote args containing shell metacharacters to delay
-        # word splitting, command substitution and variable expansion
-        # for a subsequent eval.
-        # Many Bourne shells cannot handle close brackets correctly
-        # in scan sets, so we specify it separately.
-        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-          _G_quoted_arg=\"$_G_unquoted_arg\"
-          ;;
-        *)
-          _G_quoted_arg=$_G_unquoted_arg
-	  ;;
-      esac
-
-      if test -n "$func_quote_for_eval_result"; then
-	func_append func_quote_for_eval_result " $_G_quoted_arg"
-      else
-        func_append func_quote_for_eval_result "$_G_quoted_arg"
-      fi
-      shift
-    done
-}
-
-
-# func_quote_for_expand ARG
-# -------------------------
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
-    $debug_cmd
-
     case $1 in
-      *[\\\`\"]*)
-	_G_arg=`$ECHO "$1" | $SED \
-	    -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+      *[\\\`\"\$]*)
+	func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
       *)
-        _G_arg=$1 ;;
+        func_quote_for_eval_unquoted_result="$1" ;;
     esac
 
-    case $_G_arg in
+    case $func_quote_for_eval_unquoted_result in
       # Double-quote args containing shell metacharacters to delay
-      # word splitting and command substitution for a subsequent eval.
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
       # Many Bourne shells cannot handle close brackets correctly
       # in scan sets, so we specify it separately.
       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-        _G_arg=\"$_G_arg\"
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
         ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
     esac
-
-    func_quote_for_expand_result=$_G_arg
-}
-
-
-# func_stripname PREFIX SUFFIX NAME
-# ---------------------------------
-# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-if test yes = "$_G_HAVE_XSI_OPS"; then
-  eval 'func_stripname ()
-  {
-    $debug_cmd
-
-    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-    # positional parameters, so assign one to ordinary variable first.
-    func_stripname_result=$3
-    func_stripname_result=${func_stripname_result#"$1"}
-    func_stripname_result=${func_stripname_result%"$2"}
-  }'
-else
-  func_stripname ()
-  {
-    $debug_cmd
-
-    case $2 in
-      .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
-      *)  func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
-    esac
-  }
-fi
-
-
-# func_show_eval CMD [FAIL_EXP]
-# -----------------------------
-# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
-{
-    $debug_cmd
-
-    _G_cmd=$1
-    _G_fail_exp=${2-':'}
-
-    func_quote_for_expand "$_G_cmd"
-    eval "func_notquiet $func_quote_for_expand_result"
-
-    $opt_dry_run || {
-      eval "$_G_cmd"
-      _G_status=$?
-      if test 0 -ne "$_G_status"; then
-	eval "(exit $_G_status); $_G_fail_exp"
-      fi
-    }
 }
 
 
-# func_show_eval_locale CMD [FAIL_EXP]
-# ------------------------------------
-# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.  Use the saved locale for evaluation.
-func_show_eval_locale ()
-{
-    $debug_cmd
-
-    _G_cmd=$1
-    _G_fail_exp=${2-':'}
-
-    $opt_quiet || {
-      func_quote_for_expand "$_G_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
-
-    $opt_dry_run || {
-      eval "$_G_user_locale
-	    $_G_cmd"
-      _G_status=$?
-      eval "$_G_safe_locale"
-      if test 0 -ne "$_G_status"; then
-	eval "(exit $_G_status); $_G_fail_exp"
-      fi
-    }
-}
-
-
-# func_tr_sh
-# ----------
-# Turn $1 into a string suitable for a shell variable name.
-# Result is stored in $func_tr_sh_result.  All characters
-# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
-# if $1 begins with a digit, a '_' is prepended as well.
-func_tr_sh ()
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
 {
-    $debug_cmd
-
     case $1 in
-    [0-9]* | *[!a-zA-Z0-9_]*)
-      func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
-      ;;
-    * )
-      func_tr_sh_result=$1
-      ;;
-    esac
-}
-
-
-# func_verbose ARG...
-# -------------------
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
-    $debug_cmd
-
-    $opt_verbose && func_echo "$*"
-
-    :
-}
-
-
-# func_warn_and_continue ARG...
-# -----------------------------
-# Echo program name prefixed warning message to standard error.
-func_warn_and_continue ()
-{
-    $debug_cmd
-
-    $require_term_colors
-
-    func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
-}
-
-
-# func_warning CATEGORY ARG...
-# ----------------------------
-# Echo program name prefixed warning message to standard error. Warning
-# messages can be filtered according to CATEGORY, where this function
-# elides messages where CATEGORY is not listed in the global variable
-# 'opt_warning_types'.
-func_warning ()
-{
-    $debug_cmd
-
-    # CATEGORY must be in the warning_categories list!
-    case " $warning_categories " in
-      *" $1 "*) ;;
-      *) func_internal_error "invalid warning category '$1'" ;;
-    esac
-
-    _G_category=$1
-    shift
-
-    case " $opt_warning_types " in
-      *" $_G_category "*) $warning_func ${1+"$@"} ;;
-    esac
-}
-
-
-# func_sort_ver VER1 VER2
-# -----------------------
-# 'sort -V' is not generally available.
-# Note this deviates from the version comparison in automake
-# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
-# but this should suffice as we won't be specifying old
-# version formats or redundant trailing .0 in bootstrap.conf.
-# If we did want full compatibility then we should probably
-# use m4_version_compare from autoconf.
-func_sort_ver ()
-{
-    $debug_cmd
-
-    printf '%s\n%s\n' "$1" "$2" \
-      | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
-}
-
-# func_lt_ver PREV CURR
-# ---------------------
-# Return true if PREV and CURR are in the correct order according to
-# func_sort_ver, otherwise false.  Use it like this:
-#
-#  func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
-func_lt_ver ()
-{
-    $debug_cmd
-
-    test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
-}
-
-
-# Local variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
-# time-stamp-time-zone: "UTC"
-# End:
-#! /bin/sh
-
-# Set a version string for this script.
-scriptversion=2014-01-07.03; # UTC
-
-# A portable, pluggable option parser for Bourne shell.
-# Written by Gary V. Vaughan, 2010
-
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Please report bugs or propose patches to gary at gnu.org.
-
-
-## ------ ##
-## Usage. ##
-## ------ ##
-
-# This file is a library for parsing options in your shell scripts along
-# with assorted other useful supporting features that you can make use
-# of too.
-#
-# For the simplest scripts you might need only:
-#
-#   #!/bin/sh
-#   . relative/path/to/funclib.sh
-#   . relative/path/to/options-parser
-#   scriptversion=1.0
-#   func_options ${1+"$@"}
-#   eval set dummy "$func_options_result"; shift
-#   ...rest of your script...
-#
-# In order for the '--version' option to work, you will need to have a
-# suitably formatted comment like the one at the top of this file
-# starting with '# Written by ' and ending with '# warranty; '.
-#
-# For '-h' and '--help' to work, you will also need a one line
-# description of your script's purpose in a comment directly above the
-# '# Written by ' line, like the one at the top of this file.
-#
-# The default options also support '--debug', which will turn on shell
-# execution tracing (see the comment above debug_cmd below for another
-# use), and '--verbose' and the func_verbose function to allow your script
-# to display verbose messages only when your user has specified
-# '--verbose'.
-#
-# After sourcing this file, you can plug processing for additional
-# options by amending the variables from the 'Configuration' section
-# below, and following the instructions in the 'Option parsing'
-# section further down.
-
-## -------------- ##
-## Configuration. ##
-## -------------- ##
-
-# You should override these variables in your script after sourcing this
-# file so that they reflect the customisations you have added to the
-# option parser.
-
-# The usage line for option parsing errors and the start of '-h' and
-# '--help' output messages. You can embed shell variables for delayed
-# expansion at the time the message is displayed, but you will need to
-# quote other shell meta-characters carefully to prevent them being
-# expanded when the contents are evaled.
-usage='$progpath [OPTION]...'
-
-# Short help message in response to '-h' and '--help'.  Add to this or
-# override it after sourcing this library to reflect the full set of
-# options your script accepts.
-usage_message="\
-       --debug        enable verbose shell tracing
-   -W, --warnings=CATEGORY
-                      report the warnings falling in CATEGORY [all]
-   -v, --verbose      verbosely report processing
-       --version      print version information and exit
-   -h, --help         print short or long help message and exit
-"
-
-# Additional text appended to 'usage_message' in response to '--help'.
-long_help_message="
-Warning categories include:
-       'all'          show all warnings
-       'none'         turn off all the warnings
-       'error'        warnings are treated as fatal errors"
-
-# Help message printed before fatal option parsing errors.
-fatal_help="Try '\$progname --help' for more information."
-
-
-
-## ------------------------- ##
-## Hook function management. ##
-## ------------------------- ##
-
-# This section contains functions for adding, removing, and running hooks
-# to the main code.  A hook is just a named list of of function, that can
-# be run in order later on.
-
-# func_hookable FUNC_NAME
-# -----------------------
-# Declare that FUNC_NAME will run hooks added with
-# 'func_add_hook FUNC_NAME ...'.
-func_hookable ()
-{
-    $debug_cmd
-
-    func_append hookable_fns " $1"
-}
-
-
-# func_add_hook FUNC_NAME HOOK_FUNC
-# ---------------------------------
-# Request that FUNC_NAME call HOOK_FUNC before it returns.  FUNC_NAME must
-# first have been declared "hookable" by a call to 'func_hookable'.
-func_add_hook ()
-{
-    $debug_cmd
-
-    case " $hookable_fns " in
-      *" $1 "*) ;;
-      *) func_fatal_error "'$1' does not accept hook functions." ;;
-    esac
-
-    eval func_append ${1}_hooks '" $2"'
-}
-
-
-# func_remove_hook FUNC_NAME HOOK_FUNC
-# ------------------------------------
-# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
-func_remove_hook ()
-{
-    $debug_cmd
-
-    eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
-}
-
-
-# func_run_hooks FUNC_NAME [ARG]...
-# ---------------------------------
-# Run all hook functions registered to FUNC_NAME.
-# It is assumed that the list of hook functions contains nothing more
-# than a whitespace-delimited list of legal shell function names, and
-# no effort is wasted trying to catch shell meta-characters or preserve
-# whitespace.
-func_run_hooks ()
-{
-    $debug_cmd
-
-    case " $hookable_fns " in
-      *" $1 "*) ;;
-      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+      *[\\\`\"]*)
+	my_arg=`$ECHO "$1" | $SED \
+	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        my_arg="$1" ;;
     esac
 
-    eval _G_hook_fns=\$$1_hooks; shift
-
-    for _G_hook in $_G_hook_fns; do
-      eval $_G_hook '"$@"'
-
-      # store returned options list back into positional
-      # parameters for next 'cmd' execution.
-      eval _G_hook_result=\$${_G_hook}_result
-      eval set dummy "$_G_hook_result"; shift
-    done
-
-    func_quote_for_eval ${1+"$@"}
-    func_run_hooks_result=$func_quote_for_eval_result
-}
-
-
-
-## --------------- ##
-## Option parsing. ##
-## --------------- ##
-
-# In order to add your own option parsing hooks, you must accept the
-# full positional parameter list in your hook function, remove any
-# options that you action, and then pass back the remaining unprocessed
-# options in '<hooked_function_name>_result', escaped suitably for
-# 'eval'.  Like this:
-#
-#    my_options_prep ()
-#    {
-#        $debug_cmd
-#
-#        # Extend the existing usage message.
-#        usage_message=$usage_message'
-#      -s, --silent       don'\''t print informational messages
-#    '
-#
-#        func_quote_for_eval ${1+"$@"}
-#        my_options_prep_result=$func_quote_for_eval_result
-#    }
-#    func_add_hook func_options_prep my_options_prep
-#
-#
-#    my_silent_option ()
-#    {
-#        $debug_cmd
-#
-#        # Note that for efficiency, we parse as many options as we can
-#        # recognise in a loop before passing the remainder back to the
-#        # caller on the first unrecognised argument we encounter.
-#        while test $# -gt 0; do
-#          opt=$1; shift
-#          case $opt in
-#            --silent|-s) opt_silent=: ;;
-#            # Separate non-argument short options:
-#            -s*)         func_split_short_opt "$_G_opt"
-#                         set dummy "$func_split_short_opt_name" \
-#                             "-$func_split_short_opt_arg" ${1+"$@"}
-#                         shift
-#                         ;;
-#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
-#          esac
-#        done
-#
-#        func_quote_for_eval ${1+"$@"}
-#        my_silent_option_result=$func_quote_for_eval_result
-#    }
-#    func_add_hook func_parse_options my_silent_option
-#
-#
-#    my_option_validation ()
-#    {
-#        $debug_cmd
-#
-#        $opt_silent && $opt_verbose && func_fatal_help "\
-#    '--silent' and '--verbose' options are mutually exclusive."
-#
-#        func_quote_for_eval ${1+"$@"}
-#        my_option_validation_result=$func_quote_for_eval_result
-#    }
-#    func_add_hook func_validate_options my_option_validation
-#
-# You'll alse need to manually amend $usage_message to reflect the extra
-# options you parse.  It's preferable to append if you can, so that
-# multiple option parsing hooks can be added safely.
-
-
-# func_options [ARG]...
-# ---------------------
-# All the functions called inside func_options are hookable. See the
-# individual implementations for details.
-func_hookable func_options
-func_options ()
-{
-    $debug_cmd
-
-    func_options_prep ${1+"$@"}
-    eval func_parse_options \
-        ${func_options_prep_result+"$func_options_prep_result"}
-    eval func_validate_options \
-        ${func_parse_options_result+"$func_parse_options_result"}
-
-    eval func_run_hooks func_options \
-        ${func_validate_options_result+"$func_validate_options_result"}
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
 
-    # save modified positional parameters for caller
-    func_options_result=$func_run_hooks_result
+    func_quote_for_expand_result="$my_arg"
 }
 
 
-# func_options_prep [ARG]...
-# --------------------------
-# All initialisations required before starting the option parse loop.
-# Note that when calling hook functions, we pass through the list of
-# positional parameters.  If a hook function modifies that list, and
-# needs to propogate that back to rest of this script, then the complete
-# modified list must be put in 'func_run_hooks_result' before
-# returning.
-func_hookable func_options_prep
-func_options_prep ()
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
 {
-    $debug_cmd
-
-    # Option defaults:
-    opt_verbose=false
-    opt_warning_types=
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
 
-    func_run_hooks func_options_prep ${1+"$@"}
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
 
-    # save modified positional parameters for caller
-    func_options_prep_result=$func_run_hooks_result
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
 }
 
 
-# func_parse_options [ARG]...
-# ---------------------------
-# The main option parsing loop.
-func_hookable func_parse_options
-func_parse_options ()
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
 {
-    $debug_cmd
-
-    func_parse_options_result=
-
-    # this just eases exit handling
-    while test $# -gt 0; do
-      # Defer to hook functions for initial option parsing, so they
-      # get priority in the event of reusing an option name.
-      func_run_hooks func_parse_options ${1+"$@"}
-
-      # Adjust func_parse_options positional parameters to match
-      eval set dummy "$func_run_hooks_result"; shift
-
-      # Break out of the loop if we already parsed every option.
-      test $# -gt 0 || break
-
-      _G_opt=$1
-      shift
-      case $_G_opt in
-        --debug|-x)   debug_cmd='set -x'
-                      func_echo "enabling shell trace mode"
-                      $debug_cmd
-                      ;;
-
-        --no-warnings|--no-warning|--no-warn)
-                      set dummy --warnings none ${1+"$@"}
-                      shift
-		      ;;
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
 
-        --warnings|--warning|-W)
-                      test $# = 0 && func_missing_arg $_G_opt && break
-                      case " $warning_categories $1" in
-                        *" $1 "*)
-                          # trailing space prevents matching last $1 above
-                          func_append_uniq opt_warning_types " $1"
-                          ;;
-                        *all)
-                          opt_warning_types=$warning_categories
-                          ;;
-                        *none)
-                          opt_warning_types=none
-                          warning_func=:
-                          ;;
-                        *error)
-                          opt_warning_types=$warning_categories
-                          warning_func=func_fatal_error
-                          ;;
-                        *)
-                          func_fatal_error \
-                             "unsupported warning category: '$1'"
-                          ;;
-                      esac
-                      shift
-                      ;;
-
-        --verbose|-v) opt_verbose=: ;;
-        --version)    func_version ;;
-        -\?|-h)       func_usage ;;
-        --help)       func_help ;;
-
-	# Separate optargs to long options (plugins may need this):
-	--*=*)        func_split_equals "$_G_opt"
-	              set dummy "$func_split_equals_lhs" \
-                          "$func_split_equals_rhs" ${1+"$@"}
-                      shift
-                      ;;
-
-       # Separate optargs to short options:
-        -W*)
-                      func_split_short_opt "$_G_opt"
-                      set dummy "$func_split_short_opt_name" \
-                          "$func_split_short_opt_arg" ${1+"$@"}
-                      shift
-                      ;;
-
-        # Separate non-argument short options:
-        -\?*|-h*|-v*|-x*)
-                      func_split_short_opt "$_G_opt"
-                      set dummy "$func_split_short_opt_name" \
-                          "-$func_split_short_opt_arg" ${1+"$@"}
-                      shift
-                      ;;
-
-        --)           break ;;
-        -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
-        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
-      esac
-    done
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
 
-    # save modified positional parameters for caller
-    func_quote_for_eval ${1+"$@"}
-    func_parse_options_result=$func_quote_for_eval_result
+    if ${opt_dry_run-false}; then :; else
+      eval "$lt_user_locale
+	    $my_cmd"
+      my_status=$?
+      eval "$lt_safe_locale"
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
 }
 
-
-# func_validate_options [ARG]...
-# ------------------------------
-# Perform any sanity checks on option settings and/or unconsumed
-# arguments.
-func_hookable func_validate_options
-func_validate_options ()
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
 {
-    $debug_cmd
-
-    # Display all warnings if -W was not given.
-    test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
-
-    func_run_hooks func_validate_options ${1+"$@"}
-
-    # Bail if the options were screwed!
-    $exit_cmd $EXIT_FAILURE
-
-    # save modified positional parameters for caller
-    func_validate_options_result=$func_run_hooks_result
+  case $1 in
+  [0-9]* | *[!a-zA-Z0-9_]*)
+    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+    ;;
+  * )
+    func_tr_sh_result=$1
+    ;;
+  esac
 }
 
 
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $opt_debug
 
-## ----------------- ##
-## Helper functions. ##
-## ----------------- ##
-
-# This section contains the helper functions used by the rest of the
-# hookable option parser framework in ascii-betical order.
-
+    $SED -n '/(C)/!b go
+	:more
+	/\./!{
+	  N
+	  s/\n# / /
+	  b more
+	}
+	:go
+	/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+	s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
 
-# func_fatal_help ARG...
-# ----------------------
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
 {
-    $debug_cmd
+    $opt_debug
 
-    eval \$ECHO \""Usage: $usage"\"
-    eval \$ECHO \""$fatal_help"\"
-    func_error ${1+"$@"}
-    exit $EXIT_FAILURE
+    $SED -n '/^# Usage:/,/^#  *.*--help/ {
+        s/^# //
+	s/^# *$//
+	s/\$progname/'$progname'/
+	p
+    }' < "$progpath"
+    echo
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
 }
 
-
-# func_help
-# ---------
-# Echo long help message to standard output and exit.
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
 func_help ()
 {
-    $debug_cmd
-
-    func_usage_message
-    $ECHO "$long_help_message"
-    exit 0
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+	:print
+        s/^# //
+	s/^# *$//
+	s*\$progname*'$progname'*
+	s*\$host*'"$host"'*
+	s*\$SHELL*'"$SHELL"'*
+	s*\$LTCC*'"$LTCC"'*
+	s*\$LTCFLAGS*'"$LTCFLAGS"'*
+	s*\$LD*'"$LD"'*
+	s/\$with_gnu_ld/'"$with_gnu_ld"'/
+	s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
+	p
+	d
+     }
+     /^# .* home page:/b print
+     /^# General help using/b print
+     ' < "$progpath"
+    ret=$?
+    if test -z "$1"; then
+      exit $ret
+    fi
 }
 
-
-# func_missing_arg ARGNAME
-# ------------------------
+# func_missing_arg argname
 # Echo program name prefixed message to standard error and set global
 # exit_cmd.
 func_missing_arg ()
 {
-    $debug_cmd
+    $opt_debug
 
-    func_error "Missing argument for '$1'."
+    func_error "missing argument for $1."
     exit_cmd=exit
 }
 
 
-# func_split_equals STRING
-# ------------------------
-# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
-# splitting STRING at the '=' sign.
-test -z "$_G_HAVE_XSI_OPS" \
-    && (eval 'x=a/b/c;
-      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
-    && _G_HAVE_XSI_OPS=yes
-
-if test yes = "$_G_HAVE_XSI_OPS"
-then
-  # This is an XSI compatible shell, allowing a faster implementation...
-  eval 'func_split_equals ()
-  {
-      $debug_cmd
-
-      func_split_equals_lhs=${1%%=*}
-      func_split_equals_rhs=${1#*=}
-      test "x$func_split_equals_lhs" = "x$1" \
-        && func_split_equals_rhs=
-  }'
-else
-  # ...otherwise fall back to using expr, which is often a shell builtin.
-  func_split_equals ()
-  {
-      $debug_cmd
-
-      func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
-      func_split_equals_rhs=
-      test "x$func_split_equals_lhs" = "x$1" \
-        || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
-  }
-fi #func_split_equals
-
-
-# func_split_short_opt SHORTOPT
-# -----------------------------
+# func_split_short_opt shortopt
 # Set func_split_short_opt_name and func_split_short_opt_arg shell
 # variables after splitting SHORTOPT after the 2nd character.
-if test yes = "$_G_HAVE_XSI_OPS"
-then
-  # This is an XSI compatible shell, allowing a faster implementation...
-  eval 'func_split_short_opt ()
-  {
-      $debug_cmd
-
-      func_split_short_opt_arg=${1#??}
-      func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
-  }'
-else
-  # ...otherwise fall back to using expr, which is often a shell builtin.
-  func_split_short_opt ()
-  {
-      $debug_cmd
-
-      func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
-      func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
-  }
-fi #func_split_short_opt
-
-
-# func_usage
-# ----------
-# Echo short help message to standard output and exit.
-func_usage ()
+func_split_short_opt ()
 {
-    $debug_cmd
+    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
 
-    func_usage_message
-    $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
-    exit 0
-}
+    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
 
 
-# func_usage_message
-# ------------------
-# Echo short help message to standard output.
-func_usage_message ()
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
 {
-    $debug_cmd
+    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+    my_sed_long_arg='1s/^--[^=]*=//'
 
-    eval \$ECHO \""Usage: $usage"\"
-    echo
-    $SED -n 's|^# ||
-        /^Written by/{
-          x;p;x
-        }
-	h
-	/^Written by/q' < "$progpath"
-    echo
-    eval \$ECHO \""$usage_message"\"
-}
+    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
 
+exit_cmd=:
 
-# func_version
-# ------------
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $debug_cmd
 
-    printf '%s\n' "$progname $scriptversion"
-    $SED -n '
-        /(C)/!b go
-        :more
-        /\./!{
-          N
-          s|\n# | |
-          b more
-        }
-        :go
-        /^# Written by /,/# warranty; / {
-          s|^# ||
-          s|^# *$||
-          s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
-          p
-        }
-        /^# Written by / {
-          s|^# ||
-          p
-        }
-        /^warranty; /q' < "$progpath"
 
-    exit $?
-}
 
 
-# Local variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
-# time-stamp-time-zone: "UTC"
-# End:
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
 
-# Set a version string.
-scriptversion='(GNU libtool) 2.4.6'
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
 
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
 
-# func_echo ARG...
-# ----------------
-# Libtool also displays the current mode in messages, so override
-# funclib.sh func_echo with this custom definition.
-func_echo ()
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
 {
-    $debug_cmd
+    eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
 
-    _G_message=$*
-
-    func_echo_IFS=$IFS
-    IFS=$nl
-    for _G_line in $_G_message; do
-      IFS=$func_echo_IFS
-      $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
-    done
-    IFS=$func_echo_IFS
-}
-
-
-# func_warning ARG...
-# -------------------
-# Libtool warnings are not categorized, so override funclib.sh
-# func_warning with this simpler definition.
-func_warning ()
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
 {
-    $debug_cmd
+    func_quote_for_eval "${2}"
+    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
 
-    $warning_func ${1+"$@"}
-}
-
-
-## ---------------- ##
-## Options parsing. ##
-## ---------------- ##
-
-# Hook in the functions to make sure our own options are parsed during
-# the option parsing loop.
-
-usage='$progpath [OPTION]... [MODE-ARG]...'
-
-# Short help message in response to '-h'.
-usage_message="Options:
-       --config             show all configuration variables
-       --debug              enable verbose shell tracing
-   -n, --dry-run            display commands without modifying any files
-       --features           display basic configuration information and exit
-       --mode=MODE          use operation mode MODE
-       --no-warnings        equivalent to '-Wnone'
-       --preserve-dup-deps  don't remove duplicate dependency libraries
-       --quiet, --silent    don't print informational messages
-       --tag=TAG            use configuration variables from tag TAG
-   -v, --verbose            print more informational messages than default
-       --version            print version information
-   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [all]
-   -h, --help, --help-all   print short, long, or detailed help message
-"
 
-# Additional text appended to 'usage_message' in response to '--help'.
-func_help ()
+# func_arith arithmetic-term...
+func_arith ()
 {
-    $debug_cmd
-
-    func_usage_message
-    $ECHO "$long_help_message
-
-MODE must be one of the following:
-
-       clean           remove files from the build directory
-       compile         compile a source file into a libtool object
-       execute         automatically set library path, then run a program
-       finish          complete the installation of libtool libraries
-       install         install libraries or executables
-       link            create a library or an executable
-       uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  When passed as first option,
-'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
-Try '$progname --help --mode=MODE' for a more detailed description of MODE.
-
-When reporting a bug, please describe a test case to reproduce it and
-include the following information:
-
-       host-triplet:   $host
-       shell:          $SHELL
-       compiler:       $LTCC
-       compiler flags: $LTCFLAGS
-       linker:         $LD (gnu? $with_gnu_ld)
-       version:        $progname (GNU libtool) 2.4.6
-       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
-       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
-
-Report bugs to <bug-libtool at gnu.org>.
-GNU libtool home page: <http://www.gnu.org/s/libtool/>.
-General help using GNU software: <http://www.gnu.org/gethelp/>."
-    exit 0
-}
+    func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
 
 
-# func_lo2o OBJECT-NAME
-# ---------------------
-# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
-# object suffix.
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
 
-lo2o=s/\\.lo\$/.$objext/
-o2lo=s/\\.$objext\$/.lo/
 
-if test yes = "$_G_HAVE_XSI_OPS"; then
-  eval 'func_lo2o ()
-  {
-    case $1 in
-      *.lo) func_lo2o_result=${1%.lo}.$objext ;;
-      *   ) func_lo2o_result=$1               ;;
-    esac
-  }'
+# func_lo2o object
+func_lo2o ()
+{
+    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
 
-  # func_xform LIBOBJ-OR-SOURCE
-  # ---------------------------
-  # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
-  # suffix to a '.lo' libtool-object suffix.
-  eval 'func_xform ()
-  {
-    func_xform_result=${1%.*}.lo
-  }'
-else
-  # ...otherwise fall back to using sed.
-  func_lo2o ()
-  {
-    func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
-  }
 
-  func_xform ()
-  {
-    func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
-  }
-fi
+# func_xform libobj-or-source
+func_xform ()
+{
+    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
 
 
-# func_fatal_configuration ARG...
-# -------------------------------
+# func_fatal_configuration arg...
 # Echo program name prefixed message to standard error, followed by
 # a configuration failure hint, and exit.
 func_fatal_configuration ()
 {
-    func__fatal_error ${1+"$@"} \
-      "See the $PACKAGE documentation for more information." \
-      "Fatal configuration error."
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
 }
 
 
 # func_config
-# -----------
 # Display the configuration for all the tags in this script.
 func_config ()
 {
@@ -2149,19 +915,17 @@ func_config ()
     exit $?
 }
 
-
 # func_features
-# -------------
 # Display the features supported by this script.
 func_features ()
 {
     echo "host: $host"
-    if test yes = "$build_libtool_libs"; then
+    if test "$build_libtool_libs" = yes; then
       echo "enable shared libraries"
     else
       echo "disable shared libraries"
     fi
-    if test yes = "$build_old_libs"; then
+    if test "$build_old_libs" = yes; then
       echo "enable static libraries"
     else
       echo "disable static libraries"
@@ -2170,297 +934,289 @@ func_features ()
     exit $?
 }
 
-
-# func_enable_tag TAGNAME
-# -----------------------
+# func_enable_tag tagname
 # Verify that TAGNAME is valid, and either flag an error and exit, or
 # enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
 # variable here.
 func_enable_tag ()
 {
-    # Global variable:
-    tagname=$1
+  # Global variable:
+  tagname="$1"
 
-    re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
-    re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
-    sed_extractcf=/$re_begincf/,/$re_endcf/p
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
 
-    # Validate tagname.
-    case $tagname in
-      *[!-_A-Za-z0-9,/]*)
-        func_fatal_error "invalid tag name: $tagname"
-        ;;
-    esac
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
 
-    # Don't test for the "default" C tag, as we know it's
-    # there but not specially marked.
-    case $tagname in
-        CC) ;;
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
     *)
-        if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
-	  taglist="$taglist $tagname"
-
-	  # Evaluate the configuration.  Be careful to quote the path
-	  # and the sed script, to avoid splitting on whitespace, but
-	  # also don't use non-portable quotes within backquotes within
-	  # quotes we have to do it in 2 steps:
-	  extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
-	  eval "$extractedcf"
-        else
-	  func_error "ignoring unknown tag $tagname"
-        fi
-        ;;
-    esac
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+	taglist="$taglist $tagname"
+
+	# Evaluate the configuration.  Be careful to quote the path
+	# and the sed script, to avoid splitting on whitespace, but
+	# also don't use non-portable quotes within backquotes within
+	# quotes we have to do it in 2 steps:
+	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+	eval "$extractedcf"
+      else
+	func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
 }
 
-
 # func_check_version_match
-# ------------------------
 # Ensure that we are using m4 macros, and libtool script from the same
 # release of libtool.
 func_check_version_match ()
 {
-    if test "$package_revision" != "$macro_revision"; then
-      if test "$VERSION" != "$macro_version"; then
-        if test -z "$macro_version"; then
-          cat >&2 <<_LT_EOF
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
 $progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
 $progname: definition of this LT_INIT comes from an older release.
 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
 $progname: and run autoconf again.
 _LT_EOF
-        else
-          cat >&2 <<_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
 $progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
 $progname: and run autoconf again.
 _LT_EOF
-        fi
-      else
-        cat >&2 <<_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
 $progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
 $progname: of $PACKAGE $VERSION and run autoconf again.
 _LT_EOF
-      fi
-
-      exit $EXIT_MISMATCH
     fi
-}
 
+    exit $EXIT_MISMATCH
+  fi
+}
 
-# libtool_options_prep [ARG]...
-# -----------------------------
-# Preparation for options parsed by libtool.
-libtool_options_prep ()
-{
-    $debug_mode
 
-    # Option defaults:
-    opt_config=false
-    opt_dlopen=
-    opt_dry_run=false
-    opt_help=false
-    opt_mode=
-    opt_preserve_dup_deps=false
-    opt_quiet=false
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+  shift; set dummy --mode clean ${1+"$@"}; shift
+  ;;
+compile|compil|compi|comp|com|co|c)
+  shift; set dummy --mode compile ${1+"$@"}; shift
+  ;;
+execute|execut|execu|exec|exe|ex|e)
+  shift; set dummy --mode execute ${1+"$@"}; shift
+  ;;
+finish|finis|fini|fin|fi|f)
+  shift; set dummy --mode finish ${1+"$@"}; shift
+  ;;
+install|instal|insta|inst|ins|in|i)
+  shift; set dummy --mode install ${1+"$@"}; shift
+  ;;
+link|lin|li|l)
+  shift; set dummy --mode link ${1+"$@"}; shift
+  ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+  shift; set dummy --mode uninstall ${1+"$@"}; shift
+  ;;
+esac
 
-    nonopt=
-    preserve_args=
 
-    # Shorthand for --mode=foo, only valid as the first argument
-    case $1 in
-    clean|clea|cle|cl)
-      shift; set dummy --mode clean ${1+"$@"}; shift
-      ;;
-    compile|compil|compi|comp|com|co|c)
-      shift; set dummy --mode compile ${1+"$@"}; shift
-      ;;
-    execute|execut|execu|exec|exe|ex|e)
-      shift; set dummy --mode execute ${1+"$@"}; shift
-      ;;
-    finish|finis|fini|fin|fi|f)
-      shift; set dummy --mode finish ${1+"$@"}; shift
-      ;;
-    install|instal|insta|inst|ins|in|i)
-      shift; set dummy --mode install ${1+"$@"}; shift
-      ;;
-    link|lin|li|l)
-      shift; set dummy --mode link ${1+"$@"}; shift
-      ;;
-    uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-      shift; set dummy --mode uninstall ${1+"$@"}; shift
-      ;;
-    esac
 
-    # Pass back the list of options.
-    func_quote_for_eval ${1+"$@"}
-    libtool_options_prep_result=$func_quote_for_eval_result
-}
-func_add_hook func_options_prep libtool_options_prep
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_warning=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
 
 
-# libtool_parse_options [ARG]...
-# ---------------------------------
-# Provide handling for libtool specific options.
-libtool_parse_options ()
+# Parse options once, thoroughly.  This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
 {
-    $debug_cmd
+  # this just eases exit handling
+  while test $# -gt 0; do
+    opt="$1"
+    shift
+    case $opt in
+      --debug|-x)	opt_debug='set -x'
+			func_echo "enabling shell trace mode"
+			$opt_debug
+			;;
+      --dry-run|--dryrun|-n)
+			opt_dry_run=:
+			;;
+      --config)
+			opt_config=:
+func_config
+			;;
+      --dlopen|-dlopen)
+			optarg="$1"
+			opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+			shift
+			;;
+      --preserve-dup-deps)
+			opt_preserve_dup_deps=:
+			;;
+      --features)
+			opt_features=:
+func_features
+			;;
+      --finish)
+			opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+			;;
+      --help)
+			opt_help=:
+			;;
+      --help-all)
+			opt_help_all=:
+opt_help=': help-all'
+			;;
+      --mode)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_mode="$optarg"
+case $optarg in
+  # Valid mode arguments:
+  clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+  # Catch anything else as an error
+  *) func_error "invalid argument for $opt"
+     exit_cmd=exit
+     break
+     ;;
+esac
+			shift
+			;;
+      --no-silent|--no-quiet)
+			opt_silent=false
+func_append preserve_args " $opt"
+			;;
+      --no-warning|--no-warn)
+			opt_warning=false
+func_append preserve_args " $opt"
+			;;
+      --no-verbose)
+			opt_verbose=false
+func_append preserve_args " $opt"
+			;;
+      --silent|--quiet)
+			opt_silent=:
+func_append preserve_args " $opt"
+        opt_verbose=false
+			;;
+      --verbose|-v)
+			opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+			;;
+      --tag)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+			shift
+			;;
+
+      -\?|-h)		func_usage				;;
+      --help)		func_help				;;
+      --version)	func_version				;;
+
+      # Separate optargs to long options:
+      --*=*)
+			func_split_long_opt "$opt"
+			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      # Separate non-argument short options:
+      -\?*|-h*|-n*|-v*)
+			func_split_short_opt "$opt"
+			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      --)		break					;;
+      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
+      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
+    esac
+  done
 
-    # Perform our own loop to consume as many options as possible in
-    # each iteration.
-    while test $# -gt 0; do
-      _G_opt=$1
-      shift
-      case $_G_opt in
-        --dry-run|--dryrun|-n)
-                        opt_dry_run=:
-                        ;;
-
-        --config)       func_config ;;
-
-        --dlopen|-dlopen)
-                        opt_dlopen="${opt_dlopen+$opt_dlopen
-}$1"
-                        shift
-                        ;;
-
-        --preserve-dup-deps)
-                        opt_preserve_dup_deps=: ;;
-
-        --features)     func_features ;;
-
-        --finish)       set dummy --mode finish ${1+"$@"}; shift ;;
-
-        --help)         opt_help=: ;;
-
-        --help-all)     opt_help=': help-all' ;;
-
-        --mode)         test $# = 0 && func_missing_arg $_G_opt && break
-                        opt_mode=$1
-                        case $1 in
-                          # Valid mode arguments:
-                          clean|compile|execute|finish|install|link|relink|uninstall) ;;
-
-                          # Catch anything else as an error
-                          *) func_error "invalid argument for $_G_opt"
-                             exit_cmd=exit
-                             break
-                             ;;
-                        esac
-                        shift
-                        ;;
-
-        --no-silent|--no-quiet)
-                        opt_quiet=false
-                        func_append preserve_args " $_G_opt"
-                        ;;
-
-        --no-warnings|--no-warning|--no-warn)
-                        opt_warning=false
-                        func_append preserve_args " $_G_opt"
-                        ;;
-
-        --no-verbose)
-                        opt_verbose=false
-                        func_append preserve_args " $_G_opt"
-                        ;;
-
-        --silent|--quiet)
-                        opt_quiet=:
-                        opt_verbose=false
-                        func_append preserve_args " $_G_opt"
-                        ;;
-
-        --tag)          test $# = 0 && func_missing_arg $_G_opt && break
-                        opt_tag=$1
-                        func_append preserve_args " $_G_opt $1"
-                        func_enable_tag "$1"
-                        shift
-                        ;;
-
-        --verbose|-v)   opt_quiet=false
-                        opt_verbose=:
-                        func_append preserve_args " $_G_opt"
-                        ;;
-
-	# An option not handled by this hook function:
-        *)		set dummy "$_G_opt" ${1+"$@"};	shift; break  ;;
-      esac
-    done
+  # Validate options:
 
+  # save first non-option argument
+  if test "$#" -gt 0; then
+    nonopt="$opt"
+    shift
+  fi
 
-    # save modified positional parameters for caller
-    func_quote_for_eval ${1+"$@"}
-    libtool_parse_options_result=$func_quote_for_eval_result
-}
-func_add_hook func_parse_options libtool_parse_options
+  # preserve --debug
+  test "$opt_debug" = : || func_append preserve_args " --debug"
 
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+      ;;
+  esac
 
+  $opt_help || {
+    # Sanity checks first:
+    func_check_version_match
 
-# libtool_validate_options [ARG]...
-# ---------------------------------
-# Perform any sanity checks on option settings and/or unconsumed
-# arguments.
-libtool_validate_options ()
-{
-    # save first non-option argument
-    if test 0 -lt $#; then
-      nonopt=$1
-      shift
+    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+      func_fatal_configuration "not configured to build any kind of library"
     fi
 
-    # preserve --debug
-    test : = "$debug_cmd" || func_append preserve_args " --debug"
-
-    case $host in
-      # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
-      # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
-      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
-        # don't eliminate duplications in $postdeps and $predeps
-        opt_duplicate_compiler_generated_deps=:
-        ;;
-      *)
-        opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
-        ;;
-    esac
-
-    $opt_help || {
-      # Sanity checks first:
-      func_check_version_match
+    # Darwin sucks
+    eval std_shrext=\"$shrext_cmds\"
 
-      test yes != "$build_libtool_libs" \
-        && test yes != "$build_old_libs" \
-        && func_fatal_configuration "not configured to build any kind of library"
-
-      # Darwin sucks
-      eval std_shrext=\"$shrext_cmds\"
+    # Only execute mode is allowed to have -dlopen flags.
+    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+      func_error "unrecognized option \`-dlopen'"
+      $ECHO "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
 
-      # Only execute mode is allowed to have -dlopen flags.
-      if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
-        func_error "unrecognized option '-dlopen'"
-        $ECHO "$help" 1>&2
-        exit $EXIT_FAILURE
-      fi
+    # Change the help message to a mode-specific one.
+    generic_help="$help"
+    help="Try \`$progname --help --mode=$opt_mode' for more information."
+  }
 
-      # Change the help message to a mode-specific one.
-      generic_help=$help
-      help="Try '$progname --help --mode=$opt_mode' for more information."
-    }
 
-    # Pass back the unparsed argument list
-    func_quote_for_eval ${1+"$@"}
-    libtool_validate_options_result=$func_quote_for_eval_result
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
 }
-func_add_hook func_validate_options libtool_validate_options
-
 
-# Process options as early as possible so that --help and --version
-# can return quickly.
-func_options ${1+"$@"}
-eval set dummy "$func_options_result"; shift
 
 
 
@@ -2468,52 +1224,24 @@ eval set dummy "$func_options_result"; shift
 ##    Main.    ##
 ## ----------- ##
 
-magic='%%%MAGIC variable%%%'
-magic_exe='%%%MAGIC EXE variable%%%'
-
-# Global variables.
-extracted_archives=
-extracted_serial=0
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
-
-# func_generated_by_libtool
-# True iff stdin has been generated by Libtool. This function is only
-# a basic sanity check; it will hardly flush out determined imposters.
-func_generated_by_libtool_p ()
-{
-  $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
-}
-
 # func_lalib_p file
-# True iff FILE is a libtool '.la' library or '.lo' object file.
+# True iff FILE is a libtool `.la' library or `.lo' object file.
 # This function is only a basic sanity check; it will hardly flush out
 # determined imposters.
 func_lalib_p ()
 {
     test -f "$1" &&
-      $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
+      $SED -e 4q "$1" 2>/dev/null \
+        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
 }
 
 # func_lalib_unsafe_p file
-# True iff FILE is a libtool '.la' library or '.lo' object file.
+# True iff FILE is a libtool `.la' library or `.lo' object file.
 # This function implements the same check as func_lalib_p without
 # resorting to external programs.  To this end, it redirects stdin and
 # closes it afterwards, without saving the original file descriptor.
 # As a safety measure, use it only where a negative result would be
-# fatal anyway.  Works if 'file' does not exist.
+# fatal anyway.  Works if `file' does not exist.
 func_lalib_unsafe_p ()
 {
     lalib_p=no
@@ -2521,13 +1249,13 @@ func_lalib_unsafe_p ()
 	for lalib_p_l in 1 2 3 4
 	do
 	    read lalib_p_line
-	    case $lalib_p_line in
+	    case "$lalib_p_line" in
 		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
 	    esac
 	done
 	exec 0<&5 5<&-
     fi
-    test yes = "$lalib_p"
+    test "$lalib_p" = yes
 }
 
 # func_ltwrapper_script_p file
@@ -2536,8 +1264,7 @@ func_lalib_unsafe_p ()
 # determined imposters.
 func_ltwrapper_script_p ()
 {
-    test -f "$1" &&
-      $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
+    func_lalib_p "$1"
 }
 
 # func_ltwrapper_executable_p file
@@ -2562,7 +1289,7 @@ func_ltwrapper_scriptname ()
 {
     func_dirname_and_basename "$1" "" "."
     func_stripname '' '.exe' "$func_basename_result"
-    func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
+    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
 }
 
 # func_ltwrapper_p file
@@ -2581,13 +1308,11 @@ func_ltwrapper_p ()
 # FAIL_CMD may read-access the current command in variable CMD!
 func_execute_cmds ()
 {
-    $debug_cmd
-
+    $opt_debug
     save_ifs=$IFS; IFS='~'
     for cmd in $1; do
-      IFS=$sp$nl
-      eval cmd=\"$cmd\"
       IFS=$save_ifs
+      eval cmd=\"$cmd\"
       func_show_eval "$cmd" "${2-:}"
     done
     IFS=$save_ifs
@@ -2599,11 +1324,10 @@ func_execute_cmds ()
 # Note that it is not necessary on cygwin/mingw to append a dot to
 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
 # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-# 'FILE.' does not work on cygwin managed mounts.
+# `FILE.' does not work on cygwin managed mounts.
 func_source ()
 {
-    $debug_cmd
-
+    $opt_debug
     case $1 in
     */* | *\\*)	. "$1" ;;
     *)		. "./$1" ;;
@@ -2630,10 +1354,10 @@ func_resolve_sysroot ()
 # store the result into func_replace_sysroot_result.
 func_replace_sysroot ()
 {
-  case $lt_sysroot:$1 in
+  case "$lt_sysroot:$1" in
   ?*:"$lt_sysroot"*)
     func_stripname "$lt_sysroot" '' "$1"
-    func_replace_sysroot_result='='$func_stripname_result
+    func_replace_sysroot_result="=$func_stripname_result"
     ;;
   *)
     # Including no sysroot.
@@ -2650,8 +1374,7 @@ func_replace_sysroot ()
 # arg is usually of the form 'gcc ...'
 func_infer_tag ()
 {
-    $debug_cmd
-
+    $opt_debug
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
       for arg in $CC; do
@@ -2670,7 +1393,7 @@ func_infer_tag ()
 	for z in $available_tags; do
 	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
 	    # Evaluate the configuration.
-	    eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
 	    CC_quoted=
 	    for arg in $CC; do
 	      # Double-quote args containing other shell metacharacters.
@@ -2695,7 +1418,7 @@ func_infer_tag ()
 	# line option must be used.
 	if test -z "$tagname"; then
 	  func_echo "unable to infer tagged configuration"
-	  func_fatal_error "specify a tag with '--tag'"
+	  func_fatal_error "specify a tag with \`--tag'"
 #	else
 #	  func_verbose "using $tagname tagged configuration"
 	fi
@@ -2711,15 +1434,15 @@ func_infer_tag ()
 # but don't create it if we're doing a dry run.
 func_write_libtool_object ()
 {
-    write_libobj=$1
-    if test yes = "$build_libtool_libs"; then
-      write_lobj=\'$2\'
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
     else
       write_lobj=none
     fi
 
-    if test yes = "$build_old_libs"; then
-      write_oldobj=\'$3\'
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
     else
       write_oldobj=none
     fi
@@ -2727,7 +1450,7 @@ func_write_libtool_object ()
     $opt_dry_run || {
       cat >${write_libobj}T <<EOF
 # $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
@@ -2739,7 +1462,7 @@ pic_object=$write_lobj
 non_pic_object=$write_oldobj
 
 EOF
-      $MV "${write_libobj}T" "$write_libobj"
+      $MV "${write_libobj}T" "${write_libobj}"
     }
 }
 
@@ -2759,9 +1482,8 @@ EOF
 # be empty on error (or when ARG is empty)
 func_convert_core_file_wine_to_w32 ()
 {
-  $debug_cmd
-
-  func_convert_core_file_wine_to_w32_result=$1
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
   if test -n "$1"; then
     # Unfortunately, winepath does not exit with a non-zero error code, so we
     # are forced to check the contents of stdout. On the other hand, if the
@@ -2769,9 +1491,9 @@ func_convert_core_file_wine_to_w32 ()
     # *an error message* to stdout. So we must check for both error code of
     # zero AND non-empty stdout, which explains the odd construction:
     func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
-    if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
       func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
-        $SED -e "$sed_naive_backslashify"`
+        $SED -e "$lt_sed_naive_backslashify"`
     else
       func_convert_core_file_wine_to_w32_result=
     fi
@@ -2792,19 +1514,18 @@ func_convert_core_file_wine_to_w32 ()
 # are convertible, then the result may be empty.
 func_convert_core_path_wine_to_w32 ()
 {
-  $debug_cmd
-
+  $opt_debug
   # unfortunately, winepath doesn't convert paths, only file names
-  func_convert_core_path_wine_to_w32_result=
+  func_convert_core_path_wine_to_w32_result=""
   if test -n "$1"; then
     oldIFS=$IFS
     IFS=:
     for func_convert_core_path_wine_to_w32_f in $1; do
       IFS=$oldIFS
       func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
-      if test -n "$func_convert_core_file_wine_to_w32_result"; then
+      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
         if test -z "$func_convert_core_path_wine_to_w32_result"; then
-          func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
         else
           func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
         fi
@@ -2833,8 +1554,7 @@ func_convert_core_path_wine_to_w32 ()
 # environment variable; do not put it in $PATH.
 func_cygpath ()
 {
-  $debug_cmd
-
+  $opt_debug
   if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
     func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
     if test "$?" -ne 0; then
@@ -2843,7 +1563,7 @@ func_cygpath ()
     fi
   else
     func_cygpath_result=
-    func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
   fi
 }
 #end: func_cygpath
@@ -2854,11 +1574,10 @@ func_cygpath ()
 # result in func_convert_core_msys_to_w32_result.
 func_convert_core_msys_to_w32 ()
 {
-  $debug_cmd
-
+  $opt_debug
   # awkward: cmd appends spaces to result
   func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
-    $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
 }
 #end: func_convert_core_msys_to_w32
 
@@ -2869,14 +1588,13 @@ func_convert_core_msys_to_w32 ()
 # func_to_host_file_result to ARG1).
 func_convert_file_check ()
 {
-  $debug_cmd
-
-  if test -z "$2" && test -n "$1"; then
+  $opt_debug
+  if test -z "$2" && test -n "$1" ; then
     func_error "Could not determine host file name corresponding to"
-    func_error "  '$1'"
+    func_error "  \`$1'"
     func_error "Continuing, but uninstalled executables may not work."
     # Fallback:
-    func_to_host_file_result=$1
+    func_to_host_file_result="$1"
   fi
 }
 # end func_convert_file_check
@@ -2888,11 +1606,10 @@ func_convert_file_check ()
 # func_to_host_file_result to a simplistic fallback value (see below).
 func_convert_path_check ()
 {
-  $debug_cmd
-
+  $opt_debug
   if test -z "$4" && test -n "$3"; then
     func_error "Could not determine the host path corresponding to"
-    func_error "  '$3'"
+    func_error "  \`$3'"
     func_error "Continuing, but uninstalled executables may not work."
     # Fallback.  This is a deliberately simplistic "conversion" and
     # should not be "improved".  See libtool.info.
@@ -2901,7 +1618,7 @@ func_convert_path_check ()
       func_to_host_path_result=`echo "$3" |
         $SED -e "$lt_replace_pathsep_chars"`
     else
-      func_to_host_path_result=$3
+      func_to_host_path_result="$3"
     fi
   fi
 }
@@ -2913,10 +1630,9 @@ func_convert_path_check ()
 # and appending REPL if ORIG matches BACKPAT.
 func_convert_path_front_back_pathsep ()
 {
-  $debug_cmd
-
+  $opt_debug
   case $4 in
-  $1 ) func_to_host_path_result=$3$func_to_host_path_result
+  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
     ;;
   esac
   case $4 in
@@ -2930,7 +1646,7 @@ func_convert_path_front_back_pathsep ()
 ##################################################
 # $build to $host FILE NAME CONVERSION FUNCTIONS #
 ##################################################
-# invoked via '$to_host_file_cmd ARG'
+# invoked via `$to_host_file_cmd ARG'
 #
 # In each case, ARG is the path to be converted from $build to $host format.
 # Result will be available in $func_to_host_file_result.
@@ -2941,8 +1657,7 @@ func_convert_path_front_back_pathsep ()
 # in func_to_host_file_result.
 func_to_host_file ()
 {
-  $debug_cmd
-
+  $opt_debug
   $to_host_file_cmd "$1"
 }
 # end func_to_host_file
@@ -2954,8 +1669,7 @@ func_to_host_file ()
 # in (the comma separated) LAZY, no conversion takes place.
 func_to_tool_file ()
 {
-  $debug_cmd
-
+  $opt_debug
   case ,$2, in
     *,"$to_tool_file_cmd",*)
       func_to_tool_file_result=$1
@@ -2973,7 +1687,7 @@ func_to_tool_file ()
 # Copy ARG to func_to_host_file_result.
 func_convert_file_noop ()
 {
-  func_to_host_file_result=$1
+  func_to_host_file_result="$1"
 }
 # end func_convert_file_noop
 
@@ -2984,12 +1698,11 @@ func_convert_file_noop ()
 # func_to_host_file_result.
 func_convert_file_msys_to_w32 ()
 {
-  $debug_cmd
-
-  func_to_host_file_result=$1
+  $opt_debug
+  func_to_host_file_result="$1"
   if test -n "$1"; then
     func_convert_core_msys_to_w32 "$1"
-    func_to_host_file_result=$func_convert_core_msys_to_w32_result
+    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -3001,9 +1714,8 @@ func_convert_file_msys_to_w32 ()
 # func_to_host_file_result.
 func_convert_file_cygwin_to_w32 ()
 {
-  $debug_cmd
-
-  func_to_host_file_result=$1
+  $opt_debug
+  func_to_host_file_result="$1"
   if test -n "$1"; then
     # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
     # LT_CYGPATH in this case.
@@ -3019,12 +1731,11 @@ func_convert_file_cygwin_to_w32 ()
 # and a working winepath. Returns result in func_to_host_file_result.
 func_convert_file_nix_to_w32 ()
 {
-  $debug_cmd
-
-  func_to_host_file_result=$1
+  $opt_debug
+  func_to_host_file_result="$1"
   if test -n "$1"; then
     func_convert_core_file_wine_to_w32 "$1"
-    func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -3036,13 +1747,12 @@ func_convert_file_nix_to_w32 ()
 # Returns result in func_to_host_file_result.
 func_convert_file_msys_to_cygwin ()
 {
-  $debug_cmd
-
-  func_to_host_file_result=$1
+  $opt_debug
+  func_to_host_file_result="$1"
   if test -n "$1"; then
     func_convert_core_msys_to_w32 "$1"
     func_cygpath -u "$func_convert_core_msys_to_w32_result"
-    func_to_host_file_result=$func_cygpath_result
+    func_to_host_file_result="$func_cygpath_result"
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -3055,14 +1765,13 @@ func_convert_file_msys_to_cygwin ()
 # in func_to_host_file_result.
 func_convert_file_nix_to_cygwin ()
 {
-  $debug_cmd
-
-  func_to_host_file_result=$1
+  $opt_debug
+  func_to_host_file_result="$1"
   if test -n "$1"; then
     # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
     func_convert_core_file_wine_to_w32 "$1"
     func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
-    func_to_host_file_result=$func_cygpath_result
+    func_to_host_file_result="$func_cygpath_result"
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -3072,7 +1781,7 @@ func_convert_file_nix_to_cygwin ()
 #############################################
 # $build to $host PATH CONVERSION FUNCTIONS #
 #############################################
-# invoked via '$to_host_path_cmd ARG'
+# invoked via `$to_host_path_cmd ARG'
 #
 # In each case, ARG is the path to be converted from $build to $host format.
 # The result will be available in $func_to_host_path_result.
@@ -3096,11 +1805,10 @@ func_convert_file_nix_to_cygwin ()
 to_host_path_cmd=
 func_init_to_host_path_cmd ()
 {
-  $debug_cmd
-
+  $opt_debug
   if test -z "$to_host_path_cmd"; then
     func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
-    to_host_path_cmd=func_convert_path_$func_stripname_result
+    to_host_path_cmd="func_convert_path_${func_stripname_result}"
   fi
 }
 
@@ -3110,8 +1818,7 @@ func_init_to_host_path_cmd ()
 # in func_to_host_path_result.
 func_to_host_path ()
 {
-  $debug_cmd
-
+  $opt_debug
   func_init_to_host_path_cmd
   $to_host_path_cmd "$1"
 }
@@ -3122,7 +1829,7 @@ func_to_host_path ()
 # Copy ARG to func_to_host_path_result.
 func_convert_path_noop ()
 {
-  func_to_host_path_result=$1
+  func_to_host_path_result="$1"
 }
 # end func_convert_path_noop
 
@@ -3133,9 +1840,8 @@ func_convert_path_noop ()
 # func_to_host_path_result.
 func_convert_path_msys_to_w32 ()
 {
-  $debug_cmd
-
-  func_to_host_path_result=$1
+  $opt_debug
+  func_to_host_path_result="$1"
   if test -n "$1"; then
     # Remove leading and trailing path separator characters from ARG.  MSYS
     # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
@@ -3143,7 +1849,7 @@ func_convert_path_msys_to_w32 ()
     func_stripname : : "$1"
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
-    func_to_host_path_result=$func_convert_core_msys_to_w32_result
+    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
     func_convert_path_check : ";" \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -3157,9 +1863,8 @@ func_convert_path_msys_to_w32 ()
 # func_to_host_file_result.
 func_convert_path_cygwin_to_w32 ()
 {
-  $debug_cmd
-
-  func_to_host_path_result=$1
+  $opt_debug
+  func_to_host_path_result="$1"
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
     func_stripname : : "$1"
@@ -3178,15 +1883,14 @@ func_convert_path_cygwin_to_w32 ()
 # a working winepath.  Returns result in func_to_host_file_result.
 func_convert_path_nix_to_w32 ()
 {
-  $debug_cmd
-
-  func_to_host_path_result=$1
+  $opt_debug
+  func_to_host_path_result="$1"
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
     func_stripname : : "$1"
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
-    func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
     func_convert_path_check : ";" \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -3200,16 +1904,15 @@ func_convert_path_nix_to_w32 ()
 # Returns result in func_to_host_file_result.
 func_convert_path_msys_to_cygwin ()
 {
-  $debug_cmd
-
-  func_to_host_path_result=$1
+  $opt_debug
+  func_to_host_path_result="$1"
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
     func_stripname : : "$1"
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
     func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
-    func_to_host_path_result=$func_cygpath_result
+    func_to_host_path_result="$func_cygpath_result"
     func_convert_path_check : : \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -3224,9 +1927,8 @@ func_convert_path_msys_to_cygwin ()
 # func_to_host_file_result.
 func_convert_path_nix_to_cygwin ()
 {
-  $debug_cmd
-
-  func_to_host_path_result=$1
+  $opt_debug
+  func_to_host_path_result="$1"
   if test -n "$1"; then
     # Remove leading and trailing path separator characters from
     # ARG. msys behavior is inconsistent here, cygpath turns them
@@ -3235,7 +1937,7 @@ func_convert_path_nix_to_cygwin ()
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
     func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
-    func_to_host_path_result=$func_cygpath_result
+    func_to_host_path_result="$func_cygpath_result"
     func_convert_path_check : : \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -3244,31 +1946,13 @@ func_convert_path_nix_to_cygwin ()
 # end func_convert_path_nix_to_cygwin
 
 
-# func_dll_def_p FILE
-# True iff FILE is a Windows DLL '.def' file.
-# Keep in sync with _LT_DLL_DEF_P in libtool.m4
-func_dll_def_p ()
-{
-  $debug_cmd
-
-  func_dll_def_p_tmp=`$SED -n \
-    -e 's/^[	 ]*//' \
-    -e '/^\(;.*\)*$/d' \
-    -e 's/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p' \
-    -e q \
-    "$1"`
-  test DEF = "$func_dll_def_p_tmp"
-}
-
-
 # func_mode_compile arg...
 func_mode_compile ()
 {
-    $debug_cmd
-
+    $opt_debug
     # Get the compilation command and the source file.
     base_compile=
-    srcfile=$nonopt  #  always keep a non-empty value in "srcfile"
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
     suppress_opt=yes
     suppress_output=
     arg_mode=normal
@@ -3281,12 +1965,12 @@ func_mode_compile ()
       case $arg_mode in
       arg  )
 	# do not "continue".  Instead, add this to base_compile
-	lastarg=$arg
+	lastarg="$arg"
 	arg_mode=normal
 	;;
 
       target )
-	libobj=$arg
+	libobj="$arg"
 	arg_mode=normal
 	continue
 	;;
@@ -3296,7 +1980,7 @@ func_mode_compile ()
 	case $arg in
 	-o)
 	  test -n "$libobj" && \
-	    func_fatal_error "you cannot specify '-o' more than once"
+	    func_fatal_error "you cannot specify \`-o' more than once"
 	  arg_mode=target
 	  continue
 	  ;;
@@ -3325,12 +2009,12 @@ func_mode_compile ()
 	  func_stripname '-Wc,' '' "$arg"
 	  args=$func_stripname_result
 	  lastarg=
-	  save_ifs=$IFS; IFS=,
+	  save_ifs="$IFS"; IFS=','
 	  for arg in $args; do
-	    IFS=$save_ifs
+	    IFS="$save_ifs"
 	    func_append_quoted lastarg "$arg"
 	  done
-	  IFS=$save_ifs
+	  IFS="$save_ifs"
 	  func_stripname ' ' '' "$lastarg"
 	  lastarg=$func_stripname_result
 
@@ -3343,8 +2027,8 @@ func_mode_compile ()
 	  # Accept the current argument as the source file.
 	  # The previous "srcfile" becomes the current argument.
 	  #
-	  lastarg=$srcfile
-	  srcfile=$arg
+	  lastarg="$srcfile"
+	  srcfile="$arg"
 	  ;;
 	esac  #  case $arg
 	;;
@@ -3359,13 +2043,13 @@ func_mode_compile ()
       func_fatal_error "you must specify an argument for -Xcompile"
       ;;
     target)
-      func_fatal_error "you must specify a target with '-o'"
+      func_fatal_error "you must specify a target with \`-o'"
       ;;
     *)
       # Get the name of the library object.
       test -z "$libobj" && {
 	func_basename "$srcfile"
-	libobj=$func_basename_result
+	libobj="$func_basename_result"
       }
       ;;
     esac
@@ -3385,7 +2069,7 @@ func_mode_compile ()
     case $libobj in
     *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
     *)
-      func_fatal_error "cannot determine name of library object from '$libobj'"
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
       ;;
     esac
 
@@ -3394,8 +2078,8 @@ func_mode_compile ()
     for arg in $later; do
       case $arg in
       -shared)
-	test yes = "$build_libtool_libs" \
-	  || func_fatal_configuration "cannot build a shared library"
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
 	build_old_libs=no
 	continue
 	;;
@@ -3421,17 +2105,17 @@ func_mode_compile ()
     func_quote_for_eval "$libobj"
     test "X$libobj" != "X$func_quote_for_eval_result" \
       && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
-      && func_warning "libobj name '$libobj' may not contain shell special characters."
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
     func_dirname_and_basename "$obj" "/" ""
-    objname=$func_basename_result
-    xdir=$func_dirname_result
-    lobj=$xdir$objdir/$objname
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
+    lobj=${xdir}$objdir/$objname
 
     test -z "$base_compile" && \
       func_fatal_help "you must specify a compilation command"
 
     # Delete any leftover library objects.
-    if test yes = "$build_old_libs"; then
+    if test "$build_old_libs" = yes; then
       removelist="$obj $lobj $libobj ${libobj}T"
     else
       removelist="$lobj $libobj ${libobj}T"
@@ -3443,16 +2127,16 @@ func_mode_compile ()
       pic_mode=default
       ;;
     esac
-    if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
       # non-PIC code in shared libraries is not supported
       pic_mode=default
     fi
 
     # Calculate the filename of the output object if compiler does
     # not support -o with -c
-    if test no = "$compiler_c_o"; then
-      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
-      lockfile=$output_obj.lock
+    if test "$compiler_c_o" = no; then
+      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
     else
       output_obj=
       need_locks=no
@@ -3461,12 +2145,12 @@ func_mode_compile ()
 
     # Lock this critical section if it is needed
     # We use this script file to make the link, it avoids creating a new file
-    if test yes = "$need_locks"; then
+    if test "$need_locks" = yes; then
       until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
 	func_echo "Waiting for $lockfile to be removed"
 	sleep 2
       done
-    elif test warn = "$need_locks"; then
+    elif test "$need_locks" = warn; then
       if test -f "$lockfile"; then
 	$ECHO "\
 *** ERROR, $lockfile exists and contains:
@@ -3474,7 +2158,7 @@ func_mode_compile ()
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support '-c' and '-o' together.  If you
+your compiler does not support \`-c' and \`-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -3496,11 +2180,11 @@ compiler."
     qsrcfile=$func_quote_for_eval_result
 
     # Only build a PIC object if we are building libtool libraries.
-    if test yes = "$build_libtool_libs"; then
+    if test "$build_libtool_libs" = yes; then
       # Without this assignment, base_compile gets emptied.
       fbsd_hideous_sh_bug=$base_compile
 
-      if test no != "$pic_mode"; then
+      if test "$pic_mode" != no; then
 	command="$base_compile $qsrcfile $pic_flag"
       else
 	# Don't build PIC code
@@ -3517,7 +2201,7 @@ compiler."
       func_show_eval_locale "$command"	\
           'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
 
-      if test warn = "$need_locks" &&
+      if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
 	$ECHO "\
 *** ERROR, $lockfile contains:
@@ -3528,7 +2212,7 @@ $srcfile
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support '-c' and '-o' together.  If you
+your compiler does not support \`-c' and \`-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -3544,20 +2228,20 @@ compiler."
       fi
 
       # Allow error messages only from the first compilation.
-      if test yes = "$suppress_opt"; then
+      if test "$suppress_opt" = yes; then
 	suppress_output=' >/dev/null 2>&1'
       fi
     fi
 
     # Only build a position-dependent object if we build old libraries.
-    if test yes = "$build_old_libs"; then
-      if test yes != "$pic_mode"; then
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
 	# Don't build PIC code
 	command="$base_compile $qsrcfile$pie_flag"
       else
 	command="$base_compile $qsrcfile $pic_flag"
       fi
-      if test yes = "$compiler_c_o"; then
+      if test "$compiler_c_o" = yes; then
 	func_append command " -o $obj"
       fi
 
@@ -3566,7 +2250,7 @@ compiler."
       func_show_eval_locale "$command" \
         '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
 
-      if test warn = "$need_locks" &&
+      if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
 	$ECHO "\
 *** ERROR, $lockfile contains:
@@ -3577,7 +2261,7 @@ $srcfile
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support '-c' and '-o' together.  If you
+your compiler does not support \`-c' and \`-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -3597,7 +2281,7 @@ compiler."
       func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
 
       # Unlock the critical section if it was locked
-      if test no != "$need_locks"; then
+      if test "$need_locks" != no; then
 	removelist=$lockfile
         $RM "$lockfile"
       fi
@@ -3607,7 +2291,7 @@ compiler."
 }
 
 $opt_help || {
-  test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
+  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
 }
 
 func_mode_help ()
@@ -3627,7 +2311,7 @@ func_mode_help ()
 Remove files from the build directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
 to RM.
 
 If FILE is a libtool library, object or program, all the files associated
@@ -3646,16 +2330,16 @@ This mode accepts the following additional options:
   -no-suppress      do not suppress compiler output for multiple passes
   -prefer-pic       try to build PIC objects only
   -prefer-non-pic   try to build non-PIC objects only
-  -shared           do not build a '.o' file suitable for static linking
-  -static           only build a '.o' file suitable for static linking
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
   -Wc,FLAG          pass FLAG directly to the compiler
 
-COMPILE-COMMAND is a command to be used in creating a 'standard' object file
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
 from the given SOURCEFILE.
 
 The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix '.c' with the
-library object suffix, '.lo'."
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
         ;;
 
       execute)
@@ -3668,7 +2352,7 @@ This mode accepts the following additional options:
 
   -dlopen FILE      add the directory containing FILE to the library path
 
-This mode sets the library path environment variable according to '-dlopen'
+This mode sets the library path environment variable according to \`-dlopen'
 flags.
 
 If any of the ARGS are libtool executable wrappers, then they are translated
@@ -3687,7 +2371,7 @@ Complete the installation of libtool libraries.
 Each LIBDIR is a directory that contains libtool libraries.
 
 The commands that this mode executes may require superuser privileges.  Use
-the '--dry-run' option if you just want to see what would be executed."
+the \`--dry-run' option if you just want to see what would be executed."
         ;;
 
       install)
@@ -3697,7 +2381,7 @@ the '--dry-run' option if you just want to see what would be executed."
 Install executables or libraries.
 
 INSTALL-COMMAND is the installation command.  The first component should be
-either the 'install' or 'cp' program.
+either the \`install' or \`cp' program.
 
 The following components of INSTALL-COMMAND are treated specially:
 
@@ -3723,7 +2407,7 @@ The following components of LINK-COMMAND are treated specially:
   -avoid-version    do not add a version suffix if possible
   -bindir BINDIR    specify path to binaries directory (for systems where
                     libraries must be found in the PATH setting at runtime)
-  -dlopen FILE      '-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
   -export-symbols SYMFILE
@@ -3737,8 +2421,7 @@ The following components of LINK-COMMAND are treated specially:
   -no-install       link a not-installable executable
   -no-undefined     declare that a library does not refer to external symbols
   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  use a list of object files found in FILE to specify objects
-  -os2dllname NAME  force a short DLL name on OS/2 (no effect on other OSes)
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
   -precious-files-regex REGEX
                     don't remove output files matching REGEX
   -release RELEASE  specify package release information
@@ -3758,20 +2441,20 @@ The following components of LINK-COMMAND are treated specially:
   -Xlinker FLAG     pass linker-specific FLAG directly to the linker
   -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
 
-All other options (arguments beginning with '-') are ignored.
+All other options (arguments beginning with \`-') are ignored.
 
-Every other argument is treated as a filename.  Files ending in '.la' are
+Every other argument is treated as a filename.  Files ending in \`.la' are
 treated as uninstalled libtool libraries, other files are standard or library
 object files.
 
-If the OUTPUT-FILE ends in '.la', then a libtool library is created,
-only library objects ('.lo' files) may be specified, and '-rpath' is
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
 required, except when creating a convenience library.
 
-If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
-using 'ar' and 'ranlib', or on Windows using 'lib'.
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
 
-If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
 is created, otherwise an executable program is created."
         ;;
 
@@ -3782,7 +2465,7 @@ is created, otherwise an executable program is created."
 Remove libraries from an installation directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
 to RM.
 
 If FILE is a libtool library, all the files associated with it are deleted.
@@ -3790,17 +2473,17 @@ Otherwise, only FILE itself is deleted using RM."
         ;;
 
       *)
-        func_fatal_help "invalid operation mode '$opt_mode'"
+        func_fatal_help "invalid operation mode \`$opt_mode'"
         ;;
     esac
 
     echo
-    $ECHO "Try '$progname --help' for more information about other modes."
+    $ECHO "Try \`$progname --help' for more information about other modes."
 }
 
 # Now that we've collected a possible --mode arg, show help if necessary
 if $opt_help; then
-  if test : = "$opt_help"; then
+  if test "$opt_help" = :; then
     func_mode_help
   else
     {
@@ -3808,7 +2491,7 @@ if $opt_help; then
       for opt_mode in compile link execute install finish uninstall clean; do
 	func_mode_help
       done
-    } | $SED -n '1p; 2,$s/^Usage:/  or: /p'
+    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
     {
       func_help noexit
       for opt_mode in compile link execute install finish uninstall clean; do
@@ -3816,7 +2499,7 @@ if $opt_help; then
 	func_mode_help
       done
     } |
-    $SED '1d
+    sed '1d
       /^When reporting/,/^Report/{
 	H
 	d
@@ -3833,17 +2516,16 @@ fi
 # func_mode_execute arg...
 func_mode_execute ()
 {
-    $debug_cmd
-
+    $opt_debug
     # The first argument is the command name.
-    cmd=$nonopt
+    cmd="$nonopt"
     test -z "$cmd" && \
       func_fatal_help "you must specify a COMMAND"
 
     # Handle -dlopen flags immediately.
     for file in $opt_dlopen; do
       test -f "$file" \
-	|| func_fatal_help "'$file' is not a file"
+	|| func_fatal_help "\`$file' is not a file"
 
       dir=
       case $file in
@@ -3853,7 +2535,7 @@ func_mode_execute ()
 
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$file" \
-	  || func_fatal_help "'$lib' is not a valid libtool archive"
+	  || func_fatal_help "\`$lib' is not a valid libtool archive"
 
 	# Read the libtool library.
 	dlname=
@@ -3864,18 +2546,18 @@ func_mode_execute ()
 	if test -z "$dlname"; then
 	  # Warn if it was a shared library.
 	  test -n "$library_names" && \
-	    func_warning "'$file' was not linked with '-export-dynamic'"
+	    func_warning "\`$file' was not linked with \`-export-dynamic'"
 	  continue
 	fi
 
 	func_dirname "$file" "" "."
-	dir=$func_dirname_result
+	dir="$func_dirname_result"
 
 	if test -f "$dir/$objdir/$dlname"; then
 	  func_append dir "/$objdir"
 	else
 	  if test ! -f "$dir/$dlname"; then
-	    func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
+	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
 	  fi
 	fi
 	;;
@@ -3883,18 +2565,18 @@ func_mode_execute ()
       *.lo)
 	# Just add the directory containing the .lo file.
 	func_dirname "$file" "" "."
-	dir=$func_dirname_result
+	dir="$func_dirname_result"
 	;;
 
       *)
-	func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
+	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
 	continue
 	;;
       esac
 
       # Get the absolute pathname.
       absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir=$absdir
+      test -n "$absdir" && dir="$absdir"
 
       # Now add the directory to shlibpath_var.
       if eval "test -z \"\$$shlibpath_var\""; then
@@ -3906,7 +2588,7 @@ func_mode_execute ()
 
     # This variable tells wrapper scripts just to set shlibpath_var
     # rather than running their programs.
-    libtool_execute_magic=$magic
+    libtool_execute_magic="$magic"
 
     # Check if any of the arguments is a wrapper script.
     args=
@@ -3919,12 +2601,12 @@ func_mode_execute ()
 	if func_ltwrapper_script_p "$file"; then
 	  func_source "$file"
 	  # Transform arg to wrapped name.
-	  file=$progdir/$program
+	  file="$progdir/$program"
 	elif func_ltwrapper_executable_p "$file"; then
 	  func_ltwrapper_scriptname "$file"
 	  func_source "$func_ltwrapper_scriptname_result"
 	  # Transform arg to wrapped name.
-	  file=$progdir/$program
+	  file="$progdir/$program"
 	fi
 	;;
       esac
@@ -3932,15 +2614,7 @@ func_mode_execute ()
       func_append_quoted args "$file"
     done
 
-    if $opt_dry_run; then
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
-	echo "export $shlibpath_var"
-      fi
-      $ECHO "$cmd$args"
-      exit $EXIT_SUCCESS
-    else
+    if test "X$opt_dry_run" = Xfalse; then
       if test -n "$shlibpath_var"; then
 	# Export the shlibpath_var.
 	eval "export $shlibpath_var"
@@ -3957,18 +2631,25 @@ func_mode_execute ()
       done
 
       # Now prepare to actually exec the command.
-      exec_cmd=\$cmd$args
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+	echo "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
     fi
 }
 
-test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
 
 
 # func_mode_finish arg...
 func_mode_finish ()
 {
-    $debug_cmd
-
+    $opt_debug
     libs=
     libdirs=
     admincmds=
@@ -3982,11 +2663,11 @@ func_mode_finish ()
 	if func_lalib_unsafe_p "$opt"; then
 	  func_append libs " $opt"
 	else
-	  func_warning "'$opt' is not a valid libtool archive"
+	  func_warning "\`$opt' is not a valid libtool archive"
 	fi
 
       else
-	func_fatal_error "invalid argument '$opt'"
+	func_fatal_error "invalid argument \`$opt'"
       fi
     done
 
@@ -4001,12 +2682,12 @@ func_mode_finish ()
       # Remove sysroot references
       if $opt_dry_run; then
         for lib in $libs; do
-          echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
         done
       else
         tmpdir=`func_mktempdir`
         for lib in $libs; do
-	  $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+	  sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
 	    > $tmpdir/tmp-la
 	  mv -f $tmpdir/tmp-la $lib
 	done
@@ -4031,7 +2712,7 @@ func_mode_finish ()
     fi
 
     # Exit here if they wanted silent mode.
-    $opt_quiet && exit $EXIT_SUCCESS
+    $opt_silent && exit $EXIT_SUCCESS
 
     if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
       echo "----------------------------------------------------------------------"
@@ -4042,27 +2723,27 @@ func_mode_finish ()
       echo
       echo "If you ever happen to want to link against installed libraries"
       echo "in a given directory, LIBDIR, you must either use libtool, and"
-      echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
       echo "flag during linking and do at least one of the following:"
       if test -n "$shlibpath_var"; then
-	echo "   - add LIBDIR to the '$shlibpath_var' environment variable"
+	echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
 	echo "     during execution"
       fi
       if test -n "$runpath_var"; then
-	echo "   - add LIBDIR to the '$runpath_var' environment variable"
+	echo "   - add LIBDIR to the \`$runpath_var' environment variable"
 	echo "     during linking"
       fi
       if test -n "$hardcode_libdir_flag_spec"; then
 	libdir=LIBDIR
 	eval flag=\"$hardcode_libdir_flag_spec\"
 
-	$ECHO "   - use the '$flag' linker flag"
+	$ECHO "   - use the \`$flag' linker flag"
       fi
       if test -n "$admincmds"; then
 	$ECHO "   - have your system administrator run these commands:$admincmds"
       fi
       if test -f /etc/ld.so.conf; then
-	echo "   - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+	echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
       fi
       echo
 
@@ -4081,20 +2762,18 @@ func_mode_finish ()
     exit $EXIT_SUCCESS
 }
 
-test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
 
 
 # func_mode_install arg...
 func_mode_install ()
 {
-    $debug_cmd
-
+    $opt_debug
     # There may be an optional sh(1) argument at the beginning of
     # install_prog (especially on Windows NT).
-    if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
        # Allow the use of GNU shtool's install command.
-       case $nonopt in *shtool*) :;; *) false;; esac
-    then
+       case $nonopt in *shtool*) :;; *) false;; esac; then
       # Aesthetically quote it.
       func_quote_for_eval "$nonopt"
       install_prog="$func_quote_for_eval_result "
@@ -4121,7 +2800,7 @@ func_mode_install ()
     opts=
     prev=
     install_type=
-    isdir=false
+    isdir=no
     stripme=
     no_mode=:
     for arg
@@ -4134,7 +2813,7 @@ func_mode_install ()
       fi
 
       case $arg in
-      -d) isdir=: ;;
+      -d) isdir=yes ;;
       -f)
 	if $install_cp; then :; else
 	  prev=$arg
@@ -4152,7 +2831,7 @@ func_mode_install ()
       *)
 	# If the previous option needed an argument, then skip it.
 	if test -n "$prev"; then
-	  if test X-m = "X$prev" && test -n "$install_override_mode"; then
+	  if test "x$prev" = x-m && test -n "$install_override_mode"; then
 	    arg2=$install_override_mode
 	    no_mode=false
 	  fi
@@ -4177,7 +2856,7 @@ func_mode_install ()
       func_fatal_help "you must specify an install program"
 
     test -n "$prev" && \
-      func_fatal_help "the '$prev' option requires an argument"
+      func_fatal_help "the \`$prev' option requires an argument"
 
     if test -n "$install_override_mode" && $no_mode; then
       if $install_cp; then :; else
@@ -4199,19 +2878,19 @@ func_mode_install ()
     dest=$func_stripname_result
 
     # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=:
-    if $isdir; then
-      destdir=$dest
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
       destname=
     else
       func_dirname_and_basename "$dest" "" "."
-      destdir=$func_dirname_result
-      destname=$func_basename_result
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
 
       # Not a directory, so check to see that there is only one file specified.
       set dummy $files; shift
       test "$#" -gt 1 && \
-	func_fatal_help "'$dest' is not a directory"
+	func_fatal_help "\`$dest' is not a directory"
     fi
     case $destdir in
     [\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -4220,7 +2899,7 @@ func_mode_install ()
 	case $file in
 	*.lo) ;;
 	*)
-	  func_fatal_help "'$destdir' must be an absolute directory name"
+	  func_fatal_help "\`$destdir' must be an absolute directory name"
 	  ;;
 	esac
       done
@@ -4229,7 +2908,7 @@ func_mode_install ()
 
     # This variable tells wrapper scripts just to set variables rather
     # than running their programs.
-    libtool_install_magic=$magic
+    libtool_install_magic="$magic"
 
     staticlibs=
     future_libdirs=
@@ -4249,7 +2928,7 @@ func_mode_install ()
 
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$file" \
-	  || func_fatal_help "'$file' is not a valid libtool archive"
+	  || func_fatal_help "\`$file' is not a valid libtool archive"
 
 	library_names=
 	old_library=
@@ -4271,7 +2950,7 @@ func_mode_install ()
 	fi
 
 	func_dirname "$file" "/" ""
-	dir=$func_dirname_result
+	dir="$func_dirname_result"
 	func_append dir "$objdir"
 
 	if test -n "$relink_command"; then
@@ -4285,7 +2964,7 @@ func_mode_install ()
 	  # are installed into $libdir/../bin (currently, that works fine)
 	  # but it's something to keep an eye on.
 	  test "$inst_prefix_dir" = "$destdir" && \
-	    func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
 
 	  if test -n "$inst_prefix_dir"; then
 	    # Stick the inst_prefix_dir data into the link command.
@@ -4294,36 +2973,29 @@ func_mode_install ()
 	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
 	  fi
 
-	  func_warning "relinking '$file'"
+	  func_warning "relinking \`$file'"
 	  func_show_eval "$relink_command" \
-	    'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
+	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
 	fi
 
 	# See the names of the shared library.
 	set dummy $library_names; shift
 	if test -n "$1"; then
-	  realname=$1
+	  realname="$1"
 	  shift
 
-	  srcname=$realname
-	  test -n "$relink_command" && srcname=${realname}T
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
 
 	  # Install the shared library and build the symlinks.
 	  func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
 	      'exit $?'
-	  tstripme=$stripme
+	  tstripme="$stripme"
 	  case $host_os in
 	  cygwin* | mingw* | pw32* | cegcc*)
 	    case $realname in
 	    *.dll.a)
-	      tstripme=
-	      ;;
-	    esac
-	    ;;
-	  os2*)
-	    case $realname in
-	    *_dll.a)
-	      tstripme=
+	      tstripme=""
 	      ;;
 	    esac
 	    ;;
@@ -4334,7 +3006,7 @@ func_mode_install ()
 
 	  if test "$#" -gt 0; then
 	    # Delete the old symlinks, and create new ones.
-	    # Try 'ln -sf' first, because the 'ln' binary might depend on
+	    # Try `ln -sf' first, because the `ln' binary might depend on
 	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
 	    # so we also need to try rm && ln -s.
 	    for linkname
@@ -4345,14 +3017,14 @@ func_mode_install ()
 	  fi
 
 	  # Do each command in the postinstall commands.
-	  lib=$destdir/$realname
+	  lib="$destdir/$realname"
 	  func_execute_cmds "$postinstall_cmds" 'exit $?'
 	fi
 
 	# Install the pseudo-library for information purposes.
 	func_basename "$file"
-	name=$func_basename_result
-	instname=$dir/${name}i
+	name="$func_basename_result"
+	instname="$dir/$name"i
 	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
 
 	# Maybe install the static library, too.
@@ -4364,11 +3036,11 @@ func_mode_install ()
 
 	# Figure out destination file name, if it wasn't already specified.
 	if test -n "$destname"; then
-	  destfile=$destdir/$destname
+	  destfile="$destdir/$destname"
 	else
 	  func_basename "$file"
-	  destfile=$func_basename_result
-	  destfile=$destdir/$destfile
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
 	fi
 
 	# Deduce the name of the destination old-style object file.
@@ -4378,11 +3050,11 @@ func_mode_install ()
 	  staticdest=$func_lo2o_result
 	  ;;
 	*.$objext)
-	  staticdest=$destfile
+	  staticdest="$destfile"
 	  destfile=
 	  ;;
 	*)
-	  func_fatal_help "cannot copy a libtool object to '$destfile'"
+	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
 	  ;;
 	esac
 
@@ -4391,7 +3063,7 @@ func_mode_install ()
 	  func_show_eval "$install_prog $file $destfile" 'exit $?'
 
 	# Install the old object if enabled.
-	if test yes = "$build_old_libs"; then
+	if test "$build_old_libs" = yes; then
 	  # Deduce the name of the old-style object file.
 	  func_lo2o "$file"
 	  staticobj=$func_lo2o_result
@@ -4403,23 +3075,23 @@ func_mode_install ()
       *)
 	# Figure out destination file name, if it wasn't already specified.
 	if test -n "$destname"; then
-	  destfile=$destdir/$destname
+	  destfile="$destdir/$destname"
 	else
 	  func_basename "$file"
-	  destfile=$func_basename_result
-	  destfile=$destdir/$destfile
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
 	fi
 
 	# If the file is missing, and there is a .exe on the end, strip it
 	# because it is most likely a libtool script we actually want to
 	# install
-	stripped_ext=
+	stripped_ext=""
 	case $file in
 	  *.exe)
 	    if test ! -f "$file"; then
 	      func_stripname '' '.exe' "$file"
 	      file=$func_stripname_result
-	      stripped_ext=.exe
+	      stripped_ext=".exe"
 	    fi
 	    ;;
 	esac
@@ -4447,19 +3119,19 @@ func_mode_install ()
 
 	  # Check the variables that should have been set.
 	  test -z "$generated_by_libtool_version" && \
-	    func_fatal_error "invalid libtool wrapper script '$wrapper'"
+	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
 
-	  finalize=:
+	  finalize=yes
 	  for lib in $notinst_deplibs; do
 	    # Check to see that each library is installed.
 	    libdir=
 	    if test -f "$lib"; then
 	      func_source "$lib"
 	    fi
-	    libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
+	    libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
 	    if test -n "$libdir" && test ! -f "$libfile"; then
-	      func_warning "'$lib' has not been installed in '$libdir'"
-	      finalize=false
+	      func_warning "\`$lib' has not been installed in \`$libdir'"
+	      finalize=no
 	    fi
 	  done
 
@@ -4467,29 +3139,29 @@ func_mode_install ()
 	  func_source "$wrapper"
 
 	  outputname=
-	  if test no = "$fast_install" && test -n "$relink_command"; then
+	  if test "$fast_install" = no && test -n "$relink_command"; then
 	    $opt_dry_run || {
-	      if $finalize; then
+	      if test "$finalize" = yes; then
 	        tmpdir=`func_mktempdir`
 		func_basename "$file$stripped_ext"
-		file=$func_basename_result
-	        outputname=$tmpdir/$file
+		file="$func_basename_result"
+	        outputname="$tmpdir/$file"
 	        # Replace the output file specification.
 	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
 
-	        $opt_quiet || {
+	        $opt_silent || {
 	          func_quote_for_expand "$relink_command"
 		  eval "func_echo $func_quote_for_expand_result"
 	        }
 	        if eval "$relink_command"; then :
 	          else
-		  func_error "error: relink '$file' with the above command before installing it"
+		  func_error "error: relink \`$file' with the above command before installing it"
 		  $opt_dry_run || ${RM}r "$tmpdir"
 		  continue
 	        fi
-	        file=$outputname
+	        file="$outputname"
 	      else
-	        func_warning "cannot relink '$file'"
+	        func_warning "cannot relink \`$file'"
 	      fi
 	    }
 	  else
@@ -4526,10 +3198,10 @@ func_mode_install ()
 
     for file in $staticlibs; do
       func_basename "$file"
-      name=$func_basename_result
+      name="$func_basename_result"
 
       # Set up the ranlib parameters.
-      oldlib=$destdir/$name
+      oldlib="$destdir/$name"
       func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
       tool_oldlib=$func_to_tool_file_result
 
@@ -4544,18 +3216,18 @@ func_mode_install ()
     done
 
     test -n "$future_libdirs" && \
-      func_warning "remember to run '$progname --finish$future_libdirs'"
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
 
     if test -n "$current_libdirs"; then
       # Maybe just do a dry run.
       $opt_dry_run && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
     else
       exit $EXIT_SUCCESS
     fi
 }
 
-test install = "$opt_mode" && func_mode_install ${1+"$@"}
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
 
 
 # func_generate_dlsyms outputname originator pic_p
@@ -4563,17 +3235,16 @@ test install = "$opt_mode" && func_mode_install ${1+"$@"}
 # a dlpreopen symbol table.
 func_generate_dlsyms ()
 {
-    $debug_cmd
-
-    my_outputname=$1
-    my_originator=$2
-    my_pic_p=${3-false}
-    my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
     my_dlsyms=
 
-    if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
       if test -n "$NM" && test -n "$global_symbol_pipe"; then
-	my_dlsyms=${my_outputname}S.c
+	my_dlsyms="${my_outputname}S.c"
       else
 	func_error "not configured to extract global symbols from dlpreopened files"
       fi
@@ -4584,7 +3255,7 @@ func_generate_dlsyms ()
       "") ;;
       *.c)
 	# Discover the nlist of each of the dlfiles.
-	nlist=$output_objdir/$my_outputname.nm
+	nlist="$output_objdir/${my_outputname}.nm"
 
 	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
 
@@ -4592,36 +3263,34 @@ func_generate_dlsyms ()
 	func_verbose "creating $output_objdir/$my_dlsyms"
 
 	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
 
 #ifdef __cplusplus
 extern \"C\" {
 #endif
 
-#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
 #endif
 
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
-/* DATA imports from DLLs on WIN32 can't be const, because runtime
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
    relocations are performed -- see ld's documentation on pseudo-relocs.  */
 # define LT_DLSYM_CONST
-#elif defined __osf__
+#elif defined(__osf__)
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
 # define LT_DLSYM_CONST const
 #endif
 
-#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
-
 /* External symbol declarations for the compiler. */\
 "
 
-	if test yes = "$dlself"; then
-	  func_verbose "generating symbol list for '$output'"
+	if test "$dlself" = yes; then
+	  func_verbose "generating symbol list for \`$output'"
 
 	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
 
@@ -4629,7 +3298,7 @@ extern \"C\" {
 	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
 	  for progfile in $progfiles; do
 	    func_to_tool_file "$progfile" func_convert_file_msys_to_w32
-	    func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+	    func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
 	    $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
 	  done
 
@@ -4649,10 +3318,10 @@ extern \"C\" {
 
 	  # Prepare the list of exported symbols
 	  if test -z "$export_symbols"; then
-	    export_symbols=$output_objdir/$outputname.exp
+	    export_symbols="$output_objdir/$outputname.exp"
 	    $opt_dry_run || {
 	      $RM $export_symbols
-	      eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
 	      case $host in
 	      *cygwin* | *mingw* | *cegcc* )
                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
@@ -4662,7 +3331,7 @@ extern \"C\" {
 	    }
 	  else
 	    $opt_dry_run || {
-	      eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
 	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
 	      eval '$MV "$nlist"T "$nlist"'
 	      case $host in
@@ -4676,22 +3345,22 @@ extern \"C\" {
 	fi
 
 	for dlprefile in $dlprefiles; do
-	  func_verbose "extracting global C symbols from '$dlprefile'"
+	  func_verbose "extracting global C symbols from \`$dlprefile'"
 	  func_basename "$dlprefile"
-	  name=$func_basename_result
+	  name="$func_basename_result"
           case $host in
 	    *cygwin* | *mingw* | *cegcc* )
 	      # if an import library, we need to obtain dlname
 	      if func_win32_import_lib_p "$dlprefile"; then
 	        func_tr_sh "$dlprefile"
 	        eval "curr_lafile=\$libfile_$func_tr_sh_result"
-	        dlprefile_dlbasename=
+	        dlprefile_dlbasename=""
 	        if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
 	          # Use subshell, to avoid clobbering current variable values
 	          dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
-	          if test -n "$dlprefile_dlname"; then
+	          if test -n "$dlprefile_dlname" ; then
 	            func_basename "$dlprefile_dlname"
-	            dlprefile_dlbasename=$func_basename_result
+	            dlprefile_dlbasename="$func_basename_result"
 	          else
 	            # no lafile. user explicitly requested -dlpreopen <import library>.
 	            $sharedlib_from_linklib_cmd "$dlprefile"
@@ -4699,7 +3368,7 @@ extern \"C\" {
 	          fi
 	        fi
 	        $opt_dry_run || {
-	          if test -n "$dlprefile_dlbasename"; then
+	          if test -n "$dlprefile_dlbasename" ; then
 	            eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
 	          else
 	            func_warning "Could not compute DLL name from $name"
@@ -4755,11 +3424,6 @@ extern \"C\" {
 	    echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
 	  fi
 
-	  func_show_eval '$RM "${nlist}I"'
-	  if test -n "$global_symbol_to_import"; then
-	    eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
-	  fi
-
 	  echo >> "$output_objdir/$my_dlsyms" "\
 
 /* The mapping between symbol names and symbols.  */
@@ -4768,30 +3432,11 @@ typedef struct {
   void *address;
 } lt_dlsymlist;
 extern LT_DLSYM_CONST lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];\
-"
-
-	  if test -s "$nlist"I; then
-	    echo >> "$output_objdir/$my_dlsyms" "\
-static void lt_syminit(void)
-{
-  LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
-  for (; symbol->name; ++symbol)
-    {"
-	    $SED 's/.*/      if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
-	    echo >> "$output_objdir/$my_dlsyms" "\
-    }
-}"
-	  fi
-	  echo >> "$output_objdir/$my_dlsyms" "\
+lt_${my_prefix}_LTX_preloaded_symbols[];
 LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[] =
-{ {\"$my_originator\", (void *) 0},"
-
-	  if test -s "$nlist"I; then
-	    echo >> "$output_objdir/$my_dlsyms" "\
-  {\"@INIT@\", (void *) &lt_syminit},"
-	  fi
+{\
+  { \"$my_originator\", (void *) 0 },"
 
 	  case $need_lib_prefix in
 	  no)
@@ -4833,7 +3478,9 @@ static const void *lt_preloaded_setup() {
 	  *-*-hpux*)
 	    pic_flag_for_symtable=" $pic_flag"  ;;
 	  *)
-	    $my_pic_p && pic_flag_for_symtable=" $pic_flag"
+	    if test "X$my_pic_p" != Xno; then
+	      pic_flag_for_symtable=" $pic_flag"
+	    fi
 	    ;;
 	  esac
 	  ;;
@@ -4850,10 +3497,10 @@ static const void *lt_preloaded_setup() {
 	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
 
 	# Clean up the generated files.
-	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
 
 	# Transform the symbol file into the correct name.
-	symfileobj=$output_objdir/${my_outputname}S.$objext
+	symfileobj="$output_objdir/${my_outputname}S.$objext"
 	case $host in
 	*cygwin* | *mingw* | *cegcc* )
 	  if test -f "$output_objdir/$my_outputname.def"; then
@@ -4871,7 +3518,7 @@ static const void *lt_preloaded_setup() {
 	esac
 	;;
       *)
-	func_fatal_error "unknown suffix for '$my_dlsyms'"
+	func_fatal_error "unknown suffix for \`$my_dlsyms'"
 	;;
       esac
     else
@@ -4885,32 +3532,6 @@ static const void *lt_preloaded_setup() {
     fi
 }
 
-# func_cygming_gnu_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is a GNU/binutils-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_gnu_implib_p ()
-{
-  $debug_cmd
-
-  func_to_tool_file "$1" func_convert_file_msys_to_w32
-  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
-  test -n "$func_cygming_gnu_implib_tmp"
-}
-
-# func_cygming_ms_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is an MS-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_ms_implib_p ()
-{
-  $debug_cmd
-
-  func_to_tool_file "$1" func_convert_file_msys_to_w32
-  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
-  test -n "$func_cygming_ms_implib_tmp"
-}
-
 # func_win32_libid arg
 # return the library type of file 'arg'
 #
@@ -4920,9 +3541,8 @@ func_cygming_ms_implib_p ()
 # Despite the name, also deal with 64 bit binaries.
 func_win32_libid ()
 {
-  $debug_cmd
-
-  win32_libid_type=unknown
+  $opt_debug
+  win32_libid_type="unknown"
   win32_fileres=`file -L $1 2>/dev/null`
   case $win32_fileres in
   *ar\ archive\ import\ library*) # definitely import
@@ -4932,29 +3552,16 @@ func_win32_libid ()
     # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
        $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
-      case $nm_interface in
-      "MS dumpbin")
-	if func_cygming_ms_implib_p "$1" ||
-	   func_cygming_gnu_implib_p "$1"
-	then
-	  win32_nmres=import
-	else
-	  win32_nmres=
-	fi
-	;;
-      *)
-	func_to_tool_file "$1" func_convert_file_msys_to_w32
-	win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
-	  $SED -n -e '
+      func_to_tool_file "$1" func_convert_file_msys_to_w32
+      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+	$SED -n -e '
 	    1,100{
 		/ I /{
-		    s|.*|import|
+		    s,.*,import,
 		    p
 		    q
 		}
 	    }'`
-	;;
-      esac
       case $win32_nmres in
       import*)  win32_libid_type="x86 archive import";;
       *)        win32_libid_type="x86 archive static";;
@@ -4986,8 +3593,7 @@ func_win32_libid ()
 #    $sharedlib_from_linklib_result
 func_cygming_dll_for_implib ()
 {
-  $debug_cmd
-
+  $opt_debug
   sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
 }
 
@@ -5004,8 +3610,7 @@ func_cygming_dll_for_implib ()
 # specified import library.
 func_cygming_dll_for_implib_fallback_core ()
 {
-  $debug_cmd
-
+  $opt_debug
   match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
   $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
     $SED '/^Contents of section '"$match_literal"':/{
@@ -5041,8 +3646,8 @@ func_cygming_dll_for_implib_fallback_core ()
       /./p' |
     # we now have a list, one entry per line, of the stringified
     # contents of the appropriate section of all members of the
-    # archive that possess that section. Heuristic: eliminate
-    # all those that have a first or second character that is
+    # archive which possess that section. Heuristic: eliminate
+    # all those which have a first or second character that is
     # a '.' (that is, objdump's representation of an unprintable
     # character.) This should work for all archives with less than
     # 0x302f exports -- but will fail for DLLs whose name actually
@@ -5053,6 +3658,30 @@ func_cygming_dll_for_implib_fallback_core ()
     $SED -e '/^\./d;/^.\./d;q'
 }
 
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
 # func_cygming_dll_for_implib_fallback ARG
 # Platform-specific function to extract the
 # name of the DLL associated with the specified
@@ -5066,17 +3695,16 @@ func_cygming_dll_for_implib_fallback_core ()
 #    $sharedlib_from_linklib_result
 func_cygming_dll_for_implib_fallback ()
 {
-  $debug_cmd
-
-  if func_cygming_gnu_implib_p "$1"; then
+  $opt_debug
+  if func_cygming_gnu_implib_p "$1" ; then
     # binutils import library
     sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
-  elif func_cygming_ms_implib_p "$1"; then
+  elif func_cygming_ms_implib_p "$1" ; then
     # ms-generated import library
     sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
   else
     # unknown
-    sharedlib_from_linklib_result=
+    sharedlib_from_linklib_result=""
   fi
 }
 
@@ -5084,11 +3712,10 @@ func_cygming_dll_for_implib_fallback ()
 # func_extract_an_archive dir oldlib
 func_extract_an_archive ()
 {
-    $debug_cmd
-
-    f_ex_an_ar_dir=$1; shift
-    f_ex_an_ar_oldlib=$1
-    if test yes = "$lock_old_archive_extraction"; then
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    if test "$lock_old_archive_extraction" = yes; then
       lockfile=$f_ex_an_ar_oldlib.lock
       until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
 	func_echo "Waiting for $lockfile to be removed"
@@ -5097,7 +3724,7 @@ func_extract_an_archive ()
     fi
     func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
 		   'stat=$?; rm -f "$lockfile"; exit $stat'
-    if test yes = "$lock_old_archive_extraction"; then
+    if test "$lock_old_archive_extraction" = yes; then
       $opt_dry_run || rm -f "$lockfile"
     fi
     if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
@@ -5111,23 +3738,22 @@ func_extract_an_archive ()
 # func_extract_archives gentop oldlib ...
 func_extract_archives ()
 {
-    $debug_cmd
-
-    my_gentop=$1; shift
+    $opt_debug
+    my_gentop="$1"; shift
     my_oldlibs=${1+"$@"}
-    my_oldobjs=
-    my_xlib=
-    my_xabs=
-    my_xdir=
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
 
     for my_xlib in $my_oldlibs; do
       # Extract the objects.
       case $my_xlib in
-	[\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
 	*) my_xabs=`pwd`"/$my_xlib" ;;
       esac
       func_basename "$my_xlib"
-      my_xlib=$func_basename_result
+      my_xlib="$func_basename_result"
       my_xlib_u=$my_xlib
       while :; do
         case " $extracted_archives " in
@@ -5139,7 +3765,7 @@ func_extract_archives ()
 	esac
       done
       extracted_archives="$extracted_archives $my_xlib_u"
-      my_xdir=$my_gentop/$my_xlib_u
+      my_xdir="$my_gentop/$my_xlib_u"
 
       func_mkdir_p "$my_xdir"
 
@@ -5152,23 +3778,22 @@ func_extract_archives ()
 	  cd $my_xdir || exit $?
 	  darwin_archive=$my_xabs
 	  darwin_curdir=`pwd`
-	  func_basename "$darwin_archive"
-	  darwin_base_archive=$func_basename_result
+	  darwin_base_archive=`basename "$darwin_archive"`
 	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
 	  if test -n "$darwin_arches"; then
 	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
 	    darwin_arch=
 	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
-	    for darwin_arch in  $darwin_arches; do
-	      func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
-	      $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
-	      cd "unfat-$$/$darwin_base_archive-$darwin_arch"
-	      func_extract_an_archive "`pwd`" "$darwin_base_archive"
+	    for darwin_arch in  $darwin_arches ; do
+	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
 	      cd "$darwin_curdir"
-	      $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
+	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
 	    done # $darwin_arches
             ## Okay now we've a bunch of thin objects, gotta fatten them up :)
-	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
 	    darwin_file=
 	    darwin_files=
 	    for darwin_file in $darwin_filelist; do
@@ -5190,7 +3815,7 @@ func_extract_archives ()
       my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
     done
 
-    func_extract_archives_result=$my_oldobjs
+    func_extract_archives_result="$my_oldobjs"
 }
 
 
@@ -5205,7 +3830,7 @@ func_extract_archives ()
 #
 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
 # variable will take.  If 'yes', then the emitted script
-# will assume that the directory where it is stored is
+# will assume that the directory in which it is stored is
 # the $objdir directory.  This is a cygwin/mingw-specific
 # behavior.
 func_emit_wrapper ()
@@ -5216,7 +3841,7 @@ func_emit_wrapper ()
 #! $SHELL
 
 # $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
 #
 # The $output program cannot be directly executed until all the libtool
 # libraries that it depends on are installed.
@@ -5273,9 +3898,9 @@ _LTECHO_EOF'
 
 # Very basic option parsing. These options are (a) specific to
 # the libtool wrapper, (b) are identical between the wrapper
-# /script/ and the wrapper /executable/ that is used only on
+# /script/ and the wrapper /executable/ which is used only on
 # windows platforms, and (c) all begin with the string "--lt-"
-# (application programs are unlikely to have options that match
+# (application programs are unlikely to have options which match
 # this pattern).
 #
 # There are only two supported options: --lt-debug and
@@ -5308,7 +3933,7 @@ func_parse_lt_options ()
 
   # Print the debug banner immediately:
   if test -n \"\$lt_option_debug\"; then
-    echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
   fi
 }
 
@@ -5319,7 +3944,7 @@ func_lt_dump_args ()
   lt_dump_args_N=1;
   for lt_arg
   do
-    \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
     lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
   done
 }
@@ -5333,7 +3958,7 @@ func_exec_program_core ()
   *-*-mingw | *-*-os2* | *-cegcc*)
     $ECHO "\
       if test -n \"\$lt_option_debug\"; then
-        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
         func_lt_dump_args \${1+\"\$@\"} 1>&2
       fi
       exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
@@ -5343,7 +3968,7 @@ func_exec_program_core ()
   *)
     $ECHO "\
       if test -n \"\$lt_option_debug\"; then
-        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
         func_lt_dump_args \${1+\"\$@\"} 1>&2
       fi
       exec \"\$progdir/\$program\" \${1+\"\$@\"}
@@ -5418,13 +4043,13 @@ func_exec_program ()
   test -n \"\$absdir\" && thisdir=\"\$absdir\"
 "
 
-	if test yes = "$fast_install"; then
+	if test "$fast_install" = yes; then
 	  $ECHO "\
   program=lt-'$outputname'$exeext
   progdir=\"\$thisdir/$objdir\"
 
   if test ! -f \"\$progdir/\$program\" ||
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
        test \"X\$file\" != \"X\$progdir/\$program\"; }; then
 
     file=\"\$\$-\$program\"
@@ -5441,7 +4066,7 @@ func_exec_program ()
     if test -n \"\$relink_command\"; then
       if relink_command_output=\`eval \$relink_command 2>&1\`; then :
       else
-	\$ECHO \"\$relink_command_output\" >&2
+	$ECHO \"\$relink_command_output\" >&2
 	$RM \"\$progdir/\$file\"
 	exit 1
       fi
@@ -5476,7 +4101,7 @@ func_exec_program ()
 	fi
 
 	# Export our shlibpath_var if we have one.
-	if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
 	  $ECHO "\
     # Add our own library path to $shlibpath_var
     $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
@@ -5496,7 +4121,7 @@ func_exec_program ()
     fi
   else
     # The program doesn't exist.
-    \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
     \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
     \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
     exit 1
@@ -5515,7 +4140,7 @@ func_emit_cwrapperexe_src ()
 	cat <<EOF
 
 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
 
    The $output program cannot be directly executed until all the libtool
    libraries that it depends on are installed.
@@ -5550,45 +4175,47 @@ EOF
 #include <fcntl.h>
 #include <sys/stat.h>
 
-#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
-
 /* declarations of non-ANSI functions */
-#if defined __MINGW32__
+#if defined(__MINGW32__)
 # ifdef __STRICT_ANSI__
 int _putenv (const char *);
 # endif
-#elif defined __CYGWIN__
+#elif defined(__CYGWIN__)
 # ifdef __STRICT_ANSI__
 char *realpath (const char *, char *);
 int putenv (char *);
 int setenv (const char *, const char *, int);
 # endif
-/* #elif defined other_platform || defined ... */
+/* #elif defined (other platforms) ... */
 #endif
 
 /* portability defines, excluding path handling macros */
-#if defined _MSC_VER
+#if defined(_MSC_VER)
 # define setmode _setmode
 # define stat    _stat
 # define chmod   _chmod
 # define getcwd  _getcwd
 # define putenv  _putenv
 # define S_IXUSR _S_IEXEC
-#elif defined __MINGW32__
+# ifndef _INTPTR_T_DEFINED
+#  define _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#elif defined(__MINGW32__)
 # define setmode _setmode
 # define stat    _stat
 # define chmod   _chmod
 # define getcwd  _getcwd
 # define putenv  _putenv
-#elif defined __CYGWIN__
+#elif defined(__CYGWIN__)
 # define HAVE_SETENV
 # define FOPEN_WB "wb"
-/* #elif defined other platforms ... */
+/* #elif defined (other platforms) ... */
 #endif
 
-#if defined PATH_MAX
+#if defined(PATH_MAX)
 # define LT_PATHMAX PATH_MAX
-#elif defined MAXPATHLEN
+#elif defined(MAXPATHLEN)
 # define LT_PATHMAX MAXPATHLEN
 #else
 # define LT_PATHMAX 1024
@@ -5607,8 +4234,8 @@ int setenv (const char *, const char *, int);
 # define PATH_SEPARATOR ':'
 #endif
 
-#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
-  defined __OS2__
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
 # define HAVE_DOS_BASED_FILE_SYSTEM
 # define FOPEN_WB "wb"
 # ifndef DIR_SEPARATOR_2
@@ -5641,10 +4268,10 @@ int setenv (const char *, const char *, int);
 
 #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
 #define XFREE(stale) do { \
-  if (stale) { free (stale); stale = 0; } \
+  if (stale) { free ((void *) stale); stale = 0; } \
 } while (0)
 
-#if defined LT_DEBUGWRAPPER
+#if defined(LT_DEBUGWRAPPER)
 static int lt_debug = 1;
 #else
 static int lt_debug = 0;
@@ -5673,16 +4300,11 @@ void lt_dump_script (FILE *f);
 EOF
 
 	    cat <<EOF
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
-# define externally_visible volatile
-#else
-# define externally_visible __attribute__((externally_visible)) volatile
-#endif
-externally_visible const char * MAGIC_EXE = "$magic_exe";
+volatile const char * MAGIC_EXE = "$magic_exe";
 const char * LIB_PATH_VARNAME = "$shlibpath_var";
 EOF
 
-	    if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
               func_to_host_path "$temp_rpath"
 	      cat <<EOF
 const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
@@ -5706,7 +4328,7 @@ const char * EXE_PATH_VALUE   = "";
 EOF
 	    fi
 
-	    if test yes = "$fast_install"; then
+	    if test "$fast_install" = yes; then
 	      cat <<EOF
 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
 EOF
@@ -5735,12 +4357,12 @@ main (int argc, char *argv[])
   char *actual_cwrapper_name;
   char *target_name;
   char *lt_argv_zero;
-  int rval = 127;
+  intptr_t rval = 127;
 
   int i;
 
   program_name = (char *) xstrdup (base_name (argv[0]));
-  newargz = XMALLOC (char *, (size_t) argc + 1);
+  newargz = XMALLOC (char *, argc + 1);
 
   /* very simple arg parsing; don't want to rely on getopt
    * also, copy all non cwrapper options to newargz, except
@@ -5749,10 +4371,10 @@ main (int argc, char *argv[])
   newargc=0;
   for (i = 1; i < argc; i++)
     {
-      if (STREQ (argv[i], dumpscript_opt))
+      if (strcmp (argv[i], dumpscript_opt) == 0)
 	{
 EOF
-	    case $host in
+	    case "$host" in
 	      *mingw* | *cygwin* )
 		# make stdout use "unix" line endings
 		echo "          setmode(1,_O_BINARY);"
@@ -5763,12 +4385,12 @@ EOF
 	  lt_dump_script (stdout);
 	  return 0;
 	}
-      if (STREQ (argv[i], debug_opt))
+      if (strcmp (argv[i], debug_opt) == 0)
 	{
           lt_debug = 1;
           continue;
 	}
-      if (STREQ (argv[i], ltwrapper_option_prefix))
+      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
         {
           /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
              namespace, but it is not one of the ones we know about and
@@ -5791,7 +4413,7 @@ EOF
 EOF
 	    cat <<EOF
   /* The GNU banner must be the first non-error debug message */
-  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
 EOF
 	    cat <<"EOF"
   lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
@@ -5902,7 +4524,7 @@ EOF
 		cat <<"EOF"
   /* execv doesn't actually work on mingw as expected on unix */
   newargz = prepare_spawn (newargz);
-  rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
   if (rval == -1)
     {
       /* failed to start process */
@@ -5947,7 +4569,7 @@ base_name (const char *name)
 {
   const char *base;
 
-#if defined HAVE_DOS_BASED_FILE_SYSTEM
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
   /* Skip over the disk name in MSDOS pathnames. */
   if (isalpha ((unsigned char) name[0]) && name[1] == ':')
     name += 2;
@@ -6006,7 +4628,7 @@ find_executable (const char *wrapper)
   const char *p_next;
   /* static buffer for getcwd */
   char tmp[LT_PATHMAX + 1];
-  size_t tmp_len;
+  int tmp_len;
   char *concat_name;
 
   lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
@@ -6016,7 +4638,7 @@ find_executable (const char *wrapper)
     return NULL;
 
   /* Absolute path? */
-#if defined HAVE_DOS_BASED_FILE_SYSTEM
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
   if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
     {
       concat_name = xstrdup (wrapper);
@@ -6034,7 +4656,7 @@ find_executable (const char *wrapper)
 	    return concat_name;
 	  XFREE (concat_name);
 	}
-#if defined HAVE_DOS_BASED_FILE_SYSTEM
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
     }
 #endif
 
@@ -6057,7 +4679,7 @@ find_executable (const char *wrapper)
 	      for (q = p; *q; q++)
 		if (IS_PATH_SEPARATOR (*q))
 		  break;
-	      p_len = (size_t) (q - p);
+	      p_len = q - p;
 	      p_next = (*q == '\0' ? q : q + 1);
 	      if (p_len == 0)
 		{
@@ -6176,7 +4798,7 @@ strendzap (char *str, const char *pat)
   if (patlen <= len)
     {
       str += len - patlen;
-      if (STREQ (str, pat))
+      if (strcmp (str, pat) == 0)
 	*str = '\0';
     }
   return str;
@@ -6241,7 +4863,7 @@ lt_setenv (const char *name, const char *value)
     char *str = xstrdup (value);
     setenv (name, str, 1);
 #else
-    size_t len = strlen (name) + 1 + strlen (value) + 1;
+    int len = strlen (name) + 1 + strlen (value) + 1;
     char *str = XMALLOC (char, len);
     sprintf (str, "%s=%s", name, value);
     if (putenv (str) != EXIT_SUCCESS)
@@ -6258,8 +4880,8 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
   char *new_value;
   if (orig_value && *orig_value)
     {
-      size_t orig_value_len = strlen (orig_value);
-      size_t add_len = strlen (add);
+      int orig_value_len = strlen (orig_value);
+      int add_len = strlen (add);
       new_value = XMALLOC (char, add_len + orig_value_len + 1);
       if (to_end)
         {
@@ -6290,10 +4912,10 @@ lt_update_exe_path (const char *name, const char *value)
     {
       char *new_value = lt_extend_str (getenv (name), value, 0);
       /* some systems can't cope with a ':'-terminated path #' */
-      size_t len = strlen (new_value);
-      while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+      int len = strlen (new_value);
+      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
         {
-          new_value[--len] = '\0';
+          new_value[len-1] = '\0';
         }
       lt_setenv (name, new_value);
       XFREE (new_value);
@@ -6460,47 +5082,27 @@ EOF
 # True if ARG is an import lib, as indicated by $file_magic_cmd
 func_win32_import_lib_p ()
 {
-    $debug_cmd
-
+    $opt_debug
     case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
     *import*) : ;;
     *) false ;;
     esac
 }
 
-# func_suncc_cstd_abi
-# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
-# Several compiler flags select an ABI that is incompatible with the
-# Cstd library. Avoid specifying it if any are in CXXFLAGS.
-func_suncc_cstd_abi ()
-{
-    $debug_cmd
-
-    case " $compile_command " in
-    *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
-      suncc_use_cstd_abi=no
-      ;;
-    *)
-      suncc_use_cstd_abi=yes
-      ;;
-    esac
-}
-
 # func_mode_link arg...
 func_mode_link ()
 {
-    $debug_cmd
-
+    $opt_debug
     case $host in
     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
       # It is impossible to link a dll without this setting, and
       # we shouldn't force the makefile maintainer to figure out
-      # what system we are compiling for in order to pass an extra
+      # which system we are compiling for in order to pass an extra
       # flag for every libtool invocation.
       # allow_undefined=no
 
       # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll that has undefined symbols, in which case not
+      # to make a dll which has undefined symbols, in which case not
       # even a static library is built.  For now, we need to specify
       # -no-undefined on the libtool link line when we can be certain
       # that all symbols are satisfied, otherwise we get a static library.
@@ -6544,11 +5146,10 @@ func_mode_link ()
     module=no
     no_install=no
     objs=
-    os2dllname=
     non_pic_objects=
     precious_files_regex=
     prefer_static_libs=no
-    preload=false
+    preload=no
     prev=
     prevarg=
     release=
@@ -6560,7 +5161,7 @@ func_mode_link ()
     vinfo=
     vinfo_number=no
     weak_libs=
-    single_module=$wl-single_module
+    single_module="${wl}-single_module"
     func_infer_tag $base_compile
 
     # We need to know -static, to get the right output filenames.
@@ -6568,15 +5169,15 @@ func_mode_link ()
     do
       case $arg in
       -shared)
-	test yes != "$build_libtool_libs" \
-	  && func_fatal_configuration "cannot build a shared library"
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
 	build_old_libs=no
 	break
 	;;
       -all-static | -static | -static-libtool-libs)
 	case $arg in
 	-all-static)
-	  if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
 	    func_warning "complete static linking is impossible in this configuration"
 	  fi
 	  if test -n "$link_static_flag"; then
@@ -6609,7 +5210,7 @@ func_mode_link ()
 
     # Go through the arguments, transforming them on the way.
     while test "$#" -gt 0; do
-      arg=$1
+      arg="$1"
       shift
       func_quote_for_eval "$arg"
       qarg=$func_quote_for_eval_unquoted_result
@@ -6626,21 +5227,21 @@ func_mode_link ()
 
 	case $prev in
 	bindir)
-	  bindir=$arg
+	  bindir="$arg"
 	  prev=
 	  continue
 	  ;;
 	dlfiles|dlprefiles)
-	  $preload || {
+	  if test "$preload" = no; then
 	    # Add the symbol object into the linking commands.
 	    func_append compile_command " @SYMFILE@"
 	    func_append finalize_command " @SYMFILE@"
-	    preload=:
-	  }
+	    preload=yes
+	  fi
 	  case $arg in
 	  *.la | *.lo) ;;  # We handle these cases below.
 	  force)
-	    if test no = "$dlself"; then
+	    if test "$dlself" = no; then
 	      dlself=needless
 	      export_dynamic=yes
 	    fi
@@ -6648,9 +5249,9 @@ func_mode_link ()
 	    continue
 	    ;;
 	  self)
-	    if test dlprefiles = "$prev"; then
+	    if test "$prev" = dlprefiles; then
 	      dlself=yes
-	    elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
 	      dlself=yes
 	    else
 	      dlself=needless
@@ -6660,7 +5261,7 @@ func_mode_link ()
 	    continue
 	    ;;
 	  *)
-	    if test dlfiles = "$prev"; then
+	    if test "$prev" = dlfiles; then
 	      func_append dlfiles " $arg"
 	    else
 	      func_append dlprefiles " $arg"
@@ -6671,14 +5272,14 @@ func_mode_link ()
 	  esac
 	  ;;
 	expsyms)
-	  export_symbols=$arg
+	  export_symbols="$arg"
 	  test -f "$arg" \
-	    || func_fatal_error "symbol file '$arg' does not exist"
+	    || func_fatal_error "symbol file \`$arg' does not exist"
 	  prev=
 	  continue
 	  ;;
 	expsyms_regex)
-	  export_symbols_regex=$arg
+	  export_symbols_regex="$arg"
 	  prev=
 	  continue
 	  ;;
@@ -6696,13 +5297,7 @@ func_mode_link ()
 	  continue
 	  ;;
 	inst_prefix)
-	  inst_prefix_dir=$arg
-	  prev=
-	  continue
-	  ;;
-	mllvm)
-	  # Clang does not use LLVM to link, so we can simply discard any
-	  # '-mllvm $arg' options when doing the link step.
+	  inst_prefix_dir="$arg"
 	  prev=
 	  continue
 	  ;;
@@ -6726,21 +5321,21 @@ func_mode_link ()
 
 		if test -z "$pic_object" ||
 		   test -z "$non_pic_object" ||
-		   test none = "$pic_object" &&
-		   test none = "$non_pic_object"; then
-		  func_fatal_error "cannot find name of object for '$arg'"
+		   test "$pic_object" = none &&
+		   test "$non_pic_object" = none; then
+		  func_fatal_error "cannot find name of object for \`$arg'"
 		fi
 
 		# Extract subdirectory from the argument.
 		func_dirname "$arg" "/" ""
-		xdir=$func_dirname_result
+		xdir="$func_dirname_result"
 
-		if test none != "$pic_object"; then
+		if test "$pic_object" != none; then
 		  # Prepend the subdirectory the object is found in.
-		  pic_object=$xdir$pic_object
+		  pic_object="$xdir$pic_object"
 
-		  if test dlfiles = "$prev"; then
-		    if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
 		      func_append dlfiles " $pic_object"
 		      prev=
 		      continue
@@ -6751,7 +5346,7 @@ func_mode_link ()
 		  fi
 
 		  # CHECK ME:  I think I busted this.  -Ossama
-		  if test dlprefiles = "$prev"; then
+		  if test "$prev" = dlprefiles; then
 		    # Preload the old-style object.
 		    func_append dlprefiles " $pic_object"
 		    prev=
@@ -6759,23 +5354,23 @@ func_mode_link ()
 
 		  # A PIC object.
 		  func_append libobjs " $pic_object"
-		  arg=$pic_object
+		  arg="$pic_object"
 		fi
 
 		# Non-PIC object.
-		if test none != "$non_pic_object"; then
+		if test "$non_pic_object" != none; then
 		  # Prepend the subdirectory the object is found in.
-		  non_pic_object=$xdir$non_pic_object
+		  non_pic_object="$xdir$non_pic_object"
 
 		  # A standard non-PIC object
 		  func_append non_pic_objects " $non_pic_object"
-		  if test -z "$pic_object" || test none = "$pic_object"; then
-		    arg=$non_pic_object
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
 		  fi
 		else
 		  # If the PIC object exists, use it instead.
 		  # $xdir was prepended to $pic_object above.
-		  non_pic_object=$pic_object
+		  non_pic_object="$pic_object"
 		  func_append non_pic_objects " $non_pic_object"
 		fi
 	      else
@@ -6783,7 +5378,7 @@ func_mode_link ()
 		if $opt_dry_run; then
 		  # Extract subdirectory from the argument.
 		  func_dirname "$arg" "/" ""
-		  xdir=$func_dirname_result
+		  xdir="$func_dirname_result"
 
 		  func_lo2o "$arg"
 		  pic_object=$xdir$objdir/$func_lo2o_result
@@ -6791,29 +5386,24 @@ func_mode_link ()
 		  func_append libobjs " $pic_object"
 		  func_append non_pic_objects " $non_pic_object"
 	        else
-		  func_fatal_error "'$arg' is not a valid libtool object"
+		  func_fatal_error "\`$arg' is not a valid libtool object"
 		fi
 	      fi
 	    done
 	  else
-	    func_fatal_error "link input file '$arg' does not exist"
+	    func_fatal_error "link input file \`$arg' does not exist"
 	  fi
 	  arg=$save_arg
 	  prev=
 	  continue
 	  ;;
-	os2dllname)
-	  os2dllname=$arg
-	  prev=
-	  continue
-	  ;;
 	precious_regex)
-	  precious_files_regex=$arg
+	  precious_files_regex="$arg"
 	  prev=
 	  continue
 	  ;;
 	release)
-	  release=-$arg
+	  release="-$arg"
 	  prev=
 	  continue
 	  ;;
@@ -6825,7 +5415,7 @@ func_mode_link ()
 	    func_fatal_error "only absolute run-paths are allowed"
 	    ;;
 	  esac
-	  if test rpath = "$prev"; then
+	  if test "$prev" = rpath; then
 	    case "$rpath " in
 	    *" $arg "*) ;;
 	    *) func_append rpath " $arg" ;;
@@ -6840,7 +5430,7 @@ func_mode_link ()
 	  continue
 	  ;;
 	shrext)
-	  shrext_cmds=$arg
+	  shrext_cmds="$arg"
 	  prev=
 	  continue
 	  ;;
@@ -6880,7 +5470,7 @@ func_mode_link ()
 	esac
       fi # test -n "$prev"
 
-      prevarg=$arg
+      prevarg="$arg"
 
       case $arg in
       -all-static)
@@ -6894,7 +5484,7 @@ func_mode_link ()
 
       -allow-undefined)
 	# FIXME: remove this flag sometime in the future.
-	func_fatal_error "'-allow-undefined' must not be used because it is the default"
+	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
 	;;
 
       -avoid-version)
@@ -6926,7 +5516,7 @@ func_mode_link ()
 	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
 	  func_fatal_error "more than one -exported-symbols argument is not allowed"
 	fi
-	if test X-export-symbols = "X$arg"; then
+	if test "X$arg" = "X-export-symbols"; then
 	  prev=expsyms
 	else
 	  prev=expsyms_regex
@@ -6960,9 +5550,9 @@ func_mode_link ()
 	func_stripname "-L" '' "$arg"
 	if test -z "$func_stripname_result"; then
 	  if test "$#" -gt 0; then
-	    func_fatal_error "require no space between '-L' and '$1'"
+	    func_fatal_error "require no space between \`-L' and \`$1'"
 	  else
-	    func_fatal_error "need path for '-L' option"
+	    func_fatal_error "need path for \`-L' option"
 	  fi
 	fi
 	func_resolve_sysroot "$func_stripname_result"
@@ -6973,8 +5563,8 @@ func_mode_link ()
 	*)
 	  absdir=`cd "$dir" && pwd`
 	  test -z "$absdir" && \
-	    func_fatal_error "cannot determine absolute directory name of '$dir'"
-	  dir=$absdir
+	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
+	  dir="$absdir"
 	  ;;
 	esac
 	case "$deplibs " in
@@ -7009,7 +5599,7 @@ func_mode_link ()
 	;;
 
       -l*)
-	if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
 	  case $host in
 	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
 	    # These systems don't actually have a C or math library (as such)
@@ -7017,11 +5607,11 @@ func_mode_link ()
 	    ;;
 	  *-*-os2*)
 	    # These systems don't actually have a C library (as such)
-	    test X-lc = "X$arg" && continue
+	    test "X$arg" = "X-lc" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
-	    test X-lc = "X$arg" && continue
+	    test "X$arg" = "X-lc" && continue
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C and math libraries are in the System framework
@@ -7030,16 +5620,16 @@ func_mode_link ()
 	    ;;
 	  *-*-sco3.2v5* | *-*-sco5v6*)
 	    # Causes problems with __ctype
-	    test X-lc = "X$arg" && continue
+	    test "X$arg" = "X-lc" && continue
 	    ;;
 	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
 	    # Compiler inserts libc in the correct place for threads to work
-	    test X-lc = "X$arg" && continue
+	    test "X$arg" = "X-lc" && continue
 	    ;;
 	  esac
-	elif test X-lc_r = "X$arg"; then
+	elif test "X$arg" = "X-lc_r"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -7049,11 +5639,6 @@ func_mode_link ()
 	continue
 	;;
 
-      -mllvm)
-	prev=mllvm
-	continue
-	;;
-
       -module)
 	module=yes
 	continue
@@ -7083,7 +5668,7 @@ func_mode_link ()
 	;;
 
       -multi_module)
-	single_module=$wl-multi_module
+	single_module="${wl}-multi_module"
 	continue
 	;;
 
@@ -7097,8 +5682,8 @@ func_mode_link ()
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
 	  # The PATH hackery in wrapper scripts is required on Windows
 	  # and Darwin in order for the loader to find any dlls it needs.
-	  func_warning "'-no-install' is ignored for $host"
-	  func_warning "assuming '-no-fast-install' instead"
+	  func_warning "\`-no-install' is ignored for $host"
+	  func_warning "assuming \`-no-fast-install' instead"
 	  fast_install=no
 	  ;;
 	*) no_install=yes ;;
@@ -7116,11 +5701,6 @@ func_mode_link ()
 	continue
 	;;
 
-      -os2dllname)
-	prev=os2dllname
-	continue
-	;;
-
       -o) prev=output ;;
 
       -precious-files-regex)
@@ -7208,14 +5788,14 @@ func_mode_link ()
 	func_stripname '-Wc,' '' "$arg"
 	args=$func_stripname_result
 	arg=
-	save_ifs=$IFS; IFS=,
+	save_ifs="$IFS"; IFS=','
 	for flag in $args; do
-	  IFS=$save_ifs
+	  IFS="$save_ifs"
           func_quote_for_eval "$flag"
 	  func_append arg " $func_quote_for_eval_result"
 	  func_append compiler_flags " $func_quote_for_eval_result"
 	done
-	IFS=$save_ifs
+	IFS="$save_ifs"
 	func_stripname ' ' '' "$arg"
 	arg=$func_stripname_result
 	;;
@@ -7224,15 +5804,15 @@ func_mode_link ()
 	func_stripname '-Wl,' '' "$arg"
 	args=$func_stripname_result
 	arg=
-	save_ifs=$IFS; IFS=,
+	save_ifs="$IFS"; IFS=','
 	for flag in $args; do
-	  IFS=$save_ifs
+	  IFS="$save_ifs"
           func_quote_for_eval "$flag"
 	  func_append arg " $wl$func_quote_for_eval_result"
 	  func_append compiler_flags " $wl$func_quote_for_eval_result"
 	  func_append linker_flags " $func_quote_for_eval_result"
 	done
-	IFS=$save_ifs
+	IFS="$save_ifs"
 	func_stripname ' ' '' "$arg"
 	arg=$func_stripname_result
 	;;
@@ -7255,7 +5835,7 @@ func_mode_link ()
       # -msg_* for osf cc
       -msg_*)
 	func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+	arg="$func_quote_for_eval_result"
 	;;
 
       # Flags to be passed through unchanged, with rationale:
@@ -7267,49 +5847,25 @@ func_mode_link ()
       # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
       # -F/path              path to uninstalled frameworks, gcc on darwin
       # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
-      # -fstack-protector*   stack protector flags for GCC
       # @file                GCC response files
       # -tp=*                Portland pgcc target processor selection
       # --sysroot=*          for sysroot support
-      # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-      # -specs=*             GCC specs files
-      # -stdlib=*            select c++ std lib with clang
-      # -fsanitize=*         Clang/GCC memory and address sanitizer
+      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*|-fsanitize=*)
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
         func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+	arg="$func_quote_for_eval_result"
         func_append compile_command " $arg"
         func_append finalize_command " $arg"
         func_append compiler_flags " $arg"
         continue
         ;;
 
-      -Z*)
-        if test os2 = "`expr $host : '.*\(os2\)'`"; then
-          # OS/2 uses -Zxxx to specify OS/2-specific options
-	  compiler_flags="$compiler_flags $arg"
-	  func_append compile_command " $arg"
-	  func_append finalize_command " $arg"
-	  case $arg in
-	  -Zlinker | -Zstack)
-	    prev=xcompiler
-	    ;;
-	  esac
-	  continue
-        else
-	  # Otherwise treat like 'Some other compiler flag' below
-	  func_quote_for_eval "$arg"
-	  arg=$func_quote_for_eval_result
-        fi
-	;;
-
       # Some other compiler flag.
       -* | +*)
         func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+	arg="$func_quote_for_eval_result"
 	;;
 
       *.$objext)
@@ -7330,21 +5886,21 @@ func_mode_link ()
 
 	  if test -z "$pic_object" ||
 	     test -z "$non_pic_object" ||
-	     test none = "$pic_object" &&
-	     test none = "$non_pic_object"; then
-	    func_fatal_error "cannot find name of object for '$arg'"
+	     test "$pic_object" = none &&
+	     test "$non_pic_object" = none; then
+	    func_fatal_error "cannot find name of object for \`$arg'"
 	  fi
 
 	  # Extract subdirectory from the argument.
 	  func_dirname "$arg" "/" ""
-	  xdir=$func_dirname_result
+	  xdir="$func_dirname_result"
 
-	  test none = "$pic_object" || {
+	  if test "$pic_object" != none; then
 	    # Prepend the subdirectory the object is found in.
-	    pic_object=$xdir$pic_object
+	    pic_object="$xdir$pic_object"
 
-	    if test dlfiles = "$prev"; then
-	      if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
 		func_append dlfiles " $pic_object"
 		prev=
 		continue
@@ -7355,7 +5911,7 @@ func_mode_link ()
 	    fi
 
 	    # CHECK ME:  I think I busted this.  -Ossama
-	    if test dlprefiles = "$prev"; then
+	    if test "$prev" = dlprefiles; then
 	      # Preload the old-style object.
 	      func_append dlprefiles " $pic_object"
 	      prev=
@@ -7363,23 +5919,23 @@ func_mode_link ()
 
 	    # A PIC object.
 	    func_append libobjs " $pic_object"
-	    arg=$pic_object
-	  }
+	    arg="$pic_object"
+	  fi
 
 	  # Non-PIC object.
-	  if test none != "$non_pic_object"; then
+	  if test "$non_pic_object" != none; then
 	    # Prepend the subdirectory the object is found in.
-	    non_pic_object=$xdir$non_pic_object
+	    non_pic_object="$xdir$non_pic_object"
 
 	    # A standard non-PIC object
 	    func_append non_pic_objects " $non_pic_object"
-	    if test -z "$pic_object" || test none = "$pic_object"; then
-	      arg=$non_pic_object
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
 	    fi
 	  else
 	    # If the PIC object exists, use it instead.
 	    # $xdir was prepended to $pic_object above.
-	    non_pic_object=$pic_object
+	    non_pic_object="$pic_object"
 	    func_append non_pic_objects " $non_pic_object"
 	  fi
 	else
@@ -7387,7 +5943,7 @@ func_mode_link ()
 	  if $opt_dry_run; then
 	    # Extract subdirectory from the argument.
 	    func_dirname "$arg" "/" ""
-	    xdir=$func_dirname_result
+	    xdir="$func_dirname_result"
 
 	    func_lo2o "$arg"
 	    pic_object=$xdir$objdir/$func_lo2o_result
@@ -7395,7 +5951,7 @@ func_mode_link ()
 	    func_append libobjs " $pic_object"
 	    func_append non_pic_objects " $non_pic_object"
 	  else
-	    func_fatal_error "'$arg' is not a valid libtool object"
+	    func_fatal_error "\`$arg' is not a valid libtool object"
 	  fi
 	fi
 	;;
@@ -7411,11 +5967,11 @@ func_mode_link ()
 	# A libtool-controlled library.
 
 	func_resolve_sysroot "$arg"
-	if test dlfiles = "$prev"; then
+	if test "$prev" = dlfiles; then
 	  # This library was specified with -dlopen.
 	  func_append dlfiles " $func_resolve_sysroot_result"
 	  prev=
-	elif test dlprefiles = "$prev"; then
+	elif test "$prev" = dlprefiles; then
 	  # The library was specified with -dlpreopen.
 	  func_append dlprefiles " $func_resolve_sysroot_result"
 	  prev=
@@ -7430,7 +5986,7 @@ func_mode_link ()
 	# Unknown arguments in both finalize_command and compile_command need
 	# to be aesthetically quoted because they are evaled later.
 	func_quote_for_eval "$arg"
-	arg=$func_quote_for_eval_result
+	arg="$func_quote_for_eval_result"
 	;;
       esac # arg
 
@@ -7442,9 +5998,9 @@ func_mode_link ()
     done # argument parsing loop
 
     test -n "$prev" && \
-      func_fatal_help "the '$prevarg' option requires an argument"
+      func_fatal_help "the \`$prevarg' option requires an argument"
 
-    if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
       eval arg=\"$export_dynamic_flag_spec\"
       func_append compile_command " $arg"
       func_append finalize_command " $arg"
@@ -7453,23 +6009,20 @@ func_mode_link ()
     oldlibs=
     # calculate the name of the file, without its directory
     func_basename "$output"
-    outputname=$func_basename_result
-    libobjs_save=$libobjs
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
 
     if test -n "$shlibpath_var"; then
       # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
     else
       shlib_search_path=
     fi
     eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
     eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
 
-    # Definition is injected by LT_CONFIG during libtool generation.
-    func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
-
     func_dirname "$output" "/" ""
-    output_objdir=$func_dirname_result$objdir
+    output_objdir="$func_dirname_result$objdir"
     func_to_tool_file "$output_objdir/"
     tool_output_objdir=$func_to_tool_file_result
     # Create the object directory.
@@ -7492,7 +6045,7 @@ func_mode_link ()
     # Find all interdependent deplibs by searching for libraries
     # that are linked more than once (e.g. -la -lb -la)
     for deplib in $deplibs; do
-      if $opt_preserve_dup_deps; then
+      if $opt_preserve_dup_deps ; then
 	case "$libs " in
 	*" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	esac
@@ -7500,7 +6053,7 @@ func_mode_link ()
       func_append libs " $deplib"
     done
 
-    if test lib = "$linkmode"; then
+    if test "$linkmode" = lib; then
       libs="$predeps $libs $compiler_lib_search_path $postdeps"
 
       # Compute libraries that are listed more than once in $predeps
@@ -7532,7 +6085,7 @@ func_mode_link ()
 	  case $file in
 	  *.la) ;;
 	  *)
-	    func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
+	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
 	    ;;
 	  esac
 	done
@@ -7540,7 +6093,7 @@ func_mode_link ()
     prog)
 	compile_deplibs=
 	finalize_deplibs=
-	alldeplibs=false
+	alldeplibs=no
 	newdlfiles=
 	newdlprefiles=
 	passes="conv scan dlopen dlpreopen link"
@@ -7552,32 +6105,29 @@ func_mode_link ()
     for pass in $passes; do
       # The preopen pass in lib mode reverses $deplibs; put it back here
       # so that -L comes before libs that need it for instance...
-      if test lib,link = "$linkmode,$pass"; then
+      if test "$linkmode,$pass" = "lib,link"; then
 	## FIXME: Find the place where the list is rebuilt in the wrong
 	##        order, and fix it there properly
         tmp_deplibs=
 	for deplib in $deplibs; do
 	  tmp_deplibs="$deplib $tmp_deplibs"
 	done
-	deplibs=$tmp_deplibs
+	deplibs="$tmp_deplibs"
       fi
 
-      if test lib,link = "$linkmode,$pass" ||
-	 test prog,scan = "$linkmode,$pass"; then
-	libs=$deplibs
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
 	deplibs=
       fi
-      if test prog = "$linkmode"; then
+      if test "$linkmode" = prog; then
 	case $pass in
-	dlopen) libs=$dlfiles ;;
-	dlpreopen) libs=$dlprefiles ;;
-	link)
-	  libs="$deplibs %DEPLIBS%"
-	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
-	  ;;
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
 	esac
       fi
-      if test lib,dlpreopen = "$linkmode,$pass"; then
+      if test "$linkmode,$pass" = "lib,dlpreopen"; then
 	# Collect and forward deplibs of preopened libtool libs
 	for lib in $dlprefiles; do
 	  # Ignore non-libtool-libs
@@ -7598,26 +6148,26 @@ func_mode_link ()
 	    esac
 	  done
 	done
-	libs=$dlprefiles
+	libs="$dlprefiles"
       fi
-      if test dlopen = "$pass"; then
+      if test "$pass" = dlopen; then
 	# Collect dlpreopened libraries
-	save_deplibs=$deplibs
+	save_deplibs="$deplibs"
 	deplibs=
       fi
 
       for deplib in $libs; do
 	lib=
-	found=false
+	found=no
 	case $deplib in
 	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
         |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
-	  if test prog,link = "$linkmode,$pass"; then
+	  if test "$linkmode,$pass" = "prog,link"; then
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
 	  else
 	    func_append compiler_flags " $deplib"
-	    if test lib = "$linkmode"; then
+	    if test "$linkmode" = lib ; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
 		    * ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -7627,13 +6177,13 @@ func_mode_link ()
 	  continue
 	  ;;
 	-l*)
-	  if test lib != "$linkmode" && test prog != "$linkmode"; then
-	    func_warning "'-l' is ignored for archives/objects"
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    func_warning "\`-l' is ignored for archives/objects"
 	    continue
 	  fi
 	  func_stripname '-l' '' "$deplib"
 	  name=$func_stripname_result
-	  if test lib = "$linkmode"; then
+	  if test "$linkmode" = lib; then
 	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
 	  else
 	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
@@ -7641,22 +6191,31 @@ func_mode_link ()
 	  for searchdir in $searchdirs; do
 	    for search_ext in .la $std_shrext .so .a; do
 	      # Search the libtool library
-	      lib=$searchdir/lib$name$search_ext
+	      lib="$searchdir/lib${name}${search_ext}"
 	      if test -f "$lib"; then
-		if test .la = "$search_ext"; then
-		  found=:
+		if test "$search_ext" = ".la"; then
+		  found=yes
 		else
-		  found=false
+		  found=no
 		fi
 		break 2
 	      fi
 	    done
 	  done
-	  if $found; then
-	    # deplib is a libtool library
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
 	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
 	    # We need to do some special things here, and not later.
-	    if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 	      case " $predeps $postdeps " in
 	      *" $deplib "*)
 		if func_lalib_p "$lib"; then
@@ -7664,19 +6223,19 @@ func_mode_link ()
 		  old_library=
 		  func_source "$lib"
 		  for l in $old_library $library_names; do
-		    ll=$l
+		    ll="$l"
 		  done
-		  if test "X$ll" = "X$old_library"; then # only static version available
-		    found=false
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
 		    func_dirname "$lib" "" "."
-		    ladir=$func_dirname_result
+		    ladir="$func_dirname_result"
 		    lib=$ladir/$old_library
-		    if test prog,link = "$linkmode,$pass"; then
+		    if test "$linkmode,$pass" = "prog,link"; then
 		      compile_deplibs="$deplib $compile_deplibs"
 		      finalize_deplibs="$deplib $finalize_deplibs"
 		    else
 		      deplibs="$deplib $deplibs"
-		      test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
 		    fi
 		    continue
 		  fi
@@ -7685,25 +6244,15 @@ func_mode_link ()
 	      *) ;;
 	      esac
 	    fi
-	  else
-	    # deplib doesn't seem to be a libtool library
-	    if test prog,link = "$linkmode,$pass"; then
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      deplibs="$deplib $deplibs"
-	      test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
-	    fi
-	    continue
 	  fi
 	  ;; # -l
 	*.ltframework)
-	  if test prog,link = "$linkmode,$pass"; then
+	  if test "$linkmode,$pass" = "prog,link"; then
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
 	  else
 	    deplibs="$deplib $deplibs"
-	    if test lib = "$linkmode"; then
+	    if test "$linkmode" = lib ; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
 		    * ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -7716,18 +6265,18 @@ func_mode_link ()
 	  case $linkmode in
 	  lib)
 	    deplibs="$deplib $deplibs"
-	    test conv = "$pass" && continue
+	    test "$pass" = conv && continue
 	    newdependency_libs="$deplib $newdependency_libs"
 	    func_stripname '-L' '' "$deplib"
 	    func_resolve_sysroot "$func_stripname_result"
 	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  prog)
-	    if test conv = "$pass"; then
+	    if test "$pass" = conv; then
 	      deplibs="$deplib $deplibs"
 	      continue
 	    fi
-	    if test scan = "$pass"; then
+	    if test "$pass" = scan; then
 	      deplibs="$deplib $deplibs"
 	    else
 	      compile_deplibs="$deplib $compile_deplibs"
@@ -7738,13 +6287,13 @@ func_mode_link ()
 	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  *)
-	    func_warning "'-L' is ignored for archives/objects"
+	    func_warning "\`-L' is ignored for archives/objects"
 	    ;;
 	  esac # linkmode
 	  continue
 	  ;; # -L
 	-R*)
-	  if test link = "$pass"; then
+	  if test "$pass" = link; then
 	    func_stripname '-R' '' "$deplib"
 	    func_resolve_sysroot "$func_stripname_result"
 	    dir=$func_resolve_sysroot_result
@@ -7762,7 +6311,7 @@ func_mode_link ()
 	  lib=$func_resolve_sysroot_result
 	  ;;
 	*.$libext)
-	  if test conv = "$pass"; then
+	  if test "$pass" = conv; then
 	    deplibs="$deplib $deplibs"
 	    continue
 	  fi
@@ -7773,26 +6322,21 @@ func_mode_link ()
 	    case " $dlpreconveniencelibs " in
 	    *" $deplib "*) ;;
 	    *)
-	      valid_a_lib=false
+	      valid_a_lib=no
 	      case $deplibs_check_method in
 		match_pattern*)
 		  set dummy $deplibs_check_method; shift
 		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
 		  if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
 		    | $EGREP "$match_pattern_regex" > /dev/null; then
-		    valid_a_lib=:
+		    valid_a_lib=yes
 		  fi
 		;;
 		pass_all)
-		  valid_a_lib=:
+		  valid_a_lib=yes
 		;;
 	      esac
-	      if $valid_a_lib; then
-		echo
-		$ECHO "*** Warning: Linking the shared library $output against the"
-		$ECHO "*** static library $deplib is not portable!"
-		deplibs="$deplib $deplibs"
-	      else
+	      if test "$valid_a_lib" != yes; then
 		echo
 		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
 		echo "*** I have the capability to make that library automatically link in when"
@@ -7800,13 +6344,18 @@ func_mode_link ()
 		echo "*** shared version of the library, which you do not appear to have"
 		echo "*** because the file extensions .$libext of this argument makes me believe"
 		echo "*** that it is just a static archive that I should not use here."
+	      else
+		echo
+		$ECHO "*** Warning: Linking the shared library $output against the"
+		$ECHO "*** static library $deplib is not portable!"
+		deplibs="$deplib $deplibs"
 	      fi
 	      ;;
 	    esac
 	    continue
 	    ;;
 	  prog)
-	    if test link != "$pass"; then
+	    if test "$pass" != link; then
 	      deplibs="$deplib $deplibs"
 	    else
 	      compile_deplibs="$deplib $compile_deplibs"
@@ -7817,10 +6366,10 @@ func_mode_link ()
 	  esac # linkmode
 	  ;; # *.$libext
 	*.lo | *.$objext)
-	  if test conv = "$pass"; then
+	  if test "$pass" = conv; then
 	    deplibs="$deplib $deplibs"
-	  elif test prog = "$linkmode"; then
-	    if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
 	      # If there is no dlopen support or we're linking statically,
 	      # we need to preload.
 	      func_append newdlprefiles " $deplib"
@@ -7833,20 +6382,22 @@ func_mode_link ()
 	  continue
 	  ;;
 	%DEPLIBS%)
-	  alldeplibs=:
+	  alldeplibs=yes
 	  continue
 	  ;;
 	esac # case $deplib
 
-	$found || test -f "$lib" \
-	  || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+	fi
 
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$lib" \
-	  || func_fatal_error "'$lib' is not a valid libtool archive"
+	  || func_fatal_error "\`$lib' is not a valid libtool archive"
 
 	func_dirname "$lib" "" "."
-	ladir=$func_dirname_result
+	ladir="$func_dirname_result"
 
 	dlname=
 	dlopen=
@@ -7876,36 +6427,36 @@ func_mode_link ()
 	  done
 	fi
 	dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-	if test lib,link = "$linkmode,$pass" ||
-	   test prog,scan = "$linkmode,$pass" ||
-	   { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
 	  test -n "$dlopen" && func_append dlfiles " $dlopen"
 	  test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
 	fi
 
-	if test conv = "$pass"; then
+	if test "$pass" = conv; then
 	  # Only check for convenience libraries
 	  deplibs="$lib $deplibs"
 	  if test -z "$libdir"; then
 	    if test -z "$old_library"; then
-	      func_fatal_error "cannot find name of link library for '$lib'"
+	      func_fatal_error "cannot find name of link library for \`$lib'"
 	    fi
 	    # It is a libtool convenience library, so add in its objects.
 	    func_append convenience " $ladir/$objdir/$old_library"
 	    func_append old_convenience " $ladir/$objdir/$old_library"
-	    tmp_libs=
-	    for deplib in $dependency_libs; do
-	      deplibs="$deplib $deplibs"
-	      if $opt_preserve_dup_deps; then
-		case "$tmp_libs " in
-		*" $deplib "*) func_append specialdeplibs " $deplib" ;;
-		esac
-	      fi
-	      func_append tmp_libs " $deplib"
-	    done
-	  elif test prog != "$linkmode" && test lib != "$linkmode"; then
-	    func_fatal_error "'$lib' is not a convenience library"
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    func_fatal_error "\`$lib' is not a convenience library"
 	  fi
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    deplibs="$deplib $deplibs"
+	    if $opt_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+	      esac
+	    fi
+	    func_append tmp_libs " $deplib"
+	  done
 	  continue
 	fi # $pass = conv
 
@@ -7913,26 +6464,26 @@ func_mode_link ()
 	# Get the name of the library we link against.
 	linklib=
 	if test -n "$old_library" &&
-	   { test yes = "$prefer_static_libs" ||
-	     test built,no = "$prefer_static_libs,$installed"; }; then
+	   { test "$prefer_static_libs" = yes ||
+	     test "$prefer_static_libs,$installed" = "built,no"; }; then
 	  linklib=$old_library
 	else
 	  for l in $old_library $library_names; do
-	    linklib=$l
+	    linklib="$l"
 	  done
 	fi
 	if test -z "$linklib"; then
-	  func_fatal_error "cannot find name of link library for '$lib'"
+	  func_fatal_error "cannot find name of link library for \`$lib'"
 	fi
 
 	# This library was specified with -dlopen.
-	if test dlopen = "$pass"; then
-	  test -z "$libdir" \
-	    && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+	  fi
 	  if test -z "$dlname" ||
-	     test yes != "$dlopen_support" ||
-	     test no = "$build_libtool_libs"
-	  then
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
 	    # If there is no dlname, no dlopen support or we're linking
 	    # statically, we need to preload.  We also need to preload any
 	    # dependent libraries so libltdl's deplib preloader doesn't
@@ -7946,40 +6497,40 @@ func_mode_link ()
 
 	# We need an absolute path.
 	case $ladir in
-	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
 	*)
 	  abs_ladir=`cd "$ladir" && pwd`
 	  if test -z "$abs_ladir"; then
-	    func_warning "cannot determine absolute directory name of '$ladir'"
+	    func_warning "cannot determine absolute directory name of \`$ladir'"
 	    func_warning "passing it literally to the linker, although it might fail"
-	    abs_ladir=$ladir
+	    abs_ladir="$ladir"
 	  fi
 	  ;;
 	esac
 	func_basename "$lib"
-	laname=$func_basename_result
+	laname="$func_basename_result"
 
 	# Find the relevant object directory and library name.
-	if test yes = "$installed"; then
+	if test "X$installed" = Xyes; then
 	  if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    func_warning "library '$lib' was moved."
-	    dir=$ladir
-	    absdir=$abs_ladir
-	    libdir=$abs_ladir
+	    func_warning "library \`$lib' was moved."
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
 	  else
-	    dir=$lt_sysroot$libdir
-	    absdir=$lt_sysroot$libdir
+	    dir="$lt_sysroot$libdir"
+	    absdir="$lt_sysroot$libdir"
 	  fi
-	  test yes = "$hardcode_automatic" && avoidtemprpath=yes
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
 	else
 	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    dir=$ladir
-	    absdir=$abs_ladir
+	    dir="$ladir"
+	    absdir="$abs_ladir"
 	    # Remove this search path later
 	    func_append notinst_path " $abs_ladir"
 	  else
-	    dir=$ladir/$objdir
-	    absdir=$abs_ladir/$objdir
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
 	    # Remove this search path later
 	    func_append notinst_path " $abs_ladir"
 	  fi
@@ -7988,11 +6539,11 @@ func_mode_link ()
 	name=$func_stripname_result
 
 	# This library was specified with -dlpreopen.
-	if test dlpreopen = "$pass"; then
-	  if test -z "$libdir" && test prog = "$linkmode"; then
-	    func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir" && test "$linkmode" = prog; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
 	  fi
-	  case $host in
+	  case "$host" in
 	    # special handling for platforms with PE-DLLs.
 	    *cygwin* | *mingw* | *cegcc* )
 	      # Linker will automatically link against shared library if both
@@ -8036,9 +6587,9 @@ func_mode_link ()
 
 	if test -z "$libdir"; then
 	  # Link the convenience library
-	  if test lib = "$linkmode"; then
+	  if test "$linkmode" = lib; then
 	    deplibs="$dir/$old_library $deplibs"
-	  elif test prog,link = "$linkmode,$pass"; then
+	  elif test "$linkmode,$pass" = "prog,link"; then
 	    compile_deplibs="$dir/$old_library $compile_deplibs"
 	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
 	  else
@@ -8048,14 +6599,14 @@ func_mode_link ()
 	fi
 
 
-	if test prog = "$linkmode" && test link != "$pass"; then
+	if test "$linkmode" = prog && test "$pass" != link; then
 	  func_append newlib_search_path " $ladir"
 	  deplibs="$lib $deplibs"
 
-	  linkalldeplibs=false
-	  if test no != "$link_all_deplibs" || test -z "$library_names" ||
-	     test no = "$build_libtool_libs"; then
-	    linkalldeplibs=:
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
 	  fi
 
 	  tmp_libs=
@@ -8067,14 +6618,14 @@ func_mode_link ()
 		 ;;
 	    esac
 	    # Need to link against all dependency_libs?
-	    if $linkalldeplibs; then
+	    if test "$linkalldeplibs" = yes; then
 	      deplibs="$deplib $deplibs"
 	    else
 	      # Need to hardcode shared library paths
 	      # or/and link against static libraries
 	      newdependency_libs="$deplib $newdependency_libs"
 	    fi
-	    if $opt_preserve_dup_deps; then
+	    if $opt_preserve_dup_deps ; then
 	      case "$tmp_libs " in
 	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	      esac
@@ -8084,15 +6635,15 @@ func_mode_link ()
 	  continue
 	fi # $linkmode = prog...
 
-	if test prog,link = "$linkmode,$pass"; then
+	if test "$linkmode,$pass" = "prog,link"; then
 	  if test -n "$library_names" &&
-	     { { test no = "$prefer_static_libs" ||
-	         test built,yes = "$prefer_static_libs,$installed"; } ||
+	     { { test "$prefer_static_libs" = no ||
+	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
 	       test -z "$old_library"; }; then
 	    # We need to hardcode the library path
-	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
 	      # Make sure the rpath contains only unique directories.
-	      case $temp_rpath: in
+	      case "$temp_rpath:" in
 	      *"$absdir:"*) ;;
 	      *) func_append temp_rpath "$absdir:" ;;
 	      esac
@@ -8121,9 +6672,9 @@ func_mode_link ()
 	    esac
 	  fi # $linkmode,$pass = prog,link...
 
-	  if $alldeplibs &&
-	     { test pass_all = "$deplibs_check_method" ||
-	       { test yes = "$build_libtool_libs" &&
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
 		 test -n "$library_names"; }; }; then
 	    # We only need to search for static libraries
 	    continue
@@ -8132,19 +6683,19 @@ func_mode_link ()
 
 	link_static=no # Whether the deplib will be linked statically
 	use_static_libs=$prefer_static_libs
-	if test built = "$use_static_libs" && test yes = "$installed"; then
+	if test "$use_static_libs" = built && test "$installed" = yes; then
 	  use_static_libs=no
 	fi
 	if test -n "$library_names" &&
-	   { test no = "$use_static_libs" || test -z "$old_library"; }; then
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
 	  case $host in
-	  *cygwin* | *mingw* | *cegcc* | *os2*)
+	  *cygwin* | *mingw* | *cegcc*)
 	      # No point in relinking DLLs because paths are not encoded
 	      func_append notinst_deplibs " $lib"
 	      need_relink=no
 	    ;;
 	  *)
-	    if test no = "$installed"; then
+	    if test "$installed" = no; then
 	      func_append notinst_deplibs " $lib"
 	      need_relink=yes
 	    fi
@@ -8154,24 +6705,24 @@ func_mode_link ()
 
 	  # Warn about portability, can't link against -module's on some
 	  # systems (darwin).  Don't bleat about dlopened modules though!
-	  dlopenmodule=
+	  dlopenmodule=""
 	  for dlpremoduletest in $dlprefiles; do
 	    if test "X$dlpremoduletest" = "X$lib"; then
-	      dlopenmodule=$dlpremoduletest
+	      dlopenmodule="$dlpremoduletest"
 	      break
 	    fi
 	  done
-	  if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
 	    echo
-	    if test prog = "$linkmode"; then
+	    if test "$linkmode" = prog; then
 	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
 	    else
 	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
 	    fi
 	    $ECHO "*** $linklib is not portable!"
 	  fi
-	  if test lib = "$linkmode" &&
-	     test yes = "$hardcode_into_libs"; then
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
 	    # Hardcode the library path.
 	    # Skip directories that are in the system default run-time
 	    # search path.
@@ -8199,43 +6750,43 @@ func_mode_link ()
 	    # figure out the soname
 	    set dummy $library_names
 	    shift
-	    realname=$1
+	    realname="$1"
 	    shift
 	    libname=`eval "\\$ECHO \"$libname_spec\""`
 	    # use dlname if we got it. it's perfectly good, no?
 	    if test -n "$dlname"; then
-	      soname=$dlname
+	      soname="$dlname"
 	    elif test -n "$soname_spec"; then
 	      # bleh windows
 	      case $host in
-	      *cygwin* | mingw* | *cegcc* | *os2*)
+	      *cygwin* | mingw* | *cegcc*)
 	        func_arith $current - $age
 		major=$func_arith_result
-		versuffix=-$major
+		versuffix="-$major"
 		;;
 	      esac
 	      eval soname=\"$soname_spec\"
 	    else
-	      soname=$realname
+	      soname="$realname"
 	    fi
 
 	    # Make a new name for the extract_expsyms_cmds to use
-	    soroot=$soname
+	    soroot="$soname"
 	    func_basename "$soroot"
-	    soname=$func_basename_result
+	    soname="$func_basename_result"
 	    func_stripname 'lib' '.dll' "$soname"
 	    newlib=libimp-$func_stripname_result.a
 
 	    # If the library has no export list, then create one now
 	    if test -f "$output_objdir/$soname-def"; then :
 	    else
-	      func_verbose "extracting exported symbol list from '$soname'"
+	      func_verbose "extracting exported symbol list from \`$soname'"
 	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
 	    fi
 
 	    # Create $newlib
 	    if test -f "$output_objdir/$newlib"; then :; else
-	      func_verbose "generating import library for '$soname'"
+	      func_verbose "generating import library for \`$soname'"
 	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
 	    fi
 	    # make sure the library variables are pointing to the new library
@@ -8243,58 +6794,58 @@ func_mode_link ()
 	    linklib=$newlib
 	  fi # test -n "$old_archive_from_expsyms_cmds"
 
-	  if test prog = "$linkmode" || test relink != "$opt_mode"; then
+	  if test "$linkmode" = prog || test "$opt_mode" != relink; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
 	    lib_linked=yes
 	    case $hardcode_action in
 	    immediate | unsupported)
-	      if test no = "$hardcode_direct"; then
-		add=$dir/$linklib
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
 		case $host in
-		  *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
-		  *-*-sysv4*uw2*) add_dir=-L$dir ;;
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
 		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
-		    *-*-unixware7*) add_dir=-L$dir ;;
+		    *-*-unixware7*) add_dir="-L$dir" ;;
 		  *-*-darwin* )
-		    # if the lib is a (non-dlopened) module then we cannot
+		    # if the lib is a (non-dlopened) module then we can not
 		    # link against it, someone is ignoring the earlier warnings
 		    if /usr/bin/file -L $add 2> /dev/null |
-			 $GREP ": [^:]* bundle" >/dev/null; then
+			 $GREP ": [^:]* bundle" >/dev/null ; then
 		      if test "X$dlopenmodule" != "X$lib"; then
 			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
-			if test -z "$old_library"; then
+			if test -z "$old_library" ; then
 			  echo
 			  echo "*** And there doesn't seem to be a static archive available"
 			  echo "*** The link will probably fail, sorry"
 			else
-			  add=$dir/$old_library
+			  add="$dir/$old_library"
 			fi
 		      elif test -n "$old_library"; then
-			add=$dir/$old_library
+			add="$dir/$old_library"
 		      fi
 		    fi
 		esac
-	      elif test no = "$hardcode_minus_L"; then
+	      elif test "$hardcode_minus_L" = no; then
 		case $host in
-		*-*-sunos*) add_shlibpath=$dir ;;
+		*-*-sunos*) add_shlibpath="$dir" ;;
 		esac
-		add_dir=-L$dir
-		add=-l$name
-	      elif test no = "$hardcode_shlibpath_var"; then
-		add_shlibpath=$dir
-		add=-l$name
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
 	      else
 		lib_linked=no
 	      fi
 	      ;;
 	    relink)
-	      if test yes = "$hardcode_direct" &&
-	         test no = "$hardcode_direct_absolute"; then
-		add=$dir/$linklib
-	      elif test yes = "$hardcode_minus_L"; then
-		add_dir=-L$absdir
+	      if test "$hardcode_direct" = yes &&
+	         test "$hardcode_direct_absolute" = no; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$absdir"
 		# Try looking first in the location we're being installed to.
 		if test -n "$inst_prefix_dir"; then
 		  case $libdir in
@@ -8303,10 +6854,10 @@ func_mode_link ()
 		      ;;
 		  esac
 		fi
-		add=-l$name
-	      elif test yes = "$hardcode_shlibpath_var"; then
-		add_shlibpath=$dir
-		add=-l$name
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
 	      else
 		lib_linked=no
 	      fi
@@ -8314,7 +6865,7 @@ func_mode_link ()
 	    *) lib_linked=no ;;
 	    esac
 
-	    if test yes != "$lib_linked"; then
+	    if test "$lib_linked" != yes; then
 	      func_fatal_configuration "unsupported hardcode properties"
 	    fi
 
@@ -8324,15 +6875,15 @@ func_mode_link ()
 	      *) func_append compile_shlibpath "$add_shlibpath:" ;;
 	      esac
 	    fi
-	    if test prog = "$linkmode"; then
+	    if test "$linkmode" = prog; then
 	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
 	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
 	    else
 	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
 	      test -n "$add" && deplibs="$add $deplibs"
-	      if test yes != "$hardcode_direct" &&
-		 test yes != "$hardcode_minus_L" &&
-		 test yes = "$hardcode_shlibpath_var"; then
+	      if test "$hardcode_direct" != yes &&
+		 test "$hardcode_minus_L" != yes &&
+		 test "$hardcode_shlibpath_var" = yes; then
 		case :$finalize_shlibpath: in
 		*":$libdir:"*) ;;
 		*) func_append finalize_shlibpath "$libdir:" ;;
@@ -8341,33 +6892,33 @@ func_mode_link ()
 	    fi
 	  fi
 
-	  if test prog = "$linkmode" || test relink = "$opt_mode"; then
+	  if test "$linkmode" = prog || test "$opt_mode" = relink; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
 	    # Finalize command for both is simple: just hardcode it.
-	    if test yes = "$hardcode_direct" &&
-	       test no = "$hardcode_direct_absolute"; then
-	      add=$libdir/$linklib
-	    elif test yes = "$hardcode_minus_L"; then
-	      add_dir=-L$libdir
-	      add=-l$name
-	    elif test yes = "$hardcode_shlibpath_var"; then
+	    if test "$hardcode_direct" = yes &&
+	       test "$hardcode_direct_absolute" = no; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
 	      case :$finalize_shlibpath: in
 	      *":$libdir:"*) ;;
 	      *) func_append finalize_shlibpath "$libdir:" ;;
 	      esac
-	      add=-l$name
-	    elif test yes = "$hardcode_automatic"; then
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
 	      if test -n "$inst_prefix_dir" &&
-		 test -f "$inst_prefix_dir$libdir/$linklib"; then
-		add=$inst_prefix_dir$libdir/$linklib
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+		add="$inst_prefix_dir$libdir/$linklib"
 	      else
-		add=$libdir/$linklib
+		add="$libdir/$linklib"
 	      fi
 	    else
 	      # We cannot seem to hardcode it, guess we'll fake it.
-	      add_dir=-L$libdir
+	      add_dir="-L$libdir"
 	      # Try looking first in the location we're being installed to.
 	      if test -n "$inst_prefix_dir"; then
 		case $libdir in
@@ -8376,10 +6927,10 @@ func_mode_link ()
 		    ;;
 		esac
 	      fi
-	      add=-l$name
+	      add="-l$name"
 	    fi
 
-	    if test prog = "$linkmode"; then
+	    if test "$linkmode" = prog; then
 	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
 	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
 	    else
@@ -8387,43 +6938,43 @@ func_mode_link ()
 	      test -n "$add" && deplibs="$add $deplibs"
 	    fi
 	  fi
-	elif test prog = "$linkmode"; then
+	elif test "$linkmode" = prog; then
 	  # Here we assume that one of hardcode_direct or hardcode_minus_L
 	  # is not unsupported.  This is valid on all known static and
 	  # shared platforms.
-	  if test unsupported != "$hardcode_direct"; then
-	    test -n "$old_library" && linklib=$old_library
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
 	    compile_deplibs="$dir/$linklib $compile_deplibs"
 	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
 	  else
 	    compile_deplibs="-l$name -L$dir $compile_deplibs"
 	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
 	  fi
-	elif test yes = "$build_libtool_libs"; then
+	elif test "$build_libtool_libs" = yes; then
 	  # Not a shared library
-	  if test pass_all != "$deplibs_check_method"; then
+	  if test "$deplibs_check_method" != pass_all; then
 	    # We're trying link a shared library against a static one
 	    # but the system doesn't support it.
 
 	    # Just print a warning and add the library to dependency_libs so
 	    # that the program can be linked against the static library.
 	    echo
-	    $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
 	    echo "*** I have the capability to make that library automatically link in when"
 	    echo "*** you link to this library.  But I can only do this if you have a"
 	    echo "*** shared version of the library, which you do not appear to have."
-	    if test yes = "$module"; then
+	    if test "$module" = yes; then
 	      echo "*** But as you try to build a module library, libtool will still create "
 	      echo "*** a static module, that should work as long as the dlopening application"
 	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
 	      if test -z "$global_symbol_pipe"; then
 		echo
 		echo "*** However, this would only work if libtool was able to extract symbol"
-		echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
 		echo "*** not find such a program.  So, this module is probably useless."
-		echo "*** 'nm' from GNU binutils and a full rebuild may help."
+		echo "*** \`nm' from GNU binutils and a full rebuild may help."
 	      fi
-	      if test no = "$build_old_libs"; then
+	      if test "$build_old_libs" = no; then
 		build_libtool_libs=module
 		build_old_libs=yes
 	      else
@@ -8436,11 +6987,11 @@ func_mode_link ()
 	  fi
 	fi # link shared/static library?
 
-	if test lib = "$linkmode"; then
+	if test "$linkmode" = lib; then
 	  if test -n "$dependency_libs" &&
-	     { test yes != "$hardcode_into_libs" ||
-	       test yes = "$build_old_libs" ||
-	       test yes = "$link_static"; }; then
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
 	    # Extract -R from dependency_libs
 	    temp_deplibs=
 	    for libdir in $dependency_libs; do
@@ -8454,12 +7005,12 @@ func_mode_link ()
 	      *) func_append temp_deplibs " $libdir";;
 	      esac
 	    done
-	    dependency_libs=$temp_deplibs
+	    dependency_libs="$temp_deplibs"
 	  fi
 
 	  func_append newlib_search_path " $absdir"
 	  # Link against this library
-	  test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
 	  # ... and its dependency_libs
 	  tmp_libs=
 	  for deplib in $dependency_libs; do
@@ -8469,7 +7020,7 @@ func_mode_link ()
                    func_resolve_sysroot "$func_stripname_result";;
               *) func_resolve_sysroot "$deplib" ;;
             esac
-	    if $opt_preserve_dup_deps; then
+	    if $opt_preserve_dup_deps ; then
 	      case "$tmp_libs " in
 	      *" $func_resolve_sysroot_result "*)
                 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
@@ -8478,12 +7029,12 @@ func_mode_link ()
 	    func_append tmp_libs " $func_resolve_sysroot_result"
 	  done
 
-	  if test no != "$link_all_deplibs"; then
+	  if test "$link_all_deplibs" != no; then
 	    # Add the search paths of all dependency libraries
 	    for deplib in $dependency_libs; do
 	      path=
 	      case $deplib in
-	      -L*) path=$deplib ;;
+	      -L*) path="$deplib" ;;
 	      *.la)
 	        func_resolve_sysroot "$deplib"
 	        deplib=$func_resolve_sysroot_result
@@ -8491,12 +7042,12 @@ func_mode_link ()
 		dir=$func_dirname_result
 		# We need an absolute path.
 		case $dir in
-		[\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
 		*)
 		  absdir=`cd "$dir" && pwd`
 		  if test -z "$absdir"; then
-		    func_warning "cannot determine absolute directory name of '$dir'"
-		    absdir=$dir
+		    func_warning "cannot determine absolute directory name of \`$dir'"
+		    absdir="$dir"
 		  fi
 		  ;;
 		esac
@@ -8504,35 +7055,35 @@ func_mode_link ()
 		case $host in
 		*-*-darwin*)
 		  depdepl=
-		  eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-		  if test -n "$deplibrary_names"; then
-		    for tmp in $deplibrary_names; do
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
 		      depdepl=$tmp
 		    done
-		    if test -f "$absdir/$objdir/$depdepl"; then
-		      depdepl=$absdir/$objdir/$depdepl
-		      darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+		    if test -f "$absdir/$objdir/$depdepl" ; then
+		      depdepl="$absdir/$objdir/$depdepl"
+		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
                       if test -z "$darwin_install_name"; then
-                          darwin_install_name=`$OTOOL64 -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
                       fi
-		      func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
-		      func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
+		      func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
 		      path=
 		    fi
 		  fi
 		  ;;
 		*)
-		  path=-L$absdir/$objdir
+		  path="-L$absdir/$objdir"
 		  ;;
 		esac
 		else
-		  eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 		  test -z "$libdir" && \
-		    func_fatal_error "'$deplib' is not a valid libtool archive"
+		    func_fatal_error "\`$deplib' is not a valid libtool archive"
 		  test "$absdir" != "$libdir" && \
-		    func_warning "'$deplib' seems to be moved"
+		    func_warning "\`$deplib' seems to be moved"
 
-		  path=-L$absdir
+		  path="-L$absdir"
 		fi
 		;;
 	      esac
@@ -8544,23 +7095,23 @@ func_mode_link ()
 	  fi # link_all_deplibs != no
 	fi # linkmode = lib
       done # for deplib in $libs
-      if test link = "$pass"; then
-	if test prog = "$linkmode"; then
+      if test "$pass" = link; then
+	if test "$linkmode" = "prog"; then
 	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
 	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
 	else
 	  compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
 	fi
       fi
-      dependency_libs=$newdependency_libs
-      if test dlpreopen = "$pass"; then
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
 	# Link the dlpreopened libraries before other libraries
 	for deplib in $save_deplibs; do
 	  deplibs="$deplib $deplibs"
 	done
       fi
-      if test dlopen != "$pass"; then
-	test conv = "$pass" || {
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
 	  # Make sure lib_search_path contains only unique directories.
 	  lib_search_path=
 	  for dir in $newlib_search_path; do
@@ -8570,12 +7121,12 @@ func_mode_link ()
 	    esac
 	  done
 	  newlib_search_path=
-	}
+	fi
 
-	if test prog,link = "$linkmode,$pass"; then
-	  vars="compile_deplibs finalize_deplibs"
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
 	else
-	  vars=deplibs
+	  vars="compile_deplibs finalize_deplibs"
 	fi
 	for var in $vars dependency_libs; do
 	  # Add libraries to $var in reverse order
@@ -8633,93 +7184,62 @@ func_mode_link ()
 	  eval $var=\"$tmp_libs\"
 	done # for var
       fi
-
-      # Add Sun CC postdeps if required:
-      test CXX = "$tagname" && {
-        case $host_os in
-        linux*)
-          case `$CC -V 2>&1 | sed 5q` in
-          *Sun\ C*) # Sun C++ 5.9
-            func_suncc_cstd_abi
-
-            if test no != "$suncc_use_cstd_abi"; then
-              func_append postdeps ' -library=Cstd -library=Crun'
-            fi
-            ;;
-          esac
-          ;;
-
-        solaris*)
-          func_cc_basename "$CC"
-          case $func_cc_basename_result in
-          CC* | sunCC*)
-            func_suncc_cstd_abi
-
-            if test no != "$suncc_use_cstd_abi"; then
-              func_append postdeps ' -library=Cstd -library=Crun'
-            fi
-            ;;
-          esac
-          ;;
-        esac
-      }
-
       # Last step: remove runtime libs from dependency_libs
       # (they stay in deplibs)
       tmp_libs=
-      for i in $dependency_libs; do
+      for i in $dependency_libs ; do
 	case " $predeps $postdeps $compiler_lib_search_path " in
 	*" $i "*)
-	  i=
+	  i=""
 	  ;;
 	esac
-	if test -n "$i"; then
+	if test -n "$i" ; then
 	  func_append tmp_libs " $i"
 	fi
       done
       dependency_libs=$tmp_libs
     done # for pass
-    if test prog = "$linkmode"; then
-      dlfiles=$newdlfiles
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
     fi
-    if test prog = "$linkmode" || test lib = "$linkmode"; then
-      dlprefiles=$newdlprefiles
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
     fi
 
     case $linkmode in
     oldlib)
-      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
-	func_warning "'-dlopen' is ignored for archives"
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for archives"
       fi
 
       case " $deplibs" in
       *\ -l* | *\ -L*)
-	func_warning "'-l' and '-L' are ignored for archives" ;;
+	func_warning "\`-l' and \`-L' are ignored for archives" ;;
       esac
 
       test -n "$rpath" && \
-	func_warning "'-rpath' is ignored for archives"
+	func_warning "\`-rpath' is ignored for archives"
 
       test -n "$xrpath" && \
-	func_warning "'-R' is ignored for archives"
+	func_warning "\`-R' is ignored for archives"
 
       test -n "$vinfo" && \
-	func_warning "'-version-info/-version-number' is ignored for archives"
+	func_warning "\`-version-info/-version-number' is ignored for archives"
 
       test -n "$release" && \
-	func_warning "'-release' is ignored for archives"
+	func_warning "\`-release' is ignored for archives"
 
       test -n "$export_symbols$export_symbols_regex" && \
-	func_warning "'-export-symbols' is ignored for archives"
+	func_warning "\`-export-symbols' is ignored for archives"
 
       # Now set the variables for building old libraries.
       build_libtool_libs=no
-      oldlibs=$output
+      oldlibs="$output"
       func_append objs "$old_deplibs"
       ;;
 
     lib)
-      # Make sure we only generate libraries of the form 'libNAME.la'.
+      # Make sure we only generate libraries of the form `libNAME.la'.
       case $outputname in
       lib*)
 	func_stripname 'lib' '.la' "$outputname"
@@ -8728,10 +7248,10 @@ func_mode_link ()
 	eval libname=\"$libname_spec\"
 	;;
       *)
-	test no = "$module" \
-	  && func_fatal_help "libtool library '$output' must begin with 'lib'"
+	test "$module" = no && \
+	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
 
-	if test no != "$need_lib_prefix"; then
+	if test "$need_lib_prefix" != no; then
 	  # Add the "lib" prefix for modules if required
 	  func_stripname '' '.la' "$outputname"
 	  name=$func_stripname_result
@@ -8745,8 +7265,8 @@ func_mode_link ()
       esac
 
       if test -n "$objs"; then
-	if test pass_all != "$deplibs_check_method"; then
-	  func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
+	if test "$deplibs_check_method" != pass_all; then
+	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
 	else
 	  echo
 	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
@@ -8755,21 +7275,21 @@ func_mode_link ()
 	fi
       fi
 
-      test no = "$dlself" \
-	|| func_warning "'-dlopen self' is ignored for libtool libraries"
+      test "$dlself" != no && \
+	func_warning "\`-dlopen self' is ignored for libtool libraries"
 
       set dummy $rpath
       shift
-      test 1 -lt "$#" \
-	&& func_warning "ignoring multiple '-rpath's for a libtool library"
+      test "$#" -gt 1 && \
+	func_warning "ignoring multiple \`-rpath's for a libtool library"
 
-      install_libdir=$1
+      install_libdir="$1"
 
       oldlibs=
       if test -z "$rpath"; then
-	if test yes = "$build_libtool_libs"; then
+	if test "$build_libtool_libs" = yes; then
 	  # Building a libtool convenience library.
-	  # Some compilers have problems with a '.al' extension so
+	  # Some compilers have problems with a `.al' extension so
 	  # convenience libraries should have the same extension an
 	  # archive normally would.
 	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
@@ -8778,20 +7298,20 @@ func_mode_link ()
 	fi
 
 	test -n "$vinfo" && \
-	  func_warning "'-version-info/-version-number' is ignored for convenience libraries"
+	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
 
 	test -n "$release" && \
-	  func_warning "'-release' is ignored for convenience libraries"
+	  func_warning "\`-release' is ignored for convenience libraries"
       else
 
 	# Parse the version information argument.
-	save_ifs=$IFS; IFS=:
+	save_ifs="$IFS"; IFS=':'
 	set dummy $vinfo 0 0 0
 	shift
-	IFS=$save_ifs
+	IFS="$save_ifs"
 
 	test -n "$7" && \
-	  func_fatal_help "too many parameters to '-version-info'"
+	  func_fatal_help "too many parameters to \`-version-info'"
 
 	# convert absolute version numbers to libtool ages
 	# this retains compatibility with .la files and attempts
@@ -8799,45 +7319,42 @@ func_mode_link ()
 
 	case $vinfo_number in
 	yes)
-	  number_major=$1
-	  number_minor=$2
-	  number_revision=$3
+	  number_major="$1"
+	  number_minor="$2"
+	  number_revision="$3"
 	  #
 	  # There are really only two kinds -- those that
 	  # use the current revision as the major version
 	  # and those that subtract age and use age as
 	  # a minor version.  But, then there is irix
-	  # that has an extra 1 added just for fun
+	  # which has an extra 1 added just for fun
 	  #
 	  case $version_type in
 	  # correct linux to gnu/linux during the next big refactor
-	  darwin|freebsd-elf|linux|osf|windows|none)
+	  darwin|linux|osf|windows|none)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
-	    age=$number_minor
-	    revision=$number_revision
+	    age="$number_minor"
+	    revision="$number_revision"
 	    ;;
-	  freebsd-aout|qnx|sunos)
-	    current=$number_major
-	    revision=$number_minor
-	    age=0
+	  freebsd-aout|freebsd-elf|qnx|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
 	    ;;
 	  irix|nonstopux)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
-	    age=$number_minor
-	    revision=$number_minor
+	    age="$number_minor"
+	    revision="$number_minor"
 	    lt_irix_increment=no
 	    ;;
-	  *)
-	    func_fatal_configuration "$modename: unknown library version type '$version_type'"
-	    ;;
 	  esac
 	  ;;
 	no)
-	  current=$1
-	  revision=$2
-	  age=$3
+	  current="$1"
+	  revision="$2"
+	  age="$3"
 	  ;;
 	esac
 
@@ -8845,30 +7362,30 @@ func_mode_link ()
 	case $current in
 	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  func_error "CURRENT '$current' must be a nonnegative integer"
-	  func_fatal_error "'$vinfo' is not valid version information"
+	  func_error "CURRENT \`$current' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
 	  ;;
 	esac
 
 	case $revision in
 	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  func_error "REVISION '$revision' must be a nonnegative integer"
-	  func_fatal_error "'$vinfo' is not valid version information"
+	  func_error "REVISION \`$revision' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
 	  ;;
 	esac
 
 	case $age in
 	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  func_error "AGE '$age' must be a nonnegative integer"
-	  func_fatal_error "'$vinfo' is not valid version information"
+	  func_error "AGE \`$age' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
 	  ;;
 	esac
 
 	if test "$age" -gt "$current"; then
-	  func_error "AGE '$age' is greater than the current interface number '$current'"
-	  func_fatal_error "'$vinfo' is not valid version information"
+	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
+	  func_fatal_error "\`$vinfo' is not valid version information"
 	fi
 
 	# Calculate the version variables.
@@ -8883,36 +7400,26 @@ func_mode_link ()
 	  # verstring for coding it into the library header
 	  func_arith $current - $age
 	  major=.$func_arith_result
-	  versuffix=$major.$age.$revision
+	  versuffix="$major.$age.$revision"
 	  # Darwin ld doesn't like 0 for these options...
 	  func_arith $current + 1
 	  minor_current=$func_arith_result
-	  xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
-          # On Darwin other compilers
-          case $CC in
-              nagfor*)
-                  verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
-                  ;;
-              *)
-                  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
-                  ;;
-          esac
 	  ;;
 
 	freebsd-aout)
-	  major=.$current
-	  versuffix=.$current.$revision
+	  major=".$current"
+	  versuffix=".$current.$revision";
 	  ;;
 
 	freebsd-elf)
-	  func_arith $current - $age
-	  major=.$func_arith_result
-	  versuffix=$major.$age.$revision
+	  major=".$current"
+	  versuffix=".$current"
 	  ;;
 
 	irix | nonstopux)
-	  if test no = "$lt_irix_increment"; then
+	  if test "X$lt_irix_increment" = "Xno"; then
 	    func_arith $current - $age
 	  else
 	    func_arith $current - $age + 1
@@ -8923,74 +7430,69 @@ func_mode_link ()
 	    nonstopux) verstring_prefix=nonstopux ;;
 	    *)         verstring_prefix=sgi ;;
 	  esac
-	  verstring=$verstring_prefix$major.$revision
+	  verstring="$verstring_prefix$major.$revision"
 
 	  # Add in all the interfaces that we are compatible with.
 	  loop=$revision
-	  while test 0 -ne "$loop"; do
+	  while test "$loop" -ne 0; do
 	    func_arith $revision - $loop
 	    iface=$func_arith_result
 	    func_arith $loop - 1
 	    loop=$func_arith_result
-	    verstring=$verstring_prefix$major.$iface:$verstring
+	    verstring="$verstring_prefix$major.$iface:$verstring"
 	  done
 
-	  # Before this point, $major must not contain '.'.
+	  # Before this point, $major must not contain `.'.
 	  major=.$major
-	  versuffix=$major.$revision
+	  versuffix="$major.$revision"
 	  ;;
 
 	linux) # correct to gnu/linux during the next big refactor
 	  func_arith $current - $age
 	  major=.$func_arith_result
-	  versuffix=$major.$age.$revision
+	  versuffix="$major.$age.$revision"
 	  ;;
 
 	osf)
 	  func_arith $current - $age
 	  major=.$func_arith_result
-	  versuffix=.$current.$age.$revision
-	  verstring=$current.$age.$revision
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
 
 	  # Add in all the interfaces that we are compatible with.
 	  loop=$age
-	  while test 0 -ne "$loop"; do
+	  while test "$loop" -ne 0; do
 	    func_arith $current - $loop
 	    iface=$func_arith_result
 	    func_arith $loop - 1
 	    loop=$func_arith_result
-	    verstring=$verstring:$iface.0
+	    verstring="$verstring:${iface}.0"
 	  done
 
 	  # Make executables depend on our current version.
-	  func_append verstring ":$current.0"
+	  func_append verstring ":${current}.0"
 	  ;;
 
 	qnx)
-	  major=.$current
-	  versuffix=.$current
-	  ;;
-
-	sco)
-	  major=.$current
-	  versuffix=.$current
+	  major=".$current"
+	  versuffix=".$current"
 	  ;;
 
 	sunos)
-	  major=.$current
-	  versuffix=.$current.$revision
+	  major=".$current"
+	  versuffix=".$current.$revision"
 	  ;;
 
 	windows)
 	  # Use '-' rather than '.', since we only want one
-	  # extension on DOS 8.3 file systems.
+	  # extension on DOS 8.3 filesystems.
 	  func_arith $current - $age
 	  major=$func_arith_result
-	  versuffix=-$major
+	  versuffix="-$major"
 	  ;;
 
 	*)
-	  func_fatal_configuration "unknown library version type '$version_type'"
+	  func_fatal_configuration "unknown library version type \`$version_type'"
 	  ;;
 	esac
 
@@ -9004,45 +7506,42 @@ func_mode_link ()
 	    verstring=
 	    ;;
 	  *)
-	    verstring=0.0
+	    verstring="0.0"
 	    ;;
 	  esac
-	  if test no = "$need_version"; then
+	  if test "$need_version" = no; then
 	    versuffix=
 	  else
-	    versuffix=.0.0
+	    versuffix=".0.0"
 	  fi
 	fi
 
 	# Remove version info from name if versioning should be avoided
-	if test yes,no = "$avoid_version,$need_version"; then
+	if test "$avoid_version" = yes && test "$need_version" = no; then
 	  major=
 	  versuffix=
-	  verstring=
+	  verstring=""
 	fi
 
 	# Check to see if the archive will have undefined symbols.
-	if test yes = "$allow_undefined"; then
-	  if test unsupported = "$allow_undefined_flag"; then
-	    if test yes = "$build_old_libs"; then
-	      func_warning "undefined symbols not allowed in $host shared libraries; building static only"
-	      build_libtool_libs=no
-	    else
-	      func_fatal_error "can't build $host shared library unless -no-undefined is specified"
-	    fi
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    func_warning "undefined symbols not allowed in $host shared libraries"
+	    build_libtool_libs=no
+	    build_old_libs=yes
 	  fi
 	else
 	  # Don't allow undefined symbols.
-	  allow_undefined_flag=$no_undefined_flag
+	  allow_undefined_flag="$no_undefined_flag"
 	fi
 
       fi
 
-      func_generate_dlsyms "$libname" "$libname" :
+      func_generate_dlsyms "$libname" "$libname" "yes"
       func_append libobjs " $symfileobj"
-      test " " = "$libobjs" && libobjs=
+      test "X$libobjs" = "X " && libobjs=
 
-      if test relink != "$opt_mode"; then
+      if test "$opt_mode" != relink; then
 	# Remove our outputs, but don't remove object files since they
 	# may have been created when compiling PIC objects.
 	removelist=
@@ -9051,8 +7550,8 @@ func_mode_link ()
 	  case $p in
 	    *.$objext | *.gcno)
 	       ;;
-	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
-	       if test -n "$precious_files_regex"; then
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
 		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
 		 then
 		   continue
@@ -9068,11 +7567,11 @@ func_mode_link ()
       fi
 
       # Now set the variables for building old libraries.
-      if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
 	func_append oldlibs " $output_objdir/$libname.$libext"
 
 	# Transform .lo files to .o files.
-	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
+	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
       fi
 
       # Eliminate all temporary directories.
@@ -9093,13 +7592,13 @@ func_mode_link ()
 	  *) func_append finalize_rpath " $libdir" ;;
 	  esac
 	done
-	if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
 	  dependency_libs="$temp_xrpath $dependency_libs"
 	fi
       fi
 
       # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles=$dlfiles
+      old_dlfiles="$dlfiles"
       dlfiles=
       for lib in $old_dlfiles; do
 	case " $dlprefiles $dlfiles " in
@@ -9109,7 +7608,7 @@ func_mode_link ()
       done
 
       # Make sure dlprefiles contains only unique files
-      old_dlprefiles=$dlprefiles
+      old_dlprefiles="$dlprefiles"
       dlprefiles=
       for lib in $old_dlprefiles; do
 	case "$dlprefiles " in
@@ -9118,7 +7617,7 @@ func_mode_link ()
 	esac
       done
 
-      if test yes = "$build_libtool_libs"; then
+      if test "$build_libtool_libs" = yes; then
 	if test -n "$rpath"; then
 	  case $host in
 	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
@@ -9142,7 +7641,7 @@ func_mode_link ()
 	    ;;
 	  *)
 	    # Add libc to deplibs on all other systems if necessary.
-	    if test yes = "$build_libtool_need_lc"; then
+	    if test "$build_libtool_need_lc" = "yes"; then
 	      func_append deplibs " -lc"
 	    fi
 	    ;;
@@ -9158,9 +7657,9 @@ func_mode_link ()
 	# I'm not sure if I'm treating the release correctly.  I think
 	# release should show up in the -l (ie -lgmp5) so we don't want to
 	# add it in twice.  Is that correct?
-	release=
-	versuffix=
-	major=
+	release=""
+	versuffix=""
+	major=""
 	newdeplibs=
 	droppeddeps=no
 	case $deplibs_check_method in
@@ -9189,20 +7688,20 @@ EOF
 	      -l*)
 		func_stripname -l '' "$i"
 		name=$func_stripname_result
-		if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		  case " $predeps $postdeps " in
 		  *" $i "*)
 		    func_append newdeplibs " $i"
-		    i=
+		    i=""
 		    ;;
 		  esac
 		fi
-		if test -n "$i"; then
+		if test -n "$i" ; then
 		  libname=`eval "\\$ECHO \"$libname_spec\""`
 		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
 		  set dummy $deplib_matches; shift
 		  deplib_match=$1
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
 		    func_append newdeplibs " $i"
 		  else
 		    droppeddeps=yes
@@ -9232,20 +7731,20 @@ EOF
 		$opt_dry_run || $RM conftest
 		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
 		  ldd_output=`ldd conftest`
-		  if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		    case " $predeps $postdeps " in
 		    *" $i "*)
 		      func_append newdeplibs " $i"
-		      i=
+		      i=""
 		      ;;
 		    esac
 		  fi
-		  if test -n "$i"; then
+		  if test -n "$i" ; then
 		    libname=`eval "\\$ECHO \"$libname_spec\""`
 		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
 		    set dummy $deplib_matches; shift
 		    deplib_match=$1
-		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
 		      func_append newdeplibs " $i"
 		    else
 		      droppeddeps=yes
@@ -9282,24 +7781,24 @@ EOF
 	    -l*)
 	      func_stripname -l '' "$a_deplib"
 	      name=$func_stripname_result
-	      if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
 		  func_append newdeplibs " $a_deplib"
-		  a_deplib=
+		  a_deplib=""
 		  ;;
 		esac
 	      fi
-	      if test -n "$a_deplib"; then
+	      if test -n "$a_deplib" ; then
 		libname=`eval "\\$ECHO \"$libname_spec\""`
 		if test -n "$file_magic_glob"; then
 		  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
 		else
 		  libnameglob=$libname
 		fi
-		test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
+		test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
 		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  if test yes = "$want_nocaseglob"; then
+		  if test "$want_nocaseglob" = yes; then
 		    shopt -s nocaseglob
 		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
 		    $nocaseglob
@@ -9317,25 +7816,25 @@ EOF
 		      # We might still enter an endless loop, since a link
 		      # loop can be closed while we follow links,
 		      # but so what?
-		      potlib=$potent_lib
+		      potlib="$potent_lib"
 		      while test -h "$potlib" 2>/dev/null; do
-			potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
 			case $potliblink in
-			[\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
-			*) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
 			esac
 		      done
 		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
 			 $SED -e 10q |
 			 $EGREP "$file_magic_regex" > /dev/null; then
 			func_append newdeplibs " $a_deplib"
-			a_deplib=
+			a_deplib=""
 			break 2
 		      fi
 		  done
 		done
 	      fi
-	      if test -n "$a_deplib"; then
+	      if test -n "$a_deplib" ; then
 		droppeddeps=yes
 		echo
 		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -9343,7 +7842,7 @@ EOF
 		echo "*** you link to this library.  But I can only do this if you have a"
 		echo "*** shared version of the library, which you do not appear to have"
 		echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib"; then
+		if test -z "$potlib" ; then
 		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
 		else
 		  $ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -9366,30 +7865,30 @@ EOF
 	    -l*)
 	      func_stripname -l '' "$a_deplib"
 	      name=$func_stripname_result
-	      if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
 		  func_append newdeplibs " $a_deplib"
-		  a_deplib=
+		  a_deplib=""
 		  ;;
 		esac
 	      fi
-	      if test -n "$a_deplib"; then
+	      if test -n "$a_deplib" ; then
 		libname=`eval "\\$ECHO \"$libname_spec\""`
 		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
 		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
 		  for potent_lib in $potential_libs; do
-		    potlib=$potent_lib # see symlink-check above in file_magic test
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
 		    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
 		       $EGREP "$match_pattern_regex" > /dev/null; then
 		      func_append newdeplibs " $a_deplib"
-		      a_deplib=
+		      a_deplib=""
 		      break 2
 		    fi
 		  done
 		done
 	      fi
-	      if test -n "$a_deplib"; then
+	      if test -n "$a_deplib" ; then
 		droppeddeps=yes
 		echo
 		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -9397,7 +7896,7 @@ EOF
 		echo "*** you link to this library.  But I can only do this if you have a"
 		echo "*** shared version of the library, which you do not appear to have"
 		echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib"; then
+		if test -z "$potlib" ; then
 		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
 		else
 		  $ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -9413,18 +7912,18 @@ EOF
 	  done # Gone through all deplibs.
 	  ;;
 	none | unknown | *)
-	  newdeplibs=
+	  newdeplibs=""
 	  tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
-	  if test yes = "$allow_libtool_libs_with_static_runtimes"; then
-	    for i in $predeps $postdeps; do
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
 	      # can't use Xsed below, because $i might contain '/'
-	      tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
+	      tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
 	    done
 	  fi
 	  case $tmp_deplibs in
 	  *[!\	\ ]*)
 	    echo
-	    if test none = "$deplibs_check_method"; then
+	    if test "X$deplibs_check_method" = "Xnone"; then
 	      echo "*** Warning: inter-library dependencies are not supported in this platform."
 	    else
 	      echo "*** Warning: inter-library dependencies are not known to be supported."
@@ -9448,8 +7947,8 @@ EOF
 	  ;;
 	esac
 
-	if test yes = "$droppeddeps"; then
-	  if test yes = "$module"; then
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
 	    echo
 	    echo "*** Warning: libtool could not satisfy all declared inter-library"
 	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
@@ -9458,12 +7957,12 @@ EOF
 	    if test -z "$global_symbol_pipe"; then
 	      echo
 	      echo "*** However, this would only work if libtool was able to extract symbol"
-	      echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
 	      echo "*** not find such a program.  So, this module is probably useless."
-	      echo "*** 'nm' from GNU binutils and a full rebuild may help."
+	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
 	    fi
-	    if test no = "$build_old_libs"; then
-	      oldlibs=$output_objdir/$libname.$libext
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
 	      build_libtool_libs=module
 	      build_old_libs=yes
 	    else
@@ -9474,14 +7973,14 @@ EOF
 	    echo "*** automatically added whenever a program is linked with this library"
 	    echo "*** or is declared to -dlopen it."
 
-	    if test no = "$allow_undefined"; then
+	    if test "$allow_undefined" = no; then
 	      echo
 	      echo "*** Since this library must not contain undefined symbols,"
 	      echo "*** because either the platform does not support them or"
 	      echo "*** it was explicitly requested with -no-undefined,"
 	      echo "*** libtool will only create a static version of it."
-	      if test no = "$build_old_libs"; then
-		oldlibs=$output_objdir/$libname.$libext
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
 		build_libtool_libs=module
 		build_old_libs=yes
 	      else
@@ -9527,7 +8026,7 @@ EOF
 	*) func_append new_libs " $deplib" ;;
 	esac
       done
-      deplibs=$new_libs
+      deplibs="$new_libs"
 
       # All the library-specific variables (install_libdir is set above).
       library_names=
@@ -9535,25 +8034,25 @@ EOF
       dlname=
 
       # Test again, we may have decided not to build it any more
-      if test yes = "$build_libtool_libs"; then
-	# Remove $wl instances when linking with ld.
+      if test "$build_libtool_libs" = yes; then
+	# Remove ${wl} instances when linking with ld.
 	# FIXME: should test the right _cmds variable.
 	case $archive_cmds in
 	  *\$LD\ *) wl= ;;
         esac
-	if test yes = "$hardcode_into_libs"; then
+	if test "$hardcode_into_libs" = yes; then
 	  # Hardcode the library paths
 	  hardcode_libdirs=
 	  dep_rpath=
-	  rpath=$finalize_rpath
-	  test relink = "$opt_mode" || rpath=$compile_rpath$rpath
+	  rpath="$finalize_rpath"
+	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
 	  for libdir in $rpath; do
 	    if test -n "$hardcode_libdir_flag_spec"; then
 	      if test -n "$hardcode_libdir_separator"; then
 		func_replace_sysroot "$libdir"
 		libdir=$func_replace_sysroot_result
 		if test -z "$hardcode_libdirs"; then
-		  hardcode_libdirs=$libdir
+		  hardcode_libdirs="$libdir"
 		else
 		  # Just accumulate the unique libdirs.
 		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -9578,7 +8077,7 @@ EOF
 	  # Substitute the hardcoded libdirs into the rpath.
 	  if test -n "$hardcode_libdir_separator" &&
 	     test -n "$hardcode_libdirs"; then
-	    libdir=$hardcode_libdirs
+	    libdir="$hardcode_libdirs"
 	    eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
 	  fi
 	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
@@ -9592,8 +8091,8 @@ EOF
 	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
 	fi
 
-	shlibpath=$finalize_shlibpath
-	test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
+	shlibpath="$finalize_shlibpath"
+	test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
 	if test -n "$shlibpath"; then
 	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
 	fi
@@ -9603,19 +8102,19 @@ EOF
 	eval library_names=\"$library_names_spec\"
 	set dummy $library_names
 	shift
-	realname=$1
+	realname="$1"
 	shift
 
 	if test -n "$soname_spec"; then
 	  eval soname=\"$soname_spec\"
 	else
-	  soname=$realname
+	  soname="$realname"
 	fi
 	if test -z "$dlname"; then
 	  dlname=$soname
 	fi
 
-	lib=$output_objdir/$realname
+	lib="$output_objdir/$realname"
 	linknames=
 	for link
 	do
@@ -9629,7 +8128,7 @@ EOF
 	delfiles=
 	if test -n "$export_symbols" && test -n "$include_expsyms"; then
 	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
-	  export_symbols=$output_objdir/$libname.uexp
+	  export_symbols="$output_objdir/$libname.uexp"
 	  func_append delfiles " $export_symbols"
 	fi
 
@@ -9638,31 +8137,31 @@ EOF
 	cygwin* | mingw* | cegcc*)
 	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
 	    # exporting using user supplied symfile
-	    func_dll_def_p "$export_symbols" || {
+	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
 	      # and it's NOT already a .def file. Must figure out
 	      # which of the given symbols are data symbols and tag
 	      # them as such. So, trigger use of export_symbols_cmds.
 	      # export_symbols gets reassigned inside the "prepare
 	      # the list of exported symbols" if statement, so the
 	      # include_expsyms logic still works.
-	      orig_export_symbols=$export_symbols
+	      orig_export_symbols="$export_symbols"
 	      export_symbols=
 	      always_export_symbols=yes
-	    }
+	    fi
 	  fi
 	  ;;
 	esac
 
 	# Prepare the list of exported symbols
 	if test -z "$export_symbols"; then
-	  if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
-	    func_verbose "generating symbol list for '$libname.la'"
-	    export_symbols=$output_objdir/$libname.exp
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    func_verbose "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
 	    $opt_dry_run || $RM $export_symbols
 	    cmds=$export_symbols_cmds
-	    save_ifs=$IFS; IFS='~'
+	    save_ifs="$IFS"; IFS='~'
 	    for cmd1 in $cmds; do
-	      IFS=$save_ifs
+	      IFS="$save_ifs"
 	      # Take the normal branch if the nm_file_list_spec branch
 	      # doesn't work or if tool conversion is not needed.
 	      case $nm_file_list_spec~$to_tool_file_cmd in
@@ -9676,7 +8175,7 @@ EOF
 		  try_normal_branch=no
 		  ;;
 	      esac
-	      if test yes = "$try_normal_branch" \
+	      if test "$try_normal_branch" = yes \
 		 && { test "$len" -lt "$max_cmd_len" \
 		      || test "$max_cmd_len" -le -1; }
 	      then
@@ -9687,7 +8186,7 @@ EOF
 		output_la=$func_basename_result
 		save_libobjs=$libobjs
 		save_output=$output
-		output=$output_objdir/$output_la.nm
+		output=${output_objdir}/${output_la}.nm
 		func_to_tool_file "$output"
 		libobjs=$nm_file_list_spec$func_to_tool_file_result
 		func_append delfiles " $output"
@@ -9710,8 +8209,8 @@ EOF
 		break
 	      fi
 	    done
-	    IFS=$save_ifs
-	    if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
 	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
 	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
 	    fi
@@ -9719,16 +8218,16 @@ EOF
 	fi
 
 	if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	  tmp_export_symbols=$export_symbols
-	  test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+	  tmp_export_symbols="$export_symbols"
+	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
 	  $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
 	fi
 
-	if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
+	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
 	  # The given exports_symbols file has to be filtered, so filter it.
-	  func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
 	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
-	  # 's' commands, which not all seds can handle. GNU sed should be fine
+	  # 's' commands which not all seds can handle. GNU sed should be fine
 	  # though. Also, the filter scales superlinearly with the number of
 	  # global variables. join(1) would be nice here, but unfortunately
 	  # isn't a blessed tool.
@@ -9747,11 +8246,11 @@ EOF
 	    ;;
 	  esac
 	done
-	deplibs=$tmp_deplibs
+	deplibs="$tmp_deplibs"
 
 	if test -n "$convenience"; then
 	  if test -n "$whole_archive_flag_spec" &&
-	    test yes = "$compiler_needs_object" &&
+	    test "$compiler_needs_object" = yes &&
 	    test -z "$libobjs"; then
 	    # extract the archives, so we have objects to list.
 	    # TODO: could optimize this to just extract one archive.
@@ -9762,7 +8261,7 @@ EOF
 	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
 	    test "X$libobjs" = "X " && libobjs=
 	  else
-	    gentop=$output_objdir/${outputname}x
+	    gentop="$output_objdir/${outputname}x"
 	    func_append generated " $gentop"
 
 	    func_extract_archives $gentop $convenience
@@ -9771,18 +8270,18 @@ EOF
 	  fi
 	fi
 
-	if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
 	  eval flag=\"$thread_safe_flag_spec\"
 	  func_append linker_flags " $flag"
 	fi
 
 	# Make a backup of the uninstalled library when relinking
-	if test relink = "$opt_mode"; then
+	if test "$opt_mode" = relink; then
 	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
 	fi
 
 	# Do each of the archive commands.
-	if test yes = "$module" && test -n "$module_cmds"; then
+	if test "$module" = yes && test -n "$module_cmds" ; then
 	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
 	    eval test_cmds=\"$module_expsym_cmds\"
 	    cmds=$module_expsym_cmds
@@ -9800,7 +8299,7 @@ EOF
 	  fi
 	fi
 
-	if test : != "$skipped_export" &&
+	if test "X$skipped_export" != "X:" &&
 	   func_len " $test_cmds" &&
 	   len=$func_len_result &&
 	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
@@ -9833,8 +8332,8 @@ EOF
 	  last_robj=
 	  k=1
 
-	  if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
-	    output=$output_objdir/$output_la.lnkscript
+	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+	    output=${output_objdir}/${output_la}.lnkscript
 	    func_verbose "creating GNU ld script: $output"
 	    echo 'INPUT (' > $output
 	    for obj in $save_libobjs
@@ -9846,14 +8345,14 @@ EOF
 	    func_append delfiles " $output"
 	    func_to_tool_file "$output"
 	    output=$func_to_tool_file_result
-	  elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
-	    output=$output_objdir/$output_la.lnk
+	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+	    output=${output_objdir}/${output_la}.lnk
 	    func_verbose "creating linker input file list: $output"
 	    : > $output
 	    set x $save_libobjs
 	    shift
 	    firstobj=
-	    if test yes = "$compiler_needs_object"; then
+	    if test "$compiler_needs_object" = yes; then
 	      firstobj="$1 "
 	      shift
 	    fi
@@ -9868,7 +8367,7 @@ EOF
 	  else
 	    if test -n "$save_libobjs"; then
 	      func_verbose "creating reloadable object files..."
-	      output=$output_objdir/$output_la-$k.$objext
+	      output=$output_objdir/$output_la-${k}.$objext
 	      eval test_cmds=\"$reload_cmds\"
 	      func_len " $test_cmds"
 	      len0=$func_len_result
@@ -9880,13 +8379,13 @@ EOF
 		func_len " $obj"
 		func_arith $len + $func_len_result
 		len=$func_arith_result
-		if test -z "$objlist" ||
+		if test "X$objlist" = X ||
 		   test "$len" -lt "$max_cmd_len"; then
 		  func_append objlist " $obj"
 		else
 		  # The command $test_cmds is almost too long, add a
 		  # command to the queue.
-		  if test 1 -eq "$k"; then
+		  if test "$k" -eq 1 ; then
 		    # The first file doesn't have a previous command to add.
 		    reload_objs=$objlist
 		    eval concat_cmds=\"$reload_cmds\"
@@ -9896,10 +8395,10 @@ EOF
 		    reload_objs="$objlist $last_robj"
 		    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
 		  fi
-		  last_robj=$output_objdir/$output_la-$k.$objext
+		  last_robj=$output_objdir/$output_la-${k}.$objext
 		  func_arith $k + 1
 		  k=$func_arith_result
-		  output=$output_objdir/$output_la-$k.$objext
+		  output=$output_objdir/$output_la-${k}.$objext
 		  objlist=" $obj"
 		  func_len " $last_robj"
 		  func_arith $len0 + $func_len_result
@@ -9911,9 +8410,9 @@ EOF
 	      # files will link in the last one created.
 	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
 	      reload_objs="$objlist $last_robj"
-	      eval concat_cmds=\"\$concat_cmds$reload_cmds\"
+	      eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
 	      if test -n "$last_robj"; then
-	        eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
 	      fi
 	      func_append delfiles " $output"
 
@@ -9921,9 +8420,9 @@ EOF
 	      output=
 	    fi
 
-	    ${skipped_export-false} && {
-	      func_verbose "generating symbol list for '$libname.la'"
-	      export_symbols=$output_objdir/$libname.exp
+	    if ${skipped_export-false}; then
+	      func_verbose "generating symbol list for \`$libname.la'"
+	      export_symbols="$output_objdir/$libname.exp"
 	      $opt_dry_run || $RM $export_symbols
 	      libobjs=$output
 	      # Append the command to create the export file.
@@ -9932,16 +8431,16 @@ EOF
 	      if test -n "$last_robj"; then
 		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
 	      fi
-	    }
+	    fi
 
 	    test -n "$save_libobjs" &&
 	      func_verbose "creating a temporary reloadable object file: $output"
 
 	    # Loop through the commands generated above and execute them.
-	    save_ifs=$IFS; IFS='~'
+	    save_ifs="$IFS"; IFS='~'
 	    for cmd in $concat_cmds; do
-	      IFS=$save_ifs
-	      $opt_quiet || {
+	      IFS="$save_ifs"
+	      $opt_silent || {
 		  func_quote_for_expand "$cmd"
 		  eval "func_echo $func_quote_for_expand_result"
 	      }
@@ -9949,7 +8448,7 @@ EOF
 		lt_exit=$?
 
 		# Restore the uninstalled library and exit
-		if test relink = "$opt_mode"; then
+		if test "$opt_mode" = relink; then
 		  ( cd "$output_objdir" && \
 		    $RM "${realname}T" && \
 		    $MV "${realname}U" "$realname" )
@@ -9958,7 +8457,7 @@ EOF
 		exit $lt_exit
 	      }
 	    done
-	    IFS=$save_ifs
+	    IFS="$save_ifs"
 
 	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
 	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
@@ -9966,18 +8465,18 @@ EOF
 	    fi
 	  fi
 
-          ${skipped_export-false} && {
+          if ${skipped_export-false}; then
 	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	      tmp_export_symbols=$export_symbols
-	      test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+	      tmp_export_symbols="$export_symbols"
+	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
 	      $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
 	    fi
 
 	    if test -n "$orig_export_symbols"; then
 	      # The given exports_symbols file has to be filtered, so filter it.
-	      func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
 	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
-	      # 's' commands, which not all seds can handle. GNU sed should be fine
+	      # 's' commands which not all seds can handle. GNU sed should be fine
 	      # though. Also, the filter scales superlinearly with the number of
 	      # global variables. join(1) would be nice here, but unfortunately
 	      # isn't a blessed tool.
@@ -9986,7 +8485,7 @@ EOF
 	      export_symbols=$output_objdir/$libname.def
 	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
 	    fi
-	  }
+	  fi
 
 	  libobjs=$output
 	  # Restore the value of output.
@@ -10000,7 +8499,7 @@ EOF
 	  # value of $libobjs for piecewise linking.
 
 	  # Do each of the archive commands.
-	  if test yes = "$module" && test -n "$module_cmds"; then
+	  if test "$module" = yes && test -n "$module_cmds" ; then
 	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
 	      cmds=$module_expsym_cmds
 	    else
@@ -10022,7 +8521,7 @@ EOF
 
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
-	  gentop=$output_objdir/${outputname}x
+	  gentop="$output_objdir/${outputname}x"
 	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
@@ -10030,12 +8529,11 @@ EOF
 	  test "X$libobjs" = "X " && libobjs=
 	fi
 
-	save_ifs=$IFS; IFS='~'
+	save_ifs="$IFS"; IFS='~'
 	for cmd in $cmds; do
-	  IFS=$sp$nl
+	  IFS="$save_ifs"
 	  eval cmd=\"$cmd\"
-	  IFS=$save_ifs
-	  $opt_quiet || {
+	  $opt_silent || {
 	    func_quote_for_expand "$cmd"
 	    eval "func_echo $func_quote_for_expand_result"
 	  }
@@ -10043,7 +8541,7 @@ EOF
 	    lt_exit=$?
 
 	    # Restore the uninstalled library and exit
-	    if test relink = "$opt_mode"; then
+	    if test "$opt_mode" = relink; then
 	      ( cd "$output_objdir" && \
 	        $RM "${realname}T" && \
 		$MV "${realname}U" "$realname" )
@@ -10052,10 +8550,10 @@ EOF
 	    exit $lt_exit
 	  }
 	done
-	IFS=$save_ifs
+	IFS="$save_ifs"
 
 	# Restore the uninstalled library and exit
-	if test relink = "$opt_mode"; then
+	if test "$opt_mode" = relink; then
 	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
 
 	  if test -n "$convenience"; then
@@ -10075,39 +8573,39 @@ EOF
 	done
 
 	# If -module or -export-dynamic was specified, set the dlname.
-	if test yes = "$module" || test yes = "$export_dynamic"; then
+	if test "$module" = yes || test "$export_dynamic" = yes; then
 	  # On all known operating systems, these are identical.
-	  dlname=$soname
+	  dlname="$soname"
 	fi
       fi
       ;;
 
     obj)
-      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
-	func_warning "'-dlopen' is ignored for objects"
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for objects"
       fi
 
       case " $deplibs" in
       *\ -l* | *\ -L*)
-	func_warning "'-l' and '-L' are ignored for objects" ;;
+	func_warning "\`-l' and \`-L' are ignored for objects" ;;
       esac
 
       test -n "$rpath" && \
-	func_warning "'-rpath' is ignored for objects"
+	func_warning "\`-rpath' is ignored for objects"
 
       test -n "$xrpath" && \
-	func_warning "'-R' is ignored for objects"
+	func_warning "\`-R' is ignored for objects"
 
       test -n "$vinfo" && \
-	func_warning "'-version-info' is ignored for objects"
+	func_warning "\`-version-info' is ignored for objects"
 
       test -n "$release" && \
-	func_warning "'-release' is ignored for objects"
+	func_warning "\`-release' is ignored for objects"
 
       case $output in
       *.lo)
 	test -n "$objs$old_deplibs" && \
-	  func_fatal_error "cannot build library object '$output' from non-libtool objects"
+	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
 
 	libobj=$output
 	func_lo2o "$libobj"
@@ -10115,7 +8613,7 @@ EOF
 	;;
       *)
 	libobj=
-	obj=$output
+	obj="$output"
 	;;
       esac
 
@@ -10128,19 +8626,17 @@ EOF
       # the extraction.
       reload_conv_objs=
       gentop=
-      # if reload_cmds runs $LD directly, get rid of -Wl from
-      # whole_archive_flag_spec and hope we can get by with turning comma
-      # into space.
-      case $reload_cmds in
-        *\$LD[\ \$]*) wl= ;;
-      esac
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
       if test -n "$convenience"; then
 	if test -n "$whole_archive_flag_spec"; then
 	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-	  test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
-	  reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
+	  reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
 	else
-	  gentop=$output_objdir/${obj}x
+	  gentop="$output_objdir/${obj}x"
 	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $convenience
@@ -10149,12 +8645,12 @@ EOF
       fi
 
       # If we're not building shared, we need to use non_pic_objs
-      test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
 
       # Create the old-style object.
-      reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
+      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
 
-      output=$obj
+      output="$obj"
       func_execute_cmds "$reload_cmds" 'exit $?'
 
       # Exit if we aren't doing a library object file.
@@ -10166,7 +8662,7 @@ EOF
 	exit $EXIT_SUCCESS
       fi
 
-      test yes = "$build_libtool_libs" || {
+      if test "$build_libtool_libs" != yes; then
 	if test -n "$gentop"; then
 	  func_show_eval '${RM}r "$gentop"'
 	fi
@@ -10176,12 +8672,12 @@ EOF
 	# $show "echo timestamp > $libobj"
 	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
 	exit $EXIT_SUCCESS
-      }
+      fi
 
-      if test -n "$pic_flag" || test default != "$pic_mode"; then
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
 	# Only do commands if we really have different PIC objects.
 	reload_objs="$libobjs $reload_conv_objs"
-	output=$libobj
+	output="$libobj"
 	func_execute_cmds "$reload_cmds" 'exit $?'
       fi
 
@@ -10198,14 +8694,16 @@ EOF
 	          output=$func_stripname_result.exe;;
       esac
       test -n "$vinfo" && \
-	func_warning "'-version-info' is ignored for programs"
+	func_warning "\`-version-info' is ignored for programs"
 
       test -n "$release" && \
-	func_warning "'-release' is ignored for programs"
+	func_warning "\`-release' is ignored for programs"
 
-      $preload \
-	&& test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
-	&& func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+	&& test "$dlopen_self" = unknown \
+	&& test "$dlopen_self_static" = unknown && \
+	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
 
       case $host in
       *-*-rhapsody* | *-*-darwin1.[012])
@@ -10219,11 +8717,11 @@ EOF
       *-*-darwin*)
 	# Don't allow lazy linking, it breaks C++ global constructors
 	# But is supposedly fixed on 10.4 or later (yay!).
-	if test CXX = "$tagname"; then
+	if test "$tagname" = CXX ; then
 	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
 	    10.[0123])
-	      func_append compile_command " $wl-bind_at_load"
-	      func_append finalize_command " $wl-bind_at_load"
+	      func_append compile_command " ${wl}-bind_at_load"
+	      func_append finalize_command " ${wl}-bind_at_load"
 	    ;;
 	  esac
 	fi
@@ -10259,7 +8757,7 @@ EOF
 	*) func_append new_libs " $deplib" ;;
 	esac
       done
-      compile_deplibs=$new_libs
+      compile_deplibs="$new_libs"
 
 
       func_append compile_command " $compile_deplibs"
@@ -10283,7 +8781,7 @@ EOF
 	if test -n "$hardcode_libdir_flag_spec"; then
 	  if test -n "$hardcode_libdir_separator"; then
 	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs=$libdir
+	      hardcode_libdirs="$libdir"
 	    else
 	      # Just accumulate the unique libdirs.
 	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -10306,7 +8804,7 @@ EOF
 	fi
 	case $host in
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-	  testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
 	  case :$dllsearchpath: in
 	  *":$libdir:"*) ;;
 	  ::) dllsearchpath=$libdir;;
@@ -10323,10 +8821,10 @@ EOF
       # Substitute the hardcoded libdirs into the rpath.
       if test -n "$hardcode_libdir_separator" &&
 	 test -n "$hardcode_libdirs"; then
-	libdir=$hardcode_libdirs
+	libdir="$hardcode_libdirs"
 	eval rpath=\" $hardcode_libdir_flag_spec\"
       fi
-      compile_rpath=$rpath
+      compile_rpath="$rpath"
 
       rpath=
       hardcode_libdirs=
@@ -10334,7 +8832,7 @@ EOF
 	if test -n "$hardcode_libdir_flag_spec"; then
 	  if test -n "$hardcode_libdir_separator"; then
 	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs=$libdir
+	      hardcode_libdirs="$libdir"
 	    else
 	      # Just accumulate the unique libdirs.
 	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -10359,43 +8857,45 @@ EOF
       # Substitute the hardcoded libdirs into the rpath.
       if test -n "$hardcode_libdir_separator" &&
 	 test -n "$hardcode_libdirs"; then
-	libdir=$hardcode_libdirs
+	libdir="$hardcode_libdirs"
 	eval rpath=\" $hardcode_libdir_flag_spec\"
       fi
-      finalize_rpath=$rpath
+      finalize_rpath="$rpath"
 
-      if test -n "$libobjs" && test yes = "$build_old_libs"; then
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
 	# Transform all the library objects into standard objects.
 	compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
 	finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
       fi
 
-      func_generate_dlsyms "$outputname" "@PROGRAM@" false
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
 
       # template prelinking step
       if test -n "$prelink_cmds"; then
 	func_execute_cmds "$prelink_cmds" 'exit $?'
       fi
 
-      wrappers_required=:
+      wrappers_required=yes
       case $host in
       *cegcc* | *mingw32ce*)
         # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
-        wrappers_required=false
+        wrappers_required=no
         ;;
       *cygwin* | *mingw* )
-        test yes = "$build_libtool_libs" || wrappers_required=false
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
         ;;
       *)
-        if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
-          wrappers_required=false
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
         fi
         ;;
       esac
-      $wrappers_required || {
+      if test "$wrappers_required" = no; then
 	# Replace the output file specification.
 	compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
-	link_command=$compile_command$compile_rpath
+	link_command="$compile_command$compile_rpath"
 
 	# We have no uninstalled library dependencies, so finalize right now.
 	exit_status=0
@@ -10408,12 +8908,12 @@ EOF
 	fi
 
 	# Delete the generated files.
-	if test -f "$output_objdir/${outputname}S.$objext"; then
-	  func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
+	if test -f "$output_objdir/${outputname}S.${objext}"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
 	fi
 
 	exit $exit_status
-      }
+      fi
 
       if test -n "$compile_shlibpath$finalize_shlibpath"; then
 	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
@@ -10443,9 +8943,9 @@ EOF
 	fi
       fi
 
-      if test yes = "$no_install"; then
+      if test "$no_install" = yes; then
 	# We don't need to create a wrapper script.
-	link_command=$compile_var$compile_command$compile_rpath
+	link_command="$compile_var$compile_command$compile_rpath"
 	# Replace the output file specification.
 	link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
 	# Delete the old output file.
@@ -10462,28 +8962,27 @@ EOF
 	exit $EXIT_SUCCESS
       fi
 
-      case $hardcode_action,$fast_install in
-        relink,*)
-	  # Fast installation is not supported
-	  link_command=$compile_var$compile_command$compile_rpath
-	  relink_command=$finalize_var$finalize_command$finalize_rpath
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
 
-	  func_warning "this platform does not like uninstalled shared libraries"
-	  func_warning "'$output' will be relinked during installation"
-	  ;;
-        *,yes)
-	  link_command=$finalize_var$compile_command$finalize_rpath
-	  relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
-          ;;
-	*,no)
-	  link_command=$compile_var$compile_command$compile_rpath
-	  relink_command=$finalize_var$finalize_command$finalize_rpath
-          ;;
-	*,needless)
-	  link_command=$finalize_var$compile_command$finalize_rpath
-	  relink_command=
-          ;;
-      esac
+	func_warning "this platform does not like uninstalled shared libraries"
+	func_warning "\`$output' will be relinked during installation"
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
 
       # Replace the output file specification.
       link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
@@ -10540,8 +9039,8 @@ EOF
 	    func_dirname_and_basename "$output" "" "."
 	    output_name=$func_basename_result
 	    output_path=$func_dirname_result
-	    cwrappersource=$output_path/$objdir/lt-$output_name.c
-	    cwrapper=$output_path/$output_name.exe
+	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
+	    cwrapper="$output_path/$output_name.exe"
 	    $RM $cwrappersource $cwrapper
 	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
 
@@ -10562,7 +9061,7 @@ EOF
 	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
 	    $opt_dry_run || {
 	      # note: this script will not be executed, so do not chmod.
-	      if test "x$build" = "x$host"; then
+	      if test "x$build" = "x$host" ; then
 		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
 	      else
 		func_emit_wrapper no > $func_ltwrapper_scriptname_result
@@ -10585,27 +9084,25 @@ EOF
     # See if we need to build an old-fashioned archive.
     for oldlib in $oldlibs; do
 
-      case $build_libtool_libs in
-        convenience)
-	  oldobjs="$libobjs_save $symfileobj"
-	  addlibs=$convenience
-	  build_libtool_libs=no
-	  ;;
-	module)
-	  oldobjs=$libobjs_save
-	  addlibs=$old_convenience
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save $symfileobj"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
 	  build_libtool_libs=no
-          ;;
-	*)
+	else
 	  oldobjs="$old_deplibs $non_pic_objects"
-	  $preload && test -f "$symfileobj" \
-	    && func_append oldobjs " $symfileobj"
-	  addlibs=$old_convenience
-	  ;;
-      esac
+	  if test "$preload" = yes && test -f "$symfileobj"; then
+	    func_append oldobjs " $symfileobj"
+	  fi
+	fi
+	addlibs="$old_convenience"
+      fi
 
       if test -n "$addlibs"; then
-	gentop=$output_objdir/${outputname}x
+	gentop="$output_objdir/${outputname}x"
 	func_append generated " $gentop"
 
 	func_extract_archives $gentop $addlibs
@@ -10613,13 +9110,13 @@ EOF
       fi
 
       # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
 	cmds=$old_archive_from_new_cmds
       else
 
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
-	  gentop=$output_objdir/${outputname}x
+	  gentop="$output_objdir/${outputname}x"
 	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
@@ -10640,7 +9137,7 @@ EOF
 	  :
 	else
 	  echo "copying selected object files to avoid basename conflicts..."
-	  gentop=$output_objdir/${outputname}x
+	  gentop="$output_objdir/${outputname}x"
 	  func_append generated " $gentop"
 	  func_mkdir_p "$gentop"
 	  save_oldobjs=$oldobjs
@@ -10649,7 +9146,7 @@ EOF
 	  for obj in $save_oldobjs
 	  do
 	    func_basename "$obj"
-	    objbase=$func_basename_result
+	    objbase="$func_basename_result"
 	    case " $oldobjs " in
 	    " ") oldobjs=$obj ;;
 	    *[\ /]"$objbase "*)
@@ -10718,18 +9215,18 @@ EOF
 	    else
 	      # the above command should be used before it gets too long
 	      oldobjs=$objlist
-	      if test "$obj" = "$last_oldobj"; then
+	      if test "$obj" = "$last_oldobj" ; then
 		RANLIB=$save_RANLIB
 	      fi
 	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	      eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
 	      objlist=
 	      len=$len0
 	    fi
 	  done
 	  RANLIB=$save_RANLIB
 	  oldobjs=$objlist
-	  if test -z "$oldobjs"; then
+	  if test "X$oldobjs" = "X" ; then
 	    eval cmds=\"\$concat_cmds\"
 	  else
 	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
@@ -10746,7 +9243,7 @@ EOF
     case $output in
     *.la)
       old_library=
-      test yes = "$build_old_libs" && old_library=$libname.$libext
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
       func_verbose "creating $output"
 
       # Preserve any variables that may affect compiler behavior
@@ -10761,31 +9258,31 @@ EOF
 	fi
       done
       # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
       relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
-      if test yes = "$hardcode_automatic"; then
+      if test "$hardcode_automatic" = yes ; then
 	relink_command=
       fi
 
       # Only create the output if not a dry run.
       $opt_dry_run || {
 	for installed in no yes; do
-	  if test yes = "$installed"; then
+	  if test "$installed" = yes; then
 	    if test -z "$install_libdir"; then
 	      break
 	    fi
-	    output=$output_objdir/${outputname}i
+	    output="$output_objdir/$outputname"i
 	    # Replace all uninstalled libtool libraries with the installed ones
 	    newdependency_libs=
 	    for deplib in $dependency_libs; do
 	      case $deplib in
 	      *.la)
 		func_basename "$deplib"
-		name=$func_basename_result
+		name="$func_basename_result"
 		func_resolve_sysroot "$deplib"
-		eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
 		test -z "$libdir" && \
-		  func_fatal_error "'$deplib' is not a valid libtool archive"
+		  func_fatal_error "\`$deplib' is not a valid libtool archive"
 		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
 		;;
 	      -L*)
@@ -10801,23 +9298,23 @@ EOF
 	      *) func_append newdependency_libs " $deplib" ;;
 	      esac
 	    done
-	    dependency_libs=$newdependency_libs
+	    dependency_libs="$newdependency_libs"
 	    newdlfiles=
 
 	    for lib in $dlfiles; do
 	      case $lib in
 	      *.la)
 	        func_basename "$lib"
-		name=$func_basename_result
-		eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 		test -z "$libdir" && \
-		  func_fatal_error "'$lib' is not a valid libtool archive"
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
 		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
 	      *) func_append newdlfiles " $lib" ;;
 	      esac
 	    done
-	    dlfiles=$newdlfiles
+	    dlfiles="$newdlfiles"
 	    newdlprefiles=
 	    for lib in $dlprefiles; do
 	      case $lib in
@@ -10827,34 +9324,34 @@ EOF
 		# didn't already link the preopened objects directly into
 		# the library:
 		func_basename "$lib"
-		name=$func_basename_result
-		eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 		test -z "$libdir" && \
-		  func_fatal_error "'$lib' is not a valid libtool archive"
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
 		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
 	      esac
 	    done
-	    dlprefiles=$newdlprefiles
+	    dlprefiles="$newdlprefiles"
 	  else
 	    newdlfiles=
 	    for lib in $dlfiles; do
 	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
 	      func_append newdlfiles " $abs"
 	    done
-	    dlfiles=$newdlfiles
+	    dlfiles="$newdlfiles"
 	    newdlprefiles=
 	    for lib in $dlprefiles; do
 	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
 	      func_append newdlprefiles " $abs"
 	    done
-	    dlprefiles=$newdlprefiles
+	    dlprefiles="$newdlprefiles"
 	  fi
 	  $RM $output
 	  # place dlname in correct position for cygwin
@@ -10870,9 +9367,10 @@ EOF
 	  case $host,$output,$installed,$module,$dlname in
 	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
 	      # If a -bindir argument was supplied, place the dll there.
-	      if test -n "$bindir"; then
+	      if test "x$bindir" != x ;
+	      then
 		func_relative_path "$install_libdir" "$bindir"
-		tdlname=$func_relative_path_result/$dlname
+		tdlname=$func_relative_path_result$dlname
 	      else
 		# Otherwise fall back on heuristic.
 		tdlname=../bin/$dlname
@@ -10881,7 +9379,7 @@ EOF
 	  esac
 	  $ECHO > $output "\
 # $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
@@ -10895,7 +9393,7 @@ library_names='$library_names'
 # The name of the static archive.
 old_library='$old_library'
 
-# Linker flags that cannot go in dependency_libs.
+# Linker flags that can not go in dependency_libs.
 inherited_linker_flags='$new_inherited_linker_flags'
 
 # Libraries that this one depends upon.
@@ -10921,7 +9419,7 @@ dlpreopen='$dlprefiles'
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'"
-	  if test no,yes = "$installed,$need_relink"; then
+	  if test "$installed" = no && test "$need_relink" = yes; then
 	    $ECHO >> $output "\
 relink_command=\"$relink_command\""
 	  fi
@@ -10936,29 +9434,27 @@ relink_command=\"$relink_command\""
     exit $EXIT_SUCCESS
 }
 
-if test link = "$opt_mode" || test relink = "$opt_mode"; then
-  func_mode_link ${1+"$@"}
-fi
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+    func_mode_link ${1+"$@"}
 
 
 # func_mode_uninstall arg...
 func_mode_uninstall ()
 {
-    $debug_cmd
-
-    RM=$nonopt
+    $opt_debug
+    RM="$nonopt"
     files=
-    rmforce=false
+    rmforce=
     exit_status=0
 
     # This variable tells wrapper scripts just to set variables rather
     # than running their programs.
-    libtool_install_magic=$magic
+    libtool_install_magic="$magic"
 
     for arg
     do
       case $arg in
-      -f) func_append RM " $arg"; rmforce=: ;;
+      -f) func_append RM " $arg"; rmforce=yes ;;
       -*) func_append RM " $arg" ;;
       *) func_append files " $arg" ;;
       esac
@@ -10971,18 +9467,18 @@ func_mode_uninstall ()
 
     for file in $files; do
       func_dirname "$file" "" "."
-      dir=$func_dirname_result
-      if test . = "$dir"; then
-	odir=$objdir
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
+	odir="$objdir"
       else
-	odir=$dir/$objdir
+	odir="$dir/$objdir"
       fi
       func_basename "$file"
-      name=$func_basename_result
-      test uninstall = "$opt_mode" && odir=$dir
+      name="$func_basename_result"
+      test "$opt_mode" = uninstall && odir="$dir"
 
       # Remember odir for removal later, being careful to avoid duplicates
-      if test clean = "$opt_mode"; then
+      if test "$opt_mode" = clean; then
 	case " $rmdirs " in
 	  *" $odir "*) ;;
 	  *) func_append rmdirs " $odir" ;;
@@ -10997,11 +9493,11 @@ func_mode_uninstall ()
       elif test -d "$file"; then
 	exit_status=1
 	continue
-      elif $rmforce; then
+      elif test "$rmforce" = yes; then
 	continue
       fi
 
-      rmfiles=$file
+      rmfiles="$file"
 
       case $name in
       *.la)
@@ -11015,7 +9511,7 @@ func_mode_uninstall ()
 	  done
 	  test -n "$old_library" && func_append rmfiles " $odir/$old_library"
 
-	  case $opt_mode in
+	  case "$opt_mode" in
 	  clean)
 	    case " $library_names " in
 	    *" $dlname "*) ;;
@@ -11026,12 +9522,12 @@ func_mode_uninstall ()
 	  uninstall)
 	    if test -n "$library_names"; then
 	      # Do each command in the postuninstall commands.
-	      func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
+	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
 	    fi
 
 	    if test -n "$old_library"; then
 	      # Do each command in the old_postuninstall commands.
-	      func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
+	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
 	    fi
 	    # FIXME: should reinstall the best remaining shared library.
 	    ;;
@@ -11047,19 +9543,21 @@ func_mode_uninstall ()
 	  func_source $dir/$name
 
 	  # Add PIC object to the list of files to remove.
-	  if test -n "$pic_object" && test none != "$pic_object"; then
+	  if test -n "$pic_object" &&
+	     test "$pic_object" != none; then
 	    func_append rmfiles " $dir/$pic_object"
 	  fi
 
 	  # Add non-PIC object to the list of files to remove.
-	  if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+	  if test -n "$non_pic_object" &&
+	     test "$non_pic_object" != none; then
 	    func_append rmfiles " $dir/$non_pic_object"
 	  fi
 	fi
 	;;
 
       *)
-	if test clean = "$opt_mode"; then
+	if test "$opt_mode" = clean ; then
 	  noexename=$name
 	  case $file in
 	  *.exe)
@@ -11086,12 +9584,12 @@ func_mode_uninstall ()
 
 	    # note $name still contains .exe if it was in $file originally
 	    # as does the version of $file that was added into $rmfiles
-	    func_append rmfiles " $odir/$name $odir/${name}S.$objext"
-	    if test yes = "$fast_install" && test -n "$relink_command"; then
+	    func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
 	      func_append rmfiles " $odir/lt-$name"
 	    fi
-	    if test "X$noexename" != "X$name"; then
-	      func_append rmfiles " $odir/lt-$noexename.c"
+	    if test "X$noexename" != "X$name" ; then
+	      func_append rmfiles " $odir/lt-${noexename}.c"
 	    fi
 	  fi
 	fi
@@ -11100,7 +9598,7 @@ func_mode_uninstall ()
       func_show_eval "$RM $rmfiles" 'exit_status=1'
     done
 
-    # Try to remove the $objdir's in the directories where we deleted files
+    # Try to remove the ${objdir}s in the directories where we deleted files
     for dir in $rmdirs; do
       if test -d "$dir"; then
 	func_show_eval "rmdir $dir >/dev/null 2>&1"
@@ -11110,17 +9608,16 @@ func_mode_uninstall ()
     exit $exit_status
 }
 
-if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
-  func_mode_uninstall ${1+"$@"}
-fi
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
 
 test -z "$opt_mode" && {
-  help=$generic_help
+  help="$generic_help"
   func_fatal_help "you must specify a MODE"
 }
 
 test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode '$opt_mode'"
+  func_fatal_help "invalid operation mode \`$opt_mode'"
 
 if test -n "$exec_cmd"; then
   eval exec "$exec_cmd"
@@ -11131,7 +9628,7 @@ exit $exit_status
 
 
 # The TAGs below are defined such that we never get into a situation
-# where we disable both kinds of libraries.  Given conflicting
+# in which we disable both kinds of libraries.  Given conflicting
 # choices, we go for a static library, that is the most portable,
 # since we can't tell whether shared libraries were disabled because
 # the user asked for that or because the platform doesn't support
@@ -11154,3 +9651,5 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
 # mode:shell-script
 # sh-indentation:2
 # End:
+# vi:sw=2
+
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 10ab284..56666f0 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,6 +1,8 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
-#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -8,30 +10,36 @@
 # modifications, as long as this notice is preserved.
 
 m4_define([_LT_COPYING], [dnl
-# Copyright (C) 2014 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of of the License, or
-# (at your option) any later version.
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program or library that is built
-# using GNU Libtool, you may include this file under the  same
-# distribution terms that you use for the rest of that program.
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
 #
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ])
 
-# serial 58 LT_INIT
+# serial 57 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -59,7 +67,7 @@ esac
 # LT_INIT([OPTIONS])
 # ------------------
 AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_BEFORE([$0], [LT_LANG])dnl
 AC_BEFORE([$0], [LT_OUTPUT])dnl
@@ -83,7 +91,7 @@ dnl Parse OPTIONS
 _LT_SET_OPTIONS([$0], [$1])
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS=$ltmain
+LIBTOOL_DEPS="$ltmain"
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -103,43 +111,26 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
 
-# _LT_PREPARE_CC_BASENAME
-# -----------------------
-m4_defun([_LT_PREPARE_CC_BASENAME], [
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-func_cc_basename ()
-{
-    for cc_temp in @S|@*""; do
-      case $cc_temp in
-        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-        \-*) ;;
-        *) break;;
-      esac
-    done
-    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-}
-])# _LT_PREPARE_CC_BASENAME
-
-
 # _LT_CC_BASENAME(CC)
 # -------------------
-# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
-# but that macro is also expanded into generated libtool script, which
-# arranges for $SED and $ECHO to be set by different means.
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 m4_defun([_LT_CC_BASENAME],
-[m4_require([_LT_PREPARE_CC_BASENAME])dnl
-AC_REQUIRE([_LT_DECL_SED])dnl
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
-func_cc_basename $1
-cc_basename=$func_cc_basename_result
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 ])
 
 
 # _LT_FILEUTILS_DEFAULTS
 # ----------------------
 # It is okay to use these file commands and assume they have been set
-# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
 m4_defun([_LT_FILEUTILS_DEFAULTS],
 [: ${CP="cp -f"}
 : ${MV="mv -f"}
@@ -186,16 +177,15 @@ m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 m4_require([_LT_WITH_SYSROOT])dnl
-m4_require([_LT_CMD_TRUNCATE])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options that allow our
+# See if we are running on zsh, and set the options which allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}"; then
+if test -n "\${ZSH_VERSION+set}" ; then
    setopt NO_GLOB_SUBST
 fi
 ])
-if test -n "${ZSH_VERSION+set}"; then
+if test -n "${ZSH_VERSION+set}" ; then
    setopt NO_GLOB_SUBST
 fi
 
@@ -208,7 +198,7 @@ aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test set != "${COLLECT_NAMES+set}"; then
+  if test "X${COLLECT_NAMES+set}" != Xset; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
@@ -219,14 +209,14 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a '.a' archive for static linking (except MSVC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld=$lt_cv_prog_gnu_ld
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-old_CC=$CC
-old_CFLAGS=$CFLAGS
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -279,14 +269,14 @@ no_glob_subst='s/\*/\\\*/g'
 
 # _LT_PROG_LTMAIN
 # ---------------
-# Note that this code is called both from 'configure', and 'config.status'
+# Note that this code is called both from `configure', and `config.status'
 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# 'config.status' has no value for ac_aux_dir unless we are using Automake,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
 # so we pass a copy along to make sure it has a sensible value anyway.
 m4_defun([_LT_PROG_LTMAIN],
 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain=$ac_aux_dir/ltmain.sh
+ltmain="$ac_aux_dir/ltmain.sh"
 ])# _LT_PROG_LTMAIN
 
 
@@ -296,7 +286,7 @@ ltmain=$ac_aux_dir/ltmain.sh
 
 # So that we can recreate a full libtool script including additional
 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the 'libtool'
+# in macros and then make a single call at the end using the `libtool'
 # label.
 
 
@@ -431,8 +421,8 @@ m4_define([_lt_decl_all_varnames],
 
 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
 # ------------------------------------
-# Quote a variable value, and forward it to 'config.status' so that its
-# declaration there will have the same value as in 'configure'.  VARNAME
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
 # must have a single quote delimited value for this to work.
 m4_define([_LT_CONFIG_STATUS_DECLARE],
 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
@@ -456,7 +446,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 # Output comment and list of tags supported by the script
 m4_defun([_LT_LIBTOOL_TAGS],
 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags='_LT_TAGS'dnl
+available_tags="_LT_TAGS"dnl
 ])
 
 
@@ -484,7 +474,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 # _LT_LIBTOOL_CONFIG_VARS
 # -----------------------
 # Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 # section) are produced by _LT_LIBTOOL_TAG_VARS.
 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
@@ -510,8 +500,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 # variables for single and double quote escaping we saved from calls
 # to _LT_DECL, we can put quote escaped variables declarations
-# into 'config.status', and then the shell code to quote escape them in
-# for loops in 'config.status'.  Finally, any additional code accumulated
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 m4_defun([_LT_CONFIG_COMMANDS],
 [AC_PROVIDE_IFELSE([LT_OUTPUT],
@@ -557,7 +547,7 @@ for var in lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -570,7 +560,7 @@ for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -586,7 +576,7 @@ _LT_OUTPUT_LIBTOOL_INIT
 # Generate a child script FILE with all initialization necessary to
 # reuse the environment learned by the parent script, and make the
 # file executable.  If COMMENT is supplied, it is inserted after the
-# '#!' sequence but before initialization text begins.  After this
+# `#!' sequence but before initialization text begins.  After this
 # macro, additional text can be appended to FILE to form the body of
 # the child script.  The macro ends with non-zero status if the
 # file could not be fully written (such as if the disk is full).
@@ -608,7 +598,7 @@ AS_SHELL_SANITIZE
 _AS_PREPARE
 exec AS_MESSAGE_FD>&1
 _ASEOF
-test 0 = "$lt_write_fail" && chmod +x $1[]dnl
+test $lt_write_fail = 0 && chmod +x $1[]dnl
 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
 # LT_OUTPUT
@@ -631,7 +621,7 @@ exec AS_MESSAGE_LOG_FD>>config.log
 } >&AS_MESSAGE_LOG_FD
 
 lt_cl_help="\
-'$as_me' creates a local libtool stub from the current configuration,
+\`$as_me' creates a local libtool stub from the current configuration,
 for use in further configure time tests before the real libtool is
 generated.
 
@@ -653,7 +643,7 @@ Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
-while test 0 != $[#]
+while test $[#] != 0
 do
   case $[1] in
     --version | --v* | -V )
@@ -666,10 +656,10 @@ do
       lt_cl_silent=: ;;
 
     -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try '$[0] --help' for more information.]) ;;
+Try \`$[0] --help' for more information.]) ;;
 
     *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try '$[0] --help' for more information.]) ;;
+Try \`$[0] --help' for more information.]) ;;
   esac
   shift
 done
@@ -695,7 +685,7 @@ chmod +x "$CONFIG_LT"
 # open by configure.  Here we exec the FD to /dev/null, effectively closing
 # config.log, so it can be properly (re)opened and appended to by config.lt.
 lt_cl_success=:
-test yes = "$silent" &&
+test "$silent" = yes &&
   lt_config_lt_args="$lt_config_lt_args --quiet"
 exec AS_MESSAGE_LOG_FD>/dev/null
 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
@@ -715,31 +705,27 @@ m4_defun([_LT_CONFIG],
 _LT_CONFIG_SAVE_COMMANDS([
   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
   m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options that allow our
+    # See if we are running on zsh, and set the options which allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}"; then
+    if test -n "${ZSH_VERSION+set}" ; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile=${ofile}T
+    cfgfile="${ofile}T"
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-# Generated automatically by $as_me ($PACKAGE) $VERSION
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
-
-# Provide generalized library-building support services.
-# Written by Gordon Matzigkeit, 1996
-
+#
 _LT_COPYING
 _LT_LIBTOOL_TAGS
 
-# Configured defaults for sys_lib_dlsearch_path munging.
-: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
-
 # ### BEGIN LIBTOOL CONFIG
 _LT_LIBTOOL_CONFIG_VARS
 _LT_LIBTOOL_TAG_VARS
@@ -747,24 +733,13 @@ _LT_LIBTOOL_TAG_VARS
 
 _LT_EOF
 
-    cat <<'_LT_EOF' >> "$cfgfile"
-
-# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
-
-_LT_PREPARE_MUNGE_PATH_LIST
-_LT_PREPARE_CC_BASENAME
-
-# ### END FUNCTIONS SHARED WITH CONFIGURE
-
-_LT_EOF
-
   case $host_os in
   aix3*)
     cat <<\_LT_EOF >> "$cfgfile"
 # AIX sometimes has problems with the GCC collect2 program.  For some
 # reason, if we set the COLLECT_NAMES environment variable, the problems
 # vanish in a puff of smoke.
-if test set != "${COLLECT_NAMES+set}"; then
+if test "X${COLLECT_NAMES+set}" != Xset; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -781,6 +756,8 @@ _LT_EOF
   sed '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
+  _LT_PROG_REPLACE_SHELLFNS
+
    mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
@@ -798,6 +775,7 @@ _LT_EOF
 [m4_if([$1], [], [
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'], [])
 ])dnl /_LT_CONFIG_SAVE_COMMANDS
@@ -996,7 +974,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
       [lt_cv_apple_cc_single_mod=no
-      if test -z "$LT_MULTI_MODULE"; then
+      if test -z "${LT_MULTI_MODULE}"; then
 	# By default we will add the -single_module flag. You can override
 	# by either setting the environment variable LT_MULTI_MODULE
 	# non-empty at configure time, or by adding -multi_module to the
@@ -1014,7 +992,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	  cat conftest.err >&AS_MESSAGE_LOG_FD
 	# Otherwise, if the output was created with a 0 exit code from
 	# the compiler, it worked.
-	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1032,7 +1010,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 	[lt_cv_ld_exported_symbols_list=yes],
 	[lt_cv_ld_exported_symbols_list=no])
-	LDFLAGS=$save_LDFLAGS
+	LDFLAGS="$save_LDFLAGS"
     ])
 
     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
@@ -1054,7 +1032,7 @@ _LT_EOF
       _lt_result=$?
       if test -s conftest.err && $GREP force_load conftest.err; then
 	cat conftest.err >&AS_MESSAGE_LOG_FD
-      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1064,32 +1042,32 @@ _LT_EOF
     ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-	10.[[012]][[,.]]*)
-	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	10.[[012]]*)
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 	10.*)
-	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test yes = "$lt_cv_apple_cc_single_mod"; then
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test yes = "$lt_cv_ld_exported_symbols_list"; then
-      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -1109,29 +1087,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  if test yes = "$lt_cv_ld_force_load"; then
-    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
   else
     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
   fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
+  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
   case $cc_basename in
-     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+     ifort*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test yes = "$_lt_dar_can_shared"; then
+  if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
     m4_if([$1], [CXX],
-[   if test yes != "$lt_cv_apple_cc_single_mod"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
     fi
 ],[])
   else
@@ -1151,7 +1129,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
 # Allow to override them for all tags through lt_cv_aix_libpath.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-if test set = "${lt_cv_aix_libpath+set}"; then
+if test "${lt_cv_aix_libpath+set}" = set; then
   aix_libpath=$lt_cv_aix_libpath
 else
   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
@@ -1169,7 +1147,7 @@ else
     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
   fi],[])
   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
-    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
   fi
   ])
   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
@@ -1189,8 +1167,8 @@ m4_define([_LT_SHELL_INIT],
 # -----------------------
 # Find how we can fake an echo command that does not interpret backslash.
 # In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script that will find a shell with a builtin
-# printf (that we can use as an echo command).
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
 m4_defun([_LT_PROG_ECHO_BACKSLASH],
 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
@@ -1218,10 +1196,10 @@ fi
 # Invoke $ECHO with all args, space-separated.
 func_echo_all ()
 {
-    $ECHO "$*"
+    $ECHO "$*" 
 }
 
-case $ECHO in
+case "$ECHO" in
   printf*) AC_MSG_RESULT([printf]) ;;
   print*) AC_MSG_RESULT([print -r]) ;;
   *) AC_MSG_RESULT([cat]) ;;
@@ -1247,17 +1225,16 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 AC_DEFUN([_LT_WITH_SYSROOT],
 [AC_MSG_CHECKING([for sysroot])
 AC_ARG_WITH([sysroot],
-[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
-  [Search for dependent libraries within DIR (or the compiler's sysroot
-   if not specified).])],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
 [], [with_sysroot=no])
 
 dnl lt_sysroot will always be passed unquoted.  We quote it here
 dnl in case the user passed a directory name.
 lt_sysroot=
-case $with_sysroot in #(
+case ${with_sysroot} in #(
  yes)
-   if test yes = "$GCC"; then
+   if test "$GCC" = yes; then
      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
    fi
    ;; #(
@@ -1267,14 +1244,14 @@ case $with_sysroot in #(
  no|'')
    ;; #(
  *)
-   AC_MSG_RESULT([$with_sysroot])
+   AC_MSG_RESULT([${with_sysroot}])
    AC_MSG_ERROR([The sysroot must be an absolute path.])
    ;;
 esac
 
  AC_MSG_RESULT([${lt_sysroot:-no}])
 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
-[dependent libraries, and where our libraries should be installed.])])
+[dependent libraries, and in which our libraries should be installed.])])
 
 # _LT_ENABLE_LOCK
 # ---------------
@@ -1282,33 +1259,31 @@ m4_defun([_LT_ENABLE_LOCK],
 [AC_ARG_ENABLE([libtool-lock],
   [AS_HELP_STRING([--disable-libtool-lock],
     [avoid locking (might break parallel builds)])])
-test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
 case $host in
 ia64-*-hpux*)
-  # Find out what ABI is being produced by ac_compile, and set mode
-  # options accordingly.
+  # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.$ac_objext` in
       *ELF-32*)
-	HPUX_IA64_MODE=32
+	HPUX_IA64_MODE="32"
 	;;
       *ELF-64*)
-	HPUX_IA64_MODE=64
+	HPUX_IA64_MODE="64"
 	;;
     esac
   fi
   rm -rf conftest*
   ;;
 *-*-irix6*)
-  # Find out what ABI is being produced by ac_compile, and set linker
-  # options accordingly.
+  # Find out which ABI we are using.
   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    if test yes = "$lt_cv_prog_gnu_ld"; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
       case `/usr/bin/file conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -melf32bsmip"
@@ -1337,46 +1312,9 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-mips64*-*linux*)
-  # Find out what ABI is being produced by ac_compile, and set linker
-  # options accordingly.
-  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    emul=elf
-    case `/usr/bin/file conftest.$ac_objext` in
-      *32-bit*)
-	emul="${emul}32"
-	;;
-      *64-bit*)
-	emul="${emul}64"
-	;;
-    esac
-    case `/usr/bin/file conftest.$ac_objext` in
-      *MSB*)
-	emul="${emul}btsmip"
-	;;
-      *LSB*)
-	emul="${emul}ltsmip"
-	;;
-    esac
-    case `/usr/bin/file conftest.$ac_objext` in
-      *N32*)
-	emul="${emul}n32"
-	;;
-    esac
-    LD="${LD-ld} -m $emul"
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out what ABI is being produced by ac_compile, and set linker
-  # options accordingly.  Note that the listed cases only cover the
-  # situations where additional linker options are needed (such as when
-  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
-  # vice versa); the common cases where no linker options are needed do
-  # not appear in the list.
+  # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
@@ -1386,19 +1324,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    case `/usr/bin/file conftest.o` in
-	      *x86-64*)
-		LD="${LD-ld} -m elf32_x86_64"
-		;;
-	      *)
-		LD="${LD-ld} -m elf_i386"
-		;;
-	    esac
+	    LD="${LD-ld} -m elf_i386"
 	    ;;
-	  powerpc64le-*linux*)
-	    LD="${LD-ld} -m elf32lppclinux"
-	    ;;
-	  powerpc64-*linux*)
+	  ppc64-*linux*|powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1417,10 +1345,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  powerpcle-*linux*)
-	    LD="${LD-ld} -m elf64lppc"
-	    ;;
-	  powerpc-*linux*)
+	  ppc*-*linux*|powerpc*-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -1438,20 +1363,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS=$CFLAGS
+  SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
     [AC_LANG_PUSH(C)
      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
      AC_LANG_POP])
-  if test yes != "$lt_cv_cc_needs_belf"; then
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS=$SAVE_CFLAGS
+    CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
 *-*solaris*)
-  # Find out what ABI is being produced by ac_compile, and set linker
-  # options accordingly.
+  # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
@@ -1459,7 +1383,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
       case $lt_cv_prog_gnu_ld in
       yes*)
         case $host in
-        i?86-*-solaris*|x86_64-*-solaris*)
+        i?86-*-solaris*)
           LD="${LD-ld} -m elf_x86_64"
           ;;
         sparc*-*-solaris*)
@@ -1468,7 +1392,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
         esac
         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
-          LD=${LD-ld}_sol2
+          LD="${LD-ld}_sol2"
         fi
         ;;
       *)
@@ -1484,7 +1408,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   ;;
 esac
 
-need_locks=$enable_libtool_lock
+need_locks="$enable_libtool_lock"
 ])# _LT_ENABLE_LOCK
 
 
@@ -1503,11 +1427,11 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
      [echo conftest.$ac_objext > conftest.lst
       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
       AC_TRY_EVAL([lt_ar_try])
-      if test 0 -eq "$ac_status"; then
+      if test "$ac_status" -eq 0; then
 	# Ensure the archiver fails upon bogus file names.
 	rm -f conftest.$ac_objext libconftest.a
 	AC_TRY_EVAL([lt_ar_try])
-	if test 0 -ne "$ac_status"; then
+	if test "$ac_status" -ne 0; then
           lt_cv_ar_at_file=@
         fi
       fi
@@ -1515,7 +1439,7 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
      ])
   ])
 
-if test no = "$lt_cv_ar_at_file"; then
+if test "x$lt_cv_ar_at_file" = xno; then
   archiver_list_spec=
 else
   archiver_list_spec=$lt_cv_ar_at_file
@@ -1546,7 +1470,7 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  bitrig* | openbsd*)
+  openbsd*)
     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
@@ -1582,7 +1506,7 @@ AC_CACHE_CHECK([$1], [$2],
   [$2=no
    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
+   lt_compiler_flag="$3"
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -1609,7 +1533,7 @@ AC_CACHE_CHECK([$1], [$2],
    $RM conftest*
 ])
 
-if test yes = "[$]$2"; then
+if test x"[$]$2" = xyes; then
     m4_if([$5], , :, [$5])
 else
     m4_if([$6], , :, [$6])
@@ -1631,7 +1555,7 @@ AC_DEFUN([_LT_LINKER_OPTION],
 m4_require([_LT_DECL_SED])dnl
 AC_CACHE_CHECK([$1], [$2],
   [$2=no
-   save_LDFLAGS=$LDFLAGS
+   save_LDFLAGS="$LDFLAGS"
    LDFLAGS="$LDFLAGS $3"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -1650,10 +1574,10 @@ AC_CACHE_CHECK([$1], [$2],
      fi
    fi
    $RM -r conftest*
-   LDFLAGS=$save_LDFLAGS
+   LDFLAGS="$save_LDFLAGS"
 ])
 
-if test yes = "[$]$2"; then
+if test x"[$]$2" = xyes; then
     m4_if([$4], , :, [$4])
 else
     m4_if([$5], , :, [$5])
@@ -1674,7 +1598,7 @@ AC_DEFUN([LT_CMD_MAX_LEN],
 AC_MSG_CHECKING([the maximum length of command line arguments])
 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   i=0
-  teststring=ABCD
+  teststring="ABCD"
 
   case $build_os in
   msdosdjgpp*)
@@ -1714,7 +1638,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1764,23 +1688,22 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len" && \
-       test undefined != "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8; do
+      for i in 1 2 3 4 5 6 7 8 ; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test 17 != "$i" # 1/2 MB should be enough
+	      test $i != 17 # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -1796,7 +1719,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   esac
 ])
-if test -n "$lt_cv_sys_max_cmd_len"; then
+if test -n $lt_cv_sys_max_cmd_len ; then
   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 else
   AC_MSG_RESULT(none)
@@ -1824,7 +1747,7 @@ m4_defun([_LT_HEADER_DLFCN],
 # ----------------------------------------------------------------
 m4_defun([_LT_TRY_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test yes = "$cross_compiling"; then :
+if test "$cross_compiling" = yes; then :
   [$4]
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -1871,9 +1794,9 @@ else
 #  endif
 #endif
 
-/* When -fvisibility=hidden is used, assume the code has been annotated
+/* When -fvisbility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -1899,7 +1822,7 @@ int main ()
   return status;
 }]
 _LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -1920,7 +1843,7 @@ rm -fr conftest*
 # ------------------
 AC_DEFUN([LT_SYS_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test yes != "$enable_dlopen"; then
+if test "x$enable_dlopen" != xyes; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
   enable_dlopen_self_static=unknown
@@ -1930,52 +1853,44 @@ else
 
   case $host_os in
   beos*)
-    lt_cv_dlopen=load_add_on
+    lt_cv_dlopen="load_add_on"
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
   mingw* | pw32* | cegcc*)
-    lt_cv_dlopen=LoadLibrary
+    lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
     ;;
 
   cygwin*)
-    lt_cv_dlopen=dlopen
+    lt_cv_dlopen="dlopen"
     lt_cv_dlopen_libs=
     ;;
 
   darwin*)
-    # if libdl is installed we need to link against it
+  # if libdl is installed we need to link against it
     AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
-    lt_cv_dlopen=dyld
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ])
     ;;
 
-  tpf*)
-    # Don't try to run any link tests for TPF.  We know it's impossible
-    # because TPF is a cross-compiler, and we know how we open DSOs.
-    lt_cv_dlopen=dlopen
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=no
-    ;;
-
   *)
     AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen=shl_load],
+	  [lt_cv_dlopen="shl_load"],
       [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
 	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen=dlopen],
+	      [lt_cv_dlopen="dlopen"],
 	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
 	      ])
 	    ])
 	  ])
@@ -1984,21 +1899,21 @@ else
     ;;
   esac
 
-  if test no = "$lt_cv_dlopen"; then
-    enable_dlopen=no
-  else
+  if test "x$lt_cv_dlopen" != xno; then
     enable_dlopen=yes
+  else
+    enable_dlopen=no
   fi
 
   case $lt_cv_dlopen in
   dlopen)
-    save_CPPFLAGS=$CPPFLAGS
-    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-    save_LDFLAGS=$LDFLAGS
+    save_LDFLAGS="$LDFLAGS"
     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS=$LIBS
+    save_LIBS="$LIBS"
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     AC_CACHE_CHECK([whether a program can dlopen itself],
@@ -2008,7 +1923,7 @@ else
 	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
     ])
 
-    if test yes = "$lt_cv_dlopen_self"; then
+    if test "x$lt_cv_dlopen_self" = xyes; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 	  lt_cv_dlopen_self_static, [dnl
@@ -2018,9 +1933,9 @@ else
       ])
     fi
 
-    CPPFLAGS=$save_CPPFLAGS
-    LDFLAGS=$save_LDFLAGS
-    LIBS=$save_LIBS
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
     ;;
   esac
 
@@ -2112,8 +2027,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS],
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 _LT_COMPILER_C_O([$1])
 
-hard_links=nottested
-if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
   AC_MSG_CHECKING([if we can lock with hard links])
   hard_links=yes
@@ -2123,8 +2038,8 @@ if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_loc
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   AC_MSG_RESULT([$hard_links])
-  if test no = "$hard_links"; then
-    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
     need_locks=warn
   fi
 else
@@ -2151,8 +2066,8 @@ objdir=$lt_cv_objdir
 _LT_DECL([], [objdir], [0],
          [The name of the directory that contains temporary libtool files])dnl
 m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
-  [Define to the sub-directory where libtool stores uninstalled libraries.])
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
 ])# _LT_CHECK_OBJDIR
 
 
@@ -2164,15 +2079,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 _LT_TAGVAR(hardcode_action, $1)=
 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
   # We can hardcode non-existent directories.
-  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
+  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
-     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
     # Linking always hardcodes the temporary library directory.
     _LT_TAGVAR(hardcode_action, $1)=relink
   else
@@ -2186,12 +2101,12 @@ else
 fi
 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
-if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
-   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test yes = "$shlibpath_overrides_runpath" ||
-     test no = "$enable_shared"; then
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -2215,7 +2130,7 @@ else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
   darwin*)
-    if test -n "$STRIP"; then
+    if test -n "$STRIP" ; then
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       AC_MSG_RESULT([yes])
@@ -2233,47 +2148,6 @@ _LT_DECL([], [striplib], [1])
 ])# _LT_CMD_STRIPLIB
 
 
-# _LT_PREPARE_MUNGE_PATH_LIST
-# ---------------------------
-# Make sure func_munge_path_list() is defined correctly.
-m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
-[[# func_munge_path_list VARIABLE PATH
-# -----------------------------------
-# VARIABLE is name of variable containing _space_ separated list of
-# directories to be munged by the contents of PATH, which is string
-# having a format:
-# "DIR[:DIR]:"
-#       string "DIR[ DIR]" will be prepended to VARIABLE
-# ":DIR[:DIR]"
-#       string "DIR[ DIR]" will be appended to VARIABLE
-# "DIRP[:DIRP]::[DIRA:]DIRA"
-#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
-#       "DIRA[ DIRA]" will be appended to VARIABLE
-# "DIR[:DIR]"
-#       VARIABLE will be replaced by "DIR[ DIR]"
-func_munge_path_list ()
-{
-    case x at S|@2 in
-    x)
-        ;;
-    *:)
-        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
-        ;;
-    x:*)
-        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
-        ;;
-    *::*)
-        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
-        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
-        ;;
-    *)
-        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
-        ;;
-    esac
-}
-]])# _LT_PREPARE_PATH_LIST
-
-
 # _LT_SYS_DYNAMIC_LINKER([TAG])
 # -----------------------------
 # PORTME Fill in your ld.so characteristics
@@ -2284,18 +2158,17 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_OBJDUMP])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
 AC_MSG_CHECKING([dynamic linker characteristics])
 m4_if([$1],
 	[], [
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
   case $host_os in
-    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
-    *) lt_awk_arg='/^libraries:/' ;;
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
   esac
   case $host_os in
-    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
-    *) lt_sed_strip_eq='s|=/|/|g' ;;
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
   esac
   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
   case $lt_search_path_spec in
@@ -2311,35 +2184,28 @@ if test yes = "$GCC"; then
     ;;
   esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary...
+  # and add multilib dir if necessary.
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  # ...but if some path component already ends with the multilib dir we assume
-  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
-  case "$lt_multi_os_dir; $lt_search_path_spec " in
-  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
-    lt_multi_os_dir=
-    ;;
-  esac
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
   for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
-    elif test -n "$lt_multi_os_dir"; then
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
       test -d "$lt_sys_path" && \
 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS = " "; FS = "/|\n";} {
-  lt_foo = "";
-  lt_count = 0;
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo = "/" $lt_i lt_foo;
+          lt_foo="/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -2353,7 +2219,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
   # for these hosts.
   case $host_os in
     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
-      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
+      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
   esac
   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
@@ -2362,7 +2228,7 @@ fi])
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=.so
+shrext_cmds=".so"
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -2379,17 +2245,14 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
-AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
-[User-defined run-time library search path.])
-
 case $host_os in
 aix3*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='$libname$release$shared_ext$major'
+  soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
 aix[[4-9]]*)
@@ -2397,91 +2260,41 @@ aix[[4-9]]*)
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test ia64 = "$host_cpu"; then
+  if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
-    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line '#! .'.  This would cause the generated library to
-    # depend on '.', always an invalid library.  This was fixed in
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[[01]] | aix4.[[01]].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # Using Import Files as archive members, it is possible to support
-    # filename-based versioning of shared library archives on AIX. While
-    # this would work for both with and without runtime linking, it will
-    # prevent static linking of such archives. So we do filename-based
-    # shared library versioning with .so extension only, which is used
-    # when both runtime linking and shared linking is enabled.
-    # Unfortunately, runtime linking may impact performance, so we do
-    # not want this to be the default eventually. Also, we use the
-    # versioned .so libs for executables only if there is the -brtl
-    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
-    # To allow for filename-based versioning support, we need to create
-    # libNAME.so.V as an archive file, containing:
-    # *) an Import File, referring to the versioned filename of the
-    #    archive as well as the shared archive member, telling the
-    #    bitwidth (32 or 64) of that shared object, and providing the
-    #    list of exported symbols of that shared object, eventually
-    #    decorated with the 'weak' keyword
-    # *) the shared object with the F_LOADONLY flag set, to really avoid
-    #    it being seen by the linker.
-    # At run time we better use the real file rather than another symlink,
-    # but for link time we create the symlink libNAME.so -> libNAME.so.V
-
-    case $with_aix_soname,$aix_use_runtimelinking in
-    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    aix,yes) # traditional libtool
-      dynamic_linker='AIX unversionable lib.so'
+    if test "$aix_use_runtimelinking" = yes; then
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-      ;;
-    aix,no) # traditional AIX only
-      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='$libname$release.a $libname.a'
-      soname_spec='$libname$release$shared_ext$major'
-      ;;
-    svr4,*) # full svr4 only
-      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
-      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
-      # We do not specify a path in Import Files, so LIBPATH fires.
-      shlibpath_overrides_runpath=yes
-      ;;
-    *,yes) # both, prefer svr4
-      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
-      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
-      # unpreferred sharedlib libNAME.a needs extra handling
-      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
-      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
-      # We do not specify a path in Import Files, so LIBPATH fires.
-      shlibpath_overrides_runpath=yes
-      ;;
-    *,no) # both, prefer aix
-      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
-      library_names_spec='$libname$release.a $libname.a'
-      soname_spec='$libname$release$shared_ext$major'
-      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
-      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
-      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
-      ;;
-    esac
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -2491,18 +2304,18 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='$libname$shared_ext'
+  library_names_spec='${libname}${shared_ext}'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
@@ -2510,8 +2323,8 @@ beos*)
 bsdi[[45]]*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -2523,7 +2336,7 @@ bsdi[[45]]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=.dll
+  shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
 
@@ -2532,8 +2345,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \$file`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -2549,17 +2362,17 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 m4_if([$1], [],[
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
@@ -2568,8 +2381,8 @@ m4_if([$1], [],[
   *,cl*)
     # Native MSVC
     libname_spec='$name'
-    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
-    library_names_spec='$libname.dll.lib'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
 
     case $build_os in
     mingw*)
@@ -2596,7 +2409,7 @@ m4_if([$1], [],[
       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       ;;
     *)
-      sys_lib_search_path_spec=$LIB
+      sys_lib_search_path_spec="$LIB"
       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
         # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -2609,8 +2422,8 @@ m4_if([$1], [],[
     esac
 
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \$file`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname'
@@ -2623,7 +2436,7 @@ m4_if([$1], [],[
 
   *)
     # Assume MSVC wrapper
-    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
   esac
@@ -2636,8 +2449,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
-  soname_spec='$libname$release$major$shared_ext'
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -2650,8 +2463,8 @@ dgux*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -2669,13 +2482,12 @@ freebsd* | dragonfly*)
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-      soname_spec='$libname$release$shared_ext$major'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
       need_version=yes
       ;;
   esac
@@ -2700,15 +2512,26 @@ freebsd* | dragonfly*)
   esac
   ;;
 
+gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 haiku*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=no
+  shlibpath_overrides_runpath=yes
   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
@@ -2726,15 +2549,14 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
-    if test 32 = "$HPUX_IA64_MODE"; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -2742,8 +2564,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -2752,8 +2574,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -2766,8 +2588,8 @@ interix[[3-9]]*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -2778,7 +2600,7 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test yes = "$lt_cv_prog_gnu_ld"; then
+	if test "$lt_cv_prog_gnu_ld" = yes; then
 		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
@@ -2786,8 +2608,8 @@ irix5* | irix6* | nonstopux*)
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='$libname$release$shared_ext$major'
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -2806,8 +2628,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
-  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
   hardcode_into_libs=yes
   ;;
 
@@ -2816,33 +2638,13 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-linux*android*)
-  version_type=none # Android doesn't support versioned libraries.
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='$libname$release$shared_ext'
-  soname_spec='$libname$release$shared_ext'
-  finish_cmds=
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  dynamic_linker='Android linker'
-  # Don't embed -rpath directories since the linker doesn't support them.
-  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-  ;;
-
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -2867,15 +2669,14 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Ideally, we could use ldconfig to report *all* directores which are
-  # searched for libraries, however this is still not possible.  Aside from not
-  # being certain /sbin/ldconfig is available, command
-  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
-  # even though it is searched at run-time.  Try to do the best guess by
-  # appending ld.so.conf contents (and includes) to the search path.
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -2887,29 +2688,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-    soname_spec='$libname$release$shared_ext$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -2919,7 +2708,7 @@ netbsd*)
 
 newsos6)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -2928,68 +2717,58 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd* | bitrig*)
+openbsd*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec=/usr/lib
+  sys_lib_dlsearch_path_spec="/usr/lib"
   need_lib_prefix=no
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
-    need_version=no
-  else
-    need_version=yes
-  fi
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
   ;;
 
 os2*)
   libname_spec='$name'
-  version_type=windows
-  shrext_cmds=.dll
-  need_version=no
+  shrext_cmds=".dll"
   need_lib_prefix=no
-  # OS/2 can only load a DLL with a base name of 8 characters or less.
-  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
-    v=$($ECHO $release$versuffix | tr -d .-);
-    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
-    $ECHO $n$v`$shared_ext'
-  library_names_spec='${libname}_dll.$libext'
+  library_names_spec='$libname${shared_ext} $libname.a'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=BEGINLIBPATH
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  postinstall_cmds='base_file=`basename \$file`~
-    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
-    dldir=$destdir/`dirname \$dlpath`~
-    test -d \$dldir || mkdir -p \$dldir~
-    $install_prog $dir/$dlname \$dldir/$dlname~
-    chmod a+x \$dldir/$dlname~
-    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-    fi'
-  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
-    dlpath=$dir/\$dldll~
-    $RM \$dlpath'
+  shlibpath_var=LIBPATH
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='$libname$release$shared_ext$major'
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
   ;;
 
 rdos*)
@@ -3000,8 +2779,8 @@ solaris*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -3011,11 +2790,11 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test yes = "$with_gnu_ld"; then
+  if test "$with_gnu_ld" = yes; then
     need_lib_prefix=no
   fi
   need_version=yes
@@ -3023,8 +2802,8 @@ sunos4*)
 
 sysv4 | sysv4.3*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -3045,24 +2824,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec; then
+  if test -d /usr/nec ;then
     version_type=linux # correct to gnu/linux during the next big refactor
-    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
-    soname_spec='$libname$shared_ext.$major'
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=sco
+  version_type=freebsd-elf
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test yes = "$with_gnu_ld"; then
+  if test "$with_gnu_ld" = yes; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -3080,7 +2859,7 @@ tpf*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
@@ -3088,8 +2867,8 @@ tpf*)
 
 uts4*)
   version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
-  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -3098,30 +2877,20 @@ uts4*)
   ;;
 esac
 AC_MSG_RESULT([$dynamic_linker])
-test no = "$dynamic_linker" && can_build_shared=no
+test "$dynamic_linker" = no && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
-  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
 fi
-
-if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
-  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 fi
 
-# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
-configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
-
-# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
-func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
-
-# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
-configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
-
 _LT_DECL([], [variables_saved_for_relink], [1],
     [Variables whose values should be saved in libtool wrapper scripts and
     restored at link time])
@@ -3154,41 +2923,39 @@ _LT_DECL([], [hardcode_into_libs], [0],
     [Whether we should hardcode library paths into libraries])
 _LT_DECL([], [sys_lib_search_path_spec], [2],
     [Compile-time system search path for libraries])
-_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
-    [Detected run-time system search path for libraries])
-_LT_DECL([], [configure_time_lt_sys_library_path], [2],
-    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
 ])# _LT_SYS_DYNAMIC_LINKER
 
 
 # _LT_PATH_TOOL_PREFIX(TOOL)
 # --------------------------
-# find a file program that can recognize shared library
+# find a file program which can recognize shared library
 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 [m4_require([_LT_DECL_EGREP])dnl
 AC_MSG_CHECKING([for $1])
 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 [case $MAGIC_CMD in
 [[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD=$MAGIC_CMD
-  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
   ac_dummy="m4_if([$2], , $PATH, [$2])"
   for ac_dir in $ac_dummy; do
-    IFS=$lt_save_ifs
+    IFS="$lt_save_ifs"
     test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$1"; then
-      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
@@ -3211,11 +2978,11 @@ _LT_EOF
       break
     fi
   done
-  IFS=$lt_save_ifs
-  MAGIC_CMD=$lt_save_MAGIC_CMD
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
   ;;
 esac])
-MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 if test -n "$MAGIC_CMD"; then
   AC_MSG_RESULT($MAGIC_CMD)
 else
@@ -3233,7 +3000,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
 # _LT_PATH_MAGIC
 # --------------
-# find a file program that can recognize a shared library
+# find a file program which can recognize a shared library
 m4_defun([_LT_PATH_MAGIC],
 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -3260,16 +3027,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 AC_ARG_WITH([gnu-ld],
     [AS_HELP_STRING([--with-gnu-ld],
 	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test no = "$withval" || with_gnu_ld=yes],
+    [test "$withval" = no || with_gnu_ld=yes],
     [with_gnu_ld=no])dnl
 
 ac_prog=ld
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
   AC_MSG_CHECKING([for ld used by $CC])
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return, which upsets mingw
+    # gcc leaves a trailing carriage return which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -3283,7 +3050,7 @@ if test yes = "$GCC"; then
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD=$ac_prog
+      test -z "$LD" && LD="$ac_prog"
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -3294,37 +3061,37 @@ if test yes = "$GCC"; then
     with_gnu_ld=unknown
     ;;
   esac
-elif test yes = "$with_gnu_ld"; then
+elif test "$with_gnu_ld" = yes; then
   AC_MSG_CHECKING([for GNU ld])
 else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
 AC_CACHE_VAL(lt_cv_path_LD,
 [if test -z "$LD"; then
-  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS=$lt_save_ifs
+    IFS="$lt_save_ifs"
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD=$ac_dir/$ac_prog
+      lt_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-	test no != "$with_gnu_ld" && break
+	test "$with_gnu_ld" != no && break
 	;;
       *)
-	test yes != "$with_gnu_ld" && break
+	test "$with_gnu_ld" != yes && break
 	;;
       esac
     fi
   done
-  IFS=$lt_save_ifs
+  IFS="$lt_save_ifs"
 else
-  lt_cv_path_LD=$LD # Let the user override the test with a path.
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 fi])
-LD=$lt_cv_path_LD
+LD="$lt_cv_path_LD"
 if test -n "$LD"; then
   AC_MSG_RESULT($LD)
 else
@@ -3378,13 +3145,13 @@ esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    if test yes != "$GCC"; then
+    if test "$GCC" != yes; then
       reload_cmds=false
     fi
     ;;
   darwin*)
-    if test yes = "$GCC"; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
@@ -3395,43 +3162,6 @@ _LT_TAGDECL([], [reload_cmds], [2])dnl
 ])# _LT_CMD_RELOAD
 
 
-# _LT_PATH_DD
-# -----------
-# find a working dd
-m4_defun([_LT_PATH_DD],
-[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
-[printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-: ${lt_DD:=$DD}
-AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
-[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
-  cmp -s conftest.i conftest.out \
-  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
-fi])
-rm -f conftest.i conftest2.i conftest.out])
-])# _LT_PATH_DD
-
-
-# _LT_CMD_TRUNCATE
-# ----------------
-# find command to truncate a binary pipe
-m4_defun([_LT_CMD_TRUNCATE],
-[m4_require([_LT_PATH_DD])
-AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
-[printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-lt_cv_truncate_bin=
-if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
-  cmp -s conftest.i conftest.out \
-  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
-fi
-rm -f conftest.i conftest2.i conftest.out
-test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
-_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
-  [Command to truncate a binary pipe])
-])# _LT_CMD_TRUNCATE
-
-
 # _LT_CHECK_MAGIC_METHOD
 # ----------------------
 # how to check for library dependencies
@@ -3447,13 +3177,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# 'unknown' -- same as none, but documents that we really don't know.
+# `unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# that responds to the $file_magic_cmd with a given extended regex.
-# If you have 'file' or equivalent on your system and you're not sure
-# whether 'pass_all' will *always* work, you probably want this one.
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[[4-9]]*)
@@ -3480,7 +3210,8 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
@@ -3516,6 +3247,10 @@ freebsd* | dragonfly*)
   fi
   ;;
 
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3554,11 +3289,11 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd* | netbsdelf*-gnu)
+netbsd*)
   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   else
@@ -3576,8 +3311,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd* | bitrig*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
@@ -3630,9 +3365,6 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
-os2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 esac
 ])
 
@@ -3673,38 +3405,33 @@ AC_DEFUN([LT_PATH_NM],
 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 [if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM=$NM
+  lt_cv_path_NM="$NM"
 else
-  lt_nm_to_check=${ac_tool_prefix}nm
+  lt_nm_to_check="${ac_tool_prefix}nm"
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm=$ac_dir/$lt_tmp_nm
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
 	#   nm: unknown option "B" ignored
 	# Tru64's nm complains that /dev/null is an invalid object file
-	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
-	case $build_os in
-	mingw*) lt_bad_file=conftest.nm/nofile ;;
-	*) lt_bad_file=/dev/null ;;
-	esac
-	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
-	*$lt_bad_file* | *'Invalid file or object type'*)
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
-	  break 2
+	  break
 	  ;;
 	*)
 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
-	    break 2
+	    break
 	    ;;
 	  *)
 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -3715,21 +3442,21 @@ else
 	esac
       fi
     done
-    IFS=$lt_save_ifs
+    IFS="$lt_save_ifs"
   done
   : ${lt_cv_path_NM=no}
 fi])
-if test no != "$lt_cv_path_NM"; then
-  NM=$lt_cv_path_NM
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
   if test -n "$DUMPBIN"; then :
     # Let the user override the test.
   else
     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
-    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
     *COFF*)
-      DUMPBIN="$DUMPBIN -symbols -headers"
+      DUMPBIN="$DUMPBIN -symbols"
       ;;
     *)
       DUMPBIN=:
@@ -3737,8 +3464,8 @@ else
     esac
   fi
   AC_SUBST([DUMPBIN])
-  if test : != "$DUMPBIN"; then
-    NM=$DUMPBIN
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
   fi
 fi
 test -z "$NM" && NM=nm
@@ -3784,8 +3511,8 @@ lt_cv_sharedlib_from_linklib_cmd,
 
 case $host_os in
 cygwin* | mingw* | pw32* | cegcc*)
-  # two different shell functions defined in ltmain.sh;
-  # decide which one to use based on capabilities of $DLLTOOL
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
   case `$DLLTOOL --help 2>&1` in
   *--identify-strict*)
     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -3797,7 +3524,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   ;;
 *)
   # fallback: assume linklib IS sharedlib
-  lt_cv_sharedlib_from_linklib_cmd=$ECHO
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
   ;;
 esac
 ])
@@ -3824,28 +3551,13 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool
     lt_cv_path_mainfest_tool=yes
   fi
   rm -f conftest*])
-if test yes != "$lt_cv_path_mainfest_tool"; then
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
   MANIFEST_TOOL=:
 fi
 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
 ])# _LT_PATH_MANIFEST_TOOL
 
 
-# _LT_DLL_DEF_P([FILE])
-# ---------------------
-# True iff FILE is a Windows DLL '.def' file.
-# Keep in sync with func_dll_def_p in the libtool script
-AC_DEFUN([_LT_DLL_DEF_P],
-[dnl
-  test DEF = "`$SED -n dnl
-    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
-    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
-    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
-    -e q dnl                          Only consider the first "real" line
-    $1`" dnl
-])# _LT_DLL_DEF_P
-
-
 # LT_LIB_M
 # --------
 # check for math library
@@ -3857,11 +3569,11 @@ case $host in
   # These system don't have libm, or don't need it
   ;;
 *-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
   ;;
 *)
-  AC_CHECK_LIB(m, cos, LIBM=-lm)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
   ;;
 esac
 AC_SUBST([LIBM])
@@ -3880,7 +3592,7 @@ m4_defun([_LT_COMPILER_NO_RTTI],
 
 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
   case $cc_basename in
   nvcc*)
     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
@@ -3932,7 +3644,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[[ABCDGISTW]]'
   ;;
 hpux*)
-  if test ia64 = "$host_cpu"; then
+  if test "$host_cpu" = ia64; then
     symcode='[[ABCDEGRST]]'
   fi
   ;;
@@ -3965,44 +3677,14 @@ case `$NM -V 2>&1` in
   symcode='[[ABCDGIRSTW]]' ;;
 esac
 
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-  # Gets list of data symbols to import.
-  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
-  # Adjust the below global symbol transforms to fixup imported variables.
-  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
-  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
-  lt_c_name_lib_hook="\
-  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
-  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
-else
-  # Disable hooks by default.
-  lt_cv_sys_global_symbol_to_import=
-  lt_cdecl_hook=
-  lt_c_name_hook=
-  lt_c_name_lib_hook=
-fi
-
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
-$lt_cdecl_hook\
-" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
-$lt_c_name_hook\
-" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
-
-# Transform an extracted symbol line into symbol name with lib prefix and
-# symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
-$lt_c_name_lib_hook\
-" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -4020,24 +3702,21 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function,
-    # D for any global variable and I for any imported variable.
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
-"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
-"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
-"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
-"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx]"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -4077,11 +3756,11 @@ _LT_EOF
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
-/* DATA imports from DLLs on WIN32 can't be const, because runtime
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
    relocations are performed -- see ld's documentation on pseudo-relocs.  */
 # define LT@&t at _DLSYM_CONST
-#elif defined __osf__
+#elif defined(__osf__)
 /* This system does not cope well with relocations in const data.  */
 # define LT@&t at _DLSYM_CONST
 #else
@@ -4107,7 +3786,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 	  cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -4127,9 +3806,9 @@ _LT_EOF
 	  mv conftest.$ac_objext conftstm.$ac_objext
 	  lt_globsym_save_LIBS=$LIBS
 	  lt_globsym_save_CFLAGS=$CFLAGS
-	  LIBS=conftstm.$ac_objext
+	  LIBS="conftstm.$ac_objext"
 	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
 	  LIBS=$lt_globsym_save_LIBS
@@ -4150,7 +3829,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test yes = "$pipe_works"; then
+  if test "$pipe_works" = yes; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -4177,16 +3856,12 @@ _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
     [Take the output of nm and produce a listing of raw symbols and C names])
 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
     [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
-    [Transform the output of nm into a list of symbols to manually relocate])
 _LT_DECL([global_symbol_to_c_name_address],
     [lt_cv_sys_global_symbol_to_c_name_address], [1],
     [Transform the output of nm in a C name address pair])
 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
     [Transform the output of nm in a C name address pair when lib prefix is needed])
-_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
-    [The name lister interface])
 _LT_DECL([], [nm_file_list_spec], [1],
     [Specify filename containing input files for $NM])
 ]) # _LT_CMD_GLOBAL_SYMBOLS
@@ -4202,18 +3877,17 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
 m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
-  if test yes = "$GXX"; then
+  if test "$GXX" = yes; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
     aix*)
       # All AIX code is PIC.
-      if test ia64 = "$host_cpu"; then
+      if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -4224,8 +3898,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the '-m68020' flag to GCC prevents building anything better,
-            # like '-m68040'.
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -4241,11 +3915,6 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      case $host_os in
-      os2*)
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
-	;;
-      esac
       ;;
     darwin* | rhapsody*)
       # PIC is the default on this platform
@@ -4295,7 +3964,7 @@ m4_if([$1], [CXX], [
     case $host_os in
       aix[[4-9]]*)
 	# All AIX code is PIC.
-	if test ia64 = "$host_cpu"; then
+	if test "$host_cpu" = ia64; then
 	  # AIX 5 now supports IA64 processor
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	else
@@ -4336,14 +4005,14 @@ m4_if([$1], [CXX], [
 	case $cc_basename in
 	  CC*)
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
-	    if test ia64 != "$host_cpu"; then
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 	    fi
 	    ;;
 	  aCC*)
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 	    case $host_cpu in
 	    hppa*64*|ia64*)
 	      # +Z the default
@@ -4372,7 +4041,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -4380,7 +4049,7 @@ m4_if([$1], [CXX], [
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 	    ;;
 	  ecpc* )
-	    # old Intel C++ for x86_64, which still supported -KPIC.
+	    # old Intel C++ for x86_64 which still supported -KPIC.
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
@@ -4436,7 +4105,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      netbsd* | netbsdelf*-gnu)
+      netbsd*)
 	;;
       *qnx* | *nto*)
         # QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4525,18 +4194,17 @@ m4_if([$1], [CXX], [
   fi
 ],
 [
-  if test yes = "$GCC"; then
+  if test "$GCC" = yes; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test ia64 = "$host_cpu"; then
+      if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -4547,8 +4215,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the '-m68020' flag to GCC prevents building anything better,
-            # like '-m68040'.
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -4565,11 +4233,6 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      case $host_os in
-      os2*)
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
-	;;
-      esac
       ;;
 
     darwin* | rhapsody*)
@@ -4640,7 +4303,7 @@ m4_if([$1], [CXX], [
     case $host_os in
     aix*)
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test ia64 = "$host_cpu"; then
+      if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       else
@@ -4648,30 +4311,11 @@ m4_if([$1], [CXX], [
       fi
       ;;
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      case $cc_basename in
-      nagfor*)
-        # NAG Fortran compiler
-        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
-        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-        ;;
-      esac
-      ;;
-
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       m4_if([$1], [GCJ], [],
 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      case $host_os in
-      os2*)
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
-	;;
-      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -4687,7 +4331,7 @@ m4_if([$1], [CXX], [
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -4696,9 +4340,9 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
-      # old Intel for x86_64, which still supported -KPIC.
+      # old Intel for x86_64 which still supported -KPIC.
       ecc*)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4723,12 +4367,6 @@ m4_if([$1], [CXX], [
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	;;
-      tcc*)
-	# Fabrice Bellard et al's Tiny C Compiler
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-	;;
       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
@@ -4826,7 +4464,7 @@ m4_if([$1], [CXX], [
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec; then
+      if test -d /usr/nec ;then
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
@@ -4855,7 +4493,7 @@ m4_if([$1], [CXX], [
   fi
 ])
 case $host_os in
-  # For platforms that do not support PIC, -DPIC is meaningless:
+  # For platforms which do not support PIC, -DPIC is meaningless:
   *djgpp*)
     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
     ;;
@@ -4921,21 +4559,17 @@ m4_if([$1], [CXX], [
   case $host_os in
   aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
-    # Without the "-l" option, or with the "-B" option, AIX nm treats
-    # weak defined symbols like other global defined symbols, whereas
-    # GNU nm marks them as "W".
-    # While the 'weak' keyword is ignored in the Export File, we need
-    # it in the Import File for the 'aix-soname' feature, so we have
-    # to replace the "-B" option with "-P" for AIX nm.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     else
-      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
+    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
@@ -4948,9 +4582,6 @@ m4_if([$1], [CXX], [
       ;;
     esac
     ;;
-  linux* | k*bsd*-gnu | gnu*)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
     ;;
@@ -4984,9 +4615,9 @@ m4_if([$1], [CXX], [
   # included in the symbol list
   _LT_TAGVAR(include_expsyms, $1)=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ' (' and ')$', so one must not match beginning or
-  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
-  # as well as any symbol that contains 'd'.
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -5002,7 +4633,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test yes != "$GCC"; then
+    if test "$GCC" != yes; then
       with_gnu_ld=no
     fi
     ;;
@@ -5010,12 +4641,9 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd* | bitrig*)
+  openbsd*)
     with_gnu_ld=no
     ;;
-  linux* | k*bsd*-gnu | gnu*)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
@@ -5023,7 +4651,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
   # On some targets, GNU ld is compatible enough with the native linker
   # that we're better off using the native interface for both.
   lt_use_gnu_ld_interface=no
-  if test yes = "$with_gnu_ld"; then
+  if test "$with_gnu_ld" = yes; then
     case $host_os in
       aix*)
 	# The AIX port of GNU ld has always aspired to compatibility
@@ -5045,24 +4673,24 @@ dnl Note also adjust exclude_expsyms for C++ above.
     esac
   fi
 
-  if test yes = "$lt_use_gnu_ld_interface"; then
+  if test "$lt_use_gnu_ld_interface" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='$wl'
+    wlarc='${wl}'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
     else
       _LT_TAGVAR(whole_archive_flag_spec, $1)=
     fi
     supports_anon_versioning=no
-    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+    case `$LD -v 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -5075,7 +4703,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     case $host_os in
     aix[[3-9]]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test ia64 != "$host_cpu"; then
+      if test "$host_cpu" != ia64; then
 	_LT_TAGVAR(ld_shlibs, $1)=no
 	cat <<_LT_EOF 1>&2
 
@@ -5094,7 +4722,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -5110,7 +4738,7 @@ _LT_EOF
 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -5120,7 +4748,7 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_TAGVAR(always_export_symbols, $1)=no
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -5128,89 +4756,61 @@ _LT_EOF
       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file, use it as
-	# is; otherwise, prepend EXPORTS...
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
-          cp $export_symbols $output_objdir/$soname.def;
-        else
-          echo EXPORTS > $output_objdir/$soname.def;
-          cat $export_symbols >> $output_objdir/$soname.def;
-        fi~
-        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
     haiku*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
-    os2*)
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      shrext_cmds=.dll
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	$ECHO EXPORTS >> $output_objdir/$libname.def~
-	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
-	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	emximp -o $lib $output_objdir/$libname.def'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	$ECHO EXPORTS >> $output_objdir/$libname.def~
-	prefix_cmds="$SED"~
-	if test EXPORTS = "`$SED 1q $export_symbols`"; then
-	  prefix_cmds="$prefix_cmds -e 1d";
-	fi~
-	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
-	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
-	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	emximp -o $lib $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      ;;
-
     interix[[3-9]]*)
       _LT_TAGVAR(hardcode_direct, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test linux-dietlibc = "$host_os"; then
+      if test "$host_os" = linux-dietlibc; then
 	case $cc_basename in
 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
 	esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test no = "$tmp_diet"
+	 && test "$tmp_diet" = no
       then
 	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
 	pgf77* | pgf90* | pgf95* | pgfortran*)
 					# Portland Group f77 and f90 compilers
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -5221,47 +4821,42 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 	  tmp_sharedflag='--shared' ;;
-        nagfor*)                        # NAGFOR 5.3
-          tmp_sharedflag='-Wl,-shared' ;;
 	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
 	nvcc*)	# Cuda Compiler Driver 2.2
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
 	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
 	  tmp_sharedflag='-G' ;;
 	esac
-	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-        if test yes = "$supports_anon_versioning"; then
+        if test "x$supports_anon_versioning" = xyes; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-            echo "local: *; };" >> $output_objdir/$libname.ver~
-            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
         fi
 
 	case $cc_basename in
-	tcc*)
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
-	  ;;
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
-	  if test yes = "$supports_anon_versioning"; then
+	  if test "x$supports_anon_versioning" = xyes; then
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-              echo "local: *; };" >> $output_objdir/$libname.ver~
-              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -5270,13 +4865,13 @@ _LT_EOF
       fi
       ;;
 
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -5294,8 +4889,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -5307,7 +4902,7 @@ _LT_EOF
 	_LT_TAGVAR(ld_shlibs, $1)=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -5322,9 +4917,9 @@ _LT_EOF
 	  # DT_RUNPATH tag from executables and libraries.  But doing so
 	  # requires that you compile everything twice, which is a pain.
 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 	  else
 	    _LT_TAGVAR(ld_shlibs, $1)=no
 	  fi
@@ -5341,15 +4936,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
     esac
 
-    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
       runpath_var=
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
@@ -5365,7 +4960,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
 	_LT_TAGVAR(hardcode_direct, $1)=unsupported
@@ -5373,57 +4968,34 @@ _LT_EOF
       ;;
 
     aix[[4-9]]*)
-      if test ia64 = "$host_cpu"; then
+      if test "$host_cpu" = ia64; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
 	aix_use_runtimelinking=no
 	exp_sym_flag='-Bexport'
-	no_entry_flag=
+	no_entry_flag=""
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
-	# Without the "-l" option, or with the "-B" option, AIX nm treats
-	# weak defined symbols like other global defined symbols, whereas
-	# GNU nm marks them as "W".
-	# While the 'weak' keyword is ignored in the Export File, we need
-	# it in the Import File for the 'aix-soname' feature, so we have
-	# to replace the "-B" option with "-P" for AIX nm.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
-	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# have runtime linking enabled, and use it for executables.
-	# For shared libraries, we enable/disable runtime linking
-	# depending on the kind of the shared library created -
-	# when "with_aix_soname,aix_use_runtimelinking" is:
-	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
-	# "aix,yes"  lib.so          shared, rtl:yes, for executables
-	#            lib.a           static archive
-	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
-	#            lib.a(lib.so.V) shared, rtl:no,  for executables
-	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
-	#            lib.a(lib.so.V) shared, rtl:no
-	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
-	#            lib.a           static archive
+	# need to do runtime linking.
 	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 	  for ld_flag in $LDFLAGS; do
-	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 	    aix_use_runtimelinking=yes
 	    break
 	  fi
 	  done
-	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
-	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
-	    # so we don't have lib.a shared libs to link our executables.
-	    # We have to force runtime linking in this case.
-	    aix_use_runtimelinking=yes
-	    LDFLAGS="$LDFLAGS -Wl,-brtl"
-	  fi
 	  ;;
 	esac
 
@@ -5442,21 +5014,13 @@ _LT_EOF
       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
-      case $with_aix_soname,$aix_use_runtimelinking in
-      aix,*) ;; # traditional, no import file
-      svr4,* | *,yes) # use import file
-	# The Import File defines what to hardcode.
-	_LT_TAGVAR(hardcode_direct, $1)=no
-	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-	;;
-      esac
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
-      if test yes = "$GCC"; then
+      if test "$GCC" = yes; then
 	case $host_os in aix4.[[012]]|aix4.[[012]].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`$CC -print-prog-name=collect2`
+	  collect2name=`${CC} -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -5475,80 +5039,61 @@ _LT_EOF
 	  ;;
 	esac
 	shared_flag='-shared'
-	if test yes = "$aix_use_runtimelinking"; then
-	  shared_flag="$shared_flag "'$wl-G'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
 	fi
-	# Need to ensure runtime linking is disabled for the traditional
-	# shared library, or the linker may eventually find shared libraries
-	# /with/ Import File - we do not want to mix them.
-	shared_flag_aix='-shared'
-	shared_flag_svr4='-shared $wl-G'
       else
 	# not using gcc
-	if test ia64 = "$host_cpu"; then
+	if test "$host_cpu" = ia64; then
 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	# chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
 	else
-	  if test yes = "$aix_use_runtimelinking"; then
-	    shared_flag='$wl-G'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
 	  else
-	    shared_flag='$wl-bM:SRE'
+	    shared_flag='${wl}-bM:SRE'
 	  fi
-	  shared_flag_aix='$wl-bM:SRE'
-	  shared_flag_svr4='$wl-G'
 	fi
       fi
 
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+      if test "$aix_use_runtimelinking" = yes; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
 	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
         _LT_SYS_MODULE_PATH_AIX([$1])
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
-	if test ia64 = "$host_cpu"; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+	if test "$host_cpu" = ia64; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
 	 _LT_SYS_MODULE_PATH_AIX([$1])
-	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
-	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
-	  if test yes = "$with_gnu_ld"; then
+	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  if test "$with_gnu_ld" = yes; then
 	    # We only use this code for GNU lds that support --whole-archive.
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 	  else
 	    # Exported symbols can be pulled into shared objects from archives
 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 	  fi
 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
-	  # -brtl affects multiple linker settings, -berok does not and is overridden later
-	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
-	  if test svr4 != "$with_aix_soname"; then
-	    # This is similar to how AIX traditionally builds its shared libraries.
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
-	  fi
-	  if test aix != "$with_aix_soname"; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 3 [...]
-	  else
-	    # used by -dlpreopen to get the symbols
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
-	  fi
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 	fi
       fi
       ;;
@@ -5557,7 +5102,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -5587,17 +5132,16 @@ _LT_EOF
 	# Tell ltmain to make .lib files, not .a files.
 	libext=lib
 	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=.dll
+	shrext_cmds=".dll"
 	# FIXME: Setting linknames here is a bad hack.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
-            cp "$export_symbols" "$output_objdir/$soname.def";
-            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
-          else
-            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
-          fi~
-          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-          linknames='
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -5606,18 +5150,18 @@ _LT_EOF
 	# Don't use ranlib
 	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-          lt_tool_outputfile="@TOOL_OUTPUT@"~
-          case $lt_outputfile in
-            *.exe|*.EXE) ;;
-            *)
-              lt_outputfile=$lt_outputfile.exe
-              lt_tool_outputfile=$lt_tool_outputfile.exe
-              ;;
-          esac~
-          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
-            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-            $RM "$lt_outputfile.manifest";
-          fi'
+	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+	  case $lt_outputfile in
+	    *.exe|*.EXE) ;;
+	    *)
+	      lt_outputfile="$lt_outputfile.exe"
+	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+	      ;;
+	  esac~
+	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	    $RM "$lt_outputfile.manifest";
+	  fi'
 	;;
       *)
 	# Assume MSVC wrapper
@@ -5626,7 +5170,7 @@ _LT_EOF
 	# Tell ltmain to make .lib files, not .a files.
 	libext=lib
 	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=.dll
+	shrext_cmds=".dll"
 	# FIXME: Setting linknames here is a bad hack.
 	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
 	# The linker will automatically build a .lib file if we build a DLL.
@@ -5676,33 +5220,33 @@ _LT_EOF
       ;;
 
     hpux9*)
-      if test yes = "$GCC"; then
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       else
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_direct, $1)=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
       ;;
 
     hpux10*)
-      if test yes,no = "$GCC,$with_gnu_ld"; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test no = "$with_gnu_ld"; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+      if test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 	_LT_TAGVAR(hardcode_direct, $1)=yes
 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 	# hardcode_minus_L: Not really in the search PATH,
 	# but as the default location of the library.
 	_LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -5710,25 +5254,25 @@ _LT_EOF
       ;;
 
     hpux11*)
-      if test yes,no = "$GCC,$with_gnu_ld"; then
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 	case $host_cpu in
 	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
 	case $host_cpu in
 	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
 	m4_if($1, [], [
@@ -5736,14 +5280,14 @@ _LT_EOF
 	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
 	  _LT_LINKER_OPTION([if $CC understands -b],
 	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
-	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
 	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
-	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
 	  ;;
 	esac
       fi
-      if test no = "$with_gnu_ld"; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+      if test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
 	case $host_cpu in
@@ -5754,7 +5298,7 @@ _LT_EOF
 	*)
 	  _LT_TAGVAR(hardcode_direct, $1)=yes
 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
@@ -5765,16 +5309,16 @@ _LT_EOF
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test yes = "$GCC"; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
 	# This should be the same for all languages, so no per-tag cache variable.
 	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
 	  [lt_cv_irix_exported_symbol],
-	  [save_LDFLAGS=$LDFLAGS
-	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+	  [save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
 	   AC_LINK_IFELSE(
 	     [AC_LANG_SOURCE(
 	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
@@ -5787,33 +5331,22 @@ _LT_EOF
       end]])])],
 	      [lt_cv_irix_exported_symbol=yes],
 	      [lt_cv_irix_exported_symbol=no])
-           LDFLAGS=$save_LDFLAGS])
-	if test yes = "$lt_cv_irix_exported_symbol"; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+           LDFLAGS="$save_LDFLAGS"])
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 	fi
-	_LT_TAGVAR(link_all_deplibs, $1)=no
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(inherit_rpath, $1)=yes
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
-    linux*)
-      case $cc_basename in
-      tcc*)
-	# Fabrice Bellard et al's Tiny C Compiler
-	_LT_TAGVAR(ld_shlibs, $1)=yes
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-      esac
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
+    netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
@@ -5827,7 +5360,7 @@ _LT_EOF
     newsos6)
       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
@@ -5835,19 +5368,27 @@ _LT_EOF
     *nto* | *qnx*)
       ;;
 
-    openbsd* | bitrig*)
+    openbsd*)
       if test -f /usr/libexec/ld.so; then
 	_LT_TAGVAR(hardcode_direct, $1)=yes
 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 	else
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
 	fi
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
@@ -5858,53 +5399,33 @@ _LT_EOF
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      shrext_cmds=.dll
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	$ECHO EXPORTS >> $output_objdir/$libname.def~
-	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
-	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	emximp -o $lib $output_objdir/$libname.def'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	$ECHO EXPORTS >> $output_objdir/$libname.def~
-	prefix_cmds="$SED"~
-	if test EXPORTS = "`$SED 1q $export_symbols`"; then
-	  prefix_cmds="$prefix_cmds -e 1d";
-	fi~
-	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
-	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
-	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	emximp -o $lib $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
-      if test yes = "$GCC"; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test yes = "$GCC"; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5915,24 +5436,24 @@ _LT_EOF
 
     solaris*)
       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test yes = "$GCC"; then
-	wlarc='$wl'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
 	  wlarc=''
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 	  ;;
 	*)
-	  wlarc='$wl'
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  wlarc='${wl}'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 	  ;;
 	esac
       fi
@@ -5942,11 +5463,11 @@ _LT_EOF
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
       *)
 	# The compiler driver will combine and reorder linker options,
-	# but understands '-z linker_flag'.  GCC discards it without '$wl',
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test yes = "$GCC"; then
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+	if test "$GCC" = yes; then
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 	else
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 	fi
@@ -5956,10 +5477,10 @@ _LT_EOF
       ;;
 
     sunos4*)
-      if test sequent = "$host_vendor"; then
+      if test "x$host_vendor" = xsequent; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -6008,43 +5529,43 @@ _LT_EOF
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
-      if test yes = "$GCC"; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We CANNOT use -z defs as we might desire, because we do not
+      # Note: We can NOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test yes = "$GCC"; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -6059,17 +5580,17 @@ _LT_EOF
       ;;
     esac
 
-    if test sni = "$host_vendor"; then
+    if test x$host_vendor = xsni; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
 	;;
       esac
     fi
   fi
 ])
 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
@@ -6086,7 +5607,7 @@ x|xyes)
   # Assume -lc should be added
   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
-  if test yes,yes = "$GCC,$enable_shared"; then
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
     case $_LT_TAGVAR(archive_cmds, $1) in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -6166,12 +5687,12 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
     [Whether we need a single "-rpath" flag with a separated argument])
 _LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
     DIR into the resulting binary])
 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
     DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting $shlibpath_var if the
+    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
     library is relocated])
 _LT_TAGDECL([], [hardcode_minus_L], [0],
     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -6212,10 +5733,10 @@ dnl    [Compiler flag to generate thread safe objects])
 # ------------------------
 # Ensure that the configuration variables for a C compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to 'libtool'.
+# the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_C_CONFIG],
 [m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC=$CC
+lt_save_CC="$CC"
 AC_LANG_PUSH(C)
 
 # Source file extension for C test sources.
@@ -6255,18 +5776,18 @@ if test -n "$compiler"; then
   LT_SYS_DLOPEN_SELF
   _LT_CMD_STRIPLIB
 
-  # Report what library types will actually be built
+  # Report which library types will actually be built
   AC_MSG_CHECKING([if libtool supports shared libraries])
   AC_MSG_RESULT([$can_build_shared])
 
   AC_MSG_CHECKING([whether to build shared libraries])
-  test no = "$can_build_shared" && enable_shared=no
+  test "$can_build_shared" = "no" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
   # are all built from PIC.
   case $host_os in
   aix3*)
-    test yes = "$enable_shared" && enable_static=no
+    test "$enable_shared" = yes && enable_static=no
     if test -n "$RANLIB"; then
       archive_cmds="$archive_cmds~\$RANLIB \$lib"
       postinstall_cmds='$RANLIB $lib'
@@ -6274,12 +5795,8 @@ if test -n "$compiler"; then
     ;;
 
   aix[[4-9]]*)
-    if test ia64 != "$host_cpu"; then
-      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
-      yes,aix,yes) ;;			# shared object as lib.so file only
-      yes,svr4,*) ;;			# shared object as lib.so archive member only
-      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
-      esac
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
     fi
     ;;
   esac
@@ -6287,13 +5804,13 @@ if test -n "$compiler"; then
 
   AC_MSG_CHECKING([whether to build static libraries])
   # Make sure either enable_shared or enable_static is yes.
-  test yes = "$enable_shared" || enable_static=yes
+  test "$enable_shared" = yes || enable_static=yes
   AC_MSG_RESULT([$enable_static])
 
   _LT_CONFIG($1)
 fi
 AC_LANG_POP
-CC=$lt_save_CC
+CC="$lt_save_CC"
 ])# _LT_LANG_C_CONFIG
 
 
@@ -6301,14 +5818,14 @@ CC=$lt_save_CC
 # --------------------------
 # Ensure that the configuration variables for a C++ compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to 'libtool'.
+# the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-if test -n "$CXX" && ( test no != "$CXX" &&
-    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
-    (test g++ != "$CXX"))); then
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
   AC_PROG_CXXCPP
 else
   _lt_caught_CXX_error=yes
@@ -6350,7 +5867,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the CXX compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test yes != "$_lt_caught_CXX_error"; then
+if test "$_lt_caught_CXX_error" != yes; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="int some_variable = 0;"
 
@@ -6392,35 +5909,35 @@ if test yes != "$_lt_caught_CXX_error"; then
   if test -n "$compiler"; then
     # We don't want -fno-exception when compiling C++ code, so set the
     # no_builtin_flag separately
-    if test yes = "$GXX"; then
+    if test "$GXX" = yes; then
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
     else
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
     fi
 
-    if test yes = "$GXX"; then
+    if test "$GXX" = yes; then
       # Set up default GNU C++ configuration
 
       LT_PATH_LD
 
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
-      if test yes = "$with_gnu_ld"; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+      if test "$with_gnu_ld" = yes; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
         # If archive_cmds runs LD, not CC, wlarc should be empty
         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
         #     investigate it a little bit more. (MM)
-        wlarc='$wl'
+        wlarc='${wl}'
 
         # ancient GNU ld didn't support --whole-archive et. al.
         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 	  $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
         else
           _LT_TAGVAR(whole_archive_flag_spec, $1)=
         fi
@@ -6456,30 +5973,18 @@ if test yes != "$_lt_caught_CXX_error"; then
         _LT_TAGVAR(ld_shlibs, $1)=no
         ;;
       aix[[4-9]]*)
-        if test ia64 = "$host_cpu"; then
+        if test "$host_cpu" = ia64; then
           # On IA64, the linker does run time linking by default, so we don't
           # have to do anything special.
           aix_use_runtimelinking=no
           exp_sym_flag='-Bexport'
-          no_entry_flag=
+          no_entry_flag=""
         else
           aix_use_runtimelinking=no
 
           # Test if we are trying to use run time linking or normal
           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # have runtime linking enabled, and use it for executables.
-          # For shared libraries, we enable/disable runtime linking
-          # depending on the kind of the shared library created -
-          # when "with_aix_soname,aix_use_runtimelinking" is:
-          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
-          # "aix,yes"  lib.so          shared, rtl:yes, for executables
-          #            lib.a           static archive
-          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
-          #            lib.a(lib.so.V) shared, rtl:no,  for executables
-          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
-          #            lib.a(lib.so.V) shared, rtl:no
-          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
-          #            lib.a           static archive
+          # need to do runtime linking.
           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 	    for ld_flag in $LDFLAGS; do
 	      case $ld_flag in
@@ -6489,13 +5994,6 @@ if test yes != "$_lt_caught_CXX_error"; then
 	        ;;
 	      esac
 	    done
-	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
-	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
-	      # so we don't have lib.a shared libs to link our executables.
-	      # We have to force runtime linking in this case.
-	      aix_use_runtimelinking=yes
-	      LDFLAGS="$LDFLAGS -Wl,-brtl"
-	    fi
 	    ;;
           esac
 
@@ -6514,21 +6012,13 @@ if test yes != "$_lt_caught_CXX_error"; then
         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
-        case $with_aix_soname,$aix_use_runtimelinking in
-        aix,*) ;;	# no import file
-        svr4,* | *,yes) # use import file
-          # The Import File defines what to hardcode.
-          _LT_TAGVAR(hardcode_direct, $1)=no
-          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
-          ;;
-        esac
+        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
-        if test yes = "$GXX"; then
+        if test "$GXX" = yes; then
           case $host_os in aix4.[[012]]|aix4.[[012]].*)
           # We only want to do this on AIX 4.2 and lower, the check
           # below for broken collect2 doesn't work under 4.3+
-	  collect2name=`$CC -print-prog-name=collect2`
+	  collect2name=`${CC} -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -6546,84 +6036,64 @@ if test yes != "$_lt_caught_CXX_error"; then
 	  fi
           esac
           shared_flag='-shared'
-	  if test yes = "$aix_use_runtimelinking"; then
-	    shared_flag=$shared_flag' $wl-G'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
 	  fi
-	  # Need to ensure runtime linking is disabled for the traditional
-	  # shared library, or the linker may eventually find shared libraries
-	  # /with/ Import File - we do not want to mix them.
-	  shared_flag_aix='-shared'
-	  shared_flag_svr4='-shared $wl-G'
         else
           # not using gcc
-          if test ia64 = "$host_cpu"; then
+          if test "$host_cpu" = ia64; then
 	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	  # chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
           else
-	    if test yes = "$aix_use_runtimelinking"; then
-	      shared_flag='$wl-G'
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
 	    else
-	      shared_flag='$wl-bM:SRE'
+	      shared_flag='${wl}-bM:SRE'
 	    fi
-	    shared_flag_aix='$wl-bM:SRE'
-	    shared_flag_svr4='$wl-G'
           fi
         fi
 
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
         # It seems that -bexpall does not export symbols beginning with
         # underscore (_), so it is better to generate a list of symbols to
 	# export.
         _LT_TAGVAR(always_export_symbols, $1)=yes
-	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+        if test "$aix_use_runtimelinking" = yes; then
           # Warning - without using the other runtime loading flags (-brtl),
           # -berok will link without error, but may produce a broken library.
-          # The "-G" linker flag allows undefined symbols.
-          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
+          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
           _LT_SYS_MODULE_PATH_AIX([$1])
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
         else
-          if test ia64 = "$host_cpu"; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+          if test "$host_cpu" = ia64; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
 	    _LT_SYS_MODULE_PATH_AIX([$1])
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 	    # Warning - without using the other run time loading flags,
 	    # -berok will link without error, but may produce a broken library.
-	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
-	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
-	    if test yes = "$with_gnu_ld"; then
+	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	    if test "$with_gnu_ld" = yes; then
 	      # We only use this code for GNU lds that support --whole-archive.
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 	    else
 	      # Exported symbols can be pulled into shared objects from archives
 	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 	    fi
 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
-	    # -brtl affects multiple linker settings, -berok does not and is overridden later
-	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
-	    if test svr4 != "$with_aix_soname"; then
-	      # This is similar to how AIX traditionally builds its shared
-	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
-	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
-	    fi
-	    if test aix != "$with_aix_soname"; then
-	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# [...]
-	    else
-	      # used by -dlpreopen to get the symbols
-	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
-	    fi
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
           fi
         fi
         ;;
@@ -6633,7 +6103,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	  # support --undefined.  This deserves some investigation.  FIXME
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 	else
 	  _LT_TAGVAR(ld_shlibs, $1)=no
 	fi
@@ -6661,58 +6131,57 @@ if test yes != "$_lt_caught_CXX_error"; then
 	  # Tell ltmain to make .lib files, not .a files.
 	  libext=lib
 	  # Tell ltmain to make .dll files, not .so files.
-	  shrext_cmds=.dll
+	  shrext_cmds=".dll"
 	  # FIXME: Setting linknames here is a bad hack.
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
-              cp "$export_symbols" "$output_objdir/$soname.def";
-              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
-            else
-              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
-            fi~
-            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-            linknames='
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
 	  # The linker will not automatically build a static lib if we build a DLL.
 	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 	  # Don't use ranlib
 	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-            lt_tool_outputfile="@TOOL_OUTPUT@"~
-            case $lt_outputfile in
-              *.exe|*.EXE) ;;
-              *)
-                lt_outputfile=$lt_outputfile.exe
-                lt_tool_outputfile=$lt_tool_outputfile.exe
-                ;;
-            esac~
-            func_to_tool_file "$lt_outputfile"~
-            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
-              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-              $RM "$lt_outputfile.manifest";
-            fi'
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
 	  ;;
 	*)
 	  # g++
 	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 	  # as there is no search path for DLLs.
 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	  _LT_TAGVAR(always_export_symbols, $1)=no
 	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
 	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	    # If the export-symbols file already is a .def file, use it as
-	    # is; otherwise, prepend EXPORTS...
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
-              cp $export_symbols $output_objdir/$soname.def;
-            else
-              echo EXPORTS > $output_objdir/$soname.def;
-              cat $export_symbols >> $output_objdir/$soname.def;
-            fi~
-            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file (1st line
+	    # is EXPORTS), use it as is; otherwise, prepend...
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      cp $export_symbols $output_objdir/$soname.def;
+	    else
+	      echo EXPORTS > $output_objdir/$soname.def;
+	      cat $export_symbols >> $output_objdir/$soname.def;
+	    fi~
+	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 	  else
 	    _LT_TAGVAR(ld_shlibs, $1)=no
 	  fi
@@ -6723,34 +6192,6 @@ if test yes != "$_lt_caught_CXX_error"; then
         _LT_DARWIN_LINKER_FEATURES($1)
 	;;
 
-      os2*)
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	_LT_TAGVAR(hardcode_minus_L, $1)=yes
-	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	shrext_cmds=.dll
-	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	  $ECHO EXPORTS >> $output_objdir/$libname.def~
-	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
-	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	  emximp -o $lib $output_objdir/$libname.def'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
-	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
-	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
-	  $ECHO EXPORTS >> $output_objdir/$libname.def~
-	  prefix_cmds="$SED"~
-	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
-	    prefix_cmds="$prefix_cmds -e 1d";
-	  fi~
-	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
-	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
-	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
-	  emximp -o $lib $output_objdir/$libname.def'
-	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
-	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-	;;
-
       dgux*)
         case $cc_basename in
           ec++*)
@@ -6785,15 +6226,18 @@ if test yes != "$_lt_caught_CXX_error"; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
         ;;
 
+      gnu*)
+        ;;
+
       haiku*)
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
         ;;
 
       hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
         _LT_TAGVAR(hardcode_direct, $1)=yes
         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 				             # but as the default
@@ -6805,7 +6249,7 @@ if test yes != "$_lt_caught_CXX_error"; then
             _LT_TAGVAR(ld_shlibs, $1)=no
             ;;
           aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
             # Commands to make compiler produce verbose output that lists
             # what "hidden" libraries, object files and flags are used when
             # linking a shared library.
@@ -6814,11 +6258,11 @@ if test yes != "$_lt_caught_CXX_error"; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
-            if test yes = "$GXX"; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+            if test "$GXX" = yes; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               _LT_TAGVAR(ld_shlibs, $1)=no
@@ -6828,15 +6272,15 @@ if test yes != "$_lt_caught_CXX_error"; then
         ;;
 
       hpux10*|hpux11*)
-        if test no = "$with_gnu_ld"; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+        if test $with_gnu_ld = no; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
           case $host_cpu in
             hppa*64*|ia64*)
               ;;
             *)
-	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
               ;;
           esac
         fi
@@ -6862,13 +6306,13 @@ if test yes != "$_lt_caught_CXX_error"; then
           aCC*)
 	    case $host_cpu in
 	      hppa*64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      ia64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      *)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	    esac
 	    # Commands to make compiler produce verbose output that lists
@@ -6879,20 +6323,20 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
           *)
-	    if test yes = "$GXX"; then
-	      if test no = "$with_gnu_ld"; then
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
 	        case $host_cpu in
 	          hppa*64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          ia64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          *)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	        esac
 	      fi
@@ -6907,22 +6351,22 @@ if test yes != "$_lt_caught_CXX_error"; then
       interix[[3-9]]*)
 	_LT_TAGVAR(hardcode_direct, $1)=no
 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 	# Instead, shared libraries are loaded at an image base (0x10000000 by
 	# default) and relocated if they conflict, which is a slow very memory
 	# consuming and fragmenting process.  To avoid this, we pick a random,
 	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 	;;
       irix5* | irix6*)
         case $cc_basename in
           CC*)
 	    # SGI C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -6931,22 +6375,22 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 	    ;;
           *)
-	    if test yes = "$GXX"; then
-	      if test no = "$with_gnu_ld"; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	      else
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
 	      fi
 	    fi
 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
 	    ;;
         esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -6954,8 +6398,8 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 	    # Commands to make compiler produce verbose output that lists
 	    # what "hidden" libraries, object files and flags are used when
 	    # linking a shared library.
@@ -6964,10 +6408,10 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -6981,59 +6425,59 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # earlier do not add the objects themselves.
 	    case `$CC -V 2>&1` in
 	      *"Version 7."*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	      *)  # Version 8.0 or newer
 	        tmp_idyn=
 	        case $host_cpu in
 		  ia64*) tmp_idyn=' -i_dynamic';;
 		esac
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	    esac
 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 	    ;;
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
 	    case `$CC -V` in
 	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
 	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-                rm -rf $tpldir~
-                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
-                $RANLIB $oldlib'
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+		$RANLIB $oldlib'
 	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-                rm -rf $tpldir~
-                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-                rm -rf $tpldir~
-                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 	      ;;
 	    *) # Version 6 and above use weak symbols
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 	      ;;
 	    esac
 
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
             ;;
 	  cxx*)
 	    # Compaq C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
 	    runpath_var=LD_RUN_PATH
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -7047,18 +6491,18 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
 	    ;;
 	  xl* | mpixl* | bgxl*)
 	    # IBM XL 8.0 on PPC, with GNU ld
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
-	    if test yes = "$supports_anon_versioning"; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-                echo "local: *; };" >> $output_objdir/$libname.ver~
-                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 	    fi
 	    ;;
 	  *)
@@ -7066,10 +6510,10 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    *Sun\ C*)
 	      # Sun C++ 5.9
 	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	      _LT_TAGVAR(compiler_needs_object, $1)=yes
 
 	      # Not sure whether something based on
@@ -7127,17 +6571,22 @@ if test yes != "$_lt_caught_CXX_error"; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
 	;;
 
-      openbsd* | bitrig*)
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      openbsd*)
 	if test -f /usr/libexec/ld.so; then
 	  _LT_TAGVAR(hardcode_direct, $1)=yes
 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
-	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 	  fi
 	  output_verbose_link_cmd=func_echo_all
 	else
@@ -7153,9 +6602,9 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
 	    # Archives containing C++ object files must be created using
@@ -7173,17 +6622,17 @@ if test yes != "$_lt_caught_CXX_error"; then
           cxx*)
 	    case $host in
 	      osf3*)
-	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
-	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 		;;
 	      *)
 	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-                  echo "-hidden">> $lib.exp~
-                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
-                  $RM $lib.exp'
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 		;;
 	    esac
@@ -7198,21 +6647,21 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
 	  *)
-	    if test yes,no = "$GXX,$with_gnu_ld"; then
-	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 	      case $host in
 	        osf3*)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 		  ;;
 	        *)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 		  ;;
 	      esac
 
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
 	      # Commands to make compiler produce verbose output that lists
@@ -7258,9 +6707,9 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    # Sun C++ 4.2, 5.x and Centerline C++
             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
 	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -7268,7 +6717,7 @@ if test yes != "$_lt_caught_CXX_error"; then
 	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 	      *)
 		# The compiler driver will combine and reorder linker options,
-		# but understands '-z linker_flag'.
+		# but understands `-z linker_flag'.
 	        # Supported since Solaris 2.6 (maybe 2.5.1?)
 		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 	        ;;
@@ -7285,30 +6734,30 @@ if test yes != "$_lt_caught_CXX_error"; then
 	    ;;
           gcx*)
 	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
 	    # The C++ compiler must be used to create the archive.
 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 	    ;;
           *)
 	    # GNU C++ compiler with Solaris linker
-	    if test yes,no = "$GXX,$with_gnu_ld"; then
-	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
 	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      else
-	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
 	        # platform.
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
@@ -7316,11 +6765,11 @@ if test yes != "$_lt_caught_CXX_error"; then
 	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      fi
 
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 	      case $host_os in
 		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 		*)
-		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 		  ;;
 	      esac
 	    fi
@@ -7329,52 +6778,52 @@ if test yes != "$_lt_caught_CXX_error"; then
         ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
       case $cc_basename in
         CC*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
       esac
       ;;
 
       sysv5* | sco3.2v5* | sco5v6*)
-	# Note: We CANNOT use -z defs as we might desire, because we do not
+	# Note: We can NOT use -z defs as we might desire, because we do not
 	# link with -lc, and that would cause any symbols used from libc to
 	# always be unresolved, which means just about no library would
 	# ever link correctly.  If we're not using GNU ld we use -z text
 	# though, which does catch some bad symbols but isn't as heavy-handed
 	# as -z defs.
-	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
-	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 	_LT_TAGVAR(link_all_deplibs, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 	runpath_var='LD_RUN_PATH'
 
 	case $cc_basename in
           CC*)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
-              '"$_LT_TAGVAR(old_archive_cmds, $1)"
+	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
 	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
-              '"$_LT_TAGVAR(reload_cmds, $1)"
+	      '"$_LT_TAGVAR(reload_cmds, $1)"
 	    ;;
 	  *)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    ;;
 	esac
       ;;
@@ -7405,10 +6854,10 @@ if test yes != "$_lt_caught_CXX_error"; then
     esac
 
     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
-    _LT_TAGVAR(GCC, $1)=$GXX
-    _LT_TAGVAR(LD, $1)=$LD
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_TAGVAR(LD, $1)="$LD"
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -7435,7 +6884,7 @@ if test yes != "$_lt_caught_CXX_error"; then
   lt_cv_path_LD=$lt_save_path_LD
   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test yes != "$_lt_caught_CXX_error"
+fi # test "$_lt_caught_CXX_error" != yes
 
 AC_LANG_POP
 ])# _LT_LANG_CXX_CONFIG
@@ -7457,14 +6906,13 @@ AC_REQUIRE([_LT_DECL_SED])
 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
 func_stripname_cnf ()
 {
-  case @S|@2 in
-  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
-  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
   esac
 } # func_stripname_cnf
 ])# _LT_FUNC_STRIPNAME_CNF
 
-
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -7548,13 +6996,13 @@ if AC_TRY_EVAL(ac_compile); then
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $prev$p in
+    case ${prev}${p} in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test x-L = "$p" ||
-          test x-R = "$p"; then
+       if test $p = "-L" ||
+          test $p = "-R"; then
 	 prev=$p
 	 continue
        fi
@@ -7570,16 +7018,16 @@ if AC_TRY_EVAL(ac_compile); then
        case $p in
        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
        esac
-       if test no = "$pre_test_object_deps_done"; then
-	 case $prev in
+       if test "$pre_test_object_deps_done" = no; then
+	 case ${prev} in
 	 -L | -R)
 	   # Internal compiler library paths should come after those
 	   # provided the user.  The postdeps already come after the
 	   # user supplied libs so there is no need to process them.
 	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 	   else
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 	   fi
 	   ;;
 	 # The "-l" case would never come before the object being
@@ -7587,9 +7035,9 @@ if AC_TRY_EVAL(ac_compile); then
 	 esac
        else
 	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-	   _LT_TAGVAR(postdeps, $1)=$prev$p
+	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
 	 else
-	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
+	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
 	 fi
        fi
        prev=
@@ -7604,15 +7052,15 @@ if AC_TRY_EVAL(ac_compile); then
 	 continue
        fi
 
-       if test no = "$pre_test_object_deps_done"; then
+       if test "$pre_test_object_deps_done" = no; then
 	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-	   _LT_TAGVAR(predep_objects, $1)=$p
+	   _LT_TAGVAR(predep_objects, $1)="$p"
 	 else
 	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
 	 fi
        else
 	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-	   _LT_TAGVAR(postdep_objects, $1)=$p
+	   _LT_TAGVAR(postdep_objects, $1)="$p"
 	 else
 	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
 	 fi
@@ -7643,6 +7091,51 @@ interix[[3-9]]*)
   _LT_TAGVAR(postdep_objects,$1)=
   _LT_TAGVAR(postdeps,$1)=
   ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC* | sunCC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
 esac
 ])
 
@@ -7651,7 +7144,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in
 esac
  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
 fi
 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
     [The directories searched by this compiler when creating a shared library])
@@ -7671,10 +7164,10 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
 # --------------------------
 # Ensure that the configuration variables for a Fortran 77 compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_F77_CONFIG],
 [AC_LANG_PUSH(Fortran 77)
-if test -z "$F77" || test no = "$F77"; then
+if test -z "$F77" || test "X$F77" = "Xno"; then
   _lt_disable_F77=yes
 fi
 
@@ -7711,7 +7204,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the F77 compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test yes != "$_lt_disable_F77"; then
+if test "$_lt_disable_F77" != yes; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -7733,7 +7226,7 @@ if test yes != "$_lt_disable_F77"; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC=$CC
+  lt_save_CC="$CC"
   lt_save_GCC=$GCC
   lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
@@ -7747,25 +7240,21 @@ if test yes != "$_lt_disable_F77"; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test no = "$can_build_shared" && enable_shared=no
+    test "$can_build_shared" = "no" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test yes = "$enable_shared" && enable_static=no
+        test "$enable_shared" = yes && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-	if test ia64 != "$host_cpu"; then
-	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
-	  yes,aix,yes) ;;		# shared object as lib.so file only
-	  yes,svr4,*) ;;		# shared object as lib.so archive member only
-	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
-	  esac
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
 	fi
         ;;
     esac
@@ -7773,11 +7262,11 @@ if test yes != "$_lt_disable_F77"; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test yes = "$enable_shared" || enable_static=yes
+    test "$enable_shared" = yes || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)=$G77
-    _LT_TAGVAR(LD, $1)=$LD
+    _LT_TAGVAR(GCC, $1)="$G77"
+    _LT_TAGVAR(LD, $1)="$LD"
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -7794,9 +7283,9 @@ if test yes != "$_lt_disable_F77"; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC=$lt_save_CC
-  CFLAGS=$lt_save_CFLAGS
-fi # test yes != "$_lt_disable_F77"
+  CC="$lt_save_CC"
+  CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
 
 AC_LANG_POP
 ])# _LT_LANG_F77_CONFIG
@@ -7806,11 +7295,11 @@ AC_LANG_POP
 # -------------------------
 # Ensure that the configuration variables for a Fortran compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_FC_CONFIG],
 [AC_LANG_PUSH(Fortran)
 
-if test -z "$FC" || test no = "$FC"; then
+if test -z "$FC" || test "X$FC" = "Xno"; then
   _lt_disable_FC=yes
 fi
 
@@ -7847,7 +7336,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the FC compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test yes != "$_lt_disable_FC"; then
+if test "$_lt_disable_FC" != yes; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -7869,7 +7358,7 @@ if test yes != "$_lt_disable_FC"; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC=$CC
+  lt_save_CC="$CC"
   lt_save_GCC=$GCC
   lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
@@ -7885,25 +7374,21 @@ if test yes != "$_lt_disable_FC"; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test no = "$can_build_shared" && enable_shared=no
+    test "$can_build_shared" = "no" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test yes = "$enable_shared" && enable_static=no
+        test "$enable_shared" = yes && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-	if test ia64 != "$host_cpu"; then
-	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
-	  yes,aix,yes) ;;		# shared object as lib.so file only
-	  yes,svr4,*) ;;		# shared object as lib.so archive member only
-	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
-	  esac
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
 	fi
         ;;
     esac
@@ -7911,11 +7396,11 @@ if test yes != "$_lt_disable_FC"; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test yes = "$enable_shared" || enable_static=yes
+    test "$enable_shared" = yes || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
-    _LT_TAGVAR(LD, $1)=$LD
+    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+    _LT_TAGVAR(LD, $1)="$LD"
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -7935,7 +7420,7 @@ if test yes != "$_lt_disable_FC"; then
   GCC=$lt_save_GCC
   CC=$lt_save_CC
   CFLAGS=$lt_save_CFLAGS
-fi # test yes != "$_lt_disable_FC"
+fi # test "$_lt_disable_FC" != yes
 
 AC_LANG_POP
 ])# _LT_LANG_FC_CONFIG
@@ -7945,7 +7430,7 @@ AC_LANG_POP
 # --------------------------
 # Ensure that the configuration variables for the GNU Java Compiler compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_GCJ_CONFIG],
 [AC_REQUIRE([LT_PROG_GCJ])dnl
 AC_LANG_SAVE
@@ -7979,7 +7464,7 @@ CC=${GCJ-"gcj"}
 CFLAGS=$GCJFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)=$LD
+_LT_TAGVAR(LD, $1)="$LD"
 _LT_CC_BASENAME([$compiler])
 
 # GCJ did not exist at the time GCC didn't implicitly link libc in.
@@ -8016,7 +7501,7 @@ CFLAGS=$lt_save_CFLAGS
 # --------------------------
 # Ensure that the configuration variables for the GNU Go compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_GO_CONFIG],
 [AC_REQUIRE([LT_PROG_GO])dnl
 AC_LANG_SAVE
@@ -8050,7 +7535,7 @@ CC=${GOC-"gccgo"}
 CFLAGS=$GOFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)=$LD
+_LT_TAGVAR(LD, $1)="$LD"
 _LT_CC_BASENAME([$compiler])
 
 # Go did not exist at the time GCC didn't implicitly link libc in.
@@ -8087,7 +7572,7 @@ CFLAGS=$lt_save_CFLAGS
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_RC_CONFIG],
 [AC_REQUIRE([LT_PROG_RC])dnl
 AC_LANG_SAVE
@@ -8103,7 +7588,7 @@ _LT_TAGVAR(objext, $1)=$objext
 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
 # Code to be used in simple link tests
-lt_simple_link_test_code=$lt_simple_compile_test_code
+lt_simple_link_test_code="$lt_simple_compile_test_code"
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 _LT_TAG_COMPILER
@@ -8113,7 +7598,7 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC=$CC
+lt_save_CC="$CC"
 lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=
@@ -8142,7 +7627,7 @@ AC_DEFUN([LT_PROG_GCJ],
 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
     [AC_CHECK_TOOL(GCJ, gcj,)
-      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
+      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
       AC_SUBST(GCJFLAGS)])])[]dnl
 ])
 
@@ -8253,7 +7738,7 @@ lt_ac_count=0
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 # along with /bin/sed that truncates output.
 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f "$lt_ac_sed" && continue
+  test ! -f $lt_ac_sed && continue
   cat /dev/null > conftest.in
   lt_ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -8270,9 +7755,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
     cmp -s conftest.out conftest.nl || break
     # 10000 chars as input seems more than enough
-    test 10 -lt "$lt_ac_count" && break
+    test $lt_ac_count -gt 10 && break
     lt_ac_count=`expr $lt_ac_count + 1`
-    if test "$lt_ac_count" -gt "$lt_ac_max"; then
+    if test $lt_ac_count -gt $lt_ac_max; then
       lt_ac_max=$lt_ac_count
       lt_cv_path_SED=$lt_ac_sed
     fi
@@ -8296,7 +7781,27 @@ dnl AC_DEFUN([LT_AC_PROG_SED], [])
 # Find out whether the shell is Bourne or XSI compatible,
 # or has some other useful features.
 m4_defun([_LT_CHECK_SHELL_FEATURES],
-[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
   lt_unset=false
@@ -8320,9 +7825,102 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 ])# _LT_CHECK_SHELL_FEATURES
 
 
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary parameter first.
+    func_stripname_result=${3}
+    func_stripname_result=${func_stripname_result#"${1}"}
+    func_stripname_result=${func_stripname_result%"${2}"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
+
+  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
+
+  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+    func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
 # _LT_PATH_CONVERSION_FUNCTIONS
 # -----------------------------
-# Determine what file name conversion functions should be used by
+# Determine which file name conversion functions should be used by
 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
 # for certain cross-compile configurations and native mingw.
 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 94b0829..5d9acd8 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1,14 +1,14 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
-#   Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+#   Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 8 ltoptions.m4
+# serial 7 ltoptions.m4
 
 # This is to help aclocal find these macros, as it can't see m4_define.
 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION],
 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
         _LT_MANGLE_DEFUN([$1], [$2]),
-    [m4_warning([Unknown $1 option '$2'])])[]dnl
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
 ])
 
 
@@ -75,15 +75,13 @@ m4_if([$1],[LT_INIT],[
   dnl
   dnl If no reference was made to various pairs of opposing options, then
   dnl we run the default mode handler for the pair.  For example, if neither
-  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
   dnl archives by default:
   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-		   [_LT_ENABLE_FAST_INSTALL])
-  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
-		   [_LT_WITH_AIX_SONAME([aix])])
+  		   [_LT_ENABLE_FAST_INSTALL])
   ])
 ])# _LT_SET_OPTIONS
 
@@ -114,7 +112,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
 [_LT_SET_OPTION([LT_INIT], [dlopen])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the 'dlopen' option into LT_INIT's first parameter.])
+put the `dlopen' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -150,7 +148,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
 _LT_SET_OPTION([LT_INIT], [win32-dll])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the 'win32-dll' option into LT_INIT's first parameter.])
+put the `win32-dll' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -159,9 +157,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
 # _LT_ENABLE_SHARED([DEFAULT])
 # ----------------------------
-# implement the --enable-shared flag, and supports the 'shared' and
-# 'disable-shared' LT_INIT options.
-# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 m4_define([_LT_ENABLE_SHARED],
 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([shared],
@@ -174,14 +172,14 @@ AC_ARG_ENABLE([shared],
     *)
       enable_shared=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
       for pkg in $enableval; do
-	IFS=$lt_save_ifs
+	IFS="$lt_save_ifs"
 	if test "X$pkg" = "X$p"; then
 	  enable_shared=yes
 	fi
       done
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       ;;
     esac],
     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
@@ -213,9 +211,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
 # _LT_ENABLE_STATIC([DEFAULT])
 # ----------------------------
-# implement the --enable-static flag, and support the 'static' and
-# 'disable-static' LT_INIT options.
-# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 m4_define([_LT_ENABLE_STATIC],
 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([static],
@@ -228,14 +226,14 @@ AC_ARG_ENABLE([static],
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
       for pkg in $enableval; do
-	IFS=$lt_save_ifs
+	IFS="$lt_save_ifs"
 	if test "X$pkg" = "X$p"; then
 	  enable_static=yes
 	fi
       done
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       ;;
     esac],
     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
@@ -267,9 +265,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
 # ----------------------------------
-# implement the --enable-fast-install flag, and support the 'fast-install'
-# and 'disable-fast-install' LT_INIT options.
-# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 m4_define([_LT_ENABLE_FAST_INSTALL],
 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([fast-install],
@@ -282,14 +280,14 @@ AC_ARG_ENABLE([fast-install],
     *)
       enable_fast_install=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
       for pkg in $enableval; do
-	IFS=$lt_save_ifs
+	IFS="$lt_save_ifs"
 	if test "X$pkg" = "X$p"; then
 	  enable_fast_install=yes
 	fi
       done
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       ;;
     esac],
     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
@@ -306,14 +304,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the 'fast-install' option into LT_INIT's first parameter.])
+the `fast-install' option into LT_INIT's first parameter.])
 ])
 
 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the 'disable-fast-install' option into LT_INIT's first parameter.])
+the `disable-fast-install' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -321,64 +319,11 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
 
-# _LT_WITH_AIX_SONAME([DEFAULT])
-# ----------------------------------
-# implement the --with-aix-soname flag, and support the `aix-soname=aix'
-# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
-# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
-m4_define([_LT_WITH_AIX_SONAME],
-[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
-shared_archive_member_spec=
-case $host,$enable_shared in
-power*-*-aix[[5-9]]*,yes)
-  AC_MSG_CHECKING([which variant of shared library versioning to provide])
-  AC_ARG_WITH([aix-soname],
-    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
-      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
-    [case $withval in
-    aix|svr4|both)
-      ;;
-    *)
-      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
-      ;;
-    esac
-    lt_cv_with_aix_soname=$with_aix_soname],
-    [AC_CACHE_VAL([lt_cv_with_aix_soname],
-      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
-    with_aix_soname=$lt_cv_with_aix_soname])
-  AC_MSG_RESULT([$with_aix_soname])
-  if test aix != "$with_aix_soname"; then
-    # For the AIX way of multilib, we name the shared archive member
-    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
-    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
-    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
-    # the AIX toolchain works better with OBJECT_MODE set (default 32).
-    if test 64 = "${OBJECT_MODE-32}"; then
-      shared_archive_member_spec=shr_64
-    else
-      shared_archive_member_spec=shr
-    fi
-  fi
-  ;;
-*)
-  with_aix_soname=aix
-  ;;
-esac
-
-_LT_DECL([], [shared_archive_member_spec], [0],
-    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
-])# _LT_WITH_AIX_SONAME
-
-LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
-LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
-LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
-
-
 # _LT_WITH_PIC([MODE])
 # --------------------
-# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
 # LT_INIT options.
-# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
@@ -389,17 +334,19 @@ m4_define([_LT_WITH_PIC],
     *)
       pic_mode=default
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
       for lt_pkg in $withval; do
-	IFS=$lt_save_ifs
+	IFS="$lt_save_ifs"
 	if test "X$lt_pkg" = "X$lt_p"; then
 	  pic_mode=yes
 	fi
       done
-      IFS=$lt_save_ifs
+      IFS="$lt_save_ifs"
       ;;
     esac],
-    [pic_mode=m4_default([$1], [default])])
+    [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
 
 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 ])# _LT_WITH_PIC
@@ -412,7 +359,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
 [_LT_SET_OPTION([LT_INIT], [pic-only])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the 'pic-only' option into LT_INIT's first parameter.])
+put the `pic-only' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index 48bc934..9000a05 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,7 +1,6 @@
 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 #
-# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 # Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -34,7 +33,7 @@ m4_define([_lt_join],
 # ------------
 # Manipulate m4 lists.
 # These macros are necessary as long as will still need to support
-# Autoconf-2.59, which quotes differently.
+# Autoconf-2.59 which quotes differently.
 m4_define([lt_car], [[$1]])
 m4_define([lt_cdr],
 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
@@ -45,7 +44,7 @@ m4_define([lt_unquote], $1)
 
 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
 # ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
 # Note that neither SEPARATOR nor STRING are expanded; they are appended
 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index fa04b52..07a8602 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1,6 +1,6 @@
 # ltversion.m4 -- version numbers			-*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2004 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -9,15 +9,15 @@
 
 # @configure_input@
 
-# serial 4179 ltversion.m4
+# serial 3337 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.4.6])
-m4_define([LT_PACKAGE_REVISION], [2.4.6])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.6'
-macro_revision='2.4.6'
+[macro_version='2.4.2'
+macro_revision='1.3337'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
index c6b26f8..c573da9 100644
--- a/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -1,7 +1,6 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
-#   Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
@@ -12,7 +11,7 @@
 
 # These exist entirely to fool aclocal when bootstrapping libtool.
 #
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
 # which have later been changed to m4_define as they aren't part of the
 # exported API, or moved to Autoconf or Automake where they belong.
 #
@@ -26,7 +25,7 @@
 # included after everything else.  This provides aclocal with the
 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
 # because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
 #
 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
 # Yes, that means every name once taken will need to remain here until
diff --git a/man/Makefile.in b/man/Makefile.in
index 99eed5b..c97ea45 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -88,6 +78,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = man
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -155,7 +145,6 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -223,7 +212,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -293,7 +281,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -319,6 +306,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu man/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -613,8 +601,6 @@ uninstall-am:
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/man/man1/Makefile.in b/man/man1/Makefile.in
index 670ec4a..fc665b0 100644
--- a/man/man1/Makefile.in
+++ b/man/man1/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -88,6 +78,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = man/man1
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -151,7 +141,6 @@ am__installdirs = "$(DESTDIR)$(man1dir)"
 NROFF = nroff
 MANS = $(man_MANS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -194,7 +183,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -264,7 +252,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -290,6 +277,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/man1/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu man/man1/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -513,8 +501,6 @@ uninstall-man: uninstall-man1
 	ps ps-am tags-am uninstall uninstall-am uninstall-man \
 	uninstall-man1
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/man/man1/cs2cs.1 b/man/man1/cs2cs.1
index bfebe8e..5d4d36d 100644
--- a/man/man1/cs2cs.1
+++ b/man/man1/cs2cs.1
@@ -1,8 +1,8 @@
-.\" release 4
+.\" release 5
 .nr LL 5.5i
 .ad b
 .hy 1
-.TH CS2CS 1 "2000/03/21 Rel. 4.4"
+.TH CS2CS 1 "2018/02/15 Rel. 5.0.0"
 .SH NAME
 cs2cs \- cartographic coordinate system filter
 .SH SYNOPSIS
diff --git a/man/man1/geod.1 b/man/man1/geod.1
index 0a847f8..8e4c18d 100644
--- a/man/man1/geod.1
+++ b/man/man1/geod.1
@@ -2,7 +2,7 @@
 .nr LL 7.0i
 .ad b
 .hy 1
-.TH GEOD 1 "2016/02/16 Rel. 4.9.3"
+.TH GEOD 1 "2018/02/15 Rel. 5.0.0"
 .SH NAME
 geod \- direct geodesic computations
 .br
@@ -207,7 +207,7 @@ the precision of the Portland location.
 .SH SEE ALSO
 .B geodesic(3)
 .PP
-\fBGeographicLib\fR, http://geographiclib.sf.net
+\fBGeographicLib\fR, https://geographiclib.sourceforge.io
 .PP
 The \fBGeodSolve\fR utility in GeographicLib.  With the \fB-E\fR option,
 this solves the geodesic problems in terms of elliptic integrals; the
@@ -217,13 +217,13 @@ C. F. F. Karney, \fIAlgorithms for Geodesics\fR,
 .br
 J. Geodesy \fB87\fR, 43-55 (2013);
 .br
-DOI: http://dx.doi.org/10.1007/s00190-012-0578-z
+DOI: https://doi.org/10.1007/s00190-012-0578-z
 .br
-http://geographiclib.sf.net/geod-addenda.html
+https://geographiclib.sourceforge.io/geod-addenda.html
 .PP
 The \fIonline geodesic bibliography\fR,
 .br
-http://geographiclib.sf.net/geodesic-papers/biblio.html
+https://geographiclib.sourceforge.io/geodesic-papers/biblio.html
 .SH BUGS
 A list of known bugs can found at https://github.com/OSGeo/proj.4/issues
 where new bug reports can be submitted too.
diff --git a/man/man1/proj.1 b/man/man1/proj.1
index 6cb8ad4..44bc08b 100644
--- a/man/man1/proj.1
+++ b/man/man1/proj.1
@@ -1,8 +1,8 @@
-.\" release 4
+.\" release 5
 .nr LL 5.5i
 .ad b
 .hy 1
-.TH PROJ 1 "2000/03/21 Rel. 4.4"
+.TH PROJ 1 "2018/02/25 Rel. 5.0.0"
 .SH NAME
 proj \- forward cartographic projection filter
 .br
@@ -52,11 +52,6 @@ process and allows bypassing formatting operations.
 Selects binary input only (see
 .B \-b option).
 .TP
-.BI \-C
-Check. Invoke all built in self tests and report.
-Get more verbose report by preceding with the
-.B \-V option).
-.TP
 .BI \-I
 alternate method to specify inverse projection.
 Redundant when used with
diff --git a/man/man3/Makefile.in b/man/man3/Makefile.in
index 99bb285..51433d5 100644
--- a/man/man3/Makefile.in
+++ b/man/man3/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -88,6 +78,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = man/man3
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -151,7 +141,6 @@ am__installdirs = "$(DESTDIR)$(man3dir)"
 NROFF = nroff
 MANS = $(man_MANS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -194,7 +183,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -264,7 +252,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -290,6 +277,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/man3/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu man/man3/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -513,8 +501,6 @@ uninstall-man: uninstall-man3
 	ps ps-am tags-am uninstall uninstall-am uninstall-man \
 	uninstall-man3
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/man/man3/geodesic.3 b/man/man3/geodesic.3
index 085df83..6e3c944 100644
--- a/man/man3/geodesic.3
+++ b/man/man3/geodesic.3
@@ -1,6 +1,6 @@
 .\" @(#)geodesic.3
 .nr LL 7.0i
-.TH GEODESIC 3 "2016/02/16 Rel. 4.9.3"
+.TH GEODESIC 3 "2018/02/15 Rel. 5.0.0"
 .ad b
 .hy 1
 .SH NAME
@@ -53,7 +53,9 @@ measure angles (latitudes, longitudes, and azimuths) in degrees, unlike
 the rest of the \fBproj\fR library, which uses radians.  The
 documentation for this library is included in geodesic.h.  A formatted
 version of the documentation is available at
-http://geographiclib.sf.net/1.46/C
+https://geographiclib.sourceforge.io/1.49/C.  Detailed documentation of
+the interface is given at
+https://geographiclib.sourceforge.io/1.49/C/geodesic_8h.html.
 .SH EXAMPLE
 The following program reads in lines with the coordinates for two points
 in decimal degrees (\fIlat1\fR, \fIlon1\fR, \fIlat2\fR, \fIlon2\fR) and
@@ -87,11 +89,13 @@ libproj.a \- library of projections and support procedures
 .SH SEE ALSO
 Full online documentation for \fBgeodesic(3)\fR,
 .br
-http://geographiclib.sf.net/1.46/C
+https://geographiclib.sourceforge.io/1.49/C
+.br
+https://geographiclib.sourceforge.io/1.49/C/geodesic_8h.html
 .PP
 .B geod(1)
 .PP
-\fBGeographicLib\fR, http://geographiclib.sf.net
+\fBGeographicLib\fR, https://geographiclib.sourceforge.io
 .PP
 The \fBGeodesicExact\fR class in GeographicLib solves the geodesic
 problems in terms of elliptic integrals; the results are accurate for
@@ -101,13 +105,13 @@ C. F. F. Karney, \fIAlgorithms for Geodesics\fR,
 .br
 J. Geodesy \fB87\fR, 43-55 (2013);
 .br
-DOI: http://dx.doi.org/10.1007/s00190-012-0578-z
+DOI: https://doi.org/10.1007/s00190-012-0578-z
 .br
-http://geographiclib.sf.net/geod-addenda.html
+https://geographiclib.sourceforge.io/geod-addenda.html
 .PP
 \fIA geodesic bibliography\fR,
 .br
-http://geographiclib.sf.net/geodesic-papers/biblio.html
+https://geographiclib.sourceforge.io/geodesic-papers/biblio.html
 .PP
 The Wikipedia page, \fIGeodesics on an ellipsoid\fR,
 .br
diff --git a/man/man3/pj_init.3 b/man/man3/pj_init.3
index 4c989ce..ae830e7 100644
--- a/man/man3/pj_init.3
+++ b/man/man3/pj_init.3
@@ -1,6 +1,6 @@
-.\" @(#)pj_init.3 - 4.1
+.\" @(#)pj_init.3 - 5.0.0
 .nr LL 5.5i
-.TH PJ_INIT 3U "2001/04/05 Rel. 4.4" 
+.TH PJ_INIT 3U "2018/02/15 Rel. 5.0.0"
 .ad b
 .hy 1
 .SH NAME
diff --git a/missing b/missing
index f62bbae..cdea514 100755
--- a/missing
+++ b/missing
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2012-06-26.16; # UTC
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -160,7 +160,7 @@ give_advice ()
       ;;
    autom4te*)
       echo "You might have modified some maintainer files that require"
-      echo "the 'autom4te' program to be rebuilt."
+      echo "the 'automa4te' program to be rebuilt."
       program_details 'autom4te'
       ;;
     bison*|yacc*)
diff --git a/nad/CH b/nad/CH
index 7ae7318..80b6967 100644
--- a/nad/CH
+++ b/nad/CH
@@ -16,6 +16,7 @@
 #
 # This init file uses the official one
 #
+<metadata> +origin=Swisstopo +lastupdate=2012-02-27
 # CH1903/LV03
 <1903_LV03>  +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +units=m +nadgrids=chenyx06etrs.gsb +no_defs
 # CH1903
diff --git a/nad/CMakeLists.txt b/nad/CMakeLists.txt
index a9b08cb..9858e05 100644
--- a/nad/CMakeLists.txt
+++ b/nad/CMakeLists.txt
@@ -1,5 +1,5 @@
 #
-# files containing dictionnary of useful projection
+# files containing dictionary of useful projection
 #
 
 set(PROJ_DICTIONARY  epsg
@@ -13,7 +13,10 @@ set(PROJ_DICTIONARY  epsg
                      nad83
                      nad.lst
                      proj_def.dat
-                     CH )
+                     CH
+                     ITRF2000
+                     ITRF2008
+                     ITRF2014 )
 
 #
 # gridshift file
@@ -24,14 +27,16 @@ set(GRIDSHIFT_FILES ${GSB_FILES})
 set(GRIDSHIFT_FILES ${GRIDSHIFT_FILES}
                      )
 option(CONVERT_DATA "convert some ascii file to binary file for use in proj4" OFF)
-if(CONVERT_DATA AND nad2bin)
-   message(ERROR " you need to compile nad2bin exe in order to convert data file" )
-else(CONVERT_DATA AND nad2bin)
-   set(LLA_GRID_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-   proj_convert_grid_lla2gsb(LLA_GRID_DIR)
-   file(GLOB LLA_FILES  *.lla)
-   proj_append_lla_output_file(LLA_FILES GRIDSHIFT_FILES)
-endif(CONVERT_DATA AND nad2bin)
+if(CONVERT_DATA)
+    if (BUILD_NAD2BIN)
+       set(LLA_GRID_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+       proj_convert_grid_lla2gsb(LLA_GRID_DIR)
+       file(GLOB LLA_FILES  *.lla)
+       proj_append_lla_output_file(LLA_FILES GRIDSHIFT_FILES)
+    else()
+       message(ERROR " you need to compile nad2bin exe in order to convert data file" )
+    endif(BUILD_NAD2BIN)
+endif(CONVERT_DATA)
 
 
 #
diff --git a/nad/GL27 b/nad/GL27
index dd927bd..73fa975 100644
--- a/nad/GL27
+++ b/nad/GL27
@@ -1,5 +1,6 @@
 # SCCSID @(#)GL27	1.1 93/08/25 GIE REL
 # Great Lakes Grids
+<metadata> +lastupdate=1993-08-25
 <erie-etal> # Lake Erie, Ontario and St. Lawrence River.
 	proj=omerc ellps=clrk66 k_0=0.9999
 	lonc=78d00'W lat_0=44d00'N alpha=55d40'
diff --git a/nad/IGNF b/nad/IGNF
index 5a5d559..a29657f 100644
--- a/nad/IGNF
+++ b/nad/IGNF
@@ -1,3 +1,4 @@
+<metadata> +version=1.0.0 +origin=IGNF +lastupdate=2011-11-27
 # W [AMANU49]
 # W [AMANU63]
 <AMST63> +title=Ile d'Amsterdam 1963 +proj=geocent +towgs84=109.7530,-528.1330,-362.2440 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs <>
diff --git a/nad/ITRF2000 b/nad/ITRF2000
new file mode 100644
index 0000000..f0a80db
--- /dev/null
+++ b/nad/ITRF2000
@@ -0,0 +1,24 @@
+# ITRF2000 params are in cm/year, PJ_helmert uses m/year
+<metadata> +version=1.0.0 +origin=ftp://itrf.ensg.ign.fr/pub/itrf/ITRF.TP +lastupdate=2017-07-25
+
+# ITRF2000 -> ITRF2005 is only defined the opposite way, so we flip the sign on all
+# parameters to get the opposite transformation. Parameters from http://itrf.ign.fr/ITRF_solutions/2005/tp_05-00.php
+<ITRF2005> +proj=helmert +x=-0.0001 +y=0.0008 +z=0.0058 +s=-0.0004 +dx=0.0002 +dy=-0.0001 +dz=0.0018 +ds=-0.000008 +t_epoch=2000.0 +transpose
+
+<ITRF97> +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +transpose
+
+<ITRF96> +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +transpose
+
+<ITRF94> +proj=helmert +x=0.0067 +y=0.0061 +z=-0.0185 +s=0.00155 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1997.0 +transpose
+
+<ITRF93> +proj=helmert +x=0.0127 +y=0.0065 +z=-0.0209 +s=0.00195 +rx=-0.00039 +ry=0.00080 +rz=-0.00114 +dx=-0.0029 +dy=-0.0002 +dz=-0.0006 +ds=0.00001 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=1988.0 +transpose
+
+<ITRF92> +proj=helmert +x=0.0147 +y=0.0135 +z=-0.0139 +s=0.00075 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose
+
+<ITRF91> +proj=helmert +x=0.0267 +y=0.0275 +z=-0.0199 +s=0.00215 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose
+
+<ITRF90> +proj=helmert +x=0.0247 +y=0.0235 +z=-0.0359 +s=0.00245 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose
+
+<ITRF89> +proj=helmert +x=0.0297 +y=0.0475 +z=-0.0739 +s=0.00585 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose
+
+<ITRF88> +proj=helmert +x=0.0247 +y=0.0115 +z=-0.0979 +s=0.00895 +rx=0.0001 +rz=-0.00018 +dy=-0.0006 +dz=-0.0014 +ds=0.00001 +drz=0.00002 +t_epoch=1988.0 +transpose
diff --git a/nad/ITRF2008 b/nad/ITRF2008
new file mode 100644
index 0000000..2d730d6
--- /dev/null
+++ b/nad/ITRF2008
@@ -0,0 +1,61 @@
+# ITRF2008 params are in mm/year, PJ_helmert uses m/year
+<metadata> +version=1.0.0 +origin=http://itrf.ign.fr/doc_ITRF/Transfo-ITRF2008_ITRFs.txt +lastupdate=2017-07-26
+
+<ITRF2005> +proj=helmert +x=-0.002 +y=-0.0009 +z=-0.0047 +s=0.00094 +dx=0.0003 +t_epoch=2000.0 +transpose
+
+<ITRF2000> +proj=helmert +x=-0.0019 +y=-0.0017 +z=-0.0105 +s=0.00134  +dx=0.0001 +dy=0.0001 +dz=-0.0018 +ds=0.00008  +t_epoch=2000.0 +transpose
+
+<ITRF97> +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose
+
+<ITRF96> +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose
+
+<ITRF94> +proj=helmert +x=0.0048 +y=0.0026 +z=-0.0332 +s=0.00292 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose
+
+<ITRF93> +proj=helmert +x=-0.024 +y=0.0024 +z=-0.00386 +s=0.00341 +rx=-0.00171 +ry=-0.00148 +rz=-0.0003 +dx=-0.0028 +dy=-0.0001 +dz=-0.0024 +ds=0.00009 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=2000.0 +transpose
+
+<ITRF92> +proj=helmert +x=0.0128 +y=0.0046 +z=-0.0412 +s=0.00221 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose
+
+<ITRF91> +proj=helmert +x=0.0248 +y=0.0186 +z=-0.0472 +s=0.00361 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose
+
+<ITRF90> +proj=helmert +x=0.0228 +y=0.0146 +z=-0.0632 +s=0.00391 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose
+
+<ITRF89> +proj=helmert +x=0.0278 +y=0.0386 +z=-0.1012 +s=0.00731 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose
+
+<ITRF88> +proj=helmert +x=0.0228 +y=0.0026 +z=-0.1252 +s=0.01041 +rz=0.00006 +dx=0.0001 +dy=-0.0005 +dz=-0.0032 +ds=0.00009 +drz=0.00002 +t_epoch=2000.0 +transpose
+
+
+# ITRF2008 Plate Motion Model parameters
+#
+# As described in
+#
+# Altamimi, Z., L. Métivier, and X. Collilieux (2012), ITRF2008 plate motion model,
+# J. Geophys. Res., 117, B07402, doi:10.1029/2011JB008930.
+
+
+<AMUR> +proj=helmert +drx=-0.000190 +dry=-0.000442 +drz=0.000915
+
+<ANTA> +proj=helmert +drx=-0.000252 +dry=-0.000302 +drz=0.000643
+
+<ARAB> +proj=helmert +drx=0.001202 +dry=-0.000054 +drz=0.001485
+
+<AUST> +proj=helmert +drx=0.001504 +dry=0.001172 +drz=0.001228
+
+<CARB> +proj=helmert +drx=0.000049 +dry=-0.001088 +drz=0.000664
+
+<EURA> +proj=helmert +drx=-0.000083 +dry=0.000534 +drz=0.000750
+
+<INDI> +proj=helmert +drx=0.001232 +dry=0.000303 +drz=0.001540
+
+<NAZC> +proj=helmert +drx=-0.000330 +dry=-0.001551 +drz=0.001625
+
+<NOAM> +proj=helmert +drx=0.000035 +dry=-0.000662 +drz=0.0001
+
+<NUBI> +proj=helmert +drx=0.000095 +dry=-0.000598 +drz=0.000723
+
+<PCFC> +proj=helmert +drx=0.000411 +dry=0.001036 +drz=-0.002166
+
+<SOAM> +proj=helmert +drx=-0.000243 +dry=-0.000311 +drz=-0.000154
+
+<SOMA> +proj=helmert +drx=-0.000080 +dry=-0.000745 +drz=0.000897
+
+<SUND> +proj=helmert +drx=0.000047 +dry=-0.001 +drz=0.000975
diff --git a/nad/ITRF2014 b/nad/ITRF2014
new file mode 100644
index 0000000..3465ec7
--- /dev/null
+++ b/nad/ITRF2014
@@ -0,0 +1,55 @@
+# ITRF2014 params are in mm/year, PJ_helmert uses m/year
+<metadata> +version=1.0.0 +origin=http://itrf.ign.fr/doc_ITRF/Transfo-ITRF2014_ITRFs.txt +lastupdate=2017-07-26
+
+<ITRF2008> +proj=helmert +x=0.0016 +y=0.0019 +z=0.0024 +s=-0.00002 +dz=-0.0001 +ds=0.00003 +t_epoch=2010.0 +transpose
+
+<ITRF2005> +proj=helmert +x=0.0026 +y=0.001 +z=-0.0023 +s=0.00092 +dx=0.0003 +dz=-0.0001 +ds=0.00003 +t_epoch=2010.0 +transpose
+
+<ITRF2000> +proj=helmert +x=0.0007 +y=0.0012 +z=-0.0261 +s=0.00212 +dx=0.0001 +dy=0.0001 +dz=-0.0019 +ds=0.00011 +t_epoch=2010.0 +transpose
+
+<ITRF97> +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +d=0.0038 +rz=0.00026 +dx0.0001	+dy=-0.0005 +dz=-0.0033	+ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose
+
+<ITRF96> +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +t_epoch=2010.0 +transpose
+
+<ITRF94> +proj=helmert +x=0.0074 +y=-0.0005 +z=-0.0628 +s=0.0038 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +t_epoch=2010.0 +transpose
+
+<ITRF93> +proj=helmert +x=-0.0504 +y=0.0033 +z=-0.0602 +s=0.00429 +rx=-0.00281 +ry=-0.00338 +rz=0.0004 +dx=-0.0028 +dy=-0.0001 +dz=-0.0025 +ds=0.00012 +drx=-0.00011 +dry=-0.00019 +drz=0.00007 +t_epoch=2010.0 +transpose
+
+<ITRF92> +proj=helmert +x=0.0154 +y=0.0015 +z=-0.0708 +s=0.00309 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose
+
+<ITRF91> +proj=helmert +x=0.0274 +y=0.0155 +z=-0.0768 +s=0.00449 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose
+
+<ITRF90> +proj=helmert +x=0.0254 +y=0.0115 +z=-0.0928 +s=0.00479 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose
+
+<ITRF89> +proj=helmert +x=0.0304 +y=0.0355 +z=-0.1308 +s=0.00819 +rz=0.00026 +dx=0.0001 +dy=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose
+
+<ITRF88> +proj=helmert +x=0.0254 +y=-0.0005 +z=-0.1548 +s=0.01129 +rx=0.0001 +rz= +dx=0.00026 +dy=0.0001 +dx=-0.0005 +dz=-0.0033 +ds=0.00012 +drz=0.00002 +t_epoch=2010.0 +transpose
+
+# ITRF2014 Plate Motion Model parameters
+#
+# As described in
+#
+# Z. Altamimi et al, 2017, ITRF2014 plate motion model,
+# doi: 10.1093/gji/ggx136
+
+<ANTA> +proj=helmert +drx=−0.000248 +dry=−0.000324 +drz=0.000675
+
+<ARAB> +proj=helmert +drx=0.001154 +dry=−0.000136 +drz=0.001444
+
+<AUST> +proj=helmert +drx=0.001510 +dry=0.001182 +drz=0.001215
+
+<EURA> +proj=helmert +drx=−0.000085 +dry=−0.000531 +drz=0.000770
+
+<INDI> +proj=helmert +drx=0.001154 +dry=−0.000005 +drz=0.001454
+
+<NAZC> +proj=helmert +drx=−0.000333 +dry=−0.001544 +drz=0.001623
+
+<NOAM> +proj=helmert +drx=0.000024 +dry=-0.000694 +drz=-0.000063
+
+<NUBI> +proj=helmert +drx=0.000099 +dry=−0.000614 +drz=0.000733
+
+<PCFC> +proj=helmert +drx=−0.000409 +dry=0.001047 +drz=-0.002169
+
+<SOAM> +proj=helmert +drx=−0.000270 +dry=−0.000301 +drz=−0.000140
+
+<SOMA> +proj=helmert +drx=−0.000121 +dry=−0.000794 +drz=0.000884
diff --git a/nad/Makefile.am b/nad/Makefile.am
index e437910..99d00da 100644
--- a/nad/Makefile.am
+++ b/nad/Makefile.am
@@ -15,13 +15,15 @@ TESTIGN = $(NADPATH)/testIGNF
 
 pkgdata_DATA = GL27 nad.lst proj_def.dat nad27 nad83 world epsg esri \
 		esri.extra other.extra \
-		CH IGNF
+		CH IGNF \
+		ITRF2000 ITRF2008 ITRF2014
 
 EXTRA_DIST = GL27 nad.lst proj_def.dat nad27 nad83 pj_out27.dist pj_out83.dist td_out.dist \
 		test27 test83 world epsg esri tv_out.dist tf_out.dist \
 		testflaky testvarious testdatumfile testntv2 ntv2_out.dist \
 		esri.extra other.extra \
 		CH IGNF testIGNF proj_outIGNF.dist \
+		ITRF2000 ITRF2008 ITRF2014 \
 		makefile.vc CMakeLists.txt
 
 process-nad2bin:
diff --git a/nad/Makefile.in b/nad/Makefile.in
index 8a715e6..df694b3 100644
--- a/nad/Makefile.in
+++ b/nad/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,17 +15,7 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -89,6 +79,8 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = nad
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(srcdir)/install.in README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -96,7 +88,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES = install
@@ -150,7 +141,6 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(pkgdatadir)"
 DATA = $(pkgdata_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/install.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -193,7 +183,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -263,7 +252,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -289,13 +277,15 @@ TESTDATUMFILE = $(NADPATH)/testdatumfile
 TESTIGN = $(NADPATH)/testIGNF
 pkgdata_DATA = GL27 nad.lst proj_def.dat nad27 nad83 world epsg esri \
 		esri.extra other.extra \
-		CH IGNF
+		CH IGNF \
+		ITRF2000 ITRF2008 ITRF2014
 
 EXTRA_DIST = GL27 nad.lst proj_def.dat nad27 nad83 pj_out27.dist pj_out83.dist td_out.dist \
 		test27 test83 world epsg esri tv_out.dist tf_out.dist \
 		testflaky testvarious testdatumfile testntv2 ntv2_out.dist \
 		esri.extra other.extra \
 		CH IGNF testIGNF proj_outIGNF.dist \
+		ITRF2000 ITRF2008 ITRF2014 \
 		makefile.vc CMakeLists.txt
 
 all: all-am
@@ -313,6 +303,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu nad/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu nad/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -515,8 +506,6 @@ uninstall-am: uninstall-pkgdataDATA
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am uninstall-pkgdataDATA
 
-.PRECIOUS: Makefile
-
 
 process-nad2bin:
 	@if [ -f $(NADPATH)/null.lla -a ! -f null ] || [ -f $(NADPATH)/conus.lla -a ! -f conus ] ; then \
diff --git a/nad/README b/nad/README
index 8a22721..884cedd 100644
--- a/nad/README
+++ b/nad/README
@@ -47,7 +47,7 @@ pj_out27    --- Comparison files for above test procedures.
 pj_out83
 
 The following NADCON conversion files are distributed in separate,
-uncompressed distibution file(s).
+uncompressed distribution file(s).
 
        Ascii source (in delta format) of grid data to convert geographic
 	   coordinates from NAD27 to NAD83
diff --git a/nad/epsg b/nad/epsg
index aec383a..1849ff5 100644
--- a/nad/epsg
+++ b/nad/epsg
@@ -1,3 +1,4 @@
+<metadata> +version=9.2.0 +origin=EPSG +lastupdate=2017-12-17
 # HD1909
 <3819> +proj=longlat +ellps=bessel +towgs84=595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408 +no_defs  <>
 # TWD67
@@ -161,7 +162,7 @@
 # Hartebeesthoek94
 <4148> +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # CH1903
-<4149> +proj=longlat +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +no_defs  <>
+<4149> +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs  <>
 # CH1903+
 <4150> +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs  <>
 # CHTRF95
@@ -239,7 +240,7 @@
 # POSGAR 98
 <4190> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # Albanian 1987
-<4191> +proj=longlat +ellps=krass +towgs84=-44.183,-0.58,-38.489,-2.3867,-2.7072,3.5196,-8.2703 +no_defs  <>
+<4191> +proj=longlat +ellps=krass +towgs84=-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703 +no_defs  <>
 # Douala 1948
 <4192> +proj=longlat +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +no_defs  <>
 # Manoca 1962
@@ -433,7 +434,7 @@
 # Loma Quintana
 <4288> +proj=longlat +ellps=intl +no_defs  <>
 # Amersfoort
-<4289> +proj=longlat +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725 +no_defs  <>
+<4289> +proj=longlat +ellps=bessel +towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +no_defs  <>
 # SAD69
 <4291> +proj=longlat +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +no_defs  <>
 # Sapper Hill 1943
@@ -587,7 +588,7 @@
 # Perroud 1950
 <4637> +proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +no_defs  <>
 # Saint Pierre et Miquelon 1950
-<4638> +proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs  <>
+<4638> +proj=longlat +ellps=clrk66 +towgs84=11.363,424.148,373.13,0,0,0,0 +no_defs  <>
 # MOP78
 <4639> +proj=longlat +ellps=intl +towgs84=253,-132,-127,0,0,0,0 +no_defs  <>
 # RRAF 1991
@@ -710,7 +711,7 @@
 <4708> +proj=longlat +ellps=aust_SA +towgs84=-491,-22,435,0,0,0,0 +no_defs  <>
 # Iwo Jima 1945
 <4709> +proj=longlat +ellps=intl +towgs84=145,75,-272,0,0,0,0 +no_defs  <>
-# St. Helena 1971
+# Astro DOS 71
 <4710> +proj=longlat +ellps=intl +towgs84=-320,550,-494,0,0,0,0 +no_defs  <>
 # Marcus Island 1952
 <4711> +proj=longlat +ellps=intl +towgs84=124,-234,-25,0,0,0,0 +no_defs  <>
@@ -823,7 +824,7 @@
 # Slovenia 1996
 <4765> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
 # Bern 1898 (Bern)
-<4801> +proj=longlat +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +pm=bern +no_defs  <>
+<4801> +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +pm=bern +no_defs  <>
 # Bogota 1975 (Bogota)
 <4802> +proj=longlat +ellps=intl +towgs84=307,304,-318,0,0,0,0 +pm=bogota +no_defs  <>
 # Lisbon (Lisbon)
@@ -992,8 +993,38 @@
 <7139> +proj=longlat +ellps=WGS84 +no_defs  <>
 # ONGD14
 <7373> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
+# GSK-2011
+<7683> +proj=longlat +a=6378136.5 +b=6356751.757955603 +no_defs  <>
 # Kyrg-06
 <7686> +proj=longlat +ellps=GRS80 +no_defs  <>
+# BGS2005
+<7798> +proj=longlat +ellps=GRS80 +no_defs  <>
+# GDA2020
+<7844> +proj=longlat +ellps=GRS80 +no_defs  <>
+# St. Helena Tritan
+<7881> +proj=longlat +ellps=WGS84 +towgs84=-0.077,0.079,0.086,0,0,0,0 +no_defs  <>
+# SHGD2015
+<7886> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  <>
+# Gusterberg (Ferro)
+<8042> +proj=longlat +a=6376045 +b=6355477.112903226 +pm=ferro +no_defs  <>
+# St. Stephen (Ferro)
+<8043> +proj=longlat +a=6376045 +b=6355477.112903226 +pm=ferro +no_defs  <>
+# ISN2016
+<8086> +proj=longlat +ellps=GRS80 +no_defs  <>
+# NAD83(CSRS96)
+<8232> +proj=longlat +ellps=GRS80 +no_defs  <>
+# NAD83(CSRS)v2
+<8237> +proj=longlat +ellps=GRS80 +no_defs  <>
+# NAD83(CSRS)v3
+<8240> +proj=longlat +ellps=GRS80 +no_defs  <>
+# NAD83(CSRS)v4
+<8246> +proj=longlat +ellps=GRS80 +no_defs  <>
+# NAD83(CSRS)v5
+<8249> +proj=longlat +ellps=GRS80 +no_defs  <>
+# NAD83(CSRS)v6
+<8252> +proj=longlat +ellps=GRS80 +no_defs  <>
+# NAD83(CSRS)v7
+<8255> +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
@@ -1125,7 +1156,7 @@
 # Dabola 1981 / UTM zone 29N (deprecated)
 <2064> +proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs  <>
 # S-JTSK (Ferro) / Krovak
-<2065> +proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=589,76,480,0,0,0,0 +pm=ferro +units=m +no_defs  <>
+<2065> +proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56 +pm=ferro +units=m +no_defs  <>
 # Mount Dillon / Tobago Grid
 <2066> +proj=cass +lat_0=11.25217861111111 +lon_0=-60.68600888888889 +x_0=37718.66159325 +y_0=36209.91512952 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.201166195164 +no_defs  <>
 # Naparima 1955 / UTM zone 20N
@@ -1379,7 +1410,7 @@
 # ETRS89 / Kp2000 Bornholm
 <2198> +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 +no_defs  <>
 # Albanian 1987 / Gauss Kruger zone 4 (deprecated)
-<2199> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=-44.183,-0.58,-38.489,-2.3867,-2.7072,3.5196,-8.2703 +units=m +no_defs  <>
+<2199> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703 +units=m +no_defs  <>
 # ATS77 / New Brunswick Stereographic (ATS77)
 <2200> +proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=300000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs  <>
 # REGVEN / UTM zone 18N
@@ -1787,11 +1818,11 @@
 # South Yemen / Gauss-Kruger zone 9
 <2396> +proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs  <>
 # Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3
-<2397> +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs  <>
+<2397> +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01 +units=m +no_defs  <>
 # Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4
-<2398> +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs  <>
+<2398> +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01 +units=m +no_defs  <>
 # Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5
-<2399> +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs  <>
+<2399> +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01 +units=m +no_defs  <>
 # RT90 2.5 gon W (deprecated)
 <2400> +proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +units=m +no_defs  <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 25
@@ -1917,7 +1948,7 @@
 # JGD2000 / Japan Plane Rectangular CS XIX
 <2461> +proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # Albanian 1987 / Gauss-Kruger zone 4
-<2462> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=-44.183,-0.58,-38.489,-2.3867,-2.7072,3.5196,-8.2703 +units=m +no_defs  <>
+<2462> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703 +units=m +no_defs  <>
 # Pulkovo 1995 / Gauss-Kruger CM 21E
 <2463> +proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +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 CM 27E
@@ -2968,7 +2999,7 @@
 # Unable to translate coordinate system EPSG:2986 into PROJ.4 format.
 #
 # Saint Pierre et Miquelon 1950 / UTM zone 21N
-<2987> +proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs  <>
+<2987> +proj=utm +zone=21 +ellps=clrk66 +towgs84=11.363,424.148,373.13,0,0,0,0 +units=m +no_defs  <>
 # MOP78 / UTM zone 1S
 <2988> +proj=utm +zone=1 +south +ellps=intl +towgs84=253,-132,-127,0,0,0,0 +units=m +no_defs  <>
 # RRAF 1991 / UTM zone 20N (deprecated)
@@ -3217,7 +3248,7 @@
 <3109> +proj=tmerc +lat_0=49.225 +lon_0=-2.135 +k=0.9999999000000001 +x_0=40000 +y_0=70000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # AGD66 / Vicgrid66
 <3110> +proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=4500000 +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs  <>
-# GDA94 / Vicgrid94
+# GDA94 / Vicgrid
 <3111> +proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # GDA94 / Geoscience Australia Lambert
 <3112> +proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
@@ -4647,7 +4678,7 @@
 # Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8 (deprecated)
 <3843> +proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs  <>
 # Pulkovo 1942(58) / Stereo70
-<3844> +proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  <>
+<3844> +proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=2.329,-147.042,-92.08,0.309,-0.325,-0.497,5.69 +units=m +no_defs  <>
 # SWEREF99 / RT90 7.5 gon V emulation
 <3845> +proj=tmerc +lat_0=0 +lon_0=11.30625 +k=1.000006 +x_0=1500025.141 +y_0=-667.282 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
 # SWEREF99 / RT90 5 gon V emulation
@@ -6734,11 +6765,11 @@
 <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
+# RDN2008 / UTM zone 32N (N-E)
 <6707> +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# RDN2008 / TM33
+# RDN2008 / UTM zone 33N (N-E)
 <6708> +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
-# RDN2008 / TM34
+# RDN2008 / UTM zone 34N (N-E)
 <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  <>
@@ -6920,7 +6951,7 @@
 <6861> +proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
 # NAD83(2011) / Oregon Santiam Pass zone (m)
 <6862> +proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
-# NAD83(2011) / Oregon Santiam Pass (ft)
+# NAD83(2011) / Oregon Santiam Pass zone (ft)
 <6863> +proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=ft +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  <>
@@ -6928,9 +6959,9 @@
 <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 TM 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
+# RDN2008 / Italy zone (N-E)
 <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
+# RDN2008 / Zone 12 (N-E)
 <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  <>
@@ -7560,6 +7591,532 @@
 <7695> +proj=tmerc +lat_0=0 +lon_0=77.51666666666667 +k=1 +x_0=4300000 +y_0=14743.5 +ellps=GRS80 +units=m +no_defs  <>
 # Kyrg-06 / zone 5
 <7696> +proj=tmerc +lat_0=0 +lon_0=80.51666666666667 +k=1 +x_0=5300000 +y_0=14743.5 +ellps=GRS80 +units=m +no_defs  <>
+# WGS 84 / India NSF LCC
+<7755> +proj=lcc +lat_1=12.472955 +lat_2=35.17280444444444 +lat_0=24 +lon_0=80 +x_0=4000000 +y_0=4000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Andhra Pradesh
+<7756> +proj=lcc +lat_1=13.75 +lat_2=18.75 +lat_0=16.25543298 +lon_0=80.875 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Arunachal Pradesh
+<7757> +proj=lcc +lat_1=27 +lat_2=29 +lat_0=28.00157897 +lon_0=94.5 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Assam
+<7758> +proj=lcc +lat_1=24.66666666666667 +lat_2=27.33333333333333 +lat_0=26.00257703 +lon_0=92.75 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Bihar
+<7759> +proj=lcc +lat_1=24.625 +lat_2=27.125 +lat_0=25.87725247 +lon_0=85.875 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Delhi
+<7760> +proj=lcc +lat_1=28.375 +lat_2=28.875 +lat_0=28.62510126 +lon_0=77 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Gujarat
+<7761> +proj=lcc +lat_1=20.79166666666667 +lat_2=23.95833333333333 +lat_0=22.37807121 +lon_0=71.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Haryana
+<7762> +proj=lcc +lat_1=28.08333333333333 +lat_2=30.41666666666667 +lat_0=29.25226266 +lon_0=76 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Himachal Pradesh
+<7763> +proj=lcc +lat_1=30.75 +lat_2=32.75 +lat_0=31.75183497 +lon_0=77.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Jammu and Kashmir
+<7764> +proj=lcc +lat_1=33.08333333333334 +lat_2=36.41666666666666 +lat_0=34.75570874 +lon_0=76.5 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Jharkhand
+<7765> +proj=lcc +lat_1=22.54166666666667 +lat_2=24.70833333333333 +lat_0=23.62652682 +lon_0=85.625 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Madhya Pradesh
+<7766> +proj=lcc +lat_1=22 +lat_2=26 +lat_0=24.00529821 +lon_0=78.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Maharashtra
+<7767> +proj=lcc +lat_1=16.625 +lat_2=21.125 +lat_0=18.88015774 +lon_0=76.75 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Manipur
+<7768> +proj=lcc +lat_1=24.08333333333333 +lat_2=25.41666666666667 +lat_0=24.75060911 +lon_0=94 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Meghalaya
+<7769> +proj=lcc +lat_1=25.20833333333333 +lat_2=26.04166666666667 +lat_0=25.62524747 +lon_0=91.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Nagaland
+<7770> +proj=lcc +lat_1=25.375 +lat_2=26.875 +lat_0=26.12581974 +lon_0=94.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / India Northeast
+<7771> +proj=lcc +lat_1=23.04166666666667 +lat_2=28.20833333333333 +lat_0=25.63452135 +lon_0=93.5 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Orissa
+<7772> +proj=lcc +lat_1=18.58333333333333 +lat_2=21.91666666666667 +lat_0=20.25305174 +lon_0=84.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Punjab
+<7773> +proj=lcc +lat_1=30 +lat_2=32 +lat_0=31.00178226 +lon_0=75.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Rajasthan
+<7774> +proj=lcc +lat_1=24.29166666666667 +lat_2=29.45833333333333 +lat_0=26.88505546 +lon_0=73.875 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Uttar Pradesh
+<7775> +proj=lcc +lat_1=24.875 +lat_2=29.375 +lat_0=27.13270823 +lon_0=80.875 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Uttaranchal
+<7776> +proj=lcc +lat_1=29 +lat_2=31 +lat_0=30.0017132 +lon_0=79.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Andaman and Nicobar
+<7777> +proj=tmerc +lat_0=10.25 +lon_0=93.25 +k=0.9999428 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Chhattisgarh
+<7778> +proj=tmerc +lat_0=21 +lon_0=82.25 +k=0.9998332 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Goa
+<7779> +proj=tmerc +lat_0=15.375 +lon_0=74 +k=0.9999913 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Karnataka
+<7780> +proj=tmerc +lat_0=15.125 +lon_0=76.375 +k=0.9998011999999999 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Kerala
+<7781> +proj=tmerc +lat_0=10.5 +lon_0=76 +k=0.9999177 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Lakshadweep
+<7782> +proj=tmerc +lat_0=10 +lon_0=73.125 +k=0.9999536 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Mizoram
+<7783> +proj=tmerc +lat_0=23.125 +lon_0=92.75 +k=0.9999821 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Sikkim
+<7784> +proj=tmerc +lat_0=27.625 +lon_0=88.5 +k=0.9999926 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Tamil Nadu
+<7785> +proj=tmerc +lat_0=10.875 +lon_0=78.375 +k=0.9997942 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / Tripura
+<7786> +proj=tmerc +lat_0=23.75 +lon_0=91.75 +k=0.9999822 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# WGS 84 / West Bengal
+<7787> +proj=tmerc +lat_0=24.375 +lon_0=87.875 +k=0.9998584 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs  <>
+# RDN2008 / UTM zone 32N
+<7791> +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# RDN2008 / UTM zone 33N
+<7792> +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# RDN2008 / UTM zone 34N
+<7793> +proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# RDN2008 / Italy zone (E-N)
+<7794> +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 (E-N)
+<7795> +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  <>
+# BGS2005 / UTM zone 34N (N-E)
+<7799> +proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs  <>
+# BGS2005 / UTM zone 35N (N-E)
+<7800> +proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs  <>
+# BGS2005 / CCS2005
+<7801> +proj=lcc +lat_1=42 +lat_2=43.33333333333334 +lat_0=42.66787568333333 +lon_0=25.5 +x_0=500000 +y_0=4725824.3591 +ellps=GRS80 +units=m +no_defs  <>
+# BGS2005 / UTM zone 34N
+<7803> +proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs  <>
+# BGS2005 / UTM zone 35N
+<7804> +proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs  <>
+# BGS2005 / UTM zone 36N
+<7805> +proj=utm +zone=36 +ellps=GRS80 +units=m +no_defs  <>
+# Pulkovo 1942 / CS63 zone X1
+<7825> +proj=tmerc +lat_0=0.08333333333333333 +lon_0=23.5 +k=1 +x_0=1300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs  <>
+# Pulkovo 1942 / CS63 zone X2
+<7826> +proj=tmerc +lat_0=0.08333333333333333 +lon_0=26.5 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs  <>
+# Pulkovo 1942 / CS63 zone X3
+<7827> +proj=tmerc +lat_0=0.08333333333333333 +lon_0=29.5 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs  <>
+# Pulkovo 1942 / CS63 zone X4
+<7828> +proj=tmerc +lat_0=0.08333333333333333 +lon_0=32.5 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs  <>
+# Pulkovo 1942 / CS63 zone X5
+<7829> +proj=tmerc +lat_0=0.08333333333333333 +lon_0=35.5 +k=1 +x_0=5300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs  <>
+# Pulkovo 1942 / CS63 zone X6
+<7830> +proj=tmerc +lat_0=0.08333333333333333 +lon_0=38.5 +k=1 +x_0=6300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs  <>
+# Pulkovo 1942 / CS63 zone X7
+<7831> +proj=tmerc +lat_0=0.08333333333333333 +lon_0=41.5 +k=1 +x_0=7300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs  <>
+# GDA2020 / GA LCC
+<7845> +proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 46
+<7846> +proj=utm +zone=46 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 47
+<7847> +proj=utm +zone=47 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 48
+<7848> +proj=utm +zone=48 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 49
+<7849> +proj=utm +zone=49 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 50
+<7850> +proj=utm +zone=50 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 51
+<7851> +proj=utm +zone=51 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 52
+<7852> +proj=utm +zone=52 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 53
+<7853> +proj=utm +zone=53 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 54
+<7854> +proj=utm +zone=54 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 55
+<7855> +proj=utm +zone=55 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 56
+<7856> +proj=utm +zone=56 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 57
+<7857> +proj=utm +zone=57 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 58
+<7858> +proj=utm +zone=58 +south +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MGA zone 59
+<7859> +proj=utm +zone=59 +south +ellps=GRS80 +units=m +no_defs  <>
+# Astro DOS 71 / SHLG71
+<7877> +proj=tmerc +lat_0=-15.96666666666667 +lon_0=-5.716666666666667 +k=1 +x_0=300000 +y_0=2000000 +ellps=intl +towgs84=-320,550,-494,0,0,0,0 +units=m +no_defs  <>
+# Astro DOS 71 / UTM zone 30S
+<7878> +proj=utm +zone=30 +south +ellps=intl +towgs84=-320,550,-494,0,0,0,0 +units=m +no_defs  <>
+# St. Helena Tritan / SHLG(Tritan)
+<7882> +proj=tmerc +lat_0=-15.96666666666667 +lon_0=-5.716666666666667 +k=1 +x_0=299483.737 +y_0=2000527.879 +ellps=WGS84 +towgs84=-0.077,0.079,0.086,0,0,0,0 +units=m +no_defs  <>
+# St. Helena Tritan / UTM zone 30S
+<7883> +proj=utm +zone=30 +south +ellps=WGS84 +towgs84=-0.077,0.079,0.086,0,0,0,0 +units=m +no_defs  <>
+# SHMG2015
+<7887> +proj=utm +zone=30 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# GDA2020 / Vicgrid
+<7899> +proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=2500000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD27 / MTM zone 10
+<7991> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD27 +units=m +no_defs  <>
+# Malongo 1987 / UTM zone 33S
+<7992> +proj=utm +zone=33 +south +ellps=intl +towgs84=-254.1,-5.36,-100.29,0,0,0,0 +units=m +no_defs  <>
+# GDA2020 / ALB2020
+<8013> +proj=tmerc +lat_0=0 +lon_0=117.8833333333333 +k=1.0000044 +x_0=50000 +y_0=4100000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / BIO2020
+<8014> +proj=tmerc +lat_0=0 +lon_0=115.25 +k=1.0000022 +x_0=60000 +y_0=2700000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / BRO2020
+<8015> +proj=tmerc +lat_0=0 +lon_0=122.3333333333333 +k=1.00000298 +x_0=50000 +y_0=2300000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / BCG2020
+<8016> +proj=tmerc +lat_0=0 +lon_0=115.4333333333333 +k=0.99999592 +x_0=50000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / CARN2020
+<8017> +proj=tmerc +lat_0=0 +lon_0=113.6666666666667 +k=0.99999796 +x_0=50000 +y_0=3050000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / CIG2020
+<8018> +proj=tmerc +lat_0=0 +lon_0=105.625 +k=1.00002514 +x_0=50000 +y_0=1400000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / CKIG2020
+<8019> +proj=tmerc +lat_0=0 +lon_0=96.875 +k=0.99999387 +x_0=50000 +y_0=1600000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / COL2020
+<8020> +proj=tmerc +lat_0=0 +lon_0=115.9333333333333 +k=1.000019 +x_0=40000 +y_0=4100000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / ESP2020
+<8021> +proj=tmerc +lat_0=0 +lon_0=121.8833333333333 +k=1.0000055 +x_0=50000 +y_0=4050000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / EXM2020
+<8022> +proj=tmerc +lat_0=0 +lon_0=114.0666666666667 +k=1.00000236 +x_0=50000 +y_0=2750000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / GCG2020
+<8023> +proj=tmerc +lat_0=0 +lon_0=114.5833333333333 +k=1.00000628 +x_0=50000 +y_0=3450000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / GOLD2020
+<8024> +proj=tmerc +lat_0=0 +lon_0=121.5 +k=1.00004949 +x_0=60000 +y_0=3800000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / JCG2020
+<8025> +proj=tmerc +lat_0=0 +lon_0=114.9833333333333 +k=1.00000314 +x_0=50000 +y_0=3650000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / KALB2020
+<8026> +proj=tmerc +lat_0=0 +lon_0=114.3152777777778 +k=1.000014 +x_0=55000 +y_0=3700000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / KAR2020
+<8027> +proj=tmerc +lat_0=0 +lon_0=116.9333333333333 +k=0.9999989 +x_0=50000 +y_0=2550000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / KUN2020
+<8028> +proj=tmerc +lat_0=0 +lon_0=128.75 +k=1.0000165 +x_0=50000 +y_0=2100000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / LCG2020
+<8029> +proj=tmerc +lat_0=0 +lon_0=115.3666666666667 +k=1.00000157 +x_0=50000 +y_0=3750000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / MRCG2020
+<8030> +proj=tmerc +lat_0=0 +lon_0=115.1666666666667 +k=1.0000055 +x_0=50000 +y_0=4050000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / PCG2020
+<8031> +proj=tmerc +lat_0=0 +lon_0=115.8166666666667 +k=0.9999990600000001 +x_0=50000 +y_0=3900000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / PHG2020
+<8032> +proj=tmerc +lat_0=0 +lon_0=118.6 +k=1.00000135 +x_0=50000 +y_0=2500000 +ellps=GRS80 +units=m +no_defs  <>
+# WGS 84 / TM Zone 20N (ftUS)
+<8035> +proj=utm +zone=20 +datum=WGS84 +units=us-ft +no_defs  <>
+# WGS 84 / TM Zone 21N (ftUS)
+<8036> +proj=utm +zone=21 +datum=WGS84 +units=us-ft +no_defs  <>
+# Gusterberg Grid (Ferro)
+<8044> +proj=cass +lat_0=48.03846388888888 +lon_0=31.80418055555556 +x_0=0 +y_0=0 +a=6376045 +b=6355477.112903226 +pm=ferro +units=m +no_defs  <>
+# St. Stephen Grid (Ferro)
+<8045> +proj=cass +lat_0=48.20876111111112 +lon_0=34.04092222222222 +x_0=0 +y_0=0 +a=6376045 +b=6355477.112903226 +pm=ferro +units=m +no_defs  <>
+# GDA2020 / NSW Lambert
+<8058> +proj=lcc +lat_1=-30.75 +lat_2=-35.75 +lat_0=-33.25 +lon_0=147 +x_0=9300000 +y_0=4500000 +ellps=GRS80 +units=m +no_defs  <>
+# GDA2020 / SA Lambert
+<8059> +proj=lcc +lat_1=-28 +lat_2=-36 +lat_0=-32 +lon_0=135 +x_0=1000000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / PCCS zone 1 (ft)
+<8065> +proj=omerc +lat_0=32.25 +lonc=-111.4 +alpha=45 +k=1.00011 +x_0=48768 +y_0=243840 +gamma=45 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / PCCS zone 2 (ft)
+<8066> +proj=tmerc +lat_0=31.25 +lon_0=-112.1666666666667 +k=1.00009 +x_0=548640 +y_0=304800 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / PCCS zone 3 (ft)
+<8067> +proj=tmerc +lat_0=31.5 +lon_0=-113.1666666666667 +k=1.000055 +x_0=182880 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / PCCS zone 4 (ft)
+<8068> +proj=lcc +lat_1=30.5 +lat_0=30.5 +lon_0=-110.75 +k_0=0.9998 +x_0=9144 +y_0=-188976 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(CSRS)v6 / MTM Nova Scotia zone 4
+<8082> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=24500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CSRS)v6 / MTM Nova Scotia zone 5
+<8083> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=25500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# ISN2016 / Lambert 2016
+<8088> +proj=lcc +lat_1=64.25 +lat_2=65.75 +lat_0=65 +lon_0=-19 +x_0=2700000 +y_0=300000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Florence (m)
+<8090> +proj=tmerc +lat_0=45.43888888888888 +lon_0=-88.14166666666668 +k=1.0000552095 +x_0=133502.6683 +y_0=0.0063 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Florence (ftUS)
+<8091> +proj=tmerc +lat_0=45.43888888888888 +lon_0=-88.14166666666668 +k=1.0000552095 +x_0=133502.6682245364 +y_0=0.006400812801625603 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Eau Claire (m)
+<8092> +proj=lcc +lat_1=44.87228112638889 +lat_0=44.87228112638889 +lon_0=-91.28888888888889 +k_0=1.000035079 +x_0=120091.4402 +y_0=91687.92389999999 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Eau Claire (ftUS)
+<8093> +proj=lcc +lat_1=44.87228112638889 +lat_0=44.87228112638889 +lon_0=-91.28888888888889 +k_0=1.000035079 +x_0=120091.4401828804 +y_0=91687.92390144781 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Wood (m)
+<8095> +proj=lcc +lat_1=44.36259546944444 +lat_0=44.36259546944444 +lon_0=-90 +k_0=1.0000421209 +x_0=208483.6173 +y_0=134589.754 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Wood (ftUS)
+<8096> +proj=lcc +lat_1=44.36259546944444 +lat_0=44.36259546944444 +lon_0=-90 +k_0=1.0000421209 +x_0=208483.6172720346 +y_0=134589.7539243078 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Waushara (m)
+<8097> +proj=lcc +lat_1=44.11394404583334 +lat_0=44.11394404583334 +lon_0=-89.24166666666667 +k_0=1.0000392096 +x_0=120091.4402 +y_0=45069.7587 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Waushara (ftUS)
+<8098> +proj=lcc +lat_1=44.11394404583334 +lat_0=44.11394404583334 +lon_0=-89.24166666666667 +k_0=1.0000392096 +x_0=120091.4401828804 +y_0=45069.7588011176 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Waupaca (m)
+<8099> +proj=tmerc +lat_0=43.42027777777778 +lon_0=-88.81666666666666 +k=1.0000333645 +x_0=185013.9709 +y_0=0.007 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Waupaca (ftUS)
+<8100> +proj=tmerc +lat_0=43.42027777777778 +lon_0=-88.81666666666666 +k=1.0000333645 +x_0=185013.9709423419 +y_0=0.007010414020828041 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Waukesha (m)
+<8101> +proj=tmerc +lat_0=42.56944444444445 +lon_0=-88.22499999999999 +k=1.0000346179 +x_0=208788.418 +y_0=0.0034 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Waukesha (ftUS)
+<8102> +proj=tmerc +lat_0=42.56944444444445 +lon_0=-88.22499999999999 +k=1.0000346179 +x_0=208788.4178816358 +y_0=0.003352806705613411 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Washington (m)
+<8103> +proj=tmerc +lat_0=42.91805555555555 +lon_0=-88.06388888888888 +k=1.00003738 +x_0=120091.4415 +y_0=0.003 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Washington (ftUS)
+<8104> +proj=tmerc +lat_0=42.91805555555555 +lon_0=-88.06388888888888 +k=1.00003738 +x_0=120091.4414020828 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Washburn (m)
+<8105> +proj=lcc +lat_1=45.96121983333334 +lat_0=45.96121983333334 +lon_0=-91.78333333333333 +k_0=1.0000475376 +x_0=234086.8682 +y_0=188358.6058 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Washburn (ftUS)
+<8106> +proj=lcc +lat_1=45.96121983333334 +lat_0=45.96121983333334 +lon_0=-91.78333333333333 +k_0=1.0000475376 +x_0=234086.8681737363 +y_0=188358.6059436119 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Walworth (m)
+<8107> +proj=lcc +lat_1=42.66946209694444 +lat_0=42.66946209694444 +lon_0=-88.54166666666667 +k_0=1.0000367192 +x_0=232562.8651 +y_0=111088.2224 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Walworth (ftUS)
+<8108> +proj=lcc +lat_1=42.66946209694444 +lat_0=42.66946209694444 +lon_0=-88.54166666666667 +k_0=1.0000367192 +x_0=232562.8651257302 +y_0=111088.2224028448 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Vilas (m)
+<8109> +proj=lcc +lat_1=46.07784409055556 +lat_0=46.07784409055556 +lon_0=-89.48888888888889 +k_0=1.0000730142 +x_0=134417.0689 +y_0=50337.1092 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Vilas (ftUS)
+<8110> +proj=lcc +lat_1=46.07784409055556 +lat_0=46.07784409055556 +lon_0=-89.48888888888889 +k_0=1.0000730142 +x_0=134417.0688341377 +y_0=50337.10927101854 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Vernon (m)
+<8111> +proj=lcc +lat_1=43.57503293972223 +lat_0=43.57503293972223 +lon_0=-90.78333333333333 +k_0=1.0000408158 +x_0=222504.4451 +y_0=47532.0602 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Vernon (ftUS)
+<8112> +proj=lcc +lat_1=43.57503293972223 +lat_0=43.57503293972223 +lon_0=-90.78333333333333 +k_0=1.0000408158 +x_0=222504.44500889 +y_0=47532.0603505207 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Trempealeau (m)
+<8113> +proj=tmerc +lat_0=43.16111111111111 +lon_0=-91.36666666666666 +k=1.0000361538 +x_0=256946.9138 +y_0=0.0041 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Trempealeau (ftUS)
+<8114> +proj=tmerc +lat_0=43.16111111111111 +lon_0=-91.36666666666666 +k=1.0000361538 +x_0=256946.9138938278 +y_0=0.003962407924815849 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Taylor (m)
+<8115> +proj=lcc +lat_1=45.17782208583333 +lat_0=45.17782208583333 +lon_0=-90.48333333333333 +k_0=1.0000597566 +x_0=187147.5744 +y_0=107746.7522 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Taylor (ftUS)
+<8116> +proj=lcc +lat_1=45.17782208583333 +lat_0=45.17782208583333 +lon_0=-90.48333333333333 +k_0=1.0000597566 +x_0=187147.5742951486 +y_0=107746.7521463043 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS St. Croix (m)
+<8117> +proj=tmerc +lat_0=44.03611111111111 +lon_0=-92.63333333333334 +k=1.0000381803 +x_0=165506.7302 +y_0=0.0103 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS St. Croix (ftUS)
+<8118> +proj=tmerc +lat_0=44.03611111111111 +lon_0=-92.63333333333334 +k=1.0000381803 +x_0=165506.7300990602 +y_0=0.01036322072644145 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Shawano (m)
+<8119> +proj=tmerc +lat_0=44.03611111111111 +lon_0=-88.60555555555555 +k=1.000032144 +x_0=262433.3253 +y_0=0.009599999999999999 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Shawano (ftUS)
+<8120> +proj=tmerc +lat_0=44.03611111111111 +lon_0=-88.60555555555555 +k=1.000032144 +x_0=262433.3251714504 +y_0=0.009448818897637795 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Sawyer (m)
+<8121> +proj=lcc +lat_1=45.90009913138888 +lat_0=45.90009913138888 +lon_0=-91.11666666666666 +k_0=1.0000573461 +x_0=216713.2336 +y_0=120734.1631 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Sawyer (ftUS)
+<8122> +proj=lcc +lat_1=45.90009913138888 +lat_0=45.90009913138888 +lon_0=-91.11666666666666 +k_0=1.0000573461 +x_0=216713.2337312675 +y_0=120734.1631699263 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Sauk (m)
+<8123> +proj=tmerc +lat_0=42.81944444444445 +lon_0=-89.90000000000001 +k=1.0000373868 +x_0=185623.5716 +y_0=0.0051 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Sauk (ftUS)
+<8124> +proj=tmerc +lat_0=42.81944444444445 +lon_0=-89.90000000000001 +k=1.0000373868 +x_0=185623.5715519431 +y_0=0.005181610363220727 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Rusk (m)
+<8125> +proj=tmerc +lat_0=43.91944444444444 +lon_0=-91.06666666666666 +k=1.0000495976 +x_0=250546.1013 +y_0=0.0234 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Rusk (ftUS)
+<8126> +proj=tmerc +lat_0=43.91944444444444 +lon_0=-91.06666666666666 +k=1.0000495976 +x_0=250546.1013970028 +y_0=0.02346964693929388 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Rock (m)
+<8127> +proj=tmerc +lat_0=41.94444444444444 +lon_0=-89.07222222222222 +k=1.0000337311 +x_0=146304.2926 +y_0=0.0068 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Rock (ftUS)
+<8128> +proj=tmerc +lat_0=41.94444444444444 +lon_0=-89.07222222222222 +k=1.0000337311 +x_0=146304.2926085852 +y_0=0.006705613411226822 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Richland (m)
+<8129> +proj=lcc +lat_1=43.3223129275 +lat_0=43.3223129275 +lon_0=-90.43055555555556 +k_0=1.0000375653 +x_0=202387.6048 +y_0=134255.4253 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Richland (ftUS)
+<8130> +proj=lcc +lat_1=43.3223129275 +lat_0=43.3223129275 +lon_0=-90.43055555555556 +k_0=1.0000375653 +x_0=202387.6047752095 +y_0=134255.4254508509 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Price (m)
+<8131> +proj=tmerc +lat_0=44.55555555555555 +lon_0=-90.48888888888889 +k=1.0000649554 +x_0=227990.8546 +y_0=0.0109 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Price (ftUS)
+<8132> +proj=tmerc +lat_0=44.55555555555555 +lon_0=-90.48888888888889 +k=1.0000649554 +x_0=227990.8544577089 +y_0=0.01097282194564389 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Portage (m)
+<8133> +proj=lcc +lat_1=44.41682397527777 +lat_0=44.41682397527777 +lon_0=-89.5 +k_0=1.000039936 +x_0=56388.1128 +y_0=50022.1874 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Portage (ftUS)
+<8134> +proj=lcc +lat_1=44.41682397527777 +lat_0=44.41682397527777 +lon_0=-89.5 +k_0=1.000039936 +x_0=56388.11277622555 +y_0=50022.1874523749 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Polk (m)
+<8135> +proj=tmerc +lat_0=44.66111111111111 +lon_0=-92.63333333333334 +k=1.0000433849 +x_0=141732.2823 +y_0=0.0059 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Polk (ftUS)
+<8136> +proj=tmerc +lat_0=44.66111111111111 +lon_0=-92.63333333333334 +k=1.0000433849 +x_0=141732.2822453645 +y_0=0.005791211582423164 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Pepin and Pierce (m)
+<8137> +proj=lcc +lat_1=44.63614887194444 +lat_0=44.63614887194444 +lon_0=-92.22777777777777 +k_0=1.0000362977 +x_0=167640.3354 +y_0=86033.0876 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Pepin and Pierce (ftUS)
+<8138> +proj=lcc +lat_1=44.63614887194444 +lat_0=44.63614887194444 +lon_0=-92.22777777777777 +k_0=1.0000362977 +x_0=167640.3352806706 +y_0=86033.08773177546 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Oneida (m)
+<8139> +proj=lcc +lat_1=45.70422377027778 +lat_0=45.70422377027778 +lon_0=-89.54444444444444 +k_0=1.0000686968 +x_0=70104.1401 +y_0=57588.0346 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Oneida (ftUS)
+<8140> +proj=lcc +lat_1=45.70422377027778 +lat_0=45.70422377027778 +lon_0=-89.54444444444444 +k_0=1.0000686968 +x_0=70104.14020828041 +y_0=57588.03474726949 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Oconto (m)
+<8141> +proj=tmerc +lat_0=44.39722222222222 +lon_0=-87.90833333333335 +k=1.0000236869 +x_0=182880.3676 +y_0=0.0033 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Oconto (ftUS)
+<8142> +proj=tmerc +lat_0=44.39722222222222 +lon_0=-87.90833333333335 +k=1.0000236869 +x_0=182880.3675895352 +y_0=0.003352806705613411 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Monroe (m)
+<8143> +proj=lcc +lat_1=44.00007392861111 +lat_0=44.00007392861111 +lon_0=-90.64166666666668 +k_0=1.0000434122 +x_0=204521.209 +y_0=121923.9861 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Monroe (ftUS)
+<8144> +proj=lcc +lat_1=44.00007392861111 +lat_0=44.00007392861111 +lon_0=-90.64166666666668 +k_0=1.0000434122 +x_0=204521.2090424181 +y_0=121923.9861823724 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Menominee (m)
+<8145> +proj=tmerc +lat_0=44.71666666666667 +lon_0=-88.41666666666667 +k=1.0000362499 +x_0=105461.0121 +y_0=0.0029 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Menominee (ftUS)
+<8146> +proj=tmerc +lat_0=44.71666666666667 +lon_0=-88.41666666666667 +k=1.0000362499 +x_0=105461.0121412243 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Marinette (m)
+<8147> +proj=tmerc +lat_0=44.69166666666666 +lon_0=-87.71111111111111 +k=1.0000234982 +x_0=238658.8794 +y_0=0.0032 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Marinette (ftUS)
+<8148> +proj=tmerc +lat_0=44.69166666666666 +lon_0=-87.71111111111111 +k=1.0000234982 +x_0=238658.8794513589 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Marathon (m)
+<8149> +proj=lcc +lat_1=44.90090442361111 +lat_0=44.90090442361111 +lon_0=-89.77 +k_0=1.000053289 +x_0=74676.1493 +y_0=55049.2669 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Marathon (ftUS)
+<8150> +proj=lcc +lat_1=44.90090442361111 +lat_0=44.90090442361111 +lon_0=-89.77 +k_0=1.000053289 +x_0=74676.1493522987 +y_0=55049.26695453391 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Lincoln (m)
+<8151> +proj=tmerc +lat_0=44.84444444444445 +lon_0=-89.73333333333333 +k=1.0000599003 +x_0=116129.0323 +y_0=0.0058 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Lincoln (ftUS)
+<8152> +proj=tmerc +lat_0=44.84444444444445 +lon_0=-89.73333333333333 +k=1.0000599003 +x_0=116129.0322580645 +y_0=0.005791211582423164 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Langlade (m)
+<8153> +proj=lcc +lat_1=45.15423710527778 +lat_0=45.15423710527778 +lon_0=-89.03333333333333 +k_0=1.0000627024 +x_0=198425.197 +y_0=105279.7829 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Langlade (ftUS)
+<8154> +proj=lcc +lat_1=45.15423710527778 +lat_0=45.15423710527778 +lon_0=-89.03333333333333 +k_0=1.0000627024 +x_0=198425.1968503937 +y_0=105279.7828803657 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS La Crosse (m)
+<8155> +proj=tmerc +lat_0=43.45111111111111 +lon_0=-91.31666666666666 +k=1.0000319985 +x_0=130454.6598 +y_0=0.0033 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS La Crosse (ftUS)
+<8156> +proj=tmerc +lat_0=43.45111111111111 +lon_0=-91.31666666666666 +k=1.0000319985 +x_0=130454.6596901194 +y_0=0.003352806705613411 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Kewaunee, Manitowoc and Sheboygan (m)
+<8157> +proj=tmerc +lat_0=43.26666666666667 +lon_0=-87.55 +k=1.0000233704 +x_0=79857.7614 +y_0=0.0012 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Kewaunee, Manitowoc and Sheboygan (ftUS)
+<8158> +proj=tmerc +lat_0=43.26666666666667 +lon_0=-87.55 +k=1.0000233704 +x_0=79857.76154432308 +y_0=0.001219202438404877 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Kenosha, Milwaukee, Ozaukee and Racine (m)
+<8159> +proj=tmerc +lat_0=42.21666666666667 +lon_0=-87.89444444444445 +k=1.0000260649 +x_0=185928.3728 +y_0=0.0009 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Kenosha, Milwaukee, Ozaukee and Racine (ftUS)
+<8160> +proj=tmerc +lat_0=42.21666666666667 +lon_0=-87.89444444444445 +k=1.0000260649 +x_0=185928.3727711455 +y_0=0.0009144018288036576 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Jackson (m)
+<8161> +proj=tmerc +lat_0=44.25333512777778 +lon_0=-90.84429651944444 +k=1.0000353 +x_0=27000 +y_0=25000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Jackson (ftUS)
+<8162> +proj=tmerc +lat_0=44.25333512777778 +lon_0=-90.84429651944444 +k=1.0000353 +x_0=27000 +y_0=24999.99989839979 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Iron (m)
+<8163> +proj=tmerc +lat_0=45.43333333333333 +lon_0=-90.25555555555556 +k=1.0000677153 +x_0=220980.4419 +y_0=0.008500000000000001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Iron (ftUS)
+<8164> +proj=tmerc +lat_0=45.43333333333333 +lon_0=-90.25555555555556 +k=1.0000677153 +x_0=220980.4419608839 +y_0=0.008534417068834137 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Iowa (m)
+<8165> +proj=tmerc +lat_0=42.53888888888888 +lon_0=-90.16111111111111 +k=1.0000394961 +x_0=113081.0261 +y_0=0.0045 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Iowa (ftUS)
+<8166> +proj=tmerc +lat_0=42.53888888888888 +lon_0=-90.16111111111111 +k=1.0000394961 +x_0=113081.0261620523 +y_0=0.004572009144018288 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Green Lake and Marquette (m)
+<8167> +proj=lcc +lat_1=43.80700011777778 +lat_0=43.80700011777778 +lon_0=-89.24166666666667 +k_0=1.0000344057 +x_0=150876.3018 +y_0=79170.7795 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Green Lake and Marquette (ftUS)
+<8168> +proj=lcc +lat_1=43.80700011777778 +lat_0=43.80700011777778 +lon_0=-89.24166666666667 +k_0=1.0000344057 +x_0=150876.3017526035 +y_0=79170.77937515875 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Green and Lafayette (m)
+<8169> +proj=lcc +lat_1=42.63756227694444 +lat_0=42.63756227694444 +lon_0=-89.83888888888889 +k_0=1.0000390487 +x_0=170078.7403 +y_0=45830.2947 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Green and Lafayette (ftUS)
+<8170> +proj=lcc +lat_1=42.63756227694444 +lat_0=42.63756227694444 +lon_0=-89.83888888888889 +k_0=1.0000390487 +x_0=170078.7401574803 +y_0=45830.29484378968 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Grant (m)
+<8171> +proj=tmerc +lat_0=41.41111111111111 +lon_0=-90.8 +k=1.0000349452 +x_0=242316.4841 +y_0=0.01 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Grant (ftUS)
+<8172> +proj=tmerc +lat_0=41.41111111111111 +lon_0=-90.8 +k=1.0000349452 +x_0=242316.484023368 +y_0=0.01005842011684023 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Forest (m)
+<8173> +proj=tmerc +lat_0=44.00555555555555 +lon_0=-88.63333333333334 +k=1.0000673004 +x_0=275844.5533 +y_0=0.0157 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Forest (ftUS)
+<8177> +proj=tmerc +lat_0=44.00555555555555 +lon_0=-88.63333333333334 +k=1.0000673004 +x_0=275844.5532131065 +y_0=0.0158496316992634 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Dunn (m)
+<8179> +proj=tmerc +lat_0=44.40833333333333 +lon_0=-91.89444444444445 +k=1.0000410324 +x_0=51816.104 +y_0=0.003 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Dunn (ftUS)
+<8180> +proj=tmerc +lat_0=44.40833333333333 +lon_0=-91.89444444444445 +k=1.0000410324 +x_0=51816.10393700787 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Douglas (m)
+<8181> +proj=tmerc +lat_0=45.88333333333333 +lon_0=-91.91666666666667 +k=1.0000385418 +x_0=59131.3183 +y_0=0.0041 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Douglas (ftUS)
+<8182> +proj=tmerc +lat_0=45.88333333333333 +lon_0=-91.91666666666667 +k=1.0000385418 +x_0=59131.31826263652 +y_0=0.003962407924815849 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Door (m)
+<8184> +proj=tmerc +lat_0=44.4 +lon_0=-87.27222222222223 +k=1.0000187521 +x_0=158801.1176 +y_0=0.0023 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Door (ftUS)
+<8185> +proj=tmerc +lat_0=44.4 +lon_0=-87.27222222222223 +k=1.0000187521 +x_0=158801.1176022352 +y_0=0.002438404876809754 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Dodge and Jefferson (m)
+<8187> +proj=tmerc +lat_0=41.47222222222222 +lon_0=-88.77500000000001 +k=1.0000346418 +x_0=263347.7263 +y_0=0.0076 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Dodge and Jefferson (ftUS)
+<8189> +proj=tmerc +lat_0=41.47222222222222 +lon_0=-88.77500000000001 +k=1.0000346418 +x_0=263347.7263906528 +y_0=0.00762001524003048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Dane (m)
+<8191> +proj=lcc +lat_1=43.0695160375 +lat_0=43.0695160375 +lon_0=-89.42222222222223 +k_0=1.0000384786 +x_0=247193.2944 +y_0=146591.9896 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Dane (ftUS)
+<8193> +proj=lcc +lat_1=43.0695160375 +lat_0=43.0695160375 +lon_0=-89.42222222222223 +k_0=1.0000384786 +x_0=247193.2943865888 +y_0=146591.9896367793 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Crawford (m)
+<8196> +proj=lcc +lat_1=43.200055605 +lat_0=43.200055605 +lon_0=-90.9388888888889 +k_0=1.0000349151 +x_0=113690.6274 +y_0=53703.1201 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Crawford (ftUS)
+<8197> +proj=lcc +lat_1=43.200055605 +lat_0=43.200055605 +lon_0=-90.9388888888889 +k_0=1.0000349151 +x_0=113690.6273812548 +y_0=53703.12024384048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Columbia (m)
+<8198> +proj=lcc +lat_1=43.46254664583333 +lat_0=43.46254664583333 +lon_0=-89.39444444444445 +k_0=1.00003498 +x_0=169164.3381 +y_0=111569.6134 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Columbia (ftUS)
+<8200> +proj=lcc +lat_1=43.46254664583333 +lat_0=43.46254664583333 +lon_0=-89.39444444444445 +k_0=1.00003498 +x_0=169164.338023876 +y_0=111569.613512827 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Clark (m)
+<8201> +proj=tmerc +lat_0=43.6 +lon_0=-90.70833333333334 +k=1.0000463003 +x_0=199949.1989 +y_0=0.0086 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Clark (ftUS)
+<8202> +proj=tmerc +lat_0=43.6 +lon_0=-90.70833333333334 +k=1.0000463003 +x_0=199949.198983998 +y_0=0.008534417068834137 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Chippewa (m)
+<8203> +proj=lcc +lat_1=44.97785689861112 +lat_0=44.97785689861112 +lon_0=-91.29444444444444 +k_0=1.0000391127 +x_0=60045.72 +y_0=44091.4346 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Chippewa (ftUS)
+<8204> +proj=lcc +lat_1=44.97785689861112 +lat_0=44.97785689861112 +lon_0=-91.29444444444444 +k_0=1.0000391127 +x_0=60045.72009144018 +y_0=44091.43449326898 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Calumet, Fond du Lac, Outagamie and Winnebago (m)
+<8205> +proj=tmerc +lat_0=42.71944444444445 +lon_0=-88.5 +k=1.0000286569 +x_0=244754.8893 +y_0=0.0049 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Calumet, Fond du Lac, Outagamie and Winnebago (ftUS)
+<8206> +proj=tmerc +lat_0=42.71944444444445 +lon_0=-88.5 +k=1.0000286569 +x_0=244754.8892049784 +y_0=0.004876809753619507 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Burnett (m)
+<8207> +proj=lcc +lat_1=45.89871486583333 +lat_0=45.89871486583333 +lon_0=-92.45777777777778 +k_0=1.0000383841 +x_0=64008.1276 +y_0=59445.9043 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Burnett (ftUS)
+<8208> +proj=lcc +lat_1=45.89871486583333 +lat_0=45.89871486583333 +lon_0=-92.45777777777778 +k_0=1.0000383841 +x_0=64008.12771145543 +y_0=59445.90419100838 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Buffalo (m)
+<8209> +proj=tmerc +lat_0=43.48138888888889 +lon_0=-91.79722222222222 +k=1.0000382778 +x_0=175260.3502 +y_0=0.0048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Buffalo (ftUS)
+<8210> +proj=tmerc +lat_0=43.48138888888889 +lon_0=-91.79722222222222 +k=1.0000382778 +x_0=175260.3502159004 +y_0=0.004876809753619507 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Brown (m)
+<8212> +proj=tmerc +lat_0=43 +lon_0=-88 +k=1.00002 +x_0=31600 +y_0=4600 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Brown (ftUS)
+<8213> +proj=tmerc +lat_0=43 +lon_0=-88 +k=1.00002 +x_0=31599.99989839979 +y_0=4599.999898399797 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Bayfield (m)
+<8214> +proj=lcc +lat_1=46.66964837722222 +lat_0=46.66964837722222 +lon_0=-91.15277777777779 +k_0=1.0000331195 +x_0=228600.4575 +y_0=148551.4837 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Bayfield (ftUS)
+<8216> +proj=lcc +lat_1=46.66964837722222 +lat_0=46.66964837722222 +lon_0=-91.15277777777779 +k_0=1.0000331195 +x_0=228600.4575057151 +y_0=148551.4835661671 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Barron (m)
+<8218> +proj=tmerc +lat_0=45.13333333333333 +lon_0=-91.84999999999999 +k=1.0000486665 +x_0=93150 +y_0=0.0029 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Barron (ftUS)
+<8220> +proj=tmerc +lat_0=45.13333333333333 +lon_0=-91.84999999999999 +k=1.0000486665 +x_0=93150 +y_0=0.003048006096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Ashland (m)
+<8222> +proj=tmerc +lat_0=45.70611111111111 +lon_0=-90.62222222222222 +k=1.0000495683 +x_0=172821.9461 +y_0=0.0017 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Ashland (ftUS)
+<8224> +proj=tmerc +lat_0=45.70611111111111 +lon_0=-90.62222222222222 +k=1.0000495683 +x_0=172821.945948692 +y_0=0.001828803657607315 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(HARN) / WISCRS Adams and Juneau (m)
+<8225> +proj=tmerc +lat_0=43.36666666666667 +lon_0=-90 +k=1.0000365285 +x_0=147218.6942 +y_0=0.0037 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
+# NAD83(HARN) / WISCRS Adams and Juneau (ftUS)
+<8226> +proj=tmerc +lat_0=43.36666666666667 +lon_0=-90 +k=1.0000365285 +x_0=147218.6941325883 +y_0=0.00365760731521463 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs  <>
+# NAD83(2011) / Oregon Burns-Harper zone (m)
+<8311> +proj=tmerc +lat_0=43.5 +lon_0=-117.6666666666667 +k=1.00014 +x_0=90000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Burns-Harper zone (ft)
+<8312> +proj=tmerc +lat_0=43.5 +lon_0=-117.6666666666667 +k=1.00014 +x_0=90000.00001488 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Canyon City-Burns zone (m)
+<8313> +proj=tmerc +lat_0=43.5 +lon_0=-119 +k=1.00022 +x_0=20000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Canyon City-Burns zone (ft)
+<8314> +proj=tmerc +lat_0=43.5 +lon_0=-119 +k=1.00022 +x_0=19999.99999992 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Coast Range North zone (m)
+<8315> +proj=lcc +lat_1=45.58333333333334 +lat_0=45.58333333333334 +lon_0=-123.4166666666667 +k_0=1.000045 +x_0=30000 +y_0=20000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Coast Range North zone (ft)
+<8316> +proj=lcc +lat_1=45.58333333333334 +lat_0=45.58333333333334 +lon_0=-123.4166666666667 +k_0=1.000045 +x_0=30000.00001512 +y_0=19999.99999992 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Dayville-Prairie City zone (m)
+<8317> +proj=tmerc +lat_0=44.25 +lon_0=-119.6333333333333 +k=1.00012 +x_0=20000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Dayville-Prairie City zone (ft)
+<8318> +proj=tmerc +lat_0=44.25 +lon_0=-119.6333333333333 +k=1.00012 +x_0=19999.99999992 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Denio-Burns zone (m)
+<8319> +proj=tmerc +lat_0=41.75 +lon_0=-118.4166666666667 +k=1.00019 +x_0=80000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Denio-Burns zone (ft)
+<8320> +proj=tmerc +lat_0=41.75 +lon_0=-118.4166666666667 +k=1.00019 +x_0=79999.99999968 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Halfway zone (m)
+<8321> +proj=lcc +lat_1=45.25 +lat_0=45.25 +lon_0=-117.25 +k_0=1.000085 +x_0=40000 +y_0=70000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Halfway zone (ft)
+<8322> +proj=lcc +lat_1=45.25 +lat_0=45.25 +lon_0=-117.25 +k_0=1.000085 +x_0=39999.99999984 +y_0=70000.00001495999 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Medford-Diamond Lake zone (m)
+<8323> +proj=lcc +lat_1=42 +lat_0=42 +lon_0=-122.25 +k_0=1.00004 +x_0=60000 +y_0=-60000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Medford-Diamond Lake zone (ft)
+<8324> +proj=lcc +lat_1=42 +lat_0=42 +lon_0=-122.25 +k_0=1.00004 +x_0=59999.99999976 +y_0=-59999.99999976 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Mitchell zone (m)
+<8325> +proj=lcc +lat_1=47 +lat_0=47 +lon_0=-120.25 +k_0=0.99927 +x_0=30000 +y_0=290000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Mitchell zone (ft)
+<8326> +proj=lcc +lat_1=47 +lat_0=47 +lon_0=-120.25 +k_0=0.99927 +x_0=30000.00001512 +y_0=290000.00001408 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon North Central zone (m)
+<8327> +proj=lcc +lat_1=46.16666666666666 +lat_0=46.16666666666666 +lon_0=-120.5 +k_0=1 +x_0=100000 +y_0=140000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon North Central zone (ft)
+<8328> +proj=lcc +lat_1=46.16666666666666 +lat_0=46.16666666666666 +lon_0=-120.5 +k_0=1 +x_0=99999.99999960001 +y_0=139999.99999944 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Ochoco Summit zone (m)
+<8329> +proj=lcc +lat_1=43.5 +lat_0=43.5 +lon_0=-120.5 +k_0=1.00006 +x_0=40000 +y_0=-80000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Ochoco Summit zone (ft)
+<8330> +proj=lcc +lat_1=43.5 +lat_0=43.5 +lon_0=-120.5 +k_0=1.00006 +x_0=39999.99999984 +y_0=-79999.99999968 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Owyhee zone (m)
+<8331> +proj=tmerc +lat_0=41.75 +lon_0=-117.5833333333333 +k=1.00018 +x_0=70000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Owyhee zone (ft)
+<8332> +proj=tmerc +lat_0=41.75 +lon_0=-117.5833333333333 +k=1.00018 +x_0=70000.00001495999 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Pilot Rock-Ukiah zone (m)
+<8333> +proj=lcc +lat_1=46.16666666666666 +lat_0=46.16666666666666 +lon_0=-119 +k_0=1.000025 +x_0=50000 +y_0=130000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Pilot Rock-Ukiah zone (ft)
+<8334> +proj=lcc +lat_1=46.16666666666666 +lat_0=46.16666666666666 +lon_0=-119 +k_0=1.000025 +x_0=50000.00001504 +y_0=130000.00001472 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Prairie City-Brogan zone (m)
+<8335> +proj=lcc +lat_1=44 +lat_0=44 +lon_0=-118 +k_0=1.00017 +x_0=60000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Prairie City-Brogan zone (ft)
+<8336> +proj=lcc +lat_1=44 +lat_0=44 +lon_0=-118 +k_0=1.00017 +x_0=59999.99999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Riley-Lakeview zone (m)
+<8337> +proj=tmerc +lat_0=41.75 +lon_0=-120.3333333333333 +k=1.000215 +x_0=70000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Riley-Lakeview zone (ft)
+<8338> +proj=tmerc +lat_0=41.75 +lon_0=-120.3333333333333 +k=1.000215 +x_0=70000.00001495999 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Siskiyou Pass zone (m)
+<8339> +proj=lcc +lat_1=42.5 +lat_0=42.5 +lon_0=-122.5833333333333 +k_0=1.00015 +x_0=10000 +y_0=60000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Siskiyou Pass zone (ft)
+<8340> +proj=lcc +lat_1=42.5 +lat_0=42.5 +lon_0=-122.5833333333333 +k_0=1.00015 +x_0=10000.0000152 +y_0=59999.99999976 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Ukiah-Fox zone (m)
+<8341> +proj=lcc +lat_1=45.25 +lat_0=45.25 +lon_0=-119 +k_0=1.00014 +x_0=30000 +y_0=90000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Ukiah-Fox zone (ft)
+<8342> +proj=lcc +lat_1=45.25 +lat_0=45.25 +lon_0=-119 +k_0=1.00014 +x_0=30000.00001512 +y_0=90000.00001488 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Wallowa zone (m)
+<8343> +proj=tmerc +lat_0=45.25 +lon_0=-117.5 +k=1.000195 +x_0=60000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Wallowa zone (ft)
+<8344> +proj=tmerc +lat_0=45.25 +lon_0=-117.5 +k=1.000195 +x_0=59999.99999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Warner Highway zone (m)
+<8345> +proj=lcc +lat_1=42.5 +lat_0=42.5 +lon_0=-120 +k_0=1.000245 +x_0=40000 +y_0=60000 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Warner Highway zone (ft)
+<8346> +proj=lcc +lat_1=42.5 +lat_0=42.5 +lon_0=-120 +k_0=1.000245 +x_0=39999.99999984 +y_0=59999.99999976 +ellps=GRS80 +units=ft +no_defs  <>
+# NAD83(2011) / Oregon Willamette Pass zone (m)
+<8347> +proj=tmerc +lat_0=43 +lon_0=-122 +k=1.000223 +x_0=20000 +y_0=0 +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(2011) / Oregon Willamette Pass zone (ft)
+<8348> +proj=tmerc +lat_0=43 +lon_0=-122 +k=1.000223 +x_0=19999.99999992 +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
@@ -7853,11 +8410,11 @@
 # Belge 1950 (Brussels) / Belge Lambert 50
 <21500> +proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=0 +x_0=150000 +y_0=5400000 +ellps=intl +pm=brussels +units=m +no_defs  <>
 # Bern 1898 (Bern) / LV03C
-<21780> +proj=somerc +lat_0=46.95240555555556 +lon_0=0 +k_0=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +pm=bern +units=m +no_defs  <>
+<21780> +proj=somerc +lat_0=46.95240555555556 +lon_0=0 +k_0=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +pm=bern +units=m +no_defs  <>
 # CH1903 / LV03
-<21781> +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs  <>
+<21781> +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs  <>
 # CH1903 / LV03C-G
-<21782> +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs  <>
+<21782> +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs  <>
 # Bogota 1975 / UTM zone 17N (deprecated)
 <21817> +proj=utm +zone=17 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs  <>
 # Bogota 1975 / UTM zone 18N
@@ -9074,9 +9631,9 @@
 # Qatar 1974 / Qatar National Grid
 <28600> +proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.99999 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-128.16,-282.42,21.93,0,0,0,0 +units=m +no_defs  <>
 # Amersfoort / RD Old
-<28991> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=0 +y_0=0 +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725 +units=m +no_defs  <>
+<28991> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=0 +y_0=0 +ellps=bessel +towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs  <>
 # Amersfoort / RD New
-<28992> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725 +units=m +no_defs  <>
+<28992> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs  <>
 # 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
@@ -9180,7 +9737,7 @@
 <29850> +proj=utm +zone=50 +ellps=evrstSS +towgs84=-679,669,-48,0,0,0,0 +units=m +no_defs  <>
 # Timbalai 1948 / RSO Borneo (ch)
 <29871> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8714630401 +y_0=442857.653094361 +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-679,669,-48,0,0,0,0 +to_meter=20.11676512155263 +no_defs  <>
-# Timbalai 1948 / RSO Borneo (ft)
+# Timbalai 1948 / RSO Borneo (ftSe)
 <29872> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8727431979 +y_0=442857.6545573985 +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-679,669,-48,0,0,0,0 +to_meter=0.3047994715386762 +no_defs  <>
 # Timbalai 1948 / RSO Borneo (m)
 <29873> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-679,669,-48,0,0,0,0 +units=m +no_defs  <>
@@ -9269,11 +9826,11 @@
 # Zanderij / Suriname TM
 <31171> +proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9999 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs  <>
 # MGI (Ferro) / Austria GK West Zone
-<31251> +proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs  <>
+<31251> +proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +pm=ferro +units=m +no_defs  <>
 # MGI (Ferro) / Austria GK Central Zone
-<31252> +proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs  <>
+<31252> +proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +pm=ferro +units=m +no_defs  <>
 # MGI (Ferro) / Austria GK East Zone
-<31253> +proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs  <>
+<31253> +proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +pm=ferro +units=m +no_defs  <>
 # MGI / Austria GK West
 <31254> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +no_defs  <>
 # MGI / Austria GK Central
@@ -10790,8 +11347,72 @@
 <7137> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
 # ONGD14
 <7371> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# WGS 84 (G730)
+<7656> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# WGS 84 (G873)
+<7658> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# WGS 84 (G1150)
+<7660> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# WGS 84 (G1674)
+<7662> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# WGS 84 (G1762)
+<7664> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# PZ-90.02
+<7677> +proj=geocent +a=6378136 +b=6356751.361745712 +units=m +no_defs  <>
+# PZ-90.11
+<7679> +proj=geocent +a=6378136 +b=6356751.361745712 +units=m +no_defs  <>
+# GSK-2011
+<7681> +proj=geocent +a=6378136.5 +b=6356751.757955603 +units=m +no_defs  <>
 # Kyrg-06
 <7684> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ITRF2014
+<7789> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# BGS2005
+<7796> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# WGS 84 (Transit)
+<7815> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# GDA2020
+<7842> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# St. Helena Tritan
+<7879> +proj=geocent +ellps=WGS84 +units=m +no_defs  <>
+# SHGD2015
+<7884> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRF89
+<7914> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRF90
+<7916> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRF91
+<7918> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRF92
+<7920> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRF93
+<7922> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRF94
+<7924> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRF96
+<7926> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRF97
+<7928> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ETRF2000
+<7930> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# ISN2016
+<8084> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# IGS14
+<8227> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CSRS96)
+<8230> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CSRS)v2
+<8233> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CSRS)v3
+<8238> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CSRS)v4
+<8242> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CSRS)v5
+<8247> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CSRS)v6
+<8250> +proj=geocent +ellps=GRS80 +units=m +no_defs  <>
+# NAD83(CSRS)v7
+<8253> +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
@@ -11067,7 +11688,7 @@
 # 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.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725 +vunits=m +no_defs  <>
+<7408> +proj=longlat +ellps=bessel +towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +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
@@ -11081,7 +11702,7 @@
 # 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.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725 +units=m +vunits=m +no_defs  <>
+<7415> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +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
@@ -11098,3 +11719,13 @@
 <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  <>
+# Astro DOS 71 / UTM zone 30S + Jamestown 1971 height
+<7954> +proj=utm +zone=30 +south +ellps=intl +towgs84=-320,550,-494,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# St. Helena Tritan / UTM zone 30S +  Tritan 2011 height
+<7955> +proj=utm +zone=30 +south +ellps=WGS84 +towgs84=-0.077,0.079,0.086,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# SHMG2015 +  SHVD2015 height
+<7956> +proj=utm +zone=30 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs  <>
+# GR96 + GVR2000 height
+<8349> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs  <>
+# GR96 + GVR2016 height
+<8350> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunits=m +no_defs  <>
diff --git a/nad/esri b/nad/esri
index ddee64b..36e35be 100644
--- a/nad/esri
+++ b/nad/esri
@@ -1,95 +1,96 @@
+<metadata> +origin=Esri +lastupdate=2017-02-26
 # Anguilla 1957 / British West Indies Grid
-<2000> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<2000> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs <>
 # Antigua 1943 / British West Indies Grid
-<2001> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=-255,-15,71,0,0,0,0 +units=m +no_defs  no_defs <>
+<2001> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=-255,-15,71,0,0,0,0 +units=m +no_defs <>
 # Dominica 1945 / British West Indies Grid
-<2002> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +units=m +no_defs  no_defs <>
+<2002> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +units=m +no_defs <>
 # Grenada 1953 / British West Indies Grid
-<2003> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +units=m +no_defs  no_defs <>
+<2003> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +units=m +no_defs <>
 # Montserrat 58 / British West Indies Grid
-<2004> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m +no_defs  no_defs <>
+<2004> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m +no_defs <>
 # St Kitts 1955 / British West Indies Grid
-<2005> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=9,183,236,0,0,0,0 +units=m +no_defs  no_defs <>
+<2005> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=9,183,236,0,0,0,0 +units=m +no_defs <>
 # St Lucia 1955 / British West Indies Grid
-<2006> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +units=m +no_defs  no_defs <>
+<2006> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +units=m +no_defs <>
 # St Vincent 45 / British West Indies Grid
-<2007> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<2007> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs <>
 # NAD27(CGQ77) / SCoPQ zone 2
-<2008> +proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2008> +proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / SCoPQ zone 3
-<2009> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2009> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / SCoPQ zone 4
-<2010> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2010> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / SCoPQ zone 5
-<2011> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2011> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / SCoPQ zone 6
-<2012> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2012> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / SCoPQ zone 7
-<2013> +proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2013> +proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / SCoPQ zone 8
-<2014> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2014> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / SCoPQ zone 9
-<2015> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2015> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / SCoPQ zone 10
-<2016> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2016> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 8
-<2017> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2017> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 9
-<2018> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2018> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 10
-<2019> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2019> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 11
-<2020> +proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2020> +proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 12
-<2021> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2021> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 13
-<2022> +proj=tmerc +lat_0=0 +lon_0=-84 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2022> +proj=tmerc +lat_0=0 +lon_0=-84 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 14
-<2023> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2023> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 15
-<2024> +proj=tmerc +lat_0=0 +lon_0=-90 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2024> +proj=tmerc +lat_0=0 +lon_0=-90 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 16
-<2025> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2025> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / MTM zone 17
-<2026> +proj=tmerc +lat_0=0 +lon_0=-96 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2026> +proj=tmerc +lat_0=0 +lon_0=-96 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / UTM zone 15N
-<2027> +proj=utm +zone=15 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2027> +proj=utm +zone=15 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / UTM zone 16N
-<2028> +proj=utm +zone=16 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2028> +proj=utm +zone=16 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / UTM zone 17N
-<2029> +proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2029> +proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(76) / UTM zone 18N
-<2030> +proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2030> +proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / UTM zone 17N
-<2031> +proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2031> +proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / UTM zone 18N
-<2032> +proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2032> +proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / UTM zone 19N
-<2033> +proj=utm +zone=19 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2033> +proj=utm +zone=19 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / UTM zone 20N
-<2034> +proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2034> +proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs <>
 # NAD27(CGQ77) / UTM zone 21N
-<2035> +proj=utm +zone=21 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2035> +proj=utm +zone=21 +ellps=clrk66 +units=m +no_defs <>
 # NAD83(CSRS98) / New Brunswick Stereo
-<2036> +proj=stere +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2036> +proj=stere +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / UTM zone 19N
-<2037> +proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2037> +proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / UTM zone 20N
-<2038> +proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2038> +proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # Israel / Israeli TM Grid
-<2039> +proj=tmerc +lat_0=31.73439361111111 +lon_0=35.20451694444445 +k=1.000007 +x_0=219529.584 +y_0=626907.39 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2039> +proj=tmerc +lat_0=31.73439361111111 +lon_0=35.20451694444445 +k=1.000007 +x_0=219529.584 +y_0=626907.39 +ellps=GRS80 +units=m +no_defs <>
 # Locodjo 1965 / UTM zone 30N
-<2040> +proj=utm +zone=30 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs  no_defs <>
+<2040> +proj=utm +zone=30 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs <>
 # Abidjan 1987 / UTM zone 30N
-<2041> +proj=utm +zone=30 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs  no_defs <>
+<2041> +proj=utm +zone=30 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs <>
 # Locodjo 1965 / UTM zone 29N
-<2042> +proj=utm +zone=29 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs  no_defs <>
+<2042> +proj=utm +zone=29 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs <>
 # Abidjan 1987 / UTM zone 29N
-<2043> +proj=utm +zone=29 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs  no_defs <>
+<2043> +proj=utm +zone=29 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs <>
 # Hanoi 1972 / Gauss-Kruger zone 18
-<2044> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs  no_defs <>
+<2044> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs <>
 # Hanoi 1972 / Gauss-Kruger zone 19
-<2045> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs  no_defs <>
+<2045> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs <>
 # Hartebeesthoek94 / Lo15
 # Hartebeesthoek94 / Lo17
 # Hartebeesthoek94 / Lo19
@@ -101,2693 +102,2693 @@
 # Hartebeesthoek94 / Lo31
 # Hartebeesthoek94 / Lo33
 # CH1903+ / LV95
-<2056> +proj=omerc +lat_0=46.95240555555556 +lonc=7.439583333333333 +alpha=90 +k=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs  no_defs <>
+<2056> +proj=omerc +lat_0=46.95240555555556 +lonc=7.439583333333333 +alpha=90 +k=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs <>
 # Rassadiran / Nakhl e Taqi
-<2057> +proj=omerc +lat_0=27.51882880555555 +lonc=52.60353916666667 +alpha=0.5716611944444444 +k=0.999895934 +x_0=658377.437 +y_0=3044969.194 +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +units=m +no_defs  no_defs <>
+<2057> +proj=omerc +lat_0=27.51882880555555 +lonc=52.60353916666667 +alpha=0.5716611944444444 +k=0.999895934 +x_0=658377.437 +y_0=3044969.194 +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +units=m +no_defs <>
 # ED50(ED77) / UTM zone 38N
-<2058> +proj=utm +zone=38 +ellps=intl +units=m +no_defs  no_defs <>
+<2058> +proj=utm +zone=38 +ellps=intl +units=m +no_defs <>
 # ED50(ED77) / UTM zone 39N
-<2059> +proj=utm +zone=39 +ellps=intl +units=m +no_defs  no_defs <>
+<2059> +proj=utm +zone=39 +ellps=intl +units=m +no_defs <>
 # ED50(ED77) / UTM zone 40N
-<2060> +proj=utm +zone=40 +ellps=intl +units=m +no_defs  no_defs <>
+<2060> +proj=utm +zone=40 +ellps=intl +units=m +no_defs <>
 # ED50(ED77) / UTM zone 41N
-<2061> +proj=utm +zone=41 +ellps=intl +units=m +no_defs  no_defs <>
+<2061> +proj=utm +zone=41 +ellps=intl +units=m +no_defs <>
 # Madrid 1870 (Madrid) / Spain
-<2062> +proj=lcc +lat_1=40 +lat_0=40 +lon_0=-3.687938888888889 +k_0=0.9988085293 +x_0=600000 +y_0=600000 +a=6378298.3 +b=6356657.142669562 +pm=madrid +units=m +no_defs  no_defs <>
+<2062> +proj=lcc +lat_1=40 +lat_0=40 +lon_0=-3.687938888888889 +k_0=0.9988085293 +x_0=600000 +y_0=600000 +a=6378298.3 +b=6356657.142669562 +pm=madrid +units=m +no_defs <>
 # Dabola 1981 / UTM zone 28N
-<2063> +proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs  no_defs <>
+<2063> +proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs <>
 # Dabola 1981 / UTM zone 29N
-<2064> +proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs  no_defs <>
+<2064> +proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs <>
 # S-JTSK (Ferro) / Krovak
-<2065> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs  no_defs <>
+<2065> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs <>
 # Mount Dillon / Tobago Grid
-<2066> +proj=cass +lat_0=11.25217861111111 +lon_0=-60.68600888888889 +x_0=37718.66154375 +y_0=36209.915082 +a=6378293.63683822 +b=6356617.979337744 +to_meter=0.2011661949 +no_defs  no_defs <>
+<2066> +proj=cass +lat_0=11.25217861111111 +lon_0=-60.68600888888889 +x_0=37718.66154375 +y_0=36209.915082 +a=6378293.63683822 +b=6356617.979337744 +to_meter=0.2011661949 +no_defs <>
 # Naparima 1955 / UTM zone 20N
-<2067> +proj=utm +zone=20 +ellps=intl +units=m +no_defs  no_defs <>
+<2067> +proj=utm +zone=20 +ellps=intl +units=m +no_defs <>
 # ELD79 / Libya zone 5
-<2068> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2068> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ELD79 / Libya zone 6
-<2069> +proj=tmerc +lat_0=0 +lon_0=11 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2069> +proj=tmerc +lat_0=0 +lon_0=11 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ELD79 / Libya zone 7
-<2070> +proj=tmerc +lat_0=0 +lon_0=13 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2070> +proj=tmerc +lat_0=0 +lon_0=13 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ELD79 / Libya zone 8
-<2071> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2071> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ELD79 / Libya zone 9
-<2072> +proj=tmerc +lat_0=0 +lon_0=17 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2072> +proj=tmerc +lat_0=0 +lon_0=17 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ELD79 / Libya zone 10
-<2073> +proj=tmerc +lat_0=0 +lon_0=19 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2073> +proj=tmerc +lat_0=0 +lon_0=19 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ELD79 / Libya zone 11
-<2074> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2074> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ELD79 / Libya zone 12
-<2075> +proj=tmerc +lat_0=0 +lon_0=23 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2075> +proj=tmerc +lat_0=0 +lon_0=23 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ELD79 / Libya zone 13
-<2076> +proj=tmerc +lat_0=0 +lon_0=25 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2076> +proj=tmerc +lat_0=0 +lon_0=25 +k=0.999900 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ELD79 / UTM zone 32N
-<2077> +proj=utm +zone=32 +ellps=intl +units=m +no_defs  no_defs <>
+<2077> +proj=utm +zone=32 +ellps=intl +units=m +no_defs <>
 # ELD79 / UTM zone 33N
-<2078> +proj=utm +zone=33 +ellps=intl +units=m +no_defs  no_defs <>
+<2078> +proj=utm +zone=33 +ellps=intl +units=m +no_defs <>
 # ELD79 / UTM zone 34N
-<2079> +proj=utm +zone=34 +ellps=intl +units=m +no_defs  no_defs <>
+<2079> +proj=utm +zone=34 +ellps=intl +units=m +no_defs <>
 # ELD79 / UTM zone 35N
-<2080> +proj=utm +zone=35 +ellps=intl +units=m +no_defs  no_defs <>
+<2080> +proj=utm +zone=35 +ellps=intl +units=m +no_defs <>
 # Chos Malal 1914 / Argentina zone 2
-<2081> +proj=tmerc +lat_0=-90 +lon_0=-69 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2081> +proj=tmerc +lat_0=-90 +lon_0=-69 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Pampa del Castillo / Argentina zone 2
-<2082> +proj=tmerc +lat_0=-90 +lon_0=-69 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2082> +proj=tmerc +lat_0=-90 +lon_0=-69 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Hito XVIII 1963 / Argentina zone 2
-<2083> +proj=tmerc +lat_0=-90 +lon_0=-69 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013 +units=m +no_defs  no_defs <>
+<2083> +proj=tmerc +lat_0=-90 +lon_0=-69 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013 +units=m +no_defs <>
 # Hito XVIII 1963 / UTM zone 19S
-<2084> +proj=utm +zone=19 +south +ellps=intl +towgs84=18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013 +units=m +no_defs  no_defs <>
+<2084> +proj=utm +zone=19 +south +ellps=intl +towgs84=18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013 +units=m +no_defs <>
 # NAD27 / Cuba Norte
-<2085> +proj=lcc +lat_1=22.35 +lat_0=22.35 +lon_0=-81 +k_0=0.99993602 +x_0=500000 +y_0=280296.016 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<2085> +proj=lcc +lat_1=22.35 +lat_0=22.35 +lon_0=-81 +k_0=0.99993602 +x_0=500000 +y_0=280296.016 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / Cuba Sur
-<2086> +proj=lcc +lat_1=20.71666666666667 +lat_0=20.71666666666667 +lon_0=-76.83333333333333 +k_0=0.99994848 +x_0=500000 +y_0=229126.939 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<2086> +proj=lcc +lat_1=20.71666666666667 +lat_0=20.71666666666667 +lon_0=-76.83333333333333 +k_0=0.99994848 +x_0=500000 +y_0=229126.939 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # ELD79 / TM 12 NE
-<2087> +proj=tmerc +lat_0=0 +lon_0=12 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2087> +proj=tmerc +lat_0=0 +lon_0=12 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Carthage / TM 11 NE
-<2088> +proj=tmerc +lat_0=0 +lon_0=11 +k=0.999600 +x_0=500000 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<2088> +proj=tmerc +lat_0=0 +lon_0=11 +k=0.999600 +x_0=500000 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # Yemen NGN96 / UTM zone 38N
-<2089> +proj=utm +zone=38 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2089> +proj=utm +zone=38 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # Yemen NGN96 / UTM zone 39N
-<2090> +proj=utm +zone=39 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2090> +proj=utm +zone=39 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # South Yemen / Gauss Kruger zone 8
-<2091> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs  no_defs <>
+<2091> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs <>
 # South Yemen / Gauss Kruger zone 9
-<2092> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs  no_defs <>
+<2092> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs <>
 # Hanoi 1972 / GK 106 NE
-<2093> +proj=tmerc +lat_0=0 +lon_0=106 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs  no_defs <>
+<2093> +proj=tmerc +lat_0=0 +lon_0=106 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs <>
 # WGS 72BE / TM 106 NE
-<2094> +proj=tmerc +lat_0=0 +lon_0=106 +k=0.999600 +x_0=500000 +y_0=0 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<2094> +proj=tmerc +lat_0=0 +lon_0=106 +k=0.999600 +x_0=500000 +y_0=0 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # Bissau / UTM zone 28N
-<2095> +proj=utm +zone=28 +ellps=intl +towgs84=-173,253,27,0,0,0,0 +units=m +no_defs  no_defs <>
+<2095> +proj=utm +zone=28 +ellps=intl +towgs84=-173,253,27,0,0,0,0 +units=m +no_defs <>
 # Korean 1985 / Korea East Belt
-<2096> +proj=tmerc +lat_0=38 +lon_0=129 +k=1.000000 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs  no_defs <>
+<2096> +proj=tmerc +lat_0=38 +lon_0=129 +k=1.000000 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs <>
 # Korean 1985 / Korea Central Belt
-<2097> +proj=tmerc +lat_0=38 +lon_0=127 +k=1.000000 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs  no_defs <>
+<2097> +proj=tmerc +lat_0=38 +lon_0=127 +k=1.000000 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs <>
 # Korean 1985 / Korea West Belt
-<2098> +proj=tmerc +lat_0=38 +lon_0=125 +k=1.000000 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs  no_defs <>
+<2098> +proj=tmerc +lat_0=38 +lon_0=125 +k=1.000000 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs <>
 # Qatar 1948 / Qatar Grid
-<2099> +proj=cass +lat_0=25.38236111111111 +lon_0=50.76138888888889 +x_0=100000 +y_0=100000 +ellps=helmert +units=m +no_defs  no_defs <>
+<2099> +proj=cass +lat_0=25.38236111111111 +lon_0=50.76138888888889 +x_0=100000 +y_0=100000 +ellps=helmert +units=m +no_defs <>
 # GGRS87 / Greek Grid
-<2100> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999600 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +units=m +no_defs  no_defs <>
+<2100> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999600 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +units=m +no_defs <>
 # Lake / Maracaibo Grid M1
-<2101> +proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=0 +y_0=-52684.972 +ellps=intl +units=m +no_defs  no_defs <>
+<2101> +proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=0 +y_0=-52684.972 +ellps=intl +units=m +no_defs <>
 # Lake / Maracaibo Grid
-<2102> +proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=200000 +y_0=147315.028 +ellps=intl +units=m +no_defs  no_defs <>
+<2102> +proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=200000 +y_0=147315.028 +ellps=intl +units=m +no_defs <>
 # Lake / Maracaibo Grid M3
-<2103> +proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=500000 +y_0=447315.028 +ellps=intl +units=m +no_defs  no_defs <>
+<2103> +proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=500000 +y_0=447315.028 +ellps=intl +units=m +no_defs <>
 # Lake / Maracaibo La Rosa Grid
-<2104> +proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=-17044 +y_0=-23139.97 +ellps=intl +units=m +no_defs  no_defs <>
+<2104> +proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=-17044 +y_0=-23139.97 +ellps=intl +units=m +no_defs <>
 # NZGD2000 / Mount Eden Circuit 2000
-<2105> +proj=tmerc +lat_0=-36.87972222222222 +lon_0=174.7641666666667 +k=0.999900 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2105> +proj=tmerc +lat_0=-36.87972222222222 +lon_0=174.7641666666667 +k=0.999900 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Bay of Plenty Circuit 2000
-<2106> +proj=tmerc +lat_0=-37.76111111111111 +lon_0=176.4661111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2106> +proj=tmerc +lat_0=-37.76111111111111 +lon_0=176.4661111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Poverty Bay Circuit 2000
-<2107> +proj=tmerc +lat_0=-38.62444444444444 +lon_0=177.8855555555556 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2107> +proj=tmerc +lat_0=-38.62444444444444 +lon_0=177.8855555555556 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Hawkes Bay Circuit 2000
-<2108> +proj=tmerc +lat_0=-39.65083333333333 +lon_0=176.6736111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2108> +proj=tmerc +lat_0=-39.65083333333333 +lon_0=176.6736111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Taranaki Circuit 2000
-<2109> +proj=tmerc +lat_0=-39.13555555555556 +lon_0=174.2277777777778 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2109> +proj=tmerc +lat_0=-39.13555555555556 +lon_0=174.2277777777778 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Tuhirangi Circuit 2000
-<2110> +proj=tmerc +lat_0=-39.51222222222222 +lon_0=175.64 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2110> +proj=tmerc +lat_0=-39.51222222222222 +lon_0=175.64 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Wanganui Circuit 2000
-<2111> +proj=tmerc +lat_0=-40.24194444444444 +lon_0=175.4880555555555 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2111> +proj=tmerc +lat_0=-40.24194444444444 +lon_0=175.4880555555555 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Wairarapa Circuit 2000
-<2112> +proj=tmerc +lat_0=-40.92527777777777 +lon_0=175.6472222222222 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2112> +proj=tmerc +lat_0=-40.92527777777777 +lon_0=175.6472222222222 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Wellington Circuit 2000
-<2113> +proj=tmerc +lat_0=-41.3011111111111 +lon_0=174.7763888888889 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2113> +proj=tmerc +lat_0=-41.3011111111111 +lon_0=174.7763888888889 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Collingwood Circuit 2000
-<2114> +proj=tmerc +lat_0=-40.71472222222223 +lon_0=172.6719444444444 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2114> +proj=tmerc +lat_0=-40.71472222222223 +lon_0=172.6719444444444 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Nelson Circuit 2000
-<2115> +proj=tmerc +lat_0=-41.27444444444444 +lon_0=173.2991666666667 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2115> +proj=tmerc +lat_0=-41.27444444444444 +lon_0=173.2991666666667 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Karamea Circuit 2000
-<2116> +proj=tmerc +lat_0=-41.28972222222222 +lon_0=172.1088888888889 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2116> +proj=tmerc +lat_0=-41.28972222222222 +lon_0=172.1088888888889 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Buller Circuit 2000
-<2117> +proj=tmerc +lat_0=-41.81055555555555 +lon_0=171.5811111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2117> +proj=tmerc +lat_0=-41.81055555555555 +lon_0=171.5811111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Grey Circuit 2000
-<2118> +proj=tmerc +lat_0=-42.33361111111111 +lon_0=171.5497222222222 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2118> +proj=tmerc +lat_0=-42.33361111111111 +lon_0=171.5497222222222 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Amuri Circuit 2000
-<2119> +proj=tmerc +lat_0=-42.68888888888888 +lon_0=173.01 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2119> +proj=tmerc +lat_0=-42.68888888888888 +lon_0=173.01 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Marlborough Circuit 2000
-<2120> +proj=tmerc +lat_0=-41.54444444444444 +lon_0=173.8019444444444 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2120> +proj=tmerc +lat_0=-41.54444444444444 +lon_0=173.8019444444444 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Hokitika Circuit 2000
-<2121> +proj=tmerc +lat_0=-42.88611111111111 +lon_0=170.9797222222222 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2121> +proj=tmerc +lat_0=-42.88611111111111 +lon_0=170.9797222222222 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Okarito Circuit 2000
-<2122> +proj=tmerc +lat_0=-43.11 +lon_0=170.2608333333333 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2122> +proj=tmerc +lat_0=-43.11 +lon_0=170.2608333333333 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Jacksons Bay Circuit 2000
-<2123> +proj=tmerc +lat_0=-43.97777777777778 +lon_0=168.6061111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2123> +proj=tmerc +lat_0=-43.97777777777778 +lon_0=168.6061111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Mount Pleasant Circuit 2000
-<2124> +proj=tmerc +lat_0=-43.59055555555556 +lon_0=172.7269444444445 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2124> +proj=tmerc +lat_0=-43.59055555555556 +lon_0=172.7269444444445 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Gawler Circuit 2000
-<2125> +proj=tmerc +lat_0=-43.74861111111111 +lon_0=171.3605555555555 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2125> +proj=tmerc +lat_0=-43.74861111111111 +lon_0=171.3605555555555 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Timaru Circuit 2000
-<2126> +proj=tmerc +lat_0=-44.40194444444445 +lon_0=171.0572222222222 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2126> +proj=tmerc +lat_0=-44.40194444444445 +lon_0=171.0572222222222 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Lindis Peak Circuit 2000
-<2127> +proj=tmerc +lat_0=-44.735 +lon_0=169.4675 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2127> +proj=tmerc +lat_0=-44.735 +lon_0=169.4675 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Mount Nicholas Circuit 2000
-<2128> +proj=tmerc +lat_0=-45.13277777777778 +lon_0=168.3986111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2128> +proj=tmerc +lat_0=-45.13277777777778 +lon_0=168.3986111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Mount York Circuit 2000
-<2129> +proj=tmerc +lat_0=-45.56361111111111 +lon_0=167.7386111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2129> +proj=tmerc +lat_0=-45.56361111111111 +lon_0=167.7386111111111 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Observation Point Circuit 2000
-<2130> +proj=tmerc +lat_0=-45.81611111111111 +lon_0=170.6283333333333 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2130> +proj=tmerc +lat_0=-45.81611111111111 +lon_0=170.6283333333333 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / North Taieri Circuit 2000
-<2131> +proj=tmerc +lat_0=-45.86138888888889 +lon_0=170.2825 +k=0.999960 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2131> +proj=tmerc +lat_0=-45.86138888888889 +lon_0=170.2825 +k=0.999960 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / Bluff Circuit 2000
-<2132> +proj=tmerc +lat_0=-46.6 +lon_0=168.3427777777778 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2132> +proj=tmerc +lat_0=-46.6 +lon_0=168.3427777777778 +k=1.000000 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / UTM zone 58S
-<2133> +proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2133> +proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / UTM zone 59S
-<2134> +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2134> +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NZGD2000 / UTM zone 60S
-<2135> +proj=utm +zone=60 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2135> +proj=utm +zone=60 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # Accra / Ghana National Grid
-<2136> +proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.999750 +x_0=274319.7391633579 +y_0=0 +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +to_meter=0.3047997101815088 +no_defs  no_defs <>
+<2136> +proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.999750 +x_0=274319.7391633579 +y_0=0 +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +to_meter=0.3047997101815088 +no_defs <>
 # Accra / TM 1 NW
-<2137> +proj=tmerc +lat_0=0 +lon_0=-1 +k=0.999600 +x_0=500000 +y_0=0 +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +units=m +no_defs  no_defs <>
+<2137> +proj=tmerc +lat_0=0 +lon_0=-1 +k=0.999600 +x_0=500000 +y_0=0 +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +units=m +no_defs <>
 # NAD27(CGQ77) / Quebec Lambert
-<2138> +proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2138> +proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # NAD83(CSRS98) / SCoPQ zone 2
-<2139> +proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2139> +proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / MTM zone 3
-<2140> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2140> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / MTM zone 4
-<2141> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2141> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / MTM zone 5
-<2142> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2142> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / MTM zone 6
-<2143> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2143> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / MTM zone 7
-<2144> +proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2144> +proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / MTM zone 8
-<2145> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2145> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / MTM zone 9
-<2146> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2146> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / MTM zone 10
-<2147> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2147> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / UTM zone 21N
-<2148> +proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2148> +proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / UTM zone 18N
-<2149> +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2149> +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / UTM zone 17N
-<2150> +proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2150> +proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / UTM zone 13N
-<2151> +proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2151> +proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / UTM zone 12N
-<2152> +proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2152> +proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS98) / UTM zone 11N
-<2153> +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2153> +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # RGF93 / Lambert-93
-<2154> +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 +no_defs  no_defs <>
+<2154> +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 +no_defs <>
 # American Samoa 1962 / American Samoa Lambert
-<2155> +proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2155> +proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / UTM zone 59S
-<2156> +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2156> +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # IRENET95 / Irish Transverse Mercator
-<2157> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=0.999820 +x_0=600000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2157> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=0.999820 +x_0=600000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # IRENET95 / UTM zone 29N
-<2158> +proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2158> +proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # Sierra Leone 1924 / New Colony Grid
-<2159> +proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1.000000 +x_0=152399.8550907544 +y_0=0 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs  no_defs <>
+<2159> +proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1.000000 +x_0=152399.8550907544 +y_0=0 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs <>
 # Sierra Leone 1924 / New War Office Grid
-<2160> +proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1.000000 +x_0=243839.7681452071 +y_0=182879.8261089053 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs  no_defs <>
+<2160> +proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1.000000 +x_0=243839.7681452071 +y_0=182879.8261089053 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs <>
 # Sierra Leone 1968 / UTM zone 28N
-<2161> +proj=utm +zone=28 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs  no_defs <>
+<2161> +proj=utm +zone=28 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs <>
 # Sierra Leone 1968 / UTM zone 29N
-<2162> +proj=utm +zone=29 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs  no_defs <>
+<2162> +proj=utm +zone=29 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs <>
 # US National Atlas Equal Area
-<2163> +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs  no_defs <>
+<2163> +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs <>
 # Locodjo 1965 / TM 5 NW
-<2164> +proj=tmerc +lat_0=0 +lon_0=-5 +k=0.999600 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs  no_defs <>
+<2164> +proj=tmerc +lat_0=0 +lon_0=-5 +k=0.999600 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs <>
 # Abidjan 1987 / TM 5 NW
-<2165> +proj=tmerc +lat_0=0 +lon_0=-5 +k=0.999600 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs  no_defs <>
+<2165> +proj=tmerc +lat_0=0 +lon_0=-5 +k=0.999600 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs <>
 # Pulkovo 1942(83) / Gauss Kruger zone 3
-<2166> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs  no_defs <>
+<2166> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs <>
 # Pulkovo 1942(83) / Gauss Kruger zone 4
-<2167> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs  no_defs <>
+<2167> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs <>
 # Pulkovo 1942(83) / Gauss Kruger zone 5
-<2168> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs  no_defs <>
+<2168> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs <>
 # Luxembourg 1930 / Gauss
-<2169> +proj=tmerc +lat_0=49.83333333333334 +lon_0=6.166666666666667 +k=1.000000 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +units=m +no_defs  no_defs <>
+<2169> +proj=tmerc +lat_0=49.83333333333334 +lon_0=6.166666666666667 +k=1.000000 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +units=m +no_defs <>
 # MGI / Slovenia Grid
-<2170> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999900 +x_0=500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<2170> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999900 +x_0=500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Pulkovo 1942(58) / Poland zone I
-<2171> +proj=stere +lat_0=50.625 +lon_0=21.08333333333333 +k=0.999800 +x_0=4637000 +y_0=5647000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  no_defs <>
+<2171> +proj=stere +lat_0=50.625 +lon_0=21.08333333333333 +k=0.999800 +x_0=4637000 +y_0=5647000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs <>
 # Pulkovo 1942(58) / Poland zone II
-<2172> +proj=stere +lat_0=53.00194444444445 +lon_0=21.50277777777778 +k=0.999800 +x_0=4603000 +y_0=5806000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  no_defs <>
+<2172> +proj=stere +lat_0=53.00194444444445 +lon_0=21.50277777777778 +k=0.999800 +x_0=4603000 +y_0=5806000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs <>
 # Pulkovo 1942(58) / Poland zone III
-<2173> +proj=stere +lat_0=53.58333333333334 +lon_0=17.00833333333333 +k=0.999800 +x_0=3501000 +y_0=5999000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  no_defs <>
+<2173> +proj=stere +lat_0=53.58333333333334 +lon_0=17.00833333333333 +k=0.999800 +x_0=3501000 +y_0=5999000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs <>
 # Pulkovo 1942(58) / Poland zone IV
-<2174> +proj=stere +lat_0=51.67083333333333 +lon_0=16.67222222222222 +k=0.999800 +x_0=3703000 +y_0=5627000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  no_defs <>
+<2174> +proj=stere +lat_0=51.67083333333333 +lon_0=16.67222222222222 +k=0.999800 +x_0=3703000 +y_0=5627000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs <>
 # Pulkovo 1942(58) / Poland zone V
-<2175> +proj=tmerc +lat_0=0 +lon_0=18.95833333333333 +k=0.999983 +x_0=237000 +y_0=-4700000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  no_defs <>
+<2175> +proj=tmerc +lat_0=0 +lon_0=18.95833333333333 +k=0.999983 +x_0=237000 +y_0=-4700000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs <>
 # ETRS89 / Poland CS2000 zone 5
-<2176> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999923 +x_0=5500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2176> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999923 +x_0=5500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / Poland CS2000 zone 6
-<2177> +proj=tmerc +lat_0=0 +lon_0=18 +k=0.999923 +x_0=6500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2177> +proj=tmerc +lat_0=0 +lon_0=18 +k=0.999923 +x_0=6500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / Poland CS2000 zone 7
-<2178> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.999923 +x_0=7500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2178> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.999923 +x_0=7500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / Poland CS2000 zone 8
-<2179> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999923 +x_0=8500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2179> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999923 +x_0=8500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / Poland CS92
-<2180> +proj=tmerc +lat_0=0 +lon_0=19 +k=0.999300 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2180> +proj=tmerc +lat_0=0 +lon_0=19 +k=0.999300 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +units=m +no_defs <>
 # Azores Occidental 1939 / UTM zone 25N
-<2188> +proj=utm +zone=25 +ellps=intl +units=m +no_defs  no_defs <>
+<2188> +proj=utm +zone=25 +ellps=intl +units=m +no_defs <>
 # Azores Central 1948 / UTM zone 26N
-<2189> +proj=utm +zone=26 +ellps=intl +units=m +no_defs  no_defs <>
+<2189> +proj=utm +zone=26 +ellps=intl +units=m +no_defs <>
 # Azores Oriental 1940 / UTM zone 26N
-<2190> +proj=utm +zone=26 +ellps=intl +units=m +no_defs  no_defs <>
+<2190> +proj=utm +zone=26 +ellps=intl +units=m +no_defs <>
 # Madeira 1936 / UTM zone 28N
-<2191> +proj=utm +zone=28 +ellps=intl +units=m +no_defs  no_defs <>
+<2191> +proj=utm +zone=28 +ellps=intl +units=m +no_defs <>
 # ED50 / France EuroLambert
-<2192> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666667 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +ellps=intl +units=m +no_defs  no_defs <>
+<2192> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666667 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +ellps=intl +units=m +no_defs <>
 # NZGD2000 / New Zealand Transverse Mercator
-<2193> +proj=tmerc +lat_0=0 +lon_0=173 +k=0.999600 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2193> +proj=tmerc +lat_0=0 +lon_0=173 +k=0.999600 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # American Samoa 1962 / American Samoa Lambert
-<2194> +proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=-170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2194> +proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=-170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / UTM zone 2S
-<2195> +proj=utm +zone=2 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2195> +proj=utm +zone=2 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # ETRS89 / Kp2000 Jutland
-<2196> +proj=tmerc +lat_0=0 +lon_0=9.5 +k=0.999950 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2196> +proj=tmerc +lat_0=0 +lon_0=9.5 +k=0.999950 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / Kp2000 Zealand
-<2197> +proj=tmerc +lat_0=0 +lon_0=12 +k=0.999950 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2197> +proj=tmerc +lat_0=0 +lon_0=12 +k=0.999950 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / Kp2000 Bornholm
-<2198> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2198> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # Albanian 1987 / Gauss Kruger zone 4
-<2199> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2199> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # ATS77 / New Brunswick Stereographic (ATS77)
-<2200> +proj=stere +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=300000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs  no_defs <>
+<2200> +proj=stere +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=300000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs <>
 # REGVEN / UTM zone 18N
-<2201> +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2201> +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # REGVEN / UTM zone 19N
-<2202> +proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2202> +proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # REGVEN / UTM zone 20N
-<2203> +proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2203> +proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD27 / Tennessee
-<2204> +proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=609601.2192024384 +y_0=30480.06096012192 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2204> +proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=609601.2192024384 +y_0=30480.06096012192 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Kentucky North
-<2205> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<2205> +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 +datum=NAD83 +units=m +no_defs <>
 # ED50 / 3-degree Gauss-Kruger zone 9
-<2206> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2206> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / 3-degree Gauss-Kruger zone 10
-<2207> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2207> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / 3-degree Gauss-Kruger zone 11
-<2208> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2208> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / 3-degree Gauss-Kruger zone 12
-<2209> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2209> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / 3-degree Gauss-Kruger zone 13
-<2210> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2210> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / 3-degree Gauss-Kruger zone 14
-<2211> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2211> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / 3-degree Gauss-Kruger zone 15
-<2212> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2212> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ETRS89 / TM 30 NE
-<2213> +proj=tmerc +lat_0=0 +lon_0=30 +k=0.999600 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<2213> +proj=tmerc +lat_0=0 +lon_0=30 +k=0.999600 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # Douala 1948 / AOF west
-<2214> +proj=tmerc +lat_0=0 +lon_0=10.5 +k=0.999000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs  no_defs <>
+<2214> +proj=tmerc +lat_0=0 +lon_0=10.5 +k=0.999000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs <>
 # Manoca 1962 / UTM zone 32N
-<2215> +proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +units=m +no_defs  no_defs <>
+<2215> +proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +units=m +no_defs <>
 # Qornoq 1927 / UTM zone 22N
-<2216> +proj=utm +zone=22 +ellps=intl +units=m +no_defs  no_defs <>
+<2216> +proj=utm +zone=22 +ellps=intl +units=m +no_defs <>
 # Qornoq 1927 / UTM zone 23N
-<2217> +proj=utm +zone=23 +ellps=intl +units=m +no_defs  no_defs <>
+<2217> +proj=utm +zone=23 +ellps=intl +units=m +no_defs <>
 # ATS77 / UTM zone 19N
-<2219> +proj=utm +zone=19 +a=6378135 +b=6356750.304921594 +units=m +no_defs  no_defs <>
+<2219> +proj=utm +zone=19 +a=6378135 +b=6356750.304921594 +units=m +no_defs <>
 # ATS77 / UTM zone 20N
-<2220> +proj=utm +zone=20 +a=6378135 +b=6356750.304921594 +units=m +no_defs  no_defs <>
+<2220> +proj=utm +zone=20 +a=6378135 +b=6356750.304921594 +units=m +no_defs <>
 # NAD83 / Arizona East (ft)
-<2222> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2222> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Arizona Central (ft)
-<2223> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2223> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Arizona West (ft)
-<2224> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2224> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / California zone 1 (ftUS)
-<2225> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2225> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / California zone 2 (ftUS)
-<2226> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2226> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / California zone 3 (ftUS)
-<2227> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2227> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / California zone 4 (ftUS)
-<2228> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2228> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / California zone 5 (ftUS)
-<2229> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2229> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / California zone 6 (ftUS)
-<2230> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2230> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Colorado North (ftUS)
-<2231> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2231> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Colorado Central (ftUS)
-<2232> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2232> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Colorado South (ftUS)
-<2233> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2233> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Connecticut (ftUS)
-<2234> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2234> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Delaware (ftUS)
-<2235> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2235> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Florida East (ftUS)
-<2236> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2236> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Florida West (ftUS)
-<2237> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2237> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Florida North (ftUS)
-<2238> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2238> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Georgia East (ftUS)
-<2239> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2239> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Georgia West (ftUS)
-<2240> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2240> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Idaho East (ftUS)
-<2241> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2241> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Idaho Central (ftUS)
-<2242> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2242> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Idaho West (ftUS)
-<2243> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2243> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Indiana East (ftUS)
-<2244> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2244> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Indiana West (ftUS)
-<2245> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2245> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Kentucky North (ftUS)
-<2246> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2246> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Kentucky South (ftUS)
-<2247> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2247> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Maryland (ftUS)
-<2248> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2248> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Massachusetts Mainland (ftUS)
-<2249> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2249> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Massachusetts Island (ftUS)
-<2250> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2250> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Michigan North (ft)
-<2251> +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 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2251> +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 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Michigan Central (ft)
-<2252> +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 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2252> +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 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Michigan South (ft)
-<2253> +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 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2253> +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 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Mississippi East (ftUS)
-<2254> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2254> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Mississippi West (ftUS)
-<2255> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2255> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Montana (ft)
-<2256> +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 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2256> +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 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / New Mexico East (ftUS)
-<2257> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2257> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / New Mexico Central (ftUS)
-<2258> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2258> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / New Mexico West (ftUS)
-<2259> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2259> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / New York East (ftUS)
-<2260> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2260> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / New York Central (ftUS)
-<2261> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2261> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / New York West (ftUS)
-<2262> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2262> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / New York Long Island (ftUS)
-<2263> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2263> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / North Carolina (ftUS)
-<2264> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2264> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / North Dakota North (ft)
-<2265> +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 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2265> +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 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / North Dakota South (ft)
-<2266> +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 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2266> +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 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Oklahoma North (ftUS)
-<2267> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2267> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Oklahoma South (ftUS)
-<2268> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2268> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Oregon North (ft)
-<2269> +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 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2269> +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 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Oregon South (ft)
-<2270> +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 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2270> +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 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Pennsylvania North (ftUS)
-<2271> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2271> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Pennsylvania South (ftUS)
-<2272> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2272> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / South Carolina (ft)
-<2273> +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 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2273> +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 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Tennessee (ftUS)
-<2274> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2274> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Texas North (ftUS)
-<2275> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2275> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Texas North Central (ftUS)
-<2276> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2276> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Texas Central (ftUS)
-<2277> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2277> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Texas South Central (ftUS)
-<2278> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2278> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Texas South (ftUS)
-<2279> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2279> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Utah North (ft)
-<2280> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2280> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Utah Central (ft)
-<2281> +proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2281> +proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Utah South (ft)
-<2282> +proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs  no_defs <>
+<2282> +proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048 +no_defs <>
 # NAD83 / Virginia North (ftUS)
-<2283> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2283> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Virginia South (ftUS)
-<2284> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2284> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Washington North (ftUS)
-<2285> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2285> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Washington South (ftUS)
-<2286> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2286> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Wisconsin North (ftUS)
-<2287> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2287> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Wisconsin Central (ftUS)
-<2288> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2288> +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 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / Wisconsin South (ftUS)
-<2289> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2289> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # ATS77 / Prince Edward Isl. Stereographic (ATS77)
-<2290> +proj=stere +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=700000 +y_0=400000 +a=6378135 +b=6356750.304921594 +units=m +no_defs  no_defs <>
+<2290> +proj=stere +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=700000 +y_0=400000 +a=6378135 +b=6356750.304921594 +units=m +no_defs <>
 # NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83)
-<2291> +proj=stere +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs  no_defs <>
+<2291> +proj=stere +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs <>
 # NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83)
-<2292> +proj=stere +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2292> +proj=stere +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # ATS77 / MTM Nova Scotia zone 4
-<2294> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=4500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs  no_defs <>
+<2294> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=4500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs <>
 # ATS77 / MTM Nova Scotia zone 5
-<2295> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=5500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs  no_defs <>
+<2295> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=5500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs <>
 # Batavia / TM 109 SE
-<2308> +proj=tmerc +lat_0=0 +lon_0=109 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=bessel +units=m +no_defs  no_defs <>
+<2308> +proj=tmerc +lat_0=0 +lon_0=109 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=bessel +units=m +no_defs <>
 # WGS 84 / TM 116 SE
-<2309> +proj=tmerc +lat_0=0 +lon_0=116 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<2309> +proj=tmerc +lat_0=0 +lon_0=116 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / TM 132 SE
-<2310> +proj=tmerc +lat_0=0 +lon_0=132 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<2310> +proj=tmerc +lat_0=0 +lon_0=132 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / TM 6 NE
-<2311> +proj=tmerc +lat_0=0 +lon_0=6 +k=0.999600 +x_0=500000 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<2311> +proj=tmerc +lat_0=0 +lon_0=6 +k=0.999600 +x_0=500000 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Garoua / UTM zone 33N
-<2312> +proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<2312> +proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs <>
 # Kousseri / UTM zone 33N
-<2313> +proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<2313> +proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs <>
 # Trinidad 1903 / Trinidad Grid (ftCla)
-<2314> +proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46380699999 +y_0=65379.01334249999 +a=6378293.63683822 +b=6356617.979337744 +towgs84=-61.702,284.488,472.052,0,0,0,0 +to_meter=0.304797265 +no_defs  no_defs <>
+<2314> +proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46380699999 +y_0=65379.01334249999 +a=6378293.63683822 +b=6356617.979337744 +towgs84=-61.702,284.488,472.052,0,0,0,0 +to_meter=0.304797265 +no_defs <>
 # Campo Inchauspe / UTM zone 19S
-<2315> +proj=utm +zone=19 +south +ellps=intl +units=m +no_defs  no_defs <>
+<2315> +proj=utm +zone=19 +south +ellps=intl +units=m +no_defs <>
 # Campo Inchauspe / UTM zone 20S
-<2316> +proj=utm +zone=20 +south +ellps=intl +units=m +no_defs  no_defs <>
+<2316> +proj=utm +zone=20 +south +ellps=intl +units=m +no_defs <>
 # PSAD56 / ICN Regional
-<2317> +proj=lcc +lat_1=9 +lat_2=3 +lat_0=6 +lon_0=-66 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs  no_defs <>
+<2317> +proj=lcc +lat_1=9 +lat_2=3 +lat_0=6 +lon_0=-66 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs <>
 # Ain el Abd / Aramco Lambert
-<2318> +proj=lcc +lat_1=17 +lat_2=33 +lat_0=25.08951 +lon_0=48 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2318> +proj=lcc +lat_1=17 +lat_2=33 +lat_0=25.08951 +lon_0=48 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / TM27
-<2319> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2319> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / TM30
-<2320> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2320> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / TM33
-<2321> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2321> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / TM36
-<2322> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2322> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / TM39
-<2323> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2323> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / TM42
-<2324> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2324> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / TM45
-<2325> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<2325> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Hong Kong 1980 Grid System
-<2326> +proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1.000000 +x_0=836694.05 +y_0=819069.8 +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +units=m +no_defs  no_defs <>
+<2326> +proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1.000000 +x_0=836694.05 +y_0=819069.8 +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 13
-<2327> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=13500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2327> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=13500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 14
-<2328> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=14500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2328> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=14500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 15
-<2329> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=15500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2329> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=15500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 16
-<2330> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=16500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2330> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=16500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 17
-<2331> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=17500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2331> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=17500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 18
-<2332> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2332> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 19
-<2333> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2333> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 20
-<2334> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=20500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2334> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=20500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 21
-<2335> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=21500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2335> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=21500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 22
-<2336> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=22500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2336> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=22500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger zone 23
-<2337> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=23500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2337> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=23500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 75E
-<2338> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2338> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 81E
-<2339> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2339> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 87E
-<2340> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2340> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 93E
-<2341> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2341> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 99E
-<2342> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2342> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 105E
-<2343> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2343> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 111E
-<2344> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2344> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 117E
-<2345> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2345> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 123E
-<2346> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2346> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 129E
-<2347> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2347> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / Gauss-Kruger CM 135E
-<2348> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2348> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 25
-<2349> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=25500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2349> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=25500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 26
-<2350> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=26500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2350> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=26500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 27
-<2351> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=27500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2351> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=27500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 28
-<2352> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=28500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2352> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=28500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 29
-<2353> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=29500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2353> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=29500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 30
-<2354> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=30500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2354> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=30500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 31
-<2355> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=31500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2355> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=31500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 32
-<2356> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=32500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2356> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=32500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 33
-<2357> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=33500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2357> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=33500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 34
-<2358> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=34500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2358> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=34500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 35
-<2359> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=35500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2359> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=35500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 36
-<2360> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=36500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2360> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=36500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 37
-<2361> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=37500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2361> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=37500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 38
-<2362> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=38500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2362> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=38500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 39
-<2363> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=39500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2363> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=39500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 40
-<2364> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=40500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2364> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=40500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 41
-<2365> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=41500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2365> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=41500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 42
-<2366> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=42500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2366> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=42500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 43
-<2367> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=43500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2367> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=43500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 44
-<2368> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=44500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2368> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=44500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger zone 45
-<2369> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=45500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2369> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=45500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 75E
-<2370> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2370> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 78E
-<2371> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2371> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 81E
-<2372> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2372> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 84E
-<2373> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2373> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 87E
-<2374> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2374> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 90E
-<2375> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2375> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 93E
-<2376> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2376> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 96E
-<2377> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2377> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 99E
-<2378> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2378> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 102E
-<2379> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2379> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 105E
-<2380> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2380> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 108E
-<2381> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2381> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 111E
-<2382> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2382> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 114E
-<2383> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2383> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 117E
-<2384> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2384> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 120E
-<2385> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2385> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 123E
-<2386> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2386> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 126E
-<2387> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2387> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 129E
-<2388> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2388> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 132E
-<2389> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2389> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # Xian 1980 / 3-degree Gauss-Kruger CM 135E
-<2390> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs  no_defs <>
+<2390> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs <>
 # KKJ / Finland zone 1
-<2391> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m +no_defs  no_defs <>
+<2391> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m +no_defs <>
 # KKJ / Finland zone 2
-<2392> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m +no_defs  no_defs <>
+<2392> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m +no_defs <>
 # KKJ / Finland Uniform Coordinate System
-<2393> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m +no_defs  no_defs <>
+<2393> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m +no_defs <>
 # KKJ / Finland zone 4
-<2394> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m +no_defs  no_defs <>
+<2394> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +units=m +no_defs <>
 # South Yemen / Gauss-Kruger zone 8
-<2395> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs  no_defs <>
+<2395> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs <>
 # South Yemen / Gauss-Kruger zone 9
-<2396> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs  no_defs <>
+<2396> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs <>
 # Pulkovo 1942(83) / Gauss-Kruger zone 3
-<2397> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs  no_defs <>
+<2397> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs <>
 # Pulkovo 1942(83) / Gauss-Kruger zone 4
-<2398> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs  no_defs <>
+<2398> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs <>
 # Pulkovo 1942(83) / Gauss-Kruger zone 5
-<2399> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs  no_defs <>
+<2399> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +units=m +no_defs <>
 # RT90 2.5 gon W
-<2400> +proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<2400> +proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 25
-<2401> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2401> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 26
-<2402> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2402> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 27
-<2403> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2403> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 28
-<2404> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2404> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 29
-<2405> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2405> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 30
-<2406> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2406> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 31
-<2407> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2407> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 32
-<2408> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2408> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 33
-<2409> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2409> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 34
-<2410> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2410> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 35
-<2411> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2411> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 36
-<2412> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2412> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 37
-<2413> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2413> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 38
-<2414> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2414> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 39
-<2415> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2415> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 40
-<2416> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2416> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 41
-<2417> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2417> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 42
-<2418> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2418> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 43
-<2419> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2419> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 44
-<2420> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2420> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger zone 45
-<2421> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2421> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 75E
-<2422> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2422> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 78E
-<2423> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2423> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 81E
-<2424> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2424> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 84E
-<2425> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2425> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 87E
-<2426> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2426> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 90E
-<2427> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2427> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 93E
-<2428> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2428> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 96E
-<2429> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2429> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 99E
-<2430> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2430> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 102E
-<2431> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2431> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 105E
-<2432> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2432> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 108E
-<2433> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2433> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 111E
-<2434> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2434> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 114E
-<2435> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2435> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 117E
-<2436> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2436> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 120E
-<2437> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2437> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 123E
-<2438> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2438> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 126E
-<2439> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2439> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 129E
-<2440> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2440> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 132E
-<2441> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2441> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / 3-degree Gauss-Kruger CM 135E
-<2442> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2442> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS I
-<2443> +proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2443> +proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS II
-<2444> +proj=tmerc +lat_0=33 +lon_0=131 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2444> +proj=tmerc +lat_0=33 +lon_0=131 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS III
-<2445> +proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2445> +proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS IV
-<2446> +proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2446> +proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS V
-<2447> +proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2447> +proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS VI
-<2448> +proj=tmerc +lat_0=36 +lon_0=136 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2448> +proj=tmerc +lat_0=36 +lon_0=136 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS VII
-<2449> +proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2449> +proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS VIII
-<2450> +proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2450> +proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS IX
-<2451> +proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2451> +proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS X
-<2452> +proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2452> +proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS XI
-<2453> +proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2453> +proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS XII
-<2454> +proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2454> +proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS XIII
-<2455> +proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2455> +proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS XIV
-<2456> +proj=tmerc +lat_0=26 +lon_0=142 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2456> +proj=tmerc +lat_0=26 +lon_0=142 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS XV
-<2457> +proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2457> +proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS XVI
-<2458> +proj=tmerc +lat_0=26 +lon_0=124 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2458> +proj=tmerc +lat_0=26 +lon_0=124 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS XVII
-<2459> +proj=tmerc +lat_0=26 +lon_0=131 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2459> +proj=tmerc +lat_0=26 +lon_0=131 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS XVIII
-<2460> +proj=tmerc +lat_0=20 +lon_0=136 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2460> +proj=tmerc +lat_0=20 +lon_0=136 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # JGD2000 / Japan Plane Rectangular CS XIX
-<2461> +proj=tmerc +lat_0=26 +lon_0=154 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2461> +proj=tmerc +lat_0=26 +lon_0=154 +k=0.999900 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # Albanian 1987 / Gauss-Kruger zone 4
-<2462> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2462> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 21E
-<2463> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2463> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 27E
-<2464> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2464> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 33E
-<2465> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2465> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 39E
-<2466> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2466> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 45E
-<2467> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2467> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 51E
-<2468> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2468> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 57E
-<2469> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2469> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 63E
-<2470> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2470> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 69E
-<2471> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2471> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 75E
-<2472> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2472> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 81E
-<2473> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2473> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 87E
-<2474> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2474> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 93E
-<2475> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2475> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 99E
-<2476> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2476> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 105E
-<2477> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2477> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 111E
-<2478> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2478> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 117E
-<2479> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2479> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 123E
-<2480> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2480> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 129E
-<2481> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2481> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 135E
-<2482> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2482> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 141E
-<2483> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2483> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 147E
-<2484> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2484> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 153E
-<2485> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2485> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 159E
-<2486> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2486> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 165E
-<2487> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2487> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 171E
-<2488> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2488> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 177E
-<2489> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2489> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 177W
-<2490> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2490> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger CM 171W
-<2491> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2491> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 9E
-<2492> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2492> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 15E
-<2493> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2493> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 21E
-<2494> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2494> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 27E
-<2495> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2495> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 33E
-<2496> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2496> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 39E
-<2497> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2497> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 45E
-<2498> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2498> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 51E
-<2499> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2499> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 57E
-<2500> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2500> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 63E
-<2501> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2501> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 69E
-<2502> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2502> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 75E
-<2503> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2503> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 81E
-<2504> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2504> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 87E
-<2505> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2505> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 93E
-<2506> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2506> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 99E
-<2507> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2507> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 105E
-<2508> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2508> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 111E
-<2509> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2509> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 117E
-<2510> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2510> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 123E
-<2511> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2511> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 129E
-<2512> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2512> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 135E
-<2513> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2513> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 141E
-<2514> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2514> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 147E
-<2515> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2515> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 153E
-<2516> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2516> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 159E
-<2517> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2517> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 165E
-<2518> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2518> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 171E
-<2519> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2519> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 177E
-<2520> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2520> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 177W
-<2521> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2521> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger CM 171W
-<2522> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2522> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 7
-<2523> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2523> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 8
-<2524> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2524> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 9
-<2525> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2525> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 10
-<2526> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2526> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 11
-<2527> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2527> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 12
-<2528> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2528> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 13
-<2529> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2529> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 14
-<2530> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2530> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 15
-<2531> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2531> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 16
-<2532> +proj=tmerc +lat_0=0 +lon_0=48 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2532> +proj=tmerc +lat_0=0 +lon_0=48 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 17
-<2533> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2533> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 18
-<2534> +proj=tmerc +lat_0=0 +lon_0=54 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2534> +proj=tmerc +lat_0=0 +lon_0=54 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 19
-<2535> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2535> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 20
-<2536> +proj=tmerc +lat_0=0 +lon_0=60 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2536> +proj=tmerc +lat_0=0 +lon_0=60 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 21
-<2537> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2537> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 22
-<2538> +proj=tmerc +lat_0=0 +lon_0=66 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2538> +proj=tmerc +lat_0=0 +lon_0=66 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 23
-<2539> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2539> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 24
-<2540> +proj=tmerc +lat_0=0 +lon_0=72 +k=1.000000 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2540> +proj=tmerc +lat_0=0 +lon_0=72 +k=1.000000 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 25
-<2541> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2541> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 26
-<2542> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2542> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 27
-<2543> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2543> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 28
-<2544> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2544> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 29
-<2545> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2545> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 30
-<2546> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2546> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 31
-<2547> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2547> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 32
-<2548> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2548> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 33
-<2549> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2549> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Samboja / UTM zone 50S
-<2550> +proj=utm +zone=50 +south +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +units=m +no_defs  no_defs <>
+<2550> +proj=utm +zone=50 +south +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 34
-<2551> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2551> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 35
-<2552> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2552> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 36
-<2553> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2553> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 37
-<2554> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2554> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 38
-<2555> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2555> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 39
-<2556> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2556> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 40
-<2557> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2557> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 41
-<2558> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2558> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 42
-<2559> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2559> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 43
-<2560> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2560> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 44
-<2561> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2561> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 45
-<2562> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2562> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 46
-<2563> +proj=tmerc +lat_0=0 +lon_0=138 +k=1.000000 +x_0=46500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2563> +proj=tmerc +lat_0=0 +lon_0=138 +k=1.000000 +x_0=46500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 47
-<2564> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=47500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2564> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=47500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 48
-<2565> +proj=tmerc +lat_0=0 +lon_0=144 +k=1.000000 +x_0=48500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2565> +proj=tmerc +lat_0=0 +lon_0=144 +k=1.000000 +x_0=48500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 49
-<2566> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=49500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2566> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=49500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 50
-<2567> +proj=tmerc +lat_0=0 +lon_0=150 +k=1.000000 +x_0=50500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2567> +proj=tmerc +lat_0=0 +lon_0=150 +k=1.000000 +x_0=50500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 51
-<2568> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=51500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2568> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=51500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 52
-<2569> +proj=tmerc +lat_0=0 +lon_0=156 +k=1.000000 +x_0=52500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2569> +proj=tmerc +lat_0=0 +lon_0=156 +k=1.000000 +x_0=52500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 53
-<2570> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=53500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2570> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=53500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 54
-<2571> +proj=tmerc +lat_0=0 +lon_0=162 +k=1.000000 +x_0=54500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2571> +proj=tmerc +lat_0=0 +lon_0=162 +k=1.000000 +x_0=54500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 55
-<2572> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=55500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2572> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=55500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 56
-<2573> +proj=tmerc +lat_0=0 +lon_0=168 +k=1.000000 +x_0=56500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2573> +proj=tmerc +lat_0=0 +lon_0=168 +k=1.000000 +x_0=56500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 57
-<2574> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=57500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2574> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=57500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 58
-<2575> +proj=tmerc +lat_0=0 +lon_0=174 +k=1.000000 +x_0=58500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2575> +proj=tmerc +lat_0=0 +lon_0=174 +k=1.000000 +x_0=58500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 59
-<2576> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=59500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2576> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=59500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 60
-<2577> +proj=tmerc +lat_0=0 +lon_0=180 +k=1.000000 +x_0=60000000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2577> +proj=tmerc +lat_0=0 +lon_0=180 +k=1.000000 +x_0=60000000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 61
-<2578> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=61500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2578> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=61500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 62
-<2579> +proj=tmerc +lat_0=0 +lon_0=-174 +k=1.000000 +x_0=62500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2579> +proj=tmerc +lat_0=0 +lon_0=-174 +k=1.000000 +x_0=62500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 63
-<2580> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=63500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2580> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=63500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger zone 64
-<2581> +proj=tmerc +lat_0=0 +lon_0=-168 +k=1.000000 +x_0=64500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2581> +proj=tmerc +lat_0=0 +lon_0=-168 +k=1.000000 +x_0=64500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E
-<2582> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2582> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E
-<2583> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2583> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E
-<2584> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2584> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E
-<2585> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2585> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E
-<2586> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2586> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E
-<2587> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2587> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E
-<2588> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2588> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E
-<2589> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2589> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E
-<2590> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2590> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E
-<2591> +proj=tmerc +lat_0=0 +lon_0=48 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2591> +proj=tmerc +lat_0=0 +lon_0=48 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E
-<2592> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2592> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E
-<2593> +proj=tmerc +lat_0=0 +lon_0=54 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2593> +proj=tmerc +lat_0=0 +lon_0=54 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E
-<2594> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2594> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E
-<2595> +proj=tmerc +lat_0=0 +lon_0=60 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2595> +proj=tmerc +lat_0=0 +lon_0=60 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E
-<2596> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2596> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E
-<2597> +proj=tmerc +lat_0=0 +lon_0=66 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2597> +proj=tmerc +lat_0=0 +lon_0=66 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E
-<2598> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2598> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E
-<2599> +proj=tmerc +lat_0=0 +lon_0=72 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2599> +proj=tmerc +lat_0=0 +lon_0=72 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Lietuvos Koordinoei Sistema 1994
-<2600> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999800 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2600> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999800 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E
-<2601> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2601> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E
-<2602> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2602> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E
-<2603> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2603> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E
-<2604> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2604> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E
-<2605> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2605> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E
-<2606> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2606> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E
-<2607> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2607> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E
-<2608> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2608> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E
-<2609> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2609> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E
-<2610> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2610> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E
-<2611> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2611> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E
-<2612> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2612> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E
-<2613> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2613> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E
-<2614> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2614> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E
-<2615> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2615> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E
-<2616> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2616> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E
-<2617> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2617> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E
-<2618> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2618> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E
-<2619> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2619> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E
-<2620> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2620> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E
-<2621> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2621> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E
-<2622> +proj=tmerc +lat_0=0 +lon_0=138 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2622> +proj=tmerc +lat_0=0 +lon_0=138 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E
-<2623> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2623> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E
-<2624> +proj=tmerc +lat_0=0 +lon_0=144 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2624> +proj=tmerc +lat_0=0 +lon_0=144 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E
-<2625> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2625> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E
-<2626> +proj=tmerc +lat_0=0 +lon_0=150 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2626> +proj=tmerc +lat_0=0 +lon_0=150 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E
-<2627> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2627> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E
-<2628> +proj=tmerc +lat_0=0 +lon_0=156 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2628> +proj=tmerc +lat_0=0 +lon_0=156 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E
-<2629> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2629> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E
-<2630> +proj=tmerc +lat_0=0 +lon_0=162 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2630> +proj=tmerc +lat_0=0 +lon_0=162 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E
-<2631> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2631> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E
-<2632> +proj=tmerc +lat_0=0 +lon_0=168 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2632> +proj=tmerc +lat_0=0 +lon_0=168 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E
-<2633> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2633> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E
-<2634> +proj=tmerc +lat_0=0 +lon_0=174 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2634> +proj=tmerc +lat_0=0 +lon_0=174 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E
-<2635> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2635> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E
-<2636> +proj=tmerc +lat_0=0 +lon_0=180 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2636> +proj=tmerc +lat_0=0 +lon_0=180 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W
-<2637> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2637> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W
-<2638> +proj=tmerc +lat_0=0 +lon_0=-174 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2638> +proj=tmerc +lat_0=0 +lon_0=-174 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W
-<2639> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2639> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W
-<2640> +proj=tmerc +lat_0=0 +lon_0=-168 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2640> +proj=tmerc +lat_0=0 +lon_0=-168 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 7
-<2641> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2641> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 8
-<2642> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2642> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 9
-<2643> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2643> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 10
-<2644> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2644> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 11
-<2645> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2645> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 12
-<2646> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2646> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 13
-<2647> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2647> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 14
-<2648> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2648> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 15
-<2649> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2649> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 16
-<2650> +proj=tmerc +lat_0=0 +lon_0=48 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2650> +proj=tmerc +lat_0=0 +lon_0=48 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 17
-<2651> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2651> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 18
-<2652> +proj=tmerc +lat_0=0 +lon_0=54 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2652> +proj=tmerc +lat_0=0 +lon_0=54 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 19
-<2653> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2653> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 20
-<2654> +proj=tmerc +lat_0=0 +lon_0=60 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2654> +proj=tmerc +lat_0=0 +lon_0=60 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 21
-<2655> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2655> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 22
-<2656> +proj=tmerc +lat_0=0 +lon_0=66 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2656> +proj=tmerc +lat_0=0 +lon_0=66 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 23
-<2657> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2657> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 24
-<2658> +proj=tmerc +lat_0=0 +lon_0=72 +k=1.000000 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2658> +proj=tmerc +lat_0=0 +lon_0=72 +k=1.000000 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 25
-<2659> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2659> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 26
-<2660> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2660> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 27
-<2661> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2661> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 28
-<2662> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2662> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 29
-<2663> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2663> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 30
-<2664> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2664> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 31
-<2665> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2665> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 32
-<2666> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2666> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 33
-<2667> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2667> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 34
-<2668> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2668> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 35
-<2669> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2669> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 36
-<2670> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2670> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 37
-<2671> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2671> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 38
-<2672> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2672> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 39
-<2673> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2673> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 40
-<2674> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2674> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 41
-<2675> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2675> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 42
-<2676> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2676> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 43
-<2677> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2677> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 44
-<2678> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2678> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 45
-<2679> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2679> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 46
-<2680> +proj=tmerc +lat_0=0 +lon_0=138 +k=1.000000 +x_0=46500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2680> +proj=tmerc +lat_0=0 +lon_0=138 +k=1.000000 +x_0=46500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 47
-<2681> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=47500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2681> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=47500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 48
-<2682> +proj=tmerc +lat_0=0 +lon_0=144 +k=1.000000 +x_0=48500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2682> +proj=tmerc +lat_0=0 +lon_0=144 +k=1.000000 +x_0=48500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 49
-<2683> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=49500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2683> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=49500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 50
-<2684> +proj=tmerc +lat_0=0 +lon_0=150 +k=1.000000 +x_0=50500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2684> +proj=tmerc +lat_0=0 +lon_0=150 +k=1.000000 +x_0=50500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 51
-<2685> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=51500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2685> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=51500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 52
-<2686> +proj=tmerc +lat_0=0 +lon_0=156 +k=1.000000 +x_0=52500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2686> +proj=tmerc +lat_0=0 +lon_0=156 +k=1.000000 +x_0=52500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 53
-<2687> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=53500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2687> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=53500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 54
-<2688> +proj=tmerc +lat_0=0 +lon_0=162 +k=1.000000 +x_0=54500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2688> +proj=tmerc +lat_0=0 +lon_0=162 +k=1.000000 +x_0=54500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 55
-<2689> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=55500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2689> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=55500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 56
-<2690> +proj=tmerc +lat_0=0 +lon_0=168 +k=1.000000 +x_0=56500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2690> +proj=tmerc +lat_0=0 +lon_0=168 +k=1.000000 +x_0=56500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 57
-<2691> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=57500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2691> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=57500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 58
-<2692> +proj=tmerc +lat_0=0 +lon_0=174 +k=1.000000 +x_0=58500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2692> +proj=tmerc +lat_0=0 +lon_0=174 +k=1.000000 +x_0=58500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 59
-<2693> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=59500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2693> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=59500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 60
-<2694> +proj=tmerc +lat_0=0 +lon_0=180 +k=1.000000 +x_0=60000000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2694> +proj=tmerc +lat_0=0 +lon_0=180 +k=1.000000 +x_0=60000000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 61
-<2695> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=61500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2695> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=61500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 62
-<2696> +proj=tmerc +lat_0=0 +lon_0=-174 +k=1.000000 +x_0=62500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2696> +proj=tmerc +lat_0=0 +lon_0=-174 +k=1.000000 +x_0=62500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 63
-<2697> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=63500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2697> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=63500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger zone 64
-<2698> +proj=tmerc +lat_0=0 +lon_0=-168 +k=1.000000 +x_0=64500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2698> +proj=tmerc +lat_0=0 +lon_0=-168 +k=1.000000 +x_0=64500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E
-<2699> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2699> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E
-<2700> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2700> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E
-<2701> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2701> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E
-<2702> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2702> +proj=tmerc +lat_0=0 +lon_0=30 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E
-<2703> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2703> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E
-<2704> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2704> +proj=tmerc +lat_0=0 +lon_0=36 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E
-<2705> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2705> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E
-<2706> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2706> +proj=tmerc +lat_0=0 +lon_0=42 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E
-<2707> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2707> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E
-<2708> +proj=tmerc +lat_0=0 +lon_0=48 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2708> +proj=tmerc +lat_0=0 +lon_0=48 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E
-<2709> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2709> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E
-<2710> +proj=tmerc +lat_0=0 +lon_0=54 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2710> +proj=tmerc +lat_0=0 +lon_0=54 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E
-<2711> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2711> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E
-<2712> +proj=tmerc +lat_0=0 +lon_0=60 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2712> +proj=tmerc +lat_0=0 +lon_0=60 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E
-<2713> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2713> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E
-<2714> +proj=tmerc +lat_0=0 +lon_0=66 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2714> +proj=tmerc +lat_0=0 +lon_0=66 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E
-<2715> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2715> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E
-<2716> +proj=tmerc +lat_0=0 +lon_0=72 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2716> +proj=tmerc +lat_0=0 +lon_0=72 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E
-<2717> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2717> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E
-<2718> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2718> +proj=tmerc +lat_0=0 +lon_0=78 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E
-<2719> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2719> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E
-<2720> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2720> +proj=tmerc +lat_0=0 +lon_0=84 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E
-<2721> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2721> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E
-<2722> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2722> +proj=tmerc +lat_0=0 +lon_0=90 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E
-<2723> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2723> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E
-<2724> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2724> +proj=tmerc +lat_0=0 +lon_0=96 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E
-<2725> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2725> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E
-<2726> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2726> +proj=tmerc +lat_0=0 +lon_0=102 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E
-<2727> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2727> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E
-<2728> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2728> +proj=tmerc +lat_0=0 +lon_0=108 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E
-<2729> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2729> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E
-<2730> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2730> +proj=tmerc +lat_0=0 +lon_0=114 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E
-<2731> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2731> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E
-<2732> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2732> +proj=tmerc +lat_0=0 +lon_0=120 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E
-<2733> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2733> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E
-<2734> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2734> +proj=tmerc +lat_0=0 +lon_0=126 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E
-<2735> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2735> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Tete / UTM zone 36S
-<2736> +proj=utm +zone=36 +south +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2736> +proj=utm +zone=36 +south +ellps=clrk66 +units=m +no_defs <>
 # Tete / UTM zone 37S
-<2737> +proj=utm +zone=37 +south +ellps=clrk66 +units=m +no_defs  no_defs <>
+<2737> +proj=utm +zone=37 +south +ellps=clrk66 +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E
-<2738> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2738> +proj=tmerc +lat_0=0 +lon_0=132 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E
-<2739> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2739> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E
-<2740> +proj=tmerc +lat_0=0 +lon_0=138 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2740> +proj=tmerc +lat_0=0 +lon_0=138 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E
-<2741> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2741> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E
-<2742> +proj=tmerc +lat_0=0 +lon_0=144 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2742> +proj=tmerc +lat_0=0 +lon_0=144 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E
-<2743> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2743> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E
-<2744> +proj=tmerc +lat_0=0 +lon_0=150 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2744> +proj=tmerc +lat_0=0 +lon_0=150 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E
-<2745> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2745> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E
-<2746> +proj=tmerc +lat_0=0 +lon_0=156 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2746> +proj=tmerc +lat_0=0 +lon_0=156 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E
-<2747> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2747> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E
-<2748> +proj=tmerc +lat_0=0 +lon_0=162 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2748> +proj=tmerc +lat_0=0 +lon_0=162 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E
-<2749> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2749> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E
-<2750> +proj=tmerc +lat_0=0 +lon_0=168 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2750> +proj=tmerc +lat_0=0 +lon_0=168 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E
-<2751> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2751> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E
-<2752> +proj=tmerc +lat_0=0 +lon_0=174 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2752> +proj=tmerc +lat_0=0 +lon_0=174 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E
-<2753> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2753> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E
-<2754> +proj=tmerc +lat_0=0 +lon_0=180 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2754> +proj=tmerc +lat_0=0 +lon_0=180 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W
-<2755> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2755> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W
-<2756> +proj=tmerc +lat_0=0 +lon_0=-174 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2756> +proj=tmerc +lat_0=0 +lon_0=-174 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W
-<2757> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2757> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W
-<2758> +proj=tmerc +lat_0=0 +lon_0=-168 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2758> +proj=tmerc +lat_0=0 +lon_0=-168 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # NAD83(HARN) / Alabama East
-<2759> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2759> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Alabama West
-<2760> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2760> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Arizona East
-<2761> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2761> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Arizona Central
-<2762> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2762> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Arizona West
-<2763> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2763> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Arkansas North
-<2764> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2764> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Arkansas South
-<2765> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2765> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / California zone 1
-<2766> +proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2766> +proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / California zone 2
-<2767> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2767> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / California zone 3
-<2768> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2768> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / California zone 4
-<2769> +proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2769> +proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / California zone 5
-<2770> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2770> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / California zone 6
-<2771> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2771> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Colorado North
-<2772> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2772> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Colorado Central
-<2773> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2773> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Colorado South
-<2774> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2774> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Connecticut
-<2775> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2775> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Delaware
-<2776> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2776> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Florida East
-<2777> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2777> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Florida West
-<2778> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2778> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Florida North
-<2779> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2779> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Georgia East
-<2780> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2780> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Georgia West
-<2781> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2781> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Hawaii zone 1
-<2782> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2782> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Hawaii zone 2
-<2783> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2783> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Hawaii zone 3
-<2784> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2784> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Hawaii zone 4
-<2785> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2785> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Hawaii zone 5
-<2786> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2786> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Idaho East
-<2787> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2787> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Idaho Central
-<2788> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2788> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Idaho West
-<2789> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2789> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Illinois East
-<2790> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2790> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Illinois West
-<2791> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2791> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Indiana East
-<2792> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=100000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2792> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=100000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Indiana West
-<2793> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2793> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Iowa North
-<2794> +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  no_defs <>
+<2794> +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(HARN) / Iowa South
-<2795> +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  no_defs <>
+<2795> +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(HARN) / Kansas North
-<2796> +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  no_defs <>
+<2796> +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(HARN) / Kansas South
-<2797> +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  no_defs <>
+<2797> +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(HARN) / Kentucky North
-<2798> +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  no_defs <>
+<2798> +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 <>
 # NAD83(HARN) / Kentucky South
-<2799> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2799> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Louisiana North
-<2800> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2800> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Louisiana South
-<2801> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2801> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Maine East
-<2802> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.999900 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2802> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.999900 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Maine West
-<2803> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2803> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Maryland
-<2804> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2804> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Massachusetts Mainland
-<2805> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2805> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Massachusetts Island
-<2806> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2806> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Michigan North
-<2807> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2807> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Michigan Central
-<2808> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2808> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Michigan South
-<2809> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2809> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Minnesota North
-<2810> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2810> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Minnesota Central
-<2811> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2811> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Minnesota South
-<2812> +proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2812> +proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Mississippi East
-<2813> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2813> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Mississippi West
-<2814> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2814> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Missouri East
-<2815> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2815> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Missouri Central
-<2816> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2816> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Missouri West
-<2817> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=850000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2817> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=850000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Montana
-<2818> +proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2818> +proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Nebraska
-<2819> +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  no_defs <>
+<2819> +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(HARN) / Nevada East
-<2820> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2820> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Nevada Central
-<2821> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2821> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Nevada West
-<2822> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2822> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / New Hampshire
-<2823> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2823> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / New Jersey
-<2824> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2824> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / New Mexico East
-<2825> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2825> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / New Mexico Central
-<2826> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2826> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / New Mexico West
-<2827> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2827> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / New York East
-<2828> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2828> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / New York Central
-<2829> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2829> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / New York West
-<2830> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2830> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / New York Long Island
-<2831> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2831> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / North Dakota North
-<2832> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2832> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / North Dakota South
-<2833> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2833> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Ohio North
-<2834> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2834> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Ohio South
-<2835> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2835> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Oklahoma North
-<2836> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2836> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Oklahoma South
-<2837> +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  no_defs <>
+<2837> +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(HARN) / Oregon North
-<2838> +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  no_defs <>
+<2838> +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 <>
 # NAD83(HARN) / Oregon South
-<2839> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2839> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Rhode Island
-<2840> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=100000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2840> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=100000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / South Dakota North
-<2841> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2841> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / South Dakota South
-<2842> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2842> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Tennessee
-<2843> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2843> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Texas North
-<2844> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2844> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Texas North Central
-<2845> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2845> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Texas Central
-<2846> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2846> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Texas South Central
-<2847> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2847> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Texas South
-<2848> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2848> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Utah North
-<2849> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2849> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Utah Central
-<2850> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2850> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Utah South
-<2851> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2851> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Vermont
-<2852> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2852> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Virginia North
-<2853> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2853> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Virginia South
-<2854> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2854> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Washington North
-<2855> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2855> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Washington South
-<2856> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2856> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / West Virginia North
-<2857> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2857> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / West Virginia South
-<2858> +proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2858> +proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Wisconsin North
-<2859> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2859> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Wisconsin Central
-<2860> +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  no_defs <>
+<2860> +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(HARN) / Wisconsin South
-<2861> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2861> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Wyoming East
-<2862> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.999938 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2862> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.999938 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Wyoming East Central
-<2863> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.999938 +x_0=400000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2863> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.999938 +x_0=400000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Wyoming West Central
-<2864> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.999938 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2864> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.999938 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Wyoming West
-<2865> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.999938 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2865> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.999938 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Puerto Rico & Virgin Is.
-<2866> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2866> +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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(HARN) / Arizona East (ft)
-<2867> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2867> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Arizona Central (ft)
-<2868> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2868> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Arizona West (ft)
-<2869> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2869> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / California zone 1 (ftUS)
-<2870> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2870> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / California zone 2 (ftUS)
-<2871> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2871> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / California zone 3 (ftUS)
-<2872> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2872> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / California zone 4 (ftUS)
-<2873> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2873> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / California zone 5 (ftUS)
-<2874> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2874> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / California zone 6 (ftUS)
-<2875> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2875> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Colorado North (ftUS)
-<2876> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2876> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Colorado Central (ftUS)
-<2877> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2877> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Colorado South (ftUS)
-<2878> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2878> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Connecticut (ftUS)
-<2879> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2879> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Delaware (ftUS)
-<2880> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2880> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Florida East (ftUS)
-<2881> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2881> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Florida West (ftUS)
-<2882> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2882> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Florida North (ftUS)
-<2883> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2883> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Georgia East (ftUS)
-<2884> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2884> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Georgia West (ftUS)
-<2885> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2885> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Idaho East (ftUS)
-<2886> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2886> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Idaho Central (ftUS)
-<2887> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2887> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Idaho West (ftUS)
-<2888> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2888> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Indiana East (ftUS)
-<2889> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2889> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Indiana West (ftUS)
-<2890> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2890> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Kentucky North (ftUS)
-<2891> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2891> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Kentucky South (ftUS)
-<2892> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2892> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Maryland (ftUS)
-<2893> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2893> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Massachusetts Mainland (ftUS)
-<2894> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2894> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Massachusetts Island (ftUS)
-<2895> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2895> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Michigan North (ft)
-<2896> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2896> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Michigan Central (ft)
-<2897> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2897> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Michigan South (ft)
-<2898> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2898> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Mississippi East (ftUS)
-<2899> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2899> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Mississippi West (ftUS)
-<2900> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2900> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Montana (ft)
-<2901> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2901> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / New Mexico East (ftUS)
-<2902> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2902> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / New Mexico Central (ftUS)
-<2903> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2903> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / New Mexico West (ftUS)
-<2904> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2904> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / New York East (ftUS)
-<2905> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2905> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / New York Central (ftUS)
-<2906> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2906> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / New York West (ftUS)
-<2907> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2907> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / New York Long Island (ftUS)
-<2908> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2908> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / North Dakota North (ft)
-<2909> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2909> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / North Dakota South (ft)
-<2910> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2910> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Oklahoma North (ftUS)
-<2911> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2911> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Oklahoma South (ftUS)
-<2912> +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 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2912> +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 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Oregon North (ft)
-<2913> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2913> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Oregon South (ft)
-<2914> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2914> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Tennessee (ftUS)
-<2915> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2915> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Texas North (ftUS)
-<2916> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2916> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Texas North Central (ftUS)
-<2917> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2917> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Texas Central (ftUS)
-<2918> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2918> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Texas South Central (ftUS)
-<2919> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2919> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Texas South (ftUS)
-<2920> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2920> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Utah North (ft)
-<2921> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2921> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Utah Central (ft)
-<2922> +proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2922> +proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Utah South (ft)
-<2923> +proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs  no_defs <>
+<2923> +proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs <>
 # NAD83(HARN) / Virginia North (ftUS)
-<2924> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2924> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Virginia South (ftUS)
-<2925> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2925> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Washington North (ftUS)
-<2926> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2926> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Washington South (ftUS)
-<2927> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2927> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Wisconsin North (ftUS)
-<2928> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2928> +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 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Wisconsin Central (ftUS)
-<2929> +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 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2929> +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 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83(HARN) / Wisconsin South (ftUS)
-<2930> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2930> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048006096012192 +no_defs <>
 # Beduaram / TM 13 NE
-<2931> +proj=tmerc +lat_0=0 +lon_0=13 +k=0.999600 +x_0=500000.0000000001 +y_0=0 +a=6378249.2 +b=6356515 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<2931> +proj=tmerc +lat_0=0 +lon_0=13 +k=0.999600 +x_0=500000.0000000001 +y_0=0 +a=6378249.2 +b=6356515 +to_meter=0.3048006096012192 +no_defs <>
 # QND95 / Qatar National Grid
-<2932> +proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.999990 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +units=m +no_defs  no_defs <>
+<2932> +proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.999990 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +units=m +no_defs <>
 # Segara / UTM zone 50S
-<2933> +proj=utm +zone=50 +south +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +units=m +no_defs  no_defs <>
+<2933> +proj=utm +zone=50 +south +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +units=m +no_defs <>
 # Segara (Jakarta) / NEIEZ
-<2934> +proj=merc +lat_ts=0 +lon_0=216.8077194444444 +k=0.997000 +x_0=3900000 +y_0=900000 +ellps=bessel +pm=jakarta +units=m +no_defs  no_defs <>
+<2934> +proj=merc +lat_ts=0 +lon_0=216.8077194444444 +k=0.997000 +x_0=3900000 +y_0=900000 +ellps=bessel +pm=jakarta +units=m +no_defs <>
 # Pulkovo 1942 / CS63 zone A1
-<2935> +proj=tmerc +lat_0=0.1166666666666667 +lon_0=41.53333333333333 +k=1.000000 +x_0=1300000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2935> +proj=tmerc +lat_0=0.1166666666666667 +lon_0=41.53333333333333 +k=1.000000 +x_0=1300000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / CS63 zone A2
-<2936> +proj=tmerc +lat_0=0.1166666666666667 +lon_0=44.53333333333333 +k=1.000000 +x_0=2300000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2936> +proj=tmerc +lat_0=0.1166666666666667 +lon_0=44.53333333333333 +k=1.000000 +x_0=2300000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / CS63 zone A3
-<2937> +proj=tmerc +lat_0=0.1166666666666667 +lon_0=47.53333333333333 +k=1.000000 +x_0=3300000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2937> +proj=tmerc +lat_0=0.1166666666666667 +lon_0=47.53333333333333 +k=1.000000 +x_0=3300000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / CS63 zone A4
-<2938> +proj=tmerc +lat_0=0.1166666666666667 +lon_0=50.53333333333333 +k=1.000000 +x_0=4300000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2938> +proj=tmerc +lat_0=0.1166666666666667 +lon_0=50.53333333333333 +k=1.000000 +x_0=4300000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / CS63 zone K2
-<2939> +proj=tmerc +lat_0=0.1333333333333333 +lon_0=50.76666666666667 +k=1.000000 +x_0=2300000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2939> +proj=tmerc +lat_0=0.1333333333333333 +lon_0=50.76666666666667 +k=1.000000 +x_0=2300000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / CS63 zone K3
-<2940> +proj=tmerc +lat_0=0.1333333333333333 +lon_0=53.76666666666667 +k=1.000000 +x_0=3300000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2940> +proj=tmerc +lat_0=0.1333333333333333 +lon_0=53.76666666666667 +k=1.000000 +x_0=3300000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / CS63 zone K4
-<2941> +proj=tmerc +lat_0=0.1333333333333333 +lon_0=56.76666666666667 +k=1.000000 +x_0=4300000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<2941> +proj=tmerc +lat_0=0.1333333333333333 +lon_0=56.76666666666667 +k=1.000000 +x_0=4300000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Porto Santo / UTM zone 28N
-<2942> +proj=utm +zone=28 +ellps=intl +units=m +no_defs  no_defs <>
+<2942> +proj=utm +zone=28 +ellps=intl +units=m +no_defs <>
 # Selvagem Grande / UTM zone 28N
-<2943> +proj=utm +zone=28 +ellps=intl +units=m +no_defs  no_defs <>
+<2943> +proj=utm +zone=28 +ellps=intl +units=m +no_defs <>
 # NAD83(CSRS) / SCoPQ zone 2
-<2944> +proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2944> +proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / MTM zone 3
-<2945> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2945> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / MTM zone 4
-<2946> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2946> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / MTM zone 5
-<2947> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2947> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / MTM zone 6
-<2948> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2948> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / MTM zone 7
-<2949> +proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2949> +proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / MTM zone 8
-<2950> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2950> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / MTM zone 9
-<2951> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2951> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / MTM zone 10
-<2952> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2952> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / New Brunswick Stereo
-<2953> +proj=stere +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2953> +proj=stere +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83)
-<2954> +proj=stere +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2954> +proj=stere +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / UTM zone 11N
-<2955> +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2955> +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / UTM zone 12N
-<2956> +proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2956> +proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / UTM zone 13N
-<2957> +proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2957> +proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / UTM zone 17N
-<2958> +proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2958> +proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / UTM zone 18N
-<2959> +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2959> +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / UTM zone 19N
-<2960> +proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2960> +proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / UTM zone 20N
-<2961> +proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2961> +proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD83(CSRS) / UTM zone 21N
-<2962> +proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<2962> +proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # Moznet / UTM zone 36S
-<3036> +proj=utm +zone=36 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs  no_defs <>
+<3036> +proj=utm +zone=36 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs <>
 # Moznet / UTM zone 37S
-<3037> +proj=utm +zone=37 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs  no_defs <>
+<3037> +proj=utm +zone=37 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs <>
 # Indian 1960 / UTM zone 48N
-<3148> +proj=utm +zone=48 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs  no_defs <>
+<3148> +proj=utm +zone=48 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs <>
 # Indian 1960 / UTM zone 49N
-<3149> +proj=utm +zone=49 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs  no_defs <>
+<3149> +proj=utm +zone=49 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs <>
 # Indian 1960 / TM 106 NE
-<3176> +proj=tmerc +lat_0=0 +lon_0=106 +k=0.999600 +x_0=500000 +y_0=0 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs  no_defs <>
+<3176> +proj=tmerc +lat_0=0 +lon_0=106 +k=0.999600 +x_0=500000 +y_0=0 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs <>
 # FD58 / Iraq zone
-<3200> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<3200> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +units=m +no_defs <>
 # Estonian Coordinate System of 1992
-<3300> +proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +units=m +no_defs  no_defs <>
+<3300> +proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +units=m +no_defs <>
 # Estonian Coordinate System of 1997
-<3301> +proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<3301> +proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # PSD93 / UTM zone 39N
-<3439> +proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<3439> +proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs <>
 # PSD93 / UTM zone 40N
-<3440> +proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<3440> +proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs <>
 # Old Hawaiian / Hawaii zone 1
-<3561> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<3561> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs <>
 # Old Hawaiian / Hawaii zone 2
-<3562> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<3562> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs <>
 # Old Hawaiian / Hawaii zone 3
-<3563> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<3563> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs <>
 # Old Hawaiian / Hawaii zone 4
-<3564> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<3564> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs <>
 # Old Hawaiian / Hawaii zone 5
-<3565> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<3565> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs <>
 # Puerto Rico / UTM zone 20N
-<3920> +proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<3920> +proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs <>
 # Puerto Rico State Plane CS of 1927
-<3991> +proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<3991> +proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs <>
 # Puerto Rico / St. Croix
-<3992> +proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=30480.06096012192 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<3992> +proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=30480.06096012192 +ellps=clrk66 +to_meter=0.3048006096012192 +no_defs <>
 # Unknown datum based upon the Airy 1830 ellipsoid
-<4001> +proj=longlat +ellps=airy +no_defs  no_defs <>
+<4001> +proj=longlat +ellps=airy +no_defs <>
 # Unknown datum based upon the Airy Modified 1849 ellipsoid
-<4002> +proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs  no_defs <>
+<4002> +proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs <>
 # Unknown datum based upon the Australian National Spheroid
-<4003> +proj=longlat +ellps=aust_SA +no_defs  no_defs <>
+<4003> +proj=longlat +ellps=aust_SA +no_defs <>
 # Unknown datum based upon the Bessel 1841 ellipsoid
-<4004> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4004> +proj=longlat +ellps=bessel +no_defs <>
 # Unknown datum based upon the Bessel Modified ellipsoid
-<4005> +proj=longlat +a=6377492.018 +b=6356173.508712696 +no_defs  no_defs <>
+<4005> +proj=longlat +a=6377492.018 +b=6356173.508712696 +no_defs <>
 # Unknown datum based upon the Bessel Namibia ellipsoid
-<4006> +proj=longlat +ellps=bess_nam +no_defs  no_defs <>
+<4006> +proj=longlat +ellps=bess_nam +no_defs <>
 # Unknown datum based upon the Clarke 1858 ellipsoid
-<4007> +proj=longlat +a=6378293.63683822 +b=6356617.979337744 +no_defs  no_defs <>
+<4007> +proj=longlat +a=6378293.63683822 +b=6356617.979337744 +no_defs <>
 # Unknown datum based upon the Clarke 1866 ellipsoid
-<4008> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4008> +proj=longlat +ellps=clrk66 +no_defs <>
 # Unknown datum based upon the Clarke 1866 Michigan ellipsoid
-<4009> +proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs  no_defs <>
+<4009> +proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs <>
 # Unknown datum based upon the Clarke 1880 (Benoit) ellipsoid
-<4010> +proj=longlat +a=6378300.789 +b=6356566.435 +no_defs  no_defs <>
+<4010> +proj=longlat +a=6378300.789 +b=6356566.435 +no_defs <>
 # Unknown datum based upon the Clarke 1880 (IGN) ellipsoid
-<4011> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4011> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Unknown datum based upon the Clarke 1880 (RGS) ellipsoid
-<4012> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4012> +proj=longlat +ellps=clrk80 +no_defs <>
 # Unknown datum based upon the Clarke 1880 (Arc) ellipsoid
-<4013> +proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs  no_defs <>
+<4013> +proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs <>
 # Unknown datum based upon the Clarke 1880 (SGA 1922) ellipsoid
-<4014> +proj=longlat +a=6378249.2 +b=6356514.996941779 +no_defs  no_defs <>
+<4014> +proj=longlat +a=6378249.2 +b=6356514.996941779 +no_defs <>
 # Unknown datum based upon the Everest 1830 (1937 Adjustment) ellipsoid
-<4015> +proj=longlat +a=6377276.345 +b=6356075.413140239 +no_defs  no_defs <>
+<4015> +proj=longlat +a=6377276.345 +b=6356075.413140239 +no_defs <>
 # Unknown datum based upon the Everest 1830 (1967 Definition) ellipsoid
-<4016> +proj=longlat +ellps=evrstSS +no_defs  no_defs <>
+<4016> +proj=longlat +ellps=evrstSS +no_defs <>
 # Unknown datum based upon the Everest 1830 Modified ellipsoid
-<4018> +proj=longlat +a=6377304.063 +b=6356103.038993155 +no_defs  no_defs <>
+<4018> +proj=longlat +a=6377304.063 +b=6356103.038993155 +no_defs <>
 # Unknown datum based upon the GRS 1980 ellipsoid
-<4019> +proj=longlat +ellps=GRS80 +no_defs  no_defs <>
+<4019> +proj=longlat +ellps=GRS80 +no_defs <>
 # Unknown datum based upon the Helmert 1906 ellipsoid
-<4020> +proj=longlat +ellps=helmert +no_defs  no_defs <>
+<4020> +proj=longlat +ellps=helmert +no_defs <>
 # Unknown datum based upon the Indonesian National Spheroid
-<4021> +proj=longlat +a=6378160 +b=6356774.50408554 +no_defs  no_defs <>
+<4021> +proj=longlat +a=6378160 +b=6356774.50408554 +no_defs <>
 # Unknown datum based upon the International 1924 ellipsoid
-<4022> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4022> +proj=longlat +ellps=intl +no_defs <>
 # Unknown datum based upon the Krassowsky 1940 ellipsoid
-<4024> +proj=longlat +ellps=krass +no_defs  no_defs <>
+<4024> +proj=longlat +ellps=krass +no_defs <>
 # Unknown datum based upon the NWL 9D ellipsoid
-<4025> +proj=longlat +ellps=WGS66 +no_defs  no_defs <>
+<4025> +proj=longlat +ellps=WGS66 +no_defs <>
 # Unknown datum based upon the Plessis 1817 ellipsoid
-<4027> +proj=longlat +a=6376523 +b=6355862.933255573 +no_defs  no_defs <>
+<4027> +proj=longlat +a=6376523 +b=6355862.933255573 +no_defs <>
 # Unknown datum based upon the Struve 1860 ellipsoid
-<4028> +proj=longlat +a=6378298.3 +b=6356657.142669562 +no_defs  no_defs <>
+<4028> +proj=longlat +a=6378298.3 +b=6356657.142669562 +no_defs <>
 # Unknown datum based upon the War Office ellipsoid
-<4029> +proj=longlat +a=6378300 +b=6356751.689189189 +no_defs  no_defs <>
+<4029> +proj=longlat +a=6378300 +b=6356751.689189189 +no_defs <>
 # Unknown datum based upon the WGS 84 ellipsoid
-<4030> +proj=longlat +ellps=WGS84 +no_defs  no_defs <>
+<4030> +proj=longlat +ellps=WGS84 +no_defs <>
 # Unknown datum based upon the GEM 10C ellipsoid
-<4031> +proj=longlat +ellps=WGS84 +no_defs  no_defs <>
+<4031> +proj=longlat +ellps=WGS84 +no_defs <>
 # Unknown datum based upon the OSU86F ellipsoid
-<4032> +proj=longlat +a=6378136.2 +b=6356751.516927429 +no_defs  no_defs <>
+<4032> +proj=longlat +a=6378136.2 +b=6356751.516927429 +no_defs <>
 # Unknown datum based upon the OSU91A ellipsoid
-<4033> +proj=longlat +a=6378136.3 +b=6356751.616592146 +no_defs  no_defs <>
+<4033> +proj=longlat +a=6378136.3 +b=6356751.616592146 +no_defs <>
 # Unknown datum based upon the Clarke 1880 ellipsoid
-<4034> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4034> +proj=longlat +ellps=clrk80 +no_defs <>
 # Unknown datum based upon the Authalic Sphere
-<4035> +proj=longlat +a=6371000 +b=6371000 +no_defs  no_defs <>
+<4035> +proj=longlat +a=6371000 +b=6371000 +no_defs <>
 # Unknown datum based upon the GRS 1967 ellipsoid
-<4036> +proj=longlat +ellps=GRS67 +no_defs  no_defs <>
+<4036> +proj=longlat +ellps=GRS67 +no_defs <>
 # Unknown datum based upon the Average Terrestrial System 1977 ellipsoid
-<4041> +proj=longlat +a=6378135 +b=6356750.304921594 +no_defs  no_defs <>
+<4041> +proj=longlat +a=6378135 +b=6356750.304921594 +no_defs <>
 # Unknown datum based upon the Everest (1830 Definition) ellipsoid
-<4042> +proj=longlat +a=6377299.36559538 +b=6356098.357204817 +no_defs  no_defs <>
+<4042> +proj=longlat +a=6377299.36559538 +b=6356098.357204817 +no_defs <>
 # Unknown datum based upon the WGS 72 ellipsoid
-<4043> +proj=longlat +ellps=WGS72 +no_defs  no_defs <>
+<4043> +proj=longlat +ellps=WGS72 +no_defs <>
 # Unknown datum based upon the Everest 1830 (1962 Definition) ellipsoid
-<4044> +proj=longlat +a=6377301.243 +b=6356100.230165385 +no_defs  no_defs <>
+<4044> +proj=longlat +a=6377301.243 +b=6356100.230165385 +no_defs <>
 # Unknown datum based upon the Everest 1830 (1975 Definition) ellipsoid
-<4045> +proj=longlat +a=6377299.151 +b=6356098.145120132 +no_defs  no_defs <>
+<4045> +proj=longlat +a=6377299.151 +b=6356098.145120132 +no_defs <>
 # Unspecified based upon the GRS 1980 Authalic Sphere
-<4047> +proj=longlat +a=6370997 +b=6370997 +no_defs  no_defs <>
+<4047> +proj=longlat +a=6370997 +b=6370997 +no_defs <>
 # Greek
-<4120> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4120> +proj=longlat +ellps=bessel +no_defs <>
 # GGRS87
-<4121> +proj=longlat +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +no_defs  no_defs <>
+<4121> +proj=longlat +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +no_defs <>
 # ATS77
-<4122> +proj=longlat +a=6378135 +b=6356750.304921594 +no_defs  no_defs <>
+<4122> +proj=longlat +a=6378135 +b=6356750.304921594 +no_defs <>
 # KKJ
-<4123> +proj=longlat +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +no_defs  no_defs <>
+<4123> +proj=longlat +ellps=intl +towgs84=-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37 +no_defs <>
 # RT90
-<4124> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4124> +proj=longlat +ellps=bessel +no_defs <>
 # Samboja
-<4125> +proj=longlat +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +no_defs  no_defs <>
+<4125> +proj=longlat +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +no_defs <>
 # LKS94 (ETRS89)
-<4126> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4126> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Tete
-<4127> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4127> +proj=longlat +ellps=clrk66 +no_defs <>
 # Madzansua
-<4128> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4128> +proj=longlat +ellps=clrk66 +no_defs <>
 # Observatario
-<4129> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4129> +proj=longlat +ellps=clrk66 +no_defs <>
 # Moznet
-<4130> +proj=longlat +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +no_defs  no_defs <>
+<4130> +proj=longlat +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +no_defs <>
 # Indian 1960
-<4131> +proj=longlat +a=6377276.345 +b=6356075.413140239 +no_defs  no_defs <>
+<4131> +proj=longlat +a=6377276.345 +b=6356075.413140239 +no_defs <>
 # FD58
-<4132> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4132> +proj=longlat +ellps=clrk80 +no_defs <>
 # EST92
-<4133> +proj=longlat +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +no_defs  no_defs <>
+<4133> +proj=longlat +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +no_defs <>
 # PDO Survey Datum 1993
-<4134> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4134> +proj=longlat +ellps=clrk80 +no_defs <>
 # Old Hawaiian
-<4135> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4135> +proj=longlat +ellps=clrk66 +no_defs <>
 # St. Lawrence Island
-<4136> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4136> +proj=longlat +ellps=clrk66 +no_defs <>
 # St. Paul Island
-<4137> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4137> +proj=longlat +ellps=clrk66 +no_defs <>
 # St. George Island
-<4138> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4138> +proj=longlat +ellps=clrk66 +no_defs <>
 # Puerto Rico
-<4139> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4139> +proj=longlat +ellps=clrk66 +no_defs <>
 # NAD83(CSRS98)
-<4140> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4140> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Israel
-<4141> +proj=longlat +ellps=GRS80 +no_defs  no_defs <>
+<4141> +proj=longlat +ellps=GRS80 +no_defs <>
 # Locodjo 1965
-<4142> +proj=longlat +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +no_defs  no_defs <>
+<4142> +proj=longlat +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +no_defs <>
 # Abidjan 1987
-<4143> +proj=longlat +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +no_defs  no_defs <>
+<4143> +proj=longlat +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +no_defs <>
 # Kalianpur 1937
-<4144> +proj=longlat +a=6377276.345 +b=6356075.413140239 +no_defs  no_defs <>
+<4144> +proj=longlat +a=6377276.345 +b=6356075.413140239 +no_defs <>
 # Kalianpur 1962
-<4145> +proj=longlat +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +no_defs  no_defs <>
+<4145> +proj=longlat +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +no_defs <>
 # Kalianpur 1975
-<4146> +proj=longlat +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +no_defs  no_defs <>
+<4146> +proj=longlat +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +no_defs <>
 # Hanoi 1972
-<4147> +proj=longlat +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +no_defs  no_defs <>
+<4147> +proj=longlat +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +no_defs <>
 # Hartebeesthoek94
-<4148> +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4148> +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # CH1903
-<4149> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4149> +proj=longlat +ellps=bessel +no_defs <>
 # CH1903+
-<4150> +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs  no_defs <>
+<4150> +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs <>
 # CHTRF95
-<4151> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4151> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # NAD83(HARN)
-<4152> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4152> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Rassadiran
-<4153> +proj=longlat +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +no_defs  no_defs <>
+<4153> +proj=longlat +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +no_defs <>
 # ED50(ED77)
-<4154> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4154> +proj=longlat +ellps=intl +no_defs <>
 # Dabola 1981
-<4155> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +no_defs  no_defs <>
+<4155> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +no_defs <>
 # S-JTSK
-<4156> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4156> +proj=longlat +ellps=bessel +no_defs <>
 # Mount Dillon
-<4157> +proj=longlat +a=6378293.63683822 +b=6356617.979337744 +no_defs  no_defs <>
+<4157> +proj=longlat +a=6378293.63683822 +b=6356617.979337744 +no_defs <>
 # Naparima 1955
-<4158> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4158> +proj=longlat +ellps=intl +no_defs <>
 # ELD79
-<4159> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4159> +proj=longlat +ellps=intl +no_defs <>
 # Chos Malal 1914
-<4160> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4160> +proj=longlat +ellps=intl +no_defs <>
 # Pampa del Castillo
-<4161> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4161> +proj=longlat +ellps=intl +no_defs <>
 # Korean 1985
-<4162> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4162> +proj=longlat +ellps=bessel +no_defs <>
 # Yemen NGN96
-<4163> +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4163> +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # South Yemen
-<4164> +proj=longlat +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +no_defs  no_defs <>
+<4164> +proj=longlat +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +no_defs <>
 # Bissau
-<4165> +proj=longlat +ellps=intl +towgs84=-173,253,27,0,0,0,0 +no_defs  no_defs <>
+<4165> +proj=longlat +ellps=intl +towgs84=-173,253,27,0,0,0,0 +no_defs <>
 # Korean 1995
-<4166> +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4166> +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # NZGD2000
-<4167> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4167> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Accra
-<4168> +proj=longlat +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +no_defs  no_defs <>
+<4168> +proj=longlat +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +no_defs <>
 # American Samoa 1962
-<4169> +proj=longlat +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +no_defs  no_defs <>
+<4169> +proj=longlat +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +no_defs <>
 # SIRGAS
-<4170> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4170> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # RGF93
-<4171> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4171> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # POSGAR
-<4172> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4172> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # IRENET95
-<4173> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4173> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Sierra Leone 1924
-<4174> +proj=longlat +a=6378300 +b=6356751.689189189 +no_defs  no_defs <>
+<4174> +proj=longlat +a=6378300 +b=6356751.689189189 +no_defs <>
 # Sierra Leone 1968
-<4175> +proj=longlat +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +no_defs  no_defs <>
+<4175> +proj=longlat +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +no_defs <>
 # Australian Antarctic
-<4176> +proj=longlat +ellps=GRS80 +no_defs  no_defs <>
+<4176> +proj=longlat +ellps=GRS80 +no_defs <>
 # Pulkovo 1942(83)
-<4178> +proj=longlat +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +no_defs  no_defs <>
+<4178> +proj=longlat +ellps=krass +towgs84=24,-123,-94,0.02,-0.25,-0.13,1.1 +no_defs <>
 # Pulkovo 1942(58)
-<4179> +proj=longlat +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +no_defs  no_defs <>
+<4179> +proj=longlat +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +no_defs <>
 # EST97
-<4180> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4180> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Luxembourg 1930
-<4181> +proj=longlat +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +no_defs  no_defs <>
+<4181> +proj=longlat +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +no_defs <>
 # Azores Occidental 1939
-<4182> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4182> +proj=longlat +ellps=intl +no_defs <>
 # Azores Central 1948
-<4183> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4183> +proj=longlat +ellps=intl +no_defs <>
 # Azores Oriental 1940
-<4184> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4184> +proj=longlat +ellps=intl +no_defs <>
 # Madeira 1936
-<4185> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4185> +proj=longlat +ellps=intl +no_defs <>
 # OSNI 1952
-<4188> +proj=longlat +ellps=airy +no_defs  no_defs <>
+<4188> +proj=longlat +ellps=airy +no_defs <>
 # REGVEN
-<4189> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4189> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # POSGAR 98
-<4190> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4190> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Albanian 1987
-<4191> +proj=longlat +ellps=krass +no_defs  no_defs <>
+<4191> +proj=longlat +ellps=krass +no_defs <>
 # Douala 1948
-<4192> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4192> +proj=longlat +ellps=intl +no_defs <>
 # Manoca 1962
-<4193> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +no_defs  no_defs <>
+<4193> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +no_defs <>
 # Qornoq 1927
-<4194> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4194> +proj=longlat +ellps=intl +no_defs <>
 # Scoresbysund 1952
-<4195> +proj=longlat +ellps=intl +towgs84=105,326,-102.5,0,0,0.814,-0.6 +no_defs  no_defs <>
+<4195> +proj=longlat +ellps=intl +towgs84=105,326,-102.5,0,0,0.814,-0.6 +no_defs <>
 # Ammassalik 1958
-<4196> +proj=longlat +ellps=intl +towgs84=-45,417,-3.5,0,0,0.814,-0.6 +no_defs  no_defs <>
+<4196> +proj=longlat +ellps=intl +towgs84=-45,417,-3.5,0,0,0.814,-0.6 +no_defs <>
 # Garoua
-<4197> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4197> +proj=longlat +ellps=clrk80 +no_defs <>
 # Kousseri
-<4198> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4198> +proj=longlat +ellps=clrk80 +no_defs <>
 # Egypt 1930
-<4199> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4199> +proj=longlat +ellps=intl +no_defs <>
 # Pulkovo 1995
-<4200> +proj=longlat +ellps=krass +no_defs  no_defs <>
+<4200> +proj=longlat +ellps=krass +no_defs <>
 # Adindan
-<4201> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4201> +proj=longlat +ellps=clrk80 +no_defs <>
 # AGD66
-<4202> +proj=longlat +ellps=aust_SA +no_defs  no_defs <>
+<4202> +proj=longlat +ellps=aust_SA +no_defs <>
 # AGD84
-<4203> +proj=longlat +ellps=aust_SA +no_defs  no_defs <>
+<4203> +proj=longlat +ellps=aust_SA +no_defs <>
 # Ain el Abd
-<4204> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4204> +proj=longlat +ellps=intl +no_defs <>
 # Afgooye
-<4205> +proj=longlat +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +no_defs  no_defs <>
+<4205> +proj=longlat +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +no_defs <>
 # Agadez
-<4206> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4206> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Lisbon
-<4207> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4207> +proj=longlat +ellps=intl +no_defs <>
 # Aratu
-<4208> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4208> +proj=longlat +ellps=intl +no_defs <>
 # Arc 1950
-<4209> +proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs  no_defs <>
+<4209> +proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs <>
 # Arc 1960
-<4210> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4210> +proj=longlat +ellps=clrk80 +no_defs <>
 # Batavia
-<4211> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4211> +proj=longlat +ellps=bessel +no_defs <>
 # Barbados 1938
-<4212> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4212> +proj=longlat +ellps=clrk80 +no_defs <>
 # Beduaram
-<4213> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4213> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Beijing 1954
-<4214> +proj=longlat +ellps=krass +no_defs  no_defs <>
+<4214> +proj=longlat +ellps=krass +no_defs <>
 # Belge 1950
-<4215> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4215> +proj=longlat +ellps=intl +no_defs <>
 # Bermuda 1957
-<4216> +proj=longlat +ellps=clrk66 +towgs84=-73,213,296,0,0,0,0 +no_defs  no_defs <>
+<4216> +proj=longlat +ellps=clrk66 +towgs84=-73,213,296,0,0,0,0 +no_defs <>
 # Bogota 1975
-<4218> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4218> +proj=longlat +ellps=intl +no_defs <>
 # Bukit Rimpah
-<4219> +proj=longlat +ellps=bessel +towgs84=-384,664,-48,0,0,0,0 +no_defs  no_defs <>
+<4219> +proj=longlat +ellps=bessel +towgs84=-384,664,-48,0,0,0,0 +no_defs <>
 # Camacupa
-<4220> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4220> +proj=longlat +ellps=clrk80 +no_defs <>
 # Campo Inchauspe
-<4221> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4221> +proj=longlat +ellps=intl +no_defs <>
 # Cape
-<4222> +proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs  no_defs <>
+<4222> +proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs <>
 # Carthage
-<4223> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4223> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Chua
-<4224> +proj=longlat +ellps=intl +towgs84=-134,229,-29,0,0,0,0 +no_defs  no_defs <>
+<4224> +proj=longlat +ellps=intl +towgs84=-134,229,-29,0,0,0,0 +no_defs <>
 # Corrego Alegre
-<4225> +proj=longlat +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +no_defs  no_defs <>
+<4225> +proj=longlat +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +no_defs <>
 # Cote d'Ivoire
-<4226> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4226> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Deir ez Zor
-<4227> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4227> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Douala
-<4228> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4228> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Egypt 1907
-<4229> +proj=longlat +ellps=helmert +no_defs  no_defs <>
+<4229> +proj=longlat +ellps=helmert +no_defs <>
 # ED50
-<4230> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4230> +proj=longlat +ellps=intl +no_defs <>
 # ED87
-<4231> +proj=longlat +ellps=intl +towgs84=-82.981,-99.719,-110.709,-0.5076,0.1503,0.3898,-0.3143 +no_defs  no_defs <>
+<4231> +proj=longlat +ellps=intl +towgs84=-82.981,-99.719,-110.709,-0.5076,0.1503,0.3898,-0.3143 +no_defs <>
 # Fahud
-<4232> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4232> +proj=longlat +ellps=clrk80 +no_defs <>
 # Gandajika 1970
-<4233> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4233> +proj=longlat +ellps=intl +no_defs <>
 # Garoua
-<4234> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4234> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Guyane Francaise
-<4235> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4235> +proj=longlat +ellps=intl +no_defs <>
 # Hu Tzu Shan
-<4236> +proj=longlat +ellps=intl +towgs84=-637,-549,-203,0,0,0,0 +no_defs  no_defs <>
+<4236> +proj=longlat +ellps=intl +towgs84=-637,-549,-203,0,0,0,0 +no_defs <>
 # HD72
-<4237> +proj=longlat +ellps=GRS67 +no_defs  no_defs <>
+<4237> +proj=longlat +ellps=GRS67 +no_defs <>
 # ID74
-<4238> +proj=longlat +a=6378160 +b=6356774.50408554 +no_defs  no_defs <>
+<4238> +proj=longlat +a=6378160 +b=6356774.50408554 +no_defs <>
 # Indian 1954
-<4239> +proj=longlat +a=6377276.345 +b=6356075.413140239 +towgs84=217,823,299,0,0,0,0 +no_defs  no_defs <>
+<4239> +proj=longlat +a=6377276.345 +b=6356075.413140239 +towgs84=217,823,299,0,0,0,0 +no_defs <>
 # Indian 1975
-<4240> +proj=longlat +a=6377276.345 +b=6356075.413140239 +no_defs  no_defs <>
+<4240> +proj=longlat +a=6377276.345 +b=6356075.413140239 +no_defs <>
 # Jamaica 1875
-<4241> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4241> +proj=longlat +ellps=clrk80 +no_defs <>
 # JAD69
-<4242> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4242> +proj=longlat +ellps=clrk66 +no_defs <>
 # Kalianpur 1880
-<4243> +proj=longlat +a=6377299.36559538 +b=6356098.357204817 +no_defs  no_defs <>
+<4243> +proj=longlat +a=6377299.36559538 +b=6356098.357204817 +no_defs <>
 # Kandawala
-<4244> +proj=longlat +a=6377276.345 +b=6356075.413140239 +towgs84=-97,787,86,0,0,0,0 +no_defs  no_defs <>
+<4244> +proj=longlat +a=6377276.345 +b=6356075.413140239 +towgs84=-97,787,86,0,0,0,0 +no_defs <>
 # Kertau
-<4245> +proj=longlat +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +no_defs  no_defs <>
+<4245> +proj=longlat +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +no_defs <>
 # KOC
-<4246> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4246> +proj=longlat +ellps=clrk80 +no_defs <>
 # La Canoa
-<4247> +proj=longlat +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +no_defs  no_defs <>
+<4247> +proj=longlat +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +no_defs <>
 # PSAD56
-<4248> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4248> +proj=longlat +ellps=intl +no_defs <>
 # Lake
-<4249> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4249> +proj=longlat +ellps=intl +no_defs <>
 # Leigon
-<4250> +proj=longlat +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +no_defs  no_defs <>
+<4250> +proj=longlat +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +no_defs <>
 # Liberia 1964
-<4251> +proj=longlat +ellps=clrk80 +towgs84=-90,40,88,0,0,0,0 +no_defs  no_defs <>
+<4251> +proj=longlat +ellps=clrk80 +towgs84=-90,40,88,0,0,0,0 +no_defs <>
 # Lome
-<4252> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4252> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Luzon 1911
-<4253> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4253> +proj=longlat +ellps=clrk66 +no_defs <>
 # Hito XVIII 1963
-<4254> +proj=longlat +ellps=intl +towgs84=18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013 +no_defs  no_defs <>
+<4254> +proj=longlat +ellps=intl +towgs84=18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013 +no_defs <>
 # Herat North
-<4255> +proj=longlat +ellps=intl +towgs84=-333,-222,114,0,0,0,0 +no_defs  no_defs <>
+<4255> +proj=longlat +ellps=intl +towgs84=-333,-222,114,0,0,0,0 +no_defs <>
 # Mahe 1971
-<4256> +proj=longlat +ellps=clrk80 +towgs84=41,-220,-134,0,0,0,0 +no_defs  no_defs <>
+<4256> +proj=longlat +ellps=clrk80 +towgs84=41,-220,-134,0,0,0,0 +no_defs <>
 # Makassar
-<4257> +proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +no_defs  no_defs <>
+<4257> +proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +no_defs <>
 # ETRS89
-<4258> +proj=longlat +ellps=GRS80 +no_defs  no_defs <>
+<4258> +proj=longlat +ellps=GRS80 +no_defs <>
 # Malongo 1987
-<4259> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4259> +proj=longlat +ellps=intl +no_defs <>
 # Manoca
-<4260> +proj=longlat +ellps=clrk80 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +no_defs  no_defs <>
+<4260> +proj=longlat +ellps=clrk80 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +no_defs <>
 # Merchich
-<4261> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +no_defs  no_defs <>
+<4261> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +no_defs <>
 # Massawa
-<4262> +proj=longlat +ellps=bessel +towgs84=639,405,60,0,0,0,0 +no_defs  no_defs <>
+<4262> +proj=longlat +ellps=bessel +towgs84=639,405,60,0,0,0,0 +no_defs <>
 # Minna
-<4263> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4263> +proj=longlat +ellps=clrk80 +no_defs <>
 # Mhast
-<4264> +proj=longlat +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +no_defs  no_defs <>
+<4264> +proj=longlat +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +no_defs <>
 # Monte Mario
-<4265> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4265> +proj=longlat +ellps=intl +no_defs <>
 # M'poraloko
-<4266> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4266> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # NAD27
-<4267> +proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs  no_defs <>
+<4267> +proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs <>
 # NAD27 Michigan
-<4268> +proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs  no_defs <>
+<4268> +proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs <>
 # NAD83
-<4269> +proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs  no_defs <>
+<4269> +proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs <>
 # Nahrwan 1967
-<4270> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4270> +proj=longlat +ellps=clrk80 +no_defs <>
 # Naparima 1972
-<4271> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4271> +proj=longlat +ellps=intl +no_defs <>
 # NZGD49
-<4272> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4272> +proj=longlat +ellps=intl +no_defs <>
 # NGO 1948
-<4273> +proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +no_defs  no_defs <>
+<4273> +proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +no_defs <>
 # Datum 73
-<4274> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4274> +proj=longlat +ellps=intl +no_defs <>
 # NTF
-<4275> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs  no_defs <>
+<4275> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs <>
 # NSWC 9Z-2
-<4276> +proj=longlat +ellps=WGS66 +no_defs  no_defs <>
+<4276> +proj=longlat +ellps=WGS66 +no_defs <>
 # OSGB 1936
-<4277> +proj=longlat +ellps=airy +no_defs  no_defs <>
+<4277> +proj=longlat +ellps=airy +no_defs <>
 # OSGB70
-<4278> +proj=longlat +ellps=airy +no_defs  no_defs <>
+<4278> +proj=longlat +ellps=airy +no_defs <>
 # OS(SN)80
-<4279> +proj=longlat +ellps=airy +no_defs  no_defs <>
+<4279> +proj=longlat +ellps=airy +no_defs <>
 # Padang
-<4280> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4280> +proj=longlat +ellps=bessel +no_defs <>
 # Palestine 1923
-<4281> +proj=longlat +a=6378300.789 +b=6356566.435 +no_defs  no_defs <>
+<4281> +proj=longlat +a=6378300.789 +b=6356566.435 +no_defs <>
 # Pointe Noire
-<4282> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4282> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # GDA94
-<4283> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4283> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Pulkovo 1942
-<4284> +proj=longlat +ellps=krass +no_defs  no_defs <>
+<4284> +proj=longlat +ellps=krass +no_defs <>
 # Qatar 1974
-<4285> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4285> +proj=longlat +ellps=intl +no_defs <>
 # Qatar 1948
-<4286> +proj=longlat +ellps=helmert +no_defs  no_defs <>
+<4286> +proj=longlat +ellps=helmert +no_defs <>
 # Qornoq
-<4287> +proj=longlat +ellps=intl +towgs84=164,138,-189,0,0,0,0 +no_defs  no_defs <>
+<4287> +proj=longlat +ellps=intl +towgs84=164,138,-189,0,0,0,0 +no_defs <>
 # Loma Quintana
-<4288> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4288> +proj=longlat +ellps=intl +no_defs <>
 # Amersfoort
-<4289> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4289> +proj=longlat +ellps=bessel +no_defs <>
 # SAD69
-<4291> +proj=longlat +ellps=GRS67 +no_defs  no_defs <>
+<4291> +proj=longlat +ellps=GRS67 +no_defs <>
 # Sapper Hill 1943
-<4292> +proj=longlat +ellps=intl +towgs84=-355,21,72,0,0,0,0 +no_defs  no_defs <>
+<4292> +proj=longlat +ellps=intl +towgs84=-355,21,72,0,0,0,0 +no_defs <>
 # Schwarzeck
-<4293> +proj=longlat +ellps=bess_nam +no_defs  no_defs <>
+<4293> +proj=longlat +ellps=bess_nam +no_defs <>
 # Segora
-<4294> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4294> +proj=longlat +ellps=bessel +no_defs <>
 # Serindung
-<4295> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4295> +proj=longlat +ellps=bessel +no_defs <>
 # Sudan
-<4296> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4296> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Tananarive
-<4297> +proj=longlat +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +no_defs  no_defs <>
+<4297> +proj=longlat +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +no_defs <>
 # Timbalai 1948
-<4298> +proj=longlat +ellps=evrstSS +no_defs  no_defs <>
+<4298> +proj=longlat +ellps=evrstSS +no_defs <>
 # TM65
-<4299> +proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs  no_defs <>
+<4299> +proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs <>
 # TM75
-<4300> +proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs  no_defs <>
+<4300> +proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs <>
 # Tokyo
-<4301> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4301> +proj=longlat +ellps=bessel +no_defs <>
 # Trinidad 1903
-<4302> +proj=longlat +a=6378293.63683822 +b=6356617.979337744 +towgs84=-61.702,284.488,472.052,0,0,0,0 +no_defs  no_defs <>
+<4302> +proj=longlat +a=6378293.63683822 +b=6356617.979337744 +towgs84=-61.702,284.488,472.052,0,0,0,0 +no_defs <>
 # TC(1948)
-<4303> +proj=longlat +ellps=helmert +no_defs  no_defs <>
+<4303> +proj=longlat +ellps=helmert +no_defs <>
 # Voirol 1875
-<4304> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +no_defs  no_defs <>
+<4304> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +no_defs <>
 # Bern 1938
-<4306> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4306> +proj=longlat +ellps=bessel +no_defs <>
 # Nord Sahara 1959
-<4307> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4307> +proj=longlat +ellps=clrk80 +no_defs <>
 # RT38
-<4308> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4308> +proj=longlat +ellps=bessel +no_defs <>
 # Yacare
-<4309> +proj=longlat +ellps=intl +towgs84=-155,171,37,0,0,0,0 +no_defs  no_defs <>
+<4309> +proj=longlat +ellps=intl +towgs84=-155,171,37,0,0,0,0 +no_defs <>
 # Yoff
-<4310> +proj=longlat +a=6378249.2 +b=6356515 +no_defs  no_defs <>
+<4310> +proj=longlat +a=6378249.2 +b=6356515 +no_defs <>
 # Zanderij
-<4311> +proj=longlat +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +no_defs  no_defs <>
+<4311> +proj=longlat +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +no_defs <>
 # MGI
-<4312> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4312> +proj=longlat +ellps=bessel +no_defs <>
 # Belge 1972
-<4313> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4313> +proj=longlat +ellps=intl +no_defs <>
 # DHDN
-<4314> +proj=longlat +ellps=bessel +no_defs  no_defs <>
+<4314> +proj=longlat +ellps=bessel +no_defs <>
 # Conakry 1905
-<4315> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +no_defs  no_defs <>
+<4315> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +no_defs <>
 # Dealul Piscului 1933
-<4316> +proj=longlat +ellps=intl +towgs84=103.25,-100.4,-307.19,0,0,0,0 +no_defs  no_defs <>
+<4316> +proj=longlat +ellps=intl +towgs84=103.25,-100.4,-307.19,0,0,0,0 +no_defs <>
 # Dealul Piscului 1970
-<4317> +proj=longlat +ellps=krass +no_defs  no_defs <>
+<4317> +proj=longlat +ellps=krass +no_defs <>
 # NGN
-<4318> +proj=longlat +ellps=WGS84 +no_defs  no_defs <>
+<4318> +proj=longlat +ellps=WGS84 +no_defs <>
 # KUDAMS
-<4319> +proj=longlat +ellps=GRS80 +no_defs  no_defs <>
+<4319> +proj=longlat +ellps=GRS80 +no_defs <>
 # WGS 72
-<4322> +proj=longlat +ellps=WGS72 +no_defs  no_defs <>
+<4322> +proj=longlat +ellps=WGS72 +no_defs <>
 # WGS 72BE
-<4324> +proj=longlat +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +no_defs  no_defs <>
+<4324> +proj=longlat +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +no_defs <>
 # WGS 84
-<4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs <>
+<4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs <>
 # Anguilla 1957
-<4600> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4600> +proj=longlat +ellps=clrk80 +no_defs <>
 # Antigua 1943
-<4601> +proj=longlat +ellps=clrk80 +towgs84=-255,-15,71,0,0,0,0 +no_defs  no_defs <>
+<4601> +proj=longlat +ellps=clrk80 +towgs84=-255,-15,71,0,0,0,0 +no_defs <>
 # Dominica 1945
-<4602> +proj=longlat +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +no_defs  no_defs <>
+<4602> +proj=longlat +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +no_defs <>
 # Grenada 1953
-<4603> +proj=longlat +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +no_defs  no_defs <>
+<4603> +proj=longlat +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +no_defs <>
 # Montserrat 1958
-<4604> +proj=longlat +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +no_defs  no_defs <>
+<4604> +proj=longlat +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +no_defs <>
 # St. Kitts 1955
-<4605> +proj=longlat +ellps=clrk80 +towgs84=9,183,236,0,0,0,0 +no_defs  no_defs <>
+<4605> +proj=longlat +ellps=clrk80 +towgs84=9,183,236,0,0,0,0 +no_defs <>
 # St. Lucia 1955
-<4606> +proj=longlat +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +no_defs  no_defs <>
+<4606> +proj=longlat +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +no_defs <>
 # St. Vincent 1945
-<4607> +proj=longlat +ellps=clrk80 +no_defs  no_defs <>
+<4607> +proj=longlat +ellps=clrk80 +no_defs <>
 # NAD27(76)
-<4608> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4608> +proj=longlat +ellps=clrk66 +no_defs <>
 # NAD27(CGQ77)
-<4609> +proj=longlat +ellps=clrk66 +no_defs  no_defs <>
+<4609> +proj=longlat +ellps=clrk66 +no_defs <>
 # Xian 1980
-<4610> +proj=longlat +a=6378140 +b=6356755.288157528 +no_defs  no_defs <>
+<4610> +proj=longlat +a=6378140 +b=6356755.288157528 +no_defs <>
 # Hong Kong 1980
-<4611> +proj=longlat +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +no_defs  no_defs <>
+<4611> +proj=longlat +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +no_defs <>
 # JGD2000
-<4612> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4612> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Segara
-<4613> +proj=longlat +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +no_defs  no_defs <>
+<4613> +proj=longlat +ellps=bessel +towgs84=-404.78,685.68,45.47,0,0,0,0 +no_defs <>
 # QND95
-<4614> +proj=longlat +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +no_defs  no_defs <>
+<4614> +proj=longlat +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +no_defs <>
 # Porto Santo
-<4615> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4615> +proj=longlat +ellps=intl +no_defs <>
 # Selvagem Grande
-<4616> +proj=longlat +ellps=intl +no_defs  no_defs <>
+<4616> +proj=longlat +ellps=intl +no_defs <>
 # NAD83(CSRS)
-<4617> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs  no_defs <>
+<4617> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <>
 # Bern 1898 (Bern)
-<4801> +proj=longlat +ellps=bessel +pm=bern +no_defs  no_defs <>
+<4801> +proj=longlat +ellps=bessel +pm=bern +no_defs <>
 # Bogota 1975 (Bogota)
-<4802> +proj=longlat +ellps=intl +pm=bogota +no_defs  no_defs <>
+<4802> +proj=longlat +ellps=intl +pm=bogota +no_defs <>
 # Lisbon (Lisbon)
-<4803> +proj=longlat +ellps=intl +pm=lisbon +no_defs  no_defs <>
+<4803> +proj=longlat +ellps=intl +pm=lisbon +no_defs <>
 # Makassar (Jakarta)
-<4804> +proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +no_defs  no_defs <>
+<4804> +proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +no_defs <>
 # MGI (Ferro)
-<4805> +proj=longlat +ellps=bessel +pm=ferro +no_defs  no_defs <>
+<4805> +proj=longlat +ellps=bessel +pm=ferro +no_defs <>
 # Monte Mario (Rome)
-<4806> +proj=longlat +ellps=intl +pm=rome +no_defs  no_defs <>
+<4806> +proj=longlat +ellps=intl +pm=rome +no_defs <>
 # NTF (Paris)
-<4807> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs  no_defs <>
+<4807> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs <>
 # Padang (Jakarta)
-<4808> +proj=longlat +ellps=bessel +pm=jakarta +no_defs  no_defs <>
+<4808> +proj=longlat +ellps=bessel +pm=jakarta +no_defs <>
 # Belge 1950 (Brussels)
-<4809> +proj=longlat +ellps=intl +pm=brussels +no_defs  no_defs <>
+<4809> +proj=longlat +ellps=intl +pm=brussels +no_defs <>
 # Tananarive (Paris)
-<4810> +proj=longlat +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +no_defs  no_defs <>
+<4810> +proj=longlat +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +no_defs <>
 # Voirol 1875 (Paris)
-<4811> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +pm=paris +no_defs  no_defs <>
+<4811> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +pm=paris +no_defs <>
 # Batavia (Jakarta)
-<4813> +proj=longlat +ellps=bessel +pm=jakarta +no_defs  no_defs <>
+<4813> +proj=longlat +ellps=bessel +pm=jakarta +no_defs <>
 # RT38 (Stockholm)
-<4814> +proj=longlat +ellps=bessel +pm=stockholm +no_defs  no_defs <>
+<4814> +proj=longlat +ellps=bessel +pm=stockholm +no_defs <>
 # Greek (Athens)
-<4815> +proj=longlat +ellps=bessel +pm=athens +no_defs  no_defs <>
+<4815> +proj=longlat +ellps=bessel +pm=athens +no_defs <>
 # Carthage (Paris)
-<4816> +proj=longlat +a=6378249.2 +b=6356515 +pm=paris +no_defs  no_defs <>
+<4816> +proj=longlat +a=6378249.2 +b=6356515 +pm=paris +no_defs <>
 # NGO 1948 (Oslo)
-<4817> +proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +no_defs  no_defs <>
+<4817> +proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +no_defs <>
 # S-JTSK (Ferro)
-<4818> +proj=longlat +ellps=bessel +pm=ferro +no_defs  no_defs <>
+<4818> +proj=longlat +ellps=bessel +pm=ferro +no_defs <>
 # Nord Sahara 1959 (Paris)
-<4819> +proj=longlat +ellps=clrk80 +pm=paris +no_defs  no_defs <>
+<4819> +proj=longlat +ellps=clrk80 +pm=paris +no_defs <>
 # Segara (Jakarta)
-<4820> +proj=longlat +ellps=bessel +pm=jakarta +no_defs  no_defs <>
+<4820> +proj=longlat +ellps=bessel +pm=jakarta +no_defs <>
 # ATF (Paris)
-<4901> +proj=longlat +a=6376523 +b=6355862.933255573 +pm=paris +no_defs  no_defs <>
+<4901> +proj=longlat +a=6376523 +b=6355862.933255573 +pm=paris +no_defs <>
 # NDG (Paris)
-<4902> +proj=longlat +a=6376523 +b=6355862.933255573 +pm=paris +no_defs  no_defs <>
+<4902> +proj=longlat +a=6376523 +b=6355862.933255573 +pm=paris +no_defs <>
 # Madrid 1870 (Madrid)
-<4903> +proj=longlat +a=6378298.3 +b=6356657.142669562 +pm=madrid +no_defs  no_defs <>
+<4903> +proj=longlat +a=6378298.3 +b=6356657.142669562 +pm=madrid +no_defs <>
 # Lisbon 1890 (Lisbon)
-<4904> +proj=longlat +ellps=bessel +pm=lisbon +no_defs  no_defs <>
+<4904> +proj=longlat +ellps=bessel +pm=lisbon +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 4
-<20004> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20004> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 5
-<20005> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20005> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 6
-<20006> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20006> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 7
-<20007> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20007> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 8
-<20008> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20008> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 9
-<20009> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20009> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 10
-<20010> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20010> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 11
-<20011> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20011> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 12
-<20012> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20012> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 13
-<20013> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20013> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 14
-<20014> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20014> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 15
-<20015> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20015> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 16
-<20016> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20016> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 17
-<20017> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20017> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 18
-<20018> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20018> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 19
-<20019> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20019> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 20
-<20020> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20020> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 21
-<20021> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20021> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 22
-<20022> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20022> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 23
-<20023> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20023> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 24
-<20024> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20024> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 25
-<20025> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20025> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 26
-<20026> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20026> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 27
-<20027> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20027> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 28
-<20028> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20028> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 29
-<20029> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20029> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 30
-<20030> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20030> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 31
-<20031> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20031> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger zone 32
-<20032> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20032> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 4N
-<20064> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20064> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 5N
-<20065> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20065> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 6N
-<20066> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20066> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 7N
-<20067> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20067> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 8N
-<20068> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20068> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 9N
-<20069> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20069> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 10N
-<20070> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20070> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 11N
-<20071> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20071> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 12N
-<20072> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20072> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 13N
-<20073> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20073> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 14N
-<20074> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20074> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 15N
-<20075> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20075> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 16N
-<20076> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20076> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 17N
-<20077> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20077> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 18N
-<20078> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20078> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 19N
-<20079> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20079> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 20N
-<20080> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20080> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 21N
-<20081> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20081> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 22N
-<20082> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20082> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 23N
-<20083> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20083> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 24N
-<20084> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20084> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 25N
-<20085> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20085> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 26N
-<20086> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20086> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 27N
-<20087> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20087> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 28N
-<20088> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20088> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 29N
-<20089> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20089> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 30N
-<20090> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20090> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 31N
-<20091> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20091> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 / Gauss-Kruger 32N
-<20092> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<20092> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Adindan / UTM zone 37N
-<20137> +proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<20137> +proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs <>
 # Adindan / UTM zone 38N
-<20138> +proj=utm +zone=38 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<20138> +proj=utm +zone=38 +ellps=clrk80 +units=m +no_defs <>
 # AGD66 / AMG zone 48
-<20248> +proj=utm +zone=48 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20248> +proj=utm +zone=48 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 49
-<20249> +proj=utm +zone=49 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20249> +proj=utm +zone=49 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 50
-<20250> +proj=utm +zone=50 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20250> +proj=utm +zone=50 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 51
-<20251> +proj=utm +zone=51 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20251> +proj=utm +zone=51 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 52
-<20252> +proj=utm +zone=52 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20252> +proj=utm +zone=52 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 53
-<20253> +proj=utm +zone=53 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20253> +proj=utm +zone=53 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 54
-<20254> +proj=utm +zone=54 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20254> +proj=utm +zone=54 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 55
-<20255> +proj=utm +zone=55 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20255> +proj=utm +zone=55 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 56
-<20256> +proj=utm +zone=56 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20256> +proj=utm +zone=56 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 57
-<20257> +proj=utm +zone=57 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20257> +proj=utm +zone=57 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD66 / AMG zone 58
-<20258> +proj=utm +zone=58 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20258> +proj=utm +zone=58 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 48
-<20348> +proj=utm +zone=48 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20348> +proj=utm +zone=48 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 49
-<20349> +proj=utm +zone=49 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20349> +proj=utm +zone=49 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 50
-<20350> +proj=utm +zone=50 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20350> +proj=utm +zone=50 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 51
-<20351> +proj=utm +zone=51 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20351> +proj=utm +zone=51 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 52
-<20352> +proj=utm +zone=52 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20352> +proj=utm +zone=52 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 53
-<20353> +proj=utm +zone=53 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20353> +proj=utm +zone=53 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 54
-<20354> +proj=utm +zone=54 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20354> +proj=utm +zone=54 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 55
-<20355> +proj=utm +zone=55 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20355> +proj=utm +zone=55 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 56
-<20356> +proj=utm +zone=56 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20356> +proj=utm +zone=56 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 57
-<20357> +proj=utm +zone=57 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20357> +proj=utm +zone=57 +south +ellps=aust_SA +units=m +no_defs <>
 # AGD84 / AMG zone 58
-<20358> +proj=utm +zone=58 +south +ellps=aust_SA +units=m +no_defs  no_defs <>
+<20358> +proj=utm +zone=58 +south +ellps=aust_SA +units=m +no_defs <>
 # Ain el Abd / UTM zone 37N
-<20437> +proj=utm +zone=37 +ellps=intl +units=m +no_defs  no_defs <>
+<20437> +proj=utm +zone=37 +ellps=intl +units=m +no_defs <>
 # Ain el Abd / UTM zone 38N
-<20438> +proj=utm +zone=38 +ellps=intl +units=m +no_defs  no_defs <>
+<20438> +proj=utm +zone=38 +ellps=intl +units=m +no_defs <>
 # Ain el Abd / UTM zone 39N
-<20439> +proj=utm +zone=39 +ellps=intl +units=m +no_defs  no_defs <>
+<20439> +proj=utm +zone=39 +ellps=intl +units=m +no_defs <>
 # Ain el Abd / Bahrain Grid
-<20499> +proj=utm +zone=39 +ellps=intl +units=m +no_defs  no_defs <>
+<20499> +proj=utm +zone=39 +ellps=intl +units=m +no_defs <>
 # Afgooye / UTM zone 38N
-<20538> +proj=utm +zone=38 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs  no_defs <>
+<20538> +proj=utm +zone=38 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs <>
 # Afgooye / UTM zone 39N
-<20539> +proj=utm +zone=39 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs  no_defs <>
+<20539> +proj=utm +zone=39 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs <>
 # Lisbon (Lisbon)/Portuguese National Grid
-<20790> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=200000 +y_0=300000 +ellps=intl +pm=lisbon +units=m +no_defs  no_defs <>
+<20790> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=200000 +y_0=300000 +ellps=intl +pm=lisbon +units=m +no_defs <>
 # Lisbon (Lisbon)/Portuguese Grid
-<20791> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=0 +y_0=0 +ellps=intl +pm=lisbon +units=m +no_defs  no_defs <>
+<20791> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=0 +y_0=0 +ellps=intl +pm=lisbon +units=m +no_defs <>
 # Aratu / UTM zone 22S
-<20822> +proj=utm +zone=22 +south +ellps=intl +units=m +no_defs  no_defs <>
+<20822> +proj=utm +zone=22 +south +ellps=intl +units=m +no_defs <>
 # Aratu / UTM zone 23S
-<20823> +proj=utm +zone=23 +south +ellps=intl +units=m +no_defs  no_defs <>
+<20823> +proj=utm +zone=23 +south +ellps=intl +units=m +no_defs <>
 # Aratu / UTM zone 24S
-<20824> +proj=utm +zone=24 +south +ellps=intl +units=m +no_defs  no_defs <>
+<20824> +proj=utm +zone=24 +south +ellps=intl +units=m +no_defs <>
 # Arc 1950 / UTM zone 34S
-<20934> +proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs  no_defs <>
+<20934> +proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs <>
 # Arc 1950 / UTM zone 35S
-<20935> +proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs  no_defs <>
+<20935> +proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs <>
 # Arc 1950 / UTM zone 36S
-<20936> +proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs  no_defs <>
+<20936> +proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs <>
 # Arc 1960 / UTM zone 35S
-<21035> +proj=utm +zone=35 +south +ellps=clrk80 +units=m +no_defs  no_defs <>
+<21035> +proj=utm +zone=35 +south +ellps=clrk80 +units=m +no_defs <>
 # Arc 1960 / UTM zone 36S
-<21036> +proj=utm +zone=36 +south +ellps=clrk80 +units=m +no_defs  no_defs <>
+<21036> +proj=utm +zone=36 +south +ellps=clrk80 +units=m +no_defs <>
 # Arc 1960 / UTM zone 37S
-<21037> +proj=utm +zone=37 +south +ellps=clrk80 +units=m +no_defs  no_defs <>
+<21037> +proj=utm +zone=37 +south +ellps=clrk80 +units=m +no_defs <>
 # Arc 1960 / UTM zone 35N
-<21095> +proj=utm +zone=35 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<21095> +proj=utm +zone=35 +ellps=clrk80 +units=m +no_defs <>
 # Arc 1960 / UTM zone 36N
-<21096> +proj=utm +zone=36 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<21096> +proj=utm +zone=36 +ellps=clrk80 +units=m +no_defs <>
 # Arc 1960 / UTM zone 37N
-<21097> +proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<21097> +proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs <>
 # Batavia (Jakarta) / NEIEZ
-<21100> +proj=merc +lat_ts=0 +lon_0=216.8077194444444 +k=0.997000 +x_0=3900000 +y_0=900000 +ellps=bessel +pm=jakarta +units=m +no_defs  no_defs <>
+<21100> +proj=merc +lat_ts=0 +lon_0=216.8077194444444 +k=0.997000 +x_0=3900000 +y_0=900000 +ellps=bessel +pm=jakarta +units=m +no_defs <>
 # Batavia / UTM zone 48S
-<21148> +proj=utm +zone=48 +south +ellps=bessel +units=m +no_defs  no_defs <>
+<21148> +proj=utm +zone=48 +south +ellps=bessel +units=m +no_defs <>
 # Batavia / UTM zone 49S
-<21149> +proj=utm +zone=49 +south +ellps=bessel +units=m +no_defs  no_defs <>
+<21149> +proj=utm +zone=49 +south +ellps=bessel +units=m +no_defs <>
 # Batavia / UTM zone 50S
-<21150> +proj=utm +zone=50 +south +ellps=bessel +units=m +no_defs  no_defs <>
+<21150> +proj=utm +zone=50 +south +ellps=bessel +units=m +no_defs <>
 # Barbados 1938 / British West Indies Grid
-<21291> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<21291> +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.999500 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs <>
 # Barbados 1938 / Barbados National Grid
-<21292> +proj=tmerc +lat_0=13.17638888888889 +lon_0=-59.55972222222222 +k=0.999999 +x_0=30000 +y_0=75000 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<21292> +proj=tmerc +lat_0=13.17638888888889 +lon_0=-59.55972222222222 +k=0.999999 +x_0=30000 +y_0=75000 +ellps=clrk80 +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 13
-<21413> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21413> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 14
-<21414> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21414> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 15
-<21415> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21415> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 16
-<21416> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21416> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 17
-<21417> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21417> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 18
-<21418> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21418> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 19
-<21419> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21419> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 20
-<21420> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21420> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 21
-<21421> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21421> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 22
-<21422> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21422> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger zone 23
-<21423> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21423> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 75E
-<21453> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21453> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 81E
-<21454> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21454> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 87E
-<21455> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21455> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 93E
-<21456> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21456> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 99E
-<21457> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21457> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 105E
-<21458> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21458> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 111E
-<21459> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21459> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 117E
-<21460> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21460> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 123E
-<21461> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21461> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 129E
-<21462> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21462> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger CM 135E
-<21463> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21463> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 13N
-<21473> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21473> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 14N
-<21474> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21474> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 15N
-<21475> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21475> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 16N
-<21476> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21476> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 17N
-<21477> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21477> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 18N
-<21478> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21478> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 19N
-<21479> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21479> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 20N
-<21480> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21480> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 21N
-<21481> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21481> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 22N
-<21482> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21482> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Beijing 1954 / Gauss-Kruger 23N
-<21483> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<21483> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Belge 1950 (Brussels) / Belge Lambert 50
-<21500> +proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=4.367975 +x_0=150000 +y_0=5400000 +ellps=intl +pm=brussels +units=m +no_defs  no_defs <>
+<21500> +proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=4.367975 +x_0=150000 +y_0=5400000 +ellps=intl +pm=brussels +units=m +no_defs <>
 # Bern 1898 (Bern) / LV03C
-<21780> +proj=omerc +lat_0=46.95240555555556 +lonc=7.439583333333333 +alpha=90 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=bern +units=m +no_defs  no_defs <>
+<21780> +proj=omerc +lat_0=46.95240555555556 +lonc=7.439583333333333 +alpha=90 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=bern +units=m +no_defs <>
 # CH1903 / LV03
-<21781> +proj=omerc +lat_0=46.95240555555556 +lonc=7.439583333333333 +alpha=90 +k=1 +x_0=600000 +y_0=200000 +ellps=bessel +units=m +no_defs  no_defs <>
+<21781> +proj=omerc +lat_0=46.95240555555556 +lonc=7.439583333333333 +alpha=90 +k=1 +x_0=600000 +y_0=200000 +ellps=bessel +units=m +no_defs <>
 # Bogota 1975 / UTM zone 17N
-<21817> +proj=utm +zone=17 +ellps=intl +units=m +no_defs  no_defs <>
+<21817> +proj=utm +zone=17 +ellps=intl +units=m +no_defs <>
 # Bogota 1975 / UTM zone 18N
-<21818> +proj=utm +zone=18 +ellps=intl +units=m +no_defs  no_defs <>
+<21818> +proj=utm +zone=18 +ellps=intl +units=m +no_defs <>
 # Bogota 1975 / Colombia West zone
-<21891> +proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs  no_defs <>
+<21891> +proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs <>
 # Bogota 1975 / Colombia Bogota zone
-<21892> +proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs  no_defs <>
+<21892> +proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs <>
 # Bogota 1975 / Colombia East Central zone
-<21893> +proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs  no_defs <>
+<21893> +proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs <>
 # Bogota 1975 / Colombia East
-<21894> +proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs  no_defs <>
+<21894> +proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs <>
 # Camacupa / UTM zone 32S
-<22032> +proj=utm +zone=32 +south +ellps=clrk80 +units=m +no_defs  no_defs <>
+<22032> +proj=utm +zone=32 +south +ellps=clrk80 +units=m +no_defs <>
 # Camacupa / UTM zone 33S
-<22033> +proj=utm +zone=33 +south +ellps=clrk80 +units=m +no_defs  no_defs <>
+<22033> +proj=utm +zone=33 +south +ellps=clrk80 +units=m +no_defs <>
 # Camacupa / TM 11.30 SE
-<22091> +proj=tmerc +lat_0=0 +lon_0=11.5 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<22091> +proj=tmerc +lat_0=0 +lon_0=11.5 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs <>
 # Camacupa / TM 12 SE
-<22092> +proj=tmerc +lat_0=0 +lon_0=12 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<22092> +proj=tmerc +lat_0=0 +lon_0=12 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs <>
 # Campo Inchauspe / Argentina 1
-<22191> +proj=tmerc +lat_0=-90 +lon_0=-72 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<22191> +proj=tmerc +lat_0=-90 +lon_0=-72 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Campo Inchauspe / Argentina 2
-<22192> +proj=tmerc +lat_0=-90 +lon_0=-69 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<22192> +proj=tmerc +lat_0=-90 +lon_0=-69 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Campo Inchauspe / Argentina 3
-<22193> +proj=tmerc +lat_0=-90 +lon_0=-66 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<22193> +proj=tmerc +lat_0=-90 +lon_0=-66 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Campo Inchauspe / Argentina 4
-<22194> +proj=tmerc +lat_0=-90 +lon_0=-63 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<22194> +proj=tmerc +lat_0=-90 +lon_0=-63 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Campo Inchauspe / Argentina 5
-<22195> +proj=tmerc +lat_0=-90 +lon_0=-60 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<22195> +proj=tmerc +lat_0=-90 +lon_0=-60 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Campo Inchauspe / Argentina 6
-<22196> +proj=tmerc +lat_0=-90 +lon_0=-57 +k=1.000000 +x_0=6500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<22196> +proj=tmerc +lat_0=-90 +lon_0=-57 +k=1.000000 +x_0=6500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Campo Inchauspe / Argentina 7
-<22197> +proj=tmerc +lat_0=-90 +lon_0=-54 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<22197> +proj=tmerc +lat_0=-90 +lon_0=-54 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Cape / UTM zone 34S
-<22234> +proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs  no_defs <>
+<22234> +proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs <>
 # Cape / UTM zone 35S
-<22235> +proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs  no_defs <>
+<22235> +proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs <>
 # Cape / UTM zone 36S
-<22236> +proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs  no_defs <>
+<22236> +proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs <>
 # South African Coordinate System zone 15
 # South African Coordinate System zone 17
 # South African Coordinate System zone 19
@@ -2800,957 +2801,957 @@
 # South African Coordinate System zone 33
 # Carthage (Paris) / Tunisia Mining Grid
 # Carthage / UTM zone 32N
-<22332> +proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<22332> +proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # Carthage / Nord Tunisie
-<22391> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=9.9 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<22391> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=9.9 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # 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 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<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 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # Corrego Alegre / UTM zone 23S
-<22523> +proj=utm +zone=23 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs  no_defs <>
+<22523> +proj=utm +zone=23 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs <>
 # Corrego Alegre / UTM zone 24S
-<22524> +proj=utm +zone=24 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs  no_defs <>
+<22524> +proj=utm +zone=24 +south +ellps=intl +towgs84=-206,172,-6,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 +units=m +no_defs  no_defs <>
+<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 +units=m +no_defs <>
 # Deir ez Zor / Syria Lambert
-<22770> +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 +units=m +no_defs  no_defs <>
+<22770> +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 +units=m +no_defs <>
 # Deir ez Zor / Levant Stereographic
-<22780> +proj=stere +lat_0=34.2 +lon_0=39.15 +k=0.999534 +x_0=0 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<22780> +proj=stere +lat_0=34.2 +lon_0=39.15 +k=0.999534 +x_0=0 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # Douala / UTM zone 32N
-<22832> +proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<22832> +proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # Egypt 1907 / Blue Belt
-<22991> +proj=tmerc +lat_0=30 +lon_0=35 +k=1.000000 +x_0=300000 +y_0=1100000 +ellps=helmert +units=m +no_defs  no_defs <>
+<22991> +proj=tmerc +lat_0=30 +lon_0=35 +k=1.000000 +x_0=300000 +y_0=1100000 +ellps=helmert +units=m +no_defs <>
 # Egypt 1907 / Red Belt
-<22992> +proj=tmerc +lat_0=30 +lon_0=31 +k=1.000000 +x_0=615000 +y_0=810000 +ellps=helmert +units=m +no_defs  no_defs <>
+<22992> +proj=tmerc +lat_0=30 +lon_0=31 +k=1.000000 +x_0=615000 +y_0=810000 +ellps=helmert +units=m +no_defs <>
 # Egypt 1907 / Purple Belt
-<22993> +proj=tmerc +lat_0=30 +lon_0=27 +k=1.000000 +x_0=700000 +y_0=200000 +ellps=helmert +units=m +no_defs  no_defs <>
+<22993> +proj=tmerc +lat_0=30 +lon_0=27 +k=1.000000 +x_0=700000 +y_0=200000 +ellps=helmert +units=m +no_defs <>
 # Egypt 1907 / Extended Purple Belt
-<22994> +proj=tmerc +lat_0=30 +lon_0=27 +k=1.000000 +x_0=700000 +y_0=1200000 +ellps=helmert +units=m +no_defs  no_defs <>
+<22994> +proj=tmerc +lat_0=30 +lon_0=27 +k=1.000000 +x_0=700000 +y_0=1200000 +ellps=helmert +units=m +no_defs <>
 # ED50 / UTM zone 28N
-<23028> +proj=utm +zone=28 +ellps=intl +units=m +no_defs  no_defs <>
+<23028> +proj=utm +zone=28 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 29N
-<23029> +proj=utm +zone=29 +ellps=intl +units=m +no_defs  no_defs <>
+<23029> +proj=utm +zone=29 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 30N
-<23030> +proj=utm +zone=30 +ellps=intl +units=m +no_defs  no_defs <>
+<23030> +proj=utm +zone=30 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 31N
-<23031> +proj=utm +zone=31 +ellps=intl +units=m +no_defs  no_defs <>
+<23031> +proj=utm +zone=31 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 32N
-<23032> +proj=utm +zone=32 +ellps=intl +units=m +no_defs  no_defs <>
+<23032> +proj=utm +zone=32 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 33N
-<23033> +proj=utm +zone=33 +ellps=intl +units=m +no_defs  no_defs <>
+<23033> +proj=utm +zone=33 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 34N
-<23034> +proj=utm +zone=34 +ellps=intl +units=m +no_defs  no_defs <>
+<23034> +proj=utm +zone=34 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 35N
-<23035> +proj=utm +zone=35 +ellps=intl +units=m +no_defs  no_defs <>
+<23035> +proj=utm +zone=35 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 36N
-<23036> +proj=utm +zone=36 +ellps=intl +units=m +no_defs  no_defs <>
+<23036> +proj=utm +zone=36 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 37N
-<23037> +proj=utm +zone=37 +ellps=intl +units=m +no_defs  no_defs <>
+<23037> +proj=utm +zone=37 +ellps=intl +units=m +no_defs <>
 # ED50 / UTM zone 38N
-<23038> +proj=utm +zone=38 +ellps=intl +units=m +no_defs  no_defs <>
+<23038> +proj=utm +zone=38 +ellps=intl +units=m +no_defs <>
 # ED50 / TM 0 N
-<23090> +proj=tmerc +lat_0=0 +lon_0=0 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<23090> +proj=tmerc +lat_0=0 +lon_0=0 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # ED50 / TM 5 NE
-<23095> +proj=tmerc +lat_0=0 +lon_0=5 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs  no_defs <>
+<23095> +proj=tmerc +lat_0=0 +lon_0=5 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Fahud / UTM zone 39N
-<23239> +proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<23239> +proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs <>
 # Fahud / UTM zone 40N
-<23240> +proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<23240> +proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs <>
 # Garoua / UTM zone 33N
-<23433> +proj=utm +zone=33 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<23433> +proj=utm +zone=33 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # HD72 / EOV
-<23700> +proj=omerc +lat_0=47.14439372222222 +lonc=19.04857177777778 +alpha=90 +k=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +units=m +no_defs  no_defs <>
+<23700> +proj=omerc +lat_0=47.14439372222222 +lonc=19.04857177777778 +alpha=90 +k=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +units=m +no_defs <>
 # ID74 / UTM zone 46N
-<23846> +proj=utm +zone=46 +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23846> +proj=utm +zone=46 +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 47N
-<23847> +proj=utm +zone=47 +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23847> +proj=utm +zone=47 +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 48N
-<23848> +proj=utm +zone=48 +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23848> +proj=utm +zone=48 +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 49N
-<23849> +proj=utm +zone=49 +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23849> +proj=utm +zone=49 +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 50N
-<23850> +proj=utm +zone=50 +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23850> +proj=utm +zone=50 +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 51N
-<23851> +proj=utm +zone=51 +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23851> +proj=utm +zone=51 +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 52N
-<23852> +proj=utm +zone=52 +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23852> +proj=utm +zone=52 +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 53N
-<23853> +proj=utm +zone=53 +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23853> +proj=utm +zone=53 +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 46S
-<23886> +proj=utm +zone=46 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23886> +proj=utm +zone=46 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 47S
-<23887> +proj=utm +zone=47 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23887> +proj=utm +zone=47 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 48S
-<23888> +proj=utm +zone=48 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23888> +proj=utm +zone=48 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 49S
-<23889> +proj=utm +zone=49 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23889> +proj=utm +zone=49 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 50S
-<23890> +proj=utm +zone=50 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23890> +proj=utm +zone=50 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 51S
-<23891> +proj=utm +zone=51 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23891> +proj=utm +zone=51 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 52S
-<23892> +proj=utm +zone=52 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23892> +proj=utm +zone=52 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 53S
-<23893> +proj=utm +zone=53 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23893> +proj=utm +zone=53 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # ID74 / UTM zone 54S
-<23894> +proj=utm +zone=54 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs  no_defs <>
+<23894> +proj=utm +zone=54 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs <>
 # Indian 1954 / UTM zone 46N
-<23946> +proj=utm +zone=46 +a=6377276.345 +b=6356075.413140239 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs  no_defs <>
+<23946> +proj=utm +zone=46 +a=6377276.345 +b=6356075.413140239 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs <>
 # Indian 1954 / UTM zone 47N
-<23947> +proj=utm +zone=47 +a=6377276.345 +b=6356075.413140239 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs  no_defs <>
+<23947> +proj=utm +zone=47 +a=6377276.345 +b=6356075.413140239 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs <>
 # Indian 1954 / UTM zone 48N
-<23948> +proj=utm +zone=48 +a=6377276.345 +b=6356075.413140239 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs  no_defs <>
+<23948> +proj=utm +zone=48 +a=6377276.345 +b=6356075.413140239 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs <>
 # Indian 1975 / UTM zone 47N
-<24047> +proj=utm +zone=47 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs  no_defs <>
+<24047> +proj=utm +zone=47 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs <>
 # Indian 1975 / UTM zone 48N
-<24048> +proj=utm +zone=48 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs  no_defs <>
+<24048> +proj=utm +zone=48 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs <>
 # Jamaica 1875 / Jamaica (Old Grid)
-<24100> +proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=167638.49575 +y_0=121918.906 +ellps=clrk80 +to_meter=0.304797265 +no_defs  no_defs <>
+<24100> +proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=167638.49575 +y_0=121918.906 +ellps=clrk80 +to_meter=0.304797265 +no_defs <>
 # JAD69 / Jamaica National Grid
-<24200> +proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=250000 +y_0=150000 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<24200> +proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=250000 +y_0=150000 +ellps=clrk66 +units=m +no_defs <>
 # Kalianpur 1937 / UTM zone 45N
-<24305> +proj=utm +zone=45 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs  no_defs <>
+<24305> +proj=utm +zone=45 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs <>
 # Kalianpur 1937 / UTM zone 46N
-<24306> +proj=utm +zone=46 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs  no_defs <>
+<24306> +proj=utm +zone=46 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs <>
 # Kalianpur 1962 / UTM zone 41N
-<24311> +proj=utm +zone=41 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs  no_defs <>
+<24311> +proj=utm +zone=41 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1962 / UTM zone 42N
-<24312> +proj=utm +zone=42 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs  no_defs <>
+<24312> +proj=utm +zone=42 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1962 / UTM zone 43N
-<24313> +proj=utm +zone=43 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs  no_defs <>
+<24313> +proj=utm +zone=43 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / UTM zone 42N
-<24342> +proj=utm +zone=42 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24342> +proj=utm +zone=42 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / UTM zone 43N
-<24343> +proj=utm +zone=43 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24343> +proj=utm +zone=43 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / UTM zone 44N
-<24344> +proj=utm +zone=44 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24344> +proj=utm +zone=44 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / UTM zone 45N
-<24345> +proj=utm +zone=45 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24345> +proj=utm +zone=45 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / UTM zone 46N
-<24346> +proj=utm +zone=46 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24346> +proj=utm +zone=46 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / UTM zone 47N
-<24347> +proj=utm +zone=47 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24347> +proj=utm +zone=47 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1880 / India zone 0
-<24370> +proj=lcc +lat_1=39.5 +lat_0=39.5 +lon_0=68 +k_0=0.99846154 +x_0=2153865.73916853 +y_0=2368292.194628102 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs  no_defs <>
+<24370> +proj=lcc +lat_1=39.5 +lat_0=39.5 +lon_0=68 +k_0=0.99846154 +x_0=2153865.73916853 +y_0=2368292.194628102 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs <>
 # Kalianpur 1880 / India zone I
-<24371> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs  no_defs <>
+<24371> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs <>
 # Kalianpur 1880 / India zone IIa
-<24372> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs  no_defs <>
+<24372> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs <>
 # Kalianpur 1880 / India zone III
-<24373> +proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs  no_defs <>
+<24373> +proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs <>
 # Kalianpur 1880 / India zone IV
-<24374> +proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs  no_defs <>
+<24374> +proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs <>
 # Kalianpur 1937 / India zone IIb
-<24375> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743185.69 +y_0=914395.23 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs  no_defs <>
+<24375> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743185.69 +y_0=914395.23 +a=6377276.345 +b=6356075.413140239 +units=m +no_defs <>
 # Kalianpur 1962 / India zone I
-<24376> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs  no_defs <>
+<24376> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1962 / India zone IIa
-<24377> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs  no_defs <>
+<24377> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165385 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / India zone I
-<24378> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24378> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / India zone IIa
-<24379> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24379> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / India zone IIb
-<24380> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24380> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1975 / India zone III
-<24381> +proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24381> +proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kalianpur 1880 / India zone IIb
-<24382> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs  no_defs <>
+<24382> +proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.357204817 +to_meter=0.9143985307444408 +no_defs <>
 # Kalianpur 1975 / India zone IV
-<24383> +proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs  no_defs <>
+<24383> +proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs <>
 # Kertau / Singapore Grid
-<24500> +proj=cass +lat_0=1.287646666666667 +lon_0=103.8530022222222 +x_0=30000 +y_0=30000 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs  no_defs <>
+<24500> +proj=cass +lat_0=1.287646666666667 +lon_0=103.8530022222222 +x_0=30000 +y_0=30000 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs <>
 # Kertau / UTM zone 47N
-<24547> +proj=utm +zone=47 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs  no_defs <>
+<24547> +proj=utm +zone=47 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs <>
 # Kertau / UTM zone 48N
-<24548> +proj=utm +zone=48 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs  no_defs <>
+<24548> +proj=utm +zone=48 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs <>
 # Kertau / R.S.O. Malaya (ch)
-<24571> +proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804671.2997750348 +y_0=0 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +to_meter=20.11678249437587 +no_defs  no_defs <>
+<24571> +proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804671.2997750348 +y_0=0 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +to_meter=20.11678249437587 +no_defs <>
 # KOC Lambert
-<24600> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<24600> +proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +units=m +no_defs <>
 # La Canoa / UTM zone 18N
-<24718> +proj=utm +zone=18 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs  no_defs <>
+<24718> +proj=utm +zone=18 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs <>
 # La Canoa / UTM zone 19N
-<24719> +proj=utm +zone=19 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs  no_defs <>
+<24719> +proj=utm +zone=19 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs <>
 # La Canoa / UTM zone 20N
-<24720> +proj=utm +zone=20 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs  no_defs <>
+<24720> +proj=utm +zone=20 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs <>
 # PSAD56 / UTM zone 18N
-<24818> +proj=utm +zone=18 +ellps=intl +units=m +no_defs  no_defs <>
+<24818> +proj=utm +zone=18 +ellps=intl +units=m +no_defs <>
 # PSAD56 / UTM zone 19N
-<24819> +proj=utm +zone=19 +ellps=intl +units=m +no_defs  no_defs <>
+<24819> +proj=utm +zone=19 +ellps=intl +units=m +no_defs <>
 # PSAD56 / UTM zone 20N
-<24820> +proj=utm +zone=20 +ellps=intl +units=m +no_defs  no_defs <>
+<24820> +proj=utm +zone=20 +ellps=intl +units=m +no_defs <>
 # PSAD56 / UTM zone 21N
-<24821> +proj=utm +zone=21 +ellps=intl +units=m +no_defs  no_defs <>
+<24821> +proj=utm +zone=21 +ellps=intl +units=m +no_defs <>
 # PSAD56 / UTM zone 17S
-<24877> +proj=utm +zone=17 +south +ellps=intl +units=m +no_defs  no_defs <>
+<24877> +proj=utm +zone=17 +south +ellps=intl +units=m +no_defs <>
 # PSAD56 / UTM zone 18S
-<24878> +proj=utm +zone=18 +south +ellps=intl +units=m +no_defs  no_defs <>
+<24878> +proj=utm +zone=18 +south +ellps=intl +units=m +no_defs <>
 # PSAD56 / UTM zone 19S
-<24879> +proj=utm +zone=19 +south +ellps=intl +units=m +no_defs  no_defs <>
+<24879> +proj=utm +zone=19 +south +ellps=intl +units=m +no_defs <>
 # PSAD56 / UTM zone 20S
-<24880> +proj=utm +zone=20 +south +ellps=intl +units=m +no_defs  no_defs <>
+<24880> +proj=utm +zone=20 +south +ellps=intl +units=m +no_defs <>
 # PSAD56 / UTM zone 22S
-<24882> +proj=utm +zone=22 +south +ellps=intl +units=m +no_defs  no_defs <>
+<24882> +proj=utm +zone=22 +south +ellps=intl +units=m +no_defs <>
 # PSAD56 / Peru west zone
-<24891> +proj=tmerc +lat_0=-6 +lon_0=-80.5 +k=0.999830 +x_0=222000 +y_0=1426834.743 +ellps=intl +units=m +no_defs  no_defs <>
+<24891> +proj=tmerc +lat_0=-6 +lon_0=-80.5 +k=0.999830 +x_0=222000 +y_0=1426834.743 +ellps=intl +units=m +no_defs <>
 # PSAD56 / Peru central zone
-<24892> +proj=tmerc +lat_0=-9.5 +lon_0=-76 +k=0.999330 +x_0=720000 +y_0=1039979.159 +ellps=intl +units=m +no_defs  no_defs <>
+<24892> +proj=tmerc +lat_0=-9.5 +lon_0=-76 +k=0.999330 +x_0=720000 +y_0=1039979.159 +ellps=intl +units=m +no_defs <>
 # PSAD56 / Peru east zone
-<24893> +proj=tmerc +lat_0=-9.5 +lon_0=-70.5 +k=0.999530 +x_0=1324000 +y_0=1040084.558 +ellps=intl +units=m +no_defs  no_defs <>
+<24893> +proj=tmerc +lat_0=-9.5 +lon_0=-70.5 +k=0.999530 +x_0=1324000 +y_0=1040084.558 +ellps=intl +units=m +no_defs <>
 # Leigon / Ghana Metre Grid
-<25000> +proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.999750 +x_0=274319.51 +y_0=0 +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +units=m +no_defs  no_defs <>
+<25000> +proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.999750 +x_0=274319.51 +y_0=0 +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +units=m +no_defs <>
 # Lome / UTM zone 31N
-<25231> +proj=utm +zone=31 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<25231> +proj=utm +zone=31 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # Luzon 1911 / Philippines zone I
-<25391> +proj=tmerc +lat_0=0 +lon_0=117 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<25391> +proj=tmerc +lat_0=0 +lon_0=117 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # Luzon 1911 / Philippines zone II
-<25392> +proj=tmerc +lat_0=0 +lon_0=119 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<25392> +proj=tmerc +lat_0=0 +lon_0=119 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # Luzon 1911 / Philippines zone III
-<25393> +proj=tmerc +lat_0=0 +lon_0=121 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<25393> +proj=tmerc +lat_0=0 +lon_0=121 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # Luzon 1911 / Philippines zone IV
-<25394> +proj=tmerc +lat_0=0 +lon_0=123 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<25394> +proj=tmerc +lat_0=0 +lon_0=123 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # Luzon 1911 / Philippines zone V
-<25395> +proj=tmerc +lat_0=0 +lon_0=125 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs  no_defs <>
+<25395> +proj=tmerc +lat_0=0 +lon_0=125 +k=0.999950 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs <>
 # Makassar (Jakarta) / NEIEZ
-<25700> +proj=merc +lat_ts=0 +lon_0=216.8077194444444 +k=0.997000 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +units=m +no_defs  no_defs <>
+<25700> +proj=merc +lat_ts=0 +lon_0=216.8077194444444 +k=0.997000 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +units=m +no_defs <>
 # ETRS89 / UTM zone 28N
-<25828> +proj=utm +zone=28 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25828> +proj=utm +zone=28 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 29N
-<25829> +proj=utm +zone=29 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25829> +proj=utm +zone=29 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 30N
-<25830> +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25830> +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 31N
-<25831> +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25831> +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 32N
-<25832> +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25832> +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 33N
-<25833> +proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25833> +proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 34N
-<25834> +proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25834> +proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 35N
-<25835> +proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25835> +proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 36N
-<25836> +proj=utm +zone=36 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25836> +proj=utm +zone=36 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 37N
-<25837> +proj=utm +zone=37 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25837> +proj=utm +zone=37 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / UTM zone 38N
-<25838> +proj=utm +zone=38 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25838> +proj=utm +zone=38 +ellps=GRS80 +units=m +no_defs <>
 # ETRS89 / TM Baltic93
-<25884> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999600 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<25884> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999600 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # Malongo 1987 / UTM zone 32S
-<25932> +proj=utm +zone=32 +south +ellps=intl +units=m +no_defs  no_defs <>
+<25932> +proj=utm +zone=32 +south +ellps=intl +units=m +no_defs <>
 # Merchich / Nord Maroc
-<26191> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs  no_defs <>
+<26191> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs <>
 # Merchich / Sud Maroc
-<26192> +proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.9996155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs  no_defs <>
+<26192> +proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.9996155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs <>
 # Merchich / Sahara
-<26193> +proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.9996 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs  no_defs <>
+<26193> +proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.9996 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs <>
 # Massawa / UTM zone 37N
-<26237> +proj=utm +zone=37 +ellps=bessel +towgs84=639,405,60,0,0,0,0 +units=m +no_defs  no_defs <>
+<26237> +proj=utm +zone=37 +ellps=bessel +towgs84=639,405,60,0,0,0,0 +units=m +no_defs <>
 # Minna / UTM zone 31N
-<26331> +proj=utm +zone=31 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<26331> +proj=utm +zone=31 +ellps=clrk80 +units=m +no_defs <>
 # Minna / UTM zone 32N
-<26332> +proj=utm +zone=32 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<26332> +proj=utm +zone=32 +ellps=clrk80 +units=m +no_defs <>
 # Minna / Nigeria West Belt
-<26391> +proj=tmerc +lat_0=4 +lon_0=4.5 +k=0.999750 +x_0=230738.26 +y_0=0 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<26391> +proj=tmerc +lat_0=4 +lon_0=4.5 +k=0.999750 +x_0=230738.26 +y_0=0 +ellps=clrk80 +units=m +no_defs <>
 # Minna / Nigeria Mid Belt
-<26392> +proj=tmerc +lat_0=4 +lon_0=8.5 +k=0.999750 +x_0=670553.98 +y_0=0 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<26392> +proj=tmerc +lat_0=4 +lon_0=8.5 +k=0.999750 +x_0=670553.98 +y_0=0 +ellps=clrk80 +units=m +no_defs <>
 # Minna / Nigeria East Belt
-<26393> +proj=tmerc +lat_0=4 +lon_0=12.5 +k=0.999750 +x_0=1110369.7 +y_0=0 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<26393> +proj=tmerc +lat_0=4 +lon_0=12.5 +k=0.999750 +x_0=1110369.7 +y_0=0 +ellps=clrk80 +units=m +no_defs <>
 # Mhast / UTM zone 32S
-<26432> +proj=utm +zone=32 +south +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +units=m +no_defs  no_defs <>
+<26432> +proj=utm +zone=32 +south +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +units=m +no_defs <>
 # Monte Mario (Rome) / Italy zone 1
-<26591> +proj=tmerc +lat_0=0 +lon_0=21.45233333333333 +k=0.999600 +x_0=1500000 +y_0=0 +ellps=intl +pm=rome +units=m +no_defs  no_defs <>
+<26591> +proj=tmerc +lat_0=0 +lon_0=21.45233333333333 +k=0.999600 +x_0=1500000 +y_0=0 +ellps=intl +pm=rome +units=m +no_defs <>
 # Monte Mario (Rome) / Italy zone 2
-<26592> +proj=tmerc +lat_0=0 +lon_0=27.45233333333333 +k=0.999600 +x_0=2520000 +y_0=0 +ellps=intl +pm=rome +units=m +no_defs  no_defs <>
+<26592> +proj=tmerc +lat_0=0 +lon_0=27.45233333333333 +k=0.999600 +x_0=2520000 +y_0=0 +ellps=intl +pm=rome +units=m +no_defs <>
 # M'poraloko / UTM zone 32N
-<26632> +proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<26632> +proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # M'poraloko / UTM zone 32S
-<26692> +proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<26692> +proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # NAD27 / UTM zone 3N
-<26703> +proj=utm +zone=3 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26703> +proj=utm +zone=3 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 4N
-<26704> +proj=utm +zone=4 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26704> +proj=utm +zone=4 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 5N
-<26705> +proj=utm +zone=5 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26705> +proj=utm +zone=5 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 6N
-<26706> +proj=utm +zone=6 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26706> +proj=utm +zone=6 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 7N
-<26707> +proj=utm +zone=7 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26707> +proj=utm +zone=7 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 8N
-<26708> +proj=utm +zone=8 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26708> +proj=utm +zone=8 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 9N
-<26709> +proj=utm +zone=9 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26709> +proj=utm +zone=9 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 10N
-<26710> +proj=utm +zone=10 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26710> +proj=utm +zone=10 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 11N
-<26711> +proj=utm +zone=11 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26711> +proj=utm +zone=11 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 12N
-<26712> +proj=utm +zone=12 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26712> +proj=utm +zone=12 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 13N
-<26713> +proj=utm +zone=13 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26713> +proj=utm +zone=13 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 14N
-<26714> +proj=utm +zone=14 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26714> +proj=utm +zone=14 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 15N
-<26715> +proj=utm +zone=15 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26715> +proj=utm +zone=15 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 16N
-<26716> +proj=utm +zone=16 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26716> +proj=utm +zone=16 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 17N
-<26717> +proj=utm +zone=17 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26717> +proj=utm +zone=17 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 18N
-<26718> +proj=utm +zone=18 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26718> +proj=utm +zone=18 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 19N
-<26719> +proj=utm +zone=19 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26719> +proj=utm +zone=19 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 20N
-<26720> +proj=utm +zone=20 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26720> +proj=utm +zone=20 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 21N
-<26721> +proj=utm +zone=21 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26721> +proj=utm +zone=21 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / UTM zone 22N
-<26722> +proj=utm +zone=22 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<26722> +proj=utm +zone=22 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / Alabama East
-<26729> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26729> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alabama West
-<26730> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26730> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 1
-<26731> +proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000.001016002 +y_0=-5000000.001016002 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26731> +proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000.001016002 +y_0=-5000000.001016002 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 2
-<26732> +proj=tmerc +lat_0=54 +lon_0=-142 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26732> +proj=tmerc +lat_0=54 +lon_0=-142 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 3
-<26733> +proj=tmerc +lat_0=54 +lon_0=-146 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26733> +proj=tmerc +lat_0=54 +lon_0=-146 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 4
-<26734> +proj=tmerc +lat_0=54 +lon_0=-150 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26734> +proj=tmerc +lat_0=54 +lon_0=-150 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 5
-<26735> +proj=tmerc +lat_0=54 +lon_0=-154 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26735> +proj=tmerc +lat_0=54 +lon_0=-154 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 6
-<26736> +proj=tmerc +lat_0=54 +lon_0=-158 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26736> +proj=tmerc +lat_0=54 +lon_0=-158 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 7
-<26737> +proj=tmerc +lat_0=54 +lon_0=-162 +k=0.999900 +x_0=213360.4267208534 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26737> +proj=tmerc +lat_0=54 +lon_0=-162 +k=0.999900 +x_0=213360.4267208534 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 8
-<26738> +proj=tmerc +lat_0=54 +lon_0=-166 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26738> +proj=tmerc +lat_0=54 +lon_0=-166 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 9
-<26739> +proj=tmerc +lat_0=54 +lon_0=-170 +k=0.999900 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26739> +proj=tmerc +lat_0=54 +lon_0=-170 +k=0.999900 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Alaska zone 10
-<26740> +proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=914401.8288036576 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26740> +proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=914401.8288036576 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / California zone I
-<26741> +proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26741> +proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / California zone II
-<26742> +proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26742> +proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / California zone III
-<26743> +proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26743> +proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / California zone IV
-<26744> +proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26744> +proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / California zone V
-<26745> +proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26745> +proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / California zone VI
-<26746> +proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26746> +proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / California zone VII
-<26747> +proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +x_0=1276106.450596901 +y_0=127079.524511049 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26747> +proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +x_0=1276106.450596901 +y_0=127079.524511049 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Arizona East
-<26748> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26748> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Arizona Central
-<26749> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26749> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Arizona West
-<26750> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26750> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Arkansas North
-<26751> +proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26751> +proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Arkansas South
-<26752> +proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26752> +proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Colorado North
-<26753> +proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26753> +proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Colorado Central
-<26754> +proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26754> +proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Colorado South
-<26755> +proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26755> +proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Connecticut
-<26756> +proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26756> +proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Delaware
-<26757> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26757> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Florida East
-<26758> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26758> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Florida West
-<26759> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26759> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Florida North
-<26760> +proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26760> +proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Georgia East
-<26766> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26766> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Georgia West
-<26767> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26767> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Idaho East
-<26768> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26768> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Idaho Central
-<26769> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26769> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Idaho West
-<26770> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26770> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Illinois East
-<26771> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26771> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Illinois West
-<26772> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26772> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Indiana East
-<26773> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26773> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Indiana West
-<26774> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26774> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Iowa North
-<26775> +proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26775> +proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Iowa South
-<26776> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26776> +proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Kansas North
-<26777> +proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26777> +proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Kansas South
-<26778> +proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26778> +proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Kentucky North
-<26779> +proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26779> +proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Kentucky South
-<26780> +proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26780> +proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Louisiana North
-<26781> +proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.66666666666667 +lon_0=-92.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26781> +proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.66666666666667 +lon_0=-92.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Louisiana South
-<26782> +proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.66666666666667 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26782> +proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.66666666666667 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Maine East
-<26783> +proj=tmerc +lat_0=43.83333333333334 +lon_0=-68.5 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26783> +proj=tmerc +lat_0=43.83333333333334 +lon_0=-68.5 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Maine West
-<26784> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26784> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Maryland
-<26785> +proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.83333333333334 +lon_0=-77 +x_0=243840.4876809754 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26785> +proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.83333333333334 +lon_0=-77 +x_0=243840.4876809754 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Massachusetts Mainland
-<26786> +proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26786> +proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Massachusetts Island
-<26787> +proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=60960.12192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26787> +proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=60960.12192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Minnesota North
-<26791> +proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26791> +proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Minnesota Central
-<26792> +proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26792> +proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Minnesota South
-<26793> +proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26793> +proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Mississippi East
-<26794> +proj=tmerc +lat_0=29.66666666666667 +lon_0=-88.83333333333333 +k=0.999960 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26794> +proj=tmerc +lat_0=29.66666666666667 +lon_0=-88.83333333333333 +k=0.999960 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Mississippi West
-<26795> +proj=tmerc +lat_0=30.5 +lon_0=-90.33333333333333 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26795> +proj=tmerc +lat_0=30.5 +lon_0=-90.33333333333333 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Missouri East
-<26796> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26796> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Missouri Central
-<26797> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26797> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Missouri West
-<26798> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26798> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD Michigan / Michigan East
-<26801> +proj=tmerc +lat_0=41.5 +lon_0=-83.66666666666667 +k=0.999943 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26801> +proj=tmerc +lat_0=41.5 +lon_0=-83.66666666666667 +k=0.999943 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs <>
 # NAD Michigan / Michigan Old Central
-<26802> +proj=tmerc +lat_0=41.5 +lon_0=-85.75 +k=0.999909 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26802> +proj=tmerc +lat_0=41.5 +lon_0=-85.75 +k=0.999909 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs <>
 # NAD Michigan / Michigan West
-<26803> +proj=tmerc +lat_0=41.5 +lon_0=-88.75 +k=0.999909 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<26803> +proj=tmerc +lat_0=41.5 +lon_0=-88.75 +k=0.999909 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +to_meter=0.3048006096012192 +no_defs <>
 # NAD Michigan / Michigan North
-<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 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<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 +to_meter=0.3048006096012192 +no_defs <>
 # NAD Michigan / Michigan Central
-<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 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<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 +to_meter=0.3048006096012192 +no_defs <>
 # NAD Michigan / Michigan South
-<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 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<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 +to_meter=0.3048006096012192 +no_defs <>
 # NAD83 / UTM zone 3N
-<26903> +proj=utm +zone=3 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26903> +proj=utm +zone=3 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 4N
-<26904> +proj=utm +zone=4 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26904> +proj=utm +zone=4 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 5N
-<26905> +proj=utm +zone=5 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26905> +proj=utm +zone=5 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 6N
-<26906> +proj=utm +zone=6 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26906> +proj=utm +zone=6 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 7N
-<26907> +proj=utm +zone=7 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26907> +proj=utm +zone=7 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 8N
-<26908> +proj=utm +zone=8 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26908> +proj=utm +zone=8 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 9N
-<26909> +proj=utm +zone=9 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26909> +proj=utm +zone=9 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 10N
-<26910> +proj=utm +zone=10 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26910> +proj=utm +zone=10 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 11N
-<26911> +proj=utm +zone=11 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26911> +proj=utm +zone=11 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 12N
-<26912> +proj=utm +zone=12 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26912> +proj=utm +zone=12 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 13N
-<26913> +proj=utm +zone=13 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26913> +proj=utm +zone=13 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 14N
-<26914> +proj=utm +zone=14 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26914> +proj=utm +zone=14 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 15N
-<26915> +proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26915> +proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 16N
-<26916> +proj=utm +zone=16 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26916> +proj=utm +zone=16 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 17N
-<26917> +proj=utm +zone=17 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26917> +proj=utm +zone=17 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 18N
-<26918> +proj=utm +zone=18 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26918> +proj=utm +zone=18 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 19N
-<26919> +proj=utm +zone=19 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26919> +proj=utm +zone=19 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 20N
-<26920> +proj=utm +zone=20 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26920> +proj=utm +zone=20 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 21N
-<26921> +proj=utm +zone=21 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26921> +proj=utm +zone=21 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 22N
-<26922> +proj=utm +zone=22 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26922> +proj=utm +zone=22 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / UTM zone 23N
-<26923> +proj=utm +zone=23 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26923> +proj=utm +zone=23 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alabama East
-<26929> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26929> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alabama West
-<26930> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26930> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 1
-<26931> +proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26931> +proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 2
-<26932> +proj=tmerc +lat_0=54 +lon_0=-142 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26932> +proj=tmerc +lat_0=54 +lon_0=-142 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 3
-<26933> +proj=tmerc +lat_0=54 +lon_0=-146 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26933> +proj=tmerc +lat_0=54 +lon_0=-146 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 4
-<26934> +proj=tmerc +lat_0=54 +lon_0=-150 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26934> +proj=tmerc +lat_0=54 +lon_0=-150 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 5
-<26935> +proj=tmerc +lat_0=54 +lon_0=-154 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26935> +proj=tmerc +lat_0=54 +lon_0=-154 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 6
-<26936> +proj=tmerc +lat_0=54 +lon_0=-158 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26936> +proj=tmerc +lat_0=54 +lon_0=-158 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 7
-<26937> +proj=tmerc +lat_0=54 +lon_0=-162 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26937> +proj=tmerc +lat_0=54 +lon_0=-162 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 8
-<26938> +proj=tmerc +lat_0=54 +lon_0=-166 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26938> +proj=tmerc +lat_0=54 +lon_0=-166 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 9
-<26939> +proj=tmerc +lat_0=54 +lon_0=-170 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26939> +proj=tmerc +lat_0=54 +lon_0=-170 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Alaska zone 10
-<26940> +proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26940> +proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / California zone 1
-<26941> +proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26941> +proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / California zone 2
-<26942> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26942> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / California zone 3
-<26943> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26943> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / California zone 4
-<26944> +proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26944> +proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / California zone 5
-<26945> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26945> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / California zone 6
-<26946> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26946> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Arizona East
-<26948> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26948> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Arizona Central
-<26949> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26949> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Arizona West
-<26950> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26950> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Arkansas North
-<26951> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26951> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Arkansas South
-<26952> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26952> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Colorado North
-<26953> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26953> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Colorado Central
-<26954> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26954> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Colorado South
-<26955> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26955> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Connecticut
-<26956> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26956> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Delaware
-<26957> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26957> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Florida East
-<26958> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26958> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Florida West
-<26959> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26959> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Florida North
-<26960> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26960> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Hawaii zone 1
-<26961> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26961> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Hawaii zone 2
-<26962> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26962> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Hawaii zone 3
-<26963> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26963> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Hawaii zone 4
-<26964> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26964> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Hawaii zone 5
-<26965> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26965> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Georgia East
-<26966> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26966> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Georgia West
-<26967> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26967> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Idaho East
-<26968> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26968> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Idaho Central
-<26969> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26969> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Idaho West
-<26970> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26970> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Illinois East
-<26971> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26971> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Illinois West
-<26972> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26972> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Indiana East
-<26973> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=100000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26973> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=100000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Indiana West
-<26974> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26974> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Iowa North
-<26975> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26975> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Iowa South
-<26976> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26976> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Kansas North
-<26977> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26977> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Kansas South
-<26978> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26978> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Kentucky North
-<26979> +proj=lcc +lat_1=37.96666666666667 +lat_2=37.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26979> +proj=lcc +lat_1=37.96666666666667 +lat_2=37.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Kentucky South
-<26980> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26980> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Louisiana North
-<26981> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26981> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Louisiana South
-<26982> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26982> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Maine East
-<26983> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.999900 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26983> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.999900 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Maine West
-<26984> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=900000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26984> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=900000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Maryland
-<26985> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26985> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Massachusetts Mainland
-<26986> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26986> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Massachusetts Island
-<26987> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26987> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Michigan North
-<26988> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26988> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Michigan Central
-<26989> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26989> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Michigan South
-<26990> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26990> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Minnesota North
-<26991> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26991> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Minnesota Central
-<26992> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26992> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Minnesota South
-<26993> +proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26993> +proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Mississippi East
-<26994> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26994> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Mississippi West
-<26995> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26995> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Missouri East
-<26996> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26996> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Missouri Central
-<26997> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26997> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Missouri West
-<26998> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=850000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<26998> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=850000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # Nahrwan 1967 / UTM zone 38N
-<27038> +proj=utm +zone=38 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<27038> +proj=utm +zone=38 +ellps=clrk80 +units=m +no_defs <>
 # Nahrwan 1967 / UTM zone 39N
-<27039> +proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<27039> +proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs <>
 # Nahrwan 1967 / UTM zone 40N
-<27040> +proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<27040> +proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs <>
 # Naparima 1972 / UTM zone 20N
-<27120> +proj=utm +zone=20 +ellps=intl +units=m +no_defs  no_defs <>
+<27120> +proj=utm +zone=20 +ellps=intl +units=m +no_defs <>
 # NZGD49 / New Zealand Map Grid
-<27200> +proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl +units=m +no_defs  no_defs <>
+<27200> +proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Mount Eden Circuit
-<27205> +proj=tmerc +lat_0=-36.87986527777778 +lon_0=174.7643393611111 +k=0.999900 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27205> +proj=tmerc +lat_0=-36.87986527777778 +lon_0=174.7643393611111 +k=0.999900 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Bay of Plenty Circuit
-<27206> +proj=tmerc +lat_0=-37.76124980555556 +lon_0=176.46619725 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27206> +proj=tmerc +lat_0=-37.76124980555556 +lon_0=176.46619725 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Poverty Bay Circuit
-<27207> +proj=tmerc +lat_0=-38.62470277777778 +lon_0=177.8856362777778 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27207> +proj=tmerc +lat_0=-38.62470277777778 +lon_0=177.8856362777778 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Hawkes Bay Circuit
-<27208> +proj=tmerc +lat_0=-39.65092930555556 +lon_0=176.6736805277778 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27208> +proj=tmerc +lat_0=-39.65092930555556 +lon_0=176.6736805277778 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Taranaki Circuit
-<27209> +proj=tmerc +lat_0=-39.13575830555556 +lon_0=174.22801175 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27209> +proj=tmerc +lat_0=-39.13575830555556 +lon_0=174.22801175 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Tuhirangi Circuit
-<27210> +proj=tmerc +lat_0=-39.51247038888889 +lon_0=175.6400368055556 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27210> +proj=tmerc +lat_0=-39.51247038888889 +lon_0=175.6400368055556 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Wanganui Circuit
-<27211> +proj=tmerc +lat_0=-40.24194713888889 +lon_0=175.4880996111111 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27211> +proj=tmerc +lat_0=-40.24194713888889 +lon_0=175.4880996111111 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Wairarapa Circuit
-<27212> +proj=tmerc +lat_0=-40.92553263888889 +lon_0=175.6473496666667 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27212> +proj=tmerc +lat_0=-40.92553263888889 +lon_0=175.6473496666667 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Wellington Circuit
-<27213> +proj=tmerc +lat_0=-41.30131963888888 +lon_0=174.7766231111111 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27213> +proj=tmerc +lat_0=-41.30131963888888 +lon_0=174.7766231111111 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Collingwood Circuit
-<27214> +proj=tmerc +lat_0=-40.71475905555556 +lon_0=172.6720465 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27214> +proj=tmerc +lat_0=-40.71475905555556 +lon_0=172.6720465 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Nelson Circuit
-<27215> +proj=tmerc +lat_0=-41.27454472222222 +lon_0=173.2993168055555 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27215> +proj=tmerc +lat_0=-41.27454472222222 +lon_0=173.2993168055555 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Karamea Circuit
-<27216> +proj=tmerc +lat_0=-41.28991152777778 +lon_0=172.1090281944444 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27216> +proj=tmerc +lat_0=-41.28991152777778 +lon_0=172.1090281944444 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Buller Circuit
-<27217> +proj=tmerc +lat_0=-41.81080286111111 +lon_0=171.5812600555556 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27217> +proj=tmerc +lat_0=-41.81080286111111 +lon_0=171.5812600555556 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Grey Circuit
-<27218> +proj=tmerc +lat_0=-42.33369427777778 +lon_0=171.5497713055556 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27218> +proj=tmerc +lat_0=-42.33369427777778 +lon_0=171.5497713055556 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Amuri Circuit
-<27219> +proj=tmerc +lat_0=-42.68911658333333 +lon_0=173.0101333888889 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27219> +proj=tmerc +lat_0=-42.68911658333333 +lon_0=173.0101333888889 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Marlborough Circuit
-<27220> +proj=tmerc +lat_0=-41.54448666666666 +lon_0=173.8020741111111 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27220> +proj=tmerc +lat_0=-41.54448666666666 +lon_0=173.8020741111111 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Hokitika Circuit
-<27221> +proj=tmerc +lat_0=-42.88632236111111 +lon_0=170.9799935 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27221> +proj=tmerc +lat_0=-42.88632236111111 +lon_0=170.9799935 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Okarito Circuit
-<27222> +proj=tmerc +lat_0=-43.11012813888889 +lon_0=170.2609258333333 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27222> +proj=tmerc +lat_0=-43.11012813888889 +lon_0=170.2609258333333 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Jacksons Bay Circuit
-<27223> +proj=tmerc +lat_0=-43.97780288888889 +lon_0=168.606267 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27223> +proj=tmerc +lat_0=-43.97780288888889 +lon_0=168.606267 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Mount Pleasant Circuit
-<27224> +proj=tmerc +lat_0=-43.59063758333333 +lon_0=172.7271935833333 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27224> +proj=tmerc +lat_0=-43.59063758333333 +lon_0=172.7271935833333 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Gawler Circuit
-<27225> +proj=tmerc +lat_0=-43.74871155555556 +lon_0=171.3607484722222 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27225> +proj=tmerc +lat_0=-43.74871155555556 +lon_0=171.3607484722222 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Timaru Circuit
-<27226> +proj=tmerc +lat_0=-44.40222036111111 +lon_0=171.0572508333333 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27226> +proj=tmerc +lat_0=-44.40222036111111 +lon_0=171.0572508333333 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Lindis Peak Circuit
-<27227> +proj=tmerc +lat_0=-44.73526797222222 +lon_0=169.4677550833333 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27227> +proj=tmerc +lat_0=-44.73526797222222 +lon_0=169.4677550833333 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Mount Nicholas Circuit
-<27228> +proj=tmerc +lat_0=-45.13290258333333 +lon_0=168.3986411944444 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27228> +proj=tmerc +lat_0=-45.13290258333333 +lon_0=168.3986411944444 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Mount York Circuit
-<27229> +proj=tmerc +lat_0=-45.56372616666666 +lon_0=167.7388617777778 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27229> +proj=tmerc +lat_0=-45.56372616666666 +lon_0=167.7388617777778 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Observation Point Circuit
-<27230> +proj=tmerc +lat_0=-45.81619661111111 +lon_0=170.6285951666667 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27230> +proj=tmerc +lat_0=-45.81619661111111 +lon_0=170.6285951666667 +k=1.000000 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / North Taieri Circuit
-<27231> +proj=tmerc +lat_0=-45.86151336111111 +lon_0=170.2825891111111 +k=0.999960 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs  no_defs <>
+<27231> +proj=tmerc +lat_0=-45.86151336111111 +lon_0=170.2825891111111 +k=0.999960 +x_0=300000 +y_0=700000 +ellps=intl +units=m +no_defs <>
 # NZGD49 / Bluff Circuit
-<27232> +proj=tmerc +lat_0=-46.60000961111111 +lon_0=168.342872 +k=1.000000 +x_0=300002.66 +y_0=699999.58 +ellps=intl +units=m +no_defs  no_defs <>
+<27232> +proj=tmerc +lat_0=-46.60000961111111 +lon_0=168.342872 +k=1.000000 +x_0=300002.66 +y_0=699999.58 +ellps=intl +units=m +no_defs <>
 # NZGD49 / UTM zone 58S
-<27258> +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs  no_defs <>
+<27258> +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs <>
 # NZGD49 / UTM zone 59S
-<27259> +proj=utm +zone=59 +south +ellps=intl +units=m +no_defs  no_defs <>
+<27259> +proj=utm +zone=59 +south +ellps=intl +units=m +no_defs <>
 # NZGD49 / UTM zone 60S
-<27260> +proj=utm +zone=60 +south +ellps=intl +units=m +no_defs  no_defs <>
+<27260> +proj=utm +zone=60 +south +ellps=intl +units=m +no_defs <>
 # NZGD49 / North Island Grid
-<27291> +proj=tmerc +lat_0=-39 +lon_0=175.5 +k=1.000000 +x_0=274319.5243848086 +y_0=365759.3658464114 +ellps=intl +to_meter=0.9143984146160287 +no_defs  no_defs <>
+<27291> +proj=tmerc +lat_0=-39 +lon_0=175.5 +k=1.000000 +x_0=274319.5243848086 +y_0=365759.3658464114 +ellps=intl +to_meter=0.9143984146160287 +no_defs <>
 # NZGD49 / South Island Grid
-<27292> +proj=tmerc +lat_0=-44 +lon_0=171.5 +k=1.000000 +x_0=457199.2073080143 +y_0=457199.2073080143 +ellps=intl +to_meter=0.9143984146160287 +no_defs  no_defs <>
+<27292> +proj=tmerc +lat_0=-44 +lon_0=171.5 +k=1.000000 +x_0=457199.2073080143 +y_0=457199.2073080143 +ellps=intl +to_meter=0.9143984146160287 +no_defs <>
 # NGO 1948 (Oslo) / NGO zone I
-<27391> +proj=tmerc +lat_0=58 +lon_0=6.056250000000003 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs  no_defs <>
+<27391> +proj=tmerc +lat_0=58 +lon_0=6.056250000000003 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs <>
 # NGO 1948 (Oslo) / NGO zone II
-<27392> +proj=tmerc +lat_0=58 +lon_0=8.389583333333336 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs  no_defs <>
+<27392> +proj=tmerc +lat_0=58 +lon_0=8.389583333333336 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs <>
 # NGO 1948 (Oslo) / NGO zone III
-<27393> +proj=tmerc +lat_0=58 +lon_0=10.72291666666667 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs  no_defs <>
+<27393> +proj=tmerc +lat_0=58 +lon_0=10.72291666666667 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs <>
 # NGO 1948 (Oslo) / NGO zone IV
-<27394> +proj=tmerc +lat_0=58 +lon_0=13.22291666666667 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs  no_defs <>
+<27394> +proj=tmerc +lat_0=58 +lon_0=13.22291666666667 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs <>
 # NGO 1948 (Oslo) / NGO zone V
-<27395> +proj=tmerc +lat_0=58 +lon_0=16.88958333333334 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs  no_defs <>
+<27395> +proj=tmerc +lat_0=58 +lon_0=16.88958333333334 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs <>
 # NGO 1948 (Oslo) / NGO zone VI
-<27396> +proj=tmerc +lat_0=58 +lon_0=20.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs  no_defs <>
+<27396> +proj=tmerc +lat_0=58 +lon_0=20.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs <>
 # NGO 1948 (Oslo) / NGO zone VII
-<27397> +proj=tmerc +lat_0=58 +lon_0=24.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs  no_defs <>
+<27397> +proj=tmerc +lat_0=58 +lon_0=24.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs <>
 # NGO 1948 (Oslo) / NGO zone VIII
-<27398> +proj=tmerc +lat_0=58 +lon_0=29.05625 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs  no_defs <>
+<27398> +proj=tmerc +lat_0=58 +lon_0=29.05625 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs <>
 # Datum 73 / UTM zone 29N
-<27429> +proj=utm +zone=29 +ellps=intl +units=m +no_defs  no_defs <>
+<27429> +proj=utm +zone=29 +ellps=intl +units=m +no_defs <>
 # Datum 73 / Modified Portuguese Grid
-<27492> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +units=m +no_defs  no_defs <>
+<27492> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +units=m +no_defs <>
 # ATF (Paris) / Nord de Guerre
-<27500> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=7.737229170000001 +k_0=0.99950908 +x_0=500000 +y_0=300000 +a=6376523 +b=6355862.933255573 +pm=paris +units=m +no_defs  no_defs <>
+<27500> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=7.737229170000001 +k_0=0.99950908 +x_0=500000 +y_0=300000 +a=6376523 +b=6355862.933255573 +pm=paris +units=m +no_defs <>
 # NTF (Paris) / Lambert Nord France
-<27561> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=2.33722917 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  no_defs <>
+<27561> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=2.33722917 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs <>
 # NTF (Paris) / Lambert Centre France
-<27562> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  no_defs <>
+<27562> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs <>
 # NTF (Paris) / Lambert Sud France
-<27563> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=2.33722917 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  no_defs <>
+<27563> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=2.33722917 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs <>
 # NTF (Paris) / Lambert Corse
-<27564> +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=2.33722917 +k_0=0.99994471 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  no_defs <>
+<27564> +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=2.33722917 +k_0=0.99994471 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs <>
 # NTF (Paris) / Lambert zone I
-<27571> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=2.33722917 +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 +no_defs  no_defs <>
+<27571> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=2.33722917 +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 +no_defs <>
 # NTF (Paris) / Lambert zone II
-<27572> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +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 +no_defs  no_defs <>
+<27572> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +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 +no_defs <>
 # NTF (Paris) / Lambert zone III
-<27573> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=2.33722917 +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 +no_defs  no_defs <>
+<27573> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=2.33722917 +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 +no_defs <>
 # NTF (Paris) / Lambert zone IV
-<27574> +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=2.33722917 +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 +no_defs  no_defs <>
+<27574> +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=2.33722917 +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 +no_defs <>
 # NTF (Paris) / France I
-<27581> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=2.33722917 +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 +no_defs  no_defs <>
+<27581> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=2.33722917 +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 +no_defs <>
 # NTF (Paris) / France II
-<27582> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +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 +no_defs  no_defs <>
+<27582> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +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 +no_defs <>
 # NTF (Paris) / France III
-<27583> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=2.33722917 +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 +no_defs  no_defs <>
+<27583> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=2.33722917 +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 +no_defs <>
 # NTF (Paris) / France IV
-<27584> +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=2.33722917 +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 +no_defs  no_defs <>
+<27584> +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=2.33722917 +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 +no_defs <>
 # NTF (Paris) / Nord France
-<27591> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=2.33722917 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  no_defs <>
+<27591> +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=2.33722917 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs <>
 # NTF (Paris) / Centre France
-<27592> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  no_defs <>
+<27592> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.33722917 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs <>
 # NTF (Paris) / Sud France
-<27593> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=2.33722917 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  no_defs <>
+<27593> +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=2.33722917 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs <>
 # NTF (Paris) / Corse
-<27594> +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=2.33722917 +k_0=0.99994471 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  no_defs <>
+<27594> +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=2.33722917 +k_0=0.99994471 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs <>
 # OSGB 1936 / British National Grid
-<27700> +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000 +y_0=-100000 +ellps=airy +units=m +no_defs  no_defs <>
+<27700> +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000 +y_0=-100000 +ellps=airy +units=m +no_defs <>
 # Palestine 1923 / Palestine Grid
-<28191> +proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=126867.909 +a=6378300.789 +b=6356566.435 +units=m +no_defs  no_defs <>
+<28191> +proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=126867.909 +a=6378300.789 +b=6356566.435 +units=m +no_defs <>
 # Palestine 1923 / Palestine Belt
-<28192> +proj=tmerc +lat_0=31.73409694444445 +lon_0=35.21208055555556 +k=1.000000 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +units=m +no_defs  no_defs <>
+<28192> +proj=tmerc +lat_0=31.73409694444445 +lon_0=35.21208055555556 +k=1.000000 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +units=m +no_defs <>
 # Palestine 1923 / Israeli CS Grid
-<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 +units=m +no_defs  no_defs <>
+<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 +units=m +no_defs <>
 # Pointe Noire / UTM zone 32S
-<28232> +proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<28232> +proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # GDA94 / MGA zone 48
-<28348> +proj=utm +zone=48 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<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  no_defs <>
+<28349> +proj=utm +zone=49 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # GDA94 / MGA zone 50
-<28350> +proj=utm +zone=50 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<28350> +proj=utm +zone=50 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # GDA94 / MGA zone 51
-<28351> +proj=utm +zone=51 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<28351> +proj=utm +zone=51 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # GDA94 / MGA zone 52
-<28352> +proj=utm +zone=52 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<28352> +proj=utm +zone=52 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # GDA94 / MGA zone 53
-<28353> +proj=utm +zone=53 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<28353> +proj=utm +zone=53 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # GDA94 / MGA zone 54
-<28354> +proj=utm +zone=54 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<28354> +proj=utm +zone=54 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # GDA94 / MGA zone 55
-<28355> +proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<28355> +proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # GDA94 / MGA zone 56
-<28356> +proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<28356> +proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # GDA94 / MGA zone 57
-<28357> +proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<28357> +proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # GDA94 / MGA zone 58
-<28358> +proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<28358> +proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 2
-<28402> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28402> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 3
-<28403> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28403> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 4
-<28404> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28404> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 5
-<28405> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28405> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 6
-<28406> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28406> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 7
-<28407> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28407> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 8
-<28408> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28408> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 9
-<28409> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28409> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 10
-<28410> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28410> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 11
-<28411> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28411> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 12
-<28412> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28412> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 13
-<28413> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28413> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 14
-<28414> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28414> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 15
-<28415> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28415> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 16
-<28416> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28416> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 17
-<28417> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28417> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 18
-<28418> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28418> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 19
-<28419> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28419> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 20
-<28420> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28420> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 21
-<28421> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28421> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 22
-<28422> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28422> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 23
-<28423> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28423> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 24
-<28424> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28424> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 25
-<28425> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28425> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 26
-<28426> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28426> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 27
-<28427> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28427> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 28
-<28428> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28428> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 29
-<28429> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28429> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 30
-<28430> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28430> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 31
-<28431> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28431> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger zone 32
-<28432> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28432> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 2N
-<28462> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28462> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 3N
-<28463> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28463> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 4N
-<28464> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28464> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 5N
-<28465> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28465> +proj=tmerc +lat_0=0 +lon_0=27 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 6N
-<28466> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28466> +proj=tmerc +lat_0=0 +lon_0=33 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 7N
-<28467> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28467> +proj=tmerc +lat_0=0 +lon_0=39 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 8N
-<28468> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28468> +proj=tmerc +lat_0=0 +lon_0=45 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 9N
-<28469> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28469> +proj=tmerc +lat_0=0 +lon_0=51 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 10N
-<28470> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28470> +proj=tmerc +lat_0=0 +lon_0=57 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 11N
-<28471> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28471> +proj=tmerc +lat_0=0 +lon_0=63 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 12N
-<28472> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28472> +proj=tmerc +lat_0=0 +lon_0=69 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 13N
-<28473> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28473> +proj=tmerc +lat_0=0 +lon_0=75 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 14N
-<28474> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28474> +proj=tmerc +lat_0=0 +lon_0=81 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 15N
-<28475> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28475> +proj=tmerc +lat_0=0 +lon_0=87 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 16N
-<28476> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28476> +proj=tmerc +lat_0=0 +lon_0=93 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 17N
-<28477> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28477> +proj=tmerc +lat_0=0 +lon_0=99 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 18N
-<28478> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28478> +proj=tmerc +lat_0=0 +lon_0=105 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 19N
-<28479> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28479> +proj=tmerc +lat_0=0 +lon_0=111 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 20N
-<28480> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28480> +proj=tmerc +lat_0=0 +lon_0=117 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 21N
-<28481> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28481> +proj=tmerc +lat_0=0 +lon_0=123 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 22N
-<28482> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28482> +proj=tmerc +lat_0=0 +lon_0=129 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 23N
-<28483> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28483> +proj=tmerc +lat_0=0 +lon_0=135 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 24N
-<28484> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28484> +proj=tmerc +lat_0=0 +lon_0=141 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 25N
-<28485> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28485> +proj=tmerc +lat_0=0 +lon_0=147 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 26N
-<28486> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28486> +proj=tmerc +lat_0=0 +lon_0=153 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 27N
-<28487> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28487> +proj=tmerc +lat_0=0 +lon_0=159 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 28N
-<28488> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28488> +proj=tmerc +lat_0=0 +lon_0=165 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 29N
-<28489> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28489> +proj=tmerc +lat_0=0 +lon_0=171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 30N
-<28490> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28490> +proj=tmerc +lat_0=0 +lon_0=177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 31N
-<28491> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28491> +proj=tmerc +lat_0=0 +lon_0=-177 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1942 / Gauss-Kruger 32N
-<28492> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs  no_defs <>
+<28492> +proj=tmerc +lat_0=0 +lon_0=-171 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Qatar 1974 / Qatar National Grid
-<28600> +proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.999990 +x_0=200000 +y_0=300000 +ellps=intl +units=m +no_defs  no_defs <>
+<28600> +proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.999990 +x_0=200000 +y_0=300000 +ellps=intl +units=m +no_defs <>
 # Amersfoort / RD Old
-<28991> +proj=stere +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<28991> +proj=stere +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Amersfoort / RD New
-<28992> +proj=stere +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs  no_defs <>
+<28992> +proj=stere +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs <>
 # SAD69 / Brazil Polyconic
-<29100> +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29100> +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 18N
-<29118> +proj=utm +zone=18 +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29118> +proj=utm +zone=18 +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 19N
-<29119> +proj=utm +zone=19 +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29119> +proj=utm +zone=19 +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 20N
-<29120> +proj=utm +zone=20 +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29120> +proj=utm +zone=20 +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 21N
-<29121> +proj=utm +zone=21 +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29121> +proj=utm +zone=21 +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 22N
-<29122> +proj=utm +zone=22 +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29122> +proj=utm +zone=22 +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 17S
-<29177> +proj=utm +zone=17 +south +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29177> +proj=utm +zone=17 +south +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 18S
-<29178> +proj=utm +zone=18 +south +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29178> +proj=utm +zone=18 +south +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 19S
-<29179> +proj=utm +zone=19 +south +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29179> +proj=utm +zone=19 +south +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 20S
-<29180> +proj=utm +zone=20 +south +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29180> +proj=utm +zone=20 +south +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 21S
-<29181> +proj=utm +zone=21 +south +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29181> +proj=utm +zone=21 +south +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 22S
-<29182> +proj=utm +zone=22 +south +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29182> +proj=utm +zone=22 +south +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 23S
-<29183> +proj=utm +zone=23 +south +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29183> +proj=utm +zone=23 +south +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 24S
-<29184> +proj=utm +zone=24 +south +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29184> +proj=utm +zone=24 +south +ellps=GRS67 +units=m +no_defs <>
 # SAD69 / UTM zone 25S
-<29185> +proj=utm +zone=25 +south +ellps=GRS67 +units=m +no_defs  no_defs <>
+<29185> +proj=utm +zone=25 +south +ellps=GRS67 +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  no_defs <>
+<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
-<29221> +proj=utm +zone=21 +south +ellps=intl +towgs84=-355,21,72,0,0,0,0 +units=m +no_defs  no_defs <>
+<29221> +proj=utm +zone=21 +south +ellps=intl +towgs84=-355,21,72,0,0,0,0 +units=m +no_defs <>
 # Schwarzeck / UTM zone 33S
-<29333> +proj=utm +zone=33 +south +ellps=bess_nam +units=m +no_defs  no_defs <>
+<29333> +proj=utm +zone=33 +south +ellps=bess_nam +units=m +no_defs <>
 # South West African Coord. System zone 11
 # South West African Coord. System zone 13
 # South West African Coord. System zone 15
@@ -3760,2178 +3761,2178 @@
 # South West African Coord. System zone 23
 # South West African Coord. System zone 25
 # Sudan / UTM zone 35N
-<29635> +proj=utm +zone=35 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<29635> +proj=utm +zone=35 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # Sudan / UTM zone 36N
-<29636> +proj=utm +zone=36 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<29636> +proj=utm +zone=36 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # Tananarive (Paris) / Laborde Grid
-<29700> +proj=omerc +lat_0=-18.9 +lonc=46.43722917000001 +alpha=18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +units=m +no_defs  no_defs <>
+<29700> +proj=omerc +lat_0=-18.9 +lonc=46.43722917000001 +alpha=18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +units=m +no_defs <>
 # Tananarive / UTM zone 38S
-<29738> +proj=utm +zone=38 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs  no_defs <>
+<29738> +proj=utm +zone=38 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs <>
 # Tananarive / UTM zone 39S
-<29739> +proj=utm +zone=39 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs  no_defs <>
+<29739> +proj=utm +zone=39 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs <>
 # Timbalai 1948 / UTM zone 49N
-<29849> +proj=utm +zone=49 +ellps=evrstSS +units=m +no_defs  no_defs <>
+<29849> +proj=utm +zone=49 +ellps=evrstSS +units=m +no_defs <>
 # Timbalai 1948 / UTM zone 50N
-<29850> +proj=utm +zone=50 +ellps=evrstSS +units=m +no_defs  no_defs <>
+<29850> +proj=utm +zone=50 +ellps=evrstSS +units=m +no_defs <>
 # Timbalai 1948 / R.S.O. Borneo (ch)
-<29871> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8714630401 +y_0=442857.653094361 +ellps=evrstSS +to_meter=20.11676512155263 +no_defs  no_defs <>
+<29871> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8714630401 +y_0=442857.653094361 +ellps=evrstSS +to_meter=20.11676512155263 +no_defs <>
 # Timbalai 1948 / R.S.O. Borneo (ft)
-<29872> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8727431979 +y_0=442857.6545573985 +ellps=evrstSS +to_meter=0.3047994715386762 +no_defs  no_defs <>
+<29872> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8727431979 +y_0=442857.6545573985 +ellps=evrstSS +to_meter=0.3047994715386762 +no_defs <>
 # Timbalai 1948 / R.S.O. Borneo (m)
-<29873> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +ellps=evrstSS +units=m +no_defs  no_defs <>
+<29873> +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +ellps=evrstSS +units=m +no_defs <>
 # TM65 / Irish National Grid
-<29900> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs  no_defs <>
+<29900> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs <>
 # OSNI 1952 / Irish National Grid
-<29901> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000000 +x_0=200000 +y_0=250000 +ellps=airy +units=m +no_defs  no_defs <>
+<29901> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000000 +x_0=200000 +y_0=250000 +ellps=airy +units=m +no_defs <>
 # TM65 / Irish Grid
-<29902> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs  no_defs <>
+<29902> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs <>
 # TM75 / Irish Grid
-<29903> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs  no_defs <>
+<29903> +proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS I
-<30161> +proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30161> +proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS II
-<30162> +proj=tmerc +lat_0=33 +lon_0=131 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30162> +proj=tmerc +lat_0=33 +lon_0=131 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS III
-<30163> +proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30163> +proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS IV
-<30164> +proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30164> +proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS V
-<30165> +proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30165> +proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS VI
-<30166> +proj=tmerc +lat_0=36 +lon_0=136 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30166> +proj=tmerc +lat_0=36 +lon_0=136 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS VII
-<30167> +proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30167> +proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS VIII
-<30168> +proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30168> +proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS IX
-<30169> +proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30169> +proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS X
-<30170> +proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30170> +proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS XI
-<30171> +proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30171> +proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS XII
-<30172> +proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30172> +proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS XIII
-<30173> +proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30173> +proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS XIV
-<30174> +proj=tmerc +lat_0=26 +lon_0=142 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30174> +proj=tmerc +lat_0=26 +lon_0=142 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS XV
-<30175> +proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30175> +proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS XVI
-<30176> +proj=tmerc +lat_0=26 +lon_0=124 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30176> +proj=tmerc +lat_0=26 +lon_0=124 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS XVII
-<30177> +proj=tmerc +lat_0=26 +lon_0=131 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30177> +proj=tmerc +lat_0=26 +lon_0=131 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS XVIII
-<30178> +proj=tmerc +lat_0=20 +lon_0=136 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30178> +proj=tmerc +lat_0=20 +lon_0=136 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Tokyo / Japan Plane Rectangular CS XIX
-<30179> +proj=tmerc +lat_0=26 +lon_0=154 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30179> +proj=tmerc +lat_0=26 +lon_0=154 +k=0.999900 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Trinidad 1903 / Trinidad Grid
-<30200> +proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46380700001 +y_0=65379.0133425 +a=6378293.63683822 +b=6356617.979337744 +towgs84=-61.702,284.488,472.052,0,0,0,0 +to_meter=0.2011661949 +no_defs  no_defs <>
+<30200> +proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46380700001 +y_0=65379.0133425 +a=6378293.63683822 +b=6356617.979337744 +towgs84=-61.702,284.488,472.052,0,0,0,0 +to_meter=0.2011661949 +no_defs <>
 # TC(1948) / UTM zone 39N
-<30339> +proj=utm +zone=39 +ellps=helmert +units=m +no_defs  no_defs <>
+<30339> +proj=utm +zone=39 +ellps=helmert +units=m +no_defs <>
 # TC(1948) / UTM zone 40N
-<30340> +proj=utm +zone=40 +ellps=helmert +units=m +no_defs  no_defs <>
+<30340> +proj=utm +zone=40 +ellps=helmert +units=m +no_defs <>
 # Voirol 1875 / Nord Algerie (ancienne)
-<30491> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs  no_defs <>
+<30491> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs <>
 # Voirol 1875 / Sud Algerie (ancienne)
-<30492> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs  no_defs <>
+<30492> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs <>
 # Nord Sahara 1959 / UTM zone 29N
-<30729> +proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<30729> +proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs <>
 # Nord Sahara 1959 / UTM zone 30N
-<30730> +proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<30730> +proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs <>
 # Nord Sahara 1959 / UTM zone 31N
-<30731> +proj=utm +zone=31 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<30731> +proj=utm +zone=31 +ellps=clrk80 +units=m +no_defs <>
 # Nord Sahara 1959 / UTM zone 32N
-<30732> +proj=utm +zone=32 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<30732> +proj=utm +zone=32 +ellps=clrk80 +units=m +no_defs <>
 # Nord Sahara 1959 / Voirol Unifie Nord
-<30791> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<30791> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs <>
 # Nord Sahara 1959 / Voirol Unifie Sud
-<30792> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs  no_defs <>
+<30792> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs <>
 # RT38 2.5 gon W
-<30800> +proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<30800> +proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Yoff / UTM zone 28N
-<31028> +proj=utm +zone=28 +a=6378249.2 +b=6356515 +units=m +no_defs  no_defs <>
+<31028> +proj=utm +zone=28 +a=6378249.2 +b=6356515 +units=m +no_defs <>
 # Zanderij / UTM zone 21N
-<31121> +proj=utm +zone=21 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs  no_defs <>
+<31121> +proj=utm +zone=21 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs <>
 # Zanderij / TM 54 NW
-<31154> +proj=tmerc +lat_0=0 +lon_0=-54 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs  no_defs <>
+<31154> +proj=tmerc +lat_0=0 +lon_0=-54 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs <>
 # Zanderij / Suriname Old TM
-<31170> +proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs  no_defs <>
+<31170> +proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs <>
 # Zanderij / Suriname TM
-<31171> +proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.999900 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs  no_defs <>
+<31171> +proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.999900 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs <>
 # MGI / 3-degree Gauss zone 5
-<31265> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31265> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / 3-degree Gauss zone 6
-<31266> +proj=tmerc +lat_0=0 +lon_0=18 +k=1.000000 +x_0=6500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31266> +proj=tmerc +lat_0=0 +lon_0=18 +k=1.000000 +x_0=6500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / 3-degree Gauss zone 7
-<31267> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31267> +proj=tmerc +lat_0=0 +lon_0=21 +k=1.000000 +x_0=7500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / 3-degree Gauss zone 8
-<31268> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31268> +proj=tmerc +lat_0=0 +lon_0=24 +k=1.000000 +x_0=8500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / Balkans zone 5
-<31275> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999900 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31275> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999900 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / Balkans zone 6
-<31276> +proj=tmerc +lat_0=0 +lon_0=18 +k=0.999900 +x_0=6500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31276> +proj=tmerc +lat_0=0 +lon_0=18 +k=0.999900 +x_0=6500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / Balkans zone 7
-<31277> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.999900 +x_0=7500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31277> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.999900 +x_0=7500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / Balkans zone 8
-<31278> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.999900 +x_0=7500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31278> +proj=tmerc +lat_0=0 +lon_0=21 +k=0.999900 +x_0=7500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / Balkans zone 8
-<31279> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999900 +x_0=8500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31279> +proj=tmerc +lat_0=0 +lon_0=24 +k=0.999900 +x_0=8500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI (Ferro) / Austria West Zone
-<31281> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs  no_defs <>
+<31281> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs <>
 # MGI (Ferro) / Austria Central Zone
-<31282> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs  no_defs <>
+<31282> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs <>
 # MGI (Ferro) / Austria East Zone
-<31283> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs  no_defs <>
+<31283> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs <>
 # MGI / M28
-<31284> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1.000000 +x_0=150000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31284> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1.000000 +x_0=150000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / M31
-<31285> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1.000000 +x_0=450000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31285> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1.000000 +x_0=450000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / M34
-<31286> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1.000000 +x_0=750000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31286> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1.000000 +x_0=750000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / Austria Lambert
-<31287> +proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +units=m +no_defs  no_defs <>
+<31287> +proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +units=m +no_defs <>
 # MGI (Ferro) / Austria West Zone
-<31291> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs  no_defs <>
+<31291> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs <>
 # MGI (Ferro) / Austria Central Zone
-<31292> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs  no_defs <>
+<31292> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs <>
 # MGI (Ferro) / Austria East Zone
-<31293> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs  no_defs <>
+<31293> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1.000000 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs <>
 # MGI / M28
-<31294> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1.000000 +x_0=150000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31294> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1.000000 +x_0=150000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / M31
-<31295> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1.000000 +x_0=450000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31295> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1.000000 +x_0=450000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / M34
-<31296> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1.000000 +x_0=750000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31296> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1.000000 +x_0=750000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # MGI / Austria Lambert
-<31297> +proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +units=m +no_defs  no_defs <>
+<31297> +proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +units=m +no_defs <>
 # Belge 1972 / Belge Lambert 72
-<31300> +proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=4.356939722222222 +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl +units=m +no_defs  no_defs <>
+<31300> +proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=4.356939722222222 +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl +units=m +no_defs <>
 # Belge 1972 / Belgian Lambert 72
-<31370> +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 +units=m +no_defs  no_defs <>
+<31370> +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 +units=m +no_defs <>
 # DHDN / 3-degree Gauss zone 1
-<31461> +proj=tmerc +lat_0=0 +lon_0=3 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31461> +proj=tmerc +lat_0=0 +lon_0=3 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # DHDN / 3-degree Gauss zone 2
-<31462> +proj=tmerc +lat_0=0 +lon_0=6 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31462> +proj=tmerc +lat_0=0 +lon_0=6 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # DHDN / 3-degree Gauss zone 3
-<31463> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31463> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # DHDN / 3-degree Gauss zone 4
-<31464> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31464> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # DHDN / 3-degree Gauss zone 5
-<31465> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31465> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # DHDN / Gauss-Kruger zone 2
-<31466> +proj=tmerc +lat_0=0 +lon_0=6 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31466> +proj=tmerc +lat_0=0 +lon_0=6 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # DHDN / Gauss-Kruger zone 3
-<31467> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31467> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # DHDN / Gauss-Kruger zone 4
-<31468> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31468> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # DHDN / Gauss-Kruger zone 5
-<31469> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs  no_defs <>
+<31469> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Conakry 1905 / UTM zone 28N
-<31528> +proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs  no_defs <>
+<31528> +proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs <>
 # Conakry 1905 / UTM zone 29N
-<31529> +proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs  no_defs <>
+<31529> +proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs <>
 # Dealul Piscului 1933/ Stereo 33
-<31600> +proj=stere +lat_0=45.9 +lon_0=25.39246588888889 +k=0.999667 +x_0=500000 +y_0=500000 +ellps=intl +towgs84=103.25,-100.4,-307.19,0,0,0,0 +units=m +no_defs  no_defs <>
+<31600> +proj=stere +lat_0=45.9 +lon_0=25.39246588888889 +k=0.999667 +x_0=500000 +y_0=500000 +ellps=intl +towgs84=103.25,-100.4,-307.19,0,0,0,0 +units=m +no_defs <>
 # Dealul Piscului 1970/ Stereo 70
-<31700> +proj=stere +lat_0=46 +lon_0=25 +k=0.999750 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs  no_defs <>
+<31700> +proj=stere +lat_0=46 +lon_0=25 +k=0.999750 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs <>
 # NGN / UTM zone 38N
-<31838> +proj=utm +zone=38 +ellps=WGS84 +units=m +no_defs  no_defs <>
+<31838> +proj=utm +zone=38 +ellps=WGS84 +units=m +no_defs <>
 # NGN / UTM zone 39N
-<31839> +proj=utm +zone=39 +ellps=WGS84 +units=m +no_defs  no_defs <>
+<31839> +proj=utm +zone=39 +ellps=WGS84 +units=m +no_defs <>
 # KUDAMS / KTM
-<31900> +proj=tmerc +lat_0=0 +lon_0=48 +k=0.999600 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs  no_defs <>
+<31900> +proj=tmerc +lat_0=0 +lon_0=48 +k=0.999600 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # SIRGAS / UTM zone 17N
-<31986> +proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31986> +proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 18N
-<31987> +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31987> +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 19N
-<31988> +proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31988> +proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 20N
-<31989> +proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31989> +proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 21N
-<31990> +proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31990> +proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 22N
-<31991> +proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31991> +proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 17S
-<31992> +proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31992> +proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 18S
-<31993> +proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31993> +proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 19S
-<31994> +proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31994> +proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 20S
-<31995> +proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31995> +proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 21S
-<31996> +proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31996> +proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 22S
-<31997> +proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31997> +proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 23S
-<31998> +proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31998> +proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 24S
-<31999> +proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<31999> +proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # SIRGAS / UTM zone 25S
-<32000> +proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  no_defs <>
+<32000> +proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
 # NAD27 / Montana North
-<32001> +proj=lcc +lat_1=48.71666666666667 +lat_2=47.85 +lat_0=47 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32001> +proj=lcc +lat_1=48.71666666666667 +lat_2=47.85 +lat_0=47 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Montana Central
-<32002> +proj=lcc +lat_1=47.88333333333333 +lat_2=46.45 +lat_0=45.83333333333334 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32002> +proj=lcc +lat_1=47.88333333333333 +lat_2=46.45 +lat_0=45.83333333333334 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Montana South
-<32003> +proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32003> +proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Nebraska North
-<32005> +proj=lcc +lat_1=41.85 +lat_2=42.81666666666667 +lat_0=41.33333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32005> +proj=lcc +lat_1=41.85 +lat_2=42.81666666666667 +lat_0=41.33333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Nebraska South
-<32006> +proj=lcc +lat_1=40.28333333333333 +lat_2=41.71666666666667 +lat_0=39.66666666666666 +lon_0=-99.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32006> +proj=lcc +lat_1=40.28333333333333 +lat_2=41.71666666666667 +lat_0=39.66666666666666 +lon_0=-99.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Nevada East
-<32007> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32007> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Nevada Central
-<32008> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32008> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Nevada West
-<32009> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32009> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / New Hampshire
-<32010> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32010> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / New Jersey
-<32011> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.66666666666667 +k=0.999975 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32011> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.66666666666667 +k=0.999975 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / New Mexico East
-<32012> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32012> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / New Mexico Central
-<32013> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32013> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / New Mexico West
-<32014> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32014> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / New York East
-<32015> +proj=tmerc +lat_0=40 +lon_0=-74.33333333333333 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32015> +proj=tmerc +lat_0=40 +lon_0=-74.33333333333333 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / New York Central
-<32016> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32016> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / New York West
-<32017> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32017> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / New York Long Island
-<32018> +proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.5 +lon_0=-74 +x_0=304800.6096012192 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32018> +proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.5 +lon_0=-74 +x_0=304800.6096012192 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / North Carolina
-<32019> +proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32019> +proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / North Dakota North
-<32020> +proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32020> +proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / North Dakota South
-<32021> +proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32021> +proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Ohio North
-<32022> +proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32022> +proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Ohio South
-<32023> +proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32023> +proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Oklahoma North
-<32024> +proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32024> +proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Oklahoma South
-<32025> +proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32025> +proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Oregon North
-<32026> +proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32026> +proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Oregon South
-<32027> +proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32027> +proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Pennsylvania North
-<32028> +proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32028> +proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Pennsylvania South
-<32029> +proj=lcc +lat_1=39.93333333333333 +lat_2=40.8 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32029> +proj=lcc +lat_1=39.93333333333333 +lat_2=40.8 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Rhode Island
-<32030> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32030> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / South Carolina North
-<32031> +proj=lcc +lat_1=33.76666666666667 +lat_2=34.96666666666667 +lat_0=33 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32031> +proj=lcc +lat_1=33.76666666666667 +lat_2=34.96666666666667 +lat_0=33 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / South Carolina South
-<32033> +proj=lcc +lat_1=32.33333333333334 +lat_2=33.66666666666666 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32033> +proj=lcc +lat_1=32.33333333333334 +lat_2=33.66666666666666 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / South Dakota North
-<32034> +proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32034> +proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / South Dakota South
-<32035> +proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32035> +proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Tennessee
-<32036> +proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=30480.06096012192 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32036> +proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=30480.06096012192 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Texas North
-<32037> +proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32037> +proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Texas North Central
-<32038> +proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-97.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32038> +proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-97.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Texas Central
-<32039> +proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32039> +proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Texas South Central
-<32040> +proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32040> +proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Texas South
-<32041> +proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32041> +proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Utah North
-<32042> +proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32042> +proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Utah Central
-<32043> +proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32043> +proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Utah South
-<32044> +proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32044> +proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Vermont
-<32045> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32045> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Virginia North
-<32046> +proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32046> +proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Virginia South
-<32047> +proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32047> +proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Washington North
-<32048> +proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32048> +proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Washington South
-<32049> +proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32049> +proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / West Virginia North
-<32050> +proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32050> +proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / West Virginia South
-<32051> +proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32051> +proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Wisconsin North
-<32052> +proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32052> +proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Wisconsin Central
-<32053> +proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32053> +proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Wisconsin South
-<32054> +proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32054> +proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Wyoming East
-<32055> +proj=tmerc +lat_0=40.66666666666666 +lon_0=-105.1666666666667 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32055> +proj=tmerc +lat_0=40.66666666666666 +lon_0=-105.1666666666667 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Wyoming East Central
-<32056> +proj=tmerc +lat_0=40.66666666666666 +lon_0=-107.3333333333333 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32056> +proj=tmerc +lat_0=40.66666666666666 +lon_0=-107.3333333333333 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Wyoming West Central
-<32057> +proj=tmerc +lat_0=40.66666666666666 +lon_0=-108.75 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32057> +proj=tmerc +lat_0=40.66666666666666 +lon_0=-108.75 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Wyoming West
-<32058> +proj=tmerc +lat_0=40.66666666666666 +lon_0=-110.0833333333333 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32058> +proj=tmerc +lat_0=40.66666666666666 +lon_0=-110.0833333333333 +k=0.999941 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / Guatemala Norte
-<32061> +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 +datum=NAD27 +units=m +no_defs  no_defs <>
+<32061> +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 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / Guatemala Sur
-<32062> +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 +datum=NAD27 +units=m +no_defs  no_defs <>
+<32062> +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 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / BLM 14N (ftUS)
-<32064> +proj=tmerc +lat_0=0 +lon_0=-99 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32064> +proj=tmerc +lat_0=0 +lon_0=-99 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / BLM 15N (ftUS)
-<32065> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32065> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / BLM 16N (ftUS)
-<32066> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32066> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / BLM 17N (ftUS)
-<32067> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32067> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / BLM 14N (feet)
-<32074> +proj=tmerc +lat_0=0 +lon_0=-99 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32074> +proj=tmerc +lat_0=0 +lon_0=-99 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / BLM 15N (feet)
-<32075> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32075> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / BLM 16N (feet)
-<32076> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32076> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / BLM 17N (feet)
-<32077> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs  no_defs <>
+<32077> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.999600 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD27 / MTM zone 1
-<32081> +proj=tmerc +lat_0=0 +lon_0=-53 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<32081> +proj=tmerc +lat_0=0 +lon_0=-53 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / MTM zone 2
-<32082> +proj=tmerc +lat_0=0 +lon_0=-56 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<32082> +proj=tmerc +lat_0=0 +lon_0=-56 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / MTM zone 3
-<32083> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<32083> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / MTM zone 4
-<32084> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<32084> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / MTM zone 5
-<32085> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<32085> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / MTM zone 6
-<32086> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<32086> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD27 / Quebec Lambert
-<32098> +proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs  no_defs <>
+<32098> +proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD83 / Montana
-<32100> +proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32100> +proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Nebraska
-<32104> +proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32104> +proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Nevada East
-<32107> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=200000 +y_0=8000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32107> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=200000 +y_0=8000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Nevada Central
-<32108> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=500000 +y_0=6000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32108> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=500000 +y_0=6000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Nevada West
-<32109> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=800000 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32109> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=800000 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / New Hampshire
-<32110> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32110> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / New Jersey
-<32111> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32111> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / New Mexico East
-<32112> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32112> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / New Mexico Central
-<32113> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32113> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / New Mexico West
-<32114> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32114> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / New York East
-<32115> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32115> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / New York Central
-<32116> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32116> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / New York West
-<32117> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32117> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / New York Long Island
-<32118> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32118> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / North Carolina
-<32119> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32119> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / North Dakota North
-<32120> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32120> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / North Dakota South
-<32121> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32121> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Ohio North
-<32122> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32122> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Ohio South
-<32123> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32123> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Oklahoma North
-<32124> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32124> +proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Oklahoma South
-<32125> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32125> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Oregon North
-<32126> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32126> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Oregon South
-<32127> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32127> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Pennsylvania North
-<32128> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32128> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Pennsylvania South
-<32129> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32129> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Rhode Island
-<32130> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=100000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32130> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=100000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / South Carolina
-<32133> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32133> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / South Dakota North
-<32134> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32134> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / South Dakota South
-<32135> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32135> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Tennessee
-<32136> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32136> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Texas North
-<32137> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32137> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Texas North Central
-<32138> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32138> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Texas Central
-<32139> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32139> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Texas South Central
-<32140> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32140> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Texas South
-<32141> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32141> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Utah North
-<32142> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32142> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Utah Central
-<32143> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32143> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Utah South
-<32144> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32144> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Vermont
-<32145> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32145> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Virginia North
-<32146> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32146> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Virginia South
-<32147> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32147> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Washington North
-<32148> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32148> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Washington South
-<32149> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32149> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / West Virginia North
-<32150> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32150> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / West Virginia South
-<32151> +proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32151> +proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Wisconsin North
-<32152> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32152> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Wisconsin Central
-<32153> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32153> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Wisconsin South
-<32154> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32154> +proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Wyoming East
-<32155> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.999938 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32155> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.999938 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Wyoming East Central
-<32156> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.999938 +x_0=400000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32156> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.999938 +x_0=400000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Wyoming West Central
-<32157> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.999938 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32157> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.999938 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Wyoming West
-<32158> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.999938 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32158> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.999938 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Puerto Rico & Virgin Is.
-<32161> +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 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32161> +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 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / SCoPQ zone 2
-<32180> +proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32180> +proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 1
-<32181> +proj=tmerc +lat_0=0 +lon_0=-53 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32181> +proj=tmerc +lat_0=0 +lon_0=-53 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 2
-<32182> +proj=tmerc +lat_0=0 +lon_0=-56 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32182> +proj=tmerc +lat_0=0 +lon_0=-56 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 3
-<32183> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32183> +proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 4
-<32184> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32184> +proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 5
-<32185> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32185> +proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 6
-<32186> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32186> +proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 7
-<32187> +proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32187> +proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 8
-<32188> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32188> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 9
-<32189> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32189> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 10
-<32190> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32190> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 11
-<32191> +proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32191> +proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 12
-<32192> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32192> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 13
-<32193> +proj=tmerc +lat_0=0 +lon_0=-84 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32193> +proj=tmerc +lat_0=0 +lon_0=-84 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 14
-<32194> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32194> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 15
-<32195> +proj=tmerc +lat_0=0 +lon_0=-90 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32195> +proj=tmerc +lat_0=0 +lon_0=-90 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 16
-<32196> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32196> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / MTM zone 17
-<32197> +proj=tmerc +lat_0=0 +lon_0=-96 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32197> +proj=tmerc +lat_0=0 +lon_0=-96 +k=0.999900 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NAD83 / Quebec Lambert
-<32198> +proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <>
+<32198> +proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # WGS 72 / UTM zone 1N
-<32201> +proj=utm +zone=1 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32201> +proj=utm +zone=1 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 2N
-<32202> +proj=utm +zone=2 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32202> +proj=utm +zone=2 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 3N
-<32203> +proj=utm +zone=3 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32203> +proj=utm +zone=3 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 4N
-<32204> +proj=utm +zone=4 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32204> +proj=utm +zone=4 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 5N
-<32205> +proj=utm +zone=5 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32205> +proj=utm +zone=5 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 6N
-<32206> +proj=utm +zone=6 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32206> +proj=utm +zone=6 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 7N
-<32207> +proj=utm +zone=7 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32207> +proj=utm +zone=7 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 8N
-<32208> +proj=utm +zone=8 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32208> +proj=utm +zone=8 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 9N
-<32209> +proj=utm +zone=9 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32209> +proj=utm +zone=9 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 10N
-<32210> +proj=utm +zone=10 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32210> +proj=utm +zone=10 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 11N
-<32211> +proj=utm +zone=11 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32211> +proj=utm +zone=11 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 12N
-<32212> +proj=utm +zone=12 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32212> +proj=utm +zone=12 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 13N
-<32213> +proj=utm +zone=13 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32213> +proj=utm +zone=13 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 14N
-<32214> +proj=utm +zone=14 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32214> +proj=utm +zone=14 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 15N
-<32215> +proj=utm +zone=15 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32215> +proj=utm +zone=15 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 16N
-<32216> +proj=utm +zone=16 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32216> +proj=utm +zone=16 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 17N
-<32217> +proj=utm +zone=17 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32217> +proj=utm +zone=17 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 18N
-<32218> +proj=utm +zone=18 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32218> +proj=utm +zone=18 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 19N
-<32219> +proj=utm +zone=19 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32219> +proj=utm +zone=19 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 20N
-<32220> +proj=utm +zone=20 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32220> +proj=utm +zone=20 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 21N
-<32221> +proj=utm +zone=21 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32221> +proj=utm +zone=21 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 22N
-<32222> +proj=utm +zone=22 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32222> +proj=utm +zone=22 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 23N
-<32223> +proj=utm +zone=23 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32223> +proj=utm +zone=23 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 24N
-<32224> +proj=utm +zone=24 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32224> +proj=utm +zone=24 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 25N
-<32225> +proj=utm +zone=25 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32225> +proj=utm +zone=25 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 26N
-<32226> +proj=utm +zone=26 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32226> +proj=utm +zone=26 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 27N
-<32227> +proj=utm +zone=27 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32227> +proj=utm +zone=27 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 28N
-<32228> +proj=utm +zone=28 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32228> +proj=utm +zone=28 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 29N
-<32229> +proj=utm +zone=29 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32229> +proj=utm +zone=29 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 30N
-<32230> +proj=utm +zone=30 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32230> +proj=utm +zone=30 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 31N
-<32231> +proj=utm +zone=31 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32231> +proj=utm +zone=31 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 32N
-<32232> +proj=utm +zone=32 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32232> +proj=utm +zone=32 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 33N
-<32233> +proj=utm +zone=33 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32233> +proj=utm +zone=33 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 34N
-<32234> +proj=utm +zone=34 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32234> +proj=utm +zone=34 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 35N
-<32235> +proj=utm +zone=35 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32235> +proj=utm +zone=35 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 36N
-<32236> +proj=utm +zone=36 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32236> +proj=utm +zone=36 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 37N
-<32237> +proj=utm +zone=37 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32237> +proj=utm +zone=37 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 38N
-<32238> +proj=utm +zone=38 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32238> +proj=utm +zone=38 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 39N
-<32239> +proj=utm +zone=39 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32239> +proj=utm +zone=39 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 40N
-<32240> +proj=utm +zone=40 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32240> +proj=utm +zone=40 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 41N
-<32241> +proj=utm +zone=41 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32241> +proj=utm +zone=41 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 42N
-<32242> +proj=utm +zone=42 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32242> +proj=utm +zone=42 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 43N
-<32243> +proj=utm +zone=43 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32243> +proj=utm +zone=43 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 44N
-<32244> +proj=utm +zone=44 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32244> +proj=utm +zone=44 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 45N
-<32245> +proj=utm +zone=45 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32245> +proj=utm +zone=45 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 46N
-<32246> +proj=utm +zone=46 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32246> +proj=utm +zone=46 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 47N
-<32247> +proj=utm +zone=47 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32247> +proj=utm +zone=47 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 48N
-<32248> +proj=utm +zone=48 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32248> +proj=utm +zone=48 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 49N
-<32249> +proj=utm +zone=49 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32249> +proj=utm +zone=49 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 50N
-<32250> +proj=utm +zone=50 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32250> +proj=utm +zone=50 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 51N
-<32251> +proj=utm +zone=51 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32251> +proj=utm +zone=51 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 52N
-<32252> +proj=utm +zone=52 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32252> +proj=utm +zone=52 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 53N
-<32253> +proj=utm +zone=53 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32253> +proj=utm +zone=53 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 54N
-<32254> +proj=utm +zone=54 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32254> +proj=utm +zone=54 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 55N
-<32255> +proj=utm +zone=55 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32255> +proj=utm +zone=55 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 56N
-<32256> +proj=utm +zone=56 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32256> +proj=utm +zone=56 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 57N
-<32257> +proj=utm +zone=57 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32257> +proj=utm +zone=57 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 58N
-<32258> +proj=utm +zone=58 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32258> +proj=utm +zone=58 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 59N
-<32259> +proj=utm +zone=59 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32259> +proj=utm +zone=59 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 60N
-<32260> +proj=utm +zone=60 +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32260> +proj=utm +zone=60 +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 1S
-<32301> +proj=utm +zone=1 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32301> +proj=utm +zone=1 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 2S
-<32302> +proj=utm +zone=2 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32302> +proj=utm +zone=2 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 3S
-<32303> +proj=utm +zone=3 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32303> +proj=utm +zone=3 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 4S
-<32304> +proj=utm +zone=4 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32304> +proj=utm +zone=4 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 5S
-<32305> +proj=utm +zone=5 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32305> +proj=utm +zone=5 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 6S
-<32306> +proj=utm +zone=6 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32306> +proj=utm +zone=6 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 7S
-<32307> +proj=utm +zone=7 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32307> +proj=utm +zone=7 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 8S
-<32308> +proj=utm +zone=8 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32308> +proj=utm +zone=8 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 9S
-<32309> +proj=utm +zone=9 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32309> +proj=utm +zone=9 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 10S
-<32310> +proj=utm +zone=10 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32310> +proj=utm +zone=10 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 11S
-<32311> +proj=utm +zone=11 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32311> +proj=utm +zone=11 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 12S
-<32312> +proj=utm +zone=12 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32312> +proj=utm +zone=12 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 13S
-<32313> +proj=utm +zone=13 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32313> +proj=utm +zone=13 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 14S
-<32314> +proj=utm +zone=14 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32314> +proj=utm +zone=14 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 15S
-<32315> +proj=utm +zone=15 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32315> +proj=utm +zone=15 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 16S
-<32316> +proj=utm +zone=16 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32316> +proj=utm +zone=16 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 17S
-<32317> +proj=utm +zone=17 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32317> +proj=utm +zone=17 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 18S
-<32318> +proj=utm +zone=18 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32318> +proj=utm +zone=18 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 19S
-<32319> +proj=utm +zone=19 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32319> +proj=utm +zone=19 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 20S
-<32320> +proj=utm +zone=20 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32320> +proj=utm +zone=20 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 21S
-<32321> +proj=utm +zone=21 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32321> +proj=utm +zone=21 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 22S
-<32322> +proj=utm +zone=22 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32322> +proj=utm +zone=22 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 23S
-<32323> +proj=utm +zone=23 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32323> +proj=utm +zone=23 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 24S
-<32324> +proj=utm +zone=24 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32324> +proj=utm +zone=24 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 25S
-<32325> +proj=utm +zone=25 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32325> +proj=utm +zone=25 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 26S
-<32326> +proj=utm +zone=26 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32326> +proj=utm +zone=26 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 27S
-<32327> +proj=utm +zone=27 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32327> +proj=utm +zone=27 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 28S
-<32328> +proj=utm +zone=28 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32328> +proj=utm +zone=28 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 29S
-<32329> +proj=utm +zone=29 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32329> +proj=utm +zone=29 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 30S
-<32330> +proj=utm +zone=30 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32330> +proj=utm +zone=30 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 31S
-<32331> +proj=utm +zone=31 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32331> +proj=utm +zone=31 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 32S
-<32332> +proj=utm +zone=32 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32332> +proj=utm +zone=32 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 33S
-<32333> +proj=utm +zone=33 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32333> +proj=utm +zone=33 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 34S
-<32334> +proj=utm +zone=34 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32334> +proj=utm +zone=34 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 35S
-<32335> +proj=utm +zone=35 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32335> +proj=utm +zone=35 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 36S
-<32336> +proj=utm +zone=36 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32336> +proj=utm +zone=36 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 37S
-<32337> +proj=utm +zone=37 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32337> +proj=utm +zone=37 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 38S
-<32338> +proj=utm +zone=38 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32338> +proj=utm +zone=38 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 39S
-<32339> +proj=utm +zone=39 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32339> +proj=utm +zone=39 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 40S
-<32340> +proj=utm +zone=40 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32340> +proj=utm +zone=40 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 41S
-<32341> +proj=utm +zone=41 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32341> +proj=utm +zone=41 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 42S
-<32342> +proj=utm +zone=42 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32342> +proj=utm +zone=42 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 43S
-<32343> +proj=utm +zone=43 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32343> +proj=utm +zone=43 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 44S
-<32344> +proj=utm +zone=44 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32344> +proj=utm +zone=44 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 45S
-<32345> +proj=utm +zone=45 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32345> +proj=utm +zone=45 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 46S
-<32346> +proj=utm +zone=46 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32346> +proj=utm +zone=46 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 47S
-<32347> +proj=utm +zone=47 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32347> +proj=utm +zone=47 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 48S
-<32348> +proj=utm +zone=48 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32348> +proj=utm +zone=48 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 49S
-<32349> +proj=utm +zone=49 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32349> +proj=utm +zone=49 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 50S
-<32350> +proj=utm +zone=50 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32350> +proj=utm +zone=50 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 51S
-<32351> +proj=utm +zone=51 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32351> +proj=utm +zone=51 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 52S
-<32352> +proj=utm +zone=52 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32352> +proj=utm +zone=52 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 53S
-<32353> +proj=utm +zone=53 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32353> +proj=utm +zone=53 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 54S
-<32354> +proj=utm +zone=54 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32354> +proj=utm +zone=54 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 55S
-<32355> +proj=utm +zone=55 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32355> +proj=utm +zone=55 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 56S
-<32356> +proj=utm +zone=56 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32356> +proj=utm +zone=56 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 57S
-<32357> +proj=utm +zone=57 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32357> +proj=utm +zone=57 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 58S
-<32358> +proj=utm +zone=58 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32358> +proj=utm +zone=58 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 59S
-<32359> +proj=utm +zone=59 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32359> +proj=utm +zone=59 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72 / UTM zone 60S
-<32360> +proj=utm +zone=60 +south +ellps=WGS72 +units=m +no_defs  no_defs <>
+<32360> +proj=utm +zone=60 +south +ellps=WGS72 +units=m +no_defs <>
 # WGS 72BE / UTM zone 1N
-<32401> +proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32401> +proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 2N
-<32402> +proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32402> +proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 3N
-<32403> +proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32403> +proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 4N
-<32404> +proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32404> +proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 5N
-<32405> +proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32405> +proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 6N
-<32406> +proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32406> +proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 7N
-<32407> +proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32407> +proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 8N
-<32408> +proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32408> +proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 9N
-<32409> +proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32409> +proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 10N
-<32410> +proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32410> +proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 11N
-<32411> +proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32411> +proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 12N
-<32412> +proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32412> +proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 13N
-<32413> +proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32413> +proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 14N
-<32414> +proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32414> +proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 15N
-<32415> +proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32415> +proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 16N
-<32416> +proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32416> +proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 17N
-<32417> +proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32417> +proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 18N
-<32418> +proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32418> +proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 19N
-<32419> +proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32419> +proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 20N
-<32420> +proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32420> +proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 21N
-<32421> +proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32421> +proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 22N
-<32422> +proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32422> +proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 23N
-<32423> +proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32423> +proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 24N
-<32424> +proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32424> +proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 25N
-<32425> +proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32425> +proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 26N
-<32426> +proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32426> +proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 27N
-<32427> +proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32427> +proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 28N
-<32428> +proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32428> +proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 29N
-<32429> +proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32429> +proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 30N
-<32430> +proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32430> +proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 31N
-<32431> +proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32431> +proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 32N
-<32432> +proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32432> +proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 33N
-<32433> +proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32433> +proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 34N
-<32434> +proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32434> +proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 35N
-<32435> +proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32435> +proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 36N
-<32436> +proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32436> +proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 37N
-<32437> +proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32437> +proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 38N
-<32438> +proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32438> +proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 39N
-<32439> +proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32439> +proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 40N
-<32440> +proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32440> +proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 41N
-<32441> +proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32441> +proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 42N
-<32442> +proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32442> +proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 43N
-<32443> +proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32443> +proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 44N
-<32444> +proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32444> +proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 45N
-<32445> +proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32445> +proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 46N
-<32446> +proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32446> +proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 47N
-<32447> +proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32447> +proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 48N
-<32448> +proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32448> +proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 49N
-<32449> +proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32449> +proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 50N
-<32450> +proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32450> +proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 51N
-<32451> +proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32451> +proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 52N
-<32452> +proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32452> +proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 53N
-<32453> +proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32453> +proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 54N
-<32454> +proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32454> +proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 55N
-<32455> +proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32455> +proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 56N
-<32456> +proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32456> +proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 57N
-<32457> +proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32457> +proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 58N
-<32458> +proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32458> +proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 59N
-<32459> +proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32459> +proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 60N
-<32460> +proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32460> +proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 1S
-<32501> +proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32501> +proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 2S
-<32502> +proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32502> +proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 3S
-<32503> +proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32503> +proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 4S
-<32504> +proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32504> +proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 5S
-<32505> +proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32505> +proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 6S
-<32506> +proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32506> +proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 7S
-<32507> +proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32507> +proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 8S
-<32508> +proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32508> +proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 9S
-<32509> +proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32509> +proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 10S
-<32510> +proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32510> +proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 11S
-<32511> +proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32511> +proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 12S
-<32512> +proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32512> +proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 13S
-<32513> +proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32513> +proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 14S
-<32514> +proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32514> +proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 15S
-<32515> +proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32515> +proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 16S
-<32516> +proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32516> +proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 17S
-<32517> +proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32517> +proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 18S
-<32518> +proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32518> +proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 19S
-<32519> +proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32519> +proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 20S
-<32520> +proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32520> +proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 21S
-<32521> +proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32521> +proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 22S
-<32522> +proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32522> +proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 23S
-<32523> +proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32523> +proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 24S
-<32524> +proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32524> +proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 25S
-<32525> +proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32525> +proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 26S
-<32526> +proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32526> +proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 27S
-<32527> +proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32527> +proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 28S
-<32528> +proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32528> +proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 29S
-<32529> +proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32529> +proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 30S
-<32530> +proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32530> +proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 31S
-<32531> +proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32531> +proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 32S
-<32532> +proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32532> +proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 33S
-<32533> +proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32533> +proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 34S
-<32534> +proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32534> +proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 35S
-<32535> +proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32535> +proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 36S
-<32536> +proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32536> +proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 37S
-<32537> +proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32537> +proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 38S
-<32538> +proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32538> +proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 39S
-<32539> +proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32539> +proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 40S
-<32540> +proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32540> +proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 41S
-<32541> +proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32541> +proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 42S
-<32542> +proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32542> +proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 43S
-<32543> +proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32543> +proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 44S
-<32544> +proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32544> +proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 45S
-<32545> +proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32545> +proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 46S
-<32546> +proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32546> +proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 47S
-<32547> +proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32547> +proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 48S
-<32548> +proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32548> +proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 49S
-<32549> +proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32549> +proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 50S
-<32550> +proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32550> +proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 51S
-<32551> +proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32551> +proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 52S
-<32552> +proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32552> +proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 53S
-<32553> +proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32553> +proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 54S
-<32554> +proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32554> +proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 55S
-<32555> +proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32555> +proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 56S
-<32556> +proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32556> +proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 57S
-<32557> +proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32557> +proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 58S
-<32558> +proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32558> +proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 59S
-<32559> +proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32559> +proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 72BE / UTM zone 60S
-<32560> +proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs  no_defs <>
+<32560> +proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs <>
 # WGS 84 / UTM zone 1N
-<32601> +proj=utm +zone=1 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32601> +proj=utm +zone=1 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 2N
-<32602> +proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32602> +proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 3N
-<32603> +proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32603> +proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 4N
-<32604> +proj=utm +zone=4 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32604> +proj=utm +zone=4 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 5N
-<32605> +proj=utm +zone=5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32605> +proj=utm +zone=5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 6N
-<32606> +proj=utm +zone=6 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32606> +proj=utm +zone=6 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 7N
-<32607> +proj=utm +zone=7 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32607> +proj=utm +zone=7 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 8N
-<32608> +proj=utm +zone=8 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32608> +proj=utm +zone=8 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 9N
-<32609> +proj=utm +zone=9 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32609> +proj=utm +zone=9 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 10N
-<32610> +proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32610> +proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 11N
-<32611> +proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32611> +proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 12N
-<32612> +proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32612> +proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 13N
-<32613> +proj=utm +zone=13 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32613> +proj=utm +zone=13 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 14N
-<32614> +proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32614> +proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 15N
-<32615> +proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32615> +proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 16N
-<32616> +proj=utm +zone=16 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32616> +proj=utm +zone=16 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 17N
-<32617> +proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32617> +proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 18N
-<32618> +proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32618> +proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 19N
-<32619> +proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32619> +proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 20N
-<32620> +proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32620> +proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 21N
-<32621> +proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32621> +proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 22N
-<32622> +proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32622> +proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 23N
-<32623> +proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32623> +proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 24N
-<32624> +proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32624> +proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 25N
-<32625> +proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32625> +proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 26N
-<32626> +proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32626> +proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 27N
-<32627> +proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32627> +proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 28N
-<32628> +proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32628> +proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 29N
-<32629> +proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32629> +proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 30N
-<32630> +proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32630> +proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 31N
-<32631> +proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32631> +proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 32N
-<32632> +proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32632> +proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 33N
-<32633> +proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32633> +proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 34N
-<32634> +proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32634> +proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 35N
-<32635> +proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32635> +proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 36N
-<32636> +proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32636> +proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 37N
-<32637> +proj=utm +zone=37 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32637> +proj=utm +zone=37 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 38N
-<32638> +proj=utm +zone=38 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32638> +proj=utm +zone=38 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 39N
-<32639> +proj=utm +zone=39 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32639> +proj=utm +zone=39 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 40N
-<32640> +proj=utm +zone=40 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32640> +proj=utm +zone=40 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 41N
-<32641> +proj=utm +zone=41 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32641> +proj=utm +zone=41 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 42N
-<32642> +proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32642> +proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 43N
-<32643> +proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32643> +proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 44N
-<32644> +proj=utm +zone=44 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32644> +proj=utm +zone=44 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 45N
-<32645> +proj=utm +zone=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32645> +proj=utm +zone=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 46N
-<32646> +proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32646> +proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 47N
-<32647> +proj=utm +zone=47 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32647> +proj=utm +zone=47 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 48N
-<32648> +proj=utm +zone=48 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32648> +proj=utm +zone=48 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 49N
-<32649> +proj=utm +zone=49 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32649> +proj=utm +zone=49 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 50N
-<32650> +proj=utm +zone=50 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32650> +proj=utm +zone=50 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 51N
-<32651> +proj=utm +zone=51 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32651> +proj=utm +zone=51 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 52N
-<32652> +proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32652> +proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 53N
-<32653> +proj=utm +zone=53 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32653> +proj=utm +zone=53 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 54N
-<32654> +proj=utm +zone=54 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32654> +proj=utm +zone=54 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 55N
-<32655> +proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32655> +proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 56N
-<32656> +proj=utm +zone=56 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32656> +proj=utm +zone=56 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 57N
-<32657> +proj=utm +zone=57 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32657> +proj=utm +zone=57 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 58N
-<32658> +proj=utm +zone=58 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32658> +proj=utm +zone=58 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 59N
-<32659> +proj=utm +zone=59 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32659> +proj=utm +zone=59 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 60N
-<32660> +proj=utm +zone=60 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32660> +proj=utm +zone=60 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UPS North
-<32661> +proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32661> +proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 1S
-<32701> +proj=utm +zone=1 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32701> +proj=utm +zone=1 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 2S
-<32702> +proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32702> +proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 3S
-<32703> +proj=utm +zone=3 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32703> +proj=utm +zone=3 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 4S
-<32704> +proj=utm +zone=4 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32704> +proj=utm +zone=4 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 5S
-<32705> +proj=utm +zone=5 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32705> +proj=utm +zone=5 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 6S
-<32706> +proj=utm +zone=6 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32706> +proj=utm +zone=6 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 7S
-<32707> +proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32707> +proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 8S
-<32708> +proj=utm +zone=8 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32708> +proj=utm +zone=8 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 9S
-<32709> +proj=utm +zone=9 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32709> +proj=utm +zone=9 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 10S
-<32710> +proj=utm +zone=10 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32710> +proj=utm +zone=10 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 11S
-<32711> +proj=utm +zone=11 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32711> +proj=utm +zone=11 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 12S
-<32712> +proj=utm +zone=12 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32712> +proj=utm +zone=12 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 13S
-<32713> +proj=utm +zone=13 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32713> +proj=utm +zone=13 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 14S
-<32714> +proj=utm +zone=14 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32714> +proj=utm +zone=14 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 15S
-<32715> +proj=utm +zone=15 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32715> +proj=utm +zone=15 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 16S
-<32716> +proj=utm +zone=16 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32716> +proj=utm +zone=16 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 17S
-<32717> +proj=utm +zone=17 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32717> +proj=utm +zone=17 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 18S
-<32718> +proj=utm +zone=18 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32718> +proj=utm +zone=18 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 19S
-<32719> +proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32719> +proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 20S
-<32720> +proj=utm +zone=20 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32720> +proj=utm +zone=20 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 21S
-<32721> +proj=utm +zone=21 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32721> +proj=utm +zone=21 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 22S
-<32722> +proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32722> +proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 23S
-<32723> +proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32723> +proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 24S
-<32724> +proj=utm +zone=24 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32724> +proj=utm +zone=24 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 25S
-<32725> +proj=utm +zone=25 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32725> +proj=utm +zone=25 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 26S
-<32726> +proj=utm +zone=26 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32726> +proj=utm +zone=26 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 27S
-<32727> +proj=utm +zone=27 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32727> +proj=utm +zone=27 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 28S
-<32728> +proj=utm +zone=28 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32728> +proj=utm +zone=28 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 29S
-<32729> +proj=utm +zone=29 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32729> +proj=utm +zone=29 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 30S
-<32730> +proj=utm +zone=30 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32730> +proj=utm +zone=30 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 31S
-<32731> +proj=utm +zone=31 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32731> +proj=utm +zone=31 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 32S
-<32732> +proj=utm +zone=32 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32732> +proj=utm +zone=32 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 33S
-<32733> +proj=utm +zone=33 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32733> +proj=utm +zone=33 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 34S
-<32734> +proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32734> +proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 35S
-<32735> +proj=utm +zone=35 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32735> +proj=utm +zone=35 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 36S
-<32736> +proj=utm +zone=36 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32736> +proj=utm +zone=36 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 37S
-<32737> +proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32737> +proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 38S
-<32738> +proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32738> +proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 39S
-<32739> +proj=utm +zone=39 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32739> +proj=utm +zone=39 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 40S
-<32740> +proj=utm +zone=40 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32740> +proj=utm +zone=40 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 41S
-<32741> +proj=utm +zone=41 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32741> +proj=utm +zone=41 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 42S
-<32742> +proj=utm +zone=42 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32742> +proj=utm +zone=42 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 43S
-<32743> +proj=utm +zone=43 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32743> +proj=utm +zone=43 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 44S
-<32744> +proj=utm +zone=44 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32744> +proj=utm +zone=44 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 45S
-<32745> +proj=utm +zone=45 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32745> +proj=utm +zone=45 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 46S
-<32746> +proj=utm +zone=46 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32746> +proj=utm +zone=46 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 47S
-<32747> +proj=utm +zone=47 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32747> +proj=utm +zone=47 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 48S
-<32748> +proj=utm +zone=48 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32748> +proj=utm +zone=48 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 49S
-<32749> +proj=utm +zone=49 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32749> +proj=utm +zone=49 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 50S
-<32750> +proj=utm +zone=50 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32750> +proj=utm +zone=50 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 51S
-<32751> +proj=utm +zone=51 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32751> +proj=utm +zone=51 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 52S
-<32752> +proj=utm +zone=52 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32752> +proj=utm +zone=52 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 53S
-<32753> +proj=utm +zone=53 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32753> +proj=utm +zone=53 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 54S
-<32754> +proj=utm +zone=54 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32754> +proj=utm +zone=54 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 55S
-<32755> +proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32755> +proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 56S
-<32756> +proj=utm +zone=56 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32756> +proj=utm +zone=56 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 57S
-<32757> +proj=utm +zone=57 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32757> +proj=utm +zone=57 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 58S
-<32758> +proj=utm +zone=58 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32758> +proj=utm +zone=58 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 59S
-<32759> +proj=utm +zone=59 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32759> +proj=utm +zone=59 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UTM zone 60S
-<32760> +proj=utm +zone=60 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32760> +proj=utm +zone=60 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / UPS South
-<32761> +proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32761> +proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # WGS 84 / TM 36 SE
-<32766> +proj=tmerc +lat_0=0 +lon_0=36 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  no_defs <>
+<32766> +proj=tmerc +lat_0=0 +lon_0=36 +k=0.999600 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Pulkovo 1995 GK Zone 2
-<20002> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=krass +units=m  no_defs <>
+<20002> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 GK Zone 3
-<20003> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=krass +units=m  no_defs <>
+<20003> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 GK Zone 2N
-<20062> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m  no_defs <>
+<20062> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # Pulkovo 1995 GK Zone 3N
-<20063> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m  no_defs <>
+<20063> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs <>
 # La Canoa UTM Zone 21N
-<24721> +proj=utm +zone=21 +ellps=intl +units=m  no_defs <>
+<24721> +proj=utm +zone=21 +ellps=intl +units=m +no_defs <>
 # NAD 1927 StatePlane Hawaii 1 FIPS 5101
-<26761> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<26761> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1927 StatePlane Hawaii 2 FIPS 5102
-<26762> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<26762> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1927 StatePlane Hawaii 3 FIPS 5103
-<26763> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<26763> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1927 StatePlane Hawaii 4 FIPS 5104
-<26764> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<26764> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1927 StatePlane Hawaii 5 FIPS 5105
-<26765> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<26765> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1927 StatePlane Michigan North FIPS 2111
-<26788> +proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=609601.2192024385 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<26788> +proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=609601.2192024385 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1927 StatePlane Michigan Central FIPS 2112
-<26789> +proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.33333333333333 +x_0=609601.2192024385 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<26789> +proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.33333333333333 +x_0=609601.2192024385 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1927 StatePlane Michigan South FIPS 2113
-<26790> +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.33333333333333 +x_0=609601.2192024385 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<26790> +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.33333333333333 +x_0=609601.2192024385 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # Nord Algerie
-<30591> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m  no_defs <>
+<30591> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs <>
 # Sud Algerie
-<30592> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m  no_defs <>
+<30592> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs <>
 # Germany Zone 1
-<31491> +proj=tmerc +lat_0=0 +lon_0=3 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=bessel +units=m  no_defs <>
+<31491> +proj=tmerc +lat_0=0 +lon_0=3 +k=1.000000 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Germany Zone 2
-<31492> +proj=tmerc +lat_0=0 +lon_0=6 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=bessel +units=m  no_defs <>
+<31492> +proj=tmerc +lat_0=0 +lon_0=6 +k=1.000000 +x_0=2500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Germany Zone 3
-<31493> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +units=m  no_defs <>
+<31493> +proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Germany Zone 4
-<31494> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=bessel +units=m  no_defs <>
+<31494> +proj=tmerc +lat_0=0 +lon_0=12 +k=1.000000 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Germany Zone 5
-<31495> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=bessel +units=m  no_defs <>
+<31495> +proj=tmerc +lat_0=0 +lon_0=15 +k=1.000000 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # NAD 1927 StatePlane Puerto Rico FIPS 5201
-<32059> +proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<32059> +proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1927 StatePlane Virgin Islands St Croix FIPS 5202
-<32060> +proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=30480.06096012193 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<32060> +proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=30480.06096012193 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # Sphere Plate Carree
-<53001> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53001> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Equidistant Cylindrical
-<53002> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53002> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Miller Cylindrical
-<53003> +proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m  no_defs <>
+<53003> +proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Mercator
-<53004> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53004> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Sinusoidal
-<53008> +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53008> +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Mollweide
-<53009> +proj=moll +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53009> +proj=moll +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Eckert VI
-<53010> +proj=eck6 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53010> +proj=eck6 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Eckert V
-<53011> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53011> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Eckert IV
-<53012> +proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53012> +proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Eckert III
-<53013> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53013> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Eckert II
-<53014> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53014> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Eckert I
-<53015> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53015> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Gall Stereographic
-<53016> +proj=gall +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53016> +proj=gall +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Behrmann
-<53017> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53017> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Winkel I
-<53018> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53018> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Winkel II
-<53019> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53019> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Polyconic
-<53021> +proj=poly +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53021> +proj=poly +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Quartic Authalic
-<53022> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53022> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Loximuthal
-<53023> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53023> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Bonne
-<53024> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53024> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Hotine
-<53025> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53025> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Stereographic
-<53026> +proj=stere +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53026> +proj=stere +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Equidistant Conic
-<53027> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53027> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Cassini
-<53028> +proj=cass +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53028> +proj=cass +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Van der Grinten I
-<53029> +proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m  no_defs <>
+<53029> +proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Robinson
-<53030> +proj=robin +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53030> +proj=robin +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Two Point Equidistant
-<53031> +a=6371000 +b=6371000 +units=m  no_defs <>
+<53031> +a=6371000 +b=6371000 +units=m +no_defs <>
 # Sphere Azimuthal Equidistant
-<53032> +proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m  no_defs <>
+<53032> +proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs <>
 # World Plate Carree
-<54001> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54001> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Equidistant Cylindrical
-<54002> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54002> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Miller Cylindrical
-<54003> +proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54003> +proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Mercator
-<54004> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54004> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Sinusoidal
-<54008> +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54008> +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Mollweide
-<54009> +proj=moll +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54009> +proj=moll +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Eckert VI
-<54010> +proj=eck6 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54010> +proj=eck6 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Eckert V
-<54011> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54011> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Eckert IV
-<54012> +proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54012> +proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Eckert III
-<54013> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54013> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Eckert II
-<54014> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54014> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Eckert I
-<54015> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54015> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Gall Stereographic
-<54016> +proj=gall +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54016> +proj=gall +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Behrmann
-<54017> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54017> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Winkel I
-<54018> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54018> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Winkel II
-<54019> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54019> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Polyconic
-<54021> +proj=poly +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54021> +proj=poly +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Quartic Authalic
-<54022> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54022> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Loximuthal
-<54023> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54023> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Bonne
-<54024> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54024> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Hotine
-<54025> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54025> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Stereographic
-<54026> +proj=stere +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54026> +proj=stere +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Equidistant Conic
-<54027> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54027> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Cassini
-<54028> +proj=cass +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54028> +proj=cass +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Van der Grinten I
-<54029> +proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54029> +proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Robinson
-<54030> +proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54030> +proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Two Point Equidistant
-<54031> +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54031> +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # World Azimuthal Equidistant
-<54032> +proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<54032> +proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # NAD 1927 StatePlane Guam FIPS 5400
-<65061> +proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=50000.00000000001 +y_0=50000.00000000001 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<65061> +proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=50000.00000000001 +y_0=50000.00000000001 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Guam FIPS 5400
-<65161> +proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=50000 +y_0=50000 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<65161> +proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=50000 +y_0=50000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # Canada Albers Equal Area Conic
-<102001> +proj=aea +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102001> +proj=aea +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # Canada Lambert Conformal Conic
-<102002> +proj=lcc +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102002> +proj=lcc +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # USA Contiguous Albers Equal Area Conic
-<102003> +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102003> +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # USA Contiguous Lambert Conformal Conic
-<102004> +proj=lcc +lat_1=33 +lat_2=45 +lat_0=39 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102004> +proj=lcc +lat_1=33 +lat_2=45 +lat_0=39 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # USA Contiguous Equidistant Conic
-<102005> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=33 +lat_2=45 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102005> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=33 +lat_2=45 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # Alaska Albers Equal Area Conic
-<102006> +proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102006> +proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # Hawaii Albers Equal Area Conic
-<102007> +proj=aea +lat_1=8 +lat_2=18 +lat_0=13 +lon_0=-157 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102007> +proj=aea +lat_1=8 +lat_2=18 +lat_0=13 +lon_0=-157 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # North America Albers Equal Area Conic
-<102008> +proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102008> +proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # North America Lambert Conformal Conic
-<102009> +proj=lcc +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102009> +proj=lcc +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # North America Equidistant Conic
-<102010> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=20 +lat_2=60 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102010> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=20 +lat_2=60 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # Africa Sinusoidal
-<102011> +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102011> +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Asia Lambert Conformal Conic
-<102012> +proj=lcc +lat_1=30 +lat_2=62 +lat_0=0 +lon_0=105 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102012> +proj=lcc +lat_1=30 +lat_2=62 +lat_0=0 +lon_0=105 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Europe Albers Equal Area Conic
-<102013> +proj=aea +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m  no_defs <>
+<102013> +proj=aea +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Europe Lambert Conformal Conic
-<102014> +proj=lcc +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m  no_defs <>
+<102014> +proj=lcc +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs <>
 # South America Lambert Conformal Conic
-<102015> +proj=lcc +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m  no_defs <>
+<102015> +proj=lcc +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs <>
 # North Pole Azimuthal Equidistant
-<102016> +proj=aeqd +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102016> +proj=aeqd +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # North Pole Lambert Azimuthal Equal Area
-<102017> +proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102017> +proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # North Pole Stereographic
-<102018> +proj=stere +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102018> +proj=stere +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # South Pole Azimuthal Equidistant
-<102019> +proj=aeqd +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102019> +proj=aeqd +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # South Pole Lambert Azimuthal Equal Area
-<102020> +proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102020> +proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # South Pole Stereographic
-<102021> +proj=stere +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102021> +proj=stere +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Africa Albers Equal Area Conic
-<102022> +proj=aea +lat_1=20 +lat_2=-23 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102022> +proj=aea +lat_1=20 +lat_2=-23 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Africa Equidistant Conic
-<102023> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=20 +lat_2=-23 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102023> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=20 +lat_2=-23 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Africa Lambert Conformal Conic
-<102024> +proj=lcc +lat_1=20 +lat_2=-23 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102024> +proj=lcc +lat_1=20 +lat_2=-23 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Asia North Albers Equal Area Conic
-<102025> +proj=aea +lat_1=15 +lat_2=65 +lat_0=30 +lon_0=95 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102025> +proj=aea +lat_1=15 +lat_2=65 +lat_0=30 +lon_0=95 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Asia North Equidistant Conic
-<102026> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=15 +lat_2=65 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102026> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=15 +lat_2=65 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Asia North Lambert Conformal Conic
-<102027> +proj=lcc +lat_1=15 +lat_2=65 +lat_0=30 +lon_0=95 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102027> +proj=lcc +lat_1=15 +lat_2=65 +lat_0=30 +lon_0=95 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Asia South Albers Equal Area Conic
-<102028> +proj=aea +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102028> +proj=aea +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Asia South Equidistant Conic
-<102029> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=7 +lat_2=-32 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102029> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=7 +lat_2=-32 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Asia South Lambert Conformal Conic
-<102030> +proj=lcc +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m  no_defs <>
+<102030> +proj=lcc +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
 # Europe Equidistant Conic
-<102031> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=43 +lat_2=62 +x_0=0 +y_0=0 +ellps=intl +units=m  no_defs <>
+<102031> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=43 +lat_2=62 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs <>
 # South America Equidistant Conic
-<102032> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=-5 +lat_2=-42 +x_0=0 +y_0=0 +ellps=aust_SA +units=m  no_defs <>
+<102032> +proj=eqdc +lat_0=0 +lon_0=0 +lat_1=-5 +lat_2=-42 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs <>
 # South America Albers Equal Area Conic
-<102033> +proj=aea +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m  no_defs <>
+<102033> +proj=aea +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs <>
 # S-JTSK Krovak
-<102065> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m  no_defs <>
+<102065> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # S-JTSK Ferro Krovak East North
-<102066> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=-17.66666666666667 +units=m  no_defs <>
+<102066> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=-17.66666666666667 +units=m +no_defs <>
 # S-JTSK Krovak East North
-<102067> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m  no_defs <>
+<102067> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs <>
 # Monte Mario Italy 1
-<102091> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.999600 +x_0=1500000 +y_0=0 +ellps=intl +units=m  no_defs <>
+<102091> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.999600 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Monte Mario Italy 2
-<102092> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999600 +x_0=2520000 +y_0=0 +ellps=intl +units=m  no_defs <>
+<102092> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.999600 +x_0=2520000 +y_0=0 +ellps=intl +units=m +no_defs <>
 # NGO 1948 Norway Zone 1
-<102101> +proj=tmerc +lat_0=58 +lon_0=6.05625 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102101> +proj=tmerc +lat_0=58 +lon_0=6.05625 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 Norway Zone 2
-<102102> +proj=tmerc +lat_0=58 +lon_0=8.389583333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102102> +proj=tmerc +lat_0=58 +lon_0=8.389583333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 Norway Zone 3
-<102103> +proj=tmerc +lat_0=58 +lon_0=10.72291666666667 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102103> +proj=tmerc +lat_0=58 +lon_0=10.72291666666667 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 Norway Zone 4
-<102104> +proj=tmerc +lat_0=58 +lon_0=13.22291666666667 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102104> +proj=tmerc +lat_0=58 +lon_0=13.22291666666667 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 Norway Zone 5
-<102105> +proj=tmerc +lat_0=58 +lon_0=16.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102105> +proj=tmerc +lat_0=58 +lon_0=16.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 Norway Zone 6
-<102106> +proj=tmerc +lat_0=58 +lon_0=20.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102106> +proj=tmerc +lat_0=58 +lon_0=20.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 Norway Zone 7
-<102107> +proj=tmerc +lat_0=58 +lon_0=24.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102107> +proj=tmerc +lat_0=58 +lon_0=24.88958333333333 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 Norway Zone 8
-<102108> +proj=tmerc +lat_0=58 +lon_0=29.05625 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102108> +proj=tmerc +lat_0=58 +lon_0=29.05625 +k=1.000000 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # RGF 1993 Lambert 93
-<102110> +proj=lcc +lat_1=44 +lat_2=49 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +units=m  no_defs <>
+<102110> +proj=lcc +lat_1=44 +lat_2=49 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +units=m +no_defs <>
 # Old Hawaiian UTM Zone 4N
-<102114> +proj=utm +zone=4 +ellps=clrk66 +units=m  no_defs <>
+<102114> +proj=utm +zone=4 +ellps=clrk66 +units=m +no_defs <>
 # Old Hawaiian UTM Zone 5N
-<102115> +proj=utm +zone=5 +ellps=clrk66 +units=m  no_defs <>
+<102115> +proj=utm +zone=5 +ellps=clrk66 +units=m +no_defs <>
 # NAD 1927 Michigan GeoRef Feet US
-<102120> +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.495961392 +y_0=-4354009.816002033 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192  no_defs <>
+<102120> +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.495961392 +y_0=-4354009.816002033 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 Michigan GeoRef Feet US
-<102121> +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.495961392 +y_0=-4354009.816002033 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102121> +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.495961392 +y_0=-4354009.816002033 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1927 Michigan GeoRef Meters
-<102122> +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=clrk66 +datum=NAD27 +units=m  no_defs <>
+<102122> +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=clrk66 +datum=NAD27 +units=m +no_defs <>
 # NAD 1983 Michigan GeoRef Meters
-<102123> +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +datum=NAD83 +units=m  no_defs <>
+<102123> +proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +datum=NAD83 +units=m +no_defs <>
 # NGO 1948 UTM Zone 32N
-<102132> +proj=utm +zone=32 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102132> +proj=utm +zone=32 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 UTM Zone 33N
-<102133> +proj=utm +zone=33 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102133> +proj=utm +zone=33 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 UTM Zone 34N
-<102134> +proj=utm +zone=34 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102134> +proj=utm +zone=34 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # NGO 1948 UTM Zone 35N
-<102135> +proj=utm +zone=35 +a=6377492.018 +b=6356173.508712696 +units=m  no_defs <>
+<102135> +proj=utm +zone=35 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs <>
 # Hong Kong 1980 Grid
-<102140> +proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1.000000 +x_0=836694.05 +y_0=819069.8 +ellps=intl +units=m  no_defs <>
+<102140> +proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1.000000 +x_0=836694.05 +y_0=819069.8 +ellps=intl +units=m +no_defs <>
 # Hong Kong 1980 UTM Zone 49N
-<102141> +proj=utm +zone=49 +ellps=intl +units=m  no_defs <>
+<102141> +proj=utm +zone=49 +ellps=intl +units=m +no_defs <>
 # Hong Kong 1980 UTM Zone 50N
-<102142> +proj=utm +zone=50 +ellps=intl +units=m  no_defs <>
+<102142> +proj=utm +zone=50 +ellps=intl +units=m +no_defs <>
 # Tokyo UTM Zone 51N
-<102151> +proj=utm +zone=51 +ellps=bessel +units=m  no_defs <>
+<102151> +proj=utm +zone=51 +ellps=bessel +units=m +no_defs <>
 # Tokyo UTM Zone 52N
-<102152> +proj=utm +zone=52 +ellps=bessel +units=m  no_defs <>
+<102152> +proj=utm +zone=52 +ellps=bessel +units=m +no_defs <>
 # Tokyo UTM Zone 53N
-<102153> +proj=utm +zone=53 +ellps=bessel +units=m  no_defs <>
+<102153> +proj=utm +zone=53 +ellps=bessel +units=m +no_defs <>
 # Tokyo UTM Zone 54N
-<102154> +proj=utm +zone=54 +ellps=bessel +units=m  no_defs <>
+<102154> +proj=utm +zone=54 +ellps=bessel +units=m +no_defs <>
 # Tokyo UTM Zone 55N
-<102155> +proj=utm +zone=55 +ellps=bessel +units=m  no_defs <>
+<102155> +proj=utm +zone=55 +ellps=bessel +units=m +no_defs <>
 # Tokyo UTM Zone 56N
-<102156> +proj=utm +zone=56 +ellps=bessel +units=m  no_defs <>
+<102156> +proj=utm +zone=56 +ellps=bessel +units=m +no_defs <>
 # Datum 73 Hayford Gauss IGeoE
-<102160> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=200180.598 +y_0=299913.01 +ellps=intl +units=m  no_defs <>
+<102160> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=200180.598 +y_0=299913.01 +ellps=intl +units=m +no_defs <>
 # Datum 73 Hayford Gauss IPCC
-<102161> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +units=m  no_defs <>
+<102161> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +units=m +no_defs <>
 # Graciosa Base SW 1948 UTM Zone 26N
-<102162> +proj=utm +zone=26 +ellps=intl +units=m  no_defs <>
+<102162> +proj=utm +zone=26 +ellps=intl +units=m +no_defs <>
 # Lisboa Bessel Bonne
-<102163> +ellps=bessel +units=m  no_defs <>
+<102163> +ellps=bessel +units=m +no_defs <>
 # Lisboa Hayford Gauss IGeoE
-<102164> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=200000 +y_0=300000 +ellps=intl +units=m  no_defs <>
+<102164> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=200000 +y_0=300000 +ellps=intl +units=m +no_defs <>
 # Lisboa Hayford Gauss IPCC
-<102165> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=0 +y_0=0 +ellps=intl +units=m  no_defs <>
+<102165> +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1.000000 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs <>
 # Observ Meteorologico 1939 UTM Zone 25N
-<102166> +proj=utm +zone=25 +ellps=intl +units=m  no_defs <>
+<102166> +proj=utm +zone=25 +ellps=intl +units=m +no_defs <>
 # Porto Santo 1936 UTM Zone 28N
-<102167> +proj=utm +zone=28 +ellps=intl +units=m  no_defs <>
+<102167> +proj=utm +zone=28 +ellps=intl +units=m +no_defs <>
 # Sao Braz UTM Zone 26N
-<102168> +proj=utm +zone=26 +ellps=intl +units=m  no_defs <>
+<102168> +proj=utm +zone=26 +ellps=intl +units=m +no_defs <>
 # Selvagem Grande 1938 UTM Zone 28N
-<102169> +proj=utm +zone=28 +ellps=intl +units=m  no_defs <>
+<102169> +proj=utm +zone=28 +ellps=intl +units=m +no_defs <>
 # Nord Maroc Degree
-<102191> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m  no_defs <>
+<102191> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs <>
 # Sud Maroc Degree
-<102192> +proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.9996155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m  no_defs <>
+<102192> +proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.9996155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs <>
 # Sahara Degree
-<102193> +proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.9996 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356514.999904194 +units=m  no_defs <>
+<102193> +proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.9996 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Alabama East FIPS 0101
-<102229> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102229> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Alabama West FIPS 0102
-<102230> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102230> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane California I FIPS 0401
-<102241> +proj=lcc +lat_1=40 +lat_2=41.66666666666666 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m  no_defs <>
+<102241> +proj=lcc +lat_1=40 +lat_2=41.66666666666666 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane California II FIPS 0402
-<102242> +proj=lcc +lat_1=38.33333333333334 +lat_2=39.83333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m  no_defs <>
+<102242> +proj=lcc +lat_1=38.33333333333334 +lat_2=39.83333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane California III FIPS 0403
-<102243> +proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m  no_defs <>
+<102243> +proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane California IV FIPS 0404
-<102244> +proj=lcc +lat_1=36 +lat_2=37.25 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m  no_defs <>
+<102244> +proj=lcc +lat_1=36 +lat_2=37.25 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane California V FIPS 0405
-<102245> +proj=lcc +lat_1=34.03333333333333 +lat_2=35.46666666666667 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m  no_defs <>
+<102245> +proj=lcc +lat_1=34.03333333333333 +lat_2=35.46666666666667 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane California VI FIPS 0406
-<102246> +proj=lcc +lat_1=32.78333333333333 +lat_2=33.88333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m  no_defs <>
+<102246> +proj=lcc +lat_1=32.78333333333333 +lat_2=33.88333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Arizona East FIPS 0201
-<102248> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102248> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Arizona Central FIPS 0202
-<102249> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102249> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Arizona West FIPS 0203
-<102250> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102250> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Arkansas North FIPS 0301
-<102251> +proj=lcc +lat_1=34.93333333333333 +lat_2=36.23333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102251> +proj=lcc +lat_1=34.93333333333333 +lat_2=36.23333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Arkansas South FIPS 0302
-<102252> +proj=lcc +lat_1=33.3 +lat_2=34.76666666666667 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m  no_defs <>
+<102252> +proj=lcc +lat_1=33.3 +lat_2=34.76666666666667 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Colorado North FIPS 0501
-<102253> +proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m  no_defs <>
+<102253> +proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Colorado Central FIPS 0502
-<102254> +proj=lcc +lat_1=38.45 +lat_2=39.75 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m  no_defs <>
+<102254> +proj=lcc +lat_1=38.45 +lat_2=39.75 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Colorado South FIPS 0503
-<102255> +proj=lcc +lat_1=37.23333333333333 +lat_2=38.43333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m  no_defs <>
+<102255> +proj=lcc +lat_1=37.23333333333333 +lat_2=38.43333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Connecticut FIPS 0600
-<102256> +proj=lcc +lat_1=41.2 +lat_2=41.86666666666667 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +units=m  no_defs <>
+<102256> +proj=lcc +lat_1=41.2 +lat_2=41.86666666666667 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Delaware FIPS 0700
-<102257> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102257> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Florida East FIPS 0901
-<102258> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102258> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Florida West FIPS 0902
-<102259> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102259> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Florida North FIPS 0903
-<102260> +proj=lcc +lat_1=29.58333333333333 +lat_2=30.75 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102260> +proj=lcc +lat_1=29.58333333333333 +lat_2=30.75 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Hawaii 1 FIPS 5101
-<102261> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102261> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Hawaii 2 FIPS 5102
-<102262> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102262> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Hawaii 3 FIPS 5103
-<102263> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102263> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Hawaii 4 FIPS 5104
-<102264> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102264> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Hawaii 5 FIPS 5105
-<102265> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102265> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Georgia East FIPS 1001
-<102266> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102266> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Georgia West FIPS 1002
-<102267> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102267> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Idaho East FIPS 1101
-<102268> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102268> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Idaho Central FIPS 1102
-<102269> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102269> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Idaho West FIPS 1103
-<102270> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102270> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Illinois East FIPS 1201
-<102271> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102271> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Illinois West FIPS 1202
-<102272> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102272> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Indiana East FIPS 1301
-<102273> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=100000 +y_0=250000 +ellps=GRS80 +units=m  no_defs <>
+<102273> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=100000 +y_0=250000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Indiana West FIPS 1302
-<102274> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=250000 +ellps=GRS80 +units=m  no_defs <>
+<102274> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000 +y_0=250000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Kansas North FIPS 1501
-<102277> +proj=lcc +lat_1=38.71666666666667 +lat_2=39.78333333333333 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102277> +proj=lcc +lat_1=38.71666666666667 +lat_2=39.78333333333333 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Kansas South FIPS 1502
-<102278> +proj=lcc +lat_1=37.26666666666667 +lat_2=38.56666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m  no_defs <>
+<102278> +proj=lcc +lat_1=37.26666666666667 +lat_2=38.56666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Kentucky North FIPS 1601
-<102279> +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 <>
+<102279> +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 <>
 # NAD 1983 HARN StatePlane Kentucky South FIPS 1602
-<102280> +proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m  no_defs <>
+<102280> +proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Louisiana North FIPS 1701
-<102281> +proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102281> +proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Louisiana South FIPS 1702
-<102282> +proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102282> +proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Maine East FIPS 1801
-<102283> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.999900 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102283> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.999900 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Maine West FIPS 1802
-<102284> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102284> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Maryland FIPS 1900
-<102285> +proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102285> +proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Massachusetts Mainland FIPS 2001
-<102286> +proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +units=m  no_defs <>
+<102286> +proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Massachusetts Island FIPS 2002
-<102287> +proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102287> +proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Michigan North FIPS 2111
-<102288> +proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102288> +proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Michigan Central FIPS 2112
-<102289> +proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102289> +proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Michigan South FIPS 2113
-<102290> +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102290> +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Minnesota North FIPS 2201
-<102291> +proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m  no_defs <>
+<102291> +proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Minnesota Central FIPS 2202
-<102292> +proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m  no_defs <>
+<102292> +proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Minnesota South FIPS 2203
-<102293> +proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m  no_defs <>
+<102293> +proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Mississippi East FIPS 2301
-<102294> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102294> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Mississippi West FIPS 2302
-<102295> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102295> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Missouri East FIPS 2401
-<102296> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102296> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Missouri Central FIPS 2402
-<102297> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102297> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Missouri West FIPS 2403
-<102298> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=850000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102298> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=850000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Montana FIPS 2500
-<102300> +proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102300> +proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Nebraska FIPS 2600
-<102304> +proj=lcc +lat_1=40 +lat_2=43 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102304> +proj=lcc +lat_1=40 +lat_2=43 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Nevada East FIPS 2701
-<102307> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=200000 +y_0=8000000 +ellps=GRS80 +units=m  no_defs <>
+<102307> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=200000 +y_0=8000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Nevada Central FIPS 2702
-<102308> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=500000 +y_0=6000000 +ellps=GRS80 +units=m  no_defs <>
+<102308> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Nevada West FIPS 2703
-<102309> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=800000 +y_0=4000000 +ellps=GRS80 +units=m  no_defs <>
+<102309> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=800000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane New Hampshire FIPS 2800
-<102310> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102310> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane New Jersey FIPS 2900
-<102311> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102311> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane New Mexico East FIPS 3001
-<102312> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102312> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane New Mexico Central FIPS 3002
-<102313> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102313> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane New Mexico West FIPS 3003
-<102314> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102314> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=830000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane New York East FIPS 3101
-<102315> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102315> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane New York Central FIPS 3102
-<102316> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102316> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane New York West FIPS 3103
-<102317> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102317> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane New York Long Island FIPS 3104
-<102318> +proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102318> +proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane North Dakota North FIPS 3301
-<102320> +proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102320> +proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane North Dakota South FIPS 3302
-<102321> +proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102321> +proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Ohio North FIPS 3401
-<102322> +proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102322> +proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Ohio South FIPS 3402
-<102323> +proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102323> +proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Oklahoma North FIPS 3501
-<102324> +proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102324> +proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Oklahoma South FIPS 3502
-<102325> +proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102325> +proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Oregon North FIPS 3601
-<102326> +proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102326> +proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Oregon South FIPS 3602
-<102327> +proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102327> +proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Rhode Island FIPS 3800
-<102330> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=100000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102330> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=100000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane South Dakota North FIPS 4001
-<102334> +proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102334> +proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane South Dakota South FIPS 4002
-<102335> +proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102335> +proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Tennessee FIPS 4100
-<102336> +proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102336> +proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Texas North FIPS 4201
-<102337> +proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +units=m  no_defs <>
+<102337> +proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Texas North Central FIPS 4202
-<102338> +proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +units=m  no_defs <>
+<102338> +proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Texas Central FIPS 4203
-<102339> +proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +units=m  no_defs <>
+<102339> +proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Texas South Central FIPS 4204
-<102340> +proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333334 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +units=m  no_defs <>
+<102340> +proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333334 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Texas South FIPS 4205
-<102341> +proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +units=m  no_defs <>
+<102341> +proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Utah North FIPS 4301
-<102342> +proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +units=m  no_defs <>
+<102342> +proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Utah Central FIPS 4302
-<102343> +proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +units=m  no_defs <>
+<102343> +proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Utah South FIPS 4303
-<102344> +proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +units=m  no_defs <>
+<102344> +proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Vermont FIPS 4400
-<102345> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102345> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Virginia North FIPS 4501
-<102346> +proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +units=m  no_defs <>
+<102346> +proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Virginia South FIPS 4502
-<102347> +proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +units=m  no_defs <>
+<102347> +proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Washington North FIPS 4601
-<102348> +proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102348> +proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Washington South FIPS 4602
-<102349> +proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102349> +proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane West Virginia North FIPS 4701
-<102350> +proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102350> +proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane West Virginia South FIPS 4702
-<102351> +proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102351> +proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Wisconsin North FIPS 4801
-<102352> +proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102352> +proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Wisconsin Central FIPS 4802
-<102353> +proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102353> +proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Wisconsin South FIPS 4803
-<102354> +proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102354> +proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Wyoming East FIPS 4901
-<102355> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.999938 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102355> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.999938 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Wyoming East Central FIPS 4902
-<102356> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.999938 +x_0=400000 +y_0=100000 +ellps=GRS80 +units=m  no_defs <>
+<102356> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.999938 +x_0=400000 +y_0=100000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Wyoming West Central FIPS 4903
-<102357> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.999938 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m  no_defs <>
+<102357> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.999938 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Wyoming West FIPS 4904
-<102358> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.999938 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m  no_defs <>
+<102358> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.999938 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs <>
 # NAD 1983 HARN StatePlane Puerto Rico Virgin Islands FIPS 5200
-<102361> +proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +units=m  no_defs <>
+<102361> +proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +units=m +no_defs <>
 # Nord Algerie Ancienne Degree
-<102491> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m  no_defs <>
+<102491> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs <>
 # Sud Algerie Ancienne Degree
-<102492> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m  no_defs <>
+<102492> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs <>
 # NTF France I degrees
-<102581> +proj=lcc +lat_1=49.5 +lat_0=49.5 +lon_0=2.337229166666667 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356514.999904194 +units=m  no_defs <>
+<102581> +proj=lcc +lat_1=49.5 +lat_0=49.5 +lon_0=2.337229166666667 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs <>
 # NTF France II degrees
-<102582> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666667 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356514.999904194 +units=m  no_defs <>
+<102582> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666667 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs <>
 # NTF France III degrees
-<102583> +proj=lcc +lat_1=44.1 +lat_0=44.1 +lon_0=2.337229166666667 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356514.999904194 +units=m  no_defs <>
+<102583> +proj=lcc +lat_1=44.1 +lat_0=44.1 +lon_0=2.337229166666667 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs <>
 # NTF France IV degrees
-<102584> +proj=lcc +lat_1=42.165 +lat_0=42.165 +lon_0=2.337229166666667 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356514.999904194 +units=m  no_defs <>
+<102584> +proj=lcc +lat_1=42.165 +lat_0=42.165 +lon_0=2.337229166666667 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs <>
 # Nord Algerie Degree
-<102591> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m  no_defs <>
+<102591> +proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs <>
 # Sud Algerie Degree
-<102592> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m  no_defs <>
+<102592> +proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs <>
 # NAD 1983 StatePlane Alabama East FIPS 0101 Feet
-<102629> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102629> +proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.999960 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alabama West FIPS 0102 Feet
-<102630> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102630> +proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 1 FIPS 5001 Feet
-<102631> +proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=-36.86989764583333 +k=0.9999 +x_0=4999999.999999999 +y_0=-4999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102631> +proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=-36.86989764583333 +k=0.9999 +x_0=4999999.999999999 +y_0=-4999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 2 FIPS 5002 Feet
-<102632> +proj=tmerc +lat_0=54 +lon_0=-142 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102632> +proj=tmerc +lat_0=54 +lon_0=-142 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 3 FIPS 5003 Feet
-<102633> +proj=tmerc +lat_0=54 +lon_0=-146 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102633> +proj=tmerc +lat_0=54 +lon_0=-146 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 4 FIPS 5004 Feet
-<102634> +proj=tmerc +lat_0=54 +lon_0=-150 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102634> +proj=tmerc +lat_0=54 +lon_0=-150 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 5 FIPS 5005 Feet
-<102635> +proj=tmerc +lat_0=54 +lon_0=-154 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102635> +proj=tmerc +lat_0=54 +lon_0=-154 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 6 FIPS 5006 Feet
-<102636> +proj=tmerc +lat_0=54 +lon_0=-158 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102636> +proj=tmerc +lat_0=54 +lon_0=-158 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 7 FIPS 5007 Feet
-<102637> +proj=tmerc +lat_0=54 +lon_0=-162 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102637> +proj=tmerc +lat_0=54 +lon_0=-162 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 8 FIPS 5008 Feet
-<102638> +proj=tmerc +lat_0=54 +lon_0=-166 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102638> +proj=tmerc +lat_0=54 +lon_0=-166 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 9 FIPS 5009 Feet
-<102639> +proj=tmerc +lat_0=54 +lon_0=-170 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102639> +proj=tmerc +lat_0=54 +lon_0=-170 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Alaska 10 FIPS 5010 Feet
-<102640> +proj=lcc +lat_1=51.83333333333334 +lat_2=53.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102640> +proj=lcc +lat_1=51.83333333333334 +lat_2=53.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane California I FIPS 0401 Feet
-<102641> +proj=lcc +lat_1=40 +lat_2=41.66666666666666 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102641> +proj=lcc +lat_1=40 +lat_2=41.66666666666666 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane California II FIPS 0402 Feet
-<102642> +proj=lcc +lat_1=38.33333333333334 +lat_2=39.83333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102642> +proj=lcc +lat_1=38.33333333333334 +lat_2=39.83333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane California III FIPS 0403 Feet
-<102643> +proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102643> +proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane California IV FIPS 0404 Feet
-<102644> +proj=lcc +lat_1=36 +lat_2=37.25 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102644> +proj=lcc +lat_1=36 +lat_2=37.25 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane California V FIPS 0405 Feet
-<102645> +proj=lcc +lat_1=34.03333333333333 +lat_2=35.46666666666667 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102645> +proj=lcc +lat_1=34.03333333333333 +lat_2=35.46666666666667 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane California VI FIPS 0406 Feet
-<102646> +proj=lcc +lat_1=32.78333333333333 +lat_2=33.88333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102646> +proj=lcc +lat_1=32.78333333333333 +lat_2=33.88333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Arizona East FIPS 0201 Feet
-<102648> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102648> +proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Arizona Central FIPS 0202 Feet
-<102649> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102649> +proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999900 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Arizona West FIPS 0203 Feet
-<102650> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102650> +proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Arkansas North FIPS 0301 Feet
-<102651> +proj=lcc +lat_1=34.93333333333333 +lat_2=36.23333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102651> +proj=lcc +lat_1=34.93333333333333 +lat_2=36.23333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Arkansas South FIPS 0302 Feet
-<102652> +proj=lcc +lat_1=33.3 +lat_2=34.76666666666667 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.9999999999 +y_0=399999.9999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102652> +proj=lcc +lat_1=33.3 +lat_2=34.76666666666667 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.9999999999 +y_0=399999.9999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Colorado North FIPS 0501 Feet
-<102653> +proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102653> +proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Colorado Central FIPS 0502 Feet
-<102654> +proj=lcc +lat_1=38.45 +lat_2=39.75 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102654> +proj=lcc +lat_1=38.45 +lat_2=39.75 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Colorado South FIPS 0503 Feet
-<102655> +proj=lcc +lat_1=37.23333333333333 +lat_2=38.43333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102655> +proj=lcc +lat_1=37.23333333333333 +lat_2=38.43333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Connecticut FIPS 0600 Feet
-<102656> +proj=lcc +lat_1=41.2 +lat_2=41.86666666666667 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102656> +proj=lcc +lat_1=41.2 +lat_2=41.86666666666667 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Delaware FIPS 0700 Feet
-<102657> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102657> +proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Florida East FIPS 0901 Feet
-<102658> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102658> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Florida West FIPS 0902 Feet
-<102659> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102659> +proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Florida North FIPS 0903 Feet
-<102660> +proj=lcc +lat_1=29.58333333333333 +lat_2=30.75 +lat_0=29 +lon_0=-84.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102660> +proj=lcc +lat_1=29.58333333333333 +lat_2=30.75 +lat_0=29 +lon_0=-84.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Hawaii 1 FIPS 5101 Feet
-<102661> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102661> +proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999967 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Hawaii 2 FIPS 5102 Feet
-<102662> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102662> +proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999967 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Hawaii 3 FIPS 5103 Feet
-<102663> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102663> +proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.999990 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Hawaii 4 FIPS 5104 Feet
-<102664> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102664> +proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.999990 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Hawaii 5 FIPS 5105 Feet
-<102665> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102665> +proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1.000000 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Georgia East FIPS 1001 Feet
-<102666> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102666> +proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999900 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Georgia West FIPS 1002 Feet
-<102667> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102667> +proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999900 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Idaho East FIPS 1101 Feet
-<102668> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102668> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.999947 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Idaho Central FIPS 1102 Feet
-<102669> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102669> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.999947 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Idaho West FIPS 1103 Feet
-<102670> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=799999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102670> +proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933 +x_0=799999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Illinois East FIPS 1201 Feet
-<102671> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102671> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.999975 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Illinois West FIPS 1202 Feet
-<102672> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102672> +proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Indiana East FIPS 1301 Feet
-<102673> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=100000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102673> +proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999967 +x_0=100000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Indiana West FIPS 1302 Feet
-<102674> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000.0000000001 +y_0=250000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102674> +proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999967 +x_0=900000.0000000001 +y_0=250000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Iowa North FIPS 1401 Feet
-<102675> +proj=lcc +lat_1=42.06666666666667 +lat_2=43.26666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102675> +proj=lcc +lat_1=42.06666666666667 +lat_2=43.26666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Iowa South FIPS 1402 Feet
-<102676> +proj=lcc +lat_1=40.61666666666667 +lat_2=41.78333333333333 +lat_0=40 +lon_0=-93.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102676> +proj=lcc +lat_1=40.61666666666667 +lat_2=41.78333333333333 +lat_0=40 +lon_0=-93.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Kansas North FIPS 1501 Feet
-<102677> +proj=lcc +lat_1=38.71666666666667 +lat_2=39.78333333333333 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102677> +proj=lcc +lat_1=38.71666666666667 +lat_2=39.78333333333333 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Kansas South FIPS 1502 Feet
-<102678> +proj=lcc +lat_1=37.26666666666667 +lat_2=38.56666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.9999999999 +y_0=399999.9999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102678> +proj=lcc +lat_1=37.26666666666667 +lat_2=38.56666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.9999999999 +y_0=399999.9999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Kentucky North FIPS 1601 Feet
-<102679> +proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102679> +proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Kentucky South FIPS 1602 Feet
-<102680> +proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0000000002 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102680> +proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0000000002 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Louisiana North FIPS 1701 Feet
-<102681> +proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102681> +proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Louisiana South FIPS 1702 Feet
-<102682> +proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102682> +proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Maine East FIPS 1801 Feet
-<102683> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.999900 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102683> +proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.999900 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Maine West FIPS 1802 Feet
-<102684> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=900000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102684> +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999967 +x_0=900000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Maryland FIPS 1900 Feet
-<102685> +proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102685> +proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Massachusetts Mainland FIPS 2001 Feet
-<102686> +proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000.0000000001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102686> +proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000.0000000001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Massachusetts Island FIPS 2002 Feet
-<102687> +proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102687> +proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Michigan North FIPS 2111 Feet
-<102688> +proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102688> +proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Michigan Central FIPS 2112 Feet
-<102689> +proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000.000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102689> +proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000.000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Michigan South FIPS 2113 Feet
-<102690> +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102690> +proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Minnesota North FIPS 2201 Feet
-<102691> +proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102691> +proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Minnesota Central FIPS 2202 Feet
-<102692> +proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102692> +proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Minnesota South FIPS 2203 Feet
-<102693> +proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102693> +proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Mississippi East FIPS 2301 Feet
-<102694> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102694> +proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.999950 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Mississippi West FIPS 2302 Feet
-<102695> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102695> +proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.999950 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Missouri East FIPS 2401 Feet
-<102696> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102696> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Missouri Central FIPS 2402 Feet
-<102697> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102697> +proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Missouri West FIPS 2403 Feet
-<102698> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=850000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102698> +proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941 +x_0=850000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Montana FIPS 2500 Feet
-<102700> +proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25 +lon_0=-109.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102700> +proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25 +lon_0=-109.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Nebraska FIPS 2600 Feet
-<102704> +proj=lcc +lat_1=40 +lat_2=43 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102704> +proj=lcc +lat_1=40 +lat_2=43 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Nevada East FIPS 2701 Feet
-<102707> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=200000 +y_0=7999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102707> +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.999900 +x_0=200000 +y_0=7999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Nevada Central FIPS 2702 Feet
-<102708> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=500000.0000000002 +y_0=6000000.000000001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102708> +proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.999900 +x_0=500000.0000000002 +y_0=6000000.000000001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Nevada West FIPS 2703 Feet
-<102709> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=799999.9999999999 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102709> +proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.999900 +x_0=799999.9999999999 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane New Hampshire FIPS 2800 Feet
-<102710> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102710> +proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999967 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane New Jersey FIPS 2900 Feet
-<102711> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102711> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane New Mexico East FIPS 3001 Feet
-<102712> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102712> +proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane New Mexico Central FIPS 3002 Feet
-<102713> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102713> +proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.999900 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane New Mexico West FIPS 3003 Feet
-<102714> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=829999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102714> +proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999917 +x_0=829999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane New York East FIPS 3101 Feet
-<102715> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102715> +proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.999900 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane New York Central FIPS 3102 Feet
-<102716> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102716> +proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999938 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane New York West FIPS 3103 Feet
-<102717> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102717> +proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999938 +x_0=350000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane New York Long Island FIPS 3104 Feet
-<102718> +proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102718> +proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane North Carolina FIPS 3200 Feet
-<102719> +proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2199999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102719> +proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2199999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane North Dakota North FIPS 3301 Feet
-<102720> +proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102720> +proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane North Dakota South FIPS 3302 Feet
-<102721> +proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102721> +proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Ohio North FIPS 3401 Feet
-<102722> +proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102722> +proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Ohio South FIPS 3402 Feet
-<102723> +proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102723> +proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Oklahoma North FIPS 3501 Feet
-<102724> +proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102724> +proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Oklahoma South FIPS 3502 Feet
-<102725> +proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102725> +proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Oregon North FIPS 3601 Feet
-<102726> +proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102726> +proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Oregon South FIPS 3602 Feet
-<102727> +proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102727> +proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Pennsylvania North FIPS 3701 Feet
-<102728> +proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102728> +proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Pennsylvania South FIPS 3702 Feet
-<102729> +proj=lcc +lat_1=39.93333333333333 +lat_2=40.96666666666667 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102729> +proj=lcc +lat_1=39.93333333333333 +lat_2=40.96666666666667 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Rhode Island FIPS 3800 Feet
-<102730> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=100000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102730> +proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.999994 +x_0=100000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane South Carolina FIPS 3900 Feet
-<102733> +proj=lcc +lat_1=32.5 +lat_2=34.83333333333334 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102733> +proj=lcc +lat_1=32.5 +lat_2=34.83333333333334 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane South Dakota North FIPS 4001 Feet
-<102734> +proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102734> +proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane South Dakota South FIPS 4002 Feet
-<102735> +proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102735> +proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Tennessee FIPS 4100 Feet
-<102736> +proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102736> +proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Texas North FIPS 4201 Feet
-<102737> +proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102737> +proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Texas North Central FIPS 4202 Feet
-<102738> +proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000.0000000001 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102738> +proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000.0000000001 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Texas Central FIPS 4203 Feet
-<102739> +proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102739> +proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Texas South Central FIPS 4204 Feet
-<102740> +proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333334 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000.0000000001 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102740> +proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333334 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000.0000000001 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Texas South FIPS 4205 Feet
-<102741> +proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=4999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102741> +proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=4999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Utah North FIPS 4301 Feet
-<102742> +proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102742> +proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Utah Central FIPS 4302 Feet
-<102743> +proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102743> +proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Utah South FIPS 4303 Feet
-<102744> +proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102744> +proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Vermont FIPS 4400 Feet
-<102745> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102745> +proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Virginia North FIPS 4501 Feet
-<102746> +proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3499999.999999999 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102746> +proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3499999.999999999 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Virginia South FIPS 4502 Feet
-<102747> +proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3499999.999999999 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102747> +proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3499999.999999999 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Washington North FIPS 4601 Feet
-<102748> +proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102748> +proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Washington South FIPS 4602 Feet
-<102749> +proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102749> +proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane West Virginia North FIPS 4701 Feet
-<102750> +proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102750> +proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane West Virginia South FIPS 4702 Feet
-<102751> +proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102751> +proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Wisconsin North FIPS 4801 Feet
-<102752> +proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102752> +proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Wisconsin Central FIPS 4802 Feet
-<102753> +proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102753> +proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Wisconsin South FIPS 4803 Feet
-<102754> +proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102754> +proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Wyoming East FIPS 4901 Feet
-<102755> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.999938 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102755> +proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.999938 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Wyoming East Central FIPS 4902 Feet
-<102756> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.999938 +x_0=399999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102756> +proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.999938 +x_0=399999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Wyoming West Central FIPS 4903 Feet
-<102757> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.999938 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102757> +proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.999938 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Wyoming West FIPS 4904 Feet
-<102758> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.999938 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102758> +proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.999938 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Puerto Rico Virgin Islands FIPS 5200 Feet
-<102761> +proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102761> +proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # NAD 1983 StatePlane Guam FIPS 5400 Feet
-<102766> +proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=49999.99999999999 +y_0=49999.99999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192  no_defs <>
+<102766> +proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=49999.99999999999 +y_0=49999.99999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs <>
 # Belge Lambert 1972
-<103300> +proj=lcc +lat_1=49.8333339 +lat_2=51.16666733333333 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl +units=m  no_defs <>
+<103300> +proj=lcc +lat_1=49.8333339 +lat_2=51.16666733333333 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl +units=m +no_defs <>
 # GCS International 1967
-<4023> +proj=longlat +ellps=aust_SA  no_defs <>
+<4023> +proj=longlat +ellps=aust_SA +no_defs <>
 # GCS Bern 1898
-<4217> +proj=longlat +ellps=bessel  no_defs <>
+<4217> +proj=longlat +ellps=bessel +no_defs <>
 # GCS Voirol Unifie 1960
-<4305> +proj=longlat +ellps=clrk80  no_defs <>
+<4305> +proj=longlat +ellps=clrk80 +no_defs <>
 # GCS Montserrat 1958
-<4404> +proj=longlat +ellps=clrk80  no_defs <>
+<4404> +proj=longlat +ellps=clrk80 +no_defs <>
 # GCS Voirol Unifie 1960 Paris
-<4812> +proj=longlat +ellps=clrk80 +pm=2.337229166666667  no_defs <>
+<4812> +proj=longlat +ellps=clrk80 +pm=2.337229166666667 +no_defs <>
 # GCS WGS 1966
-<37001> +proj=longlat +ellps=WGS66  no_defs <>
+<37001> +proj=longlat +ellps=WGS66 +no_defs <>
 # GCS Fischer 1960
-<37002> +proj=longlat +a=6378166 +b=6356784.283607107  no_defs <>
+<37002> +proj=longlat +a=6378166 +b=6356784.283607107 +no_defs <>
 # GCS Fischer 1968
-<37003> +proj=longlat +a=6378150 +b=6356768.337244385  no_defs <>
+<37003> +proj=longlat +a=6378150 +b=6356768.337244385 +no_defs <>
 # GCS Fischer Modified
-<37004> +proj=longlat +ellps=fschr60m  no_defs <>
+<37004> +proj=longlat +ellps=fschr60m +no_defs <>
 # GCS Hough 1960
-<37005> +proj=longlat +a=6378270 +b=6356794.343434343  no_defs <>
+<37005> +proj=longlat +a=6378270 +b=6356794.343434343 +no_defs <>
 # GCS Everest Modified 1969
-<37006> +proj=longlat +a=6377295.664 +b=6356094.667915204  no_defs <>
+<37006> +proj=longlat +a=6377295.664 +b=6356094.667915204 +no_defs <>
 # GCS Walbeck
-<37007> +proj=longlat +a=6376896 +b=6355834.846687363  no_defs <>
+<37007> +proj=longlat +a=6376896 +b=6355834.846687363 +no_defs <>
 # GCS Sphere ARC INFO
-<37008> +proj=longlat +a=6370997 +b=6370997  no_defs <>
+<37008> +proj=longlat +a=6370997 +b=6370997 +no_defs <>
 # GCS European 1979
-<37201> +proj=longlat +ellps=intl  no_defs <>
+<37201> +proj=longlat +ellps=intl +no_defs <>
 # GCS Everest Bangladesh
-<37202> +proj=longlat +a=6377276.345 +b=6356075.413140239  no_defs <>
+<37202> +proj=longlat +a=6377276.345 +b=6356075.413140239 +no_defs <>
 # GCS Everest India Nepal
-<37203> +proj=longlat +a=6377301.243 +b=6356100.230165385  no_defs <>
+<37203> +proj=longlat +a=6377301.243 +b=6356100.230165385 +no_defs <>
 # GCS Hjorsey 1955
-<37204> +proj=longlat +ellps=intl  no_defs <>
+<37204> +proj=longlat +ellps=intl +no_defs <>
 # GCS Hong Kong 1963
-<37205> +proj=longlat +ellps=intl  no_defs <>
+<37205> +proj=longlat +ellps=intl +no_defs <>
 # GCS Oman
-<37206> +proj=longlat +ellps=clrk80  no_defs <>
+<37206> +proj=longlat +ellps=clrk80 +no_defs <>
 # GCS South Asia Singapore
-<37207> +proj=longlat +ellps=fschr60m  no_defs <>
+<37207> +proj=longlat +ellps=fschr60m +no_defs <>
 # GCS Ayabelle
-<37208> +proj=longlat +ellps=clrk80  no_defs <>
+<37208> +proj=longlat +ellps=clrk80 +no_defs <>
 # GCS Point 58
-<37211> +proj=longlat +ellps=clrk80  no_defs <>
+<37211> +proj=longlat +ellps=clrk80 +no_defs <>
 # GCS Beacon E 1945
-<37212> +proj=longlat +ellps=intl  no_defs <>
+<37212> +proj=longlat +ellps=intl +no_defs <>
 # GCS Tern Island 1961
-<37213> +proj=longlat +ellps=intl  no_defs <>
+<37213> +proj=longlat +ellps=intl +no_defs <>
 # GCS Astro 1952
-<37214> +proj=longlat +ellps=intl  no_defs <>
+<37214> +proj=longlat +ellps=intl +no_defs <>
 # GCS Bellevue IGN
-<37215> +proj=longlat +ellps=intl  no_defs <>
+<37215> +proj=longlat +ellps=intl +no_defs <>
 # GCS Canton 1966
-<37216> +proj=longlat +ellps=intl  no_defs <>
+<37216> +proj=longlat +ellps=intl +no_defs <>
 # GCS Chatham Island 1971
-<37217> +proj=longlat +ellps=intl  no_defs <>
+<37217> +proj=longlat +ellps=intl +no_defs <>
 # GCS DOS 1968
-<37218> +proj=longlat +ellps=intl  no_defs <>
+<37218> +proj=longlat +ellps=intl +no_defs <>
 # GCS Easter Island 1967
-<37219> +proj=longlat +ellps=intl  no_defs <>
+<37219> +proj=longlat +ellps=intl +no_defs <>
 # GCS Guam 1963
-<37220> +proj=longlat +ellps=clrk66  no_defs <>
+<37220> +proj=longlat +ellps=clrk66 +no_defs <>
 # GCS GUX 1
-<37221> +proj=longlat +ellps=intl  no_defs <>
+<37221> +proj=longlat +ellps=intl +no_defs <>
 # GCS Johnston Island 1961
-<37222> +proj=longlat +ellps=intl  no_defs <>
+<37222> +proj=longlat +ellps=intl +no_defs <>
 # GCS Carthage Degree
-<37223> +proj=longlat +a=6378249.2 +b=6356514.999904194  no_defs <>
+<37223> +proj=longlat +a=6378249.2 +b=6356514.999904194 +no_defs <>
 # GCS Midway 1961
-<37224> +proj=longlat +ellps=intl  no_defs <>
+<37224> +proj=longlat +ellps=intl +no_defs <>
 # GCS Pitcairn 1967
-<37226> +proj=longlat +ellps=intl  no_defs <>
+<37226> +proj=longlat +ellps=intl +no_defs <>
 # GCS Santo DOS 1965
-<37227> +proj=longlat +ellps=intl  no_defs <>
+<37227> +proj=longlat +ellps=intl +no_defs <>
 # GCS Viti Levu 1916
-<37228> +proj=longlat +ellps=clrk80  no_defs <>
+<37228> +proj=longlat +ellps=clrk80 +no_defs <>
 # GCS Wake Eniwetok 1960
-<37229> +proj=longlat +a=6378270 +b=6356794.343434343  no_defs <>
+<37229> +proj=longlat +a=6378270 +b=6356794.343434343 +no_defs <>
 # GCS Wake Island 1952
-<37230> +proj=longlat +ellps=intl  no_defs <>
+<37230> +proj=longlat +ellps=intl +no_defs <>
 # GCS Anna 1 1965
-<37231> +proj=longlat +ellps=aust_SA  no_defs <>
+<37231> +proj=longlat +ellps=aust_SA +no_defs <>
 # GCS Gan 1970
-<37232> +proj=longlat +ellps=intl  no_defs <>
+<37232> +proj=longlat +ellps=intl +no_defs <>
 # GCS ISTS 073 1969
-<37233> +proj=longlat +ellps=intl  no_defs <>
+<37233> +proj=longlat +ellps=intl +no_defs <>
 # GCS Kerguelen Island 1949
-<37234> +proj=longlat +ellps=intl  no_defs <>
+<37234> +proj=longlat +ellps=intl +no_defs <>
 # GCS Reunion
-<37235> +proj=longlat +ellps=intl  no_defs <>
+<37235> +proj=longlat +ellps=intl +no_defs <>
 # GCS Ascension Island 1958
-<37237> +proj=longlat +ellps=intl  no_defs <>
+<37237> +proj=longlat +ellps=intl +no_defs <>
 # GCS DOS 71 4
-<37238> +proj=longlat +ellps=intl  no_defs <>
+<37238> +proj=longlat +ellps=intl +no_defs <>
 # GCS Cape Canaveral
-<37239> +proj=longlat +ellps=clrk66  no_defs <>
+<37239> +proj=longlat +ellps=clrk66 +no_defs <>
 # GCS Fort Thomas 1955
-<37240> +proj=longlat +ellps=clrk80  no_defs <>
+<37240> +proj=longlat +ellps=clrk80 +no_defs <>
 # GCS Graciosa Base SW 1948
-<37241> +proj=longlat +ellps=intl  no_defs <>
+<37241> +proj=longlat +ellps=intl +no_defs <>
 # GCS ISTS 061 1968
-<37242> +proj=longlat +ellps=intl  no_defs <>
+<37242> +proj=longlat +ellps=intl +no_defs <>
 # GCS LC5 1961
-<37243> +proj=longlat +ellps=clrk66  no_defs <>
+<37243> +proj=longlat +ellps=clrk66 +no_defs <>
 # GCS Observ Meteorologico 1939
-<37245> +proj=longlat +ellps=intl  no_defs <>
+<37245> +proj=longlat +ellps=intl +no_defs <>
 # GCS Pico de Las Nieves
-<37246> +proj=longlat +ellps=intl  no_defs <>
+<37246> +proj=longlat +ellps=intl +no_defs <>
 # GCS Porto Santo 1936
-<37247> +proj=longlat +ellps=intl  no_defs <>
+<37247> +proj=longlat +ellps=intl +no_defs <>
 # GCS Sao Braz
-<37249> +proj=longlat +ellps=intl  no_defs <>
+<37249> +proj=longlat +ellps=intl +no_defs <>
 # GCS Selvagem Grande 1938
-<37250> +proj=longlat +ellps=intl  no_defs <>
+<37250> +proj=longlat +ellps=intl +no_defs <>
 # GCS Tristan 1968
-<37251> +proj=longlat +ellps=intl  no_defs <>
+<37251> +proj=longlat +ellps=intl +no_defs <>
 # GCS Samoa 1962
-<37252> +proj=longlat +ellps=clrk66  no_defs <>
+<37252> +proj=longlat +ellps=clrk66 +no_defs <>
 # GCS Camp Area
-<37253> +proj=longlat +ellps=intl  no_defs <>
+<37253> +proj=longlat +ellps=intl +no_defs <>
 # GCS Deception Island
-<37254> +proj=longlat +ellps=clrk80  no_defs <>
+<37254> +proj=longlat +ellps=clrk80 +no_defs <>
 # GCS Gunung Segara
-<37255> +proj=longlat +ellps=bessel  no_defs <>
+<37255> +proj=longlat +ellps=bessel +no_defs <>
 # GCS S42 Hungary
-<37257> +proj=longlat +ellps=krass  no_defs <>
+<37257> +proj=longlat +ellps=krass +no_defs <>
 # GCS Kusaie 1951
-<37259> +proj=longlat +ellps=intl  no_defs <>
+<37259> +proj=longlat +ellps=intl +no_defs <>
 # GCS Alaskan Islands
-<37260> +proj=longlat +ellps=clrk66  no_defs <>
+<37260> +proj=longlat +ellps=clrk66 +no_defs <>
 # GCS Assumed Geographic 1
-<104000> +proj=longlat +ellps=clrk66 +datum=NAD27  no_defs <>
+<104000> +proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs <>
 # GCS Estonia 1937
-<104101> +proj=longlat +ellps=bessel  no_defs <>
+<104101> +proj=longlat +ellps=bessel +no_defs <>
 # GCS Hermannskogel
-<104102> +proj=longlat +ellps=bessel  no_defs <>
+<104102> +proj=longlat +ellps=bessel +no_defs <>
 # GCS Sierra Leone 1960
-<104103> +proj=longlat +ellps=clrk80  no_defs <>
+<104103> +proj=longlat +ellps=clrk80 +no_defs <>
 # GCS Hong Kong 1980
-<104104> +proj=longlat +ellps=intl  no_defs <>
+<104104> +proj=longlat +ellps=intl +no_defs <>
 # GCS Datum Lisboa Bessel
-<104105> +proj=longlat +ellps=bessel  no_defs <>
+<104105> +proj=longlat +ellps=bessel +no_defs <>
 # GCS Datum Lisboa Hayford
-<104106> +proj=longlat +ellps=intl  no_defs <>
+<104106> +proj=longlat +ellps=intl +no_defs <>
 # GCS RGF 1993
-<104107> +proj=longlat +ellps=GRS80  no_defs <>
+<104107> +proj=longlat +ellps=GRS80 +no_defs <>
 # GCS NZGD 2000
-<104108> +proj=longlat +ellps=GRS80  no_defs <>
+<104108> +proj=longlat +ellps=GRS80 +no_defs <>
 # GCS Merchich Degree
-<104261> +proj=longlat +a=6378249.2 +b=6356514.999904194  no_defs <>
+<104261> +proj=longlat +a=6378249.2 +b=6356514.999904194 +no_defs <>
 # GCS Voirol 1875 Degree
-<104304> +proj=longlat +a=6378249.2 +b=6356514.999904194  no_defs <>
+<104304> +proj=longlat +a=6378249.2 +b=6356514.999904194 +no_defs <>
 # GCS Voirol Unifie 1960 Degree
-<104305> +proj=longlat +ellps=clrk80  no_defs <>
+<104305> +proj=longlat +ellps=clrk80 +no_defs <>
diff --git a/nad/makefile.vc b/nad/makefile.vc
index 287ff2c..e235e8d 100644
--- a/nad/makefile.vc
+++ b/nad/makefile.vc
@@ -7,7 +7,7 @@
 OLD_GRIDS = conus MD TN WI WO alaska hawaii prvi stgeorge stlrnc stpaul null
 
 OTHER_FILES = FL GL27 nad.lst nad27 nad83 proj_def.dat world epsg esri \
-	esri.extra other.extra IGNF
+	esri.extra other.extra IGNF ITRF2000 ITRF2008 ITRF2014
 
 
 
diff --git a/nad/nad27 b/nad/nad27
index 6e06900..c5e4396 100644
--- a/nad/nad27
+++ b/nad/nad27
@@ -4,6 +4,7 @@
 #     State Plane Coordinate Systems,
 #     North American Datum 1927
 
+<metadata> +lastupdate=1992-12-20
 # 101: alabama east: nad27
 <101> proj=tmerc  datum=NAD27
 lon_0=-85d50 lat_0=30d30 k=.99996
diff --git a/nad/nad83 b/nad/nad83
index e740a4d..1b65f51 100644
--- a/nad/nad83
+++ b/nad/nad83
@@ -4,6 +4,7 @@
 #     State Plane Coordinate Systems,
 #     North American Datum 1983
 
+<metadata> +lastupdate=1992-12-20
 # 101: alabama east: nad83
 <101> proj=tmerc  datum=NAD83
 lon_0=-85d50 lat_0=30d30 k=.99996
diff --git a/nad/other.extra b/nad/other.extra
index 39c27e2..4b5797e 100644
--- a/nad/other.extra
+++ b/nad/other.extra
@@ -1,4 +1,4 @@
-## NAD83 / BC Albers (this has been superceeded but is kept for compatibility)
+## NAD83 / BC Albers (this has been superseded but is kept for compatibility)
 <42102> +proj=aea +ellps=GRS80 +lat_0=45 +lon_0=-126.0 +lat_1=50.0 +lat_2=58.5 +x_0=1000000.0 +y_0=0 +datum=NAD83 +units=m no_defs <>
 
 
diff --git a/nad/proj_outIGNF.dist b/nad/proj_outIGNF.dist
index 45112f6..be666fb 100644
--- a/nad/proj_outIGNF.dist
+++ b/nad/proj_outIGNF.dist
@@ -1,16 +1,16 @@
 +init=./IGNF:NTFG +to +init=./IGNF:RGF93G
  3.300866856 43.4477976569 0.0000	3d18'0.915"E	43d26'52.077"N 0.000
 +init=./IGNF:LAMBE +to +init=./IGNF:LAMB93
- 600000.0000 2600545.4523  0.0000	652760.737	7033791.243 0.000
+ 600000.0000 2600545.4523  0.0000	652760.737	7033791.244 0.000
  135638.3592 2418760.4094  0.0000	187194.062	6855928.882 0.000
  998137.3947 2413822.2844  0.0000	1049052.258	6843776.562 0.000
- 600000.0000 2200000.0000  0.0000	649398.872	6633524.191 0.000
+ 600000.0000 2200000.0000  0.0000	649398.872	6633524.192 0.000
  311552.5340 1906457.4840  0.0000	358799.172	6342652.486 0.000
  960488.4138 1910172.8812  0.0000	1007068.686	6340907.237 0.000
  600000.0000 1699510.8340  0.0000	645204.279	6133556.746 0.000
-1203792.5981 626873.17210  0.0000	1238875.764	5057405.016 0.000
+1203792.5981 626873.17210  0.0000	1238875.764	5057405.017 0.000
 +init=./IGNF:LAMBE +to +init=./IGNF:GEOPORTALFXX
- 600000.0000 2600545.4523  0.0000	179040.148	5610495.275 0.000
+ 600000.0000 2600545.4523  0.0000	179040.148	5610495.276 0.000
  135638.3592 2418760.4094  0.0000	-303729.363	5410118.356 0.000
  998137.3947 2413822.2844  0.0000	592842.792	5410120.554 0.000
  600000.0000 2200000.0000  0.0000	179041.670	5209746.080 0.000
@@ -37,4 +37,4 @@
 2d20'11.7754730" 42d18'00.0824436" 0.0	260109.601	5009175.714 0.000
 9d32'12.6680218" 41d24'00.3542556" 0.0	1061637.534	4889066.592 0.000
 +init=./IGNF:RGR92 +to +init=./IGNF:REUN47
-3356123.5400 1303218.3090 5247430.6050	3353421.833	1304074.314 5248935.607
+3356123.5400 1303218.3090 5247430.6050	3353421.833	1304074.314 5248935.606
diff --git a/nad/test27 b/nad/test27
index 66f6f1c..917f571 100755
--- a/nad/test27
+++ b/nad/test27
@@ -835,7 +835,7 @@ echo "diff ${OUT} with pj_out27.dist"
 diff -b ${OUT} ${NAD_DIR}/pj_out27.dist
 if [ $? -ne 0 ] ; then
 	echo  ""
-	echo "PROBLEMS HAVE OCCURED"
+	echo "PROBLEMS HAVE OCCURRED"
 	echo "test file ${OUT} saved"
     echo
 	exit 100
diff --git a/nad/test83 b/nad/test83
index 4dcb15e..cf182ce 100755
--- a/nad/test83
+++ b/nad/test83
@@ -716,7 +716,7 @@ echo "diff ${OUT} with pj_out83.dist"
 diff -b ${OUT} ${NAD_DIR}/pj_out83.dist
 if [ $? -ne 0 ] ; then
 	echo  ""
-	echo "PROBLEMS HAVE OCCURED"
+	echo "PROBLEMS HAVE OCCURRED"
 	echo "test file ${OUT} saved"
     echo
 	exit 100
diff --git a/nad/testIGNF b/nad/testIGNF
index 6f8437f..0249b43 100755
--- a/nad/testIGNF
+++ b/nad/testIGNF
@@ -154,7 +154,7 @@ echo "diff ${OUT} with ${OUT}.dist"
 diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
 if [ $? -ne 0 ] ; then
 echo  ""
-echo "PROBLEMS HAVE OCCURED"
+echo "PROBLEMS HAVE OCCURRED"
 echo "test file ${OUT} saved"
 echo
 exit 100
diff --git a/nad/testdatumfile b/nad/testdatumfile
index e3f2764..7106bd4 100755
--- a/nad/testdatumfile
+++ b/nad/testdatumfile
@@ -101,7 +101,7 @@ echo "diff ${OUT} with ${OUT}.dist"
 diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
 if [ $? -ne 0 ] ; then
 	echo  ""
-	echo "PROBLEMS HAVE OCCURED"
+	echo "PROBLEMS HAVE OCCURRED"
 	echo "test file ${OUT} saved"
     echo
 	exit 100
diff --git a/nad/testflaky b/nad/testflaky
index 0a28720..970d832 100755
--- a/nad/testflaky
+++ b/nad/testflaky
@@ -61,7 +61,7 @@ echo "diff ${OUT} with ${OUT}.dist"
 diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
 if [ $? -ne 0 ] ; then
 	echo  ""
-	echo "PROBLEMS HAVE OCCURED"
+	echo "PROBLEMS HAVE OCCURRED"
 	echo "test file ${OUT} saved"
     echo
 	exit 100
diff --git a/nad/testntv2 b/nad/testntv2
index 669517d..6983a48 100755
--- a/nad/testntv2
+++ b/nad/testntv2
@@ -60,7 +60,7 @@ echo "diff ${OUT} with ${OUT}.dist"
 diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
 if [ $? -ne 0 ] ; then
 	echo  ""
-	echo "PROBLEMS HAVE OCCURED"
+	echo "PROBLEMS HAVE OCCURRED"
 	echo "test file ${OUT} saved"
     echo
     exit 100
diff --git a/nad/testvarious b/nad/testvarious
index ef1bfbe..4ca20a6 100755
--- a/nad/testvarious
+++ b/nad/testvarious
@@ -283,8 +283,8 @@ $EXE +proj=hammer  +datum=WGS84 \
 EOF
 echo "##############################################################" >> ${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' \
+$EXE +proj=latlong +R=1 +lon_0=0 \
+ +to +proj=healpix +R=1 +lon_0=0  -f '%.'5'f' \
  -E >>${OUT} <<EOF
 0 41.81031
 -90 0
@@ -642,14 +642,14 @@ 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 \
+    +o_proj=moll +a=6378137 +es=0 +o_lon_p=LON_POLE +o_lat_p=LAT_POLE +lon_0=180 \
  -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 \
+    +o_proj=moll +a=6378137 +es=0 +o_lon_p=LON_POLE +o_lat_p=LAT_POLE +lon_0=180 \
  -E >>${OUT} <<EOF
 10 20
 EOF
@@ -891,9 +891,14 @@ echo "diff ${OUT} with ${OUT}.dist"
 diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
 if [ $? -ne 0 ] ; then
 	echo  ""
-	echo "PROBLEMS HAVE OCCURED"
+	echo "PROBLEMS HAVE OCCURRED"
 	echo "test file ${OUT} saved"
     echo
+    echo "----------------------------------------------------------"
+	echo "${OUT}"
+    echo "----------------------------------------------------------"
+    cat ${OUT}
+    echo "----------------------------------------------------------"
 	exit 100
 else
 	echo "TEST OK"
diff --git a/nad/world b/nad/world
index 2018b53..9119eed 100644
--- a/nad/world
+++ b/nad/world
@@ -1,6 +1,8 @@
 # SCCSID @(#)world	1.2 95/08/05 GIE REL
 # proj +init files for various non-U.S. coordinate systems.
 #
+<metadata> +lastupdate=2016-12-12
+
 <CH1903> # Swiss Coordinate System
 	+proj=somerc +lat_0=46d57'8.660"N +lon_0=7d26'22.500"E
 	+ellps=bessel +x_0=600000 +y_0=200000
@@ -146,7 +148,7 @@
 	proj=tmerc ellps=mod_airy lat_0=53d30'N lon_0=8W
 	x_0=200000 y_0=250000 k_0=1.000035
 	no_defs <>
-<neiez> # Netherlands East Indies Equitorial Zone
+<neiez> # Netherlands East Indies Equatorial Zone
 	proj=merc ellps=bessel lon_0=110E
 	x_0=3900000 y_0=900000 k_0=0.997
 	no_defs <>
@@ -176,12 +178,12 @@
 	no_defs <>
 # Gauss Krueger Grid for Germany
 # 
-# The first figure of the easting is lon_0 devided by 3
+# The first figure of the easting is lon_0 divided by 3
 # ( 2 for 6d0E, 3 for 9d0E, 4 for 12d0E)
 # For translations you have to remove this first figure
 # and convert northings and eastings from km to meter .
-# The other way round, devide by 1000 and add the figure.
-# I made 3 entrys for the officially used grids in Germany
+# The other way round, divide by 1000 and add the figure.
+# I made 3 entries for the officially used grids in Germany
 # 
 #
 # Und nochmal in deutsch :
diff --git a/nmake.opt b/nmake.opt
index 2291fad..1d5b54a 100644
--- a/nmake.opt
+++ b/nmake.opt
@@ -24,14 +24,10 @@ PROJ_LIB_DIR=$(INSTDIR)\SHARE
 !IFNDEF DEBUG
 OPTFLAGS=	/Ox /Op /MD
 !ELSE
-OPTFLAGS=	/Zi /MD /Fdproj.pdb
+OPTFLAGS=	/Zi /MDd /Fdproj.pdb
 !ENDIF
 !ENDIF
 
-!IFDEF SELFTEST
-OPTFLAGS= $(OPTFLAGS) -DPJ_SELFTEST
-!ENDIF
-
 # Uncomment the first for linking exes against DLL or second for static
 EXE_PROJ =	proj_i.lib
 #EXE_PROJ =	proj.lib
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8d7e7d1..c4f4dd2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,12 +3,15 @@
 include(lib_proj.cmake)
 
 # configure executable build
-option(BUILD_CS2CS "Build cs2cs (coordinate systems to coordinate systems translation tool)" ON)
-option(BUILD_PROJ "Build proj (cartographic projection tool : latlong <-> projected coordinates" ON)
-option(BUILD_GEOD "Build geod (computation of geodesic lines)" ON)
-option(BUILD_NAD2BIN "Build nad2bin (format conversion tool) " ON)
+option(BUILD_CCT     "Build cct (coordinate conversion and transformation tool)" ON)
+option(BUILD_CS2CS   "Build cs2cs (coordinate systems to coordinate systems translation tool)" ON)
+option(BUILD_GEOD    "Build geod (computation of geodesic lines)" ON)
+option(BUILD_GIE     "Build gie (geospatial integrity investigation environment - a PROJ.4 test tool)" ON)
+option(BUILD_NAD2BIN "Build nad2bin (format conversion tool)" ON)
+option(BUILD_PROJ    "Build proj (cartographic projection tool : latlong <-> projected coordinates)" ON)
 
 if(NOT MSVC)
+
   if (NOT APPLE)
     # Use relative path so that package is relocatable
     set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${LIBDIR}")
@@ -20,27 +23,51 @@ if(NOT MSVC)
     # (2) setting the INSTALL_RPATH property on the executables to
     # "@loader_path/../${LIBDIR}"
   endif ()
+
+else ()
+
+    # Linking to setargv.obj enables wildcard globbing for the
+    # command line utilities, when compiling with MSVC
+    # https://docs.microsoft.com/da-dk/cpp/c-language/expanding-wildcard-arguments
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} setargv.obj")
+
 endif ()
 
+if(BUILD_CCT)
+ include(bin_cct.cmake)
+ set(BIN_TARGETS ${BIN_TARGETS} cct)
+endif(BUILD_CCT)
+
 if(BUILD_CS2CS)
  include(bin_cs2cs.cmake)
+ set(BIN_TARGETS ${BIN_TARGETS} cs2cs)
 endif(BUILD_CS2CS)
 
-if(BUILD_PROJ)
-  include(bin_proj.cmake)
-endif(BUILD_PROJ)
-
 if(BUILD_GEOD)
   include(bin_geod.cmake)
   include(bin_geodtest.cmake)
+  set(BIN_TARGETS ${BIN_TARGETS} geod)
 endif(BUILD_GEOD)
 
 if(BUILD_NAD2BIN)
   include(bin_nad2bin.cmake)
+  set(BIN_TARGETS ${BIN_TARGETS} nad2bin)
 endif(BUILD_NAD2BIN)
 
+if(BUILD_PROJ)
+  include(bin_proj.cmake)
+  set(BIN_TARGETS ${BIN_TARGETS} binproj)
+endif(BUILD_PROJ)
+
+if(BUILD_GIE)
+ include(bin_gie.cmake)
+ set(BIN_TARGETS ${BIN_TARGETS} gie)
+endif(BUILD_GIE)
+
 if (MSVC OR CMAKE_CONFIGURATION_TYPES)
-  # Add _d suffix for your debug versions of the tools
-  set_target_properties (cs2cs binproj geod nad2bin PROPERTIES
-    DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
+  if(BIN_TARGETS)
+    # Add _d suffix for your debug versions of the tools
+    set_target_properties (${BIN_TARGETS} PROPERTIES
+      DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
+  endif(BIN_TARGETS)
 endif ()
diff --git a/src/Makefile.am b/src/Makefile.am
index 8acf277..aebfc22 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,50 +1,61 @@
 AM_CFLAGS = @C_WFLAGS@
 
-bin_PROGRAMS =	proj nad2bin geod cs2cs
+bin_PROGRAMS =	proj nad2bin geod cs2cs gie cct
 EXTRA_PROGRAMS = multistresstest test228
 
+TESTS = geodtest
+check_PROGRAMS = geodtest
+
 AM_CPPFLAGS =	-DPROJ_LIB=\"$(pkgdatadir)\" \
 		-DMUTEX_ at MUTEX_SETTING@ @JNI_INCLUDE@
 
-include_HEADERS = proj_api.h projects.h geodesic.h \
+include_HEADERS = proj.h proj_api.h projects.h geodesic.h \
 	org_proj4_Projections.h org_proj4_PJ.h
 
-EXTRA_DIST = makefile.vc proj.def bin_cs2cs.cmake \
+EXTRA_DIST = makefile.vc proj.def bin_cct.cmake bin_gie.cmake bin_cs2cs.cmake \
 			 bin_geod.cmake bin_nad2bin.cmake bin_proj.cmake \
 			 lib_proj.cmake CMakeLists.txt bin_geodtest.cmake geodtest.c
 
 proj_SOURCES = proj.c gen_cheb.c p_series.c
 cs2cs_SOURCES = cs2cs.c gen_cheb.c p_series.c
+cct_SOURCES = cct.c proj_strtod.c optargpm.h
 nad2bin_SOURCES = nad2bin.c
 geod_SOURCES = geod.c geod_set.c geod_interface.c geod_interface.h
+
+gie_SOURCES = gie.c proj_strtod.c optargpm.h
 multistresstest_SOURCES = multistresstest.c
 test228_SOURCES = test228.c
+geodtest_SOURCES = geodtest.c
 
-proj_LDADD = libproj.la
+cct_LDADD = libproj.la
 cs2cs_LDADD = libproj.la
-nad2bin_LDADD = libproj.la
 geod_LDADD = libproj.la
+proj_LDADD = libproj.la
+nad2bin_LDADD = libproj.la
+
+gie_LDADD = libproj.la
 multistresstest_LDADD = libproj.la @THREAD_LIB@
 test228_LDADD = libproj.la @THREAD_LIB@
+geodtest_LDADD = libproj.la
 
 lib_LTLIBRARIES = libproj.la
 
-libproj_la_LDFLAGS = -no-undefined -version-info 12:0:0
+libproj_la_LDFLAGS = -no-undefined -version-info 13:0:1
 
 libproj_la_SOURCES = \
-	pj_list.h \
+	pj_list.h proj_internal.h\
 	PJ_aeqd.c PJ_gnom.c PJ_laea.c PJ_mod_ster.c \
 	PJ_nsper.c PJ_nzmg.c PJ_ortho.c PJ_stere.c PJ_sterea.c \
-	PJ_aea.c PJ_bipc.c PJ_bonne.c PJ_eqdc.c PJ_isea.c \
+	PJ_aea.c PJ_bipc.c PJ_bonne.c PJ_eqdc.c PJ_isea.c PJ_ccon.c\
 	PJ_imw_p.c PJ_krovak.c PJ_lcc.c PJ_poly.c \
 	PJ_rpoly.c PJ_sconics.c proj_rouss.c \
-	PJ_cass.c PJ_cc.c PJ_cea.c PJ_eqc.c \
-	PJ_gall.c PJ_labrd.c PJ_lsat.c PJ_misrsom.c PJ_merc.c \
+	PJ_cass.c PJ_cc.c PJ_cea.c PJ_eqc.c PJ_gall.c PJ_geoc.c \
+	PJ_labrd.c PJ_lsat.c PJ_misrsom.c PJ_merc.c \
 	PJ_mill.c PJ_ocea.c PJ_omerc.c PJ_somerc.c \
 	PJ_tcc.c PJ_tcea.c PJ_times.c PJ_tmerc.c \
 	PJ_airy.c PJ_aitoff.c PJ_august.c PJ_bacon.c \
 	PJ_chamb.c PJ_hammer.c PJ_lagrng.c PJ_larr.c \
-	PJ_lask.c PJ_nocol.c PJ_ob_tran.c PJ_oea.c \
+	PJ_lask.c PJ_latlong.c PJ_nocol.c PJ_ob_tran.c PJ_oea.c \
 	PJ_tpeqd.c PJ_vandg.c PJ_vandg2.c PJ_vandg4.c \
 	PJ_wag7.c PJ_lcca.c PJ_geos.c proj_etmerc.c \
 	PJ_boggs.c PJ_collg.c PJ_comill.c PJ_crast.c PJ_denoy.c \
@@ -55,14 +66,14 @@ libproj_la_SOURCES = \
 	PJ_nell.c PJ_nell_h.c PJ_patterson.c PJ_putp2.c PJ_putp3.c \
 	PJ_putp4p.c PJ_putp5.c PJ_putp6.c PJ_qsc.c PJ_robin.c \
 	PJ_sch.c PJ_sts.c PJ_urm5.c PJ_urmfps.c PJ_wag2.c \
-	PJ_wag3.c PJ_wink1.c PJ_wink2.c pj_latlong.c pj_geocent.c \
+	PJ_wag3.c PJ_wink1.c PJ_wink2.c pj_geocent.c \
 	aasincos.c adjlon.c bch2bps.c bchgen.c \
 	biveval.c dmstor.c mk_cheby.c pj_auth.c \
 	pj_deriv.c pj_ell_set.c pj_ellps.c pj_errno.c \
-	pj_factors.c pj_fwd.c pj_init.c pj_inv.c pj_fwd3d.c pj_inv3d.c\
+	pj_factors.c pj_fwd.c pj_init.c pj_inv.c \
 	pj_list.c pj_malloc.c pj_mlfn.c pj_msfn.c proj_mdist.c \
 	pj_open_lib.c pj_param.c pj_phi2.c pj_pr_list.c \
-	pj_qsfn.c pj_generic_selftest.c pj_run_selftests.c pj_strerrno.c \
+	pj_qsfn.c pj_strerrno.c \
 	pj_tsfn.c pj_units.c pj_ctx.c pj_log.c pj_zpoly1.c rtodms.c \
 	vector1.c pj_release.c pj_gauss.c \
 	PJ_healpix.c PJ_natearth.c PJ_natearth2.c PJ_calcofi.c pj_fileapi.c \
@@ -72,7 +83,11 @@ libproj_la_SOURCES = \
 	pj_apply_gridshift.c pj_datums.c pj_datum_set.c pj_transform.c \
 	geocent.c geocent.h pj_utils.c pj_gridinfo.c pj_gridlist.c \
 	jniproj.c pj_mutex.c pj_initcache.c pj_apply_vgridshift.c geodesic.c \
-	pj_strtod.c
+	pj_strtod.c \
+	\
+	proj_4D_api.c PJ_cart.c PJ_pipeline.c PJ_horner.c PJ_helmert.c \
+	PJ_vgridshift.c PJ_hgridshift.c PJ_unitconvert.c PJ_molodensky.c \
+	PJ_deformation.c pj_internal.c PJ_axisswap.c
 
 install-exec-local:
 	rm -f $(DESTDIR)$(bindir)/invproj$(EXEEXT)
diff --git a/src/Makefile.in b/src/Makefile.in
index 7af20e2..7385946 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -17,17 +17,7 @@
 
 
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -91,9 +81,14 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 bin_PROGRAMS = proj$(EXEEXT) nad2bin$(EXEEXT) geod$(EXEEXT) \
-	cs2cs$(EXEEXT)
+	cs2cs$(EXEEXT) gie$(EXEEXT) cct$(EXEEXT)
 EXTRA_PROGRAMS = multistresstest$(EXEEXT) test228$(EXEEXT)
+TESTS = geodtest$(EXEEXT)
+check_PROGRAMS = geodtest$(EXEEXT)
 subdir = src
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(srcdir)/proj_config.h.in $(top_srcdir)/depcomp \
+	$(include_HEADERS) $(top_srcdir)/test-driver
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -101,8 +96,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
-	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = proj_config.h
 CONFIG_CLEAN_FILES =
@@ -141,31 +134,30 @@ libproj_la_LIBADD =
 am_libproj_la_OBJECTS = PJ_aeqd.lo PJ_gnom.lo PJ_laea.lo \
 	PJ_mod_ster.lo PJ_nsper.lo PJ_nzmg.lo PJ_ortho.lo PJ_stere.lo \
 	PJ_sterea.lo PJ_aea.lo PJ_bipc.lo PJ_bonne.lo PJ_eqdc.lo \
-	PJ_isea.lo PJ_imw_p.lo PJ_krovak.lo PJ_lcc.lo PJ_poly.lo \
-	PJ_rpoly.lo PJ_sconics.lo proj_rouss.lo PJ_cass.lo PJ_cc.lo \
-	PJ_cea.lo PJ_eqc.lo PJ_gall.lo PJ_labrd.lo PJ_lsat.lo \
-	PJ_misrsom.lo PJ_merc.lo PJ_mill.lo PJ_ocea.lo PJ_omerc.lo \
-	PJ_somerc.lo PJ_tcc.lo PJ_tcea.lo PJ_times.lo PJ_tmerc.lo \
-	PJ_airy.lo PJ_aitoff.lo PJ_august.lo PJ_bacon.lo PJ_chamb.lo \
-	PJ_hammer.lo PJ_lagrng.lo PJ_larr.lo PJ_lask.lo PJ_nocol.lo \
-	PJ_ob_tran.lo PJ_oea.lo PJ_tpeqd.lo PJ_vandg.lo PJ_vandg2.lo \
-	PJ_vandg4.lo PJ_wag7.lo PJ_lcca.lo PJ_geos.lo proj_etmerc.lo \
-	PJ_boggs.lo PJ_collg.lo PJ_comill.lo PJ_crast.lo PJ_denoy.lo \
-	PJ_eck1.lo PJ_eck2.lo PJ_eck3.lo PJ_eck4.lo PJ_eck5.lo \
-	PJ_fahey.lo PJ_fouc_s.lo PJ_gins8.lo PJ_gstmerc.lo \
-	PJ_gn_sinu.lo PJ_goode.lo PJ_igh.lo PJ_hatano.lo PJ_loxim.lo \
-	PJ_mbt_fps.lo PJ_mbtfpp.lo PJ_mbtfpq.lo PJ_moll.lo PJ_nell.lo \
-	PJ_nell_h.lo PJ_patterson.lo PJ_putp2.lo PJ_putp3.lo \
-	PJ_putp4p.lo PJ_putp5.lo PJ_putp6.lo PJ_qsc.lo PJ_robin.lo \
-	PJ_sch.lo PJ_sts.lo PJ_urm5.lo PJ_urmfps.lo PJ_wag2.lo \
-	PJ_wag3.lo PJ_wink1.lo PJ_wink2.lo pj_latlong.lo pj_geocent.lo \
+	PJ_isea.lo PJ_ccon.lo PJ_imw_p.lo PJ_krovak.lo PJ_lcc.lo \
+	PJ_poly.lo PJ_rpoly.lo PJ_sconics.lo proj_rouss.lo PJ_cass.lo \
+	PJ_cc.lo PJ_cea.lo PJ_eqc.lo PJ_gall.lo PJ_geoc.lo PJ_labrd.lo \
+	PJ_lsat.lo PJ_misrsom.lo PJ_merc.lo PJ_mill.lo PJ_ocea.lo \
+	PJ_omerc.lo PJ_somerc.lo PJ_tcc.lo PJ_tcea.lo PJ_times.lo \
+	PJ_tmerc.lo PJ_airy.lo PJ_aitoff.lo PJ_august.lo PJ_bacon.lo \
+	PJ_chamb.lo PJ_hammer.lo PJ_lagrng.lo PJ_larr.lo PJ_lask.lo \
+	PJ_latlong.lo PJ_nocol.lo PJ_ob_tran.lo PJ_oea.lo PJ_tpeqd.lo \
+	PJ_vandg.lo PJ_vandg2.lo PJ_vandg4.lo PJ_wag7.lo PJ_lcca.lo \
+	PJ_geos.lo proj_etmerc.lo PJ_boggs.lo PJ_collg.lo PJ_comill.lo \
+	PJ_crast.lo PJ_denoy.lo PJ_eck1.lo PJ_eck2.lo PJ_eck3.lo \
+	PJ_eck4.lo PJ_eck5.lo PJ_fahey.lo PJ_fouc_s.lo PJ_gins8.lo \
+	PJ_gstmerc.lo PJ_gn_sinu.lo PJ_goode.lo PJ_igh.lo PJ_hatano.lo \
+	PJ_loxim.lo PJ_mbt_fps.lo PJ_mbtfpp.lo PJ_mbtfpq.lo PJ_moll.lo \
+	PJ_nell.lo PJ_nell_h.lo PJ_patterson.lo PJ_putp2.lo \
+	PJ_putp3.lo PJ_putp4p.lo PJ_putp5.lo PJ_putp6.lo PJ_qsc.lo \
+	PJ_robin.lo PJ_sch.lo PJ_sts.lo PJ_urm5.lo PJ_urmfps.lo \
+	PJ_wag2.lo PJ_wag3.lo PJ_wink1.lo PJ_wink2.lo pj_geocent.lo \
 	aasincos.lo adjlon.lo bch2bps.lo bchgen.lo biveval.lo \
 	dmstor.lo mk_cheby.lo pj_auth.lo pj_deriv.lo pj_ell_set.lo \
 	pj_ellps.lo pj_errno.lo pj_factors.lo pj_fwd.lo pj_init.lo \
-	pj_inv.lo pj_fwd3d.lo pj_inv3d.lo pj_list.lo pj_malloc.lo \
-	pj_mlfn.lo pj_msfn.lo proj_mdist.lo pj_open_lib.lo pj_param.lo \
-	pj_phi2.lo pj_pr_list.lo pj_qsfn.lo pj_generic_selftest.lo \
-	pj_run_selftests.lo pj_strerrno.lo pj_tsfn.lo pj_units.lo \
+	pj_inv.lo pj_list.lo pj_malloc.lo pj_mlfn.lo pj_msfn.lo \
+	proj_mdist.lo pj_open_lib.lo pj_param.lo pj_phi2.lo \
+	pj_pr_list.lo pj_qsfn.lo pj_strerrno.lo pj_tsfn.lo pj_units.lo \
 	pj_ctx.lo pj_log.lo pj_zpoly1.lo rtodms.lo vector1.lo \
 	pj_release.lo pj_gauss.lo PJ_healpix.lo PJ_natearth.lo \
 	PJ_natearth2.lo PJ_calcofi.lo pj_fileapi.lo pj_gc_reader.lo \
@@ -173,7 +165,11 @@ am_libproj_la_OBJECTS = PJ_aeqd.lo PJ_gnom.lo PJ_laea.lo \
 	pj_apply_gridshift.lo pj_datums.lo pj_datum_set.lo \
 	pj_transform.lo geocent.lo pj_utils.lo pj_gridinfo.lo \
 	pj_gridlist.lo jniproj.lo pj_mutex.lo pj_initcache.lo \
-	pj_apply_vgridshift.lo geodesic.lo pj_strtod.lo
+	pj_apply_vgridshift.lo geodesic.lo pj_strtod.lo proj_4D_api.lo \
+	PJ_cart.lo PJ_pipeline.lo PJ_horner.lo PJ_helmert.lo \
+	PJ_vgridshift.lo PJ_hgridshift.lo PJ_unitconvert.lo \
+	PJ_molodensky.lo PJ_deformation.lo pj_internal.lo \
+	PJ_axisswap.lo
 libproj_la_OBJECTS = $(am_libproj_la_OBJECTS)
 AM_V_lt = $(am__v_lt_ at AM_V@)
 am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
@@ -183,6 +179,9 @@ libproj_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(libproj_la_LDFLAGS) $(LDFLAGS) -o $@
 PROGRAMS = $(bin_PROGRAMS)
+am_cct_OBJECTS = cct.$(OBJEXT) proj_strtod.$(OBJEXT)
+cct_OBJECTS = $(am_cct_OBJECTS)
+cct_DEPENDENCIES = libproj.la
 am_cs2cs_OBJECTS = cs2cs.$(OBJEXT) gen_cheb.$(OBJEXT) \
 	p_series.$(OBJEXT)
 cs2cs_OBJECTS = $(am_cs2cs_OBJECTS)
@@ -191,6 +190,12 @@ am_geod_OBJECTS = geod.$(OBJEXT) geod_set.$(OBJEXT) \
 	geod_interface.$(OBJEXT)
 geod_OBJECTS = $(am_geod_OBJECTS)
 geod_DEPENDENCIES = libproj.la
+am_geodtest_OBJECTS = geodtest.$(OBJEXT)
+geodtest_OBJECTS = $(am_geodtest_OBJECTS)
+geodtest_DEPENDENCIES = libproj.la
+am_gie_OBJECTS = gie.$(OBJEXT) proj_strtod.$(OBJEXT)
+gie_OBJECTS = $(am_gie_OBJECTS)
+gie_DEPENDENCIES = libproj.la
 am_multistresstest_OBJECTS = multistresstest.$(OBJEXT)
 multistresstest_OBJECTS = $(am_multistresstest_OBJECTS)
 multistresstest_DEPENDENCIES = libproj.la
@@ -237,10 +242,12 @@ AM_V_CCLD = $(am__v_CCLD_ at AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libproj_la_SOURCES) $(cs2cs_SOURCES) $(geod_SOURCES) \
+SOURCES = $(libproj_la_SOURCES) $(cct_SOURCES) $(cs2cs_SOURCES) \
+	$(geod_SOURCES) $(geodtest_SOURCES) $(gie_SOURCES) \
 	$(multistresstest_SOURCES) $(nad2bin_SOURCES) $(proj_SOURCES) \
 	$(test228_SOURCES)
-DIST_SOURCES = $(libproj_la_SOURCES) $(cs2cs_SOURCES) $(geod_SOURCES) \
+DIST_SOURCES = $(libproj_la_SOURCES) $(cct_SOURCES) $(cs2cs_SOURCES) \
+	$(geod_SOURCES) $(geodtest_SOURCES) $(gie_SOURCES) \
 	$(multistresstest_SOURCES) $(nad2bin_SOURCES) $(proj_SOURCES) \
 	$(test228_SOURCES)
 am__can_run_installinfo = \
@@ -269,8 +276,183 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/proj_config.h.in \
-	$(top_srcdir)/depcomp
+am__tty_colors_dummy = \
+  mgn= red= grn= lgn= blu= brg= std=; \
+  am__color_tests=no
+am__tty_colors = { \
+  $(am__tty_colors_dummy); \
+  if test "X$(AM_COLOR_TESTS)" = Xno; then \
+    am__color_tests=no; \
+  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+    am__color_tests=yes; \
+  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+    am__color_tests=yes; \
+  fi; \
+  if test $$am__color_tests = yes; then \
+    red=''; \
+    grn=''; \
+    lgn=''; \
+    blu=''; \
+    mgn=''; \
+    brg=''; \
+    std=''; \
+  fi; \
+}
+am__recheck_rx = ^[ 	]*:recheck:[ 	]*
+am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
+am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+  recheck = 1; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+        { \
+          if ((getline line2 < ($$0 ".log")) < 0) \
+	    recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+        { \
+          recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+        { \
+          break; \
+        } \
+    }; \
+  if (recheck) \
+    print $$0; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+  print "fatal: making $@: " msg | "cat >&2"; \
+  exit 1; \
+} \
+function rst_section(header) \
+{ \
+  print header; \
+  len = length(header); \
+  for (i = 1; i <= len; i = i + 1) \
+    printf "="; \
+  printf "\n\n"; \
+} \
+{ \
+  copy_in_global_log = 1; \
+  global_test_result = "RUN"; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+         fatal("failed to read from " $$0 ".trs"); \
+      if (line ~ /$(am__global_test_result_rx)/) \
+        { \
+          sub("$(am__global_test_result_rx)", "", line); \
+          sub("[ 	]*$$", "", line); \
+          global_test_result = line; \
+        } \
+      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+        copy_in_global_log = 0; \
+    }; \
+  if (copy_in_global_log) \
+    { \
+      rst_section(global_test_result ": " $$0); \
+      while ((rc = (getline line < ($$0 ".log"))) != 0) \
+      { \
+        if (rc < 0) \
+          fatal("failed to read from " $$0 ".log"); \
+        print line; \
+      }; \
+      printf "\n"; \
+    }; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+  --color-tests "$$am__color_tests" \
+  --enable-hard-errors "$$am__enable_hard_errors" \
+  --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test.  Creates the
+# directory for the log if needed.  Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log.  Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup);					\
+$(am__vpath_adj_setup) $(am__vpath_adj)			\
+$(am__tty_colors);					\
+srcdir=$(srcdir); export srcdir;			\
+case "$@" in						\
+  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
+    *) am__odir=.;; 					\
+esac;							\
+test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
+  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
+if test -f "./$$f"; then dir=./;			\
+elif test -f "$$f"; then dir=;				\
+else dir="$(srcdir)/"; fi;				\
+tst=$$dir$$f; log='$@'; 				\
+if test -n '$(DISABLE_HARD_ERRORS)'; then		\
+  am__enable_hard_errors=no; 				\
+else							\
+  am__enable_hard_errors=yes; 				\
+fi; 							\
+case " $(XFAIL_TESTS) " in				\
+  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
+    am__expect_failure=yes;;				\
+  *)							\
+    am__expect_failure=no;;				\
+esac; 							\
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed).  The result is saved in the shell variable
+# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+  bases='$(TEST_LOGS)'; \
+  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+  bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+  case '$@' in \
+    */*) \
+      case '$*' in \
+        */*) b='$*';; \
+          *) b=`echo '$@' | sed 's/\.log$$//'`; \
+       esac;; \
+    *) \
+      b='$*';; \
+  esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+	$(TEST_LOG_FLAGS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -313,7 +495,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -383,7 +564,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -396,41 +576,47 @@ AM_CFLAGS = @C_WFLAGS@
 AM_CPPFLAGS = -DPROJ_LIB=\"$(pkgdatadir)\" \
 		-DMUTEX_ at MUTEX_SETTING@ @JNI_INCLUDE@
 
-include_HEADERS = proj_api.h projects.h geodesic.h \
+include_HEADERS = proj.h proj_api.h projects.h geodesic.h \
 	org_proj4_Projections.h org_proj4_PJ.h
 
-EXTRA_DIST = makefile.vc proj.def bin_cs2cs.cmake \
+EXTRA_DIST = makefile.vc proj.def bin_cct.cmake bin_gie.cmake bin_cs2cs.cmake \
 			 bin_geod.cmake bin_nad2bin.cmake bin_proj.cmake \
 			 lib_proj.cmake CMakeLists.txt bin_geodtest.cmake geodtest.c
 
 proj_SOURCES = proj.c gen_cheb.c p_series.c
 cs2cs_SOURCES = cs2cs.c gen_cheb.c p_series.c
+cct_SOURCES = cct.c proj_strtod.c optargpm.h
 nad2bin_SOURCES = nad2bin.c
 geod_SOURCES = geod.c geod_set.c geod_interface.c geod_interface.h
+gie_SOURCES = gie.c proj_strtod.c optargpm.h
 multistresstest_SOURCES = multistresstest.c
 test228_SOURCES = test228.c
-proj_LDADD = libproj.la
+geodtest_SOURCES = geodtest.c
+cct_LDADD = libproj.la
 cs2cs_LDADD = libproj.la
-nad2bin_LDADD = libproj.la
 geod_LDADD = libproj.la
+proj_LDADD = libproj.la
+nad2bin_LDADD = libproj.la
+gie_LDADD = libproj.la
 multistresstest_LDADD = libproj.la @THREAD_LIB@
 test228_LDADD = libproj.la @THREAD_LIB@
+geodtest_LDADD = libproj.la
 lib_LTLIBRARIES = libproj.la
-libproj_la_LDFLAGS = -no-undefined -version-info 12:0:0
+libproj_la_LDFLAGS = -no-undefined -version-info 13:0:1
 libproj_la_SOURCES = \
-	pj_list.h \
+	pj_list.h proj_internal.h\
 	PJ_aeqd.c PJ_gnom.c PJ_laea.c PJ_mod_ster.c \
 	PJ_nsper.c PJ_nzmg.c PJ_ortho.c PJ_stere.c PJ_sterea.c \
-	PJ_aea.c PJ_bipc.c PJ_bonne.c PJ_eqdc.c PJ_isea.c \
+	PJ_aea.c PJ_bipc.c PJ_bonne.c PJ_eqdc.c PJ_isea.c PJ_ccon.c\
 	PJ_imw_p.c PJ_krovak.c PJ_lcc.c PJ_poly.c \
 	PJ_rpoly.c PJ_sconics.c proj_rouss.c \
-	PJ_cass.c PJ_cc.c PJ_cea.c PJ_eqc.c \
-	PJ_gall.c PJ_labrd.c PJ_lsat.c PJ_misrsom.c PJ_merc.c \
+	PJ_cass.c PJ_cc.c PJ_cea.c PJ_eqc.c PJ_gall.c PJ_geoc.c \
+	PJ_labrd.c PJ_lsat.c PJ_misrsom.c PJ_merc.c \
 	PJ_mill.c PJ_ocea.c PJ_omerc.c PJ_somerc.c \
 	PJ_tcc.c PJ_tcea.c PJ_times.c PJ_tmerc.c \
 	PJ_airy.c PJ_aitoff.c PJ_august.c PJ_bacon.c \
 	PJ_chamb.c PJ_hammer.c PJ_lagrng.c PJ_larr.c \
-	PJ_lask.c PJ_nocol.c PJ_ob_tran.c PJ_oea.c \
+	PJ_lask.c PJ_latlong.c PJ_nocol.c PJ_ob_tran.c PJ_oea.c \
 	PJ_tpeqd.c PJ_vandg.c PJ_vandg2.c PJ_vandg4.c \
 	PJ_wag7.c PJ_lcca.c PJ_geos.c proj_etmerc.c \
 	PJ_boggs.c PJ_collg.c PJ_comill.c PJ_crast.c PJ_denoy.c \
@@ -441,14 +627,14 @@ libproj_la_SOURCES = \
 	PJ_nell.c PJ_nell_h.c PJ_patterson.c PJ_putp2.c PJ_putp3.c \
 	PJ_putp4p.c PJ_putp5.c PJ_putp6.c PJ_qsc.c PJ_robin.c \
 	PJ_sch.c PJ_sts.c PJ_urm5.c PJ_urmfps.c PJ_wag2.c \
-	PJ_wag3.c PJ_wink1.c PJ_wink2.c pj_latlong.c pj_geocent.c \
+	PJ_wag3.c PJ_wink1.c PJ_wink2.c pj_geocent.c \
 	aasincos.c adjlon.c bch2bps.c bchgen.c \
 	biveval.c dmstor.c mk_cheby.c pj_auth.c \
 	pj_deriv.c pj_ell_set.c pj_ellps.c pj_errno.c \
-	pj_factors.c pj_fwd.c pj_init.c pj_inv.c pj_fwd3d.c pj_inv3d.c\
+	pj_factors.c pj_fwd.c pj_init.c pj_inv.c \
 	pj_list.c pj_malloc.c pj_mlfn.c pj_msfn.c proj_mdist.c \
 	pj_open_lib.c pj_param.c pj_phi2.c pj_pr_list.c \
-	pj_qsfn.c pj_generic_selftest.c pj_run_selftests.c pj_strerrno.c \
+	pj_qsfn.c pj_strerrno.c \
 	pj_tsfn.c pj_units.c pj_ctx.c pj_log.c pj_zpoly1.c rtodms.c \
 	vector1.c pj_release.c pj_gauss.c \
 	PJ_healpix.c PJ_natearth.c PJ_natearth2.c PJ_calcofi.c pj_fileapi.c \
@@ -458,13 +644,17 @@ libproj_la_SOURCES = \
 	pj_apply_gridshift.c pj_datums.c pj_datum_set.c pj_transform.c \
 	geocent.c geocent.h pj_utils.c pj_gridinfo.c pj_gridlist.c \
 	jniproj.c pj_mutex.c pj_initcache.c pj_apply_vgridshift.c geodesic.c \
-	pj_strtod.c
+	pj_strtod.c \
+	\
+	proj_4D_api.c PJ_cart.c PJ_pipeline.c PJ_horner.c PJ_helmert.c \
+	PJ_vgridshift.c PJ_hgridshift.c PJ_unitconvert.c PJ_molodensky.c \
+	PJ_deformation.c pj_internal.c PJ_axisswap.c
 
 all: proj_config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -477,6 +667,7 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -496,8 +687,8 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 proj_config.h: stamp-h1
-	@test -f $@ || rm -f stamp-h1
-	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
 
 stamp-h1: $(srcdir)/proj_config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
@@ -597,6 +788,19 @@ clean-binPROGRAMS:
 	echo " rm -f" $$list; \
 	rm -f $$list
 
+clean-checkPROGRAMS:
+	@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
+cct$(EXEEXT): $(cct_OBJECTS) $(cct_DEPENDENCIES) $(EXTRA_cct_DEPENDENCIES) 
+	@rm -f cct$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(cct_OBJECTS) $(cct_LDADD) $(LIBS)
+
 cs2cs$(EXEEXT): $(cs2cs_OBJECTS) $(cs2cs_DEPENDENCIES) $(EXTRA_cs2cs_DEPENDENCIES) 
 	@rm -f cs2cs$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(cs2cs_OBJECTS) $(cs2cs_LDADD) $(LIBS)
@@ -605,6 +809,14 @@ geod$(EXEEXT): $(geod_OBJECTS) $(geod_DEPENDENCIES) $(EXTRA_geod_DEPENDENCIES)
 	@rm -f geod$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(geod_OBJECTS) $(geod_LDADD) $(LIBS)
 
+geodtest$(EXEEXT): $(geodtest_OBJECTS) $(geodtest_DEPENDENCIES) $(EXTRA_geodtest_DEPENDENCIES) 
+	@rm -f geodtest$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(geodtest_OBJECTS) $(geodtest_LDADD) $(LIBS)
+
+gie$(EXEEXT): $(gie_OBJECTS) $(gie_DEPENDENCIES) $(EXTRA_gie_DEPENDENCIES) 
+	@rm -f gie$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(gie_OBJECTS) $(gie_LDADD) $(LIBS)
+
 multistresstest$(EXEEXT): $(multistresstest_OBJECTS) $(multistresstest_DEPENDENCIES) $(EXTRA_multistresstest_DEPENDENCIES) 
 	@rm -f multistresstest$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(multistresstest_OBJECTS) $(multistresstest_LDADD) $(LIBS)
@@ -632,18 +844,22 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_airy.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_aitoff.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_august.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_axisswap.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_bacon.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_bipc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_boggs.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_bonne.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_calcofi.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_cart.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_cass.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_cc.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_ccon.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_cea.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_chamb.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_collg.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_comill.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_crast.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_deformation.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_denoy.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_eck1.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_eck2.Plo at am__quote@
@@ -655,6 +871,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_fahey.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_fouc_s.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_gall.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_geoc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_geos.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_gins8.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_gn_sinu.Plo at am__quote@
@@ -664,6 +881,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_hammer.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_hatano.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_healpix.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_helmert.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_hgridshift.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_horner.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_igh.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_imw_p.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_isea.Plo at am__quote@
@@ -673,6 +893,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_lagrng.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_larr.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_lask.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_latlong.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_lcc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_lcca.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_loxim.Plo at am__quote@
@@ -685,6 +906,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_misrsom.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_mod_ster.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_moll.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_molodensky.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_natearth.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_natearth2.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_nell.Plo at am__quote@
@@ -698,6 +920,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_omerc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_ortho.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_patterson.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_pipeline.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_poly.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_putp2.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_putp3.Plo at am__quote@
@@ -718,11 +941,13 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_times.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_tmerc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_tpeqd.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_unitconvert.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_urm5.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_urmfps.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_vandg.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_vandg2.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_vandg4.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_vgridshift.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_wag2.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_wag3.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PJ_wag7.Plo at am__quote@
@@ -733,6 +958,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bch2bps.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bchgen.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/biveval.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cct.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cs2cs.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dmstor.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/emess.Plo at am__quote@
@@ -742,6 +968,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/geod_interface.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/geod_set.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/geodesic.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/geodtest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gie.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/jniproj.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mk_cheby.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/multistresstest.Po at am__quote@
@@ -763,19 +991,16 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_factors.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_fileapi.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_fwd.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_fwd3d.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_gauss.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_gc_reader.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_generic_selftest.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_geocent.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_gridcatalog.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_gridinfo.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_gridlist.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_init.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_initcache.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_internal.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_inv.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_inv3d.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_latlong.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_list.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_log.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_malloc.Plo at am__quote@
@@ -788,7 +1013,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_pr_list.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_qsfn.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_release.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_run_selftests.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_strerrno.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_strtod.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_transform.Plo at am__quote@
@@ -797,9 +1021,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_utils.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pj_zpoly1.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/proj.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/proj_4D_api.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/proj_etmerc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/proj_mdist.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/proj_rouss.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/proj_strtod.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rtodms.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test228.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vector1.Plo at am__quote@
@@ -809,14 +1035,14 @@ distclean-compile:
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -904,6 +1130,169 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+	rm -f $< $@
+	$(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+	@:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+	@$(am__set_TESTS_bases); \
+	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+	redo_bases=`for i in $$bases; do \
+	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+	            done`; \
+	if test -n "$$redo_bases"; then \
+	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+	  if $(am__make_dryrun); then :; else \
+	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+	  fi; \
+	fi; \
+	if test -n "$$am__remaking_logs"; then \
+	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+	       "recursion detected" >&2; \
+	else \
+	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+	fi; \
+	if $(am__make_dryrun); then :; else \
+	  st=0;  \
+	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+	  for i in $$redo_bases; do \
+	    test -f $$i.trs && test -r $$i.trs \
+	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+	    test -f $$i.log && test -r $$i.log \
+	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+	  done; \
+	  test $$st -eq 0 || exit 1; \
+	fi
+	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+	ws='[ 	]'; \
+	results=`for b in $$bases; do echo $$b.trs; done`; \
+	test -n "$$results" || results=/dev/null; \
+	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
+	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
+	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
+	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
+	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+	  success=true; \
+	else \
+	  success=false; \
+	fi; \
+	br='==================='; br=$$br$$br$$br$$br; \
+	result_count () \
+	{ \
+	    if test x"$$1" = x"--maybe-color"; then \
+	      maybe_colorize=yes; \
+	    elif test x"$$1" = x"--no-color"; then \
+	      maybe_colorize=no; \
+	    else \
+	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	    fi; \
+	    shift; \
+	    desc=$$1 count=$$2; \
+	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
+	      color_start=$$3 color_end=$$std; \
+	    else \
+	      color_start= color_end=; \
+	    fi; \
+	    echo "$${color_start}# $$desc $$count$${color_end}"; \
+	}; \
+	create_testsuite_report () \
+	{ \
+	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
+	  result_count $$1 "PASS: " $$pass  "$$grn"; \
+	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
+	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+	  result_count $$1 "FAIL: " $$fail  "$$red"; \
+	  result_count $$1 "XPASS:" $$xpass "$$red"; \
+	  result_count $$1 "ERROR:" $$error "$$mgn"; \
+	}; \
+	{								\
+	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
+	    $(am__rst_title);						\
+	  create_testsuite_report --no-color;				\
+	  echo;								\
+	  echo ".. contents:: :depth: 2";				\
+	  echo;								\
+	  for b in $$bases; do echo $$b; done				\
+	    | $(am__create_global_log);					\
+	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
+	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
+	if $$success; then						\
+	  col="$$grn";							\
+	 else								\
+	  col="$$red";							\
+	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
+	fi;								\
+	echo "$${col}$$br$${std}"; 					\
+	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
+	echo "$${col}$$br$${std}"; 					\
+	create_testsuite_report --maybe-color;				\
+	echo "$$col$$br$$std";						\
+	if $$success; then :; else					\
+	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
+	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
+	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
+	  fi;								\
+	  echo "$$col$$br$$std";					\
+	fi;								\
+	$$success || exit 1
+
+check-TESTS:
+	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
+	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+	@set +e; $(am__set_TESTS_bases); \
+	log_list=`for i in $$bases; do echo $$i.log; done`; \
+	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+	exit $$?;
+recheck: all $(check_PROGRAMS)
+	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+	@set +e; $(am__set_TESTS_bases); \
+	bases=`for i in $$bases; do echo $$i; done \
+	         | $(am__list_recheck_tests)` || exit 1; \
+	log_list=`for i in $$bases; do echo $$i.log; done`; \
+	log_list=`echo $$log_list`; \
+	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+	        am__force_recheck=am--force-recheck \
+	        TEST_LOGS="$$log_list"; \
+	exit $$?
+geodtest.log: geodtest$(EXEEXT)
+	@p='geodtest$(EXEEXT)'; \
+	b='geodtest'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+	@p='$<'; \
+	$(am__set_b); \
+	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+ at am__EXEEXT_TRUE@.test$(EXEEXT).log:
+ at am__EXEEXT_TRUE@	@p='$<'; \
+ at am__EXEEXT_TRUE@	$(am__set_b); \
+ at am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ at am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
+ at am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ at am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
+
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -935,6 +1324,8 @@ distdir: $(DISTFILES)
 	  fi; \
 	done
 check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
 check: check-am
 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) proj_config.h
 install-binPROGRAMS: install-libLTLIBRARIES
@@ -963,6 +1354,9 @@ install-strip:
 	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
 	fi
 mostlyclean-generic:
+	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 
@@ -975,8 +1369,8 @@ maintainer-clean-generic:
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
-	clean-libtool mostlyclean-am
+clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+	clean-libLTLIBRARIES clean-libtool mostlyclean-am
 
 distclean: distclean-am
 	-rm -rf ./$(DEPDIR)
@@ -1046,27 +1440,26 @@ ps-am:
 uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
 	uninstall-libLTLIBRARIES
 
-.MAKE: all install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
-	clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
-	clean-libtool cscopelist-am ctags ctags-am distclean \
-	distclean-compile distclean-generic distclean-hdr \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-binPROGRAMS \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-exec-local install-html \
-	install-html-am install-includeHEADERS install-info \
-	install-info-am install-libLTLIBRARIES install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
+.MAKE: all check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+	clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+	clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
+	ctags-am distclean distclean-compile distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-exec-local \
+	install-html install-html-am install-includeHEADERS \
+	install-info install-info-am install-libLTLIBRARIES \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \
+	uninstall uninstall-am uninstall-binPROGRAMS \
 	uninstall-includeHEADERS uninstall-libLTLIBRARIES
 
-.PRECIOUS: Makefile
-
 
 install-exec-local:
 	rm -f $(DESTDIR)$(bindir)/invproj$(EXEEXT)
diff --git a/src/PJ_aea.c b/src/PJ_aea.c
index f30d3b6..74628f9 100644
--- a/src/PJ_aea.c
+++ b/src/PJ_aea.c
@@ -28,10 +28,12 @@
  *****************************************************************************/
 
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include <errno.h>
+#include "projects.h"
 
-# define EPS10	1.e-10
-# define TOL7	1.e-7
+# define EPS10  1.e-10
+# define TOL7   1.e-7
 
 PROJ_HEAD(aea, "Albers Equal Area") "\n\tConic Sph&Ell\n\tlat_1= lat_2=";
 PROJ_HEAD(leac, "Lambert Equal Area Conic") "\n\tConic, Sph&Ell\n\tlat_1= south";
@@ -42,288 +44,177 @@ PROJ_HEAD(leac, "Lambert Equal Area Conic") "\n\tConic, Sph&Ell\n\tlat_1= south"
 # define EPSILON 1.0e-7
 # define TOL 1.0e-10
 static double phi1_(double qs, double Te, double Tone_es) {
-	int i;
-	double Phi, sinpi, cospi, con, com, dphi;
-
-	Phi = asin (.5 * qs);
-	if (Te < EPSILON)
-		return( Phi );
-	i = N_ITER;
-	do {
-		sinpi = sin (Phi);
-		cospi = cos (Phi);
-		con = Te * sinpi;
-		com = 1. - con * con;
-		dphi = .5 * com * com / cospi * (qs / Tone_es -
-		   sinpi / com + .5 / Te * log ((1. - con) /
-		   (1. + con)));
-		Phi += dphi;
-	} while (fabs(dphi) > TOL && --i);
-	return( i ? Phi : HUGE_VAL );
+    int i;
+    double Phi, sinpi, cospi, con, com, dphi;
+
+    Phi = asin (.5 * qs);
+    if (Te < EPSILON)
+        return( Phi );
+    i = N_ITER;
+    do {
+        sinpi = sin (Phi);
+        cospi = cos (Phi);
+        con = Te * sinpi;
+        com = 1. - con * con;
+        dphi = .5 * com * com / cospi * (qs / Tone_es -
+           sinpi / com + .5 / Te * log ((1. - con) /
+           (1. + con)));
+        Phi += dphi;
+    } while (fabs(dphi) > TOL && --i);
+    return( i ? Phi : HUGE_VAL );
 }
 
 
 struct pj_opaque {
-	double	ec;
-	double	n;
-	double	c;
-	double	dd;
-	double	n2;
-	double	rho0;
-	double	rho;
-	double	phi1;
-	double	phi2;
-	double	*en;
-	int		ellips;
+    double  ec;
+    double  n;
+    double  c;
+    double  dd;
+    double  n2;
+    double  rho0;
+    double  rho;
+    double  phi1;
+    double  phi2;
+    double  *en;
+    int     ellips;
 };
 
 
+static void *destructor (PJ *P, int errlev) {                        /* Destructor */
+    if (0==P)
+        return 0;
+
+    if (0==P->opaque)
+        return pj_default_destructor (P, errlev);
+
+    pj_dealloc (P->opaque->en);
+    return pj_default_destructor (P, errlev);
+}
+
+
+
+
 
 static XY e_forward (LP lp, PJ *P) {   /* Ellipsoid/spheroid, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	if ((Q->rho = Q->c - (Q->ellips ? Q->n * pj_qsfn(sin(lp.phi),
-		P->e, P->one_es) : Q->n2 * sin(lp.phi))) < 0.) F_ERROR
-	Q->rho = Q->dd * sqrt(Q->rho);
-	xy.x = Q->rho * sin( lp.lam *= Q->n );
-	xy.y = Q->rho0 - Q->rho * cos(lp.lam);
-	return xy;
+    Q->rho = Q->c - (Q->ellips ? Q->n * pj_qsfn(sin(lp.phi), P->e, P->one_es) : Q->n2 * sin(lp.phi));;
+    if (Q->rho < 0.) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
+    Q->rho = Q->dd * sqrt(Q->rho);
+    xy.x = Q->rho * sin( lp.lam *= Q->n );
+    xy.y = Q->rho0 - Q->rho * cos(lp.lam);
+    return xy;
 }
 
 
 static LP e_inverse (XY xy, PJ *P) {   /* Ellipsoid/spheroid, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	if( (Q->rho = hypot(xy.x, xy.y = Q->rho0 - xy.y)) != 0.0 ) {
-		if (Q->n < 0.) {
-			Q->rho = -Q->rho;
-			xy.x = -xy.x;
-			xy.y = -xy.y;
-		}
-		lp.phi =  Q->rho / Q->dd;
-		if (Q->ellips) {
-			lp.phi = (Q->c - lp.phi * lp.phi) / Q->n;
-			if (fabs(Q->ec - fabs(lp.phi)) > TOL7) {
-				if ((lp.phi = phi1_(lp.phi, P->e, P->one_es)) == HUGE_VAL)
-					I_ERROR
-			} else
-				lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI;
-		} else if (fabs(lp.phi = (Q->c - lp.phi * lp.phi) / Q->n2) <= 1.)
-			lp.phi = asin(lp.phi);
-		else
-			lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI;
-		lp.lam = atan2(xy.x, xy.y) / Q->n;
-	} else {
-		lp.lam = 0.;
-		lp.phi = Q->n > 0. ? M_HALFPI : - M_HALFPI;
-	}
-	return lp;
+    if( (Q->rho = hypot(xy.x, xy.y = Q->rho0 - xy.y)) != 0.0 ) {
+        if (Q->n < 0.) {
+            Q->rho = -Q->rho;
+            xy.x = -xy.x;
+            xy.y = -xy.y;
+        }
+        lp.phi =  Q->rho / Q->dd;
+        if (Q->ellips) {
+            lp.phi = (Q->c - lp.phi * lp.phi) / Q->n;
+            if (fabs(Q->ec - fabs(lp.phi)) > TOL7) {
+                if ((lp.phi = phi1_(lp.phi, P->e, P->one_es)) == HUGE_VAL) {
+                    proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+                    return lp;
+                }
+            } else
+                lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI;
+        } else if (fabs(lp.phi = (Q->c - lp.phi * lp.phi) / Q->n2) <= 1.)
+            lp.phi = asin(lp.phi);
+        else
+            lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI;
+        lp.lam = atan2(xy.x, xy.y) / Q->n;
+    } else {
+        lp.lam = 0.;
+        lp.phi = Q->n > 0. ? M_HALFPI : - M_HALFPI;
+    }
+    return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                        /* Destructor */
-    if (0==P)
-        return 0;
-
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque->en);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 static PJ *setup(PJ *P) {
-	double cosphi, sinphi;
-	int secant;
+    double cosphi, sinphi;
+    int secant;
     struct pj_opaque *Q = P->opaque;
 
     P->inv = e_inverse;
     P->fwd = e_forward;
 
-	if (fabs(Q->phi1 + Q->phi2) < EPS10) E_ERROR(-21);
-	Q->n = sinphi = sin(Q->phi1);
-	cosphi = cos(Q->phi1);
-	secant = fabs(Q->phi1 - Q->phi2) >= EPS10;
-	if( (Q->ellips = (P->es > 0.))) {
-		double ml1, m1;
-
-		if (!(Q->en = pj_enfn(P->es))) E_ERROR_0;
-		m1 = pj_msfn(sinphi, cosphi, P->es);
-		ml1 = pj_qsfn(sinphi, P->e, P->one_es);
-		if (secant) { /* secant cone */
-			double ml2, m2;
-
-			sinphi = sin(Q->phi2);
-			cosphi = cos(Q->phi2);
-			m2 = pj_msfn(sinphi, cosphi, P->es);
-			ml2 = pj_qsfn(sinphi, P->e, P->one_es);
-			Q->n = (m1 * m1 - m2 * m2) / (ml2 - ml1);
-		}
-		Q->ec = 1. - .5 * P->one_es * log((1. - P->e) /
-			(1. + P->e)) / P->e;
-		Q->c = m1 * m1 + Q->n * ml1;
-		Q->dd = 1. / Q->n;
-		Q->rho0 = Q->dd * sqrt(Q->c - Q->n * pj_qsfn(sin(P->phi0),
-			P->e, P->one_es));
-	} else {
-		if (secant) Q->n = .5 * (Q->n + sin(Q->phi2));
-		Q->n2 = Q->n + Q->n;
-		Q->c = cosphi * cosphi + Q->n2 * sinphi;
-		Q->dd = 1. / Q->n;
-		Q->rho0 = Q->dd * sqrt(Q->c - Q->n2 * sin(P->phi0));
-	}
-
-	return P;
+    if (fabs(Q->phi1 + Q->phi2) < EPS10)
+        return destructor(P, PJD_ERR_CONIC_LAT_EQUAL);
+    Q->n = sinphi = sin(Q->phi1);
+    cosphi = cos(Q->phi1);
+    secant = fabs(Q->phi1 - Q->phi2) >= EPS10;
+    if( (Q->ellips = (P->es > 0.))) {
+        double ml1, m1;
+
+        if (!(Q->en = pj_enfn(P->es)))
+            return destructor(P, 0);
+        m1 = pj_msfn(sinphi, cosphi, P->es);
+        ml1 = pj_qsfn(sinphi, P->e, P->one_es);
+        if (secant) { /* secant cone */
+            double ml2, m2;
+
+            sinphi = sin(Q->phi2);
+            cosphi = cos(Q->phi2);
+            m2 = pj_msfn(sinphi, cosphi, P->es);
+            ml2 = pj_qsfn(sinphi, P->e, P->one_es);
+            if (ml2 == ml1)
+                return destructor(P, 0);
+
+            Q->n = (m1 * m1 - m2 * m2) / (ml2 - ml1);
+        }
+        Q->ec = 1. - .5 * P->one_es * log((1. - P->e) /
+            (1. + P->e)) / P->e;
+        Q->c = m1 * m1 + Q->n * ml1;
+        Q->dd = 1. / Q->n;
+        Q->rho0 = Q->dd * sqrt(Q->c - Q->n * pj_qsfn(sin(P->phi0),
+            P->e, P->one_es));
+    } else {
+        if (secant) Q->n = .5 * (Q->n + sin(Q->phi2));
+        Q->n2 = Q->n + Q->n;
+        Q->c = cosphi * cosphi + Q->n2 * sinphi;
+        Q->dd = 1. / Q->n;
+        Q->rho0 = Q->dd * sqrt(Q->c - Q->n2 * sin(P->phi0));
+    }
+
+    return P;
 }
 
 
 PJ *PROJECTION(aea) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
-	Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f;
-	Q->phi2 = pj_param(P->ctx, P->params, "rlat_2").f;
-    setup(P);
-    return P;
+    Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f;
+    Q->phi2 = pj_param(P->ctx, P->params, "rlat_2").f;
+    return setup(P);
 }
 
 
 PJ *PROJECTION(leac) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
-	Q->phi2 = pj_param(P->ctx, P->params, "rlat_1").f;
-	Q->phi1 = pj_param(P->ctx, P->params, "bsouth").i ? - M_HALFPI: M_HALFPI;
-    setup (P);
-    return P;
+    Q->phi2 = pj_param(P->ctx, P->params, "rlat_1").f;
+    Q->phi1 = pj_param(P->ctx, P->params, "bsouth").i ? - M_HALFPI: M_HALFPI;
+    return setup(P);
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_aea_selftest (void) {return 10000;}
-#else
-
-int pj_aea_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=aea   +ellps=GRS80  +lat_1=0 +lat_2=2"};
-    char s_args[] = {"+proj=aea   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222571.60875710563,  110653.32674302977},
-        {222706.30650839131,  -110484.26714439997},
-        {-222571.60875710563,  110653.32674302977},
-        {-222706.30650839131,  -110484.26714439997},
-    };
-
-    XY s_fwd_expect[] = {
-        {223334.08517088494,  111780.43188447191},
-        {223470.15499168713,  -111610.33943099028},
-        {-223334.08517088494,  111780.43188447191},
-        {-223470.15499168713,  -111610.33943099028},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017966310597749514,  0.00090436885862202158},
-        {0.0017966300767030448,  -0.00090437009538581453},
-        {-0.0017966310597749514,  0.00090436885862202158},
-        {-0.0017966300767030448,  -0.00090437009538581453},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017904935979658752,  0.00089524594491375306},
-        {0.0017904926216016812,  -0.00089524716502493225},
-        {-0.0017904935979658752,  0.00089524594491375306},
-        {-0.0017904926216016812,  -0.00089524716502493225},
-    };
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-
-
-#ifndef PJ_SELFTEST
-int pj_leac_selftest (void) {return 10000;}
-#else
-
-int pj_leac_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=leac   +ellps=GRS80  +lat_1=0 +lat_2=2"};
-    char s_args[] = {"+proj=leac   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {220685.14054297868,  112983.50088939646},
-        {224553.31227982609,  -108128.63674487274},
-        {-220685.14054297868,  112983.50088939646},
-        {-224553.31227982609,  -108128.63674487274},
-    };
-
-    XY s_fwd_expect[] = {
-        {221432.86859285168,  114119.45452653214},
-        {225331.72412711097,  -109245.82943505641},
-        {-221432.86859285168,  114119.45452653214},
-        {-225331.72412711097,  -109245.82943505641},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017966446840328458,  0.00090435171340223211},
-        {0.0017966164523713021,  -0.00090438724081843625},
-        {-0.0017966446840328458,  0.00090435171340223211},
-        {-0.0017966164523713021,  -0.00090438724081843625},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017905070979748127,  0.00089522906964877795},
-        {0.001790479121519977,  -0.00089526404022281043},
-        {-0.0017905070979748127,  0.00089522906964877795},
-        {-0.001790479121519977,  -0.00089526404022281043},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-#endif
diff --git a/src/PJ_aeqd.c b/src/PJ_aeqd.c
index d1dcdaa..b627b43 100644
--- a/src/PJ_aeqd.c
+++ b/src/PJ_aeqd.c
@@ -27,7 +27,16 @@
 
 #define PJ_LIB__
 #include "geodesic.h"
-#include <projects.h>
+#include <proj.h>
+#include <errno.h>
+#include "projects.h"
+
+enum Mode {
+    N_POLE = 0,
+    S_POLE = 1,
+    EQUIT  = 2,
+    OBLIQ  = 3
+};
 
 struct pj_opaque {
     double  sinph0;
@@ -38,7 +47,7 @@ struct pj_opaque {
     double  Mp;
     double  He;
     double  G;
-    int     mode;
+    enum Mode mode;
     struct geod_geodesic g;
 };
 
@@ -47,10 +56,18 @@ PROJ_HEAD(aeqd, "Azimuthal Equidistant") "\n\tAzi, Sph&Ell\n\tlat_0 guam";
 #define EPS10 1.e-10
 #define TOL 1.e-14
 
-#define N_POLE  0
-#define S_POLE  1
-#define EQUIT   2
-#define OBLIQ   3
+
+static void *destructor (PJ *P, int errlev) {                        /* Destructor */
+    if (0==P)
+        return 0;
+
+    if (0==P->opaque)
+        return pj_default_destructor (P, errlev);
+
+    pj_dealloc (P->opaque->en);
+    return pj_default_destructor (P, errlev);
+}
+
 
 
 static XY e_guam_fwd(LP lp, PJ *P) {        /* Guam elliptical */
@@ -82,6 +99,7 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     switch (Q->mode) {
     case N_POLE:
         coslam = - coslam;
+        /*-fallthrough*/
     case S_POLE:
         xy.x = (rho = fabs(Q->Mp - pj_mlfn(lp.phi, sinphi, cosphi, Q->en))) *
             sin(lp.lam);
@@ -123,8 +141,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
         xy.y = Q->sinph0 * sinphi + Q->cosph0 * cosphi * coslam;
 oblcon:
         if (fabs(fabs(xy.y) - 1.) < TOL)
-            if (xy.y < 0.)
-                F_ERROR
+            if (xy.y < 0.) {
+                proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+                return xy;
+            }
             else
                 xy.x = xy.y = 0.;
         else {
@@ -138,8 +158,12 @@ oblcon:
     case N_POLE:
         lp.phi = -lp.phi;
         coslam = -coslam;
+        /*-fallthrough*/
     case S_POLE:
-        if (fabs(lp.phi - M_HALFPI) < EPS10) F_ERROR;
+        if (fabs(lp.phi - M_HALFPI) < EPS10) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         xy.x = (xy.y = (M_HALFPI + lp.phi)) * sin(lp.lam);
         xy.y *= coslam;
         break;
@@ -151,7 +175,7 @@ oblcon:
 static LP e_guam_inv(XY xy, PJ *P) { /* Guam elliptical */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-    double x2, t;
+    double x2, t = 0.0;
     int i;
 
     x2 = 0.5 * xy.x * xy.x;
@@ -204,7 +228,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     double cosc, c_rh, sinc;
 
     if ((c_rh = hypot(xy.x, xy.y)) > M_PI) {
-        if (c_rh - EPS10 > M_PI) I_ERROR;
+        if (c_rh - EPS10 > M_PI) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        }
         c_rh = M_PI;
     } else if (c_rh < EPS10) {
         lp.phi = P->phi0;
@@ -236,30 +263,12 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    if (P->opaque->en)
-        pj_dealloc(P->opaque->en);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(aeqd) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
     geod_init(&Q->g, P->a, P->es / (1 + sqrt(P->one_es)));
     P->phi0 = pj_param(P->ctx, P->params, "rlat_0").f;
@@ -276,11 +285,12 @@ PJ *PROJECTION(aeqd) {
         Q->sinph0 = sin(P->phi0);
         Q->cosph0 = cos(P->phi0);
     }
-    if (! P->es) {
+    if (P->es == 0.0) {
         P->inv = s_inverse;
         P->fwd = s_forward;
     } else {
-        if (!(Q->en = pj_enfn(P->es))) E_ERROR_0;
+        if (!(Q->en = pj_enfn(P->es)))
+            return pj_default_destructor (P, 0);
         if (pj_param(P->ctx, P->params, "bguam").i) {
             Q->M1 = pj_mlfn(P->phi0, Q->sinph0, Q->cosph0, Q->en);
             P->inv = e_guam_inv;
@@ -310,61 +320,3 @@ PJ *PROJECTION(aeqd) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_aeqd_selftest (void) {return 0;}
-#else
-
-int pj_aeqd_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=aeqd   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=aeqd   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222616.522190051648,  110596.996549550197},
-        { 222616.522190051648, -110596.996549550211},
-        {-222616.522190051648,  110596.996549550197},
-        {-222616.522190051648, -110596.996549550211},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223379.456047271,  111723.757570854126},
-        { 223379.456047271, -111723.757570854126},
-        {-223379.456047271,  111723.757570854126},
-        {-223379.456047271, -111723.757570854126},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00179663056838724787,  0.000904369476930248902},
-        { 0.00179663056838724787, -0.000904369476930248469},
-        {-0.00179663056838724787,  0.000904369476930248902},
-        {-0.00179663056838724787, -0.000904369476930248469},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049310992953335,  0.000895246554746200623},
-        { 0.00179049310992953335, -0.000895246554746200623},
-        {-0.00179049310992953335,  0.000895246554746200623},
-        {-0.00179049310992953335, -0.000895246554746200623},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_airy.c b/src/PJ_airy.c
index 3a91986..c256a07 100644
--- a/src/PJ_airy.c
+++ b/src/PJ_airy.c
@@ -27,160 +27,125 @@
  *****************************************************************************/
 
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(airy, "Airy") "\n\tMisc Sph, no inv.\n\tno_cut lat_b=";
 
 
+enum Mode {
+    N_POLE = 0,
+    S_POLE = 1,
+    EQUIT  = 2,
+    OBLIQ  = 3
+};
+
 struct pj_opaque {
-	double	p_halfpi;
-	double	sinph0;
-	double	cosph0;
-	double	Cb;
-	int		mode;
-	int		no_cut;	/* do not cut at hemisphere limit */
+    double  p_halfpi;
+    double  sinph0;
+    double  cosph0;
+    double  Cb;
+    enum Mode mode;
+    int     no_cut; /* do not cut at hemisphere limit */
 };
 
 
 # define EPS 1.e-10
-# define N_POLE	0
-# define S_POLE 1
-# define EQUIT	2
-# define OBLIQ	3
-
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double  sinlam, coslam, cosphi, sinphi, t, s, Krho, cosz;
-
-	sinlam = sin(lp.lam);
-	coslam = cos(lp.lam);
-	switch (Q->mode) {
-	case EQUIT:
-	case OBLIQ:
-		sinphi = sin(lp.phi);
-		cosphi = cos(lp.phi);
-		cosz = cosphi * coslam;
-		if (Q->mode == OBLIQ)
-			cosz = Q->sinph0 * sinphi + Q->cosph0 * cosz;
-		if (!Q->no_cut && cosz < -EPS)
-			F_ERROR;
-		if (fabs(s = 1. - cosz) > EPS) {
-			t = 0.5 * (1. + cosz);
-			Krho = -log(t)/s - Q->Cb / t;
-		} else
-			Krho = 0.5 - Q->Cb;
-		xy.x = Krho * cosphi * sinlam;
-		if (Q->mode == OBLIQ)
-			xy.y = Krho * (Q->cosph0 * sinphi -
-				Q->sinph0 * cosphi * coslam);
-		else
-			xy.y = Krho * sinphi;
-		break;
-	case S_POLE:
-	case N_POLE:
-		lp.phi = fabs(Q->p_halfpi - lp.phi);
-		if (!Q->no_cut && (lp.phi - EPS) > M_HALFPI)
-			F_ERROR;
-		if ((lp.phi *= 0.5) > EPS) {
-			t = tan(lp.phi);
-			Krho = -2.*(log(cos(lp.phi)) / t + t * Q->Cb);
-			xy.x = Krho * sinlam;
-			xy.y = Krho * coslam;
-			if (Q->mode == N_POLE)
-				xy.y = -xy.y;
-		} else
-			xy.x = xy.y = 0.;
-	}
-	return xy;
+    double  sinlam, coslam, cosphi, sinphi, t, s, Krho, cosz;
+
+    sinlam = sin(lp.lam);
+    coslam = cos(lp.lam);
+    switch (Q->mode) {
+    case EQUIT:
+    case OBLIQ:
+        sinphi = sin(lp.phi);
+        cosphi = cos(lp.phi);
+        cosz = cosphi * coslam;
+        if (Q->mode == OBLIQ)
+            cosz = Q->sinph0 * sinphi + Q->cosph0 * cosz;
+        if (!Q->no_cut && cosz < -EPS) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
+        if (fabs(s = 1. - cosz) > EPS) {
+            t = 0.5 * (1. + cosz);
+            Krho = -log(t)/s - Q->Cb / t;
+        } else
+            Krho = 0.5 - Q->Cb;
+        xy.x = Krho * cosphi * sinlam;
+        if (Q->mode == OBLIQ)
+            xy.y = Krho * (Q->cosph0 * sinphi -
+                Q->sinph0 * cosphi * coslam);
+        else
+            xy.y = Krho * sinphi;
+        break;
+    case S_POLE:
+    case N_POLE:
+        lp.phi = fabs(Q->p_halfpi - lp.phi);
+        if (!Q->no_cut && (lp.phi - EPS) > M_HALFPI) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
+        if ((lp.phi *= 0.5) > EPS) {
+            t = tan(lp.phi);
+            Krho = -2.*(log(cos(lp.phi)) / t + t * Q->Cb);
+            xy.x = Krho * sinlam;
+            xy.y = Krho * coslam;
+            if (Q->mode == N_POLE)
+                xy.y = -xy.y;
+        } else
+            xy.x = xy.y = 0.;
+    }
+    return xy;
 }
 
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(airy) {
-	double beta;
+    double beta;
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
 
     P->opaque = Q;
 
-	Q->no_cut = pj_param(P->ctx, P->params, "bno_cut").i;
-	beta = 0.5 * (M_HALFPI - pj_param(P->ctx, P->params, "rlat_b").f);
-	if (fabs(beta) < EPS)
-		Q->Cb = -0.5;
-	else {
-		Q->Cb = 1./tan(beta);
-		Q->Cb *= Q->Cb * log(cos(beta));
-	}
-
-	if (fabs(fabs(P->phi0) - M_HALFPI) < EPS)
-		if (P->phi0 < 0.) {
-			Q->p_halfpi = -M_HALFPI;
-			Q->mode = S_POLE;
-		} else {
-			Q->p_halfpi =  M_HALFPI;
-			Q->mode = N_POLE;
-		}
-	else {
-		if (fabs(P->phi0) < EPS)
-			Q->mode = EQUIT;
-		else {
-			Q->mode = OBLIQ;
-			Q->sinph0 = sin(P->phi0);
-			Q->cosph0 = cos(P->phi0);
-		}
-	}
-	P->fwd = s_forward;
-	P->es = 0.;
+    Q->no_cut = pj_param(P->ctx, P->params, "bno_cut").i;
+    beta = 0.5 * (M_HALFPI - pj_param(P->ctx, P->params, "rlat_b").f);
+    if (fabs(beta) < EPS)
+        Q->Cb = -0.5;
+    else {
+        Q->Cb = 1./tan(beta);
+        Q->Cb *= Q->Cb * log(cos(beta));
+    }
+
+    if (fabs(fabs(P->phi0) - M_HALFPI) < EPS)
+        if (P->phi0 < 0.) {
+            Q->p_halfpi = -M_HALFPI;
+            Q->mode = S_POLE;
+        } else {
+            Q->p_halfpi =  M_HALFPI;
+            Q->mode = N_POLE;
+        }
+    else {
+        if (fabs(P->phi0) < EPS)
+            Q->mode = EQUIT;
+        else {
+            Q->mode = OBLIQ;
+            Q->sinph0 = sin(P->phi0);
+            Q->cosph0 = cos(P->phi0);
+        }
+    }
+    P->fwd = s_forward;
+    P->es = 0.;
     return P;
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_airy_selftest (void) {return 0;}
-#else
-
-int pj_airy_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=airy   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 189109.88690862127,   94583.752387504152},
-        { 189109.88690862127,  -94583.752387504152},
-        {-189109.88690862127,   94583.752387504152},
-        {-189109.88690862127,  -94583.752387504152},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 0, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-#endif
diff --git a/src/PJ_aitoff.c b/src/PJ_aitoff.c
index 5cd717b..c4a5abd 100644
--- a/src/PJ_aitoff.c
+++ b/src/PJ_aitoff.c
@@ -29,12 +29,19 @@
  *****************************************************************************/
 
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include <errno.h>
+#include "projects.h"
 
 
+enum Mode {
+    AITOFF = 0,
+    WINKEL_TRIPEL = 1
+};
+
 struct pj_opaque {
-	double	cosphi1;
-	int		mode;
+    double  cosphi1;
+    enum Mode mode;
 };
 
 
@@ -51,18 +58,18 @@ FORWARD(s_forward); /* spheroid */
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double c, d;
-
-	if((d = acos(cos(lp.phi) * cos(c = 0.5 * lp.lam)))) {/* basic Aitoff */
-		xy.x = 2. * d * cos(lp.phi) * sin(c) * (xy.y = 1. / sin(d));
-		xy.y *= d * sin(lp.phi);
-	} else
-		xy.x = xy.y = 0.;
-	if (Q->mode) { /* Winkel Tripel */
-		xy.x = (xy.x + lp.lam * Q->cosphi1) * 0.5;
-		xy.y = (xy.y + lp.phi) * 0.5;
-	}
-	return (xy);
+    double c, d;
+
+    if((d = acos(cos(lp.phi) * cos(c = 0.5 * lp.lam))) != 0.0) {/* basic Aitoff */
+        xy.x = 2. * d * cos(lp.phi) * sin(c) * (xy.y = 1. / sin(d));
+        xy.y *= d * sin(lp.phi);
+    } else
+        xy.x = xy.y = 0.;
+    if (Q->mode == WINKEL_TRIPEL) {
+        xy.x = (xy.x + lp.lam * Q->cosphi1) * 0.5;
+        xy.y = (xy.y + lp.phi) * 0.5;
+    }
+    return (xy);
 }
 
 /***********************************************************************************
@@ -90,95 +97,82 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
     int iter, MAXITER = 10, round = 0, MAXROUND = 20;
-	double EPSILON = 1e-12, D, C, f1, f2, f1p, f1l, f2p, f2l, dp, dl, sl, sp, cp, cl, x, y;
-
-	if ((fabs(xy.x) < EPSILON) && (fabs(xy.y) < EPSILON )) { lp.phi = 0.; lp.lam = 0.; return lp; }
-
-	/* intial values for Newton-Raphson method */
-	lp.phi = xy.y; lp.lam = xy.x;
-	do {
-		iter = 0;
-		do {
-			sl = sin(lp.lam * 0.5); cl = cos(lp.lam * 0.5);
-			sp = sin(lp.phi); cp = cos(lp.phi);
-			D = cp * cl;
- 		      	C = 1. - D * D;
-			D = acos(D) / pow(C, 1.5);
-	       		f1 = 2. * D * C * cp * sl;
-		       	f2 = D * C * sp;
-		       	f1p = 2.* (sl * cl * sp * cp / C - D * sp * sl);
-		       	f1l = cp * cp * sl * sl / C + D * cp * cl * sp * sp;
-		    	f2p = sp * sp * cl / C + D * sl * sl * cp;
-		      	f2l = 0.5 * (sp * cp * sl / C - D * sp * cp * cp * sl * cl);
-		      	if (Q->mode) { /* Winkel Tripel */
-				f1 = 0.5 * (f1 + lp.lam * Q->cosphi1);
-				f2 = 0.5 * (f2 + lp.phi);
-				f1p *= 0.5;
-				f1l = 0.5 * (f1l + Q->cosphi1);
-				f2p = 0.5 * (f2p + 1.);
-				f2l *= 0.5;
-			}
-			f1 -= xy.x; f2 -= xy.y;
-			dl = (f2 * f1p - f1 * f2p) / (dp = f1p * f2l - f2p * f1l);
-			dp = (f1 * f2l - f2 * f1l) / dp;
-			while (dl > M_PI) dl -= M_PI; /* set to interval [-M_PI, M_PI]  */
-			while (dl < -M_PI) dl += M_PI; /* set to interval [-M_PI, M_PI]  */
-			lp.phi -= dp;	lp.lam -= dl;
-		} while ((fabs(dp) > EPSILON || fabs(dl) > EPSILON) && (iter++ < MAXITER));
-		if (lp.phi > M_PI_2) lp.phi -= 2.*(lp.phi-M_PI_2); /* correct if symmetrical solution for Aitoff */
-		if (lp.phi < -M_PI_2) lp.phi -= 2.*(lp.phi+M_PI_2); /* correct if symmetrical solution for Aitoff */
-		if ((fabs(fabs(lp.phi) - M_PI_2) < EPSILON) && (!Q->mode)) lp.lam = 0.; /* if pole in Aitoff, return longitude of 0 */
-
-		/* calculate x,y coordinates with solution obtained */
-		if((D = acos(cos(lp.phi) * cos(C = 0.5 * lp.lam)))) {/* Aitoff */
-			x = 2. * D * cos(lp.phi) * sin(C) * (y = 1. / sin(D));
-			y *= D * sin(lp.phi);
-		} else
-			x = y = 0.;
-		if (Q->mode) { /* Winkel Tripel */
-			x = (x + lp.lam * Q->cosphi1) * 0.5;
-			y = (y + lp.phi) * 0.5;
-		}
-	/* if too far from given values of x,y, repeat with better approximation of phi,lam */
-	} while (((fabs(xy.x-x) > EPSILON) || (fabs(xy.y-y) > EPSILON)) && (round++ < MAXROUND));
-
-	if (iter == MAXITER && round == MAXROUND) fprintf(stderr, "Warning: Accuracy of 1e-12 not reached. Last increments: dlat=%e and dlon=%e\n", dp, dl);
-
-	return lp;
+    double EPSILON = 1e-12, D, C, f1, f2, f1p, f1l, f2p, f2l, dp, dl, sl, sp, cp, cl, x, y;
+
+    if ((fabs(xy.x) < EPSILON) && (fabs(xy.y) < EPSILON )) { lp.phi = 0.; lp.lam = 0.; return lp; }
+
+    /* initial values for Newton-Raphson method */
+    lp.phi = xy.y; lp.lam = xy.x;
+    do {
+        iter = 0;
+        do {
+            sl = sin(lp.lam * 0.5); cl = cos(lp.lam * 0.5);
+            sp = sin(lp.phi); cp = cos(lp.phi);
+            D = cp * cl;
+                C = 1. - D * D;
+            D = acos(D) / pow(C, 1.5);
+                f1 = 2. * D * C * cp * sl;
+                f2 = D * C * sp;
+                f1p = 2.* (sl * cl * sp * cp / C - D * sp * sl);
+                f1l = cp * cp * sl * sl / C + D * cp * cl * sp * sp;
+                f2p = sp * sp * cl / C + D * sl * sl * cp;
+                f2l = 0.5 * (sp * cp * sl / C - D * sp * cp * cp * sl * cl);
+                if (Q->mode == WINKEL_TRIPEL) {
+                f1 = 0.5 * (f1 + lp.lam * Q->cosphi1);
+                f2 = 0.5 * (f2 + lp.phi);
+                f1p *= 0.5;
+                f1l = 0.5 * (f1l + Q->cosphi1);
+                f2p = 0.5 * (f2p + 1.);
+                f2l *= 0.5;
+            }
+            f1 -= xy.x; f2 -= xy.y;
+            dl = (f2 * f1p - f1 * f2p) / (dp = f1p * f2l - f2p * f1l);
+            dp = (f1 * f2l - f2 * f1l) / dp;
+            dl = fmod(dl, M_PI); /* set to interval [-M_PI, M_PI] */
+            lp.phi -= dp;   lp.lam -= dl;
+        } while ((fabs(dp) > EPSILON || fabs(dl) > EPSILON) && (iter++ < MAXITER));
+        if (lp.phi > M_PI_2) lp.phi -= 2.*(lp.phi-M_PI_2); /* correct if symmetrical solution for Aitoff */
+        if (lp.phi < -M_PI_2) lp.phi -= 2.*(lp.phi+M_PI_2); /* correct if symmetrical solution for Aitoff */
+        if ((fabs(fabs(lp.phi) - M_PI_2) < EPSILON) && (Q->mode == AITOFF)) lp.lam = 0.; /* if pole in Aitoff, return longitude of 0 */
+
+        /* calculate x,y coordinates with solution obtained */
+        if((D = acos(cos(lp.phi) * cos(C = 0.5 * lp.lam))) != 0.0) {/* Aitoff */
+            x = 2. * D * cos(lp.phi) * sin(C) * (y = 1. / sin(D));
+            y *= D * sin(lp.phi);
+        } else
+            x = y = 0.;
+        if (Q->mode == WINKEL_TRIPEL) {
+            x = (x + lp.lam * Q->cosphi1) * 0.5;
+            y = (y + lp.phi) * 0.5;
+        }
+    /* if too far from given values of x,y, repeat with better approximation of phi,lam */
+    } while (((fabs(xy.x-x) > EPSILON) || (fabs(xy.y-y) > EPSILON)) && (round++ < MAXROUND));
+
+    if (iter == MAXITER && round == MAXROUND)
+        {
+            pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
+            /* fprintf(stderr, "Warning: Accuracy of 1e-12 not reached. Last increments: dlat=%e and dlon=%e\n", dp, dl); */
+        }
+
+    return lp;
 }
 
 
-
-static void *freeup_new (PJ *P) {                        /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 static PJ *setup(PJ *P) {
-	P->inv = s_inverse;
-	P->fwd = s_forward;
-	P->es = 0.;
-	return P;
+    P->inv = s_inverse;
+    P->fwd = s_forward;
+    P->es = 0.;
+    return P;
 }
 
 
 PJ *PROJECTION(aitoff) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
-	Q->mode = 0;
+    Q->mode = AITOFF;
     return setup(P);
 }
 
@@ -186,108 +180,17 @@ PJ *PROJECTION(aitoff) {
 PJ *PROJECTION(wintri) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
-	Q->mode = 1;
-	if (pj_param(P->ctx, P->params, "tlat_1").i) {
-		if ((Q->cosphi1 = cos(pj_param(P->ctx, P->params, "rlat_1").f)) == 0.)
-			E_ERROR(-22)
+    Q->mode = WINKEL_TRIPEL;
+    if (pj_param(P->ctx, P->params, "tlat_1").i) {
+        if ((Q->cosphi1 = cos(pj_param(P->ctx, P->params, "rlat_1").f)) == 0.)
+            return pj_default_destructor (P, PJD_ERR_LAT_LARGER_THAN_90);
     }
-	else /* 50d28' or acos(2/pi) */
-		Q->cosphi1 = 0.636619772367581343;
+    else /* 50d28' or acos(2/pi) */
+        Q->cosphi1 = 0.636619772367581343;
     return setup(P);
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_aitoff_selftest (void) {return 0;}
-#else
-
-int pj_aitoff_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=aitoff   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-
-    XY s_fwd_expect[] = {
-        {223379.45881169615,  111706.74288385305},
-        {223379.45881169615,  -111706.74288385305},
-        {-223379.45881169615,  111706.74288385305},
-        {-223379.45881169615,  -111706.74288385305},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-
-    LP s_inv_expect[] = {
-        {0.0017904931100388164,  0.00089524655491012516},
-        {0.0017904931100388164,  -0.00089524655491012516},
-        {-0.0017904931100388164,  0.00089524655491012516},
-        {-0.0017904931100388164,  -0.00089524655491012516},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
-
-
-
-#ifndef PJ_SELFTEST
-int pj_wintri_selftest (void) {return 0;}
-#else
-
-int pj_wintri_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wintri   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {223390.80153348515,  111703.90750574505},
-        {223390.80153348515,  -111703.90750574505},
-        {-223390.80153348515,  111703.90750574505},
-        {-223390.80153348515,  -111703.90750574505},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017904931099113196,  0.00089524655490101819},
-        {0.0017904931099113196,  -0.00089524655490101819},
-        {-0.0017904931099113196,  0.00089524655490101819},
-        {-0.0017904931099113196,  -0.00089524655490101819},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_august.c b/src/PJ_august.c
index f502893..ba9ea5c 100644
--- a/src/PJ_august.c
+++ b/src/PJ_august.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include	<projects.h>
+#include	"projects.h"
 
 
 PROJ_HEAD(august, "August Epicycloidal") "\n\tMisc Sph, no inv.";
@@ -23,15 +23,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(august) {
     P->inv = 0;
@@ -40,32 +31,3 @@ PJ *PROJECTION(august) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_august_selftest (void) {return 0;}
-#else
-
-int pj_august_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=august   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {223404.97818097242,  111722.34028976287},
-        {223404.97818097242,  -111722.34028976287},
-        {-223404.97818097242,  111722.34028976287},
-        {-223404.97818097242,  -111722.34028976287},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_axisswap.c b/src/PJ_axisswap.c
new file mode 100644
index 0000000..44446d9
--- /dev/null
+++ b/src/PJ_axisswap.c
@@ -0,0 +1,295 @@
+/***********************************************************************
+
+        Axis order operation for use with transformation pipelines.
+
+                Kristian Evers, kreve at sdfe.dk, 2017-10-31
+
+************************************************************************
+
+Change the order and sign of 2,3 or 4 axes. Each of the possible four
+axes are numbered with 1-4, such that the first input axis is 1, the
+second is 2 and so on. The output ordering is controlled by a list of the
+input axes re-ordered to the new mapping. Examples:
+
+Reversing the order of the axes:
+
+    +proj=axisswap +order=4,3,2,1
+
+Swapping the first two axes (x and y):
+
+    +proj=axisswap +order=2,1,3,4
+
+The direction, or sign, of an axis can be changed by adding a minus in
+front of the axis-number:
+
+    +proj=axisswap +order=1,-2,3,4
+
+It is only necessary to specify the axes that are affected by the swap
+operation:
+
+    +proj=axisswap +order=2,1
+
+************************************************************************
+* Copyright (c) 2017, Kristian Evers / SDFE
+*
+* 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.
+*
+***********************************************************************/
+
+#define PJ_LIB__
+#include <errno.h>
+#include "proj_internal.h"
+#include "projects.h"
+
+PROJ_HEAD(axisswap, "Axis ordering");
+
+struct pj_opaque {
+    unsigned int axis[4];
+    int sign[4];
+};
+
+static int sign(int x) {
+    return (x > 0) - (x < 0);
+}
+
+static XY forward_2d(LP lp, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    unsigned int i;
+    PJ_COORD out, in;
+
+    in.lp = lp;
+    out = proj_coord_error();
+
+    for (i=0; i<2; i++)
+        out.v[i] = in.v[Q->axis[i]] * Q->sign[i];
+
+    return out.xy;
+}
+
+
+static LP reverse_2d(XY xy, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    unsigned int i;
+    PJ_COORD out, in;
+
+    in.xy = xy;
+    out = proj_coord_error();
+
+    for (i=0; i<2; i++)
+        out.v[Q->axis[i]] = in.v[i] * Q->sign[i];
+
+    return out.lp;
+}
+
+
+static XYZ forward_3d(LPZ lpz, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    unsigned int i;
+    PJ_COORD out, in;
+
+    in.lpz = lpz;
+    out = proj_coord_error();
+
+    for (i=0; i<3; i++)
+        out.v[i] = in.v[Q->axis[i]] * Q->sign[i];
+
+    return out.xyz;
+}
+
+static LPZ reverse_3d(XYZ xyz, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    unsigned int i;
+    PJ_COORD in, out;
+
+    out = proj_coord_error();
+    in.xyz = xyz;
+
+    for (i=0; i<3; i++)
+        out.v[Q->axis[i]] = in.v[i] * Q->sign[i];
+
+    return out.lpz;
+}
+
+
+static PJ_COORD forward_4d(PJ_COORD coo, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    unsigned int i;
+    PJ_COORD out;
+
+    out = proj_coord_error();
+
+    for (i=0; i<4; i++)
+        out.v[i] = coo.v[Q->axis[i]] * Q->sign[i];
+
+    return out;
+}
+
+
+static PJ_COORD reverse_4d(PJ_COORD coo, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    unsigned int i;
+    PJ_COORD out;
+
+    out = proj_coord_error();
+
+    for (i=0; i<4; i++)
+        out.v[Q->axis[i]] = coo.v[i] * Q->sign[i];
+
+    return out;
+}
+
+
+/***********************************************************************/
+PJ *CONVERSION(axisswap,0) {
+/***********************************************************************/
+    struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
+    char *s;
+    unsigned int i, j, n = 0;
+
+    if (0==Q)
+        return pj_default_destructor (P, ENOMEM);
+    P->opaque = (void *) Q;
+
+
+    /* +order and +axis are mutually exclusive */
+    if ( !pj_param_exists(P->params, "order") == !pj_param_exists(P->params, "axis") )
+        return pj_default_destructor(P, PJD_ERR_AXIS);
+
+    /* fill axis list with indices from 4-7 to simplify duplicate search further down */
+    for (i=0; i<4; i++) {
+        Q->axis[i] = i+4;
+        Q->sign[i] = 1;
+    }
+
+    /* if the "order" parameter is used */
+    if ( pj_param_exists(P->params, "order") ) {
+        /* read axis order */
+        char *order = pj_param(P->ctx, P->params, "sorder").s;
+
+        /* check that all characters are valid */
+        for (i=0; i<strlen(order); i++)
+            if (strchr("1234-,", order[i]) == 0) {
+                proj_log_error(P, "axisswap: unknown axis '%c'", order[i]);
+                return pj_default_destructor(P, PJD_ERR_AXIS);
+            }
+
+        /* read axes numbers and signs */
+        for ( s = order, n = 0; *s != '\0' && n < 4; ) {
+            Q->axis[n] = abs(atoi(s))-1;
+            if (Q->axis[n] > 3) {
+                proj_log_error(P, "axisswap: invalid axis '%d'", Q->axis[n]);
+                return pj_default_destructor(P, PJD_ERR_AXIS);
+            }
+            Q->sign[n++] = sign(atoi(s));
+            while ( *s != '\0' && *s != ',' )
+                s++;
+            if ( *s == ',' )
+                s++;
+        }
+    }
+
+    /* if the "axis" parameter is used */
+    if ( pj_param_exists(P->params, "axis") ) {
+        /* parse the classic PROJ.4 enu axis specification */
+        for (i=0; i < 3; i++) {
+            switch(P->axis[i]) {
+                case 'w':
+                    Q->sign[i] = -1;
+                    Q->axis[i] = 0;
+                    break;
+                case 'e':
+                    Q->sign[i] = 1;
+                    Q->axis[i] = 0;
+                    break;
+                case 's':
+                    Q->sign[i] = -1;
+                    Q->axis[i] = 1;
+                    break;
+                case 'n':
+                    Q->sign[i] = 1;
+                    Q->axis[i] = 1;
+                    break;
+                case 'd':
+                    Q->sign[i] = -1;
+                    Q->axis[i] = 2;
+                    break;
+                case 'u':
+                    Q->sign[i] = 1;
+                    Q->axis[i] = 2;
+                    break;
+                default:
+                    proj_log_error(P, "axisswap: unknown axis '%c'", P->axis[i]);
+                    return pj_default_destructor(P, PJD_ERR_AXIS);
+            }
+        }
+        n = 3;
+    }
+
+    /* check for duplicate axes */
+    for (i=0; i<4; i++)
+        for (j=0; j<4; j++) {
+            if (i==j)
+                continue;
+            if (Q->axis[i] == Q->axis[j]) {
+                proj_log_error(P, "swapaxis: duplicate axes specified");
+                return pj_default_destructor(P, PJD_ERR_AXIS);
+            }
+        }
+
+
+    /* only map fwd/inv functions that are possible with the given axis setup */
+    if (n == 4) {
+        P->fwd4d = forward_4d;
+        P->inv4d = reverse_4d;
+    }
+    if (n == 3 && Q->axis[0] < 3 && Q->axis[1] < 3 && Q->axis[2] < 3) {
+        P->fwd3d  = forward_3d;
+        P->inv3d  = reverse_3d;
+    }
+    if (n == 2 && Q->axis[0] < 2 && Q->axis[1] < 2) {
+        P->fwd    = forward_2d;
+        P->inv    = reverse_2d;
+    }
+
+
+    if (P->fwd4d == NULL && P->fwd3d == NULL && P->fwd == NULL) {
+        proj_log_error(P, "swapaxis: bad axis order");
+        return pj_default_destructor(P, PJD_ERR_AXIS);
+    }
+
+    if (pj_param(P->ctx, P->params, "tangularunits").i) {
+        P->left  = PJ_IO_UNITS_ANGULAR;
+        P->right = PJ_IO_UNITS_ANGULAR;
+    } else {
+        P->left  = PJ_IO_UNITS_PROJECTED;
+        P->right = PJ_IO_UNITS_PROJECTED;
+    }
+
+
+    /* Preparation and finalization steps are skipped, since the raison   */
+    /* d'etre of axisswap is to bring input coordinates in line with the  */
+    /* the internally expected order (ENU), such that handling of offsets */
+    /* etc. can be done correctly in a later step of a pipeline */
+    P->skip_fwd_prepare  = 1;
+    P->skip_fwd_finalize = 1;
+    P->skip_inv_prepare  = 1;
+    P->skip_inv_finalize = 1;
+
+    return P;
+}
diff --git a/src/PJ_bacon.c b/src/PJ_bacon.c
index a9c6da4..802ddcb 100644
--- a/src/PJ_bacon.c
+++ b/src/PJ_bacon.c
@@ -1,6 +1,7 @@
 # define HLFPI2	2.46740110027233965467      /* (pi/2)^2 */
 # define EPS	1e-10
 #define PJ_LIB__
+#include	<errno.h>
 #include	<projects.h>
 
 
@@ -34,26 +35,11 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(bacon) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
 	Q->bacn = 1;
@@ -67,7 +53,7 @@ PJ *PROJECTION(bacon) {
 PJ *PROJECTION(apian) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
 	Q->bacn = Q->ortl = 0;
@@ -80,7 +66,7 @@ PJ *PROJECTION(apian) {
 PJ *PROJECTION(ortel) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
 	Q->bacn = 0;
@@ -91,89 +77,3 @@ PJ *PROJECTION(ortel) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_bacon_selftest (void) {return 0;}
-#else
-int pj_bacon_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=bacon   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {223334.13255596498,  175450.72592266591},
-        {223334.13255596498,  -175450.72592266591},
-        {-223334.13255596498,  175450.72592266591},
-        {-223334.13255596498,  -175450.72592266591},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 0, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-#endif
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_apian_selftest (void) {return 0;}
-#else
-int pj_apian_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=apian   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223374.57735525275,   111701.07212763709},
-        { 223374.57735525275,  -111701.07212763709},
-        {-223374.57735525275,   111701.07212763709},
-        {-223374.57735525275,  -111701.07212763709},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 0, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-#endif
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_ortel_selftest (void) {return 0;}
-#else
-int pj_ortel_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=ortel   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223374.57735525275,   111701.07212763709},
-        { 223374.57735525275,  -111701.07212763709},
-        {-223374.57735525275,   111701.07212763709},
-        {-223374.57735525275,  -111701.07212763709},
-    };
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 0, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-#endif
-
diff --git a/src/PJ_bipc.c b/src/PJ_bipc.c
index f370b4f..4247fc1 100644
--- a/src/PJ_bipc.c
+++ b/src/PJ_bipc.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(bipc, "Bipolar conic of western hemisphere") "\n\tConic Sph.";
 
@@ -51,7 +53,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
         sdlam = sin(sdlam);
         z = S20 * sphi + C20 * cphi * cdlam;
         if (fabs(z) > 1.) {
-            if (fabs(z) > ONEEPS) F_ERROR
+            if (fabs(z) > ONEEPS) {
+                proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+                return xy;
+            }
             else z = z < 0. ? -1. : 1.;
         } else
             z = acos(z);
@@ -62,19 +67,31 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     } else {
         z = S45 * (sphi + cphi * cdlam);
         if (fabs(z) > 1.) {
-            if (fabs(z) > ONEEPS) F_ERROR
+            if (fabs(z) > ONEEPS) {
+                proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+                return xy;
+            }
             else z = z < 0. ? -1. : 1.;
         } else
             z = acos(z);
         Av = Azba;
         xy.y = -rhoc;
     }
-    if (z < 0.) F_ERROR;
+    if (z < 0.) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
     r = F * (t = pow(tan(.5 * z), n));
-    if ((al = .5 * (R104 - z)) < 0.) F_ERROR;
+    if ((al = .5 * (R104 - z)) < 0.) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
     al = (t + pow(al, n)) / T;
     if (fabs(al) > 1.) {
-        if (fabs(al) > ONEEPS) F_ERROR
+        if (fabs(al) > ONEEPS) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         else al = al < 0. ? -1. : 1.;
     } else
         al = acos(al);
@@ -94,7 +111,7 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-    double t, r, rp, rl, al, z, fAz, Az, s, c, Av;
+    double t, r, rp, rl, al, z = 0.0, fAz, Az, s, c, Av;
     int neg, i;
 
     if (Q->noskew) {
@@ -125,7 +142,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
             break;
         rl = r;
     }
-    if (! i) I_ERROR;
+    if (! i) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
     Az = Av - Az / n;
     lp.phi = asin(s * cos(z) + c * sin(z) * cos(Az));
     lp.lam = atan2(sin(Az), c / tan(z) - s * cos(Az));
@@ -137,23 +157,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                        /* Destructor */
-    if (0==P)
-        return 0;
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(bipc) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->noskew = pj_param(P->ctx, P->params, "bns").i;
@@ -164,61 +171,3 @@ PJ *PROJECTION(bipc) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_bipc_selftest (void) {return 0;}
-#else
-
-int pj_bipc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=bipc   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=bipc   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {2452160.2177257561,  -14548450.759654747},
-        {2447915.213725341,  -14763427.21279873},
-        {2021695.5229349085,  -14540413.695283702},
-        {2018090.5030046992,  -14755620.651414108},
-    };
-
-    XY s_fwd_expect[] = {
-        {2460565.7409749646,  -14598319.9893308},
-        {2456306.1859352002,  -14814033.339502094},
-        {2028625.4978190989,  -14590255.375482792},
-        {2025008.1205891429,  -14806200.018759441},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {-73.038700284978702,  17.248118466239116},
-        {-73.03730373933017,  17.249414978178777},
-        {-73.03589317304332,  17.245536403008771},
-        {-73.034496627213585,  17.246832895573739},
-    };
-
-    LP s_inv_expect[] = {
-        {-73.038693104942126,  17.248116270440242},
-        {-73.037301330021322,  17.24940835333777},
-        {-73.035895582251086,  17.245543027866539},
-        {-73.034503807150301,  17.246835091521532},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_boggs.c b/src/PJ_boggs.c
index 8ede9f1..93de067 100644
--- a/src/PJ_boggs.c
+++ b/src/PJ_boggs.c
@@ -1,9 +1,9 @@
 #define PJ_LIB__
+# include	<errno.h>
 # include	<projects.h>
 PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl., no inv., Sph.";
 # define NITER	20
 # define EPS	1e-7
-# define ONETOL 1.000001
 # define FXC	2.00276
 # define FXC2	1.11072
 # define FYC	0.49931
@@ -33,15 +33,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                        /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(boggs) {
     P->es = 0.;
@@ -49,29 +40,4 @@ PJ *PROJECTION(boggs) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_boggs_selftest (void) {return 0;}
-#else
-int pj_boggs_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
 
-    char s_args[] = {"+proj=boggs   +a=6400000    +lat_1=0 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 211949.70080818201,   117720.99830541089},
-        { 211949.70080818201,  -117720.99830541089},
-        {-211949.70080818201,   117720.99830541089},
-        {-211949.70080818201,  -117720.99830541089},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 0, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-#endif
diff --git a/src/PJ_bonne.c b/src/PJ_bonne.c
index ac2249f..4611c5d 100644
--- a/src/PJ_bonne.c
+++ b/src/PJ_bonne.c
@@ -1,180 +1,132 @@
 #define PJ_LIB__
-#include	<projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(bonne, "Bonne (Werner lat_1=90)")
-	"\n\tConic Sph&Ell\n\tlat_1=";
-#define EPS10	1e-10
+    "\n\tConic Sph&Ell\n\tlat_1=";
+#define EPS10   1e-10
 
 struct pj_opaque {
-	double phi1;
-	double cphi1;
-	double am1;
-	double m1;
-	double *en;
+    double phi1;
+    double cphi1;
+    double am1;
+    double m1;
+    double *en;
 };
 
 
 static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double rh, E, c;
+    double rh, E, c;
 
-	rh = Q->am1 + Q->m1 - pj_mlfn(lp.phi, E = sin(lp.phi), c = cos(lp.phi), Q->en);
-	E = c * lp.lam / (rh * sqrt(1. - P->es * E * E));
-	xy.x = rh * sin(E);
-	xy.y = Q->am1 - rh * cos(E);
-	return xy;
+    rh = Q->am1 + Q->m1 - pj_mlfn(lp.phi, E = sin(lp.phi), c = cos(lp.phi), Q->en);
+    E = c * lp.lam / (rh * sqrt(1. - P->es * E * E));
+    xy.x = rh * sin(E);
+    xy.y = Q->am1 - rh * cos(E);
+    return xy;
 }
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double E, rh;
-
-	rh = Q->cphi1 + Q->phi1 - lp.phi;
-	if (fabs(rh) > EPS10) {
-		xy.x = rh * sin(E = lp.lam * cos(lp.phi) / rh);
-		xy.y = Q->cphi1 - rh * cos(E);
-	} else
-		xy.x = xy.y = 0.;
-	return xy;
+    double E, rh;
+
+    rh = Q->cphi1 + Q->phi1 - lp.phi;
+    if (fabs(rh) > EPS10) {
+        xy.x = rh * sin(E = lp.lam * cos(lp.phi) / rh);
+        xy.y = Q->cphi1 - rh * cos(E);
+    } else
+        xy.x = xy.y = 0.;
+    return xy;
 }
 
 
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double rh;
-
-	rh = hypot(xy.x, xy.y = Q->cphi1 - xy.y);
-	lp.phi = Q->cphi1 + Q->phi1 - rh;
-	if (fabs(lp.phi) > M_HALFPI) I_ERROR;
-	if (fabs(fabs(lp.phi) - M_HALFPI) <= EPS10)
-		lp.lam = 0.;
-	else
-		lp.lam = rh * atan2(xy.x, xy.y) / cos(lp.phi);
-	return lp;
+    double rh;
+
+    rh = hypot(xy.x, xy.y = Q->cphi1 - xy.y);
+    lp.phi = Q->cphi1 + Q->phi1 - rh;
+    if (fabs(lp.phi) > M_HALFPI) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
+    if (fabs(fabs(lp.phi) - M_HALFPI) <= EPS10)
+        lp.lam = 0.;
+    else
+        lp.lam = rh * atan2(xy.x, xy.y) / cos(lp.phi);
+    return lp;
 }
 
 
 static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double s, rh;
-
-	rh = hypot(xy.x, xy.y = Q->am1 - xy.y);
-	lp.phi = pj_inv_mlfn(P->ctx, Q->am1 + Q->m1 - rh, P->es, Q->en);
-	if ((s = fabs(lp.phi)) < M_HALFPI) {
-		s = sin(lp.phi);
-		lp.lam = rh * atan2(xy.x, xy.y) *
-		   sqrt(1. - P->es * s * s) / cos(lp.phi);
-	} else if (fabs(s - M_HALFPI) <= EPS10)
-		lp.lam = 0.;
-	else I_ERROR;
-	return lp;
+    double s, rh;
+
+    rh = hypot(xy.x, xy.y = Q->am1 - xy.y);
+    lp.phi = pj_inv_mlfn(P->ctx, Q->am1 + Q->m1 - rh, P->es, Q->en);
+    if ((s = fabs(lp.phi)) < M_HALFPI) {
+        s = sin(lp.phi);
+        lp.lam = rh * atan2(xy.x, xy.y) *
+           sqrt(1. - P->es * s * s) / cos(lp.phi);
+    } else if (fabs(s - M_HALFPI) <= EPS10)
+        lp.lam = 0.;
+    else {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
+    return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                        /* Destructor */
+
+static void *destructor (PJ *P, int errlev) {                        /* Destructor */
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
     pj_dealloc (P->opaque->en);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    return pj_default_destructor (P, errlev);
 }
 
 
 PJ *PROJECTION(bonne) {
-	double c;
+    double c;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
-
-	Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f;
-	if (fabs(Q->phi1) < EPS10) E_ERROR(-23);
-	if (P->es) {
-		Q->en = pj_enfn(P->es);
-		Q->m1 = pj_mlfn(Q->phi1, Q->am1 = sin(Q->phi1),
-			c = cos(Q->phi1), Q->en);
-		Q->am1 = c / (sqrt(1. - P->es * Q->am1 * Q->am1) * Q->am1);
-		P->inv = e_inverse;
-		P->fwd = e_forward;
-	} else {
-		if (fabs(Q->phi1) + EPS10 >= M_HALFPI)
-			Q->cphi1 = 0.;
-		else
-			Q->cphi1 = 1. / tan(Q->phi1);
-		P->inv = s_inverse;
-		P->fwd = s_forward;
-	}
+    P->destructor = destructor;
+
+    Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f;
+    if (fabs(Q->phi1) < EPS10)
+        return destructor (P, PJD_ERR_LAT1_IS_ZERO);
+
+    if (P->es != 0.0) {
+        Q->en = pj_enfn(P->es);
+        if (0==Q->en)
+            return destructor(P, ENOMEM);
+        Q->m1 = pj_mlfn(Q->phi1, Q->am1 = sin(Q->phi1),
+            c = cos(Q->phi1), Q->en);
+        Q->am1 = c / (sqrt(1. - P->es * Q->am1 * Q->am1) * Q->am1);
+        P->inv = e_inverse;
+        P->fwd = e_forward;
+    } else {
+        if (fabs(Q->phi1) + EPS10 >= M_HALFPI)
+            Q->cphi1 = 0.;
+        else
+            Q->cphi1 = 1. / tan(Q->phi1);
+        P->inv = s_inverse;
+        P->fwd = s_forward;
+    }
     return P;
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_bonne_selftest (void) {return 0;}
-#else
-int pj_bonne_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=bonne   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=bonne   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222605.29609715697,   55321.139565494814},
-        { 222605.29609923941,  -165827.64779905154},
-        {-222605.29609715697,   55321.139565494814},
-        {-222605.29609923941,  -165827.64779905154},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223368.11557252839,   55884.555246393575},
-        { 223368.11557463196,  -167517.59936969393},
-        {-223368.11557252839,   55884.555246393575},
-        {-223368.11557463196,  -167517.59936969393},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966987691132891,  0.50090436853737497},
-        { 0.0017966982774478867,  0.4990956309655612},
-        {-0.0017966987691132891,  0.50090436853737497},
-        {-0.0017966982774478867,  0.4990956309655612},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017905615332457991,  0.50089524631087834},
-        { 0.0017905610449335603,  0.49910475320072978},
-        {-0.0017905615332457991,  0.50089524631087834},
-        {-0.0017905610449335603,  0.49910475320072978},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_calcofi.c b/src/PJ_calcofi.c
index b9a8ca2..5c0b64a 100644
--- a/src/PJ_calcofi.c
+++ b/src/PJ_calcofi.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(calcofi,
     "Cal Coop Ocean Fish Invest Lines/Stations") "\n\tCyl, Sph&Ell";
@@ -46,7 +47,10 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     /* 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) - M_HALFPI) <= EPS10) F_ERROR;
+    if (fabs(fabs(lp.phi) - M_HALFPI) <= EPS10) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
     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));
@@ -74,7 +78,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     double l2;
     double ry;
     lp.lam = lp.lam + P->lam0;
-    if (fabs(fabs(lp.phi) - M_HALFPI) <= EPS10) F_ERROR;
+    if (fabs(fabs(lp.phi) - M_HALFPI) <= EPS10) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
     xy.x = lp.lam;
     xy.y = log(tan(M_FORTPI + .5 * lp.phi));
     oy = log(tan(M_FORTPI + .5 * PT_O_PHI));
@@ -142,20 +149,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc (P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(calcofi) {
     P->opaque = 0;
 
-    if (P->es) { /* ellipsoid */
+    if (P->es != 0.0) { /* ellipsoid */
         P->inv = e_inverse;
         P->fwd = e_forward;
     } else { /* sphere */
@@ -166,61 +163,3 @@ PJ *PROJECTION(calcofi) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_calcofi_selftest (void) {return 0;}
-#else
-
-int pj_calcofi_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=calcofi   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=calcofi   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {508.44487214981905,  -1171.7648604175156},
-        {514.99916815188112,  -1145.8219814677668},
-        {500.68538412539851,  -1131.4453779204598},
-        {507.36971913666355,  -1106.1782014834275},
-    };
-
-    XY s_fwd_expect[] = {
-        {507.09050748781806,  -1164.7273751978314},
-        {513.68613637462886,  -1138.9992682173072},
-        {499.33626147591531,  -1124.4351309968195},
-        {506.0605703929898,  -1099.3756650673038},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {-110.36330792469906,  12.032056975840137},
-        {-98.455008863288782,  18.698723642506803},
-        {-207.4470245036909,  81.314089278595247},
-        {-62.486322854481287,  87.980755945261919},
-    };
-
-    LP s_inv_expect[] = {
-        {-110.30519040955151,  12.032056975840137},
-        {-98.322360950234085,  18.698723642506803},
-        {-207.54490681381429,  81.314089278595247},
-        {-62.576950371885275,  87.980755945261919},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_cart.c b/src/PJ_cart.c
new file mode 100644
index 0000000..0746ec0
--- /dev/null
+++ b/src/PJ_cart.c
@@ -0,0 +1,219 @@
+/******************************************************************************
+ * Project:  PROJ.4
+ * Purpose:  Convert between ellipsoidal, geodetic coordinates and
+ *           cartesian, geocentric coordinates.
+ *
+ *           Formally, this functionality is also found in the PJ_geocent.c
+ *           code.
+ *
+ *           Actually, however, the PJ_geocent transformations are carried
+ *           out in concert between 2D stubs in PJ_geocent.c and 3D code
+ *           placed in pj_transform.c.
+ *
+ *           For pipeline-style datum shifts, we do need direct access
+ *           to the full 3D interface for this functionality.
+ *
+ *           Hence this code, which may look like "just another PJ_geocent"
+ *           but really is something substantially different.
+ *
+ * Author:   Thomas Knudsen, thokn at sdfe.dk
+ *
+ ******************************************************************************
+ * Copyright (c) 2016, Thomas Knudsen / SDFE
+ *
+ * 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.
+ *****************************************************************************/
+
+#define PJ_LIB__
+#include "proj_internal.h"
+#include "projects.h"
+#include <stddef.h>
+#include <math.h>
+#include <errno.h>
+PROJ_HEAD(cart,    "Geodetic/cartesian conversions");
+
+
+/**************************************************************
+                CARTESIAN / GEODETIC CONVERSIONS
+***************************************************************
+    This material follows:
+
+    Bernhard Hofmann-Wellenhof & Helmut Moritz:
+    Physical Geodesy, 2nd edition.
+    Springer, 2005.
+
+    chapter 5.6: Coordinate transformations
+    (HM, below),
+
+    and
+
+    Wikipedia: Geographic Coordinate Conversion,
+    https://en.m.wikipedia.org/wiki/Geographic_coordinate_conversion
+
+    (WP, below).
+
+    The cartesian-to-geodetic conversion is based on Bowring's
+    celebrated method:
+
+    B. R. Bowring:
+    Transformation from spatial to geographical coordinates
+    Survey Review 23(181), pp. 323-327, 1976
+
+    (BB, below),
+
+    but could probably use some TLC from a newer and faster
+    algorithm:
+
+    Toshio Fukushima:
+    Transformation from Cartesian to Geodetic Coordinates
+    Accelerated by Halley’s Method
+    Journal of Geodesy, February 2006
+
+    (TF, below).
+
+    Close to the poles, we avoid singularities by switching to an
+    approximation requiring knowledge of the geocentric radius
+    at the given latitude. For this, we use an adaptation of the
+    formula given in:
+
+    Wikipedia: Earth Radius
+    https://en.wikipedia.org/wiki/Earth_radius#Radius_at_a_given_geodetic_latitude
+    (Derivation and commentary at http://gis.stackexchange.com/questions/20200/how-do-you-compute-the-earths-radius-at-a-given-geodetic-latitude)
+
+    (WP2, below)
+
+    These routines are probably not as robust at those in
+    geocent.c, at least thay haven't been through as heavy
+    use as their geocent sisters. Some care has been taken
+    to avoid singularities, but extreme cases (e.g. setting
+    es, the squared eccentricity, to 1), will cause havoc.
+
+**************************************************************/
+
+
+/*********************************************************************/
+static double normal_radius_of_curvature (double a, double es, double phi) {
+/*********************************************************************/
+    double s = sin(phi);
+    if (es==0)
+        return a;
+    /* This is from WP.  HM formula 2-149 gives an a,b version */
+    return a / sqrt (1 - es*s*s);
+}
+
+/*********************************************************************/
+static double geocentric_radius (double a, double b, double phi) {
+/*********************************************************************
+    Return the geocentric radius at latitude phi, of an ellipsoid
+    with semimajor axis a and semiminor axis b.
+
+    This is from WP2, but uses hypot() for potentially better
+    numerical robustness
+***********************************************************************/
+    return hypot (a*a*cos (phi), b*b*sin(phi)) / hypot (a*cos(phi), b*sin(phi));
+}
+
+
+/*********************************************************************/
+static XYZ cartesian (LPZ geodetic,  PJ *P) {
+/*********************************************************************/
+    double N, cosphi = cos(geodetic.phi);
+    XYZ xyz;
+
+    N   =  normal_radius_of_curvature(P->a, P->es, geodetic.phi);
+
+    /* HM formula 5-27 (z formula follows WP) */
+    xyz.x = (N + geodetic.z) * cosphi      * cos(geodetic.lam);
+    xyz.y = (N + geodetic.z) * cosphi      * sin(geodetic.lam);
+    xyz.z = (N * (1 - P->es) + geodetic.z) * sin(geodetic.phi);
+
+    return xyz;
+}
+
+
+/*********************************************************************/
+static LPZ geodetic (XYZ cartesian,  PJ *P) {
+/*********************************************************************/
+    double N, p, theta, c, s;
+    LPZ lpz;
+
+    /* Perpendicular distance from point to Z-axis (HM eq. 5-28) */
+    p = hypot (cartesian.x, cartesian.y);
+
+    /* HM eq. (5-37) */
+    theta  =  atan2 (cartesian.z * P->a,  p * P->b);
+
+    /* HM eq. (5-36) (from BB, 1976) */
+    c  =  cos(theta);
+    s  =  sin(theta);
+    lpz.phi  =  atan2 (cartesian.z + P->e2s*P->b*s*s*s,  p - P->es*P->a*c*c*c);
+    lpz.lam  =  atan2 (cartesian.y, cartesian.x);
+    N        =  normal_radius_of_curvature (P->a, P->es, lpz.phi);
+
+
+    c  =  cos(lpz.phi);
+    if (fabs(c) < 1e-6) {
+        /* poleward of 89.99994 deg, we avoid division by zero   */
+        /* by computing the height as the cartesian z value      */
+        /* minus the geocentric radius of the Earth at the given */
+        /* latitude                                              */
+        double r = geocentric_radius (P->a, P->b, lpz.phi);
+        lpz.z = fabs (cartesian.z) - r;
+    }
+    else
+        lpz.z =  p / c  -  N;
+
+    return lpz;
+}
+
+
+
+/* In effect, 2 cartesian coordinates of a point on the ellipsoid. Rather pointless, but... */
+static XY cart_forward (LP lp, PJ *P) {
+    PJ_COORD point;
+    point.lp = lp;
+    point.lpz.z = 0;
+
+    point.xyz = cartesian (point.lpz, P);
+    return point.xy;
+}
+
+/* And the other way round. Still rather pointless, but... */
+static LP cart_reverse (XY xy, PJ *P) {
+    PJ_COORD point;
+    point.xy = xy;
+    point.xyz.z = 0;
+
+    point.lpz = geodetic (point.xyz, P);
+    return point.lp;
+}
+
+
+
+/*********************************************************************/
+PJ *CONVERSION(cart,1) {
+/*********************************************************************/
+    P->fwd3d  =  cartesian;
+    P->inv3d  =  geodetic;
+    P->fwd    =  cart_forward;
+    P->inv    =  cart_reverse;
+    P->left   =  PJ_IO_UNITS_ANGULAR;
+    P->right  =  PJ_IO_UNITS_CARTESIAN;
+    return P;
+}
diff --git a/src/PJ_cass.c b/src/PJ_cass.c
index 1eb978e..acf779a 100644
--- a/src/PJ_cass.c
+++ b/src/PJ_cass.c
@@ -1,9 +1,9 @@
 #define PJ_LIB__
-# include   <projects.h>
+# include   <errno.h>
+# include   "projects.h"
 PROJ_HEAD(cass, "Cassini") "\n\tCyl, Sph&Ell";
 
 
-# define EPS10  1e-10
 # define C1 .16666666666666666666
 # define C2 .00833333333333333333
 # define C3 .04166666666666666666
@@ -77,22 +77,18 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     return lp;
 }
 
-
-static void *freeup_new(PJ *P) {                        /* Destructor */
+static void *destructor (PJ *P, int errlev) {                        /* Destructor */
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
-    pj_dealloc(P->opaque->en);
-    pj_dealloc(P->opaque);
-    return pj_dealloc(P);
+    pj_dealloc (P->opaque->en);
+    return pj_default_destructor (P, errlev);
 }
 
-static void freeup(PJ *P) {                             /* Destructor */
-    freeup_new (P);
-    return;
-}
+
 
 PJ *PROJECTION(cass) {
 
@@ -106,11 +102,12 @@ PJ *PROJECTION(cass) {
     /* otherwise it's ellipsoidal */
     P->opaque = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==P->opaque)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
+    P->destructor = destructor;
 
     P->opaque->en = pj_enfn (P->es);
     if (0==P->opaque->en)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
 
     P->opaque->m0 = pj_mlfn (P->phi0,  sin (P->phi0),  cos (P->phi0),  P->opaque->en);
     P->inv = e_inverse;
@@ -120,59 +117,3 @@ PJ *PROJECTION(cass) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_cass_selftest (void) {return 0;}
-#else
-
-int pj_cass_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=cass   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=cass   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222605.28577699114,   110642.22925399939},
-        { 222605.28577699114,  -110642.22925399939},
-        {-222605.28577699114,   110642.22925399939},
-        {-222605.28577699114,  -110642.22925399939},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223368.10520348375,  111769.14504058579},
-        { 223368.10520348375, -111769.14504058579},
-        {-223368.10520348375,  111769.14504058579},
-        {-223368.10520348375, -111769.14504058579},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966305684613522,   0.00090436947663183841},
-        { 0.0017966305684613522,  -0.00090436947663183841},
-        {-0.0017966305684613522,   0.00090436947663183841},
-        {-0.0017966305684613522,  -0.00090436947663183841},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931100023887,   0.00089524655445477922},
-        { 0.0017904931100023887,  -0.00089524655445477922},
-        {-0.0017904931100023887,   0.00089524655445477922},
-        {-0.0017904931100023887,  -0.00089524655445477922},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-#endif
diff --git a/src/PJ_cc.c b/src/PJ_cc.c
index 1b5d315..8a7da5b 100644
--- a/src/PJ_cc.c
+++ b/src/PJ_cc.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include	<projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(cc, "Central Cylindrical") "\n\tCyl, Sph";
 #define EPS10 1.e-10
@@ -7,32 +8,25 @@ PROJ_HEAD(cc, "Central Cylindrical") "\n\tCyl, Sph";
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
-	if (fabs (fabs(lp.phi) - M_HALFPI) <= EPS10) F_ERROR;
-	xy.x = lp.lam;
-	xy.y = tan(lp.phi);
-	return xy;
+    if (fabs (fabs(lp.phi) - M_HALFPI) <= EPS10) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
+    xy.x = lp.lam;
+    xy.y = tan(lp.phi);
+    return xy;
 }
 
 
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
-	(void) P;
-	lp.phi = atan(xy.y);
-	lp.lam = xy.x;
-	return lp;
+    (void) P;
+    lp.phi = atan(xy.y);
+    lp.lam = xy.x;
+    return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(cc) {
     P->es = 0.;
@@ -44,46 +38,3 @@ PJ *PROJECTION(cc) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_cc_selftest (void) {return 0;}
-#else
-
-int pj_cc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=cc   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {223402.14425527418,  111712.41554059254},
-        {223402.14425527418,  -111712.41554059254},
-        {-223402.14425527418,  111712.41554059254},
-        {-223402.14425527418,  -111712.41554059254},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017904931097838226,  0.00089524655481905597},
-        {0.0017904931097838226,  -0.00089524655481905597},
-        {-0.0017904931097838226,  0.00089524655481905597},
-        {-0.0017904931097838226,  -0.00089524655481905597},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_ccon.c b/src/PJ_ccon.c
new file mode 100644
index 0000000..a8c178d
--- /dev/null
+++ b/src/PJ_ccon.c
@@ -0,0 +1,106 @@
+/******************************************************************************
+ * Copyright (c) 2017, Lukasz Komsta
+ *
+ * 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.
+ *****************************************************************************/
+
+#define PJ_LIB__
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
+
+#define EPS10   1e-10
+
+struct pj_opaque {
+    double phi1;
+    double ctgphi1;
+    double sinphi1;
+    double cosphi1;
+    double *en;
+};
+
+PROJ_HEAD(ccon, "Central Conic")
+    "\n\tCentral Conic, Sph.\n\tlat_1=";
+
+
+
+static XY forward (LP lp, PJ *P) {
+    XY xy = {0.0,0.0};
+    struct pj_opaque *Q = P->opaque;
+    double r;
+
+    r = Q->ctgphi1 - tan(lp.phi - Q->phi1);
+    xy.x = r * sin(lp.lam * Q->sinphi1);
+    xy.y = Q->ctgphi1 - r * cos(lp.lam * Q->sinphi1);
+
+    return xy;
+}
+
+
+static LP inverse (XY xy, PJ *P) {
+    LP lp = {0.0,0.0};
+    struct pj_opaque *Q = P->opaque;
+
+    xy.y = Q->ctgphi1 - xy.y;
+    lp.phi = Q->phi1 - atan(hypot(xy.x,xy.y) - Q->ctgphi1);
+    lp.lam = atan2(xy.x,xy.y)/Q->sinphi1;
+
+    return lp;
+}
+
+
+static void *destructor (PJ *P, int errlev) {
+    if (0==P)
+        return 0;
+
+    if (0==P->opaque)
+        return pj_default_destructor (P, errlev);
+
+    pj_dealloc (P->opaque->en);
+    return pj_default_destructor (P, errlev);
+}
+
+
+PJ *PROJECTION(ccon) {
+
+    struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
+    if (0==Q)
+        return pj_default_destructor (P, ENOMEM);
+    P->opaque = Q;
+    P->destructor = destructor;
+
+    Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f;
+    if (fabs(Q->phi1) < EPS10)
+        return destructor (P, PJD_ERR_LAT1_IS_ZERO);
+
+    if (!(Q->en = pj_enfn(P->es)))
+        return destructor(P, ENOMEM);
+
+    Q->sinphi1 = sin(Q->phi1);
+    Q->cosphi1 = cos(Q->phi1);
+    Q->ctgphi1 = Q->cosphi1/Q->sinphi1;
+
+
+    P->inv = inverse;
+    P->fwd = forward;
+
+    return P;
+}
+
+
diff --git a/src/PJ_cea.c b/src/PJ_cea.c
index 723611c..60ed3a3 100644
--- a/src/PJ_cea.c
+++ b/src/PJ_cea.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include   <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 struct pj_opaque {
     double qp;
@@ -44,46 +46,46 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
         else
             lp.phi = asin(xy.y);
         lp.lam = xy.x / P->k0;
-    } else I_ERROR;
+    } else {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
     return (lp);
 }
 
-
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor (PJ *P, int errlev) {                        /* Destructor */
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
     pj_dealloc (P->opaque->apa);
-    pj_dealloc (P->opaque);
-    return pj_dealloc (P);
+    return pj_default_destructor (P, errlev);
 }
 
-static void freeup (PJ *P) {
-   freeup_new (P);
-    return;
-}
 
 PJ *PROJECTION(cea) {
     double t = 0.0;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
 
     if (pj_param(P->ctx, P->params, "tlat_ts").i) {
         P->k0 = cos(t = pj_param(P->ctx, P->params, "rlat_ts").f);
-        if (P->k0 < 0.) {
-            E_ERROR(-24);
-        }
+        if (P->k0 < 0.)
+            return pj_default_destructor (P, PJD_ERR_LAT_TS_LARGER_THAN_90);
     }
-    if (P->es) {
+    if (P->es != 0.0) {
         t = sin(t);
         P->k0 /= sqrt(1. - P->es * t * t);
         P->e = sqrt(P->es);
-        if (!(Q->apa = pj_authset(P->es))) E_ERROR_0;
+        if (!(Q->apa = pj_authset(P->es)))
+            return pj_default_destructor(P, ENOMEM);
+
         Q->qp = pj_qsfn(1., P->e, P->one_es);
         P->inv = e_inverse;
         P->fwd = e_forward;
@@ -96,60 +98,3 @@ PJ *PROJECTION(cea) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_cea_selftest (void) {return 0;}
-#else
-
-int pj_cea_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=cea   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=cea   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222638.981586547132,  110568.812396267356},
-        { 222638.981586547132, -110568.812396265886},
-        {-222638.981586547132,  110568.812396267356},
-        {-222638.981586547132, -110568.812396265886},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223402.144255274179,  111695.401198614476},
-        { 223402.144255274179, -111695.401198614476},
-        {-223402.144255274179,  111695.401198614476},
-        {-223402.144255274179, -111695.401198614476},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00179663056823904264,  0.000904369476105564289},
-        { 0.00179663056823904264, -0.000904369476105564289},
-        {-0.00179663056823904264,  0.000904369476105564289},
-        {-0.00179663056823904264, -0.000904369476105564289},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049310978382265,  0.000895246554928338998},
-        { 0.00179049310978382265, -0.000895246554928338998},
-        {-0.00179049310978382265,  0.000895246554928338998},
-        {-0.00179049310978382265, -0.000895246554928338998},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-#endif
diff --git a/src/PJ_chamb.c b/src/PJ_chamb.c
index 6bacbbe..d0b9250 100644
--- a/src/PJ_chamb.c
+++ b/src/PJ_chamb.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include    <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 typedef struct { double r, Az; } VECT;
 struct pj_opaque {
@@ -59,7 +61,7 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     for (i = 0; i < 3; ++i) { /* dist/azimiths from control */
         v[i] = vect(P->ctx, lp.phi - Q->c[i].phi, Q->c[i].cosphi, Q->c[i].sinphi,
             cosphi, sinphi, lp.lam - Q->c[i].lam);
-        if ( ! v[i].r)
+        if (v[i].r == 0.0)
             break;
         v[i].Az = adjlon(v[i].Az - Q->c[i].v.Az);
     }
@@ -92,28 +94,13 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(chamb) {
     int i, j;
     char line[10];
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
 
@@ -130,7 +117,8 @@ PJ *PROJECTION(chamb) {
         j = i == 2 ? 0 : i + 1;
         Q->c[i].v = vect(P->ctx,Q->c[j].phi - Q->c[i].phi, Q->c[i].cosphi, Q->c[i].sinphi,
             Q->c[j].cosphi, Q->c[j].sinphi, Q->c[j].lam - Q->c[i].lam);
-        if (! Q->c[i].v.r) E_ERROR(-25);
+        if (Q->c[i].v.r == 0.0)
+            return pj_default_destructor (P, PJD_ERR_CONTROL_POINT_NO_DIST);
         /* co-linearity problem ignored for now */
     }
     Q->beta_0 = lc(P->ctx,Q->c[0].v.r, Q->c[2].v.r, Q->c[1].v.r);
@@ -148,32 +136,3 @@ PJ *PROJECTION(chamb) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_chamb_selftest (void) {return 0;}
-#else
-
-int pj_chamb_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=chamb   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {-27864.7795868005815,  -223364.324593274243},
-        {-251312.283053493476,  -223402.145526208304},
-        {-27864.7856491046077,  223364.327328827145},
-        {-251312.289116443484,  223402.142197287147},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_collg.c b/src/PJ_collg.c
index baac1af..bf7d9f1 100644
--- a/src/PJ_collg.c
+++ b/src/PJ_collg.c
@@ -1,47 +1,43 @@
 #define PJ_LIB__
-# include	<projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(collg, "Collignon") "\n\tPCyl, Sph.";
-#define FXC	1.12837916709551257390
-#define FYC	1.77245385090551602729
-#define ONEEPS	1.0000001
+#define FXC 1.12837916709551257390
+#define FYC 1.77245385090551602729
+#define ONEEPS  1.0000001
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
-	(void) P;
-	if ((xy.y = 1. - sin(lp.phi)) <= 0.)
-		xy.y = 0.;
-	else
-		xy.y = sqrt(xy.y);
-	xy.x = FXC * lp.lam * xy.y;
-	xy.y = FYC * (1. - xy.y);
-	return (xy);
+    (void) P;
+    if ((xy.y = 1. - sin(lp.phi)) <= 0.)
+        xy.y = 0.;
+    else
+        xy.y = sqrt(xy.y);
+    xy.x = FXC * lp.lam * xy.y;
+    xy.y = FYC * (1. - xy.y);
+    return (xy);
 }
 
 
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
-	lp.phi = xy.y / FYC - 1.;
-	if (fabs(lp.phi = 1. - lp.phi * lp.phi) < 1.)
-		lp.phi = asin(lp.phi);
-	else if (fabs(lp.phi) > ONEEPS) I_ERROR
-	else	lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI;
-	if ((lp.lam = 1. - sin(lp.phi)) <= 0.)
-		lp.lam = 0.;
-	else
-		lp.lam = xy.x / (FXC * sqrt(lp.lam));
-	return (lp);
-}
-
-
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    lp.phi = xy.y / FYC - 1.;
+    if (fabs(lp.phi = 1. - lp.phi * lp.phi) < 1.)
+        lp.phi = asin(lp.phi);
+    else if (fabs(lp.phi) > ONEEPS) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    } else {
+        lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI;
+    }
+
+    if ((lp.lam = 1. - sin(lp.phi)) <= 0.)
+        lp.lam = 0.;
+    else
+        lp.lam = xy.x / (FXC * sqrt(lp.lam));
+    return (lp);
 }
 
 
@@ -53,46 +49,3 @@ PJ *PROJECTION(collg) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_collg_selftest (void) {return 0;}
-#else
-
-int pj_collg_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=collg   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {249872.921577929839,  99423.1747884602082},
-        {254272.532301245432,  -98559.3077607425657},
-        {-249872.921577929839,  99423.1747884602082},
-        {-254272.532301245432,  -98559.3077607425657},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.00158679719207879865,  0.00101017310941749921},
-        {0.001586769215623956,  -0.00101018201458258111},
-        {-0.00158679719207879865,  0.00101017310941749921},
-        {-0.001586769215623956,  -0.00101018201458258111},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_comill.c b/src/PJ_comill.c
index c492dc9..a34762e 100644
--- a/src/PJ_comill.c
+++ b/src/PJ_comill.c
@@ -19,7 +19,8 @@ PROJ_HEAD(comill, "Compact Miller") "\n\tCyl., Sph.";
 #define C3 (5 * K3)
 #define EPS 1e-11
 #define MAX_Y (0.6000207669862655 * M_PI)
-
+/* Not sure at all of the appropriate number for MAX_ITER... */
+#define MAX_ITER 100
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
@@ -37,6 +38,7 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     double yc, tol, y2, f, fder;
+    int i;
 
     (void) P;   /* silence unused parameter warnings */
 
@@ -49,7 +51,7 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 
     /* latitude */
     yc = xy.y;
-    for (;;) { /* Newton-Raphson */
+    for (i = MAX_ITER; i ; --i) { /* Newton-Raphson */
         y2 = yc * yc;
         f = (yc * (K1 + y2 * (K2 + K3 * y2))) - xy.y;
         fder = C1 + y2 * (C2 + C3 * y2);
@@ -58,6 +60,8 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
             break;
         }
     }
+    if( i == 0 )
+        pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
     lp.phi = yc;
 
     /* longitude */
@@ -66,15 +70,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     return lp;
 }
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(comill) {
     P->es = 0;
@@ -86,46 +81,3 @@ PJ *PROJECTION(comill) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_comill_selftest (void) {return 0;}
-#else
-
-int pj_comill_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=comill   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {223402.144255274179,  110611.859089458536},
-        {223402.144255274179,  -110611.859089458536},
-        {-223402.144255274179,  110611.859089458536},
-        {-223402.144255274179,  -110611.859089458536},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.00179049310978382265,  0.000904106801510605831},
-        {0.00179049310978382265,  -0.000904106801510605831},
-        {-0.00179049310978382265,  0.000904106801510605831},
-        {-0.00179049310978382265,  -0.000904106801510605831},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_crast.c b/src/PJ_crast.c
index 09c4f1e..8118211 100644
--- a/src/PJ_crast.c
+++ b/src/PJ_crast.c
@@ -29,17 +29,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-   return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(crast) {
     P->es = 0.0;
     P->inv = s_inverse;
@@ -48,47 +37,3 @@ PJ *PROJECTION(crast) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_crast_selftest (void) {return 0;}
-#else
-
-int pj_crast_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=crast   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-
-    XY s_fwd_expect[] = {
-        {218280.142056780722,  114306.045604279774},
-        {218280.142056780722,  -114306.045604279774},
-        {-218280.142056780722,  114306.045604279774},
-        {-218280.142056780722,  -114306.045604279774},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.00183225941982580187,  0.00087483943098902331},
-        {0.00183225941982580187,  -0.00087483943098902331},
-        {-0.00183225941982580187,  0.00087483943098902331},
-        {-0.00183225941982580187,  -0.00087483943098902331},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_deformation.c b/src/PJ_deformation.c
new file mode 100644
index 0000000..797af00
--- /dev/null
+++ b/src/PJ_deformation.c
@@ -0,0 +1,315 @@
+/***********************************************************************
+
+        Kinematic datum shifting utilizing a deformation model
+
+                    Kristian Evers, 2017-10-29
+
+************************************************************************
+
+Perform datum shifts by means of a deformation/velocity model.
+
+    X_out = X_in + (T_ct - T_obs)*DX
+    Y_out = Y_in + (T_ct - T_obs)*DY
+    Z_out = Z_in + (T_ct - T_obs)*DZ
+
+
+The deformation operation takes cartesian coordinates as input and
+returns cartesian coordinates as well.
+
+Corrections in the gridded model are in east, north, up (ENU) space.
+Hence the input coordinates needs to be converted to ENU-space when
+searching for corrections in the grid. The corrections are then converted
+to cartesian XYZ-space and applied to the input coordinates (also in
+cartesian space).
+
+A full deformation model is described by two grids, one for the horizontal
+components and one for the vertical component. The horizontal grid is
+stored in CTable/CTable2 and the vertical grid is stored in the GTX
+format. The NTv2 format should not be used for this purpose since grid-
+values are scaled upon reading. Both grids are expected to contain
+grid-values in units of mm/year in ENU-space.
+
+************************************************************************
+* Copyright (c) 2017, Kristian Evers
+*
+* 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.
+*
+***********************************************************************/
+#define PJ_LIB__
+#include <errno.h>
+#include <proj.h>
+#include "proj_internal.h"
+#include "projects.h"
+
+PROJ_HEAD(deformation, "Kinematic grid shift");
+
+#define TOL 1e-8
+#define MAX_ITERATIONS 10
+
+struct pj_opaque {
+    double t_obs;
+    double t_epoch;
+    PJ *cart;
+};
+
+/********************************************************************************/
+static XYZ get_grid_shift(PJ* P, XYZ cartesian) {
+/********************************************************************************
+    Read correction values from grid. The cartesian input coordinates are
+    converted to geodetic coordinates in order look up the correction values
+    in the grid. Once the grid corrections are read we need to convert them
+    from ENU-space to cartesian XYZ-space. ENU -> XYZ formula described in:
+
+    Nørbech, T., et al, 2003(?), "Transformation from a Common Nordic Reference
+    Frame to ETRS89 in Denmark, Finland, Norway, and Sweden – status report"
+
+********************************************************************************/
+    PJ_COORD geodetic, shift, temp;
+    double sp, cp, sl, cl;
+
+    /* cartesian to geodetic */
+    geodetic.lpz = pj_inv3d(cartesian, P->opaque->cart);
+
+    /* look up correction values in grids */
+    shift.lp    = proj_hgrid_value(P, geodetic.lp);
+    shift.enu.u = proj_vgrid_value(P, geodetic.lp);
+
+    /* grid values are stored as mm/yr, we need m/yr */
+    shift.xyz.x /= 1000;
+    shift.xyz.y /= 1000;
+    shift.xyz.z /= 1000;
+
+    /* pre-calc cosines and sines */
+    sp = sin(geodetic.lp.phi);
+    cp = cos(geodetic.lp.phi);
+    sl = sin(geodetic.lp.lam);
+    cl = cos(geodetic.lp.lam);
+
+    /* ENU -> XYZ */
+    temp.xyz.x = -sp*cl*shift.enu.n - sl*shift.enu.e + cp*cl*shift.enu.u;
+    temp.xyz.y = -sp*sl*shift.enu.n + cl*shift.enu.e + cp*sl*shift.enu.u;
+    temp.xyz.z =     cp*shift.enu.n +                     sp*shift.enu.u;
+
+    shift.xyz = temp.xyz;
+
+    return shift.xyz;
+}
+
+/********************************************************************************/
+static XYZ reverse_shift(PJ *P, XYZ input, double dt) {
+/********************************************************************************
+    Iteratively determine the reverse grid shift correction values.
+*********************************************************************************/
+    XYZ out, delta, dif;
+    double z0;
+    int i = MAX_ITERATIONS;
+
+    delta = get_grid_shift(P, input);
+
+    /* Store the origial z shift for later application */
+    z0 = delta.z;
+
+    /* When iterating to find the best horizontal coordinate we also carry   */
+    /* along the z-component, since we need it for the cartesian -> geodetic */
+    /* conversion. The z-component adjustment is overwritten with z0 after   */
+    /* the loop has finished.                                                */
+    out.x = input.x - dt*delta.x;
+    out.y = input.y - dt*delta.y;
+    out.z = input.z + dt*delta.z;
+
+    do {
+        delta = get_grid_shift(P, out);
+
+        if (delta.x == HUGE_VAL)
+            break;
+
+        dif.x  = out.x + dt*delta.x - input.x;
+        dif.y  = out.y + dt*delta.y - input.y;
+        dif.z  = out.z - dt*delta.z - input.z;
+        out.x += dif.x;
+        out.y += dif.y;
+        out.z += dif.z;
+
+    } while ( --i && hypot(dif.x, dif.y) > TOL );
+
+    out.z = input.z - dt*z0;
+
+    return out;
+}
+
+static XYZ forward_3d(LPZ lpz, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    PJ_COORD out, in;
+    XYZ shift;
+    double dt = 0.0;
+    in.lpz = lpz;
+    out = in;
+
+    if (Q->t_obs != HUGE_VAL) {
+        dt = Q->t_epoch - Q->t_obs;
+    } else {
+        out = proj_coord_error(); /* in the 3D case +t_obs must be specified */
+        proj_log_debug(P, "deformation: +t_obs must be specified");
+        return out.xyz;
+    }
+
+    shift = get_grid_shift(P, in.xyz);
+
+    out.xyz.x += dt * shift.x;
+    out.xyz.y += dt * shift.y;
+    out.xyz.z += dt * shift.z;
+
+    return out.xyz;
+}
+
+
+static PJ_COORD forward_4d(PJ_COORD in, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    double dt;
+    XYZ shift;
+    PJ_COORD out = in;
+
+    if (Q->t_obs != HUGE_VAL) {
+            dt = Q->t_epoch - Q->t_obs;
+        } else {
+            dt = Q->t_epoch - in.xyzt.t;
+    }
+
+    shift = get_grid_shift(P, in.xyz);
+
+    out.xyzt.x += dt*shift.x;
+    out.xyzt.y += dt*shift.y;
+    out.xyzt.z += dt*shift.z;
+
+
+    return out;
+}
+
+
+static LPZ reverse_3d(XYZ in, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    PJ_COORD out;
+    double dt = 0.0;
+    out.xyz = in;
+
+    if (Q->t_obs != HUGE_VAL) {
+        dt = Q->t_epoch - Q->t_obs;
+    } else {
+        out = proj_coord_error(); /* in the 3D case +t_obs must be specified */
+        proj_log_debug(P, "deformation: +t_obs must be specified");
+        return out.lpz;
+    }
+
+    out.xyz = reverse_shift(P, in, dt);
+
+    return out.lpz;
+}
+
+static PJ_COORD reverse_4d(PJ_COORD in, PJ *P) {
+    struct pj_opaque *Q = (struct pj_opaque *) P->opaque;
+    PJ_COORD out = in;
+    double dt;
+
+
+    if (Q->t_obs != HUGE_VAL) {
+            dt = Q->t_epoch - Q->t_obs;
+        } else {
+            dt = Q->t_epoch - in.xyzt.t;
+    }
+
+    out.xyz = reverse_shift(P, in.xyz, dt);
+    return out;
+}
+
+static void *destructor(PJ *P, int errlev) {
+    if (0==P)
+        return 0;
+
+    if (0==P->opaque)
+        return pj_default_destructor (P, errlev);
+
+    if (P->opaque->cart)
+        P->opaque->cart->destructor (P->opaque->cart, errlev);
+
+    return pj_default_destructor(P, errlev);
+}
+
+
+PJ *TRANSFORMATION(deformation,1) {
+    int has_xy_grids = 0;
+    int has_z_grids  = 0;
+    struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
+    if (0==Q)
+        return destructor(P, ENOMEM);
+    P->opaque = (void *) Q;
+
+    Q->cart = proj_create(P->ctx, "+proj=cart");
+    if (Q->cart == 0)
+        return destructor(P, ENOMEM);
+
+    /* inherit ellipsoid definition from P to Q->cart */
+    pj_inherit_ellipsoid_def (P, Q->cart);
+
+    has_xy_grids = pj_param(P->ctx, P->params, "txy_grids").i;
+    has_z_grids  = pj_param(P->ctx, P->params, "tz_grids").i;
+
+    /* Build gridlists. Both horizontal and vertical grids are mandatory. */
+    if (!has_xy_grids || !has_z_grids) {
+        proj_log_error(P, "deformation: Both +xy_grids and +z_grids should be specified.");
+        return destructor(P, PJD_ERR_NO_ARGS );
+    }
+
+    proj_hgrid_init(P, "xy_grids");
+    if (proj_errno(P)) {
+        proj_log_error(P, "deformation: could not find requested xy_grid(s).");
+        return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID);
+    }
+
+    proj_vgrid_init(P, "z_grids");
+    if (proj_errno(P)) {
+        proj_log_error(P, "deformation: could not find requested z_grid(s).");
+        return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID);
+    }
+
+    Q->t_obs = HUGE_VAL;
+    if (pj_param(P->ctx, P->params, "tt_obs").i) {
+       Q->t_obs = pj_param(P->ctx, P->params, "dt_obs").f;
+    }
+
+    if (pj_param(P->ctx, P->params, "tt_epoch").i) {
+        Q->t_epoch = pj_param(P->ctx, P->params, "dt_epoch").f;
+    } else {
+       proj_log_error(P, "deformation: +t_epoch parameter missing.");
+       return destructor(P, PJD_ERR_MISSING_ARGS);
+    }
+
+    P->fwd4d = forward_4d;
+    P->inv4d = reverse_4d;
+    P->fwd3d  = forward_3d;
+    P->inv3d  = reverse_3d;
+    P->fwd    = 0;
+    P->inv    = 0;
+
+    P->left  = PJ_IO_UNITS_CARTESIAN;
+    P->right = PJ_IO_UNITS_CARTESIAN;
+    P->destructor = destructor;
+
+    return P;
+}
+
diff --git a/src/PJ_denoy.c b/src/PJ_denoy.c
index 9eb818b..d89a7e3 100644
--- a/src/PJ_denoy.c
+++ b/src/PJ_denoy.c
@@ -22,16 +22,6 @@ static XY s_forward (LP lp, PJ *P) {            /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {               /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(denoy) {
     P->es = 0.0;
     P->fwd = s_forward;
@@ -39,31 +29,3 @@ PJ *PROJECTION(denoy) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_denoy_selftest (void) {return 0;}
-#else
-
-int pj_denoy_selftest (void) {
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=denoy   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223377.422876954137,  111701.07212763709},
-        { 223377.422876954137, -111701.07212763709},
-        {-223377.422876954137,  111701.07212763709},
-        {-223377.422876954137, -111701.07212763709},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, 0, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_eck1.c b/src/PJ_eck1.c
index da15901..4a9ac06 100644
--- a/src/PJ_eck1.c
+++ b/src/PJ_eck1.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(eck1, "Eckert I") "\n\tPCyl., Sph.";
 #define FC  0.92131773192356127802
@@ -28,65 +28,14 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(eck1) {
     P->es = 0.0;
     P->inv = s_inverse;
     P->fwd = s_forward;
 
-    return P
;
-}
-
-
-#ifndef PJ_SELFTEST
-int pj_eck1_selftest (void) {return 0;}
-#else
-
-int pj_eck1_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=eck1   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-    XY s_fwd_expect[] = {
-        { 204680.88820295094,  102912.17842606473},
-        { 204680.88820295094, -102912.17842606473},
-        {-204680.88820295094,  102912.17842606473},
-        {-204680.88820295094, -102912.17842606473},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0019434150820034624,  0.00097170229538813102},
-        { 0.0019434150820034624, -0.00097170229538813102},
-        {-0.0019434150820034624,  0.00097170229538813102},
-        {-0.0019434150820034624, -0.00097170229538813102},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
+    return P
+;
 }
 
 
-#endif
diff --git a/src/PJ_eck2.c b/src/PJ_eck2.c
index 763039a..b953b54 100644
--- a/src/PJ_eck2.c
+++ b/src/PJ_eck2.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-# include   <projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(eck2, "Eckert II") "\n\tPCyl. Sph.";
 
@@ -28,9 +29,12 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     lp.lam = xy.x / (FXC * ( lp.phi = 2. - fabs(xy.y) / FYC) );
     lp.phi = (4. - lp.phi * lp.phi) * C13;
     if (fabs(lp.phi) >= 1.) {
-        if (fabs(lp.phi) > ONEEPS)  I_ERROR
-        else
+        if (fabs(lp.phi) > ONEEPS) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        } else {
             lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI;
+        }
     } else
         lp.phi = asin(lp.phi);
     if (xy.y < 0)
@@ -39,16 +43,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc (P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(eck2) {
     P->es = 0.;
@@ -59,46 +53,3 @@ PJ *PROJECTION(eck2) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_eck2_selftest (void) {return 0;}
-#else
-
-int pj_eck2_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=eck2   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 204472.87090796008,  121633.73497524235},
-        { 204472.87090796008, -121633.73497524235},
-        {-204472.87090796008,  121633.73497524235},
-        {-204472.87090796008, -121633.73497524235},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0019434150820034624,  0.00082480429919795412},
-        { 0.0019434150820034624, -0.00082480429919795412},
-        {-0.0019434150820034624,  0.00082480429919795412},
-        {-0.0019434150820034624, -0.00082480429919795412},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_eck3.c b/src/PJ_eck3.c
index d70838d..21353be 100644
--- a/src/PJ_eck3.c
+++ b/src/PJ_eck3.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(eck3, "Eckert III") "\n\tPCyl, Sph.";
 PROJ_HEAD(putp1, "Putnins P1") "\n\tPCyl, Sph.";
@@ -24,29 +25,18 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
+    double denominator;
 
     lp.phi = xy.y / Q->C_y;
-    lp.lam = xy.x / (Q->C_x * (Q->A + asqrt(1. - Q->B * lp.phi * lp.phi)));
+    denominator = (Q->C_x * (Q->A + asqrt(1. - Q->B * lp.phi * lp.phi)));
+    if ( denominator == 0.0)
+        lp.lam = HUGE_VAL;
+    else
+        lp.lam = xy.x / denominator;
     return lp;
 }
 
 
-static void *freeup_new (PJ *P) {               /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 static PJ *setup(PJ *P) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -58,7 +48,7 @@ static PJ *setup(PJ *P) {
 PJ *PROJECTION(eck3) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->C_x = 0.42223820031577120149;
@@ -73,7 +63,7 @@ PJ *PROJECTION(eck3) {
 PJ *PROJECTION(kav7) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     /* Defined twice in original code - Using 0.866...,
@@ -91,7 +81,7 @@ PJ *PROJECTION(kav7) {
 PJ *PROJECTION(wag6) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->C_x = Q->C_y = 0.94745;
@@ -105,7 +95,7 @@ PJ *PROJECTION(wag6) {
 PJ *PROJECTION(putp1) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->C_x = 1.89490;
@@ -116,180 +106,3 @@ PJ *PROJECTION(putp1) {
     return setup(P);
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_eck3_selftest (void) {return 0;}
-#else
-
-int pj_eck3_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=eck3   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 188652.01572153764,  94328.919337031271},
-        { 188652.01572153764, -94328.919337031271},
-        {-188652.01572153764,  94328.919337031271},
-        {-188652.01572153764, -94328.919337031271},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0021202405520236059,  0.0010601202759750307},
-        { 0.0021202405520236059, -0.0010601202759750307},
-        {-0.0021202405520236059,  0.0010601202759750307},
-        {-0.0021202405520236059, -0.0010601202759750307},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
-
-#ifndef PJ_SELFTEST
-int pj_kav7_selftest (void) {return 0;}
-#else
-
-int pj_kav7_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=kav7   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 193462.9749437288,  111701.07212763709},
-        { 193462.9749437288, -111701.07212763709},
-        {-193462.9749437288,  111701.07212763709},
-        {-193462.9749437288, -111701.07212763709}
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0020674833579085268,  0.00089524655489191132},
-        { 0.0020674833579085268, -0.00089524655489191132},
-        {-0.0020674833579085268,  0.00089524655489191132},
-        {-0.0020674833579085268, -0.00089524655489191132}
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
-
-#ifndef PJ_SELFTEST
-int pj_wag6_selftest (void) {return 0;}
-#else
-
-int pj_wag6_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wag6   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 211652.56216440981,  105831.18078732977},
-        { 211652.56216440981, -105831.18078732977},
-        {-211652.56216440981,  105831.18078732977},
-        {-211652.56216440981, -105831.18078732977}
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0018898022163257513,  0.000944901108123818},
-        { 0.0018898022163257513, -0.000944901108123818},
-        {-0.0018898022163257513,  0.000944901108123818},
-        {-0.0018898022163257513, -0.000944901108123818}
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_putp1_selftest (void) {return 0;}
-#else
-
-int pj_putp1_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=putp1   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 211642.76275416015,  105831.18078732977},
-        { 211642.76275416015, -105831.18078732977},
-        {-211642.76275416015,  105831.18078732977},
-        {-211642.76275416015, -105831.18078732977}
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0018898022164038663,  0.000944901108123818},
-        { 0.0018898022164038663, -0.000944901108123818},
-        {-0.0018898022164038663,  0.000944901108123818},
-        {-0.0018898022164038663, -0.000944901108123818}
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_eck4.c b/src/PJ_eck4.c
index 358c022..a95c10b 100644
--- a/src/PJ_eck4.c
+++ b/src/PJ_eck4.c
@@ -44,25 +44,13 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     double c;
 
-    lp.phi = aasin(P->ctx,xy.y / C_y);
+    lp.phi = aasin(P->ctx,xy.y * RC_y);
     lp.lam = xy.x / (C_x * (1. + (c = cos(lp.phi))));
-    lp.phi = aasin(P->ctx,(lp.phi + sin(lp.phi) * (c + 2.)) / C_p);
+    lp.phi = aasin(P->ctx,(lp.phi + sin(lp.phi) * (c + 2.)) * RC_p);
     return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(eck4) {
     P->es = 0.0;
     P->inv = s_inverse;
@@ -71,47 +59,3 @@ PJ *PROJECTION(eck4) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_eck4_selftest (void) {return 0;}
-#else
-
-int pj_eck4_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=eck4   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 188646.38935641639,  132268.54017406539},
-        { 188646.38935641639, -132268.54017406539},
-        {-188646.38935641639,  132268.54017406539},
-        {-188646.38935641639, -132268.54017406539},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0021202405520236059, 0.00075601458836610643},
-        { 0.0021202405520236059, -0.00075601458836610643},
-        {-0.0021202405520236059, 0.00075601458836610643},
-        {-0.0021202405520236059, -0.00075601458836610643},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_eck5.c b/src/PJ_eck5.c
index 5fbdf7d..34a258e 100644
--- a/src/PJ_eck5.c
+++ b/src/PJ_eck5.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(eck5, "Eckert V") "\n\tPCyl, Sph.";
 
@@ -28,18 +28,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
-    if (0==P)
-        return 0;
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(eck5) {
     P->es = 0.0;
     P->inv = s_inverse;
@@ -48,46 +36,3 @@ PJ *PROJECTION(eck5) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_eck5_selftest (void) {return 0;}
-#else
-
-int pj_eck5_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=eck5   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 197031.39213406085,  98523.198847226551},
-        { 197031.39213406085, -98523.198847226551},
-        {-197031.39213406085,  98523.198847226551},
-        {-197031.39213406085, -98523.198847226551},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.002029978749734037,  0.001014989374787388},
-        {0.002029978749734037,  -0.001014989374787388},
-        {-0.002029978749734037,  0.001014989374787388},
-        {-0.002029978749734037,  -0.001014989374787388},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_eqc.c b/src/PJ_eqc.c
index 6f0cfcf..908147a 100644
--- a/src/PJ_eqc.c
+++ b/src/PJ_eqc.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 struct pj_opaque {
     double rc;
@@ -31,30 +33,14 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(eqc) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
-    if ((Q->rc = cos(pj_param(P->ctx, P->params, "rlat_ts").f)) <= 0.) E_ERROR(-24);
+    if ((Q->rc = cos(pj_param(P->ctx, P->params, "rlat_ts").f)) <= 0.)
+        return pj_default_destructor (P, PJD_ERR_LAT_TS_LARGER_THAN_90);
     P->inv = s_inverse;
     P->fwd = s_forward;
     P->es = 0.;
@@ -63,46 +49,3 @@ PJ *PROJECTION(eqc) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_eqc_selftest (void) {return 0;}
-#else
-
-int pj_eqc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=eqc   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223402.144255274179,  111701.07212763709},
-        { 223402.144255274179, -111701.07212763709},
-        {-223402.144255274179,  111701.07212763709},
-        {-223402.144255274179, -111701.07212763709},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049310978382265,  0.000895246554891911323},
-        { 0.00179049310978382265, -0.000895246554891911323},
-        {-0.00179049310978382265,  0.000895246554891911323},
-        {-0.00179049310978382265, -0.000895246554891911323},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_eqdc.c b/src/PJ_eqdc.c
index 1fc4cef..6846aba 100644
--- a/src/PJ_eqdc.c
+++ b/src/PJ_eqdc.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 struct pj_opaque {
     double phi1;
@@ -52,36 +54,15 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void special(LP lp, PJ *P, struct FACTORS *fac) {
-    struct pj_opaque *Q = P->opaque;
-    double sinphi, cosphi;
-
-    sinphi = sin(lp.phi);
-    cosphi = cos(lp.phi);
-    fac->code |= IS_ANAL_HK;
-    fac->h = 1.;
-    fac->k = Q->n * (Q->c - (Q->ellips ? pj_mlfn(lp.phi, sinphi,
-        cosphi, Q->en) : lp.phi)) / pj_msfn(sinphi, cosphi, P->es);
-}
-
-
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor (PJ *P, int errlev) {                        /* Destructor */
     if (0==P)
         return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    if (P->opaque->en)
-        pj_dealloc (P->opaque->en);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
 
+    if (0==P->opaque)
+        return pj_default_destructor (P, errlev);
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    pj_dealloc (P->opaque->en);
+    return pj_default_destructor (P, errlev);
 }
 
 
@@ -91,14 +72,19 @@ PJ *PROJECTION(eqdc) {
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
     Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f;
     Q->phi2 = pj_param(P->ctx, P->params, "rlat_2").f;
-    if (fabs(Q->phi1 + Q->phi2) < EPS10) E_ERROR(-21);
+
+    if (fabs(Q->phi1 + Q->phi2) < EPS10)
+        return pj_default_destructor (P, PJD_ERR_CONIC_LAT_EQUAL);
+
     if (!(Q->en = pj_enfn(P->es)))
-        E_ERROR_0;
+        return pj_default_destructor(P, ENOMEM);
+
     Q->n = sinphi = sin(Q->phi1);
     cosphi = cos(Q->phi1);
     secant = fabs(Q->phi1 - Q->phi2) >= EPS10;
@@ -122,69 +108,11 @@ PJ *PROJECTION(eqdc) {
         Q->c = Q->phi1 + cos(Q->phi1) / Q->n;
         Q->rho0 = Q->c - P->phi0;
     }
+
     P->inv = e_inverse;
     P->fwd = e_forward;
-    P->spc = special;
 
     return P;
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_eqdc_selftest (void) {return 0;}
-#else
-
-int pj_eqdc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=eqdc   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=eqdc   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222588.440269285755,  110659.134907347048},
-        { 222756.836702042434, -110489.578087220681},
-        {-222588.440269285755,  110659.134907347048},
-        {-222756.836702042434, -110489.578087220681},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223351.088175113517,  111786.108747173785},
-        { 223521.200266735133, -111615.970741240744},
-        {-223351.088175113517,  111786.108747173785},
-        {-223521.200266735133, -111615.970741240744},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00179635944879094839,  0.000904368858588402644},
-        { 0.00179635822020772734, -0.000904370095529954975},
-        {-0.00179635944879094839,  0.000904368858588402644},
-        {-0.00179635822020772734, -0.000904370095529954975},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017902210900486641,   0.000895245944814909169},
-        { 0.00179021986984890255, -0.000895247165333684842},
-        {-0.0017902210900486641,   0.000895245944814909169},
-        {-0.00179021986984890255, -0.000895247165333684842},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_fahey.c b/src/PJ_fahey.c
index 4f4b92a..5360611 100644
--- a/src/PJ_fahey.c
+++ b/src/PJ_fahey.c
@@ -29,19 +29,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(fahey) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -50,46 +37,3 @@ PJ *PROJECTION(fahey) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_fahey_selftest (void) {return 0;}
-#else
-
-int pj_fahey_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=fahey   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 182993.34464912376,  101603.19356988439},
-        { 182993.34464912376, -101603.19356988439},
-        {-182993.34464912376,  101603.19356988439},
-        {-182993.34464912376, -101603.19356988439},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.0021857886080359551,  0.00098424601668238403},
-        {0.0021857886080359551,  -0.00098424601668238403},
-        {-0.0021857886080359551,  0.00098424601668238403},
-        {-0.0021857886080359551,  -0.00098424601668238403},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_fouc_s.c b/src/PJ_fouc_s.c
index 4392a6e..b8ae4a0 100644
--- a/src/PJ_fouc_s.c
+++ b/src/PJ_fouc_s.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(fouc_s, "Foucaut Sinusoidal") "\n\tPCyl., Sph.";
 
@@ -29,7 +31,7 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     double V;
     int i;
 
-    if (Q->n) {
+    if (Q->n != 0.0) {
         lp.phi = xy.y;
         for (i = MAX_ITER; i ; --i) {
             lp.phi -= V = (Q->n * lp.phi + Q->n1 * sin(lp.phi) - xy.y ) /
@@ -47,32 +49,16 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(fouc_s) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->n = pj_param(P->ctx, P->params, "dn").f;
     if (Q->n < 0. || Q->n > 1.)
-        E_ERROR(-99)
+        return pj_default_destructor (P, PJD_ERR_N_OUT_OF_RANGE);
+
     Q->n1 = 1. - Q->n;
     P->es = 0;
     P->inv = s_inverse;
@@ -81,46 +67,3 @@ PJ *PROJECTION(fouc_s) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_fouc_s_selftest (void) {return 0;}
-#else
-
-int pj_fouc_s_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=fouc_s   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223402.14425527424,  111695.40119861449},
-        { 223402.14425527424, -111695.40119861449},
-        {-223402.14425527424,  111695.40119861449},
-        {-223402.14425527424, -111695.40119861449},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931097838226,  0.000895246554928339},
-        { 0.0017904931097838226, -0.000895246554928339},
-        {-0.0017904931097838226,  0.000895246554928339},
-        {-0.0017904931097838226, -0.000895246554928339},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_gall.c b/src/PJ_gall.c
index bca36bc..cb213e2 100644
--- a/src/PJ_gall.c
+++ b/src/PJ_gall.c
@@ -31,20 +31,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(gall) {
     P->es = 0.0;
 
@@ -55,46 +41,3 @@ PJ *PROJECTION(gall) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_gall_selftest (void) {return 0;}
-#else
-
-int pj_gall_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=gall   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 157969.17113451968,  95345.249178385886},
-        { 157969.17113451968, -95345.249178385886},
-        {-157969.17113451968,  95345.249178385886},
-        {-157969.17113451968, -95345.249178385886},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0025321396391918614,  0.001048846580346495},
-        { 0.0025321396391918614, -0.001048846580346495},
-        {-0.0025321396391918614,  0.001048846580346495},
-        {-0.0025321396391918614, -0.001048846580346495},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/pj_log.c b/src/PJ_geoc.c
similarity index 51%
copy from src/pj_log.c
copy to src/PJ_geoc.c
index 54b83a0..038da60 100644
--- a/src/pj_log.c
+++ b/src/PJ_geoc.c
@@ -1,10 +1,11 @@
 /******************************************************************************
  * Project:  PROJ.4
- * Purpose:  Implementation of pj_log() function.
- * Author:   Frank Warmerdam, warmerdam at pobox.com
+ * Purpose:  Conversion from geographic to geocentric latitude and back.
+ * Author:   Thomas Knudsen (2017)
  *
  ******************************************************************************
- * Copyright (c) 2010, Frank Warmerdam
+ * Copyright (c) 2017, SDFE, http://www.sdfe.dk
+ * Copyright (c) 2017, Thomas Knudsen
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -25,47 +26,31 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
-#include <projects.h>
-#include <string.h>
-#include <stdarg.h>
+#define PJ_LIB__
+#include <proj.h>
+#include <errno.h>
+#include "projects.h"
 
-/************************************************************************/
-/*                          pj_stderr_logger()                          */
-/************************************************************************/
+PROJ_HEAD(geoc, "Geocentric Latitude");
 
-void pj_stderr_logger( void *app_data, int level, const char *msg )
-
-{
-    (void) app_data;
-    (void) level;
-    fprintf( stderr, "%s\n", msg );
+/* Geographical to geocentric */
+static PJ_COORD forward(PJ_COORD coo, PJ *P) {
+    return proj_geocentric_latitude (P, PJ_FWD, coo);
 }
 
-/************************************************************************/
-/*                               pj_log()                               */
-/************************************************************************/
-
-void pj_log( projCtx ctx, int level, const char *fmt, ... )
-
-{
-    va_list args;
-    char *msg_buf;
-
-    if( level > ctx->debug_level )
-        return;
-
-    msg_buf = (char *) malloc(100000);
-    if( msg_buf == NULL )
-        return;
+/* Geocentric to geographical */
+static PJ_COORD inverse(PJ_COORD coo, PJ *P) {
+    return proj_geocentric_latitude (P, PJ_INV, coo);
+}
 
-    va_start( args, fmt );
 
-    /* we should use vsnprintf where available once we add configure detect.*/
-    vsprintf( msg_buf, fmt, args );
+static PJ *CONVERSION(geoc, 1) {
+    P->inv4d = inverse;
+    P->fwd4d = forward;
 
-    va_end( args );
+    P->left   =  PJ_IO_UNITS_ANGULAR;
+    P->right  =  PJ_IO_UNITS_ANGULAR;
 
-    ctx->logger( ctx->app_data, level, msg_buf );
-    
-    free( msg_buf );
+    P->is_latlong = 1;
+    return P;
 }
diff --git a/src/PJ_geos.c b/src/PJ_geos.c
index 283063b..a787db2 100644
--- a/src/PJ_geos.c
+++ b/src/PJ_geos.c
@@ -28,7 +28,9 @@
 */
 
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 struct pj_opaque {
     double h;
@@ -38,7 +40,6 @@ struct pj_opaque {
     double radius_g;
     double radius_g_1;
     double C;
-    char *sweep_axis;
     int flip_axis;
 };
 
@@ -91,8 +92,10 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     Vz = r * sin (lp.phi);
 
     /* Check visibility. */
-    if (((Q->radius_g - Vx) * Vx - Vy * Vy - Vz * Vz * Q->radius_p_inv2) < 0.)
-        F_ERROR;
+    if (((Q->radius_g - Vx) * Vx - Vy * Vy - Vz * Vz * Q->radius_p_inv2) < 0.) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
 
     /* Calculation based on view angles from satellite. */
     tmp = Q->radius_g - Vx;
@@ -127,7 +130,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     /* Calculation of terms in cubic equation and determinant.*/
     a = Vy * Vy + Vz * Vz + Vx * Vx;
     b = 2 * Q->radius_g * Vx;
-    if ((det = (b * b) - 4 * a * Q->C) < 0.) I_ERROR;
+    if ((det = (b * b) - 4 * a * Q->C) < 0.) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
 
     /* Calculation of three components of vector from satellite to position.*/
     k  = (-b - sqrt(det)) / (2 * a);
@@ -163,7 +169,10 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     a = Vz / Q->radius_p;
     a   = Vy * Vy + a * a + Vx * Vx;
     b   = 2 * Q->radius_g * Vx;
-    if ((det = (b * b) - 4 * a * Q->C) < 0.) I_ERROR;
+    if ((det = (b * b) - 4 * a * Q->C) < 0.) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
 
     /* Calculation of three components of vector from satellite to position.*/
     k  = (-b - sqrt(det)) / (2. * a);
@@ -180,41 +189,27 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(geos) {
+    char *sweep_axis;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
-    if ((Q->h = pj_param(P->ctx, P->params, "dh").f) <= 0.) E_ERROR(-30);
+    if ((Q->h = pj_param(P->ctx, P->params, "dh").f) <= 0.)
+        return pj_default_destructor (P, PJD_ERR_H_LESS_THAN_ZERO);
 
-    if (P->phi0) E_ERROR(-46);
+    if (P->phi0 != 0.0)
+        return pj_default_destructor (P, PJD_ERR_UNKNOWN_PRIME_MERIDIAN);
 
-    Q->sweep_axis = pj_param(P->ctx, P->params, "ssweep").s;
-    if (Q->sweep_axis == NULL)
+    sweep_axis = pj_param(P->ctx, P->params, "ssweep").s;
+    if (sweep_axis == NULL)
       Q->flip_axis = 0;
     else {
-        if (Q->sweep_axis[1] != '\0' ||
-            (Q->sweep_axis[0] != 'x' &&
-             Q->sweep_axis[0] != 'y'))
-          E_ERROR(-49);
-        if (Q->sweep_axis[0] == 'x')
+        if (sweep_axis[1] != '\0' || (sweep_axis[0] != 'x' && sweep_axis[0] != 'y'))
+            return pj_default_destructor (P, PJD_ERR_INVALID_SWEEP_AXIS);
+
+        if (sweep_axis[0] == 'x')
           Q->flip_axis = 1;
         else
           Q->flip_axis = 0;
@@ -223,7 +218,7 @@ PJ *PROJECTION(geos) {
     Q->radius_g_1 = Q->h / P->a;
     Q->radius_g = 1. + Q->radius_g_1;
     Q->C  = Q->radius_g * Q->radius_g - 1.0;
-    if (P->es) {
+    if (P->es != 0.0) {
         Q->radius_p      = sqrt (P->one_es);
         Q->radius_p2     = P->one_es;
         Q->radius_p_inv2 = P->rone_es;
@@ -239,61 +234,3 @@ PJ *PROJECTION(geos) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_geos_selftest (void) {return 0;}
-#else
-
-int pj_geos_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=geos   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +h=35785831"};
-    char s_args[] = {"+proj=geos   +a=6400000    +lat_1=0.5 +lat_2=2 +h=35785831"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222527.07036580026,  110551.30341332949},
-        { 222527.07036580026, -110551.30341332949},
-        {-222527.07036580026,  110551.30341332949},
-        {-222527.07036580026, -110551.30341332949},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223289.45763579503,  111677.65745653701},
-        { 223289.45763579503,  -111677.65745653701},
-        {-223289.45763579503,  111677.65745653701},
-        {-223289.45763579503,  -111677.65745653701},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966305689715385,  0.00090436947723267452},
-        { 0.0017966305689715385, -0.00090436947723267452},
-        {-0.0017966305689715385,  0.00090436947723267452},
-        {-0.0017966305689715385, -0.00090436947723267452},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931105078943,  0.00089524655504237148},
-        { 0.0017904931105078943, -0.00089524655504237148},
-        {-0.0017904931105078943,  0.00089524655504237148},
-        {-0.0017904931105078943, -0.00089524655504237148},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_gins8.c b/src/PJ_gins8.c
index 48bdf3a..ae0d4de 100644
--- a/src/PJ_gins8.c
+++ b/src/PJ_gins8.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(gins8, "Ginsburg VIII (TsNIIGAiK)") "\n\tPCyl, Sph., no inv.";
 
@@ -22,19 +22,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(gins8) {
     P->es = 0.0;
     P->inv = 0;
@@ -44,32 +31,3 @@ PJ *PROJECTION(gins8) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_gins8_selftest (void) {return 0;}
-#else
-
-int pj_gins8_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=gins8   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 194350.25093959007,  111703.90763533533},
-        { 194350.25093959007, -111703.90763533533},
-        {-194350.25093959007,  111703.90763533533},
-        {-194350.25093959007, -111703.90763533533},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_gn_sinu.c b/src/PJ_gn_sinu.c
index b35ee29..585d43c 100644
--- a/src/PJ_gn_sinu.c
+++ b/src/PJ_gn_sinu.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(gn_sinu, "General Sinusoidal Series") "\n\tPCyl, Sph.\n\tm= n=";
 PROJ_HEAD(sinu, "Sinusoidal (Sanson-Flamsteed)") "\n\tPCyl, Sph&Ell";
@@ -36,7 +38,7 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     } else if ((s - EPS10) < M_HALFPI) {
         lp.lam = 0.;
     } else {
-        I_ERROR;
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
     }
 
     return lp;
@@ -47,7 +49,7 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
 
-    if (!Q->m)
+    if (Q->m == 0.0)
         lp.phi = Q->n != 1. ? aasin(P->ctx,Q->n * sin(lp.phi)): lp.phi;
     else {
         double k, V;
@@ -60,8 +62,11 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
             if (fabs(V) < LOOP_TOL)
                 break;
         }
-        if (!i)
-            F_ERROR
+        if (!i) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
+
     }
     xy.x = Q->C_x * lp.lam * (Q->m + cos(lp.phi));
     xy.y = Q->C_y * lp.phi;
@@ -75,32 +80,25 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     struct pj_opaque *Q = P->opaque;
 
     xy.y /= Q->C_y;
-    lp.phi = Q->m ? aasin(P->ctx,(Q->m * xy.y + sin(xy.y)) / Q->n) :
+    lp.phi = (Q->m != 0.0) ? aasin(P->ctx,(Q->m * xy.y + sin(xy.y)) / Q->n) :
         ( Q->n != 1. ? aasin(P->ctx,sin(xy.y) / Q->n) : xy.y );
     lp.lam = xy.x / (Q->C_x * (Q->m + cos(xy.y)));
     return lp;
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
+static void *destructor (PJ *P, int errlev) {                        /* Destructor */
     if (0==P)
         return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
 
-    if (P->opaque->en)
-        pj_dalloc(P->opaque->en);
+    if (0==P->opaque)
+        return pj_default_destructor (P, errlev);
 
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
+    pj_dealloc (P->opaque->en);
+    return pj_default_destructor (P, errlev);
 }
 
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 /* for spheres, only */
 static void setup(PJ *P) {
@@ -116,13 +114,14 @@ static void setup(PJ *P) {
 PJ *PROJECTION(sinu) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
     if (!(Q->en = pj_enfn(P->es)))
-        E_ERROR_0;
+        return pj_default_destructor (P, ENOMEM);
 
-    if (P->es) {
+    if (P->es != 0.0) {
         P->inv = e_inverse;
         P->fwd = e_forward;
     } else {
@@ -137,8 +136,9 @@ PJ *PROJECTION(sinu) {
 PJ *PROJECTION(eck6) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
     Q->m = 1.;
     Q->n = 2.570796326794896619231321691;
@@ -151,8 +151,9 @@ PJ *PROJECTION(eck6) {
 PJ *PROJECTION(mbtfps) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
     Q->m = 0.5;
     Q->n = 1.785398163397448309615660845;
@@ -165,209 +166,20 @@ PJ *PROJECTION(mbtfps) {
 PJ *PROJECTION(gn_sinu) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
     if (pj_param(P->ctx, P->params, "tn").i && pj_param(P->ctx, P->params, "tm").i) {
         Q->n = pj_param(P->ctx, P->params, "dn").f;
         Q->m = pj_param(P->ctx, P->params, "dm").f;
+        if (Q->n <= 0 || Q->m < 0)
+            return destructor (P, PJD_ERR_INVALID_M_OR_N);
     } else
-        E_ERROR(-99)
+        return destructor (P, PJD_ERR_INVALID_M_OR_N);
 
     setup(P);
 
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_sinu_selftest (void) {return 0;}
-#else
-
-int pj_sinu_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=sinu   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=sinu   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222605.29953946592,  110574.38855415257},
-        { 222605.29953946592, -110574.38855415257},
-        {-222605.29953946592,  110574.38855415257},
-        {-222605.29953946592, -110574.38855415257},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223368.11902663155,  111701.07212763709},
-        { 223368.11902663155, -111701.07212763709},
-        {-223368.11902663155,  111701.07212763709},
-        {-223368.11902663155, -111701.07212763709},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966305684613522,  0.00090436947707945409},
-        { 0.0017966305684613522, -0.00090436947707945409},
-        {-0.0017966305684613522,  0.00090436947707945409},
-        {-0.0017966305684613522, -0.00090436947707945409},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931100023887,  0.00089524655489191132},
-        { 0.0017904931100023887, -0.00089524655489191132},
-        {-0.0017904931100023887,  0.00089524655489191132},
-        {-0.0017904931100023887, -0.00089524655489191132},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-#ifndef PJ_SELFTEST
-int pj_eck6_selftest (void) {return 0;}
-#else
-
-int pj_eck6_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=eck6   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 197021.60562899226,  126640.42073317352},
-        { 197021.60562899226, -126640.42073317352},
-        {-197021.60562899226,  126640.42073317352},
-        {-197021.60562899226, -126640.42073317352},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.002029978749734037,  0.00078963032910382171},
-        { 0.002029978749734037, -0.00078963032910382171},
-        {-0.002029978749734037,  0.00078963032910382171},
-        {-0.002029978749734037, -0.00078963032910382171},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
-
-#ifndef PJ_SELFTEST
-int pj_mbtfps_selftest (void) {return 0;}
-#else
-
-int pj_mbtfps_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=mbtfps   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 204740.11747857218,  121864.72971934026},
-        { 204740.11747857218, -121864.72971934026},
-        {-204740.11747857218,  121864.72971934026},
-        {-204740.11747857218, -121864.72971934026},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0019534152166442065,  0.00082057965689633387},
-        { 0.0019534152166442065, -0.00082057965689633387},
-        {-0.0019534152166442065,  0.00082057965689633387},
-        {-0.0019534152166442065, -0.00082057965689633387},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_gn_sinu_selftest (void) {return 0;}
-#else
-
-int pj_gn_sinu_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=gn_sinu   +a=6400000    +lat_1=0.5 +lat_2=2 +m=1 +n=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223385.13250469571,  111698.23644718733},
-        { 223385.13250469571, -111698.23644718733},
-        {-223385.13250469571,  111698.23644718733},
-        {-223385.13250469571, -111698.23644718733},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931098931057,  0.00089524655491012516},
-        { 0.0017904931098931057, -0.00089524655491012516},
-        {-0.0017904931098931057,  0.00089524655491012516},
-        {-0.0017904931098931057, -0.00089524655491012516},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_gnom.c b/src/PJ_gnom.c
index 37f5d71..1277456 100644
--- a/src/PJ_gnom.c
+++ b/src/PJ_gnom.c
@@ -1,18 +1,23 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph.";
 
 #define EPS10  1.e-10
-#define N_POLE 0
-#define S_POLE 1
-#define EQUIT  2
-#define OBLIQ  3
+
+enum Mode {
+    N_POLE = 0,
+    S_POLE = 1,
+    EQUIT  = 2,
+    OBLIQ  = 3
+};
 
 struct pj_opaque {
     double  sinph0;
     double  cosph0;
-    int     mode;
+    enum Mode mode;
 };
 
 
@@ -40,7 +45,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
             break;
     }
 
-    if (xy.y <= EPS10) F_ERROR;
+    if (xy.y <= EPS10) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
 
     xy.x = (xy.y = 1. / xy.y) * cosphi * sin(lp.lam);
     switch (Q->mode) {
@@ -52,6 +60,7 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
             break;
         case N_POLE:
             coslam = - coslam;
+            /*-fallthrough*/
         case S_POLE:
             xy.y *= cosphi * coslam;
             break;
@@ -106,27 +115,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(gnom) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     if (fabs(fabs(P->phi0) - M_HALFPI) < EPS10) {
@@ -146,47 +138,3 @@ PJ *PROJECTION(gnom) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_gnom_selftest (void) {return 0;}
-#else
-
-int pj_gnom_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=gnom   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223492.92474718543,  111780.50920659291},
-        { 223492.92474718543, -111780.50920659291},
-        {-223492.92474718543,  111780.50920659291},
-        {-223492.92474718543, -111780.50920659291},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931092009798,  0.00089524655438192376},
-        { 0.0017904931092009798, -0.00089524655438192376},
-        {-0.0017904931092009798,  0.00089524655438192376},
-        {-0.0017904931092009798, -0.00089524655438192376},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_goode.c b/src/PJ_goode.c
index fd63fa8..34312b3 100644
--- a/src/PJ_goode.c
+++ b/src/PJ_goode.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(goode, "Goode Homolosine") "\n\tPCyl, Sph.";
 
@@ -42,41 +44,33 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
+static void *destructor (PJ *P, int errlev) {              /* Destructor */
     if (0==P)
         return 0;
     if (0==P->opaque)
-        return pj_dealloc(P);
-    if (P->opaque->sinu)
-        pj_dealloc(P->opaque->sinu);
-    if (P->opaque->moll)
-        pj_dealloc(P->opaque->moll);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-
+        return pj_default_destructor (P, errlev);
+    pj_free (P->opaque->sinu);
+    pj_free (P->opaque->moll);
+    return pj_default_destructor (P, errlev);
 }
 
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(goode) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
     P->es = 0.;
     if (!(Q->sinu = pj_sinu(0)) || !(Q->moll = pj_moll(0)))
-        E_ERROR_0;
+        return destructor (P, ENOMEM);
     Q->sinu->es = 0.;
-        Q->sinu->ctx = P->ctx;
-        Q->moll->ctx = P->ctx;
+    Q->sinu->ctx = P->ctx;
+    Q->moll->ctx = P->ctx;
     if (!(Q->sinu = pj_sinu(Q->sinu)) || !(Q->moll = pj_moll(Q->moll)))
-        E_ERROR_0;
+        return destructor (P, ENOMEM);
 
     P->fwd = s_forward;
     P->inv = s_inverse;
@@ -85,38 +79,3 @@ PJ *PROJECTION(goode) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_goode_selftest (void) {return 0;}
-#else
-
-int pj_goode_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=goode   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223368.11902663155,  111701.07212763709},
        { 223368.11902663155, -111701.07212763709},
        {-223368.11902663155,  111701.07212763709},
        {-223368.11902663155, -111701.07212763709},
    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931100023887,  0.00089524655489191132},
        { 0.0017904931100023887, -0.00089524655489191132},
        {-0.0017904931100023887,  0.00089524655489191132},
        {-0.0017904931100023887, -0.00089524655489191132},
    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_gstmerc.c b/src/PJ_gstmerc.c
index 0951aac..81ec4e1 100644
--- a/src/PJ_gstmerc.c
+++ b/src/PJ_gstmerc.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(gstmerc, "Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)")
     "\n\tCyl, Sph&Ell\n\tlat_0= lon_0= k_0=";
@@ -46,27 +47,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(gstmerc) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->lamc = P->lam0;
@@ -84,48 +68,3 @@ PJ *PROJECTION(gstmerc) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_gstmerc_selftest (void) {return 0;}
-#else
-
-int pj_gstmerc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=gstmerc   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-
-    XY s_fwd_expect[] = {
-        { 223413.46640632182,  111769.14504058557},
-        { 223413.46640632182, -111769.14504058668},
-        {-223413.46640632302,  111769.14504058557},
-        {-223413.46640632302, -111769.14504058668},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931097109673,  0.0008952465544509083},
-        { 0.0017904931097109673, -0.0008952465544509083},
-        {-0.0017904931097109673,  0.0008952465544509083},
-        {-0.0017904931097109673, -0.0008952465544509083},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_hammer.c b/src/PJ_hammer.c
index 891baa0..4cdaba8 100644
--- a/src/PJ_hammer.c
+++ b/src/PJ_hammer.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
     "\n\tMisc Sph, \n\tW= M=";
@@ -7,7 +9,7 @@ PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
 #define EPS 1.0e-10
 
 struct pj_opaque {
-    double w; \
+    double w;
     double m, rm;
 };
 
@@ -33,7 +35,7 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     if (fabs(2.*z*z-1.) < EPS) {
         lp.lam = HUGE_VAL;
         lp.phi = HUGE_VAL;
-        pj_errno = -14;
+        proj_errno_set(P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT);
     } else {
         lp.lam = aatan2(Q->w * xy.x * z,2. * z * z - 1)/Q->w;
         lp.phi = aasin(P->ctx,z * xy.y);
@@ -42,34 +44,20 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(hammer) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     if (pj_param(P->ctx, P->params, "tW").i) {
-        if ((Q->w = fabs(pj_param(P->ctx, P->params, "dW").f)) <= 0.) E_ERROR(-27);
+        if ((Q->w = fabs(pj_param(P->ctx, P->params, "dW").f)) <= 0.)
+            return pj_default_destructor (P, PJD_ERR_W_OR_M_ZERO_OR_LESS);
     } else
         Q->w = .5;
     if (pj_param(P->ctx, P->params, "tM").i) {
-        if ((Q->m = fabs(pj_param(P->ctx, P->params, "dM").f)) <= 0.) E_ERROR(-27);
+        if ((Q->m = fabs(pj_param(P->ctx, P->params, "dM").f)) <= 0.)
+            return pj_default_destructor (P, PJD_ERR_W_OR_M_ZERO_OR_LESS);
     } else
         Q->m = 1.;
 
@@ -83,47 +71,3 @@ PJ *PROJECTION(hammer) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_hammer_selftest (void) {return 0;}
-#else
-
-int pj_hammer_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=hammer   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223373.78870324057,  111703.90739776699},
-        { 223373.78870324057, -111703.90739776699},
-        {-223373.78870324057,  111703.90739776699},
-        {-223373.78870324057, -111703.90739776699},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.001790493109965961,  0.00089524655487369749},
-        { 0.001790493109965961, -0.00089524655487369749},
-        {-0.001790493109965961,  0.00089524655487369749},
-        {-0.001790493109965961, -0.00089524655487369749},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_hatano.c b/src/PJ_hatano.c
index 9e681a3..79f46a7 100644
--- a/src/PJ_hatano.c
+++ b/src/PJ_hatano.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area") "\n\tPCyl, Sph.";
 
@@ -43,7 +44,8 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     th = xy.y * ( xy.y < 0. ? RYCS : RYCN);
     if (fabs(th) > 1.) {
         if (fabs(th) > ONETOL) {
-            I_ERROR;
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
         } else {
             th = th > 0. ? M_HALFPI : - M_HALFPI;
         }
@@ -56,7 +58,8 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     lp.phi = (th + sin(th)) * (xy.y < 0. ? RCS : RCN);
     if (fabs(lp.phi) > 1.) {
         if (fabs(lp.phi) > ONETOL) {
-           I_ERROR;
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
         } else {
             lp.phi = lp.phi > 0. ? M_HALFPI : - M_HALFPI;
         }
@@ -68,19 +71,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(hatano) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -89,46 +79,3 @@ PJ *PROJECTION(hatano) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_hatano_selftest (void) {return 0;}
-#else
-
-int pj_hatano_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=hatano   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 189878.87894652804,  131409.8024406255
},
-        { 189881.08195244463, -131409.14227607418
},
-        {-189878.87894652804,  131409.8024406255
},
-        {-189881.08195244463, -131409.14227607418
},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0021064624821817597,  0.00076095689425791926
},
-        { 0.0021064624821676096, -0.00076095777439265377
},
-        {-0.0021064624821817597,  0.00076095689425791926
},
-        {-0.0021064624821676096, -0.00076095777439265377
},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_healpix.c b/src/PJ_healpix.c
index c5374df..2d62050 100644
--- a/src/PJ_healpix.c
+++ b/src/PJ_healpix.c
@@ -29,7 +29,10 @@
  * SOFTWARE.
  *****************************************************************************/
 # define PJ_LIB__
-# include <projects.h>
+# include <errno.h>
+# include "proj_internal.h"
+# include <proj.h>
+# include "projects.h"
 
 PROJ_HEAD(healpix, "HEALPix") "\n\tSph., Ellps.";
 PROJ_HEAD(rhealpix, "rHEALPix") "\n\tSph., Ellps.\n\tnorth_square= south_square=";
@@ -61,14 +64,14 @@ typedef struct {
     enum Region {north, south, equatorial} region;
 } CapMap;
 
-double rot[7][2][2] = ROT;
+static const double rot[7][2][2] = ROT;
 
 /**
  * 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 pj_sign (double v) {
+static double pj_sign (double v) {
     return v > 0 ? 1 : (v < 0 ? -1 : 0);
 }
 
@@ -106,7 +109,7 @@ static int get_rotate_index(int index) {
  * @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, c = 0;
+    int i;
     int counter = 0;
     double xinters;
     XY p1, p2;
@@ -141,7 +144,6 @@ static int pnpoly(int nvert, double vert[][2], double testx, double testy) {
     } else {
         return 1;
     }
-    return c;
 }
 
 
@@ -152,7 +154,8 @@ static int pnpoly(int nvert, double vert[][2], double testx, double testy) {
  * @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 north_square, int south_square) {
+static int in_image(double x, double y, int proj, int north_square,
+                    int south_square) {
     if (proj == 0) {
         double healpixVertsJit[][2] = {
             {-M_PI - EPS,  M_FORTPI},
@@ -183,7 +186,7 @@ int in_image(double x, double y, int proj, int north_square, int south_square) {
          * Before C99 this was not allowed and to keep as portable as
          * possible we do it the C89 way here.
          * We need to assign the array this way because the input is
-         * dynamic (north_square and south_square vars are unknow at
+         * dynamic (north_square and south_square vars are unknown at
          * compile time).
          **/
         double rhealpixVertsJit[12][2];
@@ -221,9 +224,9 @@ int in_image(double x, double y, int proj, int north_square, int south_square) {
 /**
  * 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.
+ * P contains the relevant ellipsoid parameters.
  **/
-double auth_lat(PJ *P, double alpha, int inverse) {
+static double auth_lat(PJ *P, double alpha, int inverse) {
     struct pj_opaque *Q = P->opaque;
     if (inverse == 0) {
         /* Authalic latitude. */
@@ -231,7 +234,7 @@ double auth_lat(PJ *P, double alpha, int inverse) {
         double qp = Q->qp;
         double ratio = q/qp;
 
-        if (fabsl(ratio) > 1) {
+        if (fabs(ratio) > 1) {
             /* Rounding error. */
             ratio = pj_sign(ratio);
         }
@@ -247,19 +250,19 @@ double auth_lat(PJ *P, double alpha, int inverse) {
  * Return the HEALPix projection of the longitude-latitude point lp on
  * the unit sphere.
 **/
-XY healpix_sphere(LP lp) {
+static 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) {
+    if ( fabs(phi) <= phi0) {
         xy.x = lam;
         xy.y = 3*M_PI/8*sin(phi);
     } else {
         double lamc;
-        double sigma = sqrt(3*(1 - fabsl(sin(phi))));
+        double sigma = sqrt(3*(1 - fabs(sin(phi))));
         double cn = floor(2*lam / M_PI + 2);
         if (cn >= 4) {
             cn = 3;
@@ -275,24 +278,24 @@ XY healpix_sphere(LP lp) {
 /**
  * Return the inverse of healpix_sphere().
 **/
-LP healpix_sphere_inverse(XY xy) {
+static LP healpix_sphere_inverse(XY xy) {
     LP lp;
     double x = xy.x;
     double y = xy.y;
     double y0 = M_FORTPI;
 
     /* Equatorial region. */
-    if (fabsl(y) <= y0) {
+    if (fabs(y) <= y0) {
         lp.lam = x;
         lp.phi = asin(8*y/(3*M_PI));
-    } else if (fabsl(y) < M_HALFPI) {
+    } else if (fabs(y) < M_HALFPI) {
         double cn = floor(2*x/M_PI + 2);
         double xc, tau;
         if (cn >= 4) {
             cn = 3;
         }
         xc = -3*M_FORTPI + M_HALFPI*cn;
-        tau = 2.0 - 4*fabsl(y)/M_PI;
+        tau = 2.0 - 4*fabs(y)/M_PI;
         lp.lam = xc + (x - xc)/tau;
         lp.phi = pj_sign(y)*asin(1.0 - pow(tau, 2)/3.0);
     } else {
@@ -307,7 +310,7 @@ LP healpix_sphere_inverse(XY xy) {
  * 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[2], double b[2], double *ret) {
+static void vector_add(const double a[2], const double b[2], double *ret) {
     int i;
     for(i = 0; i < 2; i++) {
         ret[i] = a[i] + b[i];
@@ -319,7 +322,7 @@ static void vector_add(double a[2], double b[2], double *ret) {
  * 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[2], double b[2], double*ret) {
+static void vector_sub(const double a[2], const double b[2], double*ret) {
     int i;
     for(i = 0; i < 2; i++) {
         ret[i] = a[i] - b[i];
@@ -332,7 +335,7 @@ static void vector_sub(double a[2], double b[2], double*ret) {
  * b is a 2 x 1 matrix.
  * @param ret holds a*b.
  **/
-static void dot_product(double a[2][2], double b[2], double *ret) {
+static void dot_product(const double a[2][2], const double b[2], double *ret) {
     int i, j;
     int length = 2;
     for(i = 0; i < length; i++) {
@@ -446,12 +449,11 @@ 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 c[2];
     double vector[2];
     double v_min_c[2];
     double ret_dot[2];
-    double (*tmpRot)[2];
+    const double (*tmpRot)[2];
     int pole = 0;
 
     CapMap capmap = get_cap(x, y, north_square, south_square, inverse);
@@ -467,8 +469,7 @@ static XY combine_caps(double x, double y, int north_square, int south_square,
     if (inverse == 0) {
         /* Rotate (x, y) about its polar cap tip and then translate it to
            north_square or south_square. */
-        a[0] =  -3*M_FORTPI + pole*M_HALFPI;
-        a[1] =  M_HALFPI;
+
         if (capmap.region == north) {
             pole = north_square;
             tmpRot = rot[get_rotate_index(capmap.cn - pole)];
@@ -479,8 +480,7 @@ static XY combine_caps(double x, double y, int north_square, int south_square,
     } else {
         /* Inverse function.
          Unrotate (x, y) and then translate it back. */
-        a[0] = -3*M_FORTPI + capmap.cn*M_HALFPI;
-        a[1] = M_HALFPI;
+
         /* disassemble */
         if (capmap.region == north) {
             pole = north_square;
@@ -493,7 +493,14 @@ static XY combine_caps(double x, double y, int north_square, int south_square,
 
     vector_sub(v, c, v_min_c);
     dot_product(tmpRot, v_min_c, ret_dot);
-    vector_add(ret_dot, a, vector);
+    {
+        double a[2];
+        /* Workaround cppcheck git issue */
+        double* pa = a;
+        pa[0] = -3*M_FORTPI + ((inverse == 0) ? 0 : capmap.cn) *M_HALFPI;
+        pa[1] = M_HALFPI;
+        vector_add(ret_dot, a, vector);
+    }
 
     xy.x = vector[0];
     xy.y = vector[1];
@@ -516,7 +523,9 @@ static XY e_healpix_forward(LP lp, PJ *P) { /* ellipsoid  */
 static LP s_healpix_inverse(XY xy, PJ *P) { /* sphere */
     /* Check whether (x, y) lies in the HEALPix image */
     if (in_image(xy.x, xy.y, 0, 0, 0) == 0) {
-        LP lp = {HUGE_VAL, HUGE_VAL};
+        LP lp;
+        lp.lam = HUGE_VAL;
+        lp.phi = HUGE_VAL;
         pj_ctx_set_errno(P->ctx, -15);
         return lp;
     }
@@ -562,7 +571,9 @@ static LP s_rhealpix_inverse(XY xy, PJ *P) { /* sphere */
 
     /* Check whether (x, y) lies in the rHEALPix image. */
     if (in_image(xy.x, xy.y, 1, Q->north_square, Q->south_square) == 0) {
-        LP lp = {HUGE_VAL, HUGE_VAL};
+        LP lp;
+        lp.lam = HUGE_VAL;
+        lp.phi = HUGE_VAL;
         pj_ctx_set_errno(P->ctx, -15);
         return lp;
     }
@@ -589,36 +600,32 @@ static LP e_rhealpix_inverse(XY xy, PJ *P) { /* ellipsoid */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor (PJ *P, int errlev) {                        /* Destructor */
     if (0==P)
         return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
 
-    if (P->opaque->apa)
-        pj_dealloc(P->opaque->apa);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
+    if (0==P->opaque)
+        return pj_default_destructor (P, errlev);
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    pj_dealloc (P->opaque->apa);
+    return pj_default_destructor (P, errlev);
 }
 
 
 PJ *PROJECTION(healpix) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
-    if (P->es) {
+    if (P->es != 0.0) {
         Q->apa = pj_authset(P->es);             /* For auth_lat(). */
+        if (0==Q->apa)
+            return destructor(P, ENOMEM);
         Q->qp = pj_qsfn(1.0, P->e, P->one_es);  /* For auth_lat(). */
         P->a = P->a*sqrt(0.5*Q->qp);            /* Set P->a to authalic radius. */
-        P->ra = 1.0/P->a;
+        pj_calc_ellipsoid_params (P, P->a, P->es);  /* Ensure we have a consistent parameter set */
         P->fwd = e_healpix_forward;
         P->inv = e_healpix_inverse;
     } else {
@@ -633,21 +640,22 @@ PJ *PROJECTION(healpix) {
 PJ *PROJECTION(rhealpix) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
     Q->north_square = pj_param(P->ctx, P->params,"inorth_square").i;
     Q->south_square = pj_param(P->ctx, P->params,"isouth_square").i;
 
     /* Check for valid north_square and south_square inputs. */
-    if (Q->north_square < 0 || Q->north_square > 3) {
-        E_ERROR(-47);
-    }
-    if (Q->south_square < 0 || Q->south_square > 3) {
-        E_ERROR(-47);
-    }
-    if (P->es) {
+    if (Q->north_square < 0 || Q->north_square > 3)
+        return destructor (P, PJD_ERR_AXIS);
+    if (Q->south_square < 0 || Q->south_square > 3)
+        return destructor (P, PJD_ERR_AXIS);
+    if (P->es != 0.0) {
         Q->apa = pj_authset(P->es); /* For auth_lat(). */
+        if (0==Q->apa)
+            return destructor(P, ENOMEM);
         Q->qp = pj_qsfn(1.0, P->e, P->one_es); /* For auth_lat(). */
         P->a = P->a*sqrt(0.5*Q->qp); /* Set P->a to authalic radius. */
         P->ra = 1.0/P->a;
@@ -661,121 +669,3 @@ PJ *PROJECTION(rhealpix) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_healpix_selftest (void) {return 0;}
-#else
-
-int pj_healpix_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=healpix   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=healpix   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222390.10394923863,  130406.58866448226},
-        { 222390.10394923863, -130406.58866448054},
-        {-222390.10394923863,  130406.58866448226},
-        {-222390.10394923863, -130406.58866448054},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223402.14425527418,  131588.04444199943},
-        { 223402.14425527418, -131588.04444199943},
-        {-223402.14425527418,  131588.04444199943},
-        {-223402.14425527418, -131588.04444199943},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017986411845524453,  0.00076679453057823619},
-        { 0.0017986411845524453, -0.00076679453057823619},
-        {-0.0017986411845524453,  0.00076679453057823619},
-        {-0.0017986411845524453, -0.00076679453057823619},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931097838226,  0.00075990887733981202},
-        { 0.0017904931097838226, -0.00075990887733981202},
-        {-0.0017904931097838226,  0.00075990887733981202},
-        {-0.0017904931097838226, -0.00075990887733981202},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-#ifndef PJ_SELFTEST
-int pj_rhealpix_selftest (void) {return 0;}
-#else
-
-int pj_rhealpix_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=rhealpix   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=rhealpix   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222390.10394923863,  130406.58866448226},
-        { 222390.10394923863, -130406.58866448054},
-        {-222390.10394923863,  130406.58866448226},
-        {-222390.10394923863, -130406.58866448054},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223402.14425527418,  131588.04444199943},
-        { 223402.14425527418, -131588.04444199943},
-        {-223402.14425527418,  131588.04444199943},
-        {-223402.14425527418, -131588.04444199943},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017986411845524453,  0.00076679453057823619},
-        { 0.0017986411845524453, -0.00076679453057823619},
-        {-0.0017986411845524453,  0.00076679453057823619},
-        {-0.0017986411845524453, -0.00076679453057823619},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931097838226,  0.00075990887733981202},
-        { 0.0017904931097838226, -0.00075990887733981202},
-        {-0.0017904931097838226,  0.00075990887733981202},
-        {-0.0017904931097838226, -0.00075990887733981202},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_helmert.c b/src/PJ_helmert.c
new file mode 100644
index 0000000..229e30c
--- /dev/null
+++ b/src/PJ_helmert.c
@@ -0,0 +1,612 @@
+/***********************************************************************
+
+             3-, 4-and 7-parameter shifts, and their 6-, 8-
+                and 14-parameter kinematic counterparts.
+
+                    Thomas Knudsen, 2016-05-24
+
+************************************************************************
+
+  Implements 3(6)-, 4(8) and 7(14)-parameter Helmert transformations for
+  3D data.
+
+  Primarily useful for implementation of datum shifts in transformation
+  pipelines.
+
+************************************************************************
+
+Thomas Knudsen, thokn at sdfe.dk, 2016-05-24/06-05
+Kristian Evers, kreve at sdfe.dk, 2017-05-01
+Last update: 2017-05-15
+
+************************************************************************
+* Copyright (c) 2016, Thomas Knudsen / SDFE
+*
+* 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.
+*
+***********************************************************************/
+
+#define PJ_LIB__
+#include <stddef.h>
+#include <errno.h>
+#include "proj_internal.h"
+#include "projects.h"
+#include "geocent.h"
+PROJ_HEAD(helmert, "3(6)-, 4(8)- and 7(14)-parameter Helmert shift");
+
+static XYZ helmert_forward_3d (LPZ lpz, PJ *P);
+static LPZ helmert_reverse_3d (XYZ xyz, PJ *P);
+
+
+
+/***********************************************************************/
+struct pj_opaque_helmert {
+/************************************************************************
+    Projection specific elements for the "helmert" PJ object
+************************************************************************/
+    XYZ xyz;
+    XYZ xyz_0;
+    XYZ dxyz;
+    PJ_OPK opk;
+    PJ_OPK opk_0;
+    PJ_OPK dopk;
+    double scale;
+    double scale_0;
+    double dscale;
+    double theta;
+    double theta_0;
+    double dtheta;
+    double R[3][3];
+    double t_epoch, t_obs;
+    int no_rotation, exact, transpose, fourparam;
+};
+
+
+/* Make the maths of the rotation operations somewhat more readable and textbook like */
+#define R00 (Q->R[0][0])
+#define R01 (Q->R[0][1])
+#define R02 (Q->R[0][2])
+
+#define R10 (Q->R[1][0])
+#define R11 (Q->R[1][1])
+#define R12 (Q->R[1][2])
+
+#define R20 (Q->R[2][0])
+#define R21 (Q->R[2][1])
+#define R22 (Q->R[2][2])
+
+/**************************************************************************/
+static void update_parameters(PJ *P) {
+/***************************************************************************
+
+    Update transformation parameters.
+    ---------------------------------
+
+    The 14-parameter Helmert transformation is at it's core the same as the
+    7-parameter transformation, since the transformation parameters are
+    projected forward or backwards in time via the rate of changes of the
+    parameters. The transformation parameters are calculated for a specific
+    epoch before the actual Helmert transformation is carried out.
+
+    The transformation parameters are updated with the following equation [0]:
+
+                      .
+    P(t) = P(EPOCH) + P * (t - EPOCH)
+
+                                                              .
+    where EPOCH is the epoch indicated in the above table and P is the rate
+    of that parameter.
+
+    [0] http://itrf.ign.fr/doc_ITRF/Transfo-ITRF2008_ITRFs.txt
+
+*******************************************************************************/
+
+    struct pj_opaque_helmert *Q = (struct pj_opaque_helmert *) P->opaque;
+    double dt = Q->t_obs - Q->t_epoch;
+
+    Q->xyz.x = Q->xyz_0.x + Q->dxyz.x * dt;
+    Q->xyz.y = Q->xyz_0.y + Q->dxyz.y * dt;
+    Q->xyz.z = Q->xyz_0.z + Q->dxyz.z * dt;
+
+    Q->opk.o = Q->opk_0.o + Q->dopk.o * dt;
+    Q->opk.p = Q->opk_0.p + Q->dopk.p * dt;
+    Q->opk.k = Q->opk_0.k + Q->dopk.k * dt;
+
+    Q->scale = Q->scale_0 + Q->dscale * dt;
+
+    Q->theta = Q->theta_0 + Q->dtheta * dt;
+
+    /* debugging output */
+    if (proj_log_level(P->ctx, PJ_LOG_TELL) >= PJ_LOG_TRACE) {
+        proj_log_trace(P, "Transformation parameters for observation t_epoch %g:", Q->t_obs);
+        proj_log_trace(P, "x: %g", Q->xyz.x);
+        proj_log_trace(P, "y: %g", Q->xyz.y);
+        proj_log_trace(P, "z: %g", Q->xyz.z);
+        proj_log_trace(P, "s: %g", Q->scale*1e-6);
+        proj_log_trace(P, "rx: %g", Q->opk.o);
+        proj_log_trace(P, "ry: %g", Q->opk.p);
+        proj_log_trace(P, "rz: %g", Q->opk.k);
+        proj_log_trace(P, "theta: %g", Q->theta);
+    }
+    return;
+}
+
+/**************************************************************************/
+static void build_rot_matrix(PJ *P) {
+/***************************************************************************
+
+    Build rotation matrix.
+    ----------------------
+
+    Here we rename rotation indices from omega, phi, kappa (opk), to
+    fi (i.e. phi), theta, psi (ftp), in order to reduce the mental agility
+    needed to implement the expression for the rotation matrix derived over
+    at https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions
+    The relevant section is Euler angles ( z-’-x" intrinsic) -> Rotation matrix
+
+    By default small angle approximations are used:
+    The matrix elements are approximated by expanding the trigonometric
+    functions to linear order (i.e. cos(x) = 1, sin(x) = x), and discarding
+    products of second order.
+
+    This was a useful hack when calculating by hand was the only option,
+    but in general, today, should be avoided because:
+
+    1. It does not save much computation time, as the rotation matrix
+       is built only once and probably used many times (except when
+       transforming spatio-temporal coordinates).
+
+    2. The error induced may be too large for ultra high accuracy
+       applications: the Earth is huge and the linear error is
+       approximately the angular error multiplied by the Earth radius.
+
+    However, in many cases the approximation is necessary, since it has
+    been used historically: Rotation angles from older published datum
+    shifts may actually be a least squares fit to the linearized rotation
+    approximation, hence not being strictly valid for deriving the exact
+    rotation matrix. In fact, most publicly available transformation
+    parameters are based on the approximate Helmert transform, which is why
+    we use that as the default setting, even though it is more correct to
+    use the exact form of the equations.
+
+    So in order to fit historically derived coordinates, the access to
+    the approximate rotation matrix is necessary - at least in principle.
+
+    Also, when using any published datum transformation information, one
+    should always check which convention (exact or approximate rotation
+    matrix) is expected, and whether the induced error for selecting
+    the opposite convention is acceptable (which it often is).
+
+
+    Sign conventions
+    ----------------
+
+    Take care: Two different sign conventions exist.
+
+    Conceptually they relate to whether we rotate the coordinate system
+    or the "position vector" (the vector going from the coordinate system
+    origin to the point being transformed, i.e. the point coordinates
+    interpreted as vector coordinates).
+
+    Switching between the "position vector" and "coordinate system"
+    conventions is simply a matter of switching the sign of the rotation
+    angles, which algebraically also translates into a transposition of
+    the rotation matrix.
+
+    Hence, as geodetic constants should preferably be referred to exactly
+    as published, the "transpose" option provides the ability to switch
+    between the conventions.
+
+***************************************************************************/
+    struct pj_opaque_helmert *Q = (struct pj_opaque_helmert *) P->opaque;
+
+    double  f,  t,  p;    /* phi/fi , theta, psi  */
+    double cf, ct, cp;    /* cos (fi, theta, psi) */
+    double sf, st, sp;    /* sin (fi, theta, psi) */
+
+    /* rename   (omega, phi, kappa)   to   (fi, theta, psi)   */
+    f = Q->opk.o;
+    t = Q->opk.p;
+    p = Q->opk.k;
+
+    if (Q->exact) {
+        cf = cos(f);
+        sf = sin(f);
+        ct = cos(t);
+        st = sin(t);
+        cp = cos(p);
+        sp = sin(p);
+
+
+        R00 = ct*cp;
+        R01 = cf*sp + sf*st*cp;
+        R02 = sf*sp - cf*st*cp;
+
+        R10 = -ct*sp;
+        R11 =  cf*cp - sf*st*sp;
+        R12 =  sf*cp + cf*st*sp;
+
+        R20 =  st;
+        R21 = -sf*ct;
+        R22 =  cf*ct;
+    } else{
+        R00 =  1;
+        R01 =  p;
+        R02 = -t;
+
+        R10 = -p;
+        R11 =  1;
+        R12 =  f;
+
+        R20 =  t;
+        R21 = -f;
+        R22 =  1;
+    }
+
+
+    /*
+        For comparison: Description from Engsager/Poder implementation
+        in set_dtm_1.c (trlib)
+
+        DATUM SHIFT:
+        TO = scale * ROTZ * ROTY * ROTX * FROM + TRANSLA
+
+             ( cz sz 0)         (cy 0 -sy)         (1   0  0)
+        ROTZ=(-sz cz 0),   ROTY=(0  1   0),   ROTX=(0  cx sx)
+             (  0  0 1)         (sy 0  cy)         (0 -sx cx)
+
+        trp->r11  =  cos_ry*cos_rz;
+        trp->r12  =  cos_rx*sin_rz + sin_rx*sin_ry*cos_rz;
+        trp->r13  =  sin_rx*sin_rz - cos_rx*sin_ry*cos_rz;
+
+        trp->r21  = -cos_ry*sin_rz;
+        trp->r22  =  cos_rx*cos_rz - sin_rx*sin_ry*sin_rz;
+        trp->r23  =  sin_rx*cos_rz + cos_rx*sin_ry*sin_rz;
+
+        trp->r31  =  sin_ry;
+        trp->r32  = -sin_rx*cos_ry;
+        trp->r33  =  cos_rx*cos_ry;
+
+        trp->scale = 1.0 + scale;
+    */
+
+
+    if (Q->transpose) {
+        double r;
+        r = R01;    R01 = R10;    R10 = r;
+        r = R02;    R02 = R20;    R20 = r;
+        r = R12;    R12 = R21;    R21 = r;
+    }
+
+    /* some debugging output */
+    if (proj_log_level(P->ctx, PJ_LOG_TELL) >= PJ_LOG_TRACE) {
+        proj_log_trace(P, "Rotation Matrix:");
+        proj_log_trace(P, "  | % 6.6g  % 6.6g  % 6.6g |", R00, R01, R02);
+        proj_log_trace(P, "  | % 6.6g  % 6.6g  % 6.6g |", R10, R11, R12);
+        proj_log_trace(P, "  | % 6.6g  % 6.6g  % 6.6g |", R20, R21, R22);
+    }
+
+    return;
+}
+
+
+
+
+/***********************************************************************/
+static XY helmert_forward (LP lp, PJ *P) {
+/***********************************************************************/
+    struct pj_opaque_helmert *Q = (struct pj_opaque_helmert *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+    double x, y, cr, sr;
+    point.lp = lp;
+
+    cr = cos(Q->theta) * Q->scale;
+    sr = sin(Q->theta) * Q->scale;
+    x = point.xy.x;
+    y = point.xy.y;
+
+    point.xy.x =  cr*x + sr*y + Q->xyz_0.x;
+    point.xy.y = -sr*x + cr*y + Q->xyz_0.y;
+
+    return point.xy;
+}
+
+
+/***********************************************************************/
+static LP helmert_reverse (XY xy, PJ *P) {
+/***********************************************************************/
+    struct pj_opaque_helmert *Q = (struct pj_opaque_helmert *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+    double x, y, sr, cr;
+    point.xy = xy;
+
+    cr = cos(Q->theta) / Q->scale;
+    sr = sin(Q->theta) / Q->scale;
+    x = point.xy.x - Q->xyz_0.x;
+    y = point.xy.y - Q->xyz_0.y;
+
+    point.xy.x =  x*cr - y*sr;
+    point.xy.y =  x*sr + y*cr;
+
+    return point.lp;
+}
+
+
+/***********************************************************************/
+static XYZ helmert_forward_3d (LPZ lpz, PJ *P) {
+/***********************************************************************/
+    struct pj_opaque_helmert *Q = (struct pj_opaque_helmert *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+    double X, Y, Z, scale;
+
+    point.lpz = lpz;
+
+    if (Q->fourparam) {
+        point.xy = helmert_forward(point.lp, P);
+        return point.xyz;
+    }
+
+    if (Q->no_rotation) {
+        point.xyz.x = lpz.lam + Q->xyz.x;
+        point.xyz.y = lpz.phi + Q->xyz.y;
+        point.xyz.z = lpz.z   + Q->xyz.z;
+        return point.xyz;
+    }
+
+    scale = 1 + Q->scale * 1e-6;
+
+    X = lpz.lam;
+    Y = lpz.phi;
+    Z = lpz.z;
+
+
+    point.xyz.x = scale * ( R00 * X  +   R01 * Y   +   R02 * Z);
+    point.xyz.y = scale * ( R10 * X  +   R11 * Y   +   R12 * Z);
+    point.xyz.z = scale * ( R20 * X  +   R21 * Y   +   R22 * Z);
+
+    point.xyz.x += Q->xyz.x;
+    point.xyz.y += Q->xyz.y;
+    point.xyz.z += Q->xyz.z;
+
+    return point.xyz;
+}
+
+
+/***********************************************************************/
+static LPZ helmert_reverse_3d (XYZ xyz, PJ *P) {
+/***********************************************************************/
+    struct pj_opaque_helmert *Q = (struct pj_opaque_helmert *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+    double X, Y, Z, scale;
+
+    point.xyz = xyz;
+
+    if (Q->fourparam) {
+        point.lp = helmert_reverse(point.xy, P);
+        return point.lpz;
+    }
+
+    if (Q->no_rotation) {
+        point.xyz.x  =  xyz.x - Q->xyz.x;
+        point.xyz.y  =  xyz.y - Q->xyz.y;
+        point.xyz.z  =  xyz.z - Q->xyz.z;
+        return point.lpz;
+    }
+
+    scale = 1 + Q->scale * 1e-6;
+
+    /* Unscale and deoffset */
+    X = (xyz.x - Q->xyz.x) / scale;
+    Y = (xyz.y - Q->xyz.y) / scale;
+    Z = (xyz.z - Q->xyz.z) / scale;
+
+    /* Inverse rotation through transpose multiplication */
+    point.xyz.x  =  ( R00 * X   +   R10 * Y   +   R20 * Z);
+    point.xyz.y  =  ( R01 * X   +   R11 * Y   +   R21 * Z);
+    point.xyz.z  =  ( R02 * X   +   R12 * Y   +   R22 * Z);
+
+    return point.lpz;
+}
+
+
+static PJ_COORD helmert_forward_4d (PJ_COORD point, PJ *P) {
+    struct pj_opaque_helmert *Q = (struct pj_opaque_helmert *) P->opaque;
+
+    /* We only need to rebuild the rotation matrix if the
+     * observation time is different from the last call */
+    if (point.xyzt.t != Q->t_obs) {
+        Q->t_obs = point.xyzt.t;
+        update_parameters(P);
+        build_rot_matrix(P);
+    }
+
+    point.xyz = helmert_forward_3d (point.lpz, P);
+
+    return point;
+}
+
+
+static PJ_COORD helmert_reverse_4d (PJ_COORD point, PJ *P) {
+    struct pj_opaque_helmert *Q = (struct pj_opaque_helmert *) P->opaque;
+
+    /* We only need to rebuild the rotation matrix if the
+     * observation time is different from the last call */
+    if (point.xyzt.t != Q->t_obs) {
+        Q->t_obs = point.xyzt.t;
+        update_parameters(P);
+        build_rot_matrix(P);
+    }
+
+    point.lpz = helmert_reverse_3d (point.xyz, P);
+
+    return point;
+}
+
+
+/* Arcsecond to radians */
+#define ARCSEC_TO_RAD (DEG_TO_RAD / 3600.0)
+
+/***********************************************************************/
+PJ *TRANSFORMATION(helmert, 0) {
+/***********************************************************************/
+    struct pj_opaque_helmert *Q = pj_calloc (1, sizeof (struct pj_opaque_helmert));
+    if (0==Q)
+        return pj_default_destructor (P, ENOMEM);
+    P->opaque = (void *) Q;
+
+    P->fwd4d  = helmert_forward_4d;
+    P->inv4d  = helmert_reverse_4d;
+    P->fwd3d  = helmert_forward_3d;
+    P->inv3d  = helmert_reverse_3d;
+    P->fwd    = helmert_forward;
+    P->inv    = helmert_reverse;
+
+    /* In most cases, we work on 3D cartesian coordinates */
+    P->left  = PJ_IO_UNITS_CARTESIAN;
+    P->right = PJ_IO_UNITS_CARTESIAN;
+    /* But in the 2D case, the coordinates are projected */
+    if (pj_param_exists (P->params, "theta")) {
+        P->left  = PJ_IO_UNITS_PROJECTED;
+        P->right = PJ_IO_UNITS_PROJECTED;
+    }
+
+    /* Support the classic PROJ towgs84 parameter, but allow later overrides.*/
+    /* Note that if towgs84 is specified, the datum_params array is set up   */
+    /* for us automagically by the pj_datum_set call in pj_init_ctx */
+    if (pj_param_exists (P->params, "towgs84")) {
+        Q->xyz_0.x = P->datum_params[0];
+        Q->xyz_0.y = P->datum_params[1];
+        Q->xyz_0.z = P->datum_params[2];
+
+        Q->opk_0.o = P->datum_params[3];
+        Q->opk_0.p = P->datum_params[4];
+        Q->opk_0.k = P->datum_params[5];
+
+        /* We must undo conversion to absolute scale from pj_datum_set */
+        if (0==P->datum_params[6])
+            Q->scale_0 = 0;
+        else
+            Q->scale_0 = (P->datum_params[6] - 1) * 1e6;
+    }
+
+    /* Translations */
+    if (pj_param (P->ctx, P->params, "tx").i)
+        Q->xyz_0.x = pj_param (P->ctx, P->params, "dx").f;
+
+    if (pj_param (P->ctx, P->params, "ty").i)
+        Q->xyz_0.y = pj_param (P->ctx, P->params, "dy").f;
+
+    if (pj_param (P->ctx, P->params, "tz").i)
+        Q->xyz_0.z = pj_param (P->ctx, P->params, "dz").f;
+
+    /* Rotations */
+    if (pj_param (P->ctx, P->params, "trx").i)
+        Q->opk_0.o = pj_param (P->ctx, P->params, "drx").f * ARCSEC_TO_RAD;
+
+    if (pj_param (P->ctx, P->params, "try").i)
+        Q->opk_0.p = pj_param (P->ctx, P->params, "dry").f * ARCSEC_TO_RAD;
+
+    if (pj_param (P->ctx, P->params, "trz").i)
+        Q->opk_0.k = pj_param (P->ctx, P->params, "drz").f * ARCSEC_TO_RAD;
+
+    if (pj_param (P->ctx, P->params, "ttheta").i) {
+        Q->theta_0 = pj_param (P->ctx, P->params, "dtheta").f * ARCSEC_TO_RAD;
+        Q->fourparam = 1;
+        Q->scale_0 = 1.0; /* default scale for the 4-param shift */
+    }
+
+    /* Scale */
+    if (pj_param (P->ctx, P->params, "ts").i) {
+        Q->scale_0 = pj_param (P->ctx, P->params, "ds").f;
+        if (pj_param (P->ctx, P->params, "ttheta").i && Q->scale_0 == 0.0)
+            return pj_default_destructor (P, PJD_ERR_INVALID_SCALE);
+    }
+
+    /* Translation rates */
+    if (pj_param(P->ctx, P->params, "tdx").i)
+        Q->dxyz.x = pj_param (P->ctx, P->params, "ddx").f;
+
+    if (pj_param(P->ctx, P->params, "tdy").i)
+        Q->dxyz.y = pj_param (P->ctx, P->params, "ddy").f;
+
+    if (pj_param(P->ctx, P->params, "tdz").i)
+        Q->dxyz.z = pj_param (P->ctx, P->params, "ddz").f;
+
+    /* Rotations rates */
+    if (pj_param (P->ctx, P->params, "tdrx").i)
+        Q->dopk.o = pj_param (P->ctx, P->params, "ddrx").f * ARCSEC_TO_RAD;
+
+    if (pj_param (P->ctx, P->params, "tdry").i)
+        Q->dopk.p = pj_param (P->ctx, P->params, "ddry").f * ARCSEC_TO_RAD;
+
+    if (pj_param (P->ctx, P->params, "tdrz").i)
+        Q->dopk.k = pj_param (P->ctx, P->params, "ddrz").f * ARCSEC_TO_RAD;
+
+    if (pj_param (P->ctx, P->params, "tdtheta").i)
+        Q->dtheta = pj_param (P->ctx, P->params, "ddtheta").f * ARCSEC_TO_RAD;
+
+    /* Scale rate */
+    if (pj_param (P->ctx, P->params, "tds").i)
+        Q->dscale = pj_param (P->ctx, P->params, "dds").f;
+
+
+    /* Epoch */
+    if (pj_param(P->ctx, P->params, "tt_epoch").i)
+        Q->t_epoch = pj_param (P->ctx, P->params, "dt_epoch").f;
+
+    if (pj_param(P->ctx, P->params, "tt_obs").i)
+        Q->t_obs = pj_param (P->ctx, P->params, "dt_obs").f;
+
+    /* Use small angle approximations? */
+    if (pj_param (P->ctx, P->params, "bexact").i)
+        Q->exact = 1;
+
+    /* Use "other" rotation sign convention? */
+    if (pj_param (P->ctx, P->params, "ttranspose").i)
+        Q->transpose = 1;
+
+    Q->xyz    =  Q->xyz_0;
+    Q->opk    =  Q->opk_0;
+    Q->scale  =  Q->scale_0;
+    Q->theta  =  Q->theta_0;
+
+    /* Let's help with debugging */
+    if (proj_log_level(P->ctx, PJ_LOG_TELL) >= PJ_LOG_DEBUG) {
+        proj_log_debug(P, "Helmert parameters:");
+        proj_log_debug(P, "x=  %8.5f  y=  %8.5f  z=  %8.5f", Q->xyz.x, Q->xyz.y, Q->xyz.z);
+        proj_log_debug(P, "rx= %8.5f  ry= %8.5f  rz= %8.5f",
+                Q->opk.o / ARCSEC_TO_RAD, Q->opk.p / ARCSEC_TO_RAD, Q->opk.k / ARCSEC_TO_RAD);
+        proj_log_debug(P, "s=  %8.5f  exact=%d  transpose=%d", Q->scale, Q->exact, Q->transpose);
+        proj_log_debug(P, "dx= %8.5f  dy= %8.5f  dz= %8.5f",   Q->dxyz.x, Q->dxyz.y, Q->dxyz.z);
+        proj_log_debug(P, "drx=%8.5f  dry=%8.5f  drz=%8.5f",   Q->dopk.o, Q->dopk.p, Q->dopk.k);
+        proj_log_debug(P, "ds= %8.5f  t_epoch=%8.5f  t_obs=%8.5f", Q->dscale, Q->t_epoch, Q->t_obs);
+    }
+
+    if ((Q->opk.o==0)  && (Q->opk.p==0)  && (Q->opk.k==0) && (Q->scale==0) &&
+        (Q->dopk.o==0) && (Q->dopk.p==0) && (Q->dopk.k==0)) {
+        Q->no_rotation = 1;
+        return P;
+    }
+
+    update_parameters(P);
+    build_rot_matrix(P);
+
+    return P;
+}
+
diff --git a/src/PJ_hgridshift.c b/src/PJ_hgridshift.c
new file mode 100644
index 0000000..5444082
--- /dev/null
+++ b/src/PJ_hgridshift.c
@@ -0,0 +1,75 @@
+#define PJ_LIB__
+#include "proj_internal.h"
+#include "projects.h"
+
+PROJ_HEAD(hgridshift, "Horizontal grid shift");
+
+static XYZ forward_3d(LPZ lpz, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+    point.lpz = lpz;
+
+    if (P->gridlist != NULL) {
+        /* Only try the gridshift if at least one grid is loaded,
+         * otherwise just pass the coordinate through unchanged. */
+        point.lp = proj_hgrid_apply(P, point.lp, PJ_FWD);
+    }
+
+    return point.xyz;
+}
+
+
+static LPZ reverse_3d(XYZ xyz, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+    point.xyz = xyz;
+
+    if (P->gridlist != NULL) {
+        /* Only try the gridshift if at least one grid is loaded,
+         * otherwise just pass the coordinate through unchanged. */
+        point.lp = proj_hgrid_apply(P, point.lp, PJ_INV);
+    }
+
+    return point.lpz;
+}
+
+
+static PJ_COORD forward_4d (PJ_COORD obs, PJ *P) {
+    obs.xyz = forward_3d (obs.lpz, P);
+    return obs;
+}
+
+
+static PJ_COORD reverse_4d (PJ_COORD obs, PJ *P) {
+    obs.lpz = reverse_3d (obs.xyz, P);
+    return obs;
+}
+
+
+
+PJ *TRANSFORMATION(hgridshift,0) {
+
+    P->fwd4d  = forward_4d;
+    P->inv4d  = reverse_4d;
+    P->fwd3d  = forward_3d;
+    P->inv3d  = reverse_3d;
+    P->fwd    = 0;
+    P->inv    = 0;
+
+    P->left  = PJ_IO_UNITS_ANGULAR;
+    P->right = PJ_IO_UNITS_ANGULAR;
+
+    if (0==pj_param(P->ctx, P->params, "tgrids").i) {
+        proj_log_error(P, "hgridshift: +grids parameter missing.");
+        return pj_default_destructor (P, PJD_ERR_NO_ARGS);
+    }
+
+
+    proj_hgrid_init(P, "grids");
+    /* Was gridlist compiled properly? */
+    if ( proj_errno(P) ) {
+        proj_log_error(P, "hgridshift: could not find required grid(s).");
+        return pj_default_destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID);
+    }
+
+    return P;
+}
+
diff --git a/src/PJ_horner.c b/src/PJ_horner.c
new file mode 100644
index 0000000..d1146aa
--- /dev/null
+++ b/src/PJ_horner.c
@@ -0,0 +1,487 @@
+/***********************************************************************
+
+    Interfacing to a classic piece of geodetic software
+
+************************************************************************
+
+    gen_pol is a highly efficient, classic implementation of a generic
+    2D Horner's Scheme polynomial evaluation routine by Knud Poder and
+    Karsten Engsager, originating in the vivid geodetic environment at
+    what was then (1960-ish) the Danish Geodetic Institute.
+
+    The original Poder/Engsager gen_pol implementation (where
+    the polynomial degree and two sets of polynomial coefficients
+    are packed together in one compound array, handled via a plain
+    double pointer) is compelling and "true to the code history":
+
+    It has a beautiful classical 1960s ring to it, not unlike the
+    original fft implementations, which revolutionized spectral
+    analysis in twenty lines of code.
+
+    The Poder coding sound, as classic 1960s as Phil Spector's Wall
+    of Sound, is beautiful and inimitable.
+
+	On the other hand: For the uninitiated, the gen_pol code is hard
+    to follow, despite being compact.
+
+    Also, since adding metadata and improving maintainability
+    of the code are among the implied goals of a current SDFE/DTU Space
+	project, the material in this file introduces a version with a
+	more modern (or at least 1990s) look, introducing a "double 2D
+	polynomial" data type, HORNER.
+
+    Despite introducing a new data type for handling the polynomial
+    coefficients, great care has been taken to keep the coefficient
+    array organization identical to that of gen_pol.
+
+    Hence, on one hand, the HORNER data type helps improving the
+    long term maintainability of the code by making the data
+    organization more mentally accessible.
+
+    On the other hand, it allows us to preserve the business end of
+    the original gen_pol implementation - although not including the
+	famous "Poder dual autocheck" in all its enigmatic elegance.
+
+ **********************************************************************
+
+	The material included here was written by Knud Poder, starting
+	around 1960, and Karsten Engsager, starting around 1970. It was
+    originally written in Algol 60, later (1980s) reimplemented in C.
+
+    The HORNER data type interface, and the organization as a header
+    library was implemented by Thomas Knudsen, starting around 2015.
+
+ ***********************************************************************
+ *
+ * Copyright (c) 2016, SDFE http://www.sdfe.dk / Thomas Knudsen / Karsten Engsager
+ *
+ * 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.
+ *
+ *****************************************************************************/
+
+#define PJ_LIB__
+#include "proj_internal.h"
+#include "projects.h"
+#include <stddef.h>
+#include <math.h>
+#include <errno.h>
+
+PROJ_HEAD(horner,    "Horner polynomial evaluation");
+
+/* make horner.h interface with proj's memory management */
+#define horner_dealloc(x) pj_dealloc(x)
+#define horner_calloc(n,x) pj_calloc(n,x)
+
+
+struct horner;
+typedef struct horner HORNER;
+static UV      horner (const HORNER *transformation, PJ_DIRECTION direction, UV position);
+static HORNER *horner_alloc (size_t order, int complex_polynomia);
+static void    horner_free (HORNER *h);
+
+struct horner {
+    int    order;    /* maximum degree of polynomium */
+    int    coefs;    /* number of coefficients for each polynomium  */
+    double range;    /* radius of the region of validity */
+
+    double *fwd_u;   /* coefficients for the forward transformations */
+    double *fwd_v;   /* i.e. latitude/longitude to northing/easting  */
+
+    double *inv_u;   /* coefficients for the inverse transformations */
+    double *inv_v;   /* i.e. northing/easting to latitude/longitude  */
+
+    double *fwd_c;   /* coefficients for the complex forward transformations */
+    double *inv_c;   /* coefficients for the complex inverse transformations */
+
+    UV *fwd_origin;  /* False longitude/latitude */
+    UV *inv_origin;  /* False easting/northing   */
+};
+
+/* e.g. degree = 2: a + bx + cy + dxx + eyy + fxy, i.e. 6 coefficients */
+#define horner_number_of_coefficients(order) \
+            (((order + 1)*(order + 2)/2))
+
+
+static void horner_free (HORNER *h) {
+    horner_dealloc (h->inv_v);
+    horner_dealloc (h->inv_u);
+    horner_dealloc (h->fwd_v);
+    horner_dealloc (h->fwd_u);
+    horner_dealloc (h->fwd_c);
+    horner_dealloc (h->inv_c);
+    horner_dealloc (h->fwd_origin);
+    horner_dealloc (h->inv_origin);
+    horner_dealloc (h);
+}
+
+
+static HORNER *horner_alloc (size_t order, int complex_polynomia) {
+    /* size_t is unsigned, so we need not check for order > 0 */
+    int n = (int)horner_number_of_coefficients(order);
+    int polynomia_ok = 0;
+    HORNER *h = horner_calloc (1, sizeof (HORNER));
+
+    if (0==h)
+        return 0;
+
+    if (complex_polynomia)
+        n = 2*(int)order + 2;
+    h->order = (int)order;
+    h->coefs = n;
+
+    if (complex_polynomia) {
+        h->fwd_c = horner_calloc (n, sizeof(double));
+        h->inv_c = horner_calloc (n, sizeof(double));
+        if (h->fwd_c && h->inv_c)
+            polynomia_ok = 1;
+    }
+    else {
+        h->fwd_u = horner_calloc (n, sizeof(double));
+        h->fwd_v = horner_calloc (n, sizeof(double));
+        h->inv_u = horner_calloc (n, sizeof(double));
+        h->inv_v = horner_calloc (n, sizeof(double));
+        if (h->fwd_u && h->fwd_v && h->inv_u && h->inv_v)
+            polynomia_ok = 1;
+    }
+
+    h->fwd_origin = horner_calloc (1, sizeof(UV));
+    h->inv_origin = horner_calloc (1, sizeof(UV));
+
+    if (polynomia_ok && h->fwd_origin && h->inv_origin)
+        return h;
+
+    /* safe, since all pointers are null-initialized (by calloc) */
+    horner_free (h);
+    return 0;
+}
+
+
+
+
+/**********************************************************************/
+static UV horner (const HORNER *transformation, PJ_DIRECTION direction, UV position) {
+/***********************************************************************
+
+A reimplementation of the classic Engsager/Poder 2D Horner polynomial
+evaluation engine "gen_pol".
+
+This version omits the inimitable Poder "dual autocheck"-machinery,
+which here is intended to be implemented at a higher level of the
+library: We separate the polynomial evaluation from the quality
+control (which, given the limited MTBF for "computing machinery",
+typical when Knud Poder invented the dual autocheck method,
+was not defensible at that time).
+
+Another difference from the original version is that we return the
+result on the stack, rather than accepting pointers to result variables
+as input. This results in code that is easy to read:
+
+            projected  = horner (s34j,  1, geographic);
+            geographic = horner (s34j, -1, projected );
+
+and experiments have shown that on contemporary architectures, the time
+taken for returning even comparatively large objects on the stack (and
+the UV is not that large - typically only 16 bytes) is negligibly
+different from passing two pointers (i.e. typically also 16 bytes) the
+other way.
+
+The polynomium has the form:
+
+P = sum (i = [0 : order])
+        sum (j = [0 : order - i])
+            pow(par_1, i) * pow(par_2, j) * coef(index(order, i, j))
+
+For numerical stability, the summation is carried out backwards,
+summing the tiny high order elements first.
+
+***********************************************************************/
+
+    /* These variable names follow the Engsager/Poder  implementation */
+    int     sz;              /* Number of coefficients per polynomial */
+    double *tcx, *tcy;                        /* Coefficient pointers */
+    double  range; /* Equivalent to the gen_pol's FLOATLIMIT constant */
+    double  n, e;
+    UV uv_error;
+    uv_error.u = uv_error.v = HUGE_VAL;
+
+    if (0==transformation)
+        return uv_error;
+
+    /* Check for valid value of direction (-1, 0, 1) */
+    switch (direction) {
+        case PJ_IDENT:    /*  no-op  */
+            return position;
+        case PJ_FWD:   /* forward */
+        case PJ_INV:   /* inverse */
+            break;
+        default:   /* invalid */
+            errno = EINVAL;
+            return uv_error;
+    }
+
+    /* Prepare for double Horner */
+    sz    =  horner_number_of_coefficients(transformation->order);
+    range =  transformation->range;
+
+
+    if (direction==PJ_FWD) {                              /* forward */
+        tcx = transformation->fwd_u + sz;
+        tcy = transformation->fwd_v + sz;
+        e   = position.u - transformation->fwd_origin->u;
+        n   = position.v - transformation->fwd_origin->v;
+    } else {                                              /* inverse */
+        tcx = transformation->inv_u + sz;
+        tcy = transformation->inv_v + sz;
+        e   = position.u - transformation->inv_origin->u;
+        n   = position.v - transformation->inv_origin->v;
+    }
+
+    if ((fabs(n) > range) || (fabs(e) > range)) {
+        errno = EDOM;
+        return uv_error;
+    }
+
+    /* The melody of this block is straight out of the great Engsager/Poder songbook */
+    else {
+        int g =  transformation->order;
+        int r = g, c;
+        double u, v, N, E;
+
+        /* Double Horner's scheme: N = n*Cy*e -> yout, E = e*Cx*n -> xout */
+        for (N = *--tcy,  E = *--tcx;    r > 0;    r--) {
+            for (c = g,  u = *--tcy,  v = *--tcx;    c >= r;    c--) {
+                u = n*u + *--tcy;
+                v = e*v + *--tcx;
+            }
+            N = e*N + u;
+            E = n*E + v;
+        }
+
+        position.u = E;
+        position.v = N;
+    }
+
+    return position;
+}
+
+
+
+
+
+
+
+static PJ_COORD horner_forward_4d (PJ_COORD point, PJ *P) {
+    point.uv = horner ((HORNER *) P->opaque, 1, point.uv);
+    return point;
+}
+
+static PJ_COORD horner_reverse_4d (PJ_COORD point, PJ *P) {
+    point.uv = horner ((HORNER *) P->opaque, -1, point.uv);
+    return point;
+}
+
+
+
+
+/**********************************************************************/
+static UV complex_horner (const HORNER *transformation, PJ_DIRECTION direction, UV position) {
+/***********************************************************************
+
+A reimplementation of a classic Engsager/Poder Horner complex
+polynomial evaluation engine.
+
+***********************************************************************/
+
+    /* These variable names follow the Engsager/Poder  implementation */
+    int     sz;                             /* Number of coefficients */
+    double *c, *cb;                           /* Coefficient pointers */
+    double  range; /* Equivalent to the gen_pol's FLOATLIMIT constant */
+    double  n, e, w, N, E;
+    UV uv_error;
+    uv_error.u = uv_error.v = HUGE_VAL;
+
+    if (0==transformation)
+        return uv_error;
+
+    /* Check for valid value of direction (-1, 0, 1) */
+    switch (direction) {
+        case PJ_IDENT:    /*  no-op  */
+            return position;
+        case PJ_FWD:   /* forward */
+        case PJ_INV:   /* inverse */
+            break;
+        default:   /* invalid */
+            errno = EINVAL;
+            return uv_error;
+    }
+
+    /* Prepare for double Horner */
+    sz    =  2*transformation->order + 2;
+    range =  transformation->range;
+
+    if (direction==PJ_FWD) {                              /* forward */
+        cb =  transformation->fwd_c;
+        c  =  cb + sz;
+        e  =  position.u - transformation->fwd_origin->u;
+        n  =  position.v - transformation->fwd_origin->v;
+    } else {                                              /* inverse */
+        cb =  transformation->inv_c;
+        c  =  cb + sz;
+        e  =  position.u - transformation->inv_origin->u;
+        n  =  position.v - transformation->inv_origin->v;
+    }
+
+    if ((fabs(n) > range) || (fabs(e) > range)) {
+        errno = EDOM;
+        return uv_error;
+    }
+
+    /* Everything's set up properly - now do the actual polynomium evaluation */
+    E = *--c;
+    N = *--c;
+    while (c > cb) {
+        w = n*E + e*N + *--c;
+        N = n*N - e*E + *--c;
+        E = w;
+    }
+
+    position.u = E;
+    position.v = N;
+    return position;
+}
+
+
+
+static PJ_COORD complex_horner_forward_4d (PJ_COORD point, PJ *P) {
+    point.uv = complex_horner ((HORNER *) P->opaque, PJ_FWD, point.uv);
+    return point;
+}
+
+static PJ_COORD complex_horner_reverse_4d (PJ_COORD point, PJ *P) {
+    point.uv = complex_horner ((HORNER *) P->opaque, PJ_INV, point.uv);
+    return point;
+}
+
+
+static void *horner_freeup (PJ *P, int errlev) {                        /* Destructor */
+    if (0==P)
+        return 0;
+    if (0==P->opaque)
+        return pj_default_destructor (P, errlev);
+    horner_free ((HORNER *) P->opaque);
+    P->opaque = 0;
+    return pj_default_destructor (P, errlev);
+}
+
+
+static int parse_coefs (PJ *P, double *coefs, char *param, int ncoefs) {
+    char *buf, *init, *next = 0;
+    int i;
+
+    buf = pj_calloc (strlen (param) + 2, sizeof(char));
+    if (0==buf) {
+        proj_log_error (P, "Horner: No memory left");
+        return 0;
+    }
+
+    sprintf (buf, "t%s", param);
+    if (0==pj_param (P->ctx, P->params, buf).i) {
+        pj_dealloc (buf);
+        return 0;
+    }
+    sprintf (buf, "s%s", param);
+    init = pj_param(P->ctx, P->params, buf).s;
+    pj_dealloc (buf);
+
+    for (i = 0; i < ncoefs; i++) {
+        if (i > 0) {
+            if ( next == 0 || ','!=*next) {
+                proj_log_error (P, "Horner: Malformed polynomium set %s. need %d coefs", param, ncoefs);
+                return 0;
+            }
+            init = ++next;
+        }
+        coefs[i] = pj_strtod (init, &next);
+    }
+    return 1;
+}
+
+
+/*********************************************************************/
+PJ *PROJECTION(horner) {
+/*********************************************************************/
+    int   degree = 0, n, complex_horner = 0;
+    HORNER *Q;
+    P->fwd4d  = horner_forward_4d;
+    P->inv4d  = horner_reverse_4d;
+    P->fwd3d  =  0;
+    P->inv3d  =  0;
+    P->fwd    =  0;
+    P->inv    =  0;
+    P->left   =  P->right  =  PJ_IO_UNITS_PROJECTED;
+    P->destructor = horner_freeup;
+
+    /* Polynomial degree specified? */
+    if (pj_param (P->ctx, P->params, "tdeg").i) /* degree specified? */
+		degree = pj_param(P->ctx, P->params, "ideg").i;
+    else {
+        proj_log_debug (P, "Horner: Must specify polynomial degree, (+deg=n)");
+        return horner_freeup (P, PJD_ERR_MISSING_ARGS);
+    }
+
+    if (pj_param (P->ctx, P->params, "tfwd_c").i || pj_param (P->ctx, P->params, "tinv_c").i) /* complex polynomium? */
+		complex_horner = 1;
+
+    Q = horner_alloc (degree, complex_horner);
+    if (Q == 0)
+        return horner_freeup (P, ENOMEM);
+    P->opaque = (void *) Q;
+
+    if (complex_horner) {
+        n = 2*degree + 2;
+        if (0==parse_coefs (P, Q->fwd_c, "fwd_c", n))
+            return horner_freeup (P, PJD_ERR_MISSING_ARGS);
+        if (0==parse_coefs (P, Q->inv_c, "inv_c", n))
+            return horner_freeup (P, PJD_ERR_MISSING_ARGS);
+        P->fwd4d = complex_horner_forward_4d;
+        P->inv4d = complex_horner_reverse_4d;
+
+    }
+    else {
+        n = horner_number_of_coefficients (degree);
+        if (0==parse_coefs (P, Q->fwd_u, "fwd_u", n))
+            return horner_freeup (P, PJD_ERR_MISSING_ARGS);
+        if (0==parse_coefs (P, Q->fwd_v, "fwd_v", n))
+            return horner_freeup (P, PJD_ERR_MISSING_ARGS);
+        if (0==parse_coefs (P, Q->inv_u, "inv_u", n))
+            return horner_freeup (P, PJD_ERR_MISSING_ARGS);
+        if (0==parse_coefs (P, Q->inv_v, "inv_v", n))
+            return horner_freeup (P, PJD_ERR_MISSING_ARGS);
+    }
+
+    if (0==parse_coefs (P, (double *)(Q->fwd_origin), "fwd_origin", 2))
+        return horner_freeup (P, PJD_ERR_MISSING_ARGS);
+    if (0==parse_coefs (P, (double *)(Q->inv_origin), "inv_origin", 2))
+        return horner_freeup (P, PJD_ERR_MISSING_ARGS);
+    if (0==parse_coefs (P, &Q->range, "range", 1))
+        Q->range = 500000;
+
+    return P;
+}
+
diff --git a/src/PJ_igh.c b/src/PJ_igh.c
index 87efd6e..d1d684e 100644
--- a/src/PJ_igh.c
+++ b/src/PJ_igh.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(igh, "Interrupted Goode Homolosine") "\n\tPCyl, Sph.";
 
@@ -130,26 +131,20 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor (PJ *P, int errlev) {
     int i;
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
     for (i = 0; i < 12; ++i) {
         if (P->opaque->pj[i])
-            pj_dealloc(P->opaque->pj[i]);
+            P->opaque->pj[i]->destructor(P->opaque->pj[i], errlev);
     }
 
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    return pj_default_destructor(P, errlev);
 }
 
 
@@ -175,8 +170,9 @@ static void freeup (PJ *P) {
 */
 
 #define SETUP(n, proj, x_0, y_0, lon_0) \
-    if (!(Q->pj[n-1] = pj_##proj(0))) E_ERROR_0; \
-    if (!(Q->pj[n-1] = pj_##proj(Q->pj[n-1]))) E_ERROR_0; \
+    if (!(Q->pj[n-1] = pj_##proj(0))) return destructor(P, ENOMEM); \
+    if (!(Q->pj[n-1] = pj_##proj(Q->pj[n-1]))) return destructor(P, ENOMEM); \
+    Q->pj[n-1]->ctx = P->ctx; \
     Q->pj[n-1]->x0 = x_0; \
     Q->pj[n-1]->y0 = y_0; \
     Q->pj[n-1]->lam0 = lon_0;
@@ -187,7 +183,7 @@ PJ *PROJECTION(igh) {
     LP lp = { 0, d4044118 };
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
 
@@ -219,52 +215,10 @@ PJ *PROJECTION(igh) {
 
     P->inv = s_inverse;
     P->fwd = s_forward;
+    P->destructor = destructor;
     P->es = 0.;
 
     return P;
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_igh_selftest (void) {return 0;}
-#else
-
-int pj_igh_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=igh   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223878.49745627123,  111701.07212763709},
-        { 223708.37131305804, -111701.07212763709},
-        {-222857.74059699223,  111701.07212763709},
-        {-223027.86674020503, -111701.07212763709},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.001790489447892545,   0.00089524655489191132},
-        { 0.0017904906685957927, -0.00089524655489191132},
-        {-0.001790496772112032,   0.00089524655489191132},
-        {-0.0017904955514087843, -0.00089524655489191132},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_imw_p.c b/src/PJ_imw_p.c
index b3ca185..9ebb8b4 100644
--- a/src/PJ_imw_p.c
+++ b/src/PJ_imw_p.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(imw_p, "International Map of the World Polyconic")
     "\n\tMod. Polyconic, Ell\n\tlat_1= and lat_2= [lon_1=]";
@@ -7,11 +9,17 @@ PROJ_HEAD(imw_p, "International Map of the World Polyconic")
 #define TOL 1e-10
 #define EPS 1e-10
 
+enum Mode {
+    NONE_IS_ZERO  =  0, /* phi_1 and phi_2 != 0 */
+    PHI_1_IS_ZERO =  1, /* phi_1 = 0 */
+    PHI_2_IS_ZERO = -1  /* phi_2 = 0 */
+};
+
 struct pj_opaque {
-    double  P, Pp, Q, Qp, R_1, R_2, sphi_1, sphi_2, C2; \
-    double  phi_1, phi_2, lam_1; \
-    double  *en; \
-    int mode; /* = 0, phi_1 and phi_2 != 0, = 1, phi_1 = 0, = -1 phi_2 = 0 */
+    double  P, Pp, Q, Qp, R_1, R_2, sphi_1, sphi_2, C2;
+    double  phi_1, phi_2, lam_1;
+    double  *en;
+    enum Mode mode;
 };
 
 
@@ -27,7 +35,7 @@ static int phi12(PJ *P, double *del, double *sig) {
         Q->phi_2 = pj_param(P->ctx, P->params, "rlat_2").f;
         *del = 0.5 * (Q->phi_2 - Q->phi_1);
         *sig = 0.5 * (Q->phi_2 + Q->phi_1);
-        err = (fabs(*del) < EPS || fabs(*sig) < EPS) ? -42 : 0;
+        err = (fabs(*del) < EPS || fabs(*sig) < EPS) ? PJD_ERR_ABS_LAT1_EQ_ABS_LAT2 : 0;
     }
     return err;
 }
@@ -37,7 +45,7 @@ static XY loc_for(LP lp, PJ *P, double *yc) {
     struct pj_opaque *Q = P->opaque;
     XY xy;
 
-    if (! lp.phi) {
+    if (lp.phi == 0.0) {
         xy.x = lp.lam;
         xy.y = 0.;
     } else {
@@ -51,7 +59,7 @@ static XY loc_for(LP lp, PJ *P, double *yc) {
         C = sqrt(R * R - xa * xa);
         if (lp.phi < 0.) C = - C;
         C += ya - R;
-        if (Q->mode < 0) {
+        if (Q->mode == PHI_2_IS_ZERO) {
             xb = lp.lam;
             yb = Q->C2;
         } else {
@@ -59,7 +67,7 @@ static XY loc_for(LP lp, PJ *P, double *yc) {
             xb = Q->R_2 * sin(t);
             yb = Q->C2 + Q->R_2 * (1. - cos(t));
         }
-        if (Q->mode > 0) {
+        if (Q->mode == PHI_1_IS_ZERO) {
             xc = lp.lam;
             *yc = 0.;
         } else {
@@ -95,7 +103,9 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
     XY t;
-    double yc;
+    double yc = 0.0;
+    int i = 0;
+    const int N_MAX_ITER = 1000; /* Arbitrarily choosen number... */
 
     lp.phi = Q->phi_2;
     lp.lam = xy.x / cos(lp.phi);
@@ -103,7 +113,14 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
         t = loc_for(lp, P, &yc);
         lp.phi = ((lp.phi - Q->phi_1) * (xy.y - yc) / (t.y - yc)) + Q->phi_1;
         lp.lam = lp.lam * xy.x / t.x;
-    } while (fabs(t.x - xy.x) > TOL || fabs(t.y - xy.y) > TOL);
+        i ++;
+    } while (i < N_MAX_ITER &&
+             (fabs(t.x - xy.x) > TOL || fabs(t.y - xy.y) > TOL));
+
+    if( i == N_MAX_ITER )
+    {
+        lp.lam = lp.phi = HUGE_VAL;
+    }
 
     return lp;
 }
@@ -120,33 +137,32 @@ static void xy(PJ *P, double phi, double *x, double *y, double *sp, double *R) {
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
+static void *destructor (PJ *P, int errlev) {
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
+    if( P->opaque->en )
+        pj_dealloc (P->opaque->en);
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    return pj_default_destructor(P, errlev);
 }
 
 
 PJ *PROJECTION(imw_p) {
     double del, sig, s, t, x1, x2, T2, y1, m1, m2, y2;
-    int i;
+    int err;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
-    if (!(Q->en = pj_enfn(P->es))) E_ERROR_0;
-    if( (i = phi12(P, &del, &sig)) != 0)
-        E_ERROR(i);
+    if (!(Q->en = pj_enfn(P->es))) return pj_default_destructor (P, ENOMEM);
+    if( (err = phi12(P, &del, &sig)) != 0) {
+        return destructor(P, err);
+    }
     if (Q->phi_2 < Q->phi_1) { /* make sure P->phi_1 most southerly */
         del = Q->phi_1;
         Q->phi_1 = Q->phi_2;
@@ -161,16 +177,18 @@ PJ *PROJECTION(imw_p) {
         else                sig = 8.;
         Q->lam_1 = sig * DEG_TO_RAD;
     }
-    Q->mode = 0;
-    if (Q->phi_1) xy(P, Q->phi_1, &x1, &y1, &Q->sphi_1, &Q->R_1);
+    Q->mode = NONE_IS_ZERO;
+    if (Q->phi_1 != 0.0)
+        xy(P, Q->phi_1, &x1, &y1, &Q->sphi_1, &Q->R_1);
     else {
-        Q->mode = 1;
+        Q->mode = PHI_1_IS_ZERO;
         y1 = 0.;
         x1 = Q->lam_1;
     }
-    if (Q->phi_2) xy(P, Q->phi_2, &x2, &T2, &Q->sphi_2, &Q->R_2);
+    if (Q->phi_2 != 0.0)
+        xy(P, Q->phi_2, &x2, &T2, &Q->sphi_2, &Q->R_2);
     else {
-        Q->mode = -1;
+        Q->mode = PHI_2_IS_ZERO;
         T2 = 0.;
         x2 = Q->lam_1;
     }
@@ -188,51 +206,8 @@ PJ *PROJECTION(imw_p) {
 
     P->fwd = e_forward;
     P->inv = e_inverse;
+    P->destructor = destructor;
 
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_imw_p_selftest (void) {return 0;}
-#else
-
-int pj_imw_p_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=imw_p   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222588.4411393762,   55321.128653809537},
-        { 222756.90637768712, -165827.58428832365},
-        {-222588.4411393762,   55321.128653809537},
-        {-222756.90637768712, -165827.58428832365},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966991379592214, 0.50090492361427374},
-        { 0.0017966979081574697, 0.49909507588689922},
-        {-0.0017966991379592214, 0.50090492361427374},
-        {-0.0017966979081574697, 0.49909507588689922},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/PJ_isea.c b/src/PJ_isea.c
index 34a2aac..5cc71c0 100644
--- a/src/PJ_isea.c
+++ b/src/PJ_isea.c
@@ -75,9 +75,12 @@ int hexbin2(double width, double x, double y,
 
     z = -x - y;
 
-    ix = rx = floor(x + 0.5);
-    iy = ry = floor(y + 0.5);
-    iz = rz = floor(z + 0.5);
+    rx = floor(x + 0.5);
+    ix = (int)rx;
+    ry = floor(y + 0.5);
+    iy = (int)ry;
+    rz = floor(z + 0.5);
+    iz = (int)rz;
 
     s = ix + iy + iz;
 
@@ -126,7 +129,7 @@ struct isea_dgg {
     int triangle; /* triangle of last transformed point */
     int quad; /* quad of last transformed point */
     unsigned long serial;
-};
+};
 
 struct isea_pt {
     double x, y;
@@ -156,7 +159,7 @@ struct snyder_constants {
 };
 
 /* TODO put these in radians to avoid a later conversion */
-ISEA_STATIC
+ISEA_STATIC const
 struct snyder_constants constants[] = {
     {23.80018260, 62.15458023, 60.0, 3.75, 1.033, 0.968, 5.09, 1.195, 1.0},
     {20.07675127, 55.69063953, 54.0, 2.65, 1.030, 0.983, 3.59, 1.141, 1.027},
@@ -167,10 +170,6 @@ struct snyder_constants constants[] = {
     {37.37736814, 36.0, 30.0, 17.27, 1.163, 0.860, 13.14, 1.584, 1.0},
 };
 
-#define E 52.62263186
-#define F 10.81231696
-
-#define DEG60 1.04719755119659774614
 #define DEG120 2.09439510239319549229
 #define DEG72 1.25663706143591729537
 #define DEG90 1.57079632679489661922
@@ -214,7 +213,7 @@ static int      tri_v1[] = {0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 2, 3, 4, 5, 1, 11,
 #define F_RAD 0.18871053072122403508
 
 /* triangle Centers */
-struct isea_geo icostriangles[] = {
+static const struct isea_geo icostriangles[] = {
     {0.0, 0.0},
     {-DEG144, E_RAD},
     {-DEG72, E_RAD},
@@ -263,14 +262,12 @@ az_adjustment(int triangle)
 /* H = 0.25 R tan g = */
 #define TABLE_H 0.1909830056
 
-#define RPRIME 0.91038328153090290025
-
 ISEA_STATIC
 struct isea_pt
 isea_triangle_xy(int triangle)
 {
     struct isea_pt  c;
-    double Rprime = 0.91038328153090290025;
+    const double Rprime = 0.91038328153090290025;
 
     triangle = (triangle - 1) % 20;
 
@@ -314,6 +311,12 @@ sph_azimuth(double f_lon, double f_lat, double t_lon, double t_lat)
     return az;
 }
 
+#ifdef _MSC_VER
+#pragma warning( push )
+/* disable unreachable code warning for return 0 */
+#pragma warning( disable : 4702 )
+#endif
+
 /* coord needs to be in radians */
 ISEA_STATIC
 int
@@ -485,19 +488,21 @@ isea_snyder_forward(struct isea_geo * ll, struct isea_pt * out)
     exit(EXIT_FAILURE);
 
     /* not reached */
-    return 0;       /* supresses a warning */
+    return 0;       /* suppresses a warning */
 }
 
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
+
 /*
- * return the new coordinates of any point in orginal coordinate system.
- * Define a point (newNPold) in orginal coordinate system as the North Pole in
+ * return the new coordinates of any point in original coordinate system.
+ * Define a point (newNPold) in original coordinate system as the North Pole in
  * new coordinate system, and the great circle connect the original and new
  * North Pole as the lon0 longitude in new coordinate system, given any point
- * in orginal coordinate system, this function return the new coordinates.
+ * in original coordinate system, this function return the new coordinates.
  */
 
-#define PRECISION 0.0000000000005
-
 /* formula from Snyder, Map Projections: A working manual, p31 */
 /*
  * old north pole at np in new coordinates
@@ -892,7 +897,7 @@ int isea_disn(struct isea_dgg *g, int quad, struct isea_pt *di) {
         sn += 2;
     } else {
         sidelength = (int) (pow(g->aperture, g->resolution / 2.0) + 0.5);
-        sn = (quad - 1) * hexes + sidelength * di->x + di->y + 2;
+        sn = (int) ((quad - 1) * hexes + sidelength * di->x + di->y + 2);
     }
 
     g->serial = sn;
@@ -908,8 +913,11 @@ ISEA_STATIC
 int isea_hex(struct isea_dgg *g, int tri,
         struct isea_pt *pt, struct isea_pt *hex) {
     struct isea_pt v;
+#ifdef FIXME
     int sidelength;
-    int d, i, x, y, quad;
+    int d, i, x, y;
+#endif
+    int quad;
 
     quad = isea_ptdi(g, tri, pt, &v);
 
@@ -917,9 +925,9 @@ int isea_hex(struct isea_dgg *g, int tri,
     hex->y = v.y;
 
     return 1;
-
-    d = v.x;
-    i = v.y;
+#ifdef FIXME
+    d = (int)v.x;
+    i = (int)v.y;
 
     /* Aperture 3 odd resolutions */
     if (g->aperture == 3 && g->resolution % 2 != 0) {
@@ -961,6 +969,7 @@ int isea_hex(struct isea_dgg *g, int tri,
     }
 
     return 1;
+#endif
 }
 
 ISEA_STATIC
@@ -1017,7 +1026,9 @@ isea_forward(struct isea_dgg *g, struct isea_geo *in)
  */
 
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(isea, "Icosahedral Snyder Equal Area") "\n\tSph";
 
@@ -1044,27 +1055,11 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(isea) {
     char *opt;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
 
@@ -1082,7 +1077,7 @@ PJ *PROJECTION(isea) {
         } else if (!strcmp(opt, "pole")) {
             isea_orient_pole(&Q->dgg);
         } else {
-            E_ERROR(-34);
+            return pj_default_destructor(P, PJD_ERR_ELLIPSOID_USE_REQUIRED);
         }
     }
 
@@ -1121,7 +1116,7 @@ PJ *PROJECTION(isea) {
         }
         else {
             /* TODO verify error code.  Possibly eliminate magic */
-            E_ERROR(-34);
+            return pj_default_destructor(P, PJD_ERR_ELLIPSOID_USE_REQUIRED);
         }
     }
 
@@ -1144,33 +1139,3 @@ PJ *PROJECTION(isea) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_isea_selftest (void) {return 0;}
-#else
-
-int pj_isea_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=isea   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {-1097074.9480224741, 3442909.3090371834},
-        {-1097074.9482647954, 3233611.7285857084},
-        {-1575486.3536415542, 3442168.3420281881},
-        {-1575486.353880283,  3234352.6955947056},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_krovak.c b/src/PJ_krovak.c
index 136978a..ef00d71 100644
--- a/src/PJ_krovak.c
+++ b/src/PJ_krovak.c
@@ -77,7 +77,8 @@
 
 
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(krovak, "Krovak") "\n\tPCyl., Ellps.";
 
@@ -86,6 +87,8 @@ PROJ_HEAD(krovak, "Krovak") "\n\tPCyl., Ellps.";
 #define S90 1.570796326794896  /* 90 deg */
 #define UQ  1.04216856380474   /* DU(2, 59, 42, 42.69689) */
 #define S0  1.37008346281555   /* Latitude of pseudo standard parallel 78deg 30'00" N */
+/* Not sure at all of the appropriate number for MAX_ITER... */
+#define MAX_ITER 100
 
 struct pj_opaque {
     double alpha;
@@ -129,7 +132,7 @@ static LP e_inverse (XY xy, PJ *P) {                /* Ellipsoidal, inverse */
     LP lp = {0.0,0.0};
 
     double u, deltav, s, d, eps, rho, fi1, xy0;
-    int ok;
+    int i;
 
     xy0 = xy.x;
     xy.x = xy.y;
@@ -152,16 +155,18 @@ static LP e_inverse (XY xy, PJ *P) {                /* Ellipsoidal, inverse */
     /* ITERATION FOR lp.phi */
     fi1 = u;
 
-    ok = 0;
-    do {
+    for (i = MAX_ITER; i ; --i) {
         lp.phi = 2. * ( atan( pow( Q->k, -1. / Q->alpha)  *
                               pow( tan(u / 2. + S45) , 1. / Q->alpha)  *
                               pow( (1. + P->e * sin(fi1)) / (1. - P->e * sin(fi1)) , P->e / 2.)
                             )  - S45);
 
-        if (fabs(fi1 - lp.phi) < EPS) ok=1;
+        if (fabs(fi1 - lp.phi) < EPS)
+            break;
         fi1 = lp.phi;
-   } while (ok==0);
+    }
+    if( i == 0 )
+        pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
 
    lp.lam -= P->lam0;
 
@@ -169,27 +174,11 @@ static LP e_inverse (XY xy, PJ *P) {                /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                   /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc(P);
-
-    pj_dealloc(P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(krovak) {
     double u0, n0, g;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     /* we want Bessel as fixed ellipsoid */
@@ -230,47 +219,3 @@ PJ *PROJECTION(krovak) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_krovak_selftest (void) {return 0;}
-#else
-
-int pj_krovak_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=krovak +ellps=GRS80"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {-3196535.2325636409,  -6617878.8675514441},
-        {-3260035.4405521089,  -6898873.6148780314},
-        {-3756305.3288691747,  -6478142.5615715114},
-        {-3831703.6585019818,  -6759107.1701553948},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {24.836218918719162,  59.758403933233858},
-        {24.836315484509566,  59.756888425730189},
-        {24.830447747947495,  59.758403933233858},
-        {24.830351182157091,  59.756888425730189},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/PJ_labrd.c b/src/PJ_labrd.c
index d0fad62..16c45a0 100644
--- a/src/PJ_labrd.c
+++ b/src/PJ_labrd.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(labrd, "Laborde") "\n\tCyl, Sph\n\tSpecial for Madagascar";
 #define EPS 1.e-10
@@ -46,7 +47,10 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
 static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-    double x2, y2, V1, V2, V3, V4, t, t2, ps, pe, tpe, s;
+    /* t = 0.0 optimization is to avoid a false positive cppcheck warning */
+    /* (cppcheck git beaf29c15867984aa3c2a15cf15bd7576ccde2b3). Might no */
+    /* longer be necessary with later versions. */
+    double x2, y2, V1, V2, V3, V4, t = 0.0, t2, ps, pe, tpe, s;
     double I7, I8, I9, I10, I11, d, Re;
     int i;
 
@@ -60,6 +64,7 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     xy.y +=   Q->Cb * V1 - Q->Ca * V2 - Q->Cd * V3 + Q->Cc * V4;
     ps = Q->p0s + xy.y / Q->kRg;
     pe = ps + P->phi0 - Q->p0s;
+
     for ( i = 20; i; --i) {
         V1 = Q->A * log(tan(M_FORTPI + .5 * pe));
         tpe = P->e * sin(pe);
@@ -91,28 +96,11 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(labrd) {
     double Az, sinp, R, N, t;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->rot  = pj_param(P->ctx, P->params, "bno_rot").i == 0;
@@ -140,47 +128,3 @@ PJ *PROJECTION(labrd) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_labrd_selftest (void) {return 0;}
-#else
-
-int pj_labrd_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=labrd   +ellps=GRS80  +lon_0=0.5 +lat_0=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 166973.166090228391, -110536.912730266107},
-        { 166973.168287157256, -331761.993650884193},
-        {-278345.500519976194, -110469.032642031714},
-        {-278345.504185269645, -331829.870790275279},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.501797719349373672, 2.00090435742047923},
-        {0.501797717380853658, 1.99909564058898681},
-        {0.498202280650626328, 2.00090435742047923},
-        {0.498202282619146342, 1.99909564058898681},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/PJ_laea.c b/src/PJ_laea.c
index c9aef5c..9edd555 100644
--- a/src/PJ_laea.c
+++ b/src/PJ_laea.c
@@ -1,8 +1,17 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(laea, "Lambert Azimuthal Equal Area") "\n\tAzi, Sph&Ell";
 
+enum Mode {
+    N_POLE = 0,
+    S_POLE = 1,
+    EQUIT  = 2,
+    OBLIQ  = 3
+};
+
 struct pj_opaque {
     double sinb1;
     double cosb1;
@@ -13,16 +22,10 @@ struct pj_opaque {
     double dd;
     double rq;
     double *apa;
-    int mode;
+    enum Mode mode;
 };
 
 #define EPS10   1.e-10
-#define NITER   20
-#define CONV    1.e-10
-#define N_POLE  0
-#define S_POLE  1
-#define EQUIT   2
-#define OBLIQ   3
 
 static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     XY xy = {0.0,0.0};
@@ -55,7 +58,10 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
         q = Q->qp + q;
         break;
     }
-    if (fabs(b) < EPS10) F_ERROR;
+    if (fabs(b) < EPS10) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
 
     switch (Q->mode) {
     case OBLIQ:
@@ -98,7 +104,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     case OBLIQ:
         xy.y = 1. + Q->sinb1 * sinphi + Q->cosb1 * cosphi * coslam;
 oblcon:
-        if (xy.y <= EPS10) F_ERROR;
+        if (xy.y <= EPS10) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         xy.y = sqrt(2. / xy.y);
         xy.x = xy.y * cosphi * sin(lp.lam);
         xy.y *= Q->mode == EQUIT ? sinphi :
@@ -106,8 +115,12 @@ oblcon:
         break;
     case N_POLE:
         coslam = -coslam;
+        /*-fallthrough*/
     case S_POLE:
-        if (fabs(lp.phi + P->phi0) < EPS10) F_ERROR;
+        if (fabs(lp.phi + P->phi0) < EPS10) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         xy.y = M_FORTPI - lp.phi * .5;
         xy.y = 2. * (Q->mode == S_POLE ? cos(xy.y) : sin(xy.y));
         xy.x = xy.y * sin(lp.lam);
@@ -148,9 +161,10 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
         break;
     case N_POLE:
         xy.y = -xy.y;
+        /*-fallthrough*/
     case S_POLE:
         q = (xy.x * xy.x + xy.y * xy.y);
-        if (!q) {
+        if (q == 0.0) {
             lp.lam = 0.;
             lp.phi = P->phi0;
             return (lp);
@@ -172,7 +186,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     double  cosz=0.0, rh, sinz=0.0;
 
     rh = hypot(xy.x, xy.y);
-    if ((lp.phi = rh * .5 ) > 1.) I_ERROR;
+    if ((lp.phi = rh * .5 ) > 1.) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
     lp.phi = 2. * asin(lp.phi);
     if (Q->mode == OBLIQ || Q->mode == EQUIT) {
         sinz = sin(lp.phi);
@@ -204,20 +221,16 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor (PJ *P, int errlev) {
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
     pj_dealloc (P->opaque->apa);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    return pj_default_destructor(P, errlev);
 }
 
 
@@ -225,8 +238,9 @@ PJ *PROJECTION(laea) {
     double t;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
+    P->destructor = destructor;
 
     t = fabs(P->phi0);
     if (fabs(t - M_HALFPI) < EPS10)
@@ -235,13 +249,15 @@ PJ *PROJECTION(laea) {
         Q->mode = EQUIT;
     else
         Q->mode = OBLIQ;
-    if (P->es) {
+    if (P->es != 0.0) {
         double sinphi;
 
         P->e = sqrt(P->es);
         Q->qp = pj_qsfn(1., P->e, P->one_es);
         Q->mmf = .5 / (1. - P->es);
         Q->apa = pj_authset(P->es);
+        if (0==Q->apa)
+            return destructor(P, ENOMEM);
         switch (Q->mode) {
         case N_POLE:
         case S_POLE:
@@ -277,62 +293,3 @@ PJ *PROJECTION(laea) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_laea_selftest (void) {return 0;}
-#else
-
-int pj_laea_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=laea   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=laea   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222602.471450095181,  110589.82722441027},
-        { 222602.471450095181, -110589.827224408786},
-        {-222602.471450095181,  110589.82722441027},
-        {-222602.471450095181, -110589.827224408786},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223365.281370124663,  111716.668072915665},
-        { 223365.281370124663, -111716.668072915665},
-        {-223365.281370124663,  111716.668072915665},
-        {-223365.281370124663, -111716.668072915665},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00179663056847900867,  0.000904369475966495845},
-        { 0.00179663056847900867, -0.000904369475966495845},
-        {-0.00179663056847900867,  0.000904369475966495845},
-        {-0.00179663056847900867, -0.000904369475966495845},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049311002060264,  0.000895246554791735271},
-        { 0.00179049311002060264, -0.000895246554791735271},
-        {-0.00179049311002060264,  0.000895246554791735271},
-        {-0.00179049311002060264, -0.000895246554791735271},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_lagrng.c b/src/PJ_lagrng.c
index 142c28a..b4744ed 100644
--- a/src/PJ_lagrng.c
+++ b/src/PJ_lagrng.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(lagrng, "Lagrange") "\n\tMisc Sph, no inv.\n\tW=";
 
@@ -23,8 +25,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     } else {
         lp.phi = sin(lp.phi);
         v = Q->a1 * pow((1. + lp.phi)/(1. - lp.phi), Q->hrw);
-        if ((c = 0.5 * (v + 1./v) + cos(lp.lam *= Q->rw)) < TOL)
-            F_ERROR;
+        if ((c = 0.5 * (v + 1./v) + cos(lp.lam *= Q->rw)) < TOL) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         xy.x = 2. * sin(lp.lam) / c;
         xy.y = (v - 1./v) / c;
     }
@@ -32,36 +36,22 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(lagrng) {
     double phi1;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->rw = pj_param(P->ctx, P->params, "dW").f;
-    if (Q->rw <= 0) E_ERROR(-27);
+    if (Q->rw <= 0)
+        return pj_default_destructor(P, PJD_ERR_W_OR_M_ZERO_OR_LESS);
 
     Q->rw = 1. / Q->rw;
     Q->hrw = 0.5 * Q->rw;
     phi1 = sin(pj_param(P->ctx, P->params, "rlat_1").f);
-    if (fabs(fabs(phi1) - 1.) < TOL) E_ERROR(-22);
+    if (fabs(fabs(phi1) - 1.) < TOL)
+        return pj_default_destructor(P, PJD_ERR_LAT_LARGER_THAN_90);
 
     Q->a1 = pow((1. - phi1)/(1. + phi1), Q->hrw);
 
@@ -71,33 +61,3 @@ PJ *PROJECTION(lagrng) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_lagrng_selftest (void) {return 0;}
-#else
-
-int pj_lagrng_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=lagrng   +a=6400000 +W=2   +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 111703.37591722561,   27929.8319080333386},
-        { 111699.122088816002, -83784.1780133577704},
-        {-111703.37591722561,   27929.8319080333386},
-        {-111699.122088816002, -83784.1780133577704},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_larr.c b/src/PJ_larr.c
index dba2534..a8d1af5 100644
--- a/src/PJ_larr.c
+++ b/src/PJ_larr.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(larr, "Larrivee") "\n\tMisc Sph, no inv.";
 
@@ -16,20 +16,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(larr) {
 
     P->es = 0;
@@ -38,33 +24,3 @@ PJ *PROJECTION(larr) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_larr_selftest (void) {return 0;}
-#else
-
-int pj_larr_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=larr   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {223393.637624200899,  111707.215961255497},
-        {223393.637624200899,  -111707.215961255497},
-        {-223393.637624200899,  111707.215961255497},
-        {-223393.637624200899,  -111707.215961255497},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_lask.c b/src/PJ_lask.c
index 9aa9620..0bb3812 100644
--- a/src/PJ_lask.c
+++ b/src/PJ_lask.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include    <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(lask, "Laskowski") "\n\tMisc Sph, no inv.";
 
@@ -28,19 +28,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     return xy;
 }
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(lask) {
 
@@ -50,32 +37,3 @@ PJ *PROJECTION(lask) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_lask_selftest (void) {return 0;}
-#else
-
-int pj_lask_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=lask   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 217928.275907355128,  112144.32922014239},
-        { 217928.275907355128, -112144.32922014239},
-        {-217928.275907355128,  112144.32922014239},
-        {-217928.275907355128, -112144.32922014239},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/pj_latlong.c b/src/PJ_latlong.c
similarity index 63%
rename from src/pj_latlong.c
rename to src/PJ_latlong.c
index 761eadc..1331d59 100644
--- a/src/pj_latlong.c
+++ b/src/PJ_latlong.c
@@ -1,6 +1,6 @@
 /******************************************************************************
  * Project:  PROJ.4
- * Purpose:  Stub projection implementation for lat/long coordinates. We 
+ * Purpose:  Stub projection implementation for lat/long coordinates. We
  *           don't actually change the coordinates, but we want proj=latlong
  *           to act sort of like a projection.
  * Author:   Frank Warmerdam, warmerdam at pobox.com
@@ -29,7 +29,8 @@
 
 /* very loosely based upon DMA code by Bradford W. Drew */
 #define PJ_LIB__
-#include <projects.h>
+#include "proj_internal.h"
+#include "projects.h"
 
 PROJ_HEAD(lonlat, "Lat/long (Geodetic)")  "\n\t";
 PROJ_HEAD(latlon, "Lat/long (Geodetic alias)")  "\n\t";
@@ -37,86 +38,87 @@ PROJ_HEAD(latlong, "Lat/long (Geodetic alias)")  "\n\t";
 PROJ_HEAD(longlat, "Lat/long (Geodetic alias)")  "\n\t";
 
 
- static XY forward(LP lp, PJ *P) {
+ static XY latlong_forward(LP lp, PJ *P) {
     XY xy = {0.0,0.0};
-    xy.x = lp.lam / P->a;
-    xy.y = lp.phi / P->a;
+    (void) P;
+    xy.x = lp.lam;
+    xy.y = lp.phi;
     return xy;
 }
 
 
-static LP inverse(XY xy, PJ *P) {
+static LP latlong_inverse(XY xy, PJ *P) {
     LP lp = {0.0,0.0};
-    lp.phi = xy.y * P->a;
-    lp.lam = xy.x * P->a;
+    (void) P;
+    lp.phi = xy.y;
+    lp.lam = xy.x;
     return lp;
 }
 
 
-static void *freeup_new (PJ *P) {
-    if (0==P)
-        return 0;
+ static XYZ latlong_forward_3d (LPZ lpz, PJ *P) {
+    XYZ xyz = {0,0,0};
+    (void) P;
+    xyz.x = lpz.lam;
+    xyz.y = lpz.phi;
+    xyz.z = lpz.z;
+    return xyz;
+}
+
 
-    return pj_dealloc(P);
+static LPZ latlong_inverse_3d (XYZ xyz, PJ *P) {
+    LPZ lpz = {0,0,0};
+    (void) P;
+    lpz.lam = xyz.x;
+    lpz.phi = xyz.y;
+    lpz.z   = xyz.z;
+    return lpz;
 }
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+static PJ_COORD latlong_forward_4d (PJ_COORD obs, PJ *P) {
+    (void) P;
+    return obs;
 }
 
 
-PJ *PROJECTION(latlong) {
-    P->is_latlong = 1;
-    P->x0 = 0.0;
-    P->y0 = 0.0;
-    P->inv = inverse;
-    P->fwd = forward;
+static PJ_COORD latlong_inverse_4d (PJ_COORD obs, PJ *P) {
+    (void) P;
+    return obs;
+}
+
 
+
+static PJ *latlong_setup (PJ *P) {
+    P->is_latlong = 1;
+    P->x0 = 0;
+    P->y0 = 0;
+    P->inv = latlong_inverse;
+    P->fwd = latlong_forward;
+    P->inv3d = latlong_inverse_3d;
+    P->fwd3d = latlong_forward_3d;
+    P->inv4d = latlong_inverse_4d;
+    P->fwd4d = latlong_forward_4d;
+    P->left = PJ_IO_UNITS_ANGULAR;
+    P->right = PJ_IO_UNITS_ANGULAR;
     return P;
 }
 
+PJ *PROJECTION(latlong) {
+    return latlong_setup (P);
+}
 
-PJ *PROJECTION(longlat) {
-    P->is_latlong = 1;
-    P->x0 = 0.0;
-    P->y0 = 0.0;
-    P->inv = inverse;
-    P->fwd = forward;
 
-    return P;
+PJ *PROJECTION(longlat) {
+    return latlong_setup (P);
 }
 
 
 PJ *PROJECTION(latlon) {
-    P->is_latlong = 1;
-    P->x0 = 0.0;
-    P->y0 = 0.0;
-    P->inv = inverse;
-    P->fwd = forward;
-
-    return P;
+    return latlong_setup (P);
 }
 
 
 PJ *PROJECTION(lonlat) {
-    P->is_latlong = 1;
-    P->x0 = 0.0;
-    P->y0 = 0.0;
-    P->inv = inverse; P->fwd = forward;
-
-    return P;
+    return latlong_setup (P);
 }
 
-
-/* Bogus self-test functions. Self-tests can't be implemented the usual way for
- * these "projections" since they can't be used directly from proj.
- * We still need them though, as all projections are automatically added to
- * the list of self-test functions.
- *
- * The code should be covered by the tests in nad/.
- * */
-int pj_latlong_selftest (void) {return 0;}
-int pj_longlat_selftest (void) {return 0;}
-int pj_latlon_selftest (void) {return 0;}
-int pj_lonlat_selftest (void) {return 0;}
diff --git a/src/PJ_lcc.c b/src/PJ_lcc.c
index 1c05a7f..a24d5ac 100644
--- a/src/PJ_lcc.c
+++ b/src/PJ_lcc.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(lcc, "Lambert Conformal Conic")
     "\n\tConic, Sph&Ell\n\tlat_1= and lat_2= or lat_0";
@@ -22,7 +24,10 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     double rho;
 
     if (fabs(fabs(lp.phi) - M_HALFPI) < EPS10) {
-        if ((lp.phi * Q->n) <= 0.) F_ERROR;
+        if ((lp.phi * Q->n) <= 0.) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         rho = 0.;
     } else {
         rho = Q->c * (Q->ellips ? pow(pj_tsfn(lp.phi, sin(lp.phi),
@@ -53,8 +58,11 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
         }
         if (Q->ellips) {
             lp.phi = pj_phi2(P->ctx, pow(rho / Q->c, 1./Q->n), P->e);
-            if (lp.phi == HUGE_VAL)
-                I_ERROR;
+            if (lp.phi == HUGE_VAL) {
+                proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+                return lp;
+            }
+
         } else
             lp.phi = 2. * atan(pow(Q->c / rho, 1./Q->n)) - M_HALFPI;
         lp.lam = atan2(xy.x, xy.y) / Q->n;
@@ -65,37 +73,6 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     return lp;
 }
 
-static void special(LP lp, PJ *P, struct FACTORS *fac) {
-    struct pj_opaque *Q = P->opaque;
-    double rho;
-    if (fabs(fabs(lp.phi) - M_HALFPI) < EPS10) {
-        if ((lp.phi * Q->n) <= 0.) return;
-        rho = 0.;
-    } else
-        rho = Q->c * (Q->ellips ? pow(pj_tsfn(lp.phi, sin(lp.phi),
-            P->e), Q->n) : pow(tan(M_FORTPI + .5 * lp.phi), -Q->n));
-    fac->code |= IS_ANAL_HK + IS_ANAL_CONV;
-    fac->k = fac->h = P->k0 * Q->n * rho /
-        pj_msfn(sin(lp.phi), cos(lp.phi), P->es);
-    fac->conv = - Q->n * lp.lam;
-}
-
-
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(lcc) {
     double cosphi, sinphi;
@@ -103,7 +80,7 @@ PJ *PROJECTION(lcc) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
 
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
 
@@ -115,7 +92,9 @@ PJ *PROJECTION(lcc) {
         if (!pj_param(P->ctx, P->params, "tlat_0").i)
             P->phi0 = Q->phi1;
     }
-    if (fabs(Q->phi1 + Q->phi2) < EPS10) E_ERROR(-21);
+    if (fabs(Q->phi1 + Q->phi2) < EPS10)
+        return pj_default_destructor(P, PJD_ERR_CONIC_LAT_EQUAL);
+
     Q->n = sinphi = sin(Q->phi1);
     cosphi = cos(Q->phi1);
     secant = fabs(Q->phi1 - Q->phi2) >= EPS10;
@@ -145,52 +124,7 @@ PJ *PROJECTION(lcc) {
 
     P->inv = e_inverse;
     P->fwd = e_forward;
-    P->spc = special;
 
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_lcc_selftest (void) {return 0;}
-#else
-
-int pj_lcc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=lcc   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222588.439735968423,  110660.533870799671},
-        { 222756.879700278747, -110532.797660827026},
-        {-222588.439735968423,  110660.533870799671},
-        {-222756.879700278747, -110532.797660827026},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00179635940600536667,  0.000904232207322381741},
-        { 0.00179635817735249777, -0.000904233135128348995},
-        {-0.00179635940600536667,  0.000904232207322381741},
-        {-0.00179635817735249777, -0.000904233135128348995},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/PJ_lcca.c b/src/PJ_lcca.c
index 4a58630..61b2ed0 100644
--- a/src/PJ_lcca.c
+++ b/src/PJ_lcca.c
@@ -1,7 +1,54 @@
-/* PROJ.4 Cartographic Projection System
-*/
+/*****************************************************************************
+
+               Lambert Conformal Conic Alternative
+               -----------------------------------
+
+    This is Gerald Evenden's 2003 implementation of an alternative
+    "almost" LCC, which has been in use historically, but which
+    should NOT be used for new projects - i.e: use this implementation
+    if you need interoperability with old data represented in this
+    projection, but not in any other case.
+
+    The code was originally discussed on the PROJ.4 mailing list in
+    a thread archived over at
+
+    http://lists.maptools.org/pipermail/proj/2003-March/000644.html
+
+    It was discussed again in the thread starting at
+
+    http://lists.maptools.org/pipermail/proj/2017-October/007828.html
+        and continuing at
+    http://lists.maptools.org/pipermail/proj/2017-November/007831.html
+
+    which prompted Clifford J. Mugnier to add these clarifying notes:
+
+    The French Army Truncated Cubic Lambert (partially conformal) Conic
+    projection is the Legal system for the projection in France between
+    the late 1800s and 1948 when the French Legislature changed the law
+    to recognize the fully conformal version.
+
+    It was (might still be in one or two North African prior French
+    Colonies) used in North Africa in Algeria, Tunisia, & Morocco, as
+    well as in Syria during the Levant.
+
+    Last time I have seen it used was about 30+ years ago in
+    Algeria when it was used to define Lease Block boundaries for
+    Petroleum Exploration & Production.
+
+    (signed)
+
+    Clifford J. Mugnier, c.p., c.m.s.
+    Chief of Geodesy
+    LSU Center for GeoInformatics
+    Dept. of Civil Engineering
+    LOUISIANA STATE UNIVERSITY
+
+*****************************************************************************/
+
 #define PJ_LIB__
-#include    <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(lcca, "Lambert Conformal Conic Alternative")
     "\n\tConic, Sph&Ell\n\tlat_0=";
@@ -58,27 +105,25 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
         S -= (dif = (fS(S, Q->C) - dr) / fSp(S, Q->C));
         if (fabs(dif) < DEL_TOL) break;
     }
-    if (!i) I_ERROR
+    if (!i) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
     lp.phi = pj_inv_mlfn(P->ctx, S + Q->M0, P->es, Q->en);
 
     return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor (PJ *P, int errlev) {
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
     pj_dealloc (P->opaque->en);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    return pj_default_destructor (P, errlev);
 }
 
 
@@ -86,13 +131,16 @@ PJ *PROJECTION(lcca) {
     double s2p0, N0, R0, tan0;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     (Q->en = pj_enfn(P->es));
-    if (!Q->en) E_ERROR_0;
-    if (!pj_param(P->ctx, P->params, "tlat_0").i) E_ERROR(50);
-    if (P->phi0 == 0.) E_ERROR(51);
+    if (!Q->en)
+        return pj_default_destructor (P, ENOMEM);
+
+    if (P->phi0 == 0.) {
+        return destructor(P, PJD_ERR_LAT_0_IS_ZERO);
+    }
     Q->l = sin(P->phi0);
     Q->M0 = pj_mlfn(P->phi0, Q->l, cos(P->phi0), Q->en);
     s2p0 = Q->l * Q->l;
@@ -105,52 +153,8 @@ PJ *PROJECTION(lcca) {
 
     P->inv = e_inverse;
     P->fwd = e_forward;
+    P->destructor = destructor;
 
     return P;
 }
 
-
-
-#ifndef PJ_SELFTEST
-int pj_lcca_selftest (void) {return 0;}
-#else
-
-int pj_lcca_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=lcca   +ellps=GRS80  +lat_0=1 +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222605.285770237417,  67.8060072715846616},
-        { 222740.037637936533, -221125.539829601563},
-        {-222605.285770237417,  67.8060072715846616},
-        {-222740.037637936533, -221125.539829601563},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00179690290525662526, 1.00090436621350798},
-        { 0.00179690192174008037, 0.999095632791497268},
-        {-0.00179690290525662526, 1.00090436621350798},
-        {-0.00179690192174008037, 0.999095632791497268},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/PJ_loxim.c b/src/PJ_loxim.c
index 57f0704..bb87071 100644
--- a/src/PJ_loxim.c
+++ b/src/PJ_loxim.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(loxim, "Loximuthal") "\n\tPCyl Sph";
 
@@ -48,32 +50,17 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(loxim) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f;
     Q->cosphi1 = cos(Q->phi1);
     if (Q->cosphi1 < EPS)
-        E_ERROR(-22);
+        return pj_default_destructor(P, PJD_ERR_LAT_LARGER_THAN_90);
+
 
     Q->tanphi1 = tan(M_FORTPI + 0.5 * Q->phi1);
 
@@ -84,47 +71,3 @@ PJ *PROJECTION(loxim) {
    return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_loxim_selftest (void) {return 0;}
-#else
-
-int pj_loxim_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=loxim   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223382.295791338867,  55850.5360638185448},
-        { 223393.637462243292, -167551.608191455656},
-        {-223382.295791338867,  55850.5360638185448},
-        {-223393.637462243292, -167551.608191455656},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179056141104335601, 0.500895246554891926},
-        { 0.00179056116683692576, 0.499104753445108074},
-        {-0.00179056141104335601, 0.500895246554891926},
-        {-0.00179056116683692576, 0.499104753445108074},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_lsat.c b/src/PJ_lsat.c
index 292a582..65b20fe 100644
--- a/src/PJ_lsat.c
+++ b/src/PJ_lsat.c
@@ -1,6 +1,8 @@
 /* based upon Snyder and Linck, USGS-NMD */
 #define PJ_LIB__
-#include    <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(lsat, "Space oblique for LANDSAT")
     "\n\tCyl, Sph&Ell\n\tlsat= path=";
@@ -22,6 +24,7 @@ static void seraz0(double lam, double mult, PJ *P) {
     s = Q->p22 * Q->sa * cos(lam) * sqrt((1. + Q->t * sdsq)
         / ((1. + Q->w * sdsq) * (1. + Q->q * sdsq)));
 
+    d__1 = 1. + Q->q * sdsq;
     h = sqrt((1. + Q->q * sdsq) / (1. + Q->w * sdsq)) * ((1. + Q->w * sdsq)
         / (d__1 * d__1) - Q->p22 * Q->ca);
 
@@ -40,24 +43,31 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
     int l, nn;
-    double lamt, xlam, sdsq, c, d, s, lamdp, phidp, lampp, tanph;
-    double lamtp, cl, sd, sp, fac, sav, tanphi;
+    double lamt = 0.0, xlam, sdsq, c, d, s, lamdp = 0.0, phidp, lampp, tanph;
+    double lamtp, cl, sd, sp, sav, tanphi;
 
     if (lp.phi > M_HALFPI)
         lp.phi = M_HALFPI;
     else if (lp.phi < -M_HALFPI)
         lp.phi = -M_HALFPI;
 
-    lampp = lp.phi >= 0. ? M_HALFPI : M_PI_HALFPI;
+    if (lp.phi >= 0. )
+        lampp = M_HALFPI;
+    else
+        lampp = M_PI_HALFPI;
     tanphi = tan(lp.phi);
     for (nn = 0;;) {
+        double fac;
         sav = lampp;
         lamtp = lp.lam + Q->p22 * lampp;
         cl = cos(lamtp);
         if (fabs(cl) < TOL)
             lamtp -= TOL;
-        fac = lampp - sin(lampp) * (cl < 0. ? -M_HALFPI : M_HALFPI);
-        for (l = 50; l; --l) {
+        if( cl < 0 )
+            fac = lampp + sin(lampp) * M_HALFPI;
+        else
+            fac = lampp - sin(lampp) * M_HALFPI;
+        for (l = 50; l >= 0; --l) {
             lamt = lp.lam + Q->p22 * sav;
             c = cos(lamt);
             if (fabs(c) < TOL)
@@ -139,34 +149,22 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(lsat) {
     int land, path;
     double lam, alf, esc, ess;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
     land = pj_param(P->ctx, P->params, "ilsat").i;
-    if (land <= 0 || land > 5) E_ERROR(-28);
+    if (land <= 0 || land > 5)
+        return pj_default_destructor(P, PJD_ERR_LSAT_NOT_IN_RANGE);
+
     path = pj_param(P->ctx, P->params, "ipath").i;
-    if (path <= 0 || path > (land <= 3 ? 251 : 233)) E_ERROR(-29);
+    if (path <= 0 || path > (land <= 3 ? 251 : 233))
+        return pj_default_destructor(P, PJD_ERR_PATH_NOT_IN_RANGE);
+
     if (land <= 3) {
         P->lam0 = DEG_TO_RAD * 128.87 - M_TWOPI / 251. * path;
         Q->p22 = 103.2669323;
@@ -210,47 +208,3 @@ PJ *PROJECTION(lsat) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_lsat_selftest (void) {return 0;}
-#else
-
-int pj_lsat_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=lsat +ellps=GRS80 +lat_1=0.5 +lat_2=2 +lsat=1 +path=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {18241950.01455855,    9998256.83982293494},
-        {18746856.2533194572, 10215761.669925211},
-        {18565503.6836331636,  9085039.14672705345},
-        {19019696.9020289108,  9247763.0394328218},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {126.000423834530011,  0.00172378224025701425},
-        {126.002213738256714,  0.00188015467480917966},
-        {126.000734468914601, -0.00188015467480917966},
-        {126.002524372641304, -0.00172378224025701425},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/PJ_mbt_fps.c b/src/PJ_mbt_fps.c
index 5a3f377..2fccf3a 100644
--- a/src/PJ_mbt_fps.c
+++ b/src/PJ_mbt_fps.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(mbt_fps, "McBryde-Thomas Flat-Pole Sine (No. 2)") "\n\tCyl., Sph.";
 
@@ -44,20 +44,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(mbt_fps) {
 
     P->es = 0;
@@ -67,46 +53,3 @@ PJ *PROJECTION(mbt_fps) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_mbt_fps_selftest (void) {return 0;}
-#else
-
-int pj_mbt_fps_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=mbt_fps   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 198798.176129849948,  125512.017254530627},
-        { 198798.176129849948, -125512.017254530627},
-        {-198798.176129849948,  125512.017254530627},
-        {-198798.176129849948, -125512.017254530627},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00201197086238270742,  0.000796711850174446003},
-        { 0.00201197086238270742, -0.000796711850174446003},
-        {-0.00201197086238270742,  0.000796711850174446003},
-        {-0.00201197086238270742, -0.000796711850174446003},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_mbtfpp.c b/src/PJ_mbtfpp.c
index 172be23..3bf2fa9 100644
--- a/src/PJ_mbtfpp.c
+++ b/src/PJ_mbtfpp.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include    <projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(mbtfpp, "McBride-Thomas Flat-Polar Parabolic") "\n\tCyl., Sph.";
 
@@ -27,19 +28,23 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 
     lp.phi = xy.y / FYC;
     if (fabs(lp.phi) >= 1.) {
-        if (fabs(lp.phi) > ONEEPS)
-            I_ERROR
-        else
+        if (fabs(lp.phi) > ONEEPS) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        } else {
             lp.phi = (lp.phi < 0.) ? -M_HALFPI : M_HALFPI;
+        }
     } else
         lp.phi = asin(lp.phi);
 
     lp.lam = xy.x / ( FXC * (2. * cos(C23 * (lp.phi *= 3.)) - 1.) );
     if (fabs(lp.phi = sin(lp.phi) / CS) >= 1.) {
-        if (fabs(lp.phi) > ONEEPS)
-            I_ERROR
-        else
+        if (fabs(lp.phi) > ONEEPS) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        } else {
             lp.phi = (lp.phi < 0.) ? -M_HALFPI : M_HALFPI;
+        }
     } else
         lp.phi = asin(lp.phi);
 
@@ -47,19 +52,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(mbtfpp) {
 
     P->es = 0.;
@@ -69,46 +61,3 @@ PJ *PROJECTION(mbtfpp) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_mbtfpp_selftest (void) {return 0;}
-#else
-
-int pj_mbtfpp_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=mbtfpp   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {206804.786929820373,  120649.762565792524},
-        {206804.786929820373,  -120649.762565792524},
-        {-206804.786929820373,  120649.762565792524},
-        {-206804.786929820373,  -120649.762565792524},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.00193395359462902698,  0.00082883725477665357},
-        {0.00193395359462902698,  -0.00082883725477665357},
-        {-0.00193395359462902698,  0.00082883725477665357},
-        {-0.00193395359462902698,  -0.00082883725477665357},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_mbtfpq.c b/src/PJ_mbtfpq.c
index 7a43672..4a0d48d 100644
--- a/src/PJ_mbtfpq.c
+++ b/src/PJ_mbtfpq.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(mbtfpq, "McBryde-Thomas Flat-Polar Quartic") "\n\tCyl., Sph.";
 
@@ -38,7 +39,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 
     lp.phi = RYC * xy.y;
     if (fabs(lp.phi) > 1.) {
-        if (fabs(lp.phi) > ONETOL)  I_ERROR
+        if (fabs(lp.phi) > ONETOL) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        }
         else if (lp.phi < 0.) { t = -1.; lp.phi = -M_PI; }
         else { t = 1.; lp.phi = M_PI; }
     } else
@@ -46,7 +50,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     lp.lam = RXC * xy.x / (1. + 2. * cos(lp.phi)/cos(0.5 * lp.phi));
     lp.phi = RC * (t + sin(lp.phi));
     if (fabs(lp.phi) > 1.)
-        if (fabs(lp.phi) > ONETOL)  I_ERROR
+        if (fabs(lp.phi) > ONETOL) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        }
         else            lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI;
     else
         lp.phi = asin(lp.phi);
@@ -54,19 +61,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(mbtfpq) {
 
     P->es = 0.;
@@ -76,46 +70,3 @@ PJ *PROJECTION(mbtfpq) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_mbtfpq_selftest (void) {return 0;}
-#else
-
-int pj_mbtfpq_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=mbtfpq   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 209391.854738393013,  119161.040199054827},
-        { 209391.854738393013, -119161.040199054827},
-        {-209391.854738393013,  119161.040199054827},
-        {-209391.854738393013, -119161.040199054827},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00191010555824111571,  0.000839185447792341723},
-        { 0.00191010555824111571, -0.000839185447792341723},
-        {-0.00191010555824111571,  0.000839185447792341723},
-        {-0.00191010555824111571, -0.000839185447792341723},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_merc.c b/src/PJ_merc.c
index 4740e1e..5e0827b 100644
--- a/src/PJ_merc.c
+++ b/src/PJ_merc.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(merc, "Mercator") "\n\tCyl, Sph&Ell\n\tlat_ts=";
 
@@ -7,8 +8,10 @@ PROJ_HEAD(merc, "Mercator") "\n\tCyl, Sph&Ell\n\tlat_ts=";
 
 static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     XY xy = {0.0,0.0};
-    if (fabs(fabs(lp.phi) - M_HALFPI) <= EPS10)
-        F_ERROR;
+    if (fabs(fabs(lp.phi) - M_HALFPI) <= EPS10) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
     xy.x = P->k0 * lp.lam;
     xy.y = - P->k0 * log(pj_tsfn(lp.phi, sin(lp.phi), P->e));
     return xy;
@@ -17,8 +20,10 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
-    if (fabs(fabs(lp.phi) - M_HALFPI) <= EPS10)
-        F_ERROR;
+    if (fabs(fabs(lp.phi) - M_HALFPI) <= EPS10) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+}
     xy.x = P->k0 * lp.lam;
     xy.y = P->k0 * log(tan(M_FORTPI + .5 * lp.phi));
     return xy;
@@ -27,8 +32,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 
 static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     LP lp = {0.0,0.0};
-    if ((lp.phi = pj_phi2(P->ctx, exp(- xy.y / P->k0), P->e)) == HUGE_VAL)
-        I_ERROR;
+    if ((lp.phi = pj_phi2(P->ctx, exp(- xy.y / P->k0), P->e)) == HUGE_VAL) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+}
     lp.lam = xy.x / P->k0;
     return lp;
 }
@@ -42,21 +49,17 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void freeup(PJ *P) {                             /* Destructor */
-    pj_dealloc(P);
-}
-
-
 PJ *PROJECTION(merc) {
     double phits=0.0;
     int is_phits;
 
     if( (is_phits = pj_param(P->ctx, P->params, "tlat_ts").i) ) {
         phits = fabs(pj_param(P->ctx, P->params, "rlat_ts").f);
-        if (phits >= M_HALFPI) E_ERROR(-24);
+        if (phits >= M_HALFPI)
+            return pj_default_destructor(P, PJD_ERR_LAT_TS_LARGER_THAN_90);
     }
 
-    if (P->es) { /* ellipsoid */
+    if (P->es != 0.0) { /* ellipsoid */
         if (is_phits)
             P->k0 = pj_msfn(sin(phits), cos(phits), P->es);
         P->inv = e_inverse;
@@ -73,62 +76,3 @@ PJ *PROJECTION(merc) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_merc_selftest (void) {return 0;}
-#else
-
-int pj_merc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=merc   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=merc   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222638.981586547132,  110579.965218249708},
-        { 222638.981586547132, -110579.965218249112},
-        {-222638.981586547132,  110579.965218249708},
-        {-222638.981586547132, -110579.965218249112},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223402.144255274179,  111706.743574944077},
-        { 223402.144255274179, -111706.743574944485},
-        {-223402.144255274179,  111706.743574944077},
-        {-223402.144255274179, -111706.743574944485},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00179663056823904264,  0.00090436947522799056},
-        { 0.00179663056823904264, -0.00090436947522799056},
-        {-0.00179663056823904264,  0.00090436947522799056},
-        {-0.00179663056823904264,  -0.00090436947522799056},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049310978382265,  0.000895246554845297135},
-        { 0.00179049310978382265, -0.000895246554858019272},
-        {-0.00179049310978382265,  0.000895246554845297135},
-        {-0.00179049310978382265, -0.000895246554858019272},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_mill.c b/src/PJ_mill.c
index 1776341..fdb0b2a 100644
--- a/src/PJ_mill.c
+++ b/src/PJ_mill.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(mill, "Miller Cylindrical") "\n\tCyl, Sph";
 
@@ -25,19 +25,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-   return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(mill) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -46,47 +33,3 @@ PJ *PROJECTION(mill) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_mill_selftest (void) {return 0;}
-#else
-
-int pj_mill_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=mill   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223402.144255274179,  111704.701754393827},
-        { 223402.144255274179, -111704.701754396243},
-        {-223402.144255274179,  111704.701754393827},
-        {-223402.144255274179, -111704.701754396243},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049310978382265,  0.000895246554873922024},
-        { 0.00179049310978382265, -0.000895246554873922024},
-        {-0.00179049310978382265,  0.000895246554873922024},
-        {-0.00179049310978382265, -0.000895246554873922024},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_misrsom.c b/src/PJ_misrsom.c
index 2e7e6b5..d23f5fa 100644
--- a/src/PJ_misrsom.c
+++ b/src/PJ_misrsom.c
@@ -21,7 +21,9 @@
  *****************************************************************************/
 /* based upon Snyder and Linck, USGS-NMD */
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(misrsom, "Space oblique for MISR")
         "\n\tCyl, Sph&Ell\n\tpath=";
@@ -59,22 +61,29 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
     int l, nn;
-    double lamt, xlam, sdsq, c, d, s, lamdp, phidp, lampp, tanph;
-    double lamtp, cl, sd, sp, fac, sav, tanphi;
+    double lamt = 0.0, xlam, sdsq, c, d, s, lamdp = 0.0, phidp, lampp, tanph;
+    double lamtp, cl, sd, sp, sav, tanphi;
 
     if (lp.phi > M_HALFPI)
         lp.phi = M_HALFPI;
     else if (lp.phi < -M_HALFPI)
         lp.phi = -M_HALFPI;
-    lampp = lp.phi >= 0. ? M_HALFPI : M_PI_HALFPI;
+    if (lp.phi >= 0. )
+        lampp = M_HALFPI;
+    else
+        lampp = M_PI_HALFPI;
     tanphi = tan(lp.phi);
     for (nn = 0;;) {
+            double fac;
             sav = lampp;
             lamtp = lp.lam + Q->p22 * lampp;
             cl = cos(lamtp);
             if (fabs(cl) < TOL)
                 lamtp -= TOL;
-            fac = lampp - sin(lampp) * (cl < 0. ? -M_HALFPI : M_HALFPI);
+            if( cl < 0 )
+                fac = lampp + sin(lampp) * M_HALFPI;
+            else
+                fac = lampp - sin(lampp) * M_HALFPI;
             for (l = 50; l; --l) {
                     lamt = lp.lam + Q->p22 * sav;
                     if (fabs(c = cos(lamt)) < TOL)
@@ -156,33 +165,19 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(misrsom) {
     int path;
     double lam, alf, esc, ess;
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     path = pj_param(P->ctx, P->params, "ipath").i;
-    if (path <= 0 || path > 233) E_ERROR(-29);
+    if (path <= 0 || path > 233)
+        return pj_default_destructor(P, PJD_ERR_PATH_NOT_IN_RANGE);
+
     P->lam0 = DEG_TO_RAD * 129.3056 - M_TWOPI / 233. * path;
     alf = 98.30382 * DEG_TO_RAD;
     Q->p22 = 98.88 / 1440.0;
@@ -220,62 +215,3 @@ PJ *PROJECTION(misrsom) {
    return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_misrsom_selftest (void) {return 0;}
-#else
-
-int pj_misrsom_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=misrsom   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +path=1"};
-    char s_args[] = {"+proj=misrsom   +a=6400000    +lat_1=0.5 +lat_2=2 +path=1"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {18556630.3683698252, 9533394.6753112711},
-        {19041866.0067297369, 9707182.17532352544},
-        {18816810.1301847994, 8647669.64980295487},
-        {19252610.7845367305, 8778164.08580140397},
-    };
-
-    XY s_fwd_expect[] = {
-        {18641249.2791703865, 9563342.53233416565},
-        {19130982.4615812786, 9739539.59350463562},
-        {18903483.5150115378, 8675064.50061797537},
-        {19343388.3998006098, 8807471.90406848863},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {127.759503987730625,  0.00173515039622462014},
-        {127.761295471077958,  0.00187196632421706517},
-        {127.759775773557251, -0.00187196632421891525},
-        {127.76156725690457,  -0.00173515039622462014},
-    };
-
-    LP s_inv_expect[] = {
-        {127.75950514818588,   0.00171623111593511971},
-        {127.761290323778738,  0.00185412132880796244},
-        {127.759780920856471, -0.00185412132880796244},
-        {127.761566096449329, -0.00171623111593511971},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_mod_ster.c b/src/PJ_mod_ster.c
index 785285d..d807660 100644
--- a/src/PJ_mod_ster.c
+++ b/src/PJ_mod_ster.c
@@ -1,6 +1,7 @@
 /* based upon Snyder and Linck, USGS-NMD */
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(mil_os, "Miller Oblated Stereographic") "\n\tAzi(mod)";
 PROJ_HEAD(lee_os, "Lee Oblated Stereographic") "\n\tAzi(mod)";
@@ -11,7 +12,7 @@ PROJ_HEAD(gs50, "Mod. Stereographic of 50 U.S.") "\n\tAzi(mod)";
 #define EPSLN 1e-12
 
 struct pj_opaque {
-    COMPLEX *zcoeff; \
+    const COMPLEX *zcoeff; \
     double  cchio, schio; \
     int     n;
 };
@@ -46,7 +47,7 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     struct pj_opaque *Q = P->opaque;
     int nn;
     COMPLEX p, fxy, fpxy, dp;
-    double den, rh, z, sinz, cosz, chi, phi, dphi, esphi;
+    double den, rh = 0.0, z, sinz = 0.0, cosz = 0.0, chi, phi = 0.0, esphi;
 
     p.r = xy.x;
     p.i = xy.y;
@@ -69,12 +70,17 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
         cosz = cos(z);
         lp.lam = P->lam0;
         if (fabs(rh) <= EPSLN) {
+            /* if we end up here input coordinates were (0,0).
+             * pj_inv() adds P->lam0 to lp.lam, this way we are
+             * sure to get the correct offset */
+            lp.lam = 0.0;
             lp.phi = P->phi0;
             return lp;
         }
         chi = aasin(P->ctx, cosz * Q->schio + p.i * sinz * Q->cchio / rh);
         phi = chi;
         for (nn = 20; nn ;--nn) {
+            double dphi;
             esphi = P->e * sin(phi);
             dphi = 2. * atan(tan((M_HALFPI + chi) * .5) *
                 pow((1. + esphi) / (1. - esphi), P->e * .5)) - M_HALFPI - phi;
@@ -93,26 +99,11 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 static PJ *setup(PJ *P) { /* general initialization */
     struct pj_opaque *Q = P->opaque;
     double esphi, chio;
 
-    if (P->es) {
+    if (P->es != 0.0) {
         esphi = P->e * sin(P->phi0);
         chio = 2. * atan(tan((M_HALFPI + P->phi0) * .5) *
             pow((1. - esphi) / (1. + esphi), P->e * .5)) - M_HALFPI;
@@ -129,7 +120,7 @@ static PJ *setup(PJ *P) { /* general initialization */
 
 /* Miller Oblated Stereographic */
 PJ *PROJECTION(mil_os) {
-    static COMPLEX AB[] = {
+    static const COMPLEX AB[] = {
         {0.924500, 0.},
         {0.,       0.},
         {0.019430, 0.}
@@ -137,7 +128,7 @@ PJ *PROJECTION(mil_os) {
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->n = 2;
@@ -152,7 +143,7 @@ PJ *PROJECTION(mil_os) {
 
 /* Lee Oblated Stereographic */
 PJ *PROJECTION(lee_os) {
-    static COMPLEX AB[] = {
+    static const COMPLEX AB[] = {
         {0.721316,    0.},
         {0.,          0.},
         {-0.0088162, -0.00617325}
@@ -160,7 +151,7 @@ PJ *PROJECTION(lee_os) {
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->n = 2;
@@ -174,7 +165,7 @@ PJ *PROJECTION(lee_os) {
 
 
 PJ *PROJECTION(gs48) {
-    static COMPLEX /* 48 United States */
+    static const COMPLEX /* 48 United States */
     AB[] = {
         {0.98879,   0.},
         {0.,        0.},
@@ -185,12 +176,12 @@ PJ *PROJECTION(gs48) {
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->n = 4;
     P->lam0 = DEG_TO_RAD * -96.;
-    P->phi0 = DEG_TO_RAD * -39.;
+    P->phi0 = DEG_TO_RAD * 39.;
     Q->zcoeff = AB;
     P->es = 0.;
     P->a = 6370997.;
@@ -200,7 +191,7 @@ PJ *PROJECTION(gs48) {
 
 
 PJ *PROJECTION(alsk) {
-    static COMPLEX  ABe[] = { /* Alaska ellipsoid */
+    static const COMPLEX  ABe[] = { /* Alaska ellipsoid */
         { .9945303, 0.},
         { .0052083, -.0027404},
         { .0072721,  .0048181},
@@ -209,7 +200,7 @@ PJ *PROJECTION(alsk) {
         { .3582802, -.2884586},
     };
 
-    static COMPLEX ABs[] = { /* Alaska sphere */
+    static const COMPLEX ABs[] = { /* Alaska sphere */
         { .9972523, 0.},
         { .0052513, -.0041175},
         { .0074606,  .0048125},
@@ -220,13 +211,13 @@ PJ *PROJECTION(alsk) {
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->n = 5;
     P->lam0 = DEG_TO_RAD * -152.;
     P->phi0 = DEG_TO_RAD * 64.;
-    if (P->es) { /* fixed ellipsoid/sphere */
+    if (P->es != 0.0) { /* fixed ellipsoid/sphere */
         Q->zcoeff = ABe;
         P->a = 6378206.4;
         P->e = sqrt(P->es = 0.00676866);
@@ -240,7 +231,7 @@ PJ *PROJECTION(alsk) {
 
 
 PJ *PROJECTION(gs50) {
-    static COMPLEX  ABe[] = { /* GS50 ellipsoid */
+    static const COMPLEX  ABe[] = { /* GS50 ellipsoid */
         { .9827497, 0.},
         { .0210669,  .0053804},
         {-.1031415, -.0571664},
@@ -253,7 +244,7 @@ PJ *PROJECTION(gs50) {
         {-.0210072,  .0834037}
     };
 
-    static COMPLEX ABs[] = { /* GS50 sphere */
+    static const COMPLEX ABs[] = { /* GS50 sphere */
         { .9842990, 0.},
         { .0211642,  .0037608},
         {-.1036018, -.0575102},
@@ -268,13 +259,13 @@ PJ *PROJECTION(gs50) {
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->n = 9;
     P->lam0 = DEG_TO_RAD * -120.;
     P->phi0 = DEG_TO_RAD * 45.;
-    if (P->es) { /* fixed ellipsoid/sphere */
+    if (P->es != 0.0) { /* fixed ellipsoid/sphere */
         Q->zcoeff = ABe;
         P->a = 6378206.4;
         P->e = sqrt(P->es = 0.00676866);
@@ -286,256 +277,3 @@ PJ *PROJECTION(gs50) {
     return setup(P);
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_mil_os_selftest (void) {return 0;}
-#else
-
-int pj_mil_os_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=mil_os   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {-1908527.94959420455, -1726237.4730614475},
-        {-1916673.02291848511, -1943133.88812552323},
-        {-2344429.41208962305, -1706258.05121891224},
-        {-2354637.83553299867, -1926468.60513541684},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {20.0020363939492398, 18.0009683469140498},
-        {20.0020363715837419, 17.999031631815086},
-        {19.9979636060507602, 18.0009683469140498},
-        {19.9979636284162581, 17.999031631815086},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_lee_os_selftest (void) {return 0;}
-#else
-
-int pj_lee_os_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=lee_os   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {-25564478.9526050538, 154490848.8286255},
-        { 30115393.9385746419, 125193997.439701974},
-        {-31039340.5921660066,  57678685.0448915437},
-        {-3088419.93942357088,  58150091.0991110131},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {-164.997479457813824,  -9.99875886103541411},
-        {-164.997479438558884, -10.0012411200022751},
-        {-165.002520542186289,  -9.99875886103545142},
-        {-165.002520561440946, -10.0012411200022999},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_gs48_selftest (void) {return 0;}
-#else
-
-int pj_gs48_selftest (void) {
-    double tolerance_lp = 1e-12;
-    double tolerance_xy = 1e-8;
-
-    char s_args[] = {"+proj=gs48 +a=6370997"};
-
-    /* All latitudes and longitudes within the continental US */
-    LP fwd_in[] = {
-        { -119.0, 40.0},
-        {  -70.0, 64.0},
-        {  -80.0, 25.0},
-        {  -95.0, 35.0}
-    };
-
-    XY s_fwd_expect[] = {
-        {-12110635.970867658000, 11668127.145744404000},
-        { 55440975.381938063000, 52147696.705027729000},
-        {  4451809.270766614000,  8613528.123849634100},
-        {   468857.625827528540, 14336668.749030361000},
-    };
-
-    XY inv_in[] = {
-        {-11980000.0, 11570000.0},
-        {  5500000.0, 52000000.0},
-        {  4400000.0, 8600000.0},
-        {   460000.0, 14000000.0},
-    };
-
-    LP s_inv_expect[] = {
-        {-119.003821215898, 39.801671381755},
-        { -92.805621432558, 59.836947814918},
-        { -80.122548940303, 24.869675983950},
-        { -94.990474496482, 34.401182359832},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_alsk_selftest (void) {return 0;}
-#else
-
-int pj_alsk_selftest (void) {
-
-    /* The standard test points are way outside the definition area bounds, hence we relax tolerances */
-    double tolerance_lp = 1e-12;
-    double tolerance_xy = 1e-8;
-
-    char e_args[] = {"+proj=alsk +ellps=clrk66"};
-    char s_args[] = {"+proj=alsk +a=6370997"};
-
-    LP fwd_in[] = {
-        {-160.0, 55.0},
-        {-160.0, 70.0},
-        {-145.0, 70.0},
-        {-145.0, 60.0}
-    };
-
-    XY e_fwd_expect[] = {
-        {-513253.146950842060, -968928.031867943470},
-        {-305001.133897637190,  687494.464958650530},
-        {266454.305088600490,   683423.477493030950},
-        {389141.322439243960,  -423913.251230396680},
-    };
-
-    XY s_fwd_expect[] = {
-        {-511510.319410844070, -967150.991676078060},
-        {-303744.771290368980,  685439.745941123230},
-        {265354.974019662940,   681386.892874573010},
-        {387711.995394026630,  -422980.685505462640},
-    };
-
-    XY inv_in[] = {
-        {-500000.0, -950000.0},
-        {-305000.0,  700000.0},
-        { 250000.0,  700000.0},
-        { 400000.0, -400000.0}
-    };
-
-    LP e_inv_expect[] = {
-        {-159.830804302926, 55.183195262220},
-        {-160.042203155537, 70.111086864056},
-        {-145.381043551466, 70.163900908411},
-        {-144.758985461448, 60.202929200739},
-    };
-
-    LP s_inv_expect[] = {
-        {-159.854014457557, 55.165653849074},
-        {-160.082332371601, 70.128307617632},
-        {-145.347827407243, 70.181566919011},
-        {-144.734239827146, 60.193564732505},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_gs50_selftest (void) {return 0;}
-#else
-
-int pj_gs50_selftest (void) {
-    double tolerance_lp = 1e-12;
-    double tolerance_xy = 1e-8;
-
-    char e_args[] = {"+proj=gs50 +ellps=clrk66"};
-    char s_args[] = {"+proj=gs50 +a=6370997"};
-
-    LP fwd_in[] = {
-        {-160.0, 65.0},
-        {-130.0, 45.0},
-        { -65.0, 45.0},
-        { -80.0, 36.0},
-    };
-
-    XY e_fwd_expect[] = {
-        {-1874628.5377402329,   2660907.942291015300},
-        { -771831.51885333552,    48465.166491304852},
-        { 4030931.8339815089,   1323687.864777399200},
-        { 3450764.2615361013,   -175619.041820732440},
-    };
-
-    XY s_fwd_expect[] = {
-        {-1867268.2534600089,   2656506.230401823300},
-        { -769572.18967299373,    48324.312440863941},
-        { 4019393.068680791200, 1320191.309350289200},
-        { 3442685.615172345700, -178760.423489428680},
-    };
-
-    XY inv_in[] = {
-        {-1800000.0, 2600000.0},
-        { -800000.0,  500000.0},
-        { 4000000.0, 1300000.0},
-        { 3900000.0, -170000.0},
-    };
-
-    LP e_inv_expect[] = {
-        {-157.989284999679, 64.851559609698},
-        {-131.171390466814, 49.084969745967},
-        { -65.491568685301, 44.992837923774},
-        { -75.550660091101, 34.191114075743},
-    };
-
-    LP s_inv_expect[] = {
-        {-158.163295044933, 64.854288364994},
-        {-131.206816959506, 49.082915350974},
-        { -65.348945220767, 44.957292681774},
-        { -75.446820242089, 34.185406225616},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_moll.c b/src/PJ_moll.c
index b975cc7..66e6315 100644
--- a/src/PJ_moll.c
+++ b/src/PJ_moll.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(moll, "Mollweide") "\n\tPCyl., Sph.";
 PROJ_HEAD(wag4, "Wagner IV") "\n\tPCyl., Sph.";
@@ -51,23 +52,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 static PJ * setup(PJ *P, double p) {
     struct pj_opaque *Q = P->opaque;
     double r, sp, p2 = p + p;
@@ -89,7 +73,7 @@ static PJ * setup(PJ *P, double p) {
 PJ *PROJECTION(moll) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     return setup(P, M_HALFPI);
@@ -99,7 +83,7 @@ PJ *PROJECTION(moll) {
 PJ *PROJECTION(wag4) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     return setup(P, M_PI/3.);
@@ -108,7 +92,7 @@ PJ *PROJECTION(wag4) {
 PJ *PROJECTION(wag5) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     P->es = 0;
@@ -122,138 +106,3 @@ PJ *PROJECTION(wag5) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_moll_selftest (void) {return 0;}
-#else
-
-int pj_moll_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=moll   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {201113.698641813244,  124066.283433859542},
-        {201113.698641813244,  -124066.283433859542},
-        {-201113.698641813244,  124066.283433859542},
-        {-201113.698641813244,  -124066.283433859542},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.00198873782220854774,  0.000806005080362811612},
-        {0.00198873782220854774,  -0.000806005080362811612},
-        {-0.00198873782220854774,  0.000806005080362811612},
-        {-0.00198873782220854774,  -0.000806005080362811612},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_wag4_selftest (void) {return 0;}
-#else
-
-int pj_wag4_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wag4   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 192801.218662384286,  129416.216394802992},
-        { 192801.218662384286, -129416.216394802992},
-        {-192801.218662384286,  129416.216394802992},
-        {-192801.218662384286, -129416.216394802992},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00207450259783523421, 0.000772682950537716476},
-        { 0.00207450259783523421, -0.000772682950537716476},
-        {-0.00207450259783523421,  0.000772682950537716476},
-        {-0.00207450259783523421, -0.000772682950537716476},
-   };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-#endif
-
-#ifndef PJ_SELFTEST
-int pj_wag5_selftest (void) {return 0;}
-#else
-
-int pj_wag5_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wag5   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-
-    XY s_fwd_expect[] = {
-        { 203227.05192532466,  138651.631442713202},
-        { 203227.05192532466, -138651.631442713202},
-        {-203227.05192532466,  138651.631442713202},
-        {-203227.05192532466, -138651.631442713202},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-
-
-
-    LP s_inv_expect[] = {
-        { 0.00196807227086416396,  0.00072121615041701424},
-        { 0.00196807227086416396, -0.00072121615041701424},
-        {-0.00196807227086416396,  0.00072121615041701424},
-        {-0.00196807227086416396, -0.00072121615041701424},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_molodensky.c b/src/PJ_molodensky.c
new file mode 100644
index 0000000..b537e80
--- /dev/null
+++ b/src/PJ_molodensky.c
@@ -0,0 +1,314 @@
+/***********************************************************************
+
+                  (Abridged) Molodensky Transform
+
+                    Kristian Evers, 2017-07-07
+
+************************************************************************
+
+    Implements the (abridged) Molodensky transformations for 2D and 3D
+    data.
+
+    Primarily useful for implementation of datum shifts in transformation
+    pipelines.
+
+    The code in this file is mostly based on
+
+        The Standard and Abridged Molodensky Coordinate Transformation
+        Formulae, 2004, R.E. Deaking,
+        http://www.mygeodesy.id.au/documents/Molodensky%20V2.pdf
+
+
+
+************************************************************************
+* Copyright (c) 2017, Kristian Evers / SDFE
+*
+* 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.
+*
+***********************************************************************/
+#define PJ_LIB__
+#include <errno.h>
+#include <proj.h>
+#include "proj_internal.h"
+#include "projects.h"
+
+PROJ_HEAD(molodensky, "Molodensky transform");
+
+static XYZ forward_3d(LPZ lpz, PJ *P);
+static LPZ reverse_3d(XYZ xyz, PJ *P);
+
+struct pj_opaque_molodensky {
+    double dx;
+    double dy;
+    double dz;
+    double da;
+    double df;
+    int    abridged;
+};
+
+
+static double RN (double a, double es, double phi) {
+/**********************************************************
+    N(phi) - prime vertical radius of curvature
+    -------------------------------------------
+
+    This is basically the same function as in PJ_cart.c
+    should probably be refactored into it's own file at some
+    point.
+
+**********************************************************/
+    double s = sin(phi);
+    if (es==0)
+        return a;
+
+    return a / sqrt (1 - es*s*s);
+}
+
+
+static double RM (double a, double es, double phi) {
+/**********************************************************
+    M(phi) - Meridian radius of curvature
+    -------------------------------------
+
+    Source:
+
+        E.J Krakiwsky & D.B. Thomson, 1974,
+        GEODETIC POSITION COMPUTATIONS,
+
+        Fredericton NB, Canada:
+        University of New Brunswick,
+        Department of Geodesy and Geomatics Engineering,
+        Lecture Notes No. 39,
+        99 pp.
+
+        http://www2.unb.ca/gge/Pubs/LN39.pdf
+
+**********************************************************/
+    double s = sin(phi);
+    if (es==0)
+        return a;
+
+    /* eq. 13a */
+    if (phi == 0)
+        return a * (1-es);
+
+    /* eq. 13b */
+    if (fabs(phi) == M_PI_2)
+        return a / sqrt(1-es);
+
+    /* eq. 13 */
+    return (a * (1 - es) ) / pow(1 - es*s*s, 1.5);
+
+}
+
+
+static LPZ calc_standard_params(LPZ lpz, PJ *P) {
+    struct pj_opaque_molodensky *Q = (struct pj_opaque_molodensky *) P->opaque;
+    double dphi, dlam, dh;
+
+    /* sines and cosines */
+    double slam = sin(lpz.lam);
+    double clam = cos(lpz.lam);
+    double sphi = sin(lpz.phi);
+    double cphi = cos(lpz.phi);
+
+    /* ellipsoid parameters and differences */
+    double f = P->f, a = P->a;
+    double dx = Q->dx, dy = Q->dy, dz = Q->dz;
+    double da = Q->da, df = Q->df;
+
+    /* ellipsoid radii of curvature */
+    double rho = RM(a, P->es, lpz.phi);
+    double nu  = RN(a, P->e2s, lpz.phi);
+
+    /* delta phi */
+    dphi  = (-dx*sphi*clam) - (dy*sphi*slam) + (dz*cphi)
+            + ((nu * P->es * sphi * cphi * da) / a)
+            + (sphi*cphi * ( rho/(1-f) + nu*(1-f))*df);
+    dphi /= (rho + lpz.z);
+
+    /* delta lambda */
+    dlam = (-dx*slam + dy*clam) / ((nu+lpz.z)*cphi);
+
+    /* delta h */
+    dh = dx*cphi*clam + dy*cphi*slam + dz*sphi - (a/nu)*da + nu*(1-f)*sphi*sphi*df;
+
+    lpz.phi = dphi;
+    lpz.lam = dlam;
+    lpz.z   = dh;
+
+    return lpz;
+}
+
+
+static LPZ calc_abridged_params(LPZ lpz, PJ *P) {
+    struct pj_opaque_molodensky *Q = (struct pj_opaque_molodensky *) P->opaque;
+    double dphi, dlam, dh;
+
+    /* sines and cosines */
+    double slam = sin(lpz.lam);
+    double clam = cos(lpz.lam);
+    double sphi = sin(lpz.phi);
+    double cphi = cos(lpz.phi);
+
+    /* ellipsoid parameters and differences */
+    double dx = Q->dx, dy = Q->dy, dz = Q->dz;
+    double da = Q->da, df = Q->df;
+    double adffda = (P->a*df + P->f*da);
+
+    /* delta phi */
+    dphi = -dx*sphi*clam - dy*sphi*slam + dz*cphi + adffda*sin(2*lpz.phi);
+    dphi /= RM(P->a, P->es, lpz.phi);
+
+    /* delta lambda */
+    dlam = -dx*slam + dy*clam;
+    dlam /= RN(P->a, P->e2s, lpz.phi)*cphi;
+
+    /* delta h */
+    dh = dx*cphi*clam + dy*cphi*slam + dz*sphi - da + adffda*sphi*sphi;
+
+    /* offset coordinate */
+    lpz.phi = dphi;
+    lpz.lam = dlam;
+    lpz.z   = dh;
+
+    return lpz;
+}
+
+
+static XY forward_2d(LP lp, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+
+    point.lp = lp;
+    point.xyz = forward_3d(point.lpz, P);
+
+    return point.xy;
+}
+
+
+static LP reverse_2d(XY xy, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+
+    point.xy = xy;
+    point.xyz.z = 0;
+    point.lpz = reverse_3d(point.xyz, P);
+
+    return point.lp;
+}
+
+
+static XYZ forward_3d(LPZ lpz, PJ *P) {
+    struct pj_opaque_molodensky *Q = (struct pj_opaque_molodensky *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+
+    point.lpz = lpz;
+
+    /* calculate parameters depending on the mode we are in */
+    if (Q->abridged) {
+        lpz = calc_abridged_params(lpz, P);
+    } else {
+        lpz = calc_standard_params(lpz, P);
+    }
+
+    /* offset coordinate */
+    point.lpz.phi += lpz.phi;
+    point.lpz.lam += lpz.lam;
+    point.lpz.z   += lpz.z;
+
+    return point.xyz;
+}
+
+
+static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) {
+    obs.xyz = forward_3d(obs.lpz, P);
+    return obs;
+}
+
+
+static LPZ reverse_3d(XYZ xyz, PJ *P) {
+    struct pj_opaque_molodensky *Q = (struct pj_opaque_molodensky *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+    LPZ lpz;
+
+    /* calculate parameters depending on the mode we are in */
+    point.xyz = xyz;
+    if (Q->abridged)
+        lpz = calc_abridged_params(point.lpz, P);
+    else
+        lpz = calc_standard_params(point.lpz, P);
+
+    /* offset coordinate */
+    point.lpz.phi -= lpz.phi;
+    point.lpz.lam -= lpz.lam;
+    point.lpz.z   -= lpz.z;
+
+    return point.lpz;
+}
+
+
+static PJ_COORD reverse_4d(PJ_COORD obs, PJ *P) {
+    obs.lpz = reverse_3d(obs.xyz, P);
+    return obs;
+}
+
+
+PJ *TRANSFORMATION(molodensky,1) {
+    struct pj_opaque_molodensky *Q = pj_calloc(1, sizeof(struct pj_opaque_molodensky));
+    if (0==Q)
+        return pj_default_destructor(P, ENOMEM);
+    P->opaque = (void *) Q;
+
+    P->fwd4d = forward_4d;
+    P->inv4d = reverse_4d;
+    P->fwd3d  = forward_3d;
+    P->inv3d  = reverse_3d;
+    P->fwd    = forward_2d;
+    P->inv    = reverse_2d;
+
+    P->left   = PJ_IO_UNITS_ANGULAR;
+    P->right  = PJ_IO_UNITS_ANGULAR;
+
+    /* read args */
+    if (pj_param(P->ctx, P->params, "tdx").i)
+        Q->dx = pj_param(P->ctx, P->params, "ddx").f;
+
+    if (pj_param(P->ctx, P->params, "tdy").i)
+        Q->dy = pj_param(P->ctx, P->params, "ddy").f;
+
+    if (pj_param(P->ctx, P->params, "tdz").i)
+        Q->dz = pj_param(P->ctx, P->params, "ddz").f;
+
+    if (pj_param(P->ctx, P->params, "tda").i)
+        Q->da = pj_param(P->ctx, P->params, "dda").f;
+
+    if (pj_param(P->ctx, P->params, "tdf").i)
+        Q->df = pj_param(P->ctx, P->params, "ddf").f;
+
+    Q->abridged = pj_param(P->ctx, P->params, "tabridged").i;
+
+    /* We want all parameters (except +abridged) to be set */
+    if ((Q->dx == 0) && (Q->dy == 0) && (Q->dz == 0) && (Q->da == 0) && (Q->df == 0))
+        return pj_default_destructor(P, PJD_ERR_NO_ARGS);
+
+    if ((Q->dx == 0) || (Q->dy == 0) || (Q->dz == 0) || (Q->da == 0) || (Q->df == 0))
+        return pj_default_destructor(P, PJD_ERR_MISSING_ARGS);
+
+    return P;
+}
+
diff --git a/src/PJ_natearth.c b/src/PJ_natearth.c
index 22bf340..10abb23 100644
--- a/src/PJ_natearth.c
+++ b/src/PJ_natearth.c
@@ -13,7 +13,7 @@ and designed in collaboration with Tom Patterson.
 Port to PROJ.4 by Bernhard Jenny, 6 June 2011
 */
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(natearth, "Natural Earth") "\n\tPCyl., Sph.";
 
@@ -34,6 +34,8 @@ PROJ_HEAD(natearth, "Natural Earth") "\n\tPCyl., Sph.";
 #define C4 (11 * B4)
 #define EPS 1e-11
 #define MAX_Y (0.8707 * 0.52 * M_PI)
+/* Not sure at all of the appropriate number for MAX_ITER... */
+#define MAX_ITER 100
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
@@ -52,6 +54,7 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     double yc, tol, y2, y4, f, fder;
+    int i;
     (void) P;
 
     /* make sure y is inside valid range */
@@ -63,7 +66,7 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 
     /* latitude */
     yc = xy.y;
-        for (;;) { /* Newton-Raphson */
+    for (i = MAX_ITER; i ; --i) { /* Newton-Raphson */
         y2 = yc * yc;
         y4 = y2 * y2;
         f = (yc * (B0 + y2 * (B1 + y4 * (B2 + B3 * y2 + B4 * y4)))) - xy.y;
@@ -73,6 +76,8 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
             break;
         }
     }
+    if( i == 0 )
+        pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
     lp.phi = yc;
 
     /* longitude */
@@ -83,20 +88,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(natearth) {
     P->es = 0;
     P->inv = s_inverse;
@@ -105,46 +96,3 @@ PJ *PROJECTION(natearth) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_natearth_selftest (void) {return 0;}
-#else
-
-int pj_natearth_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=natearth   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 194507.265257889288,  112508.737358294515},
-        { 194507.265257889288, -112508.737358294515},
-        {-194507.265257889288,  112508.737358294515},
-        {-194507.265257889288, -112508.737358294515},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00205638349586440223,  0.000888823913291242177},
-        { 0.00205638349586440223, -0.000888823913291242177},
-        {-0.00205638349586440223,  0.000888823913291242177},
-        {-0.00205638349586440223, -0.000888823913291242177},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_natearth2.c b/src/PJ_natearth2.c
index 9cd93fd..dbdc8fe 100644
--- a/src/PJ_natearth2.c
+++ b/src/PJ_natearth2.c
@@ -6,7 +6,7 @@ and Atmospheric Sciences, Oregon State University.
 Port to PROJ.4 by Bojan Savric, 4 April 2016
 */
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(natearth2, "Natural Earth 2") "\n\tPCyl., Sph.";
 
@@ -26,6 +26,8 @@ PROJ_HEAD(natearth2, "Natural Earth 2") "\n\tPCyl., Sph.";
 #define C3 (13 * B3)
 #define EPS 1e-11
 #define MAX_Y (0.84719 * 0.535117535153096 * M_PI)
+/* Not sure at all of the appropriate number for MAX_ITER... */
+#define MAX_ITER 100
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
@@ -46,6 +48,7 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     double yc, tol, y2, y4, y6, f, fder;
+    int i;
     (void) P;
 
     /* make sure y is inside valid range */
@@ -57,7 +60,7 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 
     /* latitude */
     yc = xy.y;
-    for (;;) { /* Newton-Raphson */
+    for (i = MAX_ITER; i ; --i) { /* Newton-Raphson */
         y2 = yc * yc;
         y4 = y2 * y2;
         f = (yc * (B0 + y4 * y4 * (B1 + B2 * y2 + B3 * y4))) - xy.y;
@@ -67,6 +70,8 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
             break;
         }
     }
+    if( i == 0 )
+        pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
     lp.phi = yc;
 
     /* longitude */
@@ -80,20 +85,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(natearth2) {
     P->es = 0;
     P->inv = s_inverse;
@@ -102,46 +93,3 @@ PJ *PROJECTION(natearth2) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_natearth2_selftest (void) {return 0;}
-#else
-
-int pj_natearth2_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=natearth2   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 189255.172934730799,  113022.495810907014},
-        { 189255.172934730799, -113022.495810907014},
-        {-189255.172934730799,  113022.495810907014},
-        {-189255.172934730799, -113022.495810907014},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00211344929691056112,  0.000884779612080993237},
-        { 0.00211344929691056112, -0.000884779612080993237},
-        {-0.00211344929691056112,  0.000884779612080993237},
-        {-0.00211344929691056112, -0.000884779612080993237},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_nell.c b/src/PJ_nell.c
index 1b6af01..51f9f99 100644
--- a/src/PJ_nell.c
+++ b/src/PJ_nell.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(nell, "Nell") "\n\tPCyl., Sph.";
 
@@ -38,20 +38,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(nell) {
 
     P->es = 0;
@@ -61,46 +47,3 @@ PJ *PROJECTION(nell) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_nell_selftest (void) {return 0;}
-#else
-
-int pj_nell_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=nell   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223385.132504695706,  111698.23644718733},
-        { 223385.132504695706, -111698.23644718733},
-        {-223385.132504695706,  111698.23644718733},
-        {-223385.132504695706, -111698.23644718733},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049310989310567,  0.000895246554910125161},
-        { 0.00179049310989310567, -0.000895246554910125161},
-        {-0.00179049310989310567,  0.000895246554910125161},
-        {-0.00179049310989310567, -0.000895246554910125161},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_nell_h.c b/src/PJ_nell_h.c
index dfad72b..2495778 100644
--- a/src/PJ_nell_h.c
+++ b/src/PJ_nell_h.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(nell_h, "Nell-Hammer") "\n\tPCyl., Sph.";
 
@@ -41,20 +41,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(nell_h) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -63,47 +49,3 @@ PJ *PROJECTION(nell_h) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_nell_h_selftest (void) {return 0;}
-#else
-
-int pj_nell_h_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=nell_h   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223385.131640952837,  111698.236533561678},
-        { 223385.131640952837, -111698.236533561678},
-        {-223385.131640952837,  111698.236533561678},
-        {-223385.131640952837, -111698.236533561678},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049310989310567,  0.000895246554910125378},
-        { 0.00179049310989310567, -0.000895246554910125378},
-        {-0.00179049310989310567,  0.000895246554910125378},
-        {-0.00179049310989310567, -0.000895246554910125378},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_nocol.c b/src/PJ_nocol.c
index 88836a1..13688a9 100644
--- a/src/PJ_nocol.c
+++ b/src/PJ_nocol.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(nicol, "Nicolosi Globular") "\n\tMisc Sph, no inv.";
 
@@ -43,20 +43,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(nicol) {
     P->es = 0.;
     P->fwd = s_forward;
@@ -64,33 +50,3 @@ PJ *PROJECTION(nicol) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_nicol_selftest (void) {return 0;}
-#else
-
-int pj_nicol_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=nicol   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223374.561814139714,  111732.553988545071},
-        { 223374.561814139714, -111732.553988545071},
-        {-223374.561814139714,  111732.553988545071},
-        {-223374.561814139714, -111732.553988545071},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_nsper.c b/src/PJ_nsper.c
index 014c711..0b3a1d1 100644
--- a/src/PJ_nsper.c
+++ b/src/PJ_nsper.c
@@ -1,5 +1,14 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
+
+enum Mode {
+    N_POLE = 0,
+    S_POLE = 1,
+    EQUIT  = 2,
+    OBLIQ  = 3
+};
 
 struct pj_opaque {
     double  height;
@@ -14,7 +23,7 @@ struct pj_opaque {
     double  sg;
     double  sw;
     double  cw;
-    int     mode;
+    enum Mode mode;
     int     tilt;
 };
 
@@ -22,10 +31,6 @@ PROJ_HEAD(nsper, "Near-sided perspective") "\n\tAzi, Sph\n\th=";
 PROJ_HEAD(tpers, "Tilted perspective") "\n\tAzi, Sph\n\ttilt= azi= h=";
 
 # define EPS10 1.e-10
-# define N_POLE 0
-# define S_POLE 1
-# define EQUIT  2
-# define OBLIQ  3
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
@@ -50,7 +55,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
         xy.y = sinphi;
         break;
     }
-    if (xy.y < Q->rp) F_ERROR;
+    if (xy.y < Q->rp) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
     xy.y = Q->pn1 / (Q->p - xy.y);
     xy.x = xy.y * cosphi * sin(lp.lam);
     switch (Q->mode) {
@@ -63,6 +71,7 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
         break;
     case N_POLE:
         coslam = - coslam;
+        /*-fallthrough*/
     case S_POLE:
         xy.y *= cosphi * coslam;
         break;
@@ -94,7 +103,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
         xy.y = bq * Q->cg - bm * Q->sg;
     }
     rh = hypot(xy.x, xy.y);
-    if ((sinz = 1. - rh * rh * Q->pfact) < 0.) I_ERROR;
+    if ((sinz = 1. - rh * rh * Q->pfact) < 0.) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
     sinz = (Q->p - sqrt(sinz)) / (Q->pn1 / rh + rh / Q->pn1);
     cosz = sqrt(1. - sinz * sinz);
     if (fabs(rh) <= EPS10) {
@@ -126,26 +138,12 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 static PJ *setup(PJ *P) {
     struct pj_opaque *Q = P->opaque;
 
-    if ((Q->height = pj_param(P->ctx, P->params, "dh").f) <= 0.) E_ERROR(-30);
+    if ((Q->height = pj_param(P->ctx, P->params, "dh").f) <= 0.)
+        return pj_default_destructor(P, PJD_ERR_H_LESS_THAN_ZERO);
+
     if (fabs(fabs(P->phi0) - M_HALFPI) < EPS10)
         Q->mode = P->phi0 < 0. ? S_POLE : N_POLE;
     else if (fabs(P->phi0) < EPS10)
@@ -163,6 +161,7 @@ static PJ *setup(PJ *P) {
     P->inv = s_inverse;
     P->fwd = s_forward;
     P->es = 0.;
+
     return P;
 }
 
@@ -170,7 +169,7 @@ static PJ *setup(PJ *P) {
 PJ *PROJECTION(nsper) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->tilt = 0;
@@ -184,7 +183,7 @@ PJ *PROJECTION(tpers) {
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     omega = pj_param(P->ctx, P->params, "dtilt").f * DEG_TO_RAD;
@@ -196,92 +195,3 @@ PJ *PROJECTION(tpers) {
     return setup(P);
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_nsper_selftest (void) {return 0;}
-#else
-
-int pj_nsper_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=nsper   +a=6400000  +h=1000000"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 222239.816114099842,  111153.763991924759},
-        { 222239.816114099842, -111153.763991924759},
-        {-222239.816114099842,  111153.763991924759},
-        {-222239.816114099842, -111153.763991924759},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049311728792437,  0.000895246558425396135},
-        { 0.00179049311728792437, -0.000895246558425396135},
-        {-0.00179049311728792437,  0.000895246558425396135},
-        {-0.00179049311728792437, -0.000895246558425396135},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_tpers_selftest (void) {return 0;}
-#else
-
-int pj_tpers_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=tpers   +a=6400000  +h=1000000 +azi=20"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 170820.288955531199,  180460.865555804776},
-        { 246853.941538942483, -28439.8780357754222},
-        {-246853.941538942483,  28439.8780357754222},
-        {-170820.288955531199, -180460.865555804776}
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00198870552603137678,  0.000228871872278689991},
-        { 0.00137632081376749859, -0.00145364129728205432},
-        {-0.00137632081376749859,  0.00145364129728205432},
-        {-0.00198870552603137678, -0.000228871872278689991},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_nzmg.c b/src/PJ_nzmg.c
index 6c70550..b30deab 100644
--- a/src/PJ_nzmg.c
+++ b/src/PJ_nzmg.c
@@ -26,7 +26,7 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(nzmg, "New Zealand Map Grid") "\n\tfixed Earth";
 
@@ -34,7 +34,7 @@ PROJ_HEAD(nzmg, "New Zealand Map Grid") "\n\tfixed Earth";
 #define SEC5_TO_RAD 0.4848136811095359935899141023
 #define RAD_TO_SEC5 2.062648062470963551564733573
 
-static COMPLEX bf[] = {
+static const COMPLEX bf[] = {
     { .7557853228, 0.0},
     { .249204646,  0.003371507},
     {-.001541739,  0.041058560},
@@ -42,12 +42,12 @@ static COMPLEX bf[] = {
     {-.26623489,  -0.36249218},
     {-.6870983,   -1.1651967} };
 
-static double tphi[] = { 1.5627014243, .5185406398, -.03333098,
-                         -.1052906,   -.0368594,     .007317,
-                          .01220,      .00394,      -.0013 };
+static const double tphi[] = { 1.5627014243, .5185406398, -.03333098,
+                               -.1052906,   -.0368594,     .007317,
+                                .01220,      .00394,      -.0013 };
 
-static double tpsi[] = { .6399175073, -.1358797613, .063294409, -.02526853, .0117879,
-                        -.0055161,     .0026906,   -.001333,     .00067,   -.00034 };
+static const double tpsi[] = { .6399175073, -.1358797613, .063294409, -.02526853, .0117879,
+                              -.0055161,     .0026906,   -.001333,     .00067,   -.00034 };
 
 #define Nbf 5
 #define Ntpsi 9
@@ -57,7 +57,7 @@ static double tpsi[] = { .6399175073, -.1358797613, .063294409, -.02526853, .011
 static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     XY xy = {0.0,0.0};
     COMPLEX p;
-    double *C;
+    const double *C;
     int i;
 
     lp.phi = (lp.phi - P->phi0) * RAD_TO_SEC5;
@@ -77,7 +77,8 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     LP lp = {0.0,0.0};
     int nn, i;
     COMPLEX p, f, fp, dp;
-    double den, *C;
+    double den;
+    const double *C;
 
     p.r = xy.y;
     p.i = xy.x;
@@ -103,19 +104,6 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(nzmg) {
     /* force to International major axis */
     P->ra = 1. / (P->a = 6378388.0);
@@ -131,47 +119,3 @@ PJ *PROJECTION(nzmg) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_nzmg_selftest (void) {return 0;}
-#else
-
-int pj_nzmg_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=nzmg   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {3352675144.74742508,  -7043205391.10024357},
-        {3691989502.77930641,  -6729069415.33210468},
-        {4099000768.45323849,  -7863208779.66724873},
-        {4466166927.36997604,  -7502531736.62860489},
-    };
-
-    XY inv_in[] = {
-        { 200000, 100000},
-        { 200000,-100000},
-        {-200000, 100000},
-        {-200000,-100000}
-    };
-
-    LP e_inv_expect[] = {
-        {175.48208682711271,  -69.4226921826331846},
-        {175.756819472543611, -69.5335710883796168},
-        {134.605119233460016, -61.4599957106629091},
-        {134.333684315954827, -61.6215536756024349},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c
index b0c22f6..c447ac0 100644
--- a/src/PJ_ob_tran.c
+++ b/src/PJ_ob_tran.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 #include <string.h>
 
 struct pj_opaque {
@@ -79,73 +81,122 @@ static LP t_inverse(XY xy, PJ *P) {             /* spheroid */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor(PJ *P, int errlev) {
     if (0==P)
         return 0;
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
     if (P->opaque->link)
-        return pj_dealloc (P->opaque->link);
+        P->opaque->link->destructor (P->opaque->link, errlev);
 
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
+    return pj_default_destructor(P, errlev);
 }
 
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+
+
+/***********************************************************************
+
+These functions are modified versions of the functions "argc_params"
+and "argv_params" from PJ_pipeline.c
+
+Basically, they do the somewhat backwards stunt of turning the paralist
+representation of the +args back into the original +argv, +argc
+representation accepted by pj_init_ctx().
+
+This, however, also begs the question of whether we really need the
+paralist linked list representation, or if we could do with a simpler
+null-terminated argv style array? This would simplfy some code, and
+keep memory allocations more localized.
+
+***********************************************************************/
+
+typedef struct {int argc; char **argv;} ARGS;
+
+/* count the number of args in the linked list <params> */
+static size_t paralist_params_argc (paralist *params) {
+    size_t argc = 0;
+    for (; params != 0; params = params->next)
+        argc++;
+    return argc;
 }
 
 
+/* turn paralist into argc/argv style argument list */
+static ARGS ob_tran_target_params (paralist *params) {
+    int i = 0;
+    ARGS args = {0, 0};
+    size_t argc = paralist_params_argc (params);
+    if (argc < 2)
+        return args;
+
+    /* all args except the proj_ob_tran */
+    args.argv = pj_calloc (argc - 1, sizeof (char *));
+    if (0==args.argv)
+        return args;
+
+    /* Copy all args *except* the proj=ob_tran arg to the argv array */
+    for (i = 0;  params != 0;  params = params->next) {
+        if (0==strcmp (params->param, "proj=ob_tran"))
+            continue;
+        args.argv[i++] = params->param;
+    }
+    args.argc = i;
+
+    /* Then convert the o_proj=xxx element to proj=xxx */
+    for (i = 0;   i < args.argc;   i++) {
+        if (0!=strncmp (args.argv[i], "o_proj=", 7))
+            continue;
+        args.argv[i] += 2;
+        break;
+    }
+
+    return args;
+}
+
+
+
 PJ *PROJECTION(ob_tran) {
-    int i;
     double phip;
-    char *name, *s;
+    char *name;
+    ARGS args;
+    PJ *R; /* projection to rotate */
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return destructor(P, ENOMEM);
+
     P->opaque = Q;
+    P->destructor = destructor;
 
     /* get name of projection to be translated */
-    if (!(name = pj_param(P->ctx, P->params, "so_proj").s)) E_ERROR(-26);
-    for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ;
-    if (!s || !(Q->link = (*pj_list[i].proj)(0))) E_ERROR(-37);
-    /* copy existing header into new */
-    P->es = 0.; /* force to spherical */
-    Q->link->params = P->params;
-    Q->link->ctx = P->ctx;
-    Q->link->over = P->over;
-    Q->link->geoc = P->geoc;
-    Q->link->a = P->a;
-    Q->link->es = P->es;
-    Q->link->ra = P->ra;
-    Q->link->lam0 = P->lam0;
-    Q->link->phi0 = P->phi0;
-    Q->link->x0 = P->x0;
-    Q->link->y0 = P->y0;
-    Q->link->k0 = P->k0;
-    /* force spherical earth */
-    Q->link->one_es = Q->link->rone_es = 1.;
-    Q->link->es = Q->link->e = 0.;
-    if (!(Q->link = pj_list[i].proj(Q->link))) {
-        return freeup_new(P);
-    }
+    if (!(name = pj_param(P->ctx, P->params, "so_proj").s))
+        return destructor(P, PJD_ERR_NO_ROTATION_PROJ);
+
+    /* avoid endless recursion */
+    if( strcmp(name, "ob_tran") == 0 )
+        return destructor(P, PJD_ERR_FAILED_TO_FIND_PROJ);
+
+    /* Create the target projection object to rotate */
+    args = ob_tran_target_params (P->params);
+    R = pj_init_ctx (pj_get_ctx(P), args.argc, args.argv);
+    pj_dealloc (args.argv);
+
+    if (0==R)
+        return destructor (P, PJD_ERR_UNKNOWN_PROJECTION_ID);
+    Q->link = R;
+
     if (pj_param(P->ctx, P->params, "to_alpha").i) {
         double lamc, phic, alpha;
 
         lamc    = pj_param(P->ctx, P->params, "ro_lon_c").f;
         phic    = pj_param(P->ctx, P->params, "ro_lat_c").f;
         alpha   = pj_param(P->ctx, P->params, "ro_alpha").f;
-/*
-        if (fabs(phic) <= TOL ||
-            fabs(fabs(phic) - HALFPI) <= TOL ||
-            fabs(fabs(alpha) - HALFPI) <= TOL)
-*/
+
         if (fabs(fabs(phic) - M_HALFPI) <= TOL)
-            E_ERROR(-32);
+            return destructor(P, PJD_ERR_LAT_0_OR_ALPHA_EQ_90);
+
         Q->lamp = lamc + aatan2(-cos(alpha), -sin(alpha) * sin(phic));
         phip = aasin(P->ctx,cos(phic) * sin(alpha));
     } else if (pj_param(P->ctx, P->params, "to_lat_p").i) { /* specified new pole */
@@ -158,68 +209,33 @@ PJ *PROJECTION(ob_tran) {
         phi1 = pj_param(P->ctx, P->params, "ro_lat_1").f;
         lam2 = pj_param(P->ctx, P->params, "ro_lon_2").f;
         phi2 = pj_param(P->ctx, P->params, "ro_lat_2").f;
-        if (fabs(phi1 - phi2) <= TOL ||
-            (con = fabs(phi1)) <= TOL ||
-            fabs(con - M_HALFPI) <= TOL ||
-            fabs(fabs(phi2) - M_HALFPI) <= TOL) E_ERROR(-33);
+        if (fabs(phi1 - phi2) <= TOL || (con = fabs(phi1)) <= TOL ||
+            fabs(con - M_HALFPI) <= TOL || fabs(fabs(phi2) - M_HALFPI) <= TOL)
+                return destructor(P, PJD_ERR_LAT_1_OR_2_ZERO_OR_90);
+
         Q->lamp = atan2(cos(phi1) * sin(phi2) * cos(lam1) -
             sin(phi1) * cos(phi2) * cos(lam2),
             sin(phi1) * cos(phi2) * sin(lam2) -
             cos(phi1) * sin(phi2) * sin(lam1));
         phip = atan(-cos(Q->lamp - lam1) / tan(phi1));
     }
+
     if (fabs(phip) > TOL) { /* oblique */
         Q->cphip = cos(phip);
         Q->sphip = sin(phip);
-        P->fwd = o_forward;
+        P->fwd = Q->link->fwd ? o_forward : 0;
         P->inv = Q->link->inv ? o_inverse : 0;
     } else { /* transverse */
-        P->fwd = t_forward;
+        P->fwd = Q->link->fwd ? t_forward : 0;
         P->inv = Q->link->inv ? t_inverse : 0;
     }
 
-    return P;
-}
+    /* Support some rather speculative test cases, where the rotated projection */
+    /* is actually latlong. We do not want scaling in that case... */
+    if (Q->link->right==PJ_IO_UNITS_ANGULAR)
+        P->right = PJ_IO_UNITS_PROJECTED;
+
 
-#ifndef PJ_SELFTEST
-int pj_ob_tran_selftest (void) {return 0;}
-#else
-
-int pj_ob_tran_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=ob_tran +a=6400000 +o_proj=latlon +o_lon_p=20 +o_lat_p=20 +lon_0=180"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {-2.6856872138416592, 1.2374302350496296},
-        {-2.6954069748943286, 1.2026833954513816},
-        {-2.8993663925401947, 1.2374302350496296},
-        {-2.8896466314875244, 1.2026833954513816},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 121.5518748407577,  -2.5361001573966084},
-        { 63.261184340201858,  17.585319578673531},
-        {-141.10073322351622,  26.091712304855108},
-        {-65.862385598848391,  51.830295078417215},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
+    return P;
 }
 
-#endif
diff --git a/src/PJ_ocea.c b/src/PJ_ocea.c
index e77ae54..3376018 100644
--- a/src/PJ_ocea.c
+++ b/src/PJ_ocea.c
@@ -1,4 +1,5 @@
 #define PJ_LIB__
+#include <errno.h>
 #include <projects.h>
 
 PROJ_HEAD(ocea, "Oblique Cylindrical Equal Area") "\n\tCyl, Sph"
@@ -18,7 +19,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
     double t;
-
     xy.y = sin(lp.lam);
     t = cos(lp.lam);
     xy.x = atan((tan(lp.phi) * Q->cosphi + Q->sinphi * xy.y) / t);
@@ -45,32 +45,16 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(ocea) {
     double phi_0=0.0, phi_1, phi_2, lam_1, lam_2, lonz, alpha;
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
-    Q->rok = P->a / P->k0;
-    Q->rtk = P->a * P->k0;
+    Q->rok = 1. / P->k0;
+    Q->rtk = P->k0;
     /*If the keyword "alpha" is found in the sentence then use 1point+1azimuth*/
     if ( pj_param(P->ctx, P->params, "talpha").i) {
         /*Define Pole of oblique transformation from 1 point & 1 azimuth*/
@@ -92,6 +76,11 @@ PJ *PROJECTION(ocea) {
             sin(phi_1) * cos(phi_2) * cos(lam_2),
             sin(phi_1) * cos(phi_2) * sin(lam_2) -
             cos(phi_1) * sin(phi_2) * sin(lam_1) );
+
+        /* take care of P->lam0 wrap-around when +lam_1=-90*/
+        if (lam_1 == -M_HALFPI)
+            Q->singam = -Q->singam;
+
         /*Equation 9-2 page 80 (http://pubs.usgs.gov/pp/1395/report.pdf)*/
         Q->sinphi = atan(-cos(Q->singam - lam_1) / tan(phi_1));
     }
@@ -107,47 +96,3 @@ PJ *PROJECTION(ocea) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_ocea_selftest (void) {return 0;}
-#else
-
-int pj_ocea_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=ocea   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {127964312562778.156,  1429265667691.05786},
-        {129394957619297.641,  1429265667691.06812},
-        {127964312562778.188, -1429265667691.0498},
-        {129394957619297.688, -1429265667691.03955},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 179.999999999860108,  2.79764548403721305e-10},
-        {-179.999999999860108,  2.7976454840372327e-10},
-        { 179.999999999860108, -2.7976454840372327e-10},
-        {-179.999999999860108, -2.79764548403721305e-10},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_oea.c b/src/PJ_oea.c
index 1ad8ddb..58ea7e9 100644
--- a/src/PJ_oea.c
+++ b/src/PJ_oea.c
@@ -1,140 +1,84 @@
 #define PJ_LIB__
-#include	<projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(oea, "Oblated Equal Area") "\n\tMisc Sph\n\tn= m= theta=";
 
 struct pj_opaque {
-	double	theta;
-	double	m, n;
-	double	two_r_m, two_r_n, rm, rn, hm, hn;
-	double	cp0, sp0;
+    double  theta;
+    double  m, n;
+    double  two_r_m, two_r_n, rm, rn, hm, hn;
+    double  cp0, sp0;
 };
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double Az, M, N, cp, sp, cl, shz;
-
-	cp = cos(lp.phi);
-	sp = sin(lp.phi);
-	cl = cos(lp.lam);
-	Az = aatan2(cp * sin(lp.lam), Q->cp0 * sp - Q->sp0 * cp * cl) + Q->theta;
-	shz = sin(0.5 * aacos(P->ctx, Q->sp0 * sp + Q->cp0 * cp * cl));
-	M = aasin(P->ctx, shz * sin(Az));
-	N = aasin(P->ctx, shz * cos(Az) * cos(M) / cos(M * Q->two_r_m));
-	xy.y = Q->n * sin(N * Q->two_r_n);
-	xy.x = Q->m * sin(M * Q->two_r_m) * cos(N) / cos(N * Q->two_r_n);
-
-	return xy;
+    double Az, M, N, cp, sp, cl, shz;
+
+    cp = cos(lp.phi);
+    sp = sin(lp.phi);
+    cl = cos(lp.lam);
+    Az = aatan2(cp * sin(lp.lam), Q->cp0 * sp - Q->sp0 * cp * cl) + Q->theta;
+    shz = sin(0.5 * aacos(P->ctx, Q->sp0 * sp + Q->cp0 * cp * cl));
+    M = aasin(P->ctx, shz * sin(Az));
+    N = aasin(P->ctx, shz * cos(Az) * cos(M) / cos(M * Q->two_r_m));
+    xy.y = Q->n * sin(N * Q->two_r_n);
+    xy.x = Q->m * sin(M * Q->two_r_m) * cos(N) / cos(N * Q->two_r_n);
+
+    return xy;
 }
 
 
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double N, M, xp, yp, z, Az, cz, sz, cAz;
-
-	N = Q->hn * aasin(P->ctx,xy.y * Q->rn);
-	M = Q->hm * aasin(P->ctx,xy.x * Q->rm * cos(N * Q->two_r_n) / cos(N));
-	xp = 2. * sin(M);
-	yp = 2. * sin(N) * cos(M * Q->two_r_m) / cos(M);
-	cAz = cos(Az = aatan2(xp, yp) - Q->theta);
-	z = 2. * aasin(P->ctx, 0.5 * hypot(xp, yp));
-	sz = sin(z);
-	cz = cos(z);
-	lp.phi = aasin(P->ctx, Q->sp0 * cz + Q->cp0 * sz * cAz);
-	lp.lam = aatan2(sz * sin(Az),
-		Q->cp0 * cz - Q->sp0 * sz * cAz);
-
-	return lp;
+    double N, M, xp, yp, z, Az, cz, sz, cAz;
+
+    N = Q->hn * aasin(P->ctx,xy.y * Q->rn);
+    M = Q->hm * aasin(P->ctx,xy.x * Q->rm * cos(N * Q->two_r_n) / cos(N));
+    xp = 2. * sin(M);
+    yp = 2. * sin(N) * cos(M * Q->two_r_m) / cos(M);
+    cAz = cos(Az = aatan2(xp, yp) - Q->theta);
+    z = 2. * aasin(P->ctx, 0.5 * hypot(xp, yp));
+    sz = sin(z);
+    cz = cos(z);
+    lp.phi = aasin(P->ctx, Q->sp0 * cz + Q->cp0 * sz * cAz);
+    lp.lam = aatan2(sz * sin(Az),
+        Q->cp0 * cz - Q->sp0 * sz * cAz);
+
+    return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
 
 
 PJ *PROJECTION(oea) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
-	if (((Q->n = pj_param(P->ctx, P->params, "dn").f) <= 0.) ||
-		((Q->m = pj_param(P->ctx, P->params, "dm").f) <= 0.))
-		E_ERROR(-39)
-	else {
-		Q->theta = pj_param(P->ctx, P->params, "rtheta").f;
-		Q->sp0 = sin(P->phi0);
-		Q->cp0 = cos(P->phi0);
-		Q->rn = 1./ Q->n;
-		Q->rm = 1./ Q->m;
-		Q->two_r_n = 2. * Q->rn;
-		Q->two_r_m = 2. * Q->rm;
-		Q->hm = 0.5 * Q->m;
-		Q->hn = 0.5 * Q->n;
-		P->fwd = s_forward;
-		P->inv = s_inverse;
-		P->es = 0.;
-	}
+    if (((Q->n = pj_param(P->ctx, P->params, "dn").f) <= 0.) ||
+        ((Q->m = pj_param(P->ctx, P->params, "dm").f) <= 0.)) {
+            return pj_default_destructor(P, PJD_ERR_INVALID_M_OR_N);
+    } else {
+        Q->theta = pj_param(P->ctx, P->params, "rtheta").f;
+        Q->sp0 = sin(P->phi0);
+        Q->cp0 = cos(P->phi0);
+        Q->rn = 1./ Q->n;
+        Q->rm = 1./ Q->m;
+        Q->two_r_n = 2. * Q->rn;
+        Q->two_r_m = 2. * Q->rm;
+        Q->hm = 0.5 * Q->m;
+        Q->hn = 0.5 * Q->n;
+        P->fwd = s_forward;
+        P->inv = s_inverse;
+        P->es = 0.;
+    }
 
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_oea_selftest (void) {return 0;}
-#else
-
-int pj_oea_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=oea   +a=6400000    +lat_1=0.5 +lat_2=2 +n=1 +m=2 +theta=3"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 228926.872097864107,  99870.4884300760023},
-        { 217242.584036940476, -123247.885607474513},
-        {-217242.584036940476,  123247.885607474556},
-        {-228926.872097864078, -99870.4884300760168},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017411857167771369,   0.000987726819566195693},
-        { 0.00183489288577854998, -0.000800312481495174641},
-        {-0.00183489288577854954,  0.000800312481495174966},
-        {-0.00174118571677713712, -0.000987726819566195043},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_omerc.c b/src/PJ_omerc.c
index de4a2c3..eca5b24 100644
--- a/src/PJ_omerc.c
+++ b/src/PJ_omerc.c
@@ -22,7 +22,9 @@
 ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(omerc, "Oblique Mercator")
     "\n\tCyl, Sph&Ell no_rot\n\t"
@@ -50,8 +52,10 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
         T = .5 * (W + temp);
         V = sin(Q->B * lp.lam);
         U = (S * Q->singam - V * Q->cosgam) / T;
-        if (fabs(fabs(U) - 1.0) < EPS)
-            F_ERROR;
+        if (fabs(fabs(U) - 1.0) < EPS) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         v = 0.5 * Q->ArB * log((1. - U)/(1. + U));
         temp = cos(Q->B * lp.lam);
                 if(fabs(temp) < TOL) {
@@ -97,8 +101,10 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
         lp.phi = Up < 0. ? -M_HALFPI : M_HALFPI;
     } else {
         lp.phi = Q->E / sqrt((1. + Up) / (1. - Up));
-        if ((lp.phi = pj_phi2(P->ctx, pow(lp.phi, 1. / Q->B), P->e)) == HUGE_VAL)
-            I_ERROR;
+        if ((lp.phi = pj_phi2(P->ctx, pow(lp.phi, 1. / Q->B), P->e)) == HUGE_VAL) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        }
         lp.lam = - Q->rB * atan2((Sp * Q->cosgam -
             Vp * Q->singam), cos(Q->BrA * u));
     }
@@ -106,22 +112,6 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(omerc) {
     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=0;
@@ -129,7 +119,7 @@ PJ *PROJECTION(omerc) {
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->no_rot = pj_param(P->ctx, P->params, "tno_rot").i;
@@ -140,7 +130,7 @@ PJ *PROJECTION(omerc) {
     if (alp || gam) {
         lamc    = pj_param(P->ctx, P->params, "rlonc").f;
         no_off =
-                    /* For libproj4 compatability */
+                    /* For libproj4 compatibility */
                     pj_param(P->ctx, P->params, "tno_off").i
                     /* for backward compatibility */
                     || pj_param(P->ctx, P->params, "tno_uoff").i;
@@ -159,7 +149,8 @@ PJ *PROJECTION(omerc) {
             (con = fabs(phi1)) <= TOL ||
             fabs(con - M_HALFPI) <= TOL ||
             fabs(fabs(P->phi0) - M_HALFPI) <= TOL ||
-            fabs(fabs(phi2) - M_HALFPI) <= TOL) E_ERROR(-33);
+            fabs(fabs(phi2) - M_HALFPI) <= TOL)
+                return pj_default_destructor(P, PJD_ERR_LAT_0_OR_ALPHA_EQ_90);
     }
     com = sqrt(P->one_es);
     if (fabs(P->phi0) > EPS) {
@@ -186,16 +177,12 @@ PJ *PROJECTION(omerc) {
     }
     if (alp || gam) {
         if (alp) {
-            gamma0 = asin(sin(alpha_c) / D);
+            gamma0 = aasin(P->ctx, sin(alpha_c) / D);
             if (!gam)
                 gamma = alpha_c;
         } else
-            alpha_c = asin(D*sin(gamma0 = gamma));
-        if ((con = fabs(alpha_c)) <= TOL ||
-            fabs(con - M_PI) <= TOL ||
-            fabs(fabs(P->phi0) - M_HALFPI) <= TOL)
-            E_ERROR(-32);
-        P->lam0 = lamc - asin(.5 * (F - 1. / F) *
+            alpha_c = aasin(P->ctx, D*sin(gamma0 = gamma));
+        P->lam0 = lamc - aasin(P->ctx, .5 * (F - 1. / F) *
            tan(gamma0)) / Q->B;
     } else {
         H = pow(pj_tsfn(phi1, sin(phi1), P->e), Q->B);
@@ -212,7 +199,7 @@ PJ *PROJECTION(omerc) {
            J * tan(.5 * Q->B * (lam1 - lam2)) / p) / Q->B);
         gamma0 = atan(2. * sin(Q->B * adjlon(lam1 - P->lam0)) /
            (F - 1. / F));
-        gamma = alpha_c = asin(D * sin(gamma0));
+        gamma = alpha_c = aasin(P->ctx, D * sin(gamma0));
     }
     Q->singam = sin(gamma0);
     Q->cosgam = cos(gamma0);
@@ -223,7 +210,7 @@ PJ *PROJECTION(omerc) {
     if (no_off)
         Q->u_0 = 0;
     else {
-        Q->u_0 = fabs(Q->ArB * atan2(sqrt(D * D - 1.), cos(alpha_c)));
+        Q->u_0 = fabs(Q->ArB * atan(sqrt(D * D - 1.) / cos(alpha_c)));
         if (P->phi0 < 0.)
             Q->u_0 = - Q->u_0;
     }
@@ -236,47 +223,3 @@ PJ *PROJECTION(omerc) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_omerc_selftest (void) {return 0;}
-#else
-
-int pj_omerc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=omerc   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222650.796885261341,  110642.229314983808},
-        { 222650.796885261341, -110642.229314983808},
-        {-222650.796885261545,  110642.229314983808},
-        {-222650.796885261545, -110642.229314983808},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00179663056816996357,  0.000904369474808157338},
-        { 0.00179663056816996357, -0.000904369474820879583},
-        {-0.0017966305681604536,   0.000904369474808157338},
-        {-0.0017966305681604536,  -0.000904369474820879583},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/PJ_ortho.c b/src/PJ_ortho.c
index a6527e7..4da8247 100644
--- a/src/PJ_ortho.c
+++ b/src/PJ_ortho.c
@@ -1,47 +1,61 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(ortho, "Orthographic") "\n\tAzi, Sph.";
 
+enum Mode {
+    N_POLE = 0,
+    S_POLE = 1,
+    EQUIT  = 2,
+    OBLIQ  = 3
+};
+
 struct pj_opaque {
-	double	sinph0;
-	double	cosph0;
-	int		mode;
+    double  sinph0;
+    double  cosph0;
+    enum Mode mode;
 };
 
 #define EPS10 1.e-10
-#define N_POLE	0
-#define S_POLE 1
-#define EQUIT	2
-#define OBLIQ	3
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double  coslam, cosphi, sinphi;
-
-	cosphi = cos(lp.phi);
-	coslam = cos(lp.lam);
-	switch (Q->mode) {
-	case EQUIT:
-		if (cosphi * coslam < - EPS10) F_ERROR;
-		xy.y = sin(lp.phi);
-		break;
-	case OBLIQ:
-		if (Q->sinph0 * (sinphi = sin(lp.phi)) +
-		   Q->cosph0 * cosphi * coslam < - EPS10) F_ERROR;
-		xy.y = Q->cosph0 * sinphi - Q->sinph0 * cosphi * coslam;
-		break;
-	case N_POLE:
-		coslam = - coslam;
-	case S_POLE:
-		if (fabs(lp.phi - P->phi0) - EPS10 > M_HALFPI) F_ERROR;
-		xy.y = cosphi * coslam;
-		break;
-	}
-	xy.x = cosphi * sin(lp.lam);
-	return xy;
+    double  coslam, cosphi, sinphi;
+
+    cosphi = cos(lp.phi);
+    coslam = cos(lp.lam);
+    switch (Q->mode) {
+    case EQUIT:
+        if (cosphi * coslam < - EPS10) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
+        xy.y = sin(lp.phi);
+        break;
+    case OBLIQ:
+        if (Q->sinph0 * (sinphi = sin(lp.phi)) + Q->cosph0 * cosphi * coslam < - EPS10) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
+        xy.y = Q->cosph0 * sinphi - Q->sinph0 * cosphi * coslam;
+        break;
+    case N_POLE:
+        coslam = - coslam;
+                /*-fallthrough*/
+    case S_POLE:
+        if (fabs(lp.phi - P->phi0) - EPS10 > M_HALFPI) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
+        xy.y = cosphi * coslam;
+        break;
+    }
+    xy.x = cosphi * sin(lp.lam);
+    return xy;
 }
 
 
@@ -51,7 +65,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     double  rh, cosc, sinc;
 
     if ((sinc = (rh = hypot(xy.x, xy.y))) > 1.) {
-        if ((sinc - 1.) > EPS10) I_ERROR;
+        if ((sinc - 1.) > EPS10) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        }
         sinc = 1.;
     }
     cosc = sqrt(1. - sinc * sinc); /* in this range OK */
@@ -91,84 +108,25 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(ortho) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
-	if (fabs(fabs(P->phi0) - M_HALFPI) <= EPS10)
-		Q->mode = P->phi0 < 0. ? S_POLE : N_POLE;
-	else if (fabs(P->phi0) > EPS10) {
-		Q->mode = OBLIQ;
-		Q->sinph0 = sin(P->phi0);
-		Q->cosph0 = cos(P->phi0);
-	} else
-		Q->mode = EQUIT;
-	P->inv = s_inverse;
-	P->fwd = s_forward;
-	P->es = 0.;
+    if (fabs(fabs(P->phi0) - M_HALFPI) <= EPS10)
+        Q->mode = P->phi0 < 0. ? S_POLE : N_POLE;
+    else if (fabs(P->phi0) > EPS10) {
+        Q->mode = OBLIQ;
+        Q->sinph0 = sin(P->phi0);
+        Q->cosph0 = cos(P->phi0);
+    } else
+        Q->mode = EQUIT;
+    P->inv = s_inverse;
+    P->fwd = s_forward;
+    P->es = 0.;
 
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_ortho_selftest (void) {return 0;}
-#else
-
-int pj_ortho_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=ortho   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223322.76057672748,  111695.401198614476},
-        { 223322.76057672748, -111695.401198614476},
-        {-223322.76057672748,  111695.401198614476},
-        {-223322.76057672748, -111695.401198614476},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931102938101,  0.000895246554928338998},
-        { 0.0017904931102938101, -0.000895246554928338998},
-        {-0.0017904931102938101,  0.000895246554928338998},
-        {-0.0017904931102938101, -0.000895246554928338998},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_patterson.c b/src/PJ_patterson.c
index 50ca098..0a1113a 100644
--- a/src/PJ_patterson.c
+++ b/src/PJ_patterson.c
@@ -53,6 +53,8 @@ PROJ_HEAD(patterson, "Patterson Cylindrical") "\n\tCyl.";
 #define C4 (9.0 * K4)
 #define EPS11 1.0e-11
 #define MAX_Y 1.790857183
+/* Not sure at all of the appropriate number for MAX_ITER... */
+#define MAX_ITER 100
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
@@ -71,6 +73,7 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     double yc, tol, y2, f, fder;
+    int i;
     (void) P;
 
     yc = xy.y;
@@ -82,7 +85,7 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
         xy.y = -MAX_Y;
     }
 
-    for (;;) { /* Newton-Raphson */
+    for (i = MAX_ITER; i ; --i) { /* Newton-Raphson */
         y2 = yc * yc;
         f = (yc * (K1 + y2 * y2 * (K2 + y2 * (K3 + K4 * y2)))) - xy.y;
         fder = C1 + y2 * y2 * (C2 + y2 * (C3 + C4 * y2));
@@ -91,6 +94,8 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
             break;
         }
     }
+    if( i == 0 )
+        pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
     lp.phi = yc;
 
     /* longitude */
@@ -100,19 +105,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(patterson) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -121,47 +113,3 @@ PJ *PROJECTION(patterson) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_patterson_selftest (void) {return 0;}
-#else
-
-int pj_patterson_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=patterson   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {223402.144255274179,  113354.250397779804},
-        {223402.144255274179,  -113354.250397779804},
-        {-223402.144255274179,  113354.250397779804},
-        {-223402.144255274179,  -113354.250397779804},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.00179049310978382265,  0.000882190140807953657},
-        {0.00179049310978382265,  -0.000882190140807953657},
-        {-0.00179049310978382265,  0.000882190140807953657},
-        {-0.00179049310978382265,  -0.000882190140807953657},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_pipeline.c b/src/PJ_pipeline.c
new file mode 100644
index 0000000..2f904ab
--- /dev/null
+++ b/src/PJ_pipeline.c
@@ -0,0 +1,475 @@
+/*******************************************************************************
+
+                       Transformation pipeline manager
+
+                    Thomas Knudsen, 2016-05-20/2016-11-20
+
+********************************************************************************
+
+    Geodetic transformations are typically organized in a number of
+    steps. For example, a datum shift could be carried out through
+    these steps:
+
+    1. Convert (latitude, longitude, ellipsoidal height) to
+       3D geocentric cartesian coordinates (X, Y, Z)
+    2. Transform the (X, Y, Z) coordinates to the new datum, using a
+       7 parameter Helmert transformation.
+    3. Convert (X, Y, Z) back to (latitude, longitude, ellipsoidal height)
+
+    If the height system used is orthometric, rather than ellipsoidal,
+    another step is needed at each end of the process:
+
+    1. Add the local geoid undulation (N) to the orthometric height
+       to obtain the ellipsoidal (i.e. geometric) height.
+    2. Convert (latitude, longitude, ellipsoidal height) to
+       3D geocentric cartesian coordinates (X, Y, Z)
+    3. Transform the (X, Y, Z) coordinates to the new datum, using a
+       7 parameter Helmert transformation.
+    4. Convert (X, Y, Z) back to (latitude, longitude, ellipsoidal height)
+    5. Subtract the local geoid undulation (N) from the ellipsoidal height
+       to obtain the orthometric height.
+
+    Additional steps can be added for e.g. change of vertical datum, so the
+    list can grow fairly long. None of the steps are, however, particularly
+    complex, and data flow is strictly from top to bottom.
+
+    Hence, in principle, the first example above could be implemented using
+    Unix pipelines:
+
+    cat my_coordinates | geographic_to_xyz | helmert | xyz_to_geographic > my_transformed_coordinates
+
+    in the grand tradition of Software Tools [1].
+
+    The proj pipeline driver implements a similar concept: Stringing together
+    a number of steps, feeding the output of one step to the input of the next.
+
+    It is a very powerful concept, that increases the range of relevance of the
+    proj.4 system substantially. It is, however, not a particularly intrusive
+    addition to the PROJ.4 code base: The implementation is by and large completed
+    by adding an extra projection called "pipeline" (i.e. this file), which
+    handles all business, and a small amount of added functionality in the
+    pj_init code, implementing support for multilevel, embedded pipelines.
+
+    Syntactically, the pipeline system introduces the "+step" keyword (which
+    indicates the start of each transformation step), and reintroduces the +inv
+    keyword (indicating that a given transformation step should run in reverse, i.e.
+    forward, when the pipeline is executed in inverse direction, and vice versa).
+
+    Hence, the first transformation example above, can be implemented as:
+
+    +proj=pipeline +step proj=cart +step proj=helmert <ARGS> +step proj=cart +inv
+
+    Where <ARGS> indicate the Helmert arguments: 3 translations (+x=..., +y=...,
+    +z=...), 3 rotations (+rx=..., +ry=..., +rz=...) and a scale factor (+s=...).
+    Following geodetic conventions, the rotations are given in arcseconds,
+    and the scale factor is given as parts-per-million.
+
+    [1] B. W. Kernighan & P. J. Plauger: Software tools.
+        Reading, Massachusetts, Addison-Wesley, 1976, 338 pp.
+
+********************************************************************************
+
+Thomas Knudsen, thokn at sdfe.dk, 2016-05-20
+
+********************************************************************************
+* Copyright (c) 2016, 2017, 2018 Thomas Knudsen / SDFE
+*
+* 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.
+*
+********************************************************************************/
+
+#define PJ_LIB__
+#include <geodesic.h>
+#include <proj.h>
+#include "proj_internal.h"
+#include "projects.h"
+
+#include <stddef.h>
+#include <errno.h>
+PROJ_HEAD(pipeline,         "Transformation pipeline manager");
+
+/* Projection specific elements for the PJ object */
+struct pj_opaque {
+    int reversible;
+    int steps;
+    char **argv;
+    char **current_argv;
+    PJ **pipeline;
+};
+
+
+
+static PJ_COORD pipeline_forward_4d (PJ_COORD, PJ *P);
+static PJ_COORD pipeline_reverse_4d (PJ_COORD, PJ *P);
+static XYZ    pipeline_forward_3d (LPZ lpz, PJ *P);
+static LPZ    pipeline_reverse_3d (XYZ xyz, PJ *P);
+static XY     pipeline_forward (LP lpz, PJ *P);
+static LP     pipeline_reverse (XY xyz, PJ *P);
+
+
+
+
+static PJ_COORD pipeline_forward_4d (PJ_COORD point, PJ *P) {
+    int i, first_step, last_step;
+
+    first_step = 1;
+    last_step  = P->opaque->steps + 1;
+
+    for (i = first_step;  i != last_step;  i++)
+        point = proj_trans (P->opaque->pipeline[i], 1, point);
+
+    return point;
+}
+
+
+static PJ_COORD pipeline_reverse_4d (PJ_COORD point, PJ *P) {
+    int i, first_step, last_step;
+
+    first_step = P->opaque->steps;
+    last_step  =  0;
+
+    for (i = first_step;  i != last_step;  i--)
+        point = proj_trans (P->opaque->pipeline[i], -1, point);
+
+    return point;
+}
+
+
+
+
+static XYZ pipeline_forward_3d (LPZ lpz, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+    int i;
+    point.lpz = lpz;
+
+    for (i = 1;  i <= P->opaque->steps;  i++)
+        point = pj_approx_3D_trans (P->opaque->pipeline[i], 1, point);
+
+    return point.xyz;
+}
+
+
+static LPZ pipeline_reverse_3d (XYZ xyz, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+    int i;
+    point.xyz = xyz;
+
+    for (i = P->opaque->steps;  i > 0 ;  i--)
+        point = pj_approx_3D_trans (P->opaque->pipeline[i], -1, point);
+
+    return point.lpz;
+}
+
+
+
+
+static XY pipeline_forward (LP lp, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+    int i;
+    point.lp = lp;
+
+    for (i = 1;  i <= P->opaque->steps;  i++)
+        point = pj_approx_2D_trans (P->opaque->pipeline[i], 1, point);
+
+    return point.xy;
+}
+
+
+static LP pipeline_reverse (XY xy, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+    int i;
+    point.xy = xy;
+    for (i = P->opaque->steps;  i > 0 ;  i--)
+        point = pj_approx_2D_trans (P->opaque->pipeline[i], -1, point);
+
+    return point.lp;
+}
+
+
+
+
+static void *destructor (PJ *P, int errlev) {
+    int i;
+    if (0==P)
+        return 0;
+
+    if (0==P->opaque)
+        return pj_default_destructor (P, errlev);
+
+    /* Deallocate each pipeine step, then pipeline array */
+    if (0!=P->opaque->pipeline)
+        for (i = 0;  i < P->opaque->steps; i++)
+            proj_destroy (P->opaque->pipeline[i+1]);
+    pj_dealloc (P->opaque->pipeline);
+
+    pj_dealloc (P->opaque->argv);
+    pj_dealloc (P->opaque->current_argv);
+
+    return pj_default_destructor(P, errlev);
+}
+
+
+static PJ *pj_create_pipeline (PJ *P, size_t steps) {
+
+    /* Room for the pipeline: An array of PJ * with room for sentinels at both ends */
+    P->opaque->pipeline = pj_calloc (steps + 2, sizeof(PJ *));
+    if (0==P->opaque->pipeline)
+        return 0;
+
+    P->opaque->steps = (int)steps;
+
+    return P;
+}
+
+
+
+
+/* count the number of args in pipeline definition */
+static size_t argc_params (paralist *params) {
+    size_t argc = 0;
+    for (; params != 0; params = params->next)
+        argc++;
+    return ++argc;  /* one extra for the sentinel */
+}
+
+/* Sentinel for argument list */
+static char *argv_sentinel = "step";
+
+/* turn paralist into argc/argv style argument list */
+static char **argv_params (paralist *params, size_t argc) {
+    char **argv;
+    size_t i = 0;
+    argv = pj_calloc (argc, sizeof (char *));
+    if (0==argv)
+        return 0;
+    for (; params != 0; params = params->next)
+        argv[i++] = params->param;
+    argv[i++] = argv_sentinel;
+    return argv;
+}
+
+
+
+
+/* Being the special operator that the pipeline is, we have to handle the    */
+/* ellipsoid differently than usual. In general, the pipeline operation does */
+/* not need an ellipsoid, but in some cases it is beneficial nonetheless.    */
+/* Unfortunately we can't use the normal ellipsoid setter in pj_init, since  */
+/* it adds a +ellps parameter to the global args if nothing else is specified*/
+/* This is problematic since that ellipsoid spec is then passed on to the    */
+/* pipeline children. This is rarely what we want, so here we implement our  */
+/* own logic instead. If an ellipsoid is set in the global args, it is used  */
+/* as the pipeline ellipsoid. Otherwise we use WGS84 parameters as default.  */
+/* At last we calculate the rest of the ellipsoid parameters and             */
+/* re-initialize P->geod.                                                    */
+static void set_ellipsoid(PJ *P) {
+    paralist *cur, *attachment;
+    int err = proj_errno_reset (P);
+
+    /* Break the linked list after the global args */
+    attachment = 0;
+    for (cur = P->params; cur != 0; cur = cur->next)
+        if (strcmp("step", cur->next->param) == 0) {
+            attachment = cur->next;
+            cur->next = 0;
+            break;
+        }
+
+    /* Check if there's any ellipsoid specification in the global params. */
+    /* If not, use WGS84 as default                                       */
+    if (0 != pj_ellipsoid (P)) {
+        P->a  = 6378137.0;
+        P->es = .00669438002290341575;
+
+        /* reset an "unerror": In this special use case, the errno is    */
+        /* not an error signal, but just a reply from pj_ellipsoid,      */
+        /* telling us that "No - there was no ellipsoid definition in    */
+        /* the PJ you provided".                                         */
+        proj_errno_reset (P);
+    }
+
+    pj_calc_ellipsoid_params (P, P->a, P->es);
+
+    geod_init(P->geod, P->a,  (1 - sqrt (1 - P->es)));
+
+    /* Re-attach the dangling list */
+    cur->next = attachment;
+    proj_errno_restore (P, err);
+}
+
+
+
+
+PJ *OPERATION(pipeline,0) {
+    int i, nsteps = 0, argc;
+    int i_pipeline = -1, i_first_step = -1, i_current_step;
+    char **argv, **current_argv;
+
+    P->fwd4d  =  pipeline_forward_4d;
+    P->inv4d  =  pipeline_reverse_4d;
+    P->fwd3d  =  pipeline_forward_3d;
+    P->inv3d  =  pipeline_reverse_3d;
+    P->fwd    =  pipeline_forward;
+    P->inv    =  pipeline_reverse;
+    P->destructor  =  destructor;
+    P->is_pipeline =  1;
+
+    /* Currently, the pipeline driver is a raw bit mover, enabling other operations */
+    /* to collaborate efficiently. All prep/fin stuff is done at the step levels. */
+    P->skip_fwd_prepare  = 1;
+    P->skip_fwd_finalize = 1;
+    P->skip_inv_prepare  = 1;
+    P->skip_inv_finalize = 1;
+
+
+    P->opaque = pj_calloc (1, sizeof(struct pj_opaque));
+    if (0==P->opaque)
+        return destructor(P, ENOMEM);
+
+    argc = (int)argc_params (P->params);
+    P->opaque->argv = argv = argv_params (P->params, argc);
+    if (0==argv)
+        return destructor (P, ENOMEM);
+
+    P->opaque->current_argv = current_argv = pj_calloc (argc, sizeof (char *));
+    if (0==current_argv)
+        return destructor (P, ENOMEM);
+
+    /* Do some syntactical sanity checking */
+    for (i = 0;  i < argc;  i++) {
+        if (0==strcmp (argv_sentinel, argv[i])) {
+            if (-1==i_pipeline) {
+                proj_log_error (P, "Pipeline: +step before +proj=pipeline");
+                return destructor (P, PJD_ERR_MALFORMED_PIPELINE);
+            }
+            if (0==nsteps)
+                i_first_step = i;
+            nsteps++;
+            continue;
+        }
+
+        if (0==strcmp ("proj=pipeline", argv[i])) {
+            if (-1 != i_pipeline) {
+                proj_log_error (P, "Pipeline: Nesting only allowed when child pipelines are wrapped in '+init's");
+                return destructor (P, PJD_ERR_MALFORMED_PIPELINE); /* ERROR: nested pipelines */
+            }
+            i_pipeline = i;
+        }
+    }
+    nsteps--; /* Last instance of +step is just a sentinel */
+    P->opaque->steps = nsteps;
+
+    if (-1==i_pipeline)
+        return destructor (P, PJD_ERR_MALFORMED_PIPELINE); /* ERROR: no pipeline def */
+
+    if (0==nsteps)
+        return destructor (P, PJD_ERR_MALFORMED_PIPELINE); /* ERROR: no pipeline def */
+
+    /* Make room for the pipeline and execution indicators */
+    if (0==pj_create_pipeline (P, nsteps))
+        return destructor (P, ENOMEM);
+
+    set_ellipsoid(P);
+
+    /* Now loop over all steps, building a new set of arguments for each init */
+    for (i_current_step = i_first_step, i = 0;  i < nsteps;  i++) {
+        int j;
+        int  current_argc = 0;
+        int  err;
+        PJ     *next_step = 0;
+
+        /* Build a set of setup args for the current step */
+        proj_log_trace (P, "Pipeline: Building arg list for step no. %d", i);
+
+        /* First add the step specific args */
+        for (j = i_current_step + 1;  0 != strcmp ("step", argv[j]); j++)
+            current_argv[current_argc++] = argv[j];
+
+        i_current_step = j;
+
+        /* Then add the global args */
+        for (j = i_pipeline + 1;  0 != strcmp ("step", argv[j]); j++)
+            current_argv[current_argc++] = argv[j];
+
+        proj_log_trace (P, "Pipeline: init - %s, %d", current_argv[0], current_argc);
+        for (j = 1;  j < current_argc; j++)
+            proj_log_trace (P, "    %s", current_argv[j]);
+
+        err = proj_errno_reset (P);
+
+        next_step = proj_create_argv (P->ctx, current_argc, current_argv);
+        proj_log_trace (P, "Pipeline: Step %d at %p", i, next_step);
+
+        if (0==next_step) {
+            /* The step init failed, but possibly without setting errno. If so, we say "malformed" */
+            int err_to_report = proj_errno(P);
+            if (0==err_to_report)
+                err_to_report = PJD_ERR_MALFORMED_PIPELINE;
+            proj_log_error (P, "Pipeline: Bad step definition: %s (%s)", current_argv[0], pj_strerrno (err_to_report));
+            return destructor (P, err_to_report); /* ERROR: bad pipeline def */
+        }
+
+        proj_errno_restore (P, err);
+
+        /* Is this step inverted? */
+        for (j = 0;  j < current_argc; j++)
+            if (0==strcmp("inv", current_argv[j])) {
+                /* if +inv exists in both global and local args the forward operation should be used */
+                next_step->inverted = next_step->inverted == 0 ? 1 : 0;
+            }
+
+        P->opaque->pipeline[i+1] = next_step;
+
+        proj_log_trace (P, "Pipeline at [%p]:    step at [%p] done", P, next_step);
+    }
+
+    /* Require a forward path through the pipeline */
+    for (i = 1; i <= nsteps; i++) {
+        PJ *Q = P->opaque->pipeline[i];
+        if ( ( Q->inverted && (Q->inv || Q->inv3d || Q->fwd4d) ) ||
+             (!Q->inverted && (Q->fwd || Q->fwd3d || Q->fwd4d) ) ) {
+            continue;
+        } else {
+            proj_log_error (P, "Pipeline: A forward operation couldn't be constructed");
+            return destructor (P, PJD_ERR_MALFORMED_PIPELINE);
+        }
+    }
+
+    /* determine if an inverse operation is possible */
+    for (i = 1; i <= nsteps; i++) {
+        PJ *Q = P->opaque->pipeline[i];
+        if ( pj_has_inverse(Q) ) {
+            continue;
+        } else {
+            P->inv   = 0;
+            P->inv3d = 0;
+            P->inv4d = 0;
+            break;
+        }
+    }
+
+    proj_log_trace (P, "Pipeline: %d steps built. Determining i/o characteristics", nsteps);
+
+    /* Determine forward input (= reverse output) data type */
+    P->left = pj_left (P->opaque->pipeline[1]);
+
+    /* Now, correspondingly determine forward output (= reverse input) data type */
+    P->right = pj_right (P->opaque->pipeline[nsteps]);
+    return P;
+}
diff --git a/src/PJ_poly.c b/src/PJ_poly.c
index e2ecdd8..7a8fc44 100644
--- a/src/PJ_poly.c
+++ b/src/PJ_poly.c
@@ -1,17 +1,19 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(poly, "Polyconic (American)")
-	"\n\tConic, Sph&Ell";
+    "\n\tConic, Sph&Ell";
 
 struct pj_opaque {
-	double ml0; \
-	double *en;
+    double ml0; \
+    double *en;
 };
 
-#define TOL	1e-10
-#define CONV	1e-10
-#define N_ITER	10
+#define TOL 1e-10
+#define CONV    1e-10
+#define N_ITER  10
 #define I_ITER 20
 #define ITOL 1.e-12
 
@@ -19,37 +21,37 @@ struct pj_opaque {
 static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double  ms, sp, cp;
+    double  ms, sp, cp;
 
-	if (fabs(lp.phi) <= TOL) {
+    if (fabs(lp.phi) <= TOL) {
         xy.x = lp.lam;
         xy.y = -Q->ml0;
     } else {
-		sp = sin(lp.phi);
-		ms = fabs(cp = cos(lp.phi)) > TOL ? pj_msfn(sp, cp, P->es) / sp : 0.;
-		xy.x = ms * sin(lp.lam *= sp);
-		xy.y = (pj_mlfn(lp.phi, sp, cp, Q->en) - Q->ml0) + ms * (1. - cos(lp.lam));
-	}
+        sp = sin(lp.phi);
+        ms = fabs(cp = cos(lp.phi)) > TOL ? pj_msfn(sp, cp, P->es) / sp : 0.;
+        xy.x = ms * sin(lp.lam *= sp);
+        xy.y = (pj_mlfn(lp.phi, sp, cp, Q->en) - Q->ml0) + ms * (1. - cos(lp.lam));
+    }
 
-	return xy;
+    return xy;
 }
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double  cot, E;
+    double  cot, E;
 
-	if (fabs(lp.phi) <= TOL) {
+    if (fabs(lp.phi) <= TOL) {
         xy.x = lp.lam;
         xy.y = Q->ml0;
     } else {
-		cot = 1. / tan(lp.phi);
-		xy.x = sin(E = lp.lam * sin(lp.phi)) * cot;
-		xy.y = lp.phi - P->phi0 + cot * (1. - cos(E));
-	}
+        cot = 1. / tan(lp.phi);
+        xy.x = sin(E = lp.lam * sin(lp.phi)) * cot;
+        xy.y = lp.phi - P->phi0 + cot * (1. - cos(E));
+    }
 
-	return xy;
+    return xy;
 }
 
 
@@ -57,161 +59,108 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
 
-	xy.y += Q->ml0;
-	if (fabs(xy.y) <= TOL) {
+    xy.y += Q->ml0;
+    if (fabs(xy.y) <= TOL) {
         lp.lam = xy.x;
         lp.phi = 0.;
     } else {
-		double r, c, sp, cp, s2ph, ml, mlb, mlp, dPhi;
-		int i;
-
-		r = xy.y * xy.y + xy.x * xy.x;
-		for (lp.phi = xy.y, i = I_ITER; i ; --i) {
-			sp = sin(lp.phi);
-			s2ph = sp * ( cp = cos(lp.phi));
-			if (fabs(cp) < ITOL)
-				I_ERROR;
-			c = sp * (mlp = sqrt(1. - P->es * sp * sp)) / cp;
-			ml = pj_mlfn(lp.phi, sp, cp, Q->en);
-			mlb = ml * ml + r;
-			mlp = P->one_es / (mlp * mlp * mlp);
-			lp.phi += ( dPhi =
-				( ml + ml + c * mlb - 2. * xy.y * (c * ml + 1.) ) / (
-				P->es * s2ph * (mlb - 2. * xy.y * ml) / c +
-				2.* (xy.y - ml) * (c * mlp - 1. / s2ph) - mlp - mlp ));
-			if (fabs(dPhi) <= ITOL)
-				break;
-		}
-		if (!i)
-			I_ERROR;
-		c = sin(lp.phi);
-		lp.lam = asin(xy.x * tan(lp.phi) * sqrt(1. - P->es * c * c)) / sin(lp.phi);
-	}
-
-	return lp;
+        double r, c, sp, cp, s2ph, ml, mlb, mlp, dPhi;
+        int i;
+
+        r = xy.y * xy.y + xy.x * xy.x;
+        for (lp.phi = xy.y, i = I_ITER; i ; --i) {
+            sp = sin(lp.phi);
+            s2ph = sp * ( cp = cos(lp.phi));
+            if (fabs(cp) < ITOL) {
+                proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+                return lp;
+            }
+            c = sp * (mlp = sqrt(1. - P->es * sp * sp)) / cp;
+            ml = pj_mlfn(lp.phi, sp, cp, Q->en);
+            mlb = ml * ml + r;
+            mlp = P->one_es / (mlp * mlp * mlp);
+            lp.phi += ( dPhi =
+                ( ml + ml + c * mlb - 2. * xy.y * (c * ml + 1.) ) / (
+                P->es * s2ph * (mlb - 2. * xy.y * ml) / c +
+                2.* (xy.y - ml) * (c * mlp - 1. / s2ph) - mlp - mlp ));
+            if (fabs(dPhi) <= ITOL)
+                break;
+        }
+        if (!i) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        }
+        c = sin(lp.phi);
+        lp.lam = asin(xy.x * tan(lp.phi) * sqrt(1. - P->es * c * c)) / sin(lp.phi);
+    }
+
+    return lp;
 }
 
 
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
-	double B, dphi, tp;
-	int i;
+    double B, dphi, tp;
+    int i;
 
-	if (fabs(xy.y = P->phi0 + xy.y) <= TOL) {
+    if (fabs(xy.y = P->phi0 + xy.y) <= TOL) {
         lp.lam = xy.x;
         lp.phi = 0.;
     } else {
-		lp.phi = xy.y;
-		B = xy.x * xy.x + xy.y * xy.y;
-		i = N_ITER;
-		do {
-			tp = tan(lp.phi);
-			lp.phi -= (dphi = (xy.y * (lp.phi * tp + 1.) - lp.phi -
-				.5 * ( lp.phi * lp.phi + B) * tp) /
-				((lp.phi - xy.y) / tp - 1.));
-		} while (fabs(dphi) > CONV && --i);
-		if (! i) I_ERROR;
-		lp.lam = asin(xy.x * tan(lp.phi)) / sin(lp.phi);
-	}
-
-	return lp;
+        lp.phi = xy.y;
+        B = xy.x * xy.x + xy.y * xy.y;
+        i = N_ITER;
+        do {
+            tp = tan(lp.phi);
+            lp.phi -= (dphi = (xy.y * (lp.phi * tp + 1.) - lp.phi -
+                .5 * ( lp.phi * lp.phi + B) * tp) /
+                ((lp.phi - xy.y) / tp - 1.));
+        } while (fabs(dphi) > CONV && --i);
+        if (! i) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        }
+        lp.lam = asin(xy.x * tan(lp.phi)) / sin(lp.phi);
+    }
+
+    return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor(PJ *P, int errlev) {
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
+
     if (P->opaque->en)
         pj_dealloc (P->opaque->en);
-    pj_dealloc (P->opaque);
-
-    return pj_dealloc(P);
-}
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    return pj_default_destructor(P, errlev);
 }
 
 
 PJ *PROJECTION(poly) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
-    P->opaque = Q;
+        return pj_default_destructor (P, ENOMEM);
 
-	if (P->es) {
-		if (!(Q->en = pj_enfn(P->es))) E_ERROR_0;
-		Q->ml0 = pj_mlfn(P->phi0, sin(P->phi0), cos(P->phi0), Q->en);
-		P->inv = e_inverse;
-		P->fwd = e_forward;
-	} else {
-		Q->ml0 = -P->phi0;
-		P->inv = s_inverse;
-		P->fwd = s_forward;
-	}
+    P->opaque = Q;
+    P->destructor = destructor;
+
+    if (P->es != 0.0) {
+        if (!(Q->en = pj_enfn(P->es)))
+            return pj_default_destructor (P, ENOMEM);
+        Q->ml0 = pj_mlfn(P->phi0, sin(P->phi0), cos(P->phi0), Q->en);
+        P->inv = e_inverse;
+        P->fwd = e_forward;
+    } else {
+        Q->ml0 = -P->phi0;
+        P->inv = s_inverse;
+        P->fwd = s_forward;
+    }
 
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_poly_selftest (void) {return 0;}
-#else
-
-int pj_poly_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=poly   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=poly   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222605.285770237475,  110642.194561440483},
-        { 222605.285770237475, -110642.194561440483},
-        {-222605.285770237475,  110642.194561440483},
-        {-222605.285770237475, -110642.194561440483},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223368.105210218986,  111769.110491224754},
-        { 223368.105210218986, -111769.110491224754},
-        {-223368.105210218986,  111769.110491224754},
-        {-223368.105210218986, -111769.110491224754},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00179663056846135222,  0.000904369476631838518},
-        { 0.00179663056846135222, -0.000904369476631838518},
-        {-0.00179663056846135222,  0.000904369476631838518},
-        {-0.00179663056846135222, -0.000904369476631838518},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931100023887,  0.000895246554454779222},
-        { 0.0017904931100023887, -0.000895246554454779222},
-        {-0.0017904931100023887,  0.000895246554454779222},
-        {-0.0017904931100023887, -0.000895246554454779222},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_putp2.c b/src/PJ_putp2.c
index 052d95b..51cf263 100644
--- a/src/PJ_putp2.c
+++ b/src/PJ_putp2.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(putp2, "Putnins P2") "\n\tPCyl., Sph.";
 
@@ -49,19 +49,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(putp2) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -70,46 +57,3 @@ PJ *PROJECTION(putp2) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_putp2_selftest (void) {return 0;}
-#else
-
-int pj_putp2_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=putp2   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 211638.039634339279,  117895.033043379764},
-        { 211638.039634339279, -117895.033043379764},
-        {-211638.039634339279,  117895.033043379764},
-        {-211638.039634339279, -117895.033043379764},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00188980221640386672,  0.000848201580276863377},
-        { 0.00188980221640386672, -0.000848201580276863377},
-        {-0.00188980221640386672,  0.000848201580276863377},
-        {-0.00188980221640386672, -0.000848201580276863377},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_putp3.c b/src/PJ_putp3.c
index 9372091..acc777b 100644
--- a/src/PJ_putp3.c
+++ b/src/PJ_putp3.c
@@ -1,4 +1,5 @@
 #define PJ_LIB__
+#include <errno.h>
 #include <projects.h>
 
 struct pj_opaque {
@@ -32,27 +33,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(putp3) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->A = 4. * RPISQ;
@@ -67,7 +51,7 @@ PJ *PROJECTION(putp3) {
 PJ *PROJECTION(putp3p) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->A = 2. * RPISQ;
@@ -79,93 +63,3 @@ PJ *PROJECTION(putp3p) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_putp3_selftest (void) {return 0;}
-#else
-
-int pj_putp3_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=putp3   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 178227.115507793525,  89124.5607860879827},
-        { 178227.115507793525, -89124.5607860879827},
-        {-178227.115507793525,  89124.5607860879827},
-        {-178227.115507793525, -89124.5607860879827},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00224405032986489889,  0.00112202516475805899},
-        { 0.00224405032986489889, -0.00112202516475805899},
-        {-0.00224405032986489889,  0.00112202516475805899},
-        {-0.00224405032986489889, -0.00112202516475805899},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_putp3p_selftest (void) {return 0;}
-#else
-
-int pj_putp3p_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=putp3p   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 178238.118539984745,  89124.5607860879827},
-        { 178238.118539984745, -89124.5607860879827},
-        {-178238.118539984745,  89124.5607860879827},
-        {-178238.118539984745, -89124.5607860879827},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00224405032969050844,  0.00112202516475805899},
-        { 0.00224405032969050844, -0.00112202516475805899},
-        {-0.00224405032969050844,  0.00112202516475805899},
-        {-0.00224405032969050844, -0.00112202516475805899},
-
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_putp4p.c b/src/PJ_putp4p.c
index f8b65ce..958f968 100644
--- a/src/PJ_putp4p.c
+++ b/src/PJ_putp4p.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 struct pj_opaque {
     double C_x, C_y;
@@ -36,27 +37,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(putp4p) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->C_x = 0.874038744;
@@ -73,7 +57,7 @@ PJ *PROJECTION(putp4p) {
 PJ *PROJECTION(weren) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->C_x = 1.;
@@ -86,92 +70,3 @@ PJ *PROJECTION(weren) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_putp4p_selftest (void) {return 0;}
-#else
-
-int pj_putp4p_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=putp4p   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 195241.47734938623,  127796.782307926231},
-        { 195241.47734938623, -127796.782307926231},
-        {-195241.47734938623,  127796.782307926231},
-        {-195241.47734938623, -127796.782307926231},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00204852830860296001,  0.000782480174932193733},
-        { 0.00204852830860296001, -0.000782480174932193733},
-        {-0.00204852830860296001,  0.000782480174932193733},
-        {-0.00204852830860296001, -0.000782480174932193733},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_weren_selftest (void) {return 0;}
-#else
-
-int pj_weren_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=weren   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223378.515757633519,  146214.093042288267},
-        { 223378.515757633519, -146214.093042288267},
-        {-223378.515757633519,  146214.093042288267},
-        {-223378.515757633519, -146214.093042288267},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00179049310987240413,  0.000683917989676492265},
-        { 0.00179049310987240413, -0.000683917989676492265},
-        {-0.00179049310987240413,  0.000683917989676492265},
-        {-0.00179049310987240413, -0.000683917989676492265},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_putp5.c b/src/PJ_putp5.c
index 87b7af7..14bfea2 100644
--- a/src/PJ_putp5.c
+++ b/src/PJ_putp5.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 struct pj_opaque {
     double  A, B;
@@ -34,27 +35,11 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(putp5) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->A = 2.;
@@ -71,7 +56,7 @@ PJ *PROJECTION(putp5) {
 PJ *PROJECTION(putp5p) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->A = 1.5;
@@ -84,89 +69,3 @@ PJ *PROJECTION(putp5p) {
     return P;
 }
 
-#ifndef PJ_SELFTEST
-int pj_putp5_selftest (void) {return 0;}
-#else
-
-int pj_putp5_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=putp5   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 226367.21338056153,  113204.56855847509},
-        { 226367.21338056153, -113204.56855847509},
-        {-226367.21338056153,  113204.56855847509},
-        {-226367.21338056153, -113204.56855847509},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00176671315102969553,  0.000883356575387199546},
-        { 0.00176671315102969553, -0.000883356575387199546},
-        {-0.00176671315102969553,  0.000883356575387199546},
-        {-0.00176671315102969553, -0.000883356575387199546},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_putp5p_selftest (void) {return 0;}
-#else
-
-int pj_putp5p_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=putp5p   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 226388.175248755841,  113204.56855847509},
-        { 226388.175248755841, -113204.56855847509},
-        {-226388.175248755841,  113204.56855847509},
-        {-226388.175248755841, -113204.56855847509},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00176671315090204742,  0.000883356575387199546},
-        { 0.00176671315090204742, -0.000883356575387199546},
-        {-0.00176671315090204742,  0.000883356575387199546},
-        {-0.00176671315090204742, -0.000883356575387199546},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-#endif
diff --git a/src/PJ_putp6.c b/src/PJ_putp6.c
index 6c4fc24..8c4efa6 100644
--- a/src/PJ_putp6.c
+++ b/src/PJ_putp6.c
@@ -1,4 +1,5 @@
 #define PJ_LIB__
+#include <errno.h>
 #include <projects.h>
 
 struct pj_opaque {
@@ -51,27 +52,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(putp6) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
     Q->C_x = 1.01346;
@@ -91,7 +75,7 @@ PJ *PROJECTION(putp6) {
 PJ *PROJECTION(putp6p) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
     Q->C_x = 0.44329;
@@ -107,90 +91,3 @@ PJ *PROJECTION(putp6p) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_putp6_selftest (void) {return 0;}
-#else
-
-int pj_putp6_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=putp6   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 226369.395133402577,  110218.523796520662},
-        { 226369.395133402577, -110218.523796520749},
-        {-226369.395133402577,  110218.523796520662},
-        {-226369.395133402577, -110218.523796520749},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00176671315102969921,  0.000907295534210503544},
-        { 0.00176671315102969921, -0.000907295534205924308},
-        {-0.00176671315102969921,  0.000907295534210503544},
-        {-0.00176671315102969921, -0.000907295534205924308},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_putp6p_selftest (void) {return 0;}
-#else
-
-int pj_putp6p_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=putp6p   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 198034.195132195076,  125989.475461323193},
-        { 198034.195132195076, -125989.475461323193},
-        {-198034.195132195076,  125989.475461323193},
-        {-198034.195132195076, -125989.475461323193},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00201955053120177067,  0.000793716441164738612},
-        { 0.00201955053120177067, -0.000793716441164738612},
-        {-0.00201955053120177067,  0.000793716441164738612},
-        {-0.00201955053120177067, -0.000793716441164738612},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-#endif
diff --git a/src/PJ_qsc.c b/src/PJ_qsc.c
index 2777736..36dabeb 100644
--- a/src/PJ_qsc.c
+++ b/src/PJ_qsc.c
@@ -39,10 +39,21 @@
  */
 
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
+
+/* The six cube faces. */
+enum Face {
+    FACE_FRONT  = 0,
+    FACE_RIGHT  = 1,
+    FACE_BACK   = 2,
+    FACE_LEFT   = 3,
+    FACE_TOP    = 4,
+    FACE_BOTTOM = 5
+};
 
 struct pj_opaque {
-        int face;
+        enum Face face;
         double a_squared;
         double b;
         double one_minus_f;
@@ -52,24 +63,18 @@ 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
+enum Area {
+    AREA_0 = 0,
+    AREA_1 = 1,
+    AREA_2 = 2,
+    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) {
+static double qsc_fwd_equat_face_theta(double phi, double y, double x, enum Area *area) {
     double theta;
     if (phi < EPS10) {
         *area = AREA_0;
@@ -110,12 +115,12 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     double lat, lon;
     double theta, phi;
     double t, mu; /* nu; */
-    int area;
+    enum Area 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) {
+    if (P->es != 0.0) {
         lat = atan(Q->one_minus_f_squared * tan(lp.phi));
     } else {
         lat = lp.phi;
@@ -292,7 +297,7 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
         }
     } else {
         /* Compute phi and lam via cartesian unit sphere coordinates. */
-        double q, r, s, t;
+        double q, r, s;
         q = cosphi;
         t = q * q;
         if (t >= 1.0) {
@@ -346,7 +351,7 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 
     /* Apply the shift from the sphere to the ellipsoid as described
      * in [LK12]. */
-    if (P->es) {
+    if (P->es != 0.0) {
         int invert_sign;
         double tanphi, xa;
         invert_sign = (lp.phi < 0.0 ? 1 : 0);
@@ -361,27 +366,10 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(qsc) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     P->inv = e_inverse;
@@ -400,7 +388,7 @@ PJ *PROJECTION(qsc) {
     }
     /* Fill in useful values for the ellipsoid <-> sphere shift
      * described in [LK12]. */
-    if (P->es) {
+    if (P->es != 0.0) {
         Q->a_squared = P->a * P->a;
         Q->b = P->a * sqrt(1.0 - P->es);
         Q->one_minus_f = 1.0 - (P->a - Q->b) / P->a;
@@ -410,62 +398,3 @@ PJ *PROJECTION(qsc) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_qsc_selftest (void) {return 0;}
-#else
-
-int pj_qsc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=qsc   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=qsc   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 304638.450843852363,  164123.870923793991},
-        { 304638.450843852363, -164123.870923793991},
-        {-304638.450843852363,  164123.870923793962},
-        {-304638.450843852421, -164123.870923793904},
-    };
-
-    XY s_fwd_expect[] = {
-        { 305863.792402890511,  165827.722754715243},
-        { 305863.792402890511, -165827.722754715243},
-        {-305863.792402890511,  165827.722754715243},
-        {-305863.792402890569, -165827.722754715156},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.00132134098471627126,  0.000610652900922527926},
-        { 0.00132134098471627126, -0.000610652900922527926},
-        {-0.00132134098471627126,  0.000610652900922527926},
-        {-0.00132134098471627126, -0.000610652900922527926},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.00131682718763827234,  0.000604493198178676161},
-        { 0.00131682718763827234, -0.000604493198178676161},
-        {-0.00131682718763827234,  0.000604493198178676161},
-        {-0.00131682718763827234, -0.000604493198178676161},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_robin.c b/src/PJ_robin.c
index f699631..7532ff7 100644
--- a/src/PJ_robin.c
+++ b/src/PJ_robin.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(robin, "Robinson") "\n\tPCyl., Sph.";
 
@@ -20,47 +21,47 @@ struct COEFS {
 };
 
 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}
+    {1.0f, 2.2199e-17f, -7.15515e-05f, 3.1103e-06f},
+    {0.9986f, -0.000482243f, -2.4897e-05f, -1.3309e-06f},
+    {0.9954f, -0.00083103f, -4.48605e-05f, -9.86701e-07f},
+    {0.99f, -0.00135364f, -5.9661e-05f, 3.6777e-06f},
+    {0.9822f, -0.00167442f, -4.49547e-06f, -5.72411e-06f},
+    {0.973f, -0.00214868f, -9.03571e-05f, 1.8736e-08f},
+    {0.96f, -0.00305085f, -9.00761e-05f, 1.64917e-06f},
+    {0.9427f, -0.00382792f, -6.53386e-05f, -2.6154e-06f},
+    {0.9216f, -0.00467746f, -0.00010457f, 4.81243e-06f},
+    {0.8962f, -0.00536223f, -3.23831e-05f, -5.43432e-06f},
+    {0.8679f, -0.00609363f, -0.000113898f, 3.32484e-06f},
+    {0.835f, -0.00698325f, -6.40253e-05f, 9.34959e-07f},
+    {0.7986f, -0.00755338f, -5.00009e-05f, 9.35324e-07f},
+    {0.7597f, -0.00798324f, -3.5971e-05f, -2.27626e-06f},
+    {0.7186f, -0.00851367f, -7.01149e-05f, -8.6303e-06f},
+    {0.6732f, -0.00986209f, -0.000199569f, 1.91974e-05f},
+    {0.6213f, -0.010418f, 8.83923e-05f, 6.24051e-06f},
+    {0.5722f, -0.00906601f, 0.000182f, 6.24051e-06f},
+    {0.5322f, -0.00677797f, 0.000275608f, 6.24051e-06f}
 };
 
 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}
+    {-5.20417e-18f, 0.0124f, 1.21431e-18f, -8.45284e-11f},
+    {0.062f, 0.0124f, -1.26793e-09f, 4.22642e-10f},
+    {0.124f, 0.0124f, 5.07171e-09f, -1.60604e-09f},
+    {0.186f, 0.0123999f, -1.90189e-08f, 6.00152e-09f},
+    {0.248f, 0.0124002f, 7.10039e-08f, -2.24e-08f},
+    {0.31f, 0.0123992f, -2.64997e-07f, 8.35986e-08f},
+    {0.372f, 0.0124029f, 9.88983e-07f, -3.11994e-07f},
+    {0.434f, 0.0123893f, -3.69093e-06f, -4.35621e-07f},
+    {0.4958f, 0.0123198f, -1.02252e-05f, -3.45523e-07f},
+    {0.5571f, 0.0121916f, -1.54081e-05f, -5.82288e-07f},
+    {0.6176f, 0.0119938f, -2.41424e-05f, -5.25327e-07f},
+    {0.6769f, 0.011713f, -3.20223e-05f, -5.16405e-07f},
+    {0.7346f, 0.0113541f, -3.97684e-05f, -6.09052e-07f},
+    {0.7903f, 0.0109107f, -4.89042e-05f, -1.04739e-06f},
+    {0.8435f, 0.0103431f, -6.4615e-05f, -1.40374e-09f},
+    {0.8936f, 0.00969686f, -6.4636e-05f, -8.547e-06f},
+    {0.9394f, 0.00840947f, -0.000192841f, -4.2106e-06f},
+    {0.9761f, 0.00616527f, -0.000256f, -4.2106e-06f},
+    {1.0f, 0.00328947f, -0.000319159f, -4.2106e-06f}
 };
 
 #define FXC 0.8487
@@ -70,7 +71,8 @@ static const struct COEFS Y[] = {
 #define NODES   18
 #define ONEEPS  1.000001
 #define EPS 1e-8
-
+/* Not sure at all of the appropriate number for MAX_ITER... */
+#define MAX_ITER 100
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0,0.0};
@@ -78,7 +80,11 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     double dphi;
     (void) P;
 
-    i = floor((dphi = fabs(lp.phi)) * C1);
+    i = (int)floor((dphi = fabs(lp.phi)) * C1);
+    if( i < 0 ){
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
     if (i >= NODES) i = NODES - 1;
     dphi = RAD_TO_DEG * (dphi - RC1 * i);
     xy.x = V(X[i], dphi) * FXC * lp.lam;
@@ -94,18 +100,27 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     int i;
     double t, t1;
     struct COEFS T;
+    int iters;
 
     lp.lam = xy.x / FXC;
     lp.phi = fabs(xy.y / FYC);
     if (lp.phi >= 1.) { /* simple pathologic cases */
-        if (lp.phi > ONEEPS) I_ERROR
+        if (lp.phi > ONEEPS) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        }
         else {
             lp.phi = xy.y < 0. ? -M_HALFPI : M_HALFPI;
             lp.lam /= X[NODES].c0;
         }
     } else { /* general problem */
         /* in Y space, reduce to table interval */
-        for (i = floor(lp.phi * NODES);;) {
+        i = (int)floor(lp.phi * NODES);
+        if( i < 0 || i >= NODES ) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lp;
+        }
+        for (;;) {
             if (Y[i].c0 > lp.phi) --i;
             else if (Y[i+1].c0 <= lp.phi) ++i;
             else break;
@@ -114,12 +129,14 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
         /* first guess, linear interp */
         t = 5. * (lp.phi - T.c0)/(Y[i+1].c0 - T.c0);
         /* make into root */
-        T.c0 -= lp.phi;
-        for (;;) { /* Newton-Raphson reduction */
+        T.c0 = (float)(T.c0 - lp.phi);
+        for (iters = MAX_ITER; iters ; --iters) { /* Newton-Raphson */
             t -= t1 = V(T,t) / DV(T,t);
             if (fabs(t1) < EPS)
                 break;
         }
+        if( iters == 0 )
+            pj_ctx_set_errno( P->ctx, PJD_ERR_NON_CONVERGENT );
         lp.phi = (5 * i + t) * DEG_TO_RAD;
         if (xy.y < 0.) lp.phi = -lp.phi;
         lp.lam /= V(X[i], t);
@@ -128,20 +145,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(robin) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -151,46 +154,3 @@ PJ *PROJECTION(robin) {
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_robin_selftest (void) {return 0;}
-#else
-
-int pj_robin_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=robin   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 189588.423282507836,  107318.530350702888},
-        { 189588.423282507836, -107318.530350702888},
-        {-189588.423282507836,  107318.530350702888},
-        {-189588.423282507836, -107318.530350702888},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.002109689065506131,  0.000931805533547745983},
-        { 0.002109689065506131, -0.000931805533547745983},
-        {-0.002109689065506131,  0.000931805533547745983},
-        {-0.002109689065506131, -0.000931805533547745983},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_rpoly.c b/src/PJ_rpoly.c
index d0ff831..d724171 100644
--- a/src/PJ_rpoly.c
+++ b/src/PJ_rpoly.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 struct pj_opaque {
     double  phi1;
@@ -34,27 +35,11 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 
 PJ *PROJECTION(rpoly) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
     if ((Q->mode = (Q->phi1 = fabs(pj_param(P->ctx, P->params, "rlat_ts").f)) > EPS)) {
@@ -67,33 +52,3 @@ PJ *PROJECTION(rpoly) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_rpoly_selftest (void) {return 0;}
-#else
-
-int pj_rpoly_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=rpoly   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223368.09830201423,  111769.110486991223},
-        { 223368.09830201423, -111769.110486991223},
-        {-223368.09830201423,  111769.110486991223},
-        {-223368.09830201423, -111769.110486991223},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_sch.c b/src/PJ_sch.c
index 048224e..c404fc9 100644
--- a/src/PJ_sch.c
+++ b/src/PJ_sch.c
@@ -1,6 +1,4 @@
 /******************************************************************************
- * $Id$
- *
  * Project:  SCH Coordinate system
  * Purpose:  Implementation of SCH Coordinate system
  * References :
@@ -33,7 +31,9 @@
  ****************************************************************************/
 
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 #include "geocent.h"
 
 struct pj_opaque {
@@ -48,7 +48,7 @@ struct pj_opaque {
     GeocentricInfo elp_0;
 };
 
-PROJ_HEAD(sch, "Spherical Cross-track Height") "\n\tMisc\n\tplat_0 = ,plon_0 = , phdg_0 = ,[h_0 = ]";
+PROJ_HEAD(sch, "Spherical Cross-track Height") "\n\tMisc\n\tplat_0= plon_0= phdg_0= [h_0=]";
 
 static LPZ inverse3d(XYZ xyz, PJ *P) {
     LPZ lpz = {0.0, 0.0, 0.0};
@@ -61,9 +61,10 @@ static LPZ inverse3d(XYZ xyz, PJ *P) {
     pxyz[1] = xyz.x * P->a / Q->rcurv;
     pxyz[2] = xyz.z;
 
-    if( pj_Convert_Geodetic_To_Geocentric( &(Q->sph), pxyz[0], pxyz[1], pxyz[2],
-                temp, temp+1, temp+2) != 0)
-            I3_ERROR;
+    if( pj_Convert_Geodetic_To_Geocentric( &(Q->sph), pxyz[0], pxyz[1], pxyz[2], temp, temp+1, temp+2) != 0) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return lpz;
+    }
 
     /* Apply rotation */
     pxyz[0] = Q->transMat[0] * temp[0] + Q->transMat[1] * temp[1] + Q->transMat[2] * temp[2];
@@ -84,11 +85,6 @@ static LPZ inverse3d(XYZ xyz, PJ *P) {
     lpz.phi = temp[0] ;
     lpz.z = temp[2];
 
-#if 0
-    printf("INVERSE: \n");
-    printf("XYZ: %f %f %f \n", xyz.x, xyz.y, xyz.z);
-    printf("LPZ: %f %f %f \n", lpz.lam, lpz.phi, lpz.z);
-#endif
     return lpz;
 }
 
@@ -100,9 +96,10 @@ static XYZ forward3d(LPZ lpz, PJ *P) {
 
 
     /* Convert lat lon to geocentric coordinates */
-    if( pj_Convert_Geodetic_To_Geocentric( &(Q->elp_0), lpz.phi, lpz.lam, lpz.z,
-                temp, temp+1, temp+2 ) != 0 )
-        F3_ERROR;
+    if( pj_Convert_Geodetic_To_Geocentric( &(Q->elp_0), lpz.phi, lpz.lam, lpz.z, temp, temp+1, temp+2 ) != 0 ) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xyz;
+    }
 
 
     /* Adjust for offset */
@@ -126,30 +123,10 @@ static XYZ forward3d(LPZ lpz, PJ *P) {
     xyz.y = temp[0] * Q->rcurv / P->a;
     xyz.z = temp[2];
 
-#if 0
-    printf("FORWARD: \n");
-    printf("LPZ: %f %f %f \n", lpz.lam, lpz.phi, lpz.z);
-    printf("XYZ: %f %f %f \n", xyz.x, xyz.y, xyz.z);
-#endif
     return xyz;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 static PJ *setup(PJ *P) { /* general initialization */
     struct pj_opaque *Q = P->opaque;
     double reast, rnorth;
@@ -163,7 +140,7 @@ static PJ *setup(PJ *P) { /* general initialization */
 
     /* Setup original geocentric system */
     if ( pj_Set_Geocentric_Parameters(&(Q->elp_0), P->a, temp) != 0)
-            E_ERROR(-37);
+        return pj_default_destructor(P, PJD_ERR_FAILED_TO_FIND_PROJ);
 
     clt = cos(Q->plat);
     slt = sin(Q->plat);
@@ -180,15 +157,9 @@ static PJ *setup(PJ *P) { /* general initialization */
 
     Q->rcurv = Q->h0 + (reast*rnorth)/(reast * chdg * chdg + rnorth * shdg * shdg);
 
-#if 0
-    printf("North Radius: %f \n", rnorth);
-    printf("East Radius: %f \n", reast);
-    printf("Effective Radius: %f \n", Q->rcurv);
-#endif
-
     /* Set up local sphere at the given peg point */
     if ( pj_Set_Geocentric_Parameters(&(Q->sph), Q->rcurv, Q->rcurv) != 0)
-        E_ERROR(-37);
+            return pj_default_destructor(P, PJD_ERR_FAILED_TO_FIND_PROJ);
 
     /* Set up the transformation matrices */
     Q->transMat[0] = clt * clo;
@@ -204,19 +175,13 @@ static PJ *setup(PJ *P) { /* general initialization */
 
     if( pj_Convert_Geodetic_To_Geocentric( &(Q->elp_0), Q->plat, Q->plon, Q->h0,
                                            pxyz, pxyz+1, pxyz+2 ) != 0 )
-    {
-        E_ERROR(-14)
-    }
+        return pj_default_destructor(P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT);
 
 
     Q->xyzoff[0] = pxyz[0] - (Q->rcurv) * clt * clo;
     Q->xyzoff[1] = pxyz[1] - (Q->rcurv) * clt * slo;
     Q->xyzoff[2] = pxyz[2] - (Q->rcurv) * slt;
 
-#if 0
-    printf("Offset: %f %f %f \n", Q->xyzoff[0], Q->xyzoff[1], Q->xyzoff[2]);
-#endif
-
     P->fwd3d = forward3d;
     P->inv3d = inverse3d;
     return P;
@@ -226,7 +191,7 @@ static PJ *setup(PJ *P) { /* general initialization */
 PJ *PROJECTION(sch) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
     Q->h0 = 0.0;
@@ -234,35 +199,30 @@ PJ *PROJECTION(sch) {
     /* Check if peg latitude was defined */
     if (pj_param(P->ctx, P->params, "tplat_0").i)
         Q->plat = pj_param(P->ctx, P->params, "rplat_0").f;
-    else
-        E_ERROR(-37);
+    else {
+        return pj_default_destructor(P, PJD_ERR_FAILED_TO_FIND_PROJ);
+    }
 
     /* Check if peg longitude was defined */
     if (pj_param(P->ctx, P->params, "tplon_0").i)
         Q->plon = pj_param(P->ctx, P->params, "rplon_0").f;
-    else
-        E_ERROR(-37);
+    else {
+        return pj_default_destructor(P, PJD_ERR_FAILED_TO_FIND_PROJ);
+    }
 
     /* Check if peg latitude is defined */
     if (pj_param(P->ctx, P->params, "tphdg_0").i)
         Q->phdg = pj_param(P->ctx, P->params, "rphdg_0").f;
-    else
-        E_ERROR(-37);
+    else {
+        return pj_default_destructor(P, PJD_ERR_FAILED_TO_FIND_PROJ);
+    }
 
 
     /* Check if average height was defined - If so read it in */
     if (pj_param(P->ctx, P->params, "th_0").i)
         Q->h0 = pj_param(P->ctx, P->params, "dh_0").f;
 
-    /* Completed reading in the projection parameters */
-#if 0
-    printf("PSA: Lat = %f Lon = %f Hdg = %f \n", Q->plat, Q->plon, Q->phdg);
-#endif
 
     return setup(P);
 }
 
-/* Skipping sef-test since the test system is not capable of handling
- * 3D coordinate systems for the time being. Relying on tests in ../nad/
- */
-int pj_sch_selftest (void) {return 0;}
diff --git a/src/PJ_sconics.c b/src/PJ_sconics.c
index df7fb66..b94fca1 100644
--- a/src/PJ_sconics.c
+++ b/src/PJ_sconics.c
@@ -1,6 +1,18 @@
 #define PJ_LIB__
-#include    <projects.h>
-
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
+
+
+enum Type {
+    EULER  = 0,
+    MURD1  = 1,
+    MURD2  = 2,
+    MURD3  = 3,
+    PCONIC = 4,
+    TISSOT = 5,
+    VITK1  = 6
+};
 
 struct pj_opaque {
     double  n;
@@ -8,17 +20,10 @@ struct pj_opaque {
     double  rho_0;
     double  sig;
     double  c1, c2;
-    int     type;
+    enum Type type;
 };
 
 
-#define EULER 0
-#define MURD1 1
-#define MURD2 2
-#define MURD3 3
-#define PCONIC 4
-#define TISSOT 5
-#define VITK1 6
 #define EPS10   1.e-10
 #define EPS 1e-10
 #define LINE2 "\n\tConic, Sph\n\tlat_1= and lat_2="
@@ -46,8 +51,7 @@ static int phi12(PJ *P, double *del) {
         p2 = pj_param(P->ctx, P->params, "rlat_2").f;
         *del = 0.5 * (p2 - p1);
         P->opaque->sig = 0.5 * (p2 + p1);
-        err = (fabs(*del) < EPS || fabs(P->opaque->sig) < EPS) ? -42 : 0;
-        *del = *del;
+        err = (fabs(*del) < EPS || fabs(P->opaque->sig) < EPS) ? PJD_ERR_ABS_LAT1_EQ_ABS_LAT2 : 0;
     }
     return err;
 }
@@ -104,33 +108,19 @@ static LP s_inverse (XY xy, PJ *P) {  /* Spheroidal, (and ellipsoidal?) inverse
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
-static PJ *setup(PJ *P, int type) {
+static PJ *setup(PJ *P, enum Type type) {
     double del, cs;
-    int i;
+    int err;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
     Q->type = type;
 
-    i = phi12 (P, &del);
-    if(i)
-        E_ERROR(i);
+    err = phi12 (P, &del);
+    if(err)
+        return pj_default_destructor (P, err);
+
     switch (Q->type) {
 
     case TISSOT:
@@ -170,7 +160,8 @@ static PJ *setup(PJ *P, int type) {
         Q->c2 = cos (del);
         Q->c1 = 1./tan (Q->sig);
         if (fabs (del = P->phi0 - Q->sig) - EPS10 >= M_HALFPI)
-            E_ERROR(-43);
+            return pj_default_destructor(P, PJD_ERR_LAT_0_HALF_PI_FROM_MEAN);
+
         Q->rho_0 = Q->c2 * (Q->c1 - tan (del));
         break;
 
@@ -222,474 +213,3 @@ PJ *PROJECTION(vitk1) {
     return setup(P, VITK1);
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_euler_selftest (void) {return 0;}
-#else
-
-int pj_euler_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=euler   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=euler   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222597.63465910763,  111404.24054991946},
-        {222767.16563187627,  -111234.6764910177},
-        {-222597.63465910763,  111404.24054991946},
-        {-222767.16563187627,  -111234.6764910177},
-    };
-
-    XY s_fwd_expect[] = {
-        {223360.65559869423,  111786.11238979101},
-        {223530.76769031584,  -111615.96709862351},
-        {-223360.65559869423,  111786.11238979101},
-        {-223530.76769031584,  -111615.96709862351},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017962807023075235,  0.0008983146697688839},
-        {0.0017962794738334226,  -0.00089831589842987965},
-        {-0.0017962807023075235,  0.0008983146697688839},
-        {-0.0017962794738334226,  -0.00089831589842987965},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017901444369360026,  0.00089524594522202015},
-        {0.001790143216840731,  -0.00089524716533368484},
-        {-0.0017901444369360026,  0.00089524594522202015},
-        {-0.001790143216840731,  -0.00089524716533368484},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_murd1_selftest (void) {return 0;}
-#else
-
-int pj_murd1_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=murd1   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=murd1   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222600.81347355421,  111404.24418054636},
-        {222770.3492878644,  -111234.6728566746},
-        {-222600.81347355421,  111404.24418054636},
-        {-222770.3492878644,  -111234.6728566746},
-    };
-
-    XY s_fwd_expect[] = {
-        {223363.84530949194,  111786.11603286299},
-        {223533.96225925098,  -111615.96345182261},
-        {-223363.84530949194,  111786.11603286299},
-        {-223533.96225925098,  -111615.96345182261},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017962550410516366,  0.0008983146697688839},
-        {0.0017962538125775522,  -0.00089831589842987965},
-        {-0.0017962550410516366,  0.0008983146697688839},
-        {-0.0017962538125775522,  -0.00089831589842987965},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017901188633413715,  0.00089524594522202015},
-        {0.0017901176432461162,  -0.00089524716492657387},
-        {-0.0017901188633413715,  0.00089524594522202015},
-        {-0.0017901176432461162,  -0.00089524716492657387},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_murd2_selftest (void) {return 0;}
-#else
-
-int pj_murd2_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=murd2   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=murd2   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222588.09975123021,  111426.14002741246},
-        {222757.72626701824,  -111341.43131750476},
-        {-222588.09975123021,  111426.14002741246},
-        {-222757.72626701824,  -111341.43131750476},
-    };
-
-    XY s_fwd_expect[] = {
-        {223351.08800702673,  111808.08693438848},
-        {223521.2959691704,  -111723.08785967289},
-        {-223351.08800702673,  111808.08693438848},
-        {-223521.2959691704,  -111723.08785967289},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017963574947305447,  0.00089788747830845382},
-        {0.0017963562661689487,  -0.00089788809264252983},
-        {-0.0017963574947305447,  0.00089788747830845382},
-        {-0.0017963562661689487,  -0.00089788809264252983},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017902209670287586,  0.00089482021163422854},
-        {0.0017902197468465887,  -0.00089482082161134206},
-        {-0.0017902209670287586,  0.00089482021163422854},
-        {-0.0017902197468465887,  -0.00089482082161134206},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-
-
-
-
-
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_murd3_selftest (void) {return 0;}
-#else
-
-int pj_murd3_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=murd3   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=murd3   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222600.81407757697,  111404.24660137216},
-        {222770.35473389886,  -111234.67043217793},
-        {-222600.81407757697,  111404.24660137216},
-        {-222770.35473389886,  -111234.67043217793},
-    };
-
-    XY s_fwd_expect[] = {
-        {223363.84591558515,  111786.11846198692},
-        {223533.96772395336,  -111615.96101901523},
-        {-223363.84591558515,  111786.11846198692},
-        {-223533.96772395336,  -111615.96101901523},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017962550166583809,  0.0008983146697688839},
-        {0.0017962537881492445,  -0.00089831589842987965},
-        {-0.0017962550166583809,  0.0008983146697688839},
-        {-0.0017962537881492445,  -0.00089831589842987965},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017901188390313859,  0.00089524594522202015},
-        {0.0017901176189013177,  -0.00089524716533368484},
-        {-0.0017901188390313859,  0.00089524594522202015},
-        {-0.0017901176189013177,  -0.00089524716533368484},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_pconic_selftest (void) {return 0;}
-#else
-
-int pj_pconic_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=pconic   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=pconic   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222588.09884161691,  111416.60477006658},
-        {222757.71809109033,  -111331.88153107995},
-        {-222588.09884161691,  111416.60477006658},
-        {-222757.71809109033,  -111331.88153107995},
-    };
-
-    XY s_fwd_expect[] = {
-        {223351.08709429545,  111798.5189920546},
-        {223521.28776521701,  -111713.50533845725},
-        {-223351.08709429545,  111798.5189920546},
-        {-223521.28776521701,  -111713.50533845725},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017963575313784969,  0.0008979644089172499},
-        {0.0017963563027642206,  -0.00089796502355327969},
-        {-0.0017963575313784969,  0.0008979644089172499},
-        {-0.0017963563027642206,  -0.00089796502355327969},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017902210035514285,  0.0008948968793741558},
-        {0.0017902197833169374,  -0.00089489748965381963},
-        {-0.0017902210035514285,  0.0008948968793741558},
-        {-0.0017902197833169374,  -0.00089489748965381963},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_tissot_selftest (void) {return 0;}
-#else
-
-int pj_tissot_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=tissot   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=tissot   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222641.07869963095,  54347.828487281469},
-        {222810.61451394114,  -168291.08854993948},
-        {-222641.07869963095,  54347.828487281469},
-        {-222810.61451394114,  -168291.08854993948},
-    };
-
-    XY s_fwd_expect[] = {
-        {223404.24855684943,  54534.122161157939},
-        {223574.36550660848,  -168867.95732352766},
-        {-223404.24855684943,  54534.122161157939},
-        {-223574.36550660848,  -168867.95732352766},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017962807107425871,  0.51344495513064536},
-        {0.0017962794822333915,  0.51164832456244658},
-        {-0.0017962807107425871,  0.51344495513064536},
-        {-0.0017962794822333915,  0.51164832456244658},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017901444453421915,  0.51344188640609856},
-        {0.001790143225212064,  0.51165139329554277},
-        {-0.0017901444453421915,  0.51344188640609856},
-        {-0.001790143225212064,  0.51165139329554277},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-
-
-
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_vitk1_selftest (void) {return 0;}
-#else
-
-int pj_vitk1_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=vitk1   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=vitk1   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222607.17121145778,  111404.25144243463},
-        {222776.71670959776,  -111234.66558744459},
-        {-222607.17121145778,  111404.25144243463},
-        {-222776.71670959776,  -111234.66558744459},
-    };
-
-    XY s_fwd_expect[] = {
-        {223370.22484047143,  111786.12331964359},
-        {223540.3515072545,  -111615.9561576751},
-        {-223370.22484047143,  111786.12331964359},
-        {-223540.3515072545,  -111615.9561576751},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017962037198570686,  0.0008983146697688839},
-        {0.0017962024913830157,  -0.00089831589842987965},
-        {-0.0017962037198570686,  0.0008983146697688839},
-        {-0.0017962024913830157,  -0.00089831589842987965},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017900677174648159,  0.00089524594522202015},
-        {0.0017900664973695916,  -0.00089524716533368484},
-        {-0.0017900677174648159,  0.00089524594522202015},
-        {-0.0017900664973695916,  -0.00089524716533368484},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_somerc.c b/src/PJ_somerc.c
index 22ee5f5..8222ca2 100644
--- a/src/PJ_somerc.c
+++ b/src/PJ_somerc.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include    <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(somerc, "Swiss. Obl. Mercator") "\n\tCyl, Ell\n\tFor CH1903";
 
@@ -54,37 +56,19 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
     if (i) {
         lp.phi = phip;
         lp.lam = lamp / Q->c;
-    } else
-        I_ERROR
+    } else {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
     return (lp);
 }
 
 
-#if 0
-FREEUP; if (P) pj_dalloc(P); }
-#endif
-
-
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(somerc) {
     double cp, phip0, sp;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
 
@@ -104,62 +88,3 @@ PJ *PROJECTION(somerc) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_somerc_selftest (void) {return 0;}
-#else
-
-int pj_somerc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=somerc   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=somerc   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222638.98158654713,  110579.96521824898},
-        {222638.98158654713,  -110579.96521825089},
-        {-222638.98158654713,  110579.96521824898},
-        {-222638.98158654713,  -110579.96521825089},
-    };
-
-    XY s_fwd_expect[] = {
-        {223402.14425527418,  111706.74357494408},
-        {223402.14425527418,  -111706.74357494518},
-        {-223402.14425527418,  111706.74357494408},
-        {-223402.14425527418,  -111706.74357494518},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017966305682390426,  0.00090436947704129484},
-        {0.0017966305682390426,  -0.00090436947704377105},
-        {-0.0017966305682390426,  0.00090436947704129484},
-        {-0.0017966305682390426,  -0.00090436947704377105},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017904931097838226,  0.00089524655485801927},
-        {0.0017904931097838226,  -0.00089524655484529714},
-        {-0.0017904931097838226,  0.00089524655485801927},
-        {-0.0017904931097838226,  -0.00089524655484529714},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_stere.c b/src/PJ_stere.c
index cc1773d..c01b86f 100644
--- a/src/PJ_stere.c
+++ b/src/PJ_stere.c
@@ -1,16 +1,25 @@
 #define PJ_LIB__
-#include    <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(stere, "Stereographic") "\n\tAzi, Sph&Ell\n\tlat_ts=";
 PROJ_HEAD(ups, "Universal Polar Stereographic") "\n\tAzi, Sph&Ell\n\tsouth";
 
 
+enum Mode {
+    S_POLE = 0,
+    N_POLE = 1,
+    OBLIQ  = 2,
+    EQUIT  = 3
+};
+
 struct pj_opaque {
     double phits;
     double sinX1;
     double cosX1;
     double akm1;
-    int mode;
+    enum Mode mode;
 };
 
 #define sinph0  P->opaque->sinX1
@@ -19,10 +28,6 @@ struct pj_opaque {
 #define TOL 1.e-8
 #define NITER   8
 #define CONV    1.e-10
-#define S_POLE  0
-#define N_POLE  1
-#define OBLIQ   2
-#define EQUIT   3
 
 static double ssfn_ (double phit, double sinphi, double eccen) {
     sinphi *= eccen;
@@ -34,7 +39,7 @@ static double ssfn_ (double phit, double sinphi, double eccen) {
 static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
     XY xy = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-    double coslam, sinlam, sinX = 0.0, cosX = 0.0, X, A, sinphi;
+    double coslam, sinlam, sinX = 0.0, cosX = 0.0, X, A = 0.0, sinphi;
 
     coslam = cos (lp.lam);
     sinlam = sin (lp.lam);
@@ -52,8 +57,13 @@ static XY e_forward (LP lp, PJ *P) {          /* Ellipsoidal, forward */
         goto xmul; /* but why not just  xy.x = A * cosX; break;  ? */
 
     case EQUIT:
-        A = 2. * Q->akm1 / (1. + cosX * coslam);
-        xy.y = A * sinX;
+        /* avoid zero division */
+        if (1. + cosX * coslam == 0.0) {
+            xy.y = HUGE_VAL;
+        } else {
+            A = Q->akm1 / (1. + cosX * coslam);
+            xy.y = A * sinX;
+        }
 xmul:
         xy.x = A * cosX;
         break;
@@ -62,6 +72,7 @@ xmul:
         lp.phi = -lp.phi;
         coslam = - coslam;
         sinphi = -sinphi;
+        /*-fallthrough*/
     case N_POLE:
         xy.x = Q->akm1 * pj_tsfn (lp.phi, sinphi, P->e);
         xy.y = - xy.x * coslam;
@@ -90,7 +101,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     case OBLIQ:
         xy.y = 1. + sinph0 * sinphi + cosph0 * cosphi * coslam;
 oblcon:
-        if (xy.y <= EPS10) F_ERROR;
+        if (xy.y <= EPS10) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         xy.x = (xy.y = Q->akm1 / xy.y) * cosphi * sinlam;
         xy.y *= (Q->mode == EQUIT) ? sinphi :
            cosph0 * sinphi - sinph0 * cosphi * coslam;
@@ -98,8 +112,12 @@ oblcon:
     case N_POLE:
         coslam = - coslam;
         lp.phi = - lp.phi;
+        /*-fallthrough*/
     case S_POLE:
-        if (fabs (lp.phi - M_HALFPI) < TOL) F_ERROR;
+        if (fabs (lp.phi - M_HALFPI) < TOL) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         xy.x = sinlam * ( xy.y = Q->akm1 * tan (M_FORTPI + .5 * lp.phi) );
         xy.y *= coslam;
         break;
@@ -134,6 +152,7 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
         break;
     case N_POLE:
         xy.y = -xy.y;
+        /*-fallthrough*/
     case S_POLE:
         phi_l = M_HALFPI - 2. * atan (tp = - rho / Q->akm1);
         halfpi = -M_HALFPI;
@@ -151,7 +170,9 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
             return lp;
         }
     }
-    I_ERROR;
+
+    proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+    return lp;
 }
 
 
@@ -183,6 +204,7 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
         break;
     case N_POLE:
         xy.y = -xy.y;
+        /*-fallthrough*/
     case S_POLE:
         if (fabs (rh) <= EPS10)
             lp.phi = P->phi0;
@@ -195,19 +217,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 static PJ *setup(PJ *P) {                   /* general initialization */
     double t;
     struct pj_opaque *Q = P->opaque;
@@ -218,7 +227,7 @@ static PJ *setup(PJ *P) {                   /* general initialization */
         Q->mode = t > EPS10 ? OBLIQ : EQUIT;
     Q->phits = fabs (Q->phits);
 
-    if (P->es) {
+    if (P->es != 0.0) {
         double X;
 
         switch (Q->mode) {
@@ -251,6 +260,7 @@ static PJ *setup(PJ *P) {                   /* general initialization */
         case OBLIQ:
             sinph0 = sin (P->phi0);
             cosph0 = cos (P->phi0);
+            /*-fallthrough*/
         case EQUIT:
             Q->akm1 = 2. * P->k0;
             break;
@@ -272,7 +282,7 @@ static PJ *setup(PJ *P) {                   /* general initialization */
 PJ *PROJECTION(stere) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->phits = pj_param (P->ctx, P->params, "tlat_ts").i ?
@@ -285,125 +295,21 @@ PJ *PROJECTION(stere) {
 PJ *PROJECTION(ups) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
-	/* International Ellipsoid */
-	P->phi0 = pj_param(P->ctx, P->params, "bsouth").i ? - M_HALFPI: M_HALFPI;
-	if (!P->es) E_ERROR(-34);
-	P->k0 = .994;
-	P->x0 = 2000000.;
-	P->y0 = 2000000.;
-	Q->phits = M_HALFPI;
-	P->lam0 = 0.;
+    /* International Ellipsoid */
+    P->phi0 = pj_param(P->ctx, P->params, "bsouth").i ? - M_HALFPI: M_HALFPI;
+    if (P->es == 0.0) {
+        proj_errno_set(P, PJD_ERR_ELLIPSOID_USE_REQUIRED);
+        return pj_default_destructor (P, ENOMEM);
+    }
+    P->k0 = .994;
+    P->x0 = 2000000.;
+    P->y0 = 2000000.;
+    Q->phits = M_HALFPI;
+    P->lam0 = 0.;
 
     return setup(P);
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_stere_selftest (void) {return 0;}
-#else
-
-int pj_stere_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=stere   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=stere   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 445289.70910023432,  221221.76694834774},
-        { 445289.70910023432, -221221.76694835056},
-        {-445289.70910023432,  221221.76694834774},
-        {-445289.70910023432, -221221.76694835056},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223407.81025950745,  111737.938996443},
-        { 223407.81025950745, -111737.938996443},
-        {-223407.81025950745,  111737.938996443},
-        {-223407.81025950745, -111737.938996443},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966305682022392,  0.00090436947502443507},
-        { 0.0017966305682022392, -0.00090436947502443507},
-        {-0.0017966305682022392,  0.00090436947502443507},
-        {-0.0017966305682022392, -0.00090436947502443507},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.001790493109747395,  0.00089524655465513144},
-        { 0.001790493109747395, -0.00089524655465513144},
-        {-0.001790493109747395,  0.00089524655465513144},
-        {-0.001790493109747395, -0.00089524655465513144},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
-
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_ups_selftest (void) {return 0;}
-#else
-
-int pj_ups_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=ups   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {2433455.5634384668,  -10412543.301512826},
-        {2448749.1185681992,  -10850493.419804076},
-        {1566544.4365615332,  -10412543.301512826},
-        {1551250.8814318008,  -10850493.419804076},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {-44.998567498074834,  64.9182362867341},
-        {-44.995702709112308,  64.917020250675748},
-        {-45.004297076028529,  64.915804280954518},
-        {-45.001432287066002,  64.914588377560719},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/PJ_sterea.c b/src/PJ_sterea.c
index 1b91231..b1cb736 100644
--- a/src/PJ_sterea.c
+++ b/src/PJ_sterea.c
@@ -24,7 +24,8 @@
 ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
 #define PJ_LIB__
-#include    <projects.h>
+#include <errno.h>
+#include <projects.h>
 
 
 struct pj_opaque {
@@ -36,8 +37,6 @@ struct pj_opaque {
 
 
 PROJ_HEAD(sterea, "Oblique Stereographic Alternative") "\n\tAzimuthal, Sph&Ell";
-# define DEL_TOL    1.e-14
-# define MAX_ITER   10
 
 
 
@@ -64,7 +63,7 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 
     xy.x /= P->k0;
     xy.y /= P->k0;
-    if ( (rho = hypot (xy.x, xy.y)) ) {
+    if ( (rho = hypot (xy.x, xy.y)) != 0.0 ) {
         c = 2. * atan2 (rho, Q->R2);
         sinc = sin (c);
         cosc = cos (c);
@@ -78,21 +77,15 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor (PJ *P, int errlev) {
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
     pj_dealloc (P->opaque->en);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    return pj_default_destructor (P, errlev);
 }
 
 
@@ -101,12 +94,12 @@ PJ *PROJECTION(sterea) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
 
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->en = pj_gauss_ini(P->e, P->phi0, &(Q->phic0), &R);
     if (0==Q->en)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
 
     Q->sinc0 = sin (Q->phic0);
     Q->cosc0 = cos (Q->phic0);
@@ -114,65 +107,8 @@ PJ *PROJECTION(sterea) {
 
     P->inv = e_inverse;
     P->fwd = e_forward;
-    return P;
-}
-
+    P->destructor = destructor;
 
-#ifndef PJ_SELFTEST
-int pj_sterea_selftest (void) {return 0;}
-#else
-
-int pj_sterea_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=sterea   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=sterea   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222644.89410919772,  110611.09187173686},
-        { 222644.89410919772, -110611.09187173827},
-        {-222644.89410919772,  110611.09187173686},
-        {-222644.89410919772, -110611.09187173827},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223407.81025950745,  111737.93899644315},
-        { 223407.81025950745, -111737.93899644315},
-        {-223407.81025950745,  111737.93899644315},
-        {-223407.81025950745, -111737.93899644315},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966305682019911,  0.00090436947683099009},
-        { 0.0017966305682019911, -0.00090436947684371233},
-        {-0.0017966305682019911,  0.00090436947683099009},
-        {-0.0017966305682019911, -0.00090436947684371233},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.001790493109747395,  0.00089524655465446378},
-        { 0.001790493109747395, -0.00089524655465446378},
-        {-0.001790493109747395,  0.00089524655465446378},
-        {-0.001790493109747395, -0.00089524655465446378},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
+    return P;
 }
 
-
-#endif
diff --git a/src/PJ_sts.c b/src/PJ_sts.c
index b6b6dc4..d8866b6 100644
--- a/src/PJ_sts.c
+++ b/src/PJ_sts.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-# include	<projects.h>
+#include <errno.h>
+#include "projects.h"
 
 PROJ_HEAD(kav5,    "Kavraisky V")         "\n\tPCyl., Sph.";
 PROJ_HEAD(qua_aut, "Quartic Authalic")    "\n\tPCyl., Sph.";
@@ -8,7 +9,7 @@ PROJ_HEAD(mbt_s,   "McBryde-Thomas Flat-Polar Sine (No. 1)") "\n\tPCyl., Sph.";
 
 
 struct pj_opaque {
-	double C_x, C_y, C_p; \
+	double C_x, C_y, C_p;
 	int tan_mode;
 };
 
@@ -50,19 +51,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 static PJ *setup(PJ *P, double p, double q, int mode) {
 	P->es  = 0.;
 	P->inv = s_inverse;
@@ -76,276 +64,42 @@ static PJ *setup(PJ *P, double p, double q, int mode) {
 
 
 
-
-
 PJ *PROJECTION(fouc) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
     return setup(P, 2., 2., 1);
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_fouc_selftest (void) {return 0;}
-#else
-int pj_fouc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=fouc   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=fouc   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222588.12067589167,  111322.31670069379},
-        {222588.12067589167,  -111322.31670069379},
-        {-222588.12067589167,  111322.31670069379},
-        {-222588.12067589167,  -111322.31670069379},
-    };
-
-    XY s_fwd_expect[] = {
-        {223351.10900341379,  111703.9077217125},
-        {223351.10900341379,  -111703.9077217125},
-        {-223351.10900341379,  111703.9077217125},
-        {-223351.10900341379,  -111703.9077217125},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017966305685702751,  0.00089831528410111959},
-        {0.0017966305685702751,  -0.00089831528410111959},
-        {-0.0017966305685702751,  0.00089831528410111959},
-        {-0.0017966305685702751,  -0.00089831528410111959},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017904931101116717,  0.00089524655487369749},
-        {0.0017904931101116717,  -0.00089524655487369749},
-        {-0.0017904931101116717,  0.00089524655487369749},
-        {-0.0017904931101116717,  -0.00089524655487369749},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-#endif
-
-
-
-
-
 
 PJ *PROJECTION(kav5) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
     return setup(P, 1.50488, 1.35439, 0);
 }
 
 
-#ifndef PJ_SELFTEST
-int pj_kav5_selftest (void) {return 0;}
-#else
-int pj_kav5_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=kav5   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=kav5   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {200360.90530882866,  123685.08247699818},
-        {200360.90530882866,  -123685.08247699818},
-        {-200360.90530882866,  123685.08247699818},
-        {-200360.90530882866,  -123685.08247699818},
-    };
-
-    XY s_fwd_expect[] = {
-        {201047.7031108776,  124109.05062917093},
-        {201047.7031108776,  -124109.05062917093},
-        {-201047.7031108776,  124109.05062917093},
-        {-201047.7031108776,  -124109.05062917093},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0019962591348533314,  0.00080848256185253912},
-        {0.0019962591348533314,  -0.00080848256185253912},
-        {-0.0019962591348533314,  0.00080848256185253912},
-        {-0.0019962591348533314,  -0.00080848256185253912},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0019894397264987643,  0.00080572070962591153},
-        {0.0019894397264987643,  -0.00080572070962591153},
-        {-0.0019894397264987643,  0.00080572070962591153},
-        {-0.0019894397264987643,  -0.00080572070962591153},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-#endif
-
-
-
-
 
 PJ *PROJECTION(qua_aut) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
     return setup(P, 2., 2., 0);
 }
 
-#ifndef PJ_SELFTEST
-int pj_qua_aut_selftest (void) {return 0;}
-#else
-int pj_qua_aut_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=qua_aut   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=qua_aut   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222613.54903309655,  111318.07788798446},
-        {222613.54903309655,  -111318.07788798446},
-        {-222613.54903309655,  111318.07788798446},
-        {-222613.54903309655,  -111318.07788798446},
-    };
-
-    XY s_fwd_expect[] = {
-        {223376.62452402918,  111699.65437918637},
-        {223376.62452402918,  -111699.65437918637},
-        {-223376.62452402918,  111699.65437918637},
-        {-223376.62452402918,  -111699.65437918637},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017966305684046586,  0.00089831528412872229},
-        {0.0017966305684046586,  -0.00089831528412872229},
-        {-0.0017966305684046586,  0.00089831528412872229},
-        {-0.0017966305684046586,  -0.00089831528412872229},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0017904931099477471,  0.00089524655490101819},
-        {0.0017904931099477471,  -0.00089524655490101819},
-        {-0.0017904931099477471,  0.00089524655490101819},
-        {-0.0017904931099477471,  -0.00089524655490101819},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-#endif
-
-
-
 
 
 PJ *PROJECTION(mbt_s) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
     return setup(P, 1.48875, 1.36509, 0);
 }
 
-#ifndef PJ_SELFTEST
-int pj_mbt_s_selftest (void) {return 0;}
-#else
-int pj_mbt_s_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=mbt_s   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=mbt_s   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {204131.51785027285,  121400.33022550763},
-        {204131.51785027285,  -121400.33022550763},
-        {-204131.51785027285,  121400.33022550763},
-        {-204131.51785027285,  -121400.33022550763},
-    };
-
-    XY s_fwd_expect[] = {
-        {204831.24057099217,  121816.46669603503},
-        {204831.24057099217,  -121816.46669603503},
-        {-204831.24057099217,  121816.46669603503},
-        {-204831.24057099217,  -121816.46669603503},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0019593827209883237,  0.00082369854658027549},
-        {0.0019593827209883237,  -0.00082369854658027549},
-        {-0.0019593827209883237,  0.00082369854658027549},
-        {-0.0019593827209883237,  -0.00082369854658027549},
-    };
-
-    LP s_inv_expect[] = {
-        {0.0019526892859206603,  0.00082088471512331508},
-        {0.0019526892859206603,  -0.00082088471512331508},
-        {-0.0019526892859206603,  0.00082088471512331508},
-        {-0.0019526892859206603,  -0.00082088471512331508},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-#endif
diff --git a/src/PJ_tcc.c b/src/PJ_tcc.c
index 316d5e5..c6600ae 100644
--- a/src/PJ_tcc.c
+++ b/src/PJ_tcc.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include    <projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(tcc, "Transverse Central Cylindrical") "\n\tCyl, Sph, no inv.";
 
@@ -11,23 +12,16 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     double b, bt;
 
     b = cos (lp.phi) * sin (lp.lam);
-    if ((bt = 1. - b * b) < EPS10) F_ERROR;
+    if ((bt = 1. - b * b) < EPS10) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
     xy.x = b / sqrt(bt);
     xy.y = atan2 (tan (lp.phi) , cos (lp.lam));
     return xy;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(tcc) {
     P->es  = 0.;
     P->fwd = s_forward;
@@ -36,30 +30,3 @@ PJ *PROJECTION(tcc) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_tcc_selftest (void) {return 0;}
-#else
-int pj_tcc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=tcc   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {223458.84419245756,  111769.14504058579},
-        {223458.84419245756,  -111769.14504058579},
-        {-223458.84419245756,  111769.14504058579},
-        {-223458.84419245756,  -111769.14504058579},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-#endif
diff --git a/src/PJ_tcea.c b/src/PJ_tcea.c
index d219928..415b42d 100644
--- a/src/PJ_tcea.c
+++ b/src/PJ_tcea.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include    <projects.h>
+#include    "projects.h"
 
 PROJ_HEAD(tcea, "Transverse Cylindrical Equal Area") "\n\tCyl, Sph";
 
@@ -25,16 +25,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(tcea) {
     P->inv = s_inverse;
     P->fwd = s_forward;
@@ -42,44 +32,3 @@ PJ *PROJECTION(tcea) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_tcea_selftest (void) {return 0;}
-#else
-int pj_tcea_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=tcea   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223322.76057672748,  111769.14504058579},
-        { 223322.76057672748, -111769.14504058579},
-        {-223322.76057672748,  111769.14504058579},
-        {-223322.76057672748, -111769.14504058579},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931102938101,  0.00089524655445477922},
-        { 0.0017904931102938101, -0.00089524655445477922},
-        {-0.0017904931102938101,  0.00089524655445477922},
-        {-0.0017904931102938101, -0.00089524655445477922},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-#endif
diff --git a/src/PJ_times.c b/src/PJ_times.c
index 5d3b039..74b7939 100644
--- a/src/PJ_times.c
+++ b/src/PJ_times.c
@@ -66,20 +66,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {              /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(times) {
     P->es = 0.0;
 
@@ -89,47 +75,3 @@ PJ *PROJECTION(times) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_times_selftest (void) {return 0;}
-#else
-
-int pj_times_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-    int result;
-    int n = 5;
-
-    char s_args[] = {"+proj=times +ellps=sphere"};
-
-    XY *inv_in = malloc(n*sizeof(XY));
-    LP *s_inv_expect = malloc(n*sizeof(LP));
-
-    LP fwd_in[] = {
-        {  0,   0},
-        { 80,  70},
-        { 25, -10},
-        {-35,  20},
-        {-45, -30}
-    };
-
-    XY s_fwd_expect[] = {
-        { 0.0,  0.0},
-        { 5785183.5760670956,  7615452.0661204215},
-        { 2065971.5301078814, -951526.0648494592},
-        {-2873054.0454850947,  1917730.9530005211},
-        {-3651383.2035214868, -2914213.4578159209},
-    };
-
-    memcpy(inv_in, &s_fwd_expect, n*sizeof(XY));
-    memcpy(s_inv_expect, &fwd_in, n*sizeof(LP));
-
-    result = pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, n, n, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-    free(inv_in);
-    free(s_inv_expect);
-
-    return result;
-}
-
-
-#endif
diff --git a/src/PJ_tmerc.c b/src/PJ_tmerc.c
index edae80f..77fb582 100644
--- a/src/PJ_tmerc.c
+++ b/src/PJ_tmerc.c
@@ -1,12 +1,14 @@
 #define PJ_LIB__
-#include    <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(tmerc, "Transverse Mercator") "\n\tCyl, Sph&Ell";
 
 
 struct pj_opaque {
-    double  esp; \
-    double  ml0; \
+    double  esp;
+    double  ml0;
     double  *en;
 };
 
@@ -83,16 +85,20 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 
     cosphi = cos(lp.phi);
     b = cosphi * sin (lp.lam);
-    if (fabs (fabs (b) - 1.) <= EPS10)
-        F_ERROR;
+    if (fabs (fabs (b) - 1.) <= EPS10) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
 
     xy.x = P->opaque->ml0 * log ((1. + b) / (1. - b));
     xy.y = cosphi * cos (lp.lam) / sqrt (1. - b * b);
 
     b = fabs ( xy.y );
     if (b >= 1.) {
-        if ((b - 1.) > EPS10)
-            F_ERROR
+        if ((b - 1.) > EPS10) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         else xy.y = 0.;
     } else
         xy.y = acos (xy.y);
@@ -126,7 +132,7 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
             ds * FC4 * (5. + t * (3. - 9. *  n) + n * (1. - 4 * n) -
             ds * FC6 * (61. + t * (90. - 252. * n +
                 45. * t) + 46. * n
-           - ds * FC8 * (1385. + t * (3633. + t * (4095. + 1574. * t)) )
+           - ds * FC8 * (1385. + t * (3633. + t * (4095. + 1575. * t)) )
             )));
         lp.lam = d*(FC1 -
             ds*FC3*( 1. + 2.*t + n -
@@ -146,32 +152,33 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     g = .5 * (h - 1. / h);
     h = cos (P->phi0 + xy.y / P->opaque->esp);
     lp.phi = asin(sqrt((1. - h * h) / (1. + g * g)));
-    if (xy.y < 0.) lp.phi = -lp.phi;
-    lp.lam = (g || h) ? atan2 (g, h) : 0.;
+
+    /* Make sure that phi is on the correct hemisphere when false northing is used */
+    if (xy.y < 0. && -lp.phi+P->phi0 < 0.0) lp.phi = -lp.phi;
+
+    lp.lam = (g != 0.0 || h != 0.0) ? atan2 (g, h) : 0.;
     return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor(PJ *P, int errlev) {                       /* Destructor */
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor(P, errlev);
+
     pj_dealloc (P->opaque->en);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
+    return pj_default_destructor(P, errlev);
 }
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
 
 static PJ *setup(PJ *P) {                   /* general initialization */
     struct pj_opaque *Q = P->opaque;
-    if (P->es) {
+    if (P->es != 0.0) {
         if (!(Q->en = pj_enfn(P->es)))
-            E_ERROR_0;
+            return pj_default_destructor(P, ENOMEM);
+
         Q->ml0 = pj_mlfn(P->phi0, sin(P->phi0), cos(P->phi0), Q->en);
         Q->esp = P->es / (1. - P->es);
         P->inv = e_inverse;
@@ -189,64 +196,11 @@ static PJ *setup(PJ *P) {                   /* general initialization */
 PJ *PROJECTION(tmerc) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
+
     P->opaque = Q;
+    P->destructor = destructor;
+
     return setup(P);
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_tmerc_selftest (void) {return 0;}
-#else
-int pj_tmerc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=tmerc   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=tmerc   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222650.79679577847,  110642.22941192707},
-        { 222650.79679577847, -110642.22941192707},
-        {-222650.79679577847,  110642.22941192707},
-        {-222650.79679577847, -110642.22941192707},
-    };
-
-    XY s_fwd_expect[] = {
-        { 223413.46640632232,  111769.14504059685},
-        { 223413.46640632232, -111769.14504059685},
-        {-223413.46640632208,  111769.14504059685},
-        {-223413.46640632208, -111769.14504059685},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966305681649396,  0.00090436947663183841},
-        { 0.0017966305681649396, -0.00090436947663183841},
-        {-0.0017966305681649396,  0.00090436947663183841},
-        {-0.0017966305681649396, -0.00090436947663183841},
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931097048034,  0.00089524670602767842},
-        { 0.0017904931097048034, -0.00089524670602767842},
-        {-0.001790493109714345,   0.00089524670602767842},
-        {-0.001790493109714345,  -0.00089524670602767842},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-#endif
diff --git a/src/PJ_tpeqd.c b/src/PJ_tpeqd.c
index 1b289a0..eee5b3c 100644
--- a/src/PJ_tpeqd.c
+++ b/src/PJ_tpeqd.c
@@ -1,177 +1,106 @@
 #define PJ_LIB__
-#include	<projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 
 PROJ_HEAD(tpeqd, "Two Point Equidistant")
-	"\n\tMisc Sph\n\tlat_1= lon_1= lat_2= lon_2=";
+    "\n\tMisc Sph\n\tlat_1= lon_1= lat_2= lon_2=";
 
 struct pj_opaque {
-	double cp1, sp1, cp2, sp2, ccs, cs, sc, r2z0, z02, dlam2; \
-	double hz0, thz0, rhshz0, ca, sa, lp, lamc;
+    double cp1, sp1, cp2, sp2, ccs, cs, sc, r2z0, z02, dlam2;
+    double hz0, thz0, rhshz0, ca, sa, lp, lamc;
 };
 
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0, 0.0};
     struct pj_opaque *Q = P->opaque;
-	double t, z1, z2, dl1, dl2, sp, cp;
-
-	sp = sin(lp.phi);
-	cp = cos(lp.phi);
-	z1 = aacos(P->ctx, Q->sp1 * sp + Q->cp1 * cp * cos (dl1 = lp.lam + Q->dlam2));
-	z2 = aacos(P->ctx, Q->sp2 * sp + Q->cp2 * cp * cos (dl2 = lp.lam - Q->dlam2));
-	z1 *= z1;
-	z2 *= z2;
-
-	xy.x = Q->r2z0 * (t = z1 - z2);
-	t = Q->z02 - t;
-	xy.y = Q->r2z0 * asqrt (4. * Q->z02 * z2 - t * t);
-	if ((Q->ccs * sp - cp * (Q->cs * sin(dl1) - Q->sc * sin(dl2))) < 0.)
-		xy.y = -xy.y;
-	return xy;
+    double t, z1, z2, dl1, dl2, sp, cp;
+
+    sp = sin(lp.phi);
+    cp = cos(lp.phi);
+    z1 = aacos(P->ctx, Q->sp1 * sp + Q->cp1 * cp * cos (dl1 = lp.lam + Q->dlam2));
+    z2 = aacos(P->ctx, Q->sp2 * sp + Q->cp2 * cp * cos (dl2 = lp.lam - Q->dlam2));
+    z1 *= z1;
+    z2 *= z2;
+
+    xy.x = Q->r2z0 * (t = z1 - z2);
+    t = Q->z02 - t;
+    xy.y = Q->r2z0 * asqrt (4. * Q->z02 * z2 - t * t);
+    if ((Q->ccs * sp - cp * (Q->cs * sin(dl1) - Q->sc * sin(dl2))) < 0.)
+        xy.y = -xy.y;
+    return xy;
 }
 
 
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
     struct pj_opaque *Q = P->opaque;
-	double cz1, cz2, s, d, cp, sp;
-
-	cz1 = cos (hypot(xy.y, xy.x + Q->hz0));
-	cz2 = cos (hypot(xy.y, xy.x - Q->hz0));
-	s = cz1 + cz2;
-	d = cz1 - cz2;
-	lp.lam = - atan2(d, (s * Q->thz0));
-	lp.phi = aacos(P->ctx, hypot (Q->thz0 * s, d) * Q->rhshz0);
-	if ( xy.y < 0. )
-		lp.phi = - lp.phi;
-	/* lam--phi now in system relative to P1--P2 base equator */
-	sp = sin (lp.phi);
-	cp = cos (lp.phi);
-	lp.phi = aasin (P->ctx, Q->sa * sp + Q->ca * cp * (s = cos(lp.lam -= Q->lp)));
-	lp.lam = atan2 (cp * sin(lp.lam), Q->sa * cp * s - Q->ca * sp) + Q->lamc;
-	return lp;
-}
-
-
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    double cz1, cz2, s, d, cp, sp;
+
+    cz1 = cos (hypot(xy.y, xy.x + Q->hz0));
+    cz2 = cos (hypot(xy.y, xy.x - Q->hz0));
+    s = cz1 + cz2;
+    d = cz1 - cz2;
+    lp.lam = - atan2(d, (s * Q->thz0));
+    lp.phi = aacos(P->ctx, hypot (Q->thz0 * s, d) * Q->rhshz0);
+    if ( xy.y < 0. )
+        lp.phi = - lp.phi;
+    /* lam--phi now in system relative to P1--P2 base equator */
+    sp = sin (lp.phi);
+    cp = cos (lp.phi);
+    lp.phi = aasin (P->ctx, Q->sa * sp + Q->ca * cp * (s = cos(lp.lam -= Q->lp)));
+    lp.lam = atan2 (cp * sin(lp.lam), Q->sa * cp * s - Q->ca * sp) + Q->lamc;
+    return lp;
 }
 
 
 PJ *PROJECTION(tpeqd) {
-	double lam_1, lam_2, phi_1, phi_2, A12, pp;
+    double lam_1, lam_2, phi_1, phi_2, A12, pp;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
 
-	/* get control point locations */
-	phi_1 = pj_param(P->ctx, P->params, "rlat_1").f;
-	lam_1 = pj_param(P->ctx, P->params, "rlon_1").f;
-	phi_2 = pj_param(P->ctx, P->params, "rlat_2").f;
-	lam_2 = pj_param(P->ctx, P->params, "rlon_2").f;
-
-	if (phi_1 == phi_2 && lam_1 == lam_2)
-        E_ERROR(-25);
-	P->lam0  = adjlon (0.5 * (lam_1 + lam_2));
-	Q->dlam2 = adjlon (lam_2 - lam_1);
-
-	Q->cp1 = cos (phi_1);
-	Q->cp2 = cos (phi_2);
-	Q->sp1 = sin (phi_1);
-	Q->sp2 = sin (phi_2);
-	Q->cs = Q->cp1 * Q->sp2;
-	Q->sc = Q->sp1 * Q->cp2;
-	Q->ccs = Q->cp1 * Q->cp2 * sin(Q->dlam2);
-	Q->z02 = aacos(P->ctx, Q->sp1 * Q->sp2 + Q->cp1 * Q->cp2 * cos (Q->dlam2));
-	Q->hz0 = .5 * Q->z02;
-	A12 = atan2(Q->cp2 * sin (Q->dlam2),
-		Q->cp1 * Q->sp2 - Q->sp1 * Q->cp2 * cos (Q->dlam2));
-	Q->ca = cos(pp = aasin(P->ctx, Q->cp1 * sin(A12)));
-	Q->sa = sin(pp);
-	Q->lp = adjlon ( atan2 (Q->cp1 * cos(A12), Q->sp1) - Q->hz0);
-	Q->dlam2 *= .5;
-	Q->lamc = M_HALFPI - atan2(sin(A12) * Q->sp1, cos(A12)) - Q->dlam2;
-	Q->thz0 = tan (Q->hz0);
-	Q->rhshz0 = .5 / sin (Q->hz0);
-	Q->r2z0 = 0.5 / Q->z02;
-	Q->z02 *= Q->z02;
+    /* get control point locations */
+    phi_1 = pj_param(P->ctx, P->params, "rlat_1").f;
+    lam_1 = pj_param(P->ctx, P->params, "rlon_1").f;
+    phi_2 = pj_param(P->ctx, P->params, "rlat_2").f;
+    lam_2 = pj_param(P->ctx, P->params, "rlon_2").f;
+
+    if (phi_1 == phi_2 && lam_1 == lam_2)
+        return pj_default_destructor(P, PJD_ERR_CONTROL_POINT_NO_DIST);
+
+    P->lam0  = adjlon (0.5 * (lam_1 + lam_2));
+    Q->dlam2 = adjlon (lam_2 - lam_1);
+
+    Q->cp1 = cos (phi_1);
+    Q->cp2 = cos (phi_2);
+    Q->sp1 = sin (phi_1);
+    Q->sp2 = sin (phi_2);
+    Q->cs = Q->cp1 * Q->sp2;
+    Q->sc = Q->sp1 * Q->cp2;
+    Q->ccs = Q->cp1 * Q->cp2 * sin(Q->dlam2);
+    Q->z02 = aacos(P->ctx, Q->sp1 * Q->sp2 + Q->cp1 * Q->cp2 * cos (Q->dlam2));
+    Q->hz0 = .5 * Q->z02;
+    A12 = atan2(Q->cp2 * sin (Q->dlam2),
+        Q->cp1 * Q->sp2 - Q->sp1 * Q->cp2 * cos (Q->dlam2));
+    Q->ca = cos(pp = aasin(P->ctx, Q->cp1 * sin(A12)));
+    Q->sa = sin(pp);
+    Q->lp = adjlon ( atan2 (Q->cp1 * cos(A12), Q->sp1) - Q->hz0);
+    Q->dlam2 *= .5;
+    Q->lamc = M_HALFPI - atan2(sin(A12) * Q->sp1, cos(A12)) - Q->dlam2;
+    Q->thz0 = tan (Q->hz0);
+    Q->rhshz0 = .5 / sin (Q->hz0);
+    Q->r2z0 = 0.5 / Q->z02;
+    Q->z02 *= Q->z02;
 
     P->inv = s_inverse;
     P->fwd = s_forward;
-	P->es = 0.;
+    P->es = 0.;
 
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_tpeqd_selftest (void) {return 0;}
-#else
-
-int pj_tpeqd_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=tpeqd   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5"};
-    char s_args[] = {"+proj=tpeqd   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {-27750.758831679042,  -222599.40369177726},
-        {-250434.93702403645,  -222655.93819326628},
-        {-27750.758831679042,  222599.40369177726},
-        {-250434.93702403645,  222655.93819326628},
-    };
-
-    XY s_fwd_expect[] = {
-        {-27845.882978485075,  -223362.43069526015},
-        {-251293.37876465076,  -223419.15898590829},
-        {-27845.882978485075,  223362.43069526015},
-        {-251293.37876465076,  223419.15898590829},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {-0.00089855554821257374,  1.2517966304145272},
-        {0.0008985555481998515,  1.2517966304145272},
-        {-0.00089855431859741167,  1.2482033692781642},
-        {0.00089855431859741167,  1.2482033692781642},
-    };
-
-    LP s_inv_expect[] = {
-        {-0.00089548606640108474,  1.2517904929571837},
-        {0.0008954860663883625,  1.2517904929571837},
-        {-0.000895484845182587,  1.248209506737604},
-        {0.00089548484516986475,  1.248209506737604},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, s_fwd_expect, inv_in, e_inv_expect, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c
new file mode 100644
index 0000000..0622436
--- /dev/null
+++ b/src/PJ_unitconvert.c
@@ -0,0 +1,487 @@
+/***********************************************************************
+
+            Unit conversion pseudo-projection for use with
+                       transformation pipelines.
+
+                      Kristian Evers, 2017-05-16
+
+************************************************************************
+
+A pseudo-projection that can be used to convert units of input and
+output data. Primarily useful in pipelines.
+
+Unit conversion is performed by means of a pivot unit. The pivot unit
+for distance units are the meter and for time we use the modified julian
+date. A time unit conversion is performed like
+
+    Unit A -> Modified Julian date -> Unit B
+
+distance units are converted in the same manner, with meter being the
+central unit.
+
+The modified Julian date is chosen as the pivot unit since it has a
+fairly high precision, goes sufficiently long backwards in time, has no
+danger of hitting the upper limit in the near future and it is a fairly
+common time unit in astronomy and geodesy. Note that we are using the
+Julian date and not day. The difference being that the latter is defined
+as an integer and is thus limited to days in resolution. This approach
+has been extended wherever it makes sense, e.g. the GPS week unit also
+has a fractional part that makes it possible to determine the day, hour
+and minute of an observation.
+
+In- and output units are controlled with the parameters
+
+    +xy_in, +xy_out, +z_in, +z_out, +t_in and +t_out
+
+where xy denotes horizontal units, z vertical units and t time units.
+
+************************************************************************
+
+Kristian Evers, kreve at sdfe.dk, 2017-05-09
+Last update: 2017-05-16
+
+************************************************************************
+* Copyright (c) 2017, Kristian Evers / SDFE
+*
+* 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.
+*
+***********************************************************************/
+
+#define PJ_LIB__
+#include <time.h>
+#include <errno.h>
+#include "proj_internal.h"
+#include "projects.h"
+
+PROJ_HEAD(unitconvert, "Unit conversion");
+
+typedef double (*tconvert)(double);
+
+struct TIME_UNITS {
+    char        *id;        /* units keyword */
+    tconvert     t_in;      /* unit -> mod. julian date funtion pointer */
+    tconvert     t_out;     /* mod. julian date > unit function pointer */
+    char        *name;      /* comments */
+};
+
+struct pj_opaque_unitconvert {
+    int     t_in_id;        /* time unit id for the time input unit   */
+    int     t_out_id;       /* time unit id for the time output unit  */
+    double  xy_factor;      /* unit conversion factor for horizontal components */
+    double  z_factor;       /* unit conversion factor for vertical components */
+};
+
+
+/***********************************************************************/
+static int is_leap_year(int year) {
+/***********************************************************************/
+    return ((year % 4 == 0 && year % 100 != 0) || year % 400 ==0);
+}
+
+
+/***********************************************************************/
+static int days_in_year(int year) {
+/***********************************************************************/
+    return is_leap_year(year) ? 366 : 365;
+}
+
+/***********************************************************************/
+static unsigned int days_in_month(unsigned int year, unsigned int month) {
+/***********************************************************************/
+    const unsigned int month_table[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+    unsigned int days;
+
+    if (month > 12) month = 12;
+    if (month == 0) month = 1;
+
+    days = month_table[month-1];
+    if (is_leap_year(year) && month == 2) days++;
+
+    return days;
+}
+
+
+/***********************************************************************/
+static int daynumber_in_year(unsigned int year, unsigned int month, unsigned int day) {
+/***********************************************************************/
+    unsigned int daynumber=0, i;
+
+    if (month > 12) month = 12;
+    if (month == 0) month = 1;
+    if (day > days_in_month(year, month)) day = days_in_month(year, month);
+
+    for (i = 1; i < month; i++)
+        daynumber += days_in_month(year, i);
+
+    daynumber += day;
+
+    return daynumber;
+
+}
+
+/***********************************************************************/
+static double mjd_to_mjd(double mjd) {
+/***********************************************************************
+    Modified julian date no-op function.
+
+    The Julian date is defined as (fractional) days since midnight
+    on 16th of November in 1858.
+************************************************************************/
+    return mjd;
+}
+
+
+/***********************************************************************/
+static double decimalyear_to_mjd(double decimalyear) {
+/***********************************************************************
+    Epoch of modified julian date is 1858-11-16 00:00
+************************************************************************/
+    int year;
+    double fractional_year;
+    double mjd;
+
+    if( decimalyear < -10000 || decimalyear > 10000 )
+        return 0;
+
+    year = (int)floor(decimalyear);
+    fractional_year = decimalyear - year;
+    mjd = (year - 1859)*365 + 14 + 31;
+    mjd += fractional_year*days_in_year(year);
+
+    /* take care of leap days */
+    year--;
+    for (; year > 1858; year--)
+        if (is_leap_year(year))
+            mjd++;
+
+    return mjd;
+}
+
+
+/***********************************************************************/
+static double mjd_to_decimalyear(double mjd) {
+/***********************************************************************
+    Epoch of modified julian date is 1858-11-16 00:00
+************************************************************************/
+    double decimalyear = mjd;
+    double mjd_iter = 14 + 31;
+    int year = 1859;
+
+    /* a smarter brain than mine could probably to do this more elegantly
+       - I'll just brute-force my way out of this... */
+    for (; mjd >= mjd_iter; year++) {
+        mjd_iter += days_in_year(year);
+    }
+    year--;
+    mjd_iter -= days_in_year(year);
+
+    decimalyear = year + (mjd-mjd_iter)/days_in_year(year);
+    return decimalyear;
+}
+
+
+/***********************************************************************/
+static double gps_week_to_mjd(double gps_week) {
+/***********************************************************************
+    GPS weeks are defined as the number of weeks since January the 6th
+    1980.
+
+    Epoch of gps weeks is 1980-01-06 00:00, which in modified Julian
+    date is 44244.
+************************************************************************/
+    return 44244.0 + gps_week*7.0;
+}
+
+
+/***********************************************************************/
+static double mjd_to_gps_week(double mjd) {
+/***********************************************************************
+    GPS weeks are defined as the number of weeks since January the 6th
+    1980.
+
+    Epoch of gps weeks is 1980-01-06 00:00, which in modified Julian
+    date is 44244.
+************************************************************************/
+    return (mjd - 44244.0) / 7.0;
+}
+
+
+/***********************************************************************/
+static double yyyymmdd_to_mjd(double yyyymmdd) {
+/************************************************************************
+    Date given in YYYY-MM-DD format.
+************************************************************************/
+
+    int year  = (int)floor( yyyymmdd / 10000 );
+    int month = (int)floor((yyyymmdd - year*10000) / 100);
+    int day   = (int)floor( yyyymmdd - year*10000 - month*100);
+    double mjd = daynumber_in_year(year, month, day);
+
+    for (year -= 1; year > 1858; year--)
+        mjd += days_in_year(year);
+
+    return mjd + 13 + 31;
+}
+
+
+/***********************************************************************/
+static double mjd_to_yyyymmdd(double mjd) {
+/************************************************************************
+    Date given in YYYY-MM-DD format.
+************************************************************************/
+    double mjd_iter = 14 + 31;
+    int year = 1859, month=0, day=0;
+
+    for (; mjd >= mjd_iter; year++) {
+        mjd_iter += days_in_year(year);
+    }
+    year--;
+    mjd_iter -= days_in_year(year);
+
+    for (month=1; mjd_iter + days_in_month(year, month) <= mjd; month++)
+        mjd_iter += days_in_month(year, month);
+
+    day = (int)(mjd - mjd_iter + 1);
+
+    return year*10000.0 + month*100.0 + day;
+}
+
+static const struct TIME_UNITS time_units[] = {
+    {"mjd",         mjd_to_mjd,         mjd_to_mjd,         "Modified julian date"},
+    {"decimalyear", decimalyear_to_mjd, mjd_to_decimalyear, "Decimal year"},
+    {"gps_week",    gps_week_to_mjd,    mjd_to_gps_week,    "GPS Week"},
+    {"yyyymmdd",    yyyymmdd_to_mjd,    mjd_to_yyyymmdd,    "YYYYMMDD date"},
+    {NULL,          NULL,               NULL,               NULL}
+};
+
+
+/***********************************************************************/
+static XY forward_2d(LP lp, PJ *P) {
+/************************************************************************
+    Forward unit conversions in the plane
+************************************************************************/
+    struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+    point.lp = lp;
+
+    point.xy.x *= Q->xy_factor;
+    point.xy.y *= Q->xy_factor;
+
+    return point.xy;
+}
+
+
+/***********************************************************************/
+static LP reverse_2d(XY xy, PJ *P) {
+/************************************************************************
+    Reverse unit conversions in the plane
+************************************************************************/
+    struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+    point.xy = xy;
+
+    point.xy.x /= Q->xy_factor;
+    point.xy.y /= Q->xy_factor;
+
+    return point.lp;
+}
+
+
+/***********************************************************************/
+static XYZ forward_3d(LPZ lpz, PJ *P) {
+/************************************************************************
+    Forward unit conversions the vertical component
+************************************************************************/
+    struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+    point.lpz = lpz;
+
+    /* take care of the horizontal components in the 2D function */
+    point.xy = forward_2d(point.lp, P);
+
+    point.xyz.z *= Q->z_factor;
+
+    return point.xyz;
+}
+
+/***********************************************************************/
+static LPZ reverse_3d(XYZ xyz, PJ *P) {
+/************************************************************************
+    Reverse unit conversions the vertical component
+************************************************************************/
+    struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque;
+    PJ_COORD point = {{0,0,0,0}};
+    point.xyz = xyz;
+
+    /* take care of the horizontal components in the 2D function */
+    point.lp = reverse_2d(point.xy, P);
+
+    point.xyz.z /= Q->z_factor;
+
+    return point.lpz;
+}
+
+
+/***********************************************************************/
+static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) {
+/************************************************************************
+    Forward conversion of time units
+************************************************************************/
+    struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque;
+    PJ_COORD out = obs;
+
+    /* delegate unit conversion of physical dimensions to the 3D function */
+    out.xyz = forward_3d(obs.lpz, P);
+
+    if (Q->t_in_id >= 0)
+        out.xyzt.t = time_units[Q->t_in_id].t_in( obs.xyzt.t );
+    if (Q->t_out_id >= 0)
+        out.xyzt.t = time_units[Q->t_out_id].t_out( out.xyzt.t );
+
+    return out;
+}
+
+
+/***********************************************************************/
+static PJ_COORD reverse_4d(PJ_COORD obs, PJ *P) {
+/************************************************************************
+    Reverse conversion of time units
+************************************************************************/
+    struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque;
+    PJ_COORD out = obs;
+
+    /* delegate unit conversion of physical dimensions to the 3D function */
+    out.lpz = reverse_3d(obs.xyz, P);
+
+    if (Q->t_out_id >= 0)
+        out.xyzt.t = time_units[Q->t_out_id].t_in( obs.xyzt.t );
+    if (Q->t_in_id >= 0)
+        out.xyzt.t = time_units[Q->t_in_id].t_out( out.xyzt.t );
+
+    return out;
+}
+
+
+/***********************************************************************/
+PJ *CONVERSION(unitconvert,0) {
+/***********************************************************************/
+    struct pj_opaque_unitconvert *Q = pj_calloc (1, sizeof (struct pj_opaque_unitconvert));
+    char *s, *name;
+    int i;
+    double f;
+
+    if (0==Q)
+        return pj_default_destructor (P, ENOMEM);
+    P->opaque = (void *) Q;
+
+    P->fwd4d  = forward_4d;
+    P->inv4d  = reverse_4d;
+    P->fwd3d  = forward_3d;
+    P->inv3d  = reverse_3d;
+    P->fwd    = forward_2d;
+    P->inv    = reverse_2d;
+
+    P->left  = PJ_IO_UNITS_WHATEVER;
+    P->right = PJ_IO_UNITS_WHATEVER;
+
+    /* if no time input/output unit is specified we can skip them */
+    Q->t_in_id = -1;
+    Q->t_out_id = -1;
+
+    Q->xy_factor = 1.0;
+    Q->z_factor  = 1.0;
+
+    if ((name = pj_param (P->ctx, P->params, "sxy_in").s) != NULL) {
+        for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i);
+
+        if (s) {
+            f = pj_units[i].factor;
+            proj_log_debug(P, "xy_in unit: %s", pj_units[i].name);
+        } else {
+            if ( (f = pj_param (P->ctx, P->params, "dxy_in").f) == 0.0)
+                return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID);
+        }
+        if (f != 0.0)
+            Q->xy_factor *= f;
+    }
+
+    if ((name = pj_param (P->ctx, P->params, "sxy_out").s) != NULL) {
+        for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i);
+
+        if (s) {
+            f = pj_units[i].factor;
+            proj_log_debug(P, "xy_out unit: %s", pj_units[i].name);
+        } else {
+            if ( (f = pj_param (P->ctx, P->params, "dxy_out").f) == 0.0)
+                return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID);
+        }
+        if (f != 0.0)
+            Q->xy_factor /= f;
+    }
+
+    if ((name = pj_param (P->ctx, P->params, "sz_in").s) != NULL) {
+        for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i);
+
+        if (s) {
+            f = pj_units[i].factor;
+            proj_log_debug(P, "z_in unit: %s", pj_units[i].name);
+        } else {
+            if ( (f = pj_param (P->ctx, P->params, "dz_in").f) == 0.0)
+                return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID);
+        }
+        if (f != 0.0)
+            Q->z_factor *= f;
+    }
+
+    if ((name = pj_param (P->ctx, P->params, "sz_out").s) != NULL) {
+        for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i);
+
+        if (s) {
+            f = pj_units[i].factor;
+            proj_log_debug(P, "z_out unit: %s", pj_units[i].name);
+        } else {
+            if ( (f = pj_param (P->ctx, P->params, "dz_out").f) == 0.0)
+                return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID);
+        }
+        if (f != 0.0)
+            Q->z_factor /= f;
+    }
+
+
+    if ((name = pj_param (P->ctx, P->params, "st_in").s) != NULL) {
+        for (i = 0; (s = time_units[i].id) && strcmp(name, s) ; ++i);
+
+        if (!s) return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); /* unknown unit conversion id */
+
+        Q->t_in_id = i;
+        proj_log_debug(P, "t_in unit: %s", time_units[i].name);
+    }
+
+    s = 0;
+    if ((name = pj_param (P->ctx, P->params, "st_out").s) != NULL) {
+        for (i = 0; (s = time_units[i].id) && strcmp(name, s) ; ++i);
+
+        if (!s) return pj_default_destructor(P, PJD_ERR_UNKNOW_UNIT_ID); /* unknown unit conversion id */
+
+        Q->t_out_id = i;
+        proj_log_debug(P, "t_out unit: %s", time_units[i].name);
+    }
+
+    return P;
+}
diff --git a/src/PJ_urm5.c b/src/PJ_urm5.c
index f19d5c4..9960f50 100644
--- a/src/PJ_urm5.c
+++ b/src/PJ_urm5.c
@@ -1,5 +1,7 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph., no inv.\n\tn= q= alpha=";
 
@@ -21,24 +23,20 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(urm5) {
     double alpha, t;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
-    Q->n  = pj_param(P->ctx, P->params, "dn").f;
+    if (pj_param(P->ctx, P->params, "tn").i) {
+        Q->n = pj_param(P->ctx, P->params, "dn").f;
+        if (Q->n <= 0. || Q->n > 1.)
+            return pj_default_destructor(P, PJD_ERR_N_OUT_OF_RANGE);
+    } else {
+            return pj_default_destructor(P, PJD_ERR_N_OUT_OF_RANGE);
+    }
     Q->q3 = pj_param(P->ctx, P->params, "dq").f / 3.;
     alpha = pj_param(P->ctx, P->params, "ralpha").f;
     t = Q->n * sin (alpha);
@@ -52,30 +50,3 @@ PJ *PROJECTION(urm5) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_urm5_selftest (void) {return 0;}
-#else
-int pj_urm5_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=urm5   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223393.6384339639,  111696.81878511712},
-        { 223393.6384339639, -111696.81878511712},
-        {-223393.6384339639,  111696.81878511712},
-        {-223393.6384339639, -111696.81878511712},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-#endif
diff --git a/src/PJ_urmfps.c b/src/PJ_urmfps.c
index ff775c2..19719a2 100644
--- a/src/PJ_urmfps.c
+++ b/src/PJ_urmfps.c
@@ -1,11 +1,13 @@
 #define PJ_LIB__
-#include	<projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(urmfps, "Urmaev Flat-Polar Sinusoidal") "\n\tPCyl, Sph.\n\tn=";
 PROJ_HEAD(wag1, "Wagner I (Kavraisky VI)") "\n\tPCyl, Sph.";
 
 struct pj_opaque {
-	double	n, C_y;
+    double  n, C_y;
 };
 
 #define C_x 0.8773826753
@@ -14,57 +16,45 @@ struct pj_opaque {
 
 static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     XY xy = {0.0, 0.0};
-	lp.phi = aasin (P->ctx,P->opaque->n * sin (lp.phi));
-	xy.x = C_x * lp.lam * cos (lp.phi);
-	xy.y = P->opaque->C_y * lp.phi;
-	return xy;
+    lp.phi = aasin (P->ctx,P->opaque->n * sin (lp.phi));
+    xy.x = C_x * lp.lam * cos (lp.phi);
+    xy.y = P->opaque->C_y * lp.phi;
+    return xy;
 }
 
 
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0, 0.0};
-	xy.y /= P->opaque->C_y;
-	lp.phi = aasin(P->ctx, sin (xy.y) / P->opaque->n);
-	lp.lam = xy.x / (C_x * cos (xy.y));
-	return lp;
+    xy.y /= P->opaque->C_y;
+    lp.phi = aasin(P->ctx, sin (xy.y) / P->opaque->n);
+    lp.lam = xy.x / (C_x * cos (xy.y));
+    return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 static PJ *setup(PJ *P) {
-	P->opaque->C_y = Cy / P->opaque->n;
-	P->es = 0.;
-	P->inv = s_inverse;
-	P->fwd = s_forward;
-	return P;
+    P->opaque->C_y = Cy / P->opaque->n;
+    P->es = 0.;
+    P->inv = s_inverse;
+    P->fwd = s_forward;
+    return P;
 }
 
 
 PJ *PROJECTION(urmfps) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
+
     P->opaque = Q;
 
-	if (pj_param(P->ctx, P->params, "tn").i) {
-		P->opaque->n = pj_param(P->ctx, P->params, "dn").f;
-		if (P->opaque->n <= 0. || P->opaque->n > 1.)
-			E_ERROR(-40)
-	} else
-		E_ERROR(-40)
+    if (pj_param(P->ctx, P->params, "tn").i) {
+        P->opaque->n = pj_param(P->ctx, P->params, "dn").f;
+        if (P->opaque->n <= 0. || P->opaque->n > 1.)
+            return pj_default_destructor(P, PJD_ERR_N_OUT_OF_RANGE);
+    } else {
+        return pj_default_destructor(P, PJD_ERR_N_OUT_OF_RANGE);
+    }
 
     return setup(P);
 }
@@ -73,94 +63,10 @@ PJ *PROJECTION(urmfps) {
 PJ *PROJECTION(wag1) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
-	P->opaque->n = 0.8660254037844386467637231707;
+    P->opaque->n = 0.8660254037844386467637231707;
     return setup(P);
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_urmfps_selftest (void) {return 0;}
-#else
-int pj_urmfps_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=urmfps   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 196001.70813419219,  127306.84332999329},
-        { 196001.70813419219, -127306.84332999329},
-        {-196001.70813419219,  127306.84332999329},
-        {-196001.70813419219, -127306.84332999329},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.002040720839642371,  0.00078547381740438178},
-        { 0.002040720839642371, -0.00078547381740438178},
-        {-0.002040720839642371,  0.00078547381740438178},
-        {-0.002040720839642371, -0.00078547381740438178},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-#endif
-
-
-#ifndef PJ_SELFTEST
-int pj_wag1_selftest (void) {return 0;}
-#else
-int pj_wag1_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wag1   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 195986.78156115755,  127310.07506065986},
-        { 195986.78156115755, -127310.07506065986},
-        {-195986.78156115755,  127310.07506065986},
-        {-195986.78156115755, -127310.07506065986},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.002040720839738254,  0.00078547381739207999},
-        { 0.002040720839738254, -0.00078547381739207999},
-        {-0.002040720839738254,  0.00078547381739207999},
-        {-0.002040720839738254, -0.00078547381739207999},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-#endif
-
diff --git a/src/PJ_vandg.c b/src/PJ_vandg.c
index 18d75f1..d4ed7b8 100644
--- a/src/PJ_vandg.c
+++ b/src/PJ_vandg.c
@@ -1,11 +1,11 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include "projects.h"
 
 PROJ_HEAD(vandg, "van der Grinten (I)") "\n\tMisc Sph";
 
 # define TOL        1.e-10
 # define THIRD      .33333333333333333333
-# define TWO_THRD   .66666666666666666666
 # define C2_27      .07407407407407407407
 # define PI4_3      4.18879020478639098458
 # define PISQ       9.86960440108935861869
@@ -18,7 +18,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
     double  al, al2, g, g2, p2;
 
     p2 = fabs(lp.phi / M_HALFPI);
-    if ((p2 - TOL) > 1.) F_ERROR;
+    if ((p2 - TOL) > 1.) {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return xy;
+    }
     if (p2 > 1.)
         p2 = 1.;
     if (fabs(lp.phi) <= TOL) {
@@ -41,7 +44,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
         if (lp.lam < 0.) xy.x = -xy.x;
         xy.y = fabs(xy.x / M_PI);
         xy.y = 1. - xy.y * (xy.y + 2. * al);
-        if (xy.y < -TOL) F_ERROR;
+        if (xy.y < -TOL) {
+            proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+            return xy;
+        }
         if (xy.y < 0.)
             xy.y = 0.;
         else
@@ -81,27 +87,15 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
         t = r2 + TPISQ * (x2 - y2 + HPISQ);
         lp.lam = fabs(xy.x) <= TOL ? 0. :
            .5 * (r - PISQ + (t <= 0. ? 0. : sqrt(t))) / xy.x;
-    } else
-        I_ERROR;
+    } else {
+        proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
+        return lp;
+    }
 
     return lp;
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(vandg) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -110,47 +104,3 @@ PJ *PROJECTION(vandg) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_vandg_selftest (void) {return 0;}
-#else
-
-int pj_vandg_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=vandg   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223395.24954340671,  111704.59663367498},
-        { 223395.24954340671, -111704.59663367498},
-        {-223395.24954340671,  111704.59663367498},
-        {-223395.24954340671, -111704.59663367498},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.001790493715929761,  0.00089524655486993867},
-        { 0.001790493715929761, -0.00089524655486993867},
-        {-0.001790493715929761,  0.00089524655486993867},
-        {-0.001790493715929761, -0.00089524655486993867},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_vandg2.c b/src/PJ_vandg2.c
index fac7e85..81f28a7 100644
--- a/src/PJ_vandg2.c
+++ b/src/PJ_vandg2.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include "projects.h"
 
 struct pj_opaque {
     int vdg3;
@@ -44,27 +45,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(vandg2) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->vdg3 = 0;
@@ -76,7 +60,7 @@ PJ *PROJECTION(vandg2) {
 PJ *PROJECTION(vandg3) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
     Q->vdg3 = 1;
@@ -86,63 +70,3 @@ PJ *PROJECTION(vandg3) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_vandg2_selftest (void) {return 0;}
-#else
-
-int pj_vandg2_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=vandg2   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223395.24785043663,  111718.49103722633},
-        { 223395.24785043663, -111718.49103722633},
-        {-223395.24785043663,  111718.49103722633},
-        {-223395.24785043663, -111718.49103722633},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
-
-#ifndef PJ_SELFTEST
-int pj_vandg3_selftest (void) {return 0;}
-#else
-
-int pj_vandg3_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=vandg3   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223395.24955283134,  111704.51990442065},
-        { 223395.24955283134, -111704.51990442065},
-        {-223395.24955283134,  111704.51990442065},
-        {-223395.24955283134, -111704.51990442065},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_vandg4.c b/src/PJ_vandg4.c
index 2dbb071..afffe41 100644
--- a/src/PJ_vandg4.c
+++ b/src/PJ_vandg4.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include <projects.h>
+#include "projects.h"
 
 PROJ_HEAD(vandg4, "van der Grinten IV") "\n\tMisc Sph, no inv.";
 
@@ -44,20 +44,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(vandg4) {
     P->es = 0.;
     P->fwd = s_forward;
@@ -65,33 +51,3 @@ PJ *PROJECTION(vandg4) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_vandg4_selftest (void) {return 0;}
-#else
-
-int pj_vandg4_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=vandg4   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223374.57729435508,  111701.19548415358
},
-        { 223374.57729435508, -111701.19548415358
},
-        {-223374.57729435508,  111701.19548415358
},
-        {-223374.57729435508, -111701.19548415358
},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-
-
-#endif
diff --git a/src/PJ_vgridshift.c b/src/PJ_vgridshift.c
new file mode 100644
index 0000000..bb8b4d4
--- /dev/null
+++ b/src/PJ_vgridshift.c
@@ -0,0 +1,77 @@
+#define PJ_LIB__
+#include "proj_internal.h"
+#include "projects.h"
+
+PROJ_HEAD(vgridshift, "Vertical grid shift");
+
+
+static XYZ forward_3d(LPZ lpz, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+    point.lpz = lpz;
+
+    if (P->vgridlist_geoid != NULL) {
+        /* Only try the gridshift if at least one grid is loaded,
+         * otherwise just pass the coordinate through unchanged. */
+        point.xyz.z -= proj_vgrid_value(P, point.lp);
+    }
+
+    return point.xyz;
+}
+
+
+static LPZ reverse_3d(XYZ xyz, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+    point.xyz = xyz;
+
+    if (P->vgridlist_geoid != NULL) {
+        /* Only try the gridshift if at least one grid is loaded,
+         * otherwise just pass the coordinate through unchanged. */
+        point.xyz.z += proj_vgrid_value(P, point.lp);
+    }
+
+    return point.lpz;
+}
+
+
+static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) {
+    PJ_COORD point = {{0,0,0,0}};
+    point.xyz = forward_3d (obs.lpz, P);
+    return point;
+}
+
+static PJ_COORD reverse_4d(PJ_COORD obs, PJ *P) {
+    PJ_COORD point;
+    point.lpz = reverse_3d (obs.xyz, P);
+    return point;
+}
+
+
+PJ *TRANSFORMATION(vgridshift,0) {
+
+   if (!pj_param(P->ctx, P->params, "tgrids").i) {
+        proj_log_error(P, "vgridshift: +grids parameter missing.");
+        return pj_default_destructor(P, PJD_ERR_NO_ARGS);
+    }
+
+    /* Build gridlist. P->vgridlist_geoid can be empty if +grids only ask for optional grids. */
+    proj_vgrid_init(P, "grids");
+
+    /* Was gridlist compiled properly? */
+    if ( proj_errno(P) ) {
+        proj_log_error(P, "vgridshift: could not find required grid(s).");
+        return pj_default_destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID);
+    }
+
+    P->fwd4d = forward_4d;
+    P->inv4d = reverse_4d;
+    P->fwd3d  = forward_3d;
+    P->inv3d  = reverse_3d;
+    P->fwd    = 0;
+    P->inv    = 0;
+
+    P->left  = PJ_IO_UNITS_ANGULAR;
+    P->right = PJ_IO_UNITS_ANGULAR;
+
+    return P;
+}
+
diff --git a/src/PJ_wag2.c b/src/PJ_wag2.c
index 9a41ab6..059494d 100644
--- a/src/PJ_wag2.c
+++ b/src/PJ_wag2.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-# include	<projects.h>
+#include "projects.h"
 PROJ_HEAD(wag2, "Wagner II") "\n\tPCyl., Sph.";
 #define C_x 0.92483
 #define C_y 1.38725
@@ -25,16 +25,6 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(wag2) {
     P->es = 0.;
     P->inv = s_inverse;
@@ -42,47 +32,3 @@ PJ *PROJECTION(wag2) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_wag2_selftest (void) {return 0;}
-#else
-
-int pj_wag2_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wag2   +a=6400000  +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 206589.88809996162,   120778.04035754716},
-        { 206589.88809996162,  -120778.04035754716},
-        {-206589.88809996162,   120778.04035754716},
-        {-206589.88809996162,  -120778.04035754716},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0019360240367390709,   0.00082795765763814082},
-        { 0.0019360240367390709,  -0.00082795765763814082},
-        {-0.0019360240367390709,   0.00082795765763814082},
-        {-0.0019360240367390709,  -0.00082795765763814082},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_wag3.c b/src/PJ_wag3.c
index cd6c18e..5db1e50 100644
--- a/src/PJ_wag3.c
+++ b/src/PJ_wag3.c
@@ -1,6 +1,9 @@
 #define PJ_LIB__
-# include	<projects.h>
+#include "projects.h"
+#include <errno.h>
+
 PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph.\n\tlat_ts=";
+
 #define TWOTHIRD 0.6666666666666666666667
 
 struct pj_opaque {
@@ -16,11 +19,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-#if 0
-INVERSE(s_inverse); /* spheroid */
-#endif
-
-
 static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
     LP lp = {0.0,0.0};
 	lp.phi = xy.y;
@@ -29,21 +27,12 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(wag3) {
 	double ts;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
+
     P->opaque = Q;
 
 	ts = pj_param (P->ctx, P->params, "rlat_ts").f;
@@ -55,47 +44,3 @@ PJ *PROJECTION(wag3) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_wag3_selftest (void) {return 0;}
-#else
-
-int pj_wag3_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wag3   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        {223387.02171816575,  111701.07212763709},
-        {223387.02171816575,  -111701.07212763709},
-        {-223387.02171816575,  111701.07212763709},
-        {-223387.02171816575,  -111701.07212763709},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        {0.001790493109880963,  0.00089524655489191132},
-        {0.001790493109880963,  -0.00089524655489191132},
-        {-0.001790493109880963,  0.00089524655489191132},
-        {-0.001790493109880963,  -0.00089524655489191132},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_wag7.c b/src/PJ_wag7.c
index d24f4e1..a820b2c 100644
--- a/src/PJ_wag7.c
+++ b/src/PJ_wag7.c
@@ -1,5 +1,5 @@
 #define PJ_LIB__
-#include	<projects.h>
+#include	"projects.h"
 
 PROJ_HEAD(wag7, "Wagner VII") "\n\tMisc Sph, no inv.";
 
@@ -19,17 +19,6 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
-
 PJ *PROJECTION(wag7) {
     P->fwd = s_forward;
     P->inv = 0;
@@ -37,31 +26,3 @@ PJ *PROJECTION(wag7) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_wag7_selftest (void) {return 0;}
-#else
-
-int pj_wag7_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wag7   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 198601.87695731167,  125637.0457141714},
-        { 198601.87695731167, -125637.0457141714},
-        {-198601.87695731167,  125637.0457141714},
-        {-198601.87695731167, -125637.0457141714},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-#endif
diff --git a/src/PJ_wink1.c b/src/PJ_wink1.c
index 320a4fb..f64f97d 100644
--- a/src/PJ_wink1.c
+++ b/src/PJ_wink1.c
@@ -1,7 +1,8 @@
 #define PJ_LIB__
-#include <projects.h>
-PROJ_HEAD(wink1, "Winkel I") "\n\tPCyl., Sph.\n\tlat_ts=";
+#include "projects.h"
+#include <errno.h>
 
+PROJ_HEAD(wink1, "Winkel I") "\n\tPCyl., Sph.\n\tlat_ts=";
 
 struct pj_opaque {
 	double	cosphi1;
@@ -25,25 +26,10 @@ static LP s_inverse (XY xy, PJ *P) {           /* Spheroidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(wink1) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
 	P->opaque->cosphi1 = cos (pj_param(P->ctx, P->params, "rlat_ts").f);
@@ -54,47 +40,3 @@ PJ *PROJECTION(wink1) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_wink1_selftest (void) {return 0;}
-#else
-
-int pj_wink1_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wink1   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223385.13164095284,  111701.07212763709},
-        { 223385.13164095284,  -111701.07212763709},
-        {-223385.13164095284,  111701.07212763709},
-        {-223385.13164095284,  -111701.07212763709},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP s_inv_expect[] = {
-        { 0.0017904931098931057,  0.00089524655489191132},
-        { 0.0017904931098931057, -0.00089524655489191132},
-        {-0.0017904931098931057,  0.00089524655489191132},
-        {-0.0017904931098931057, -0.00089524655489191132},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, inv_in, 0, s_inv_expect);
-}
-
-
-#endif
diff --git a/src/PJ_wink2.c b/src/PJ_wink2.c
index 4b82e42..d715074 100644
--- a/src/PJ_wink2.c
+++ b/src/PJ_wink2.c
@@ -1,5 +1,6 @@
 #define PJ_LIB__
-# include	<projects.h>
+#include "projects.h"
+#include <errno.h>
 
 PROJ_HEAD(wink2, "Winkel II") "\n\tPCyl., Sph., no inv.\n\tlat_1=";
 
@@ -33,25 +34,10 @@ static XY s_forward (LP lp, PJ *P) {           /* Spheroidal, forward */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
-
 PJ *PROJECTION(wink2) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
 	P->opaque->cosphi1 = cos(pj_param(P->ctx, P->params, "rlat_1").f);
@@ -62,31 +48,3 @@ PJ *PROJECTION(wink2) {
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_wink2_selftest (void) {return 0;}
-#else
-
-int pj_wink2_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char s_args[] = {"+proj=wink2   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY s_fwd_expect[] = {
-        { 223387.39643378611,  124752.03279744535},
-        { 223387.39643378611, -124752.03279744535},
-        {-223387.39643378611,  124752.03279744535},
-        {-223387.39643378611, -124752.03279744535},
-    };
-
-    return pj_generic_selftest (0, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, 0, s_fwd_expect, 0, 0, 0);
-}
-#endif
diff --git a/src/aasincos.c b/src/aasincos.c
index 7cb6bd8..7d49ac1 100644
--- a/src/aasincos.c
+++ b/src/aasincos.c
@@ -1,7 +1,6 @@
 /* arc sin, cosine, tan2 and sqrt that will NOT fail */
 #include <projects.h>
 #define ONE_TOL	 1.00000000000001
-#define TOL	0.000000001
 #define ATOL 1e-50
 
 	double
diff --git a/src/adjlon.c b/src/adjlon.c
index 09b3b14..784a90a 100644
--- a/src/adjlon.c
+++ b/src/adjlon.c
@@ -1,15 +1,20 @@
 /* reduce argument to range +/- PI */
 #include <math.h>
-#include <projects.h>
-
-#define SPI     3.14159265359
-#define TWOPI   6.2831853071795864769
-#define ONEPI   3.14159265358979323846
+#include "projects.h"
 
 double adjlon (double lon) {
-    if (fabs(lon) <= SPI) return( lon );
-    lon += ONEPI;  /* adjust to 0..2pi rad */
-    lon -= TWOPI * floor(lon / TWOPI); /* remove integral # of 'revolutions'*/
-    lon -= ONEPI;  /* adjust back to -pi..pi rad */
-    return( lon );
+    /* Let lon slightly overshoot, to avoid spurious sign switching at the date line */
+    if (fabs (lon) < M_PI + 1e-12)
+        return lon;
+
+    /* adjust to 0..2pi range */
+    lon += M_PI;
+
+    /* remove integral # of 'revolutions'*/
+    lon -= M_TWOPI * floor(lon / M_TWOPI);
+
+    /* adjust back to -pi..pi range */
+    lon -= M_PI;
+
+    return lon;
 }
diff --git a/src/bch2bps.c b/src/bch2bps.c
index 68a4737..c0a357c 100644
--- a/src/bch2bps.c
+++ b/src/bch2bps.c
@@ -30,12 +30,14 @@ dadd(projUV *a, projUV *b, double m, int n) {
 		a++->v -= m * b++->v;
 	}
 }
-	static void /* convert row to pover series */
+	static int /* convert row to power series */
 rows(projUV *c, projUV *d, int n) {
 	projUV sv, *dd;
 	int j, k;
 
 	dd = (projUV *)vector1(n-1, sizeof(projUV));
+	if (!dd)
+		return 0;
 	sv.u = sv.v = 0.;
 	for (j = 0; j < n; ++j) d[j] = dd[j] = sv;
 	d[0] = c[n-1];
@@ -58,14 +60,21 @@ rows(projUV *c, projUV *d, int n) {
 	d[0].u = -dd[0].u + .5 * c[0].u;
 	d[0].v = -dd[0].v + .5 * c[0].v;
 	pj_dalloc(dd);
+	return 1;
 }
-	static void /* convert columns to power series */
+	static int /* convert columns to power series */
 cols(projUV **c, projUV **d, int nu, int nv) {
 	projUV *sv, **dd;
 	int j, k;
 
 	dd = (projUV **)vector2(nu, nv, sizeof(projUV));
+	if (!dd)
+		return 0;
 	sv = (projUV *)vector1(nv, sizeof(projUV));
+	if (!sv) {
+		freev2((void **)dd, nu);
+		return 0;
+	}
 	bclear(d, nu, nv);
 	bclear(dd, nu, nv);
 	bmove(d[0], c[nu-1], nv);
@@ -84,6 +93,7 @@ cols(projUV **c, projUV **d, int nu, int nv) {
 	submop(d[0], .5, c[0], dd[0], nv);
 	freev2((void **) dd, nu);
 	pj_dalloc(sv);
+	return 1;
 }
 	static void /* row adjust for range -1 to 1 to a to b */
 rowshft(double a, double b, projUV *d, int n) {
@@ -129,11 +139,13 @@ bch2bps(projUV a, projUV b, projUV **c, int nu, int nv) {
 		return 0;
 	/* do rows to power series */
 	for (i = 0; i < nu; ++i) {
-		rows(c[i], d[i], nv);
+		if (!rows(c[i], d[i], nv))
+			return 0;
 		rowshft(a.v, b.v, d[i], nv);
 	}
 	/* do columns to power series */
-	cols(d, c, nu, nv);
+	if (!cols(d, c, nu, nv))
+		return 0;
 	colshft(a.u, b.u, c, nu, nv);
 	freev2((void **) d, nu);
 	return 1;
diff --git a/src/bin_cct.cmake b/src/bin_cct.cmake
new file mode 100644
index 0000000..a204e7e
--- /dev/null
+++ b/src/bin_cct.cmake
@@ -0,0 +1,9 @@
+set(CCT_SRC cct.c proj_strtod.c) 
+set(CCT_INCLUDE optargpm.h)
+
+source_group("Source Files\\Bin" FILES ${CCT_SRC})
+
+add_executable(cct ${CCT_SRC} ${CCT_INCLUDE})
+target_link_libraries(cct ${PROJ_LIBRARIES})
+install(TARGETS cct 
+        RUNTIME DESTINATION ${BINDIR})
diff --git a/src/bin_gie.cmake b/src/bin_gie.cmake
new file mode 100644
index 0000000..ca6dde0
--- /dev/null
+++ b/src/bin_gie.cmake
@@ -0,0 +1,9 @@
+set(GIE_SRC gie.c proj_strtod.c) 
+set(GIE_INCLUDE optargpm.h)
+
+source_group("Source Files\\Bin" FILES ${GIE_SRC})
+
+add_executable(gie ${GIE_SRC} ${GIE_INCLUDE})
+target_link_libraries(gie ${PROJ_LIBRARIES})
+install(TARGETS gie 
+        RUNTIME DESTINATION ${BINDIR})
diff --git a/src/cct.c b/src/cct.c
new file mode 100644
index 0000000..7e48311
--- /dev/null
+++ b/src/cct.c
@@ -0,0 +1,353 @@
+/***********************************************************************
+
+                 The cct 4D Transformation program
+
+************************************************************************
+
+cct is a 4D equivalent to the "proj" projection program.
+
+cct is an acronym meaning "Coordinate Conversion and Transformation".
+
+The acronym refers to definitions given in the OGC 08-015r2/ISO-19111
+standard "Geographical Information -- Spatial Referencing by Coordinates",
+which defines two different classes of coordinate operations:
+
+*Coordinate Conversions*, which are coordinate operations where input
+and output datum are identical (e.g. conversion from geographical to
+cartesian coordinates) and
+
+*Coordinate Transformations*, which are coordinate operations where
+input and output datums differ (e.g. change of reference frame).
+
+cct, however, also refers to Carl Christian Tscherning (1942--2014),
+professor of Geodesy at the University of Copenhagen, mentor and advisor
+for a generation of Danish geodesists, colleague and collaborator for
+two generations of global geodesists, Secretary General for the
+International Association of Geodesy, IAG (1995--2007), fellow of the
+Amercan Geophysical Union (1991), recipient of the IAG Levallois Medal
+(2007), the European Geosciences Union Vening Meinesz Medal (2008), and
+of numerous other honours.
+
+cct, or Christian, as he was known to most of us, was recognized for his
+good mood, his sharp wit, his tireless work, and his great commitment to
+the development of geodesy - both through his scientific contributions,
+comprising more than 250 publications, and by his mentoring and teaching
+of the next generations of geodesists.
+
+As Christian was an avid Fortran programmer, and a keen Unix connoiseur,
+he would have enjoyed to know that his initials would be used to name a
+modest Unix style transformation filter, hinting at the tireless aspect
+of his personality, which was certainly one of the reasons he accomplished
+so much, and meant so much to so many people.
+
+Hence, in honour of cct (the geodesist) this is cct (the program).
+
+************************************************************************
+
+Thomas Knudsen, thokn at sdfe.dk, 2016-05-25/2017-10-26
+
+************************************************************************
+
+* Copyright (c) 2016, 2017 Thomas Knudsen
+* Copyright (c) 2017, SDFE
+*
+* 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 <ctype.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <proj.h>
+#include "proj_internal.h"
+#include "projects.h"
+#include "optargpm.h"
+
+
+/* Prototypes for functions in proj_strtod.c */
+double proj_strtod(const char *str, char **endptr);
+double proj_atof(const char *str);
+
+/* Prototypes from functions in this file */
+char *column (char *buf, int n);
+PJ_COORD parse_input_line (char *buf, int *columns, double fixed_height, double fixed_time);
+
+
+
+static const char usage[] = {
+    "--------------------------------------------------------------------------------\n"
+    "Usage: %s [-options]... [+operator_specs]... infile...\n"
+    "--------------------------------------------------------------------------------\n"
+    "Options:\n"
+    "--------------------------------------------------------------------------------\n"
+    "    -o /path/to/file  Specify output file name\n"
+    "    -c x,y,z,t        Specify input columns for (up to) 4 input parameters.\n"
+    "                      Defaults to 1,2,3,4\n"
+    "    -z value          Provide a fixed z value for all input data (e.g. -z 0)\n"
+    "    -t value          Provide a fixed t value for all input data (e.g. -t 0)\n"
+    "    -I                Do the inverse transformation\n"
+    "    -v                Verbose: Provide non-essential informational output.\n"
+    "                      Repeat -v for more verbosity (e.g. -vv)\n"
+    "--------------------------------------------------------------------------------\n"
+    "Long Options:\n"
+    "--------------------------------------------------------------------------------\n"
+    "    --output          Alias for -o\n"
+    "    --columns         Alias for -c\n"
+    "    --height          Alias for -z\n"
+    "    --time            Alias for -t\n"
+    "    --verbose         Alias for -v\n"
+    "    --inverse         Alias for -I\n"
+    "    --help            Alias for -h\n"
+    "--------------------------------------------------------------------------------\n"
+    "Operator Specs:\n"
+    "--------------------------------------------------------------------------------\n"
+    "The operator specs describe the action to be performed by cct, e.g:\n"
+    "\n"
+    "        +proj=utm  +ellps=GRS80  +zone=32\n"
+    "\n"
+    "instructs cct to convert input data to Universal Transverse Mercator, zone 32\n"
+    "coordinates, based on the GRS80 ellipsoid.\n"
+    "\n"
+    "Hence, the command\n"
+    "\n"
+    "        echo 12 55 | cct -z0 -t0 +proj=utm +zone=32 +ellps=GRS80\n"
+    "\n"
+    "Should give results comparable to the classic proj command\n"
+    "\n"
+    "        echo 12 55 | proj +proj=utm +zone=32 +ellps=GRS80\n"
+    "--------------------------------------------------------------------------------\n"
+    "Examples:\n"
+    "--------------------------------------------------------------------------------\n"
+    "1. convert geographical input to UTM zone 32 on the GRS80 ellipsoid:\n"
+    "    cct +proj=utm +ellps=GRS80 +zone=32\n"
+    "2. roundtrip accuracy check for the case above:\n"
+    "    cct +proj=pipeline +proj=utm +ellps=GRS80 +zone=32 +step +step +inv\n"
+    "3. as (1) but specify input columns for longitude, latitude, height and time:\n"
+    "    cct -c 5,2,1,4  +proj=utm +ellps=GRS80 +zone=32\n"
+    "4. as (1) but specify fixed height and time, hence needing only 2 cols in input:\n"
+    "    cct -t 0 -z 0  +proj=utm  +ellps=GRS80  +zone=32\n"
+    "--------------------------------------------------------------------------------\n"
+};
+
+int main(int argc, char **argv) {
+    PJ *P;
+    PJ_COORD point;
+    OPTARGS *o;
+    FILE *fout = stdout;
+    char *buf;
+    int nfields = 4, direction = 1, verbose;
+    double fixed_z = HUGE_VAL, fixed_time = HUGE_VAL;
+    int columns_xyzt[] = {1, 2, 3, 4};
+    const char *longflags[]  = {"v=verbose", "h=help", "I=inverse", 0};
+    const char *longkeys[]   = {"o=output",  "c=columns", "z=height", "t=time", 0};
+
+    o = opt_parse (argc, argv, "hvI", "cozt", longflags, longkeys);
+    if (0==o)
+        return 0;
+
+    if (opt_given (o, "h")) {
+        printf (usage, o->progname);
+        return 0;
+    }
+
+
+    direction = opt_given (o, "I")? -1: 1;
+    verbose   = opt_given (o, "v");
+
+    if (opt_given (o, "o"))
+        fout = fopen (opt_arg (o, "output"), "wt");
+    if (0==fout) {
+        fprintf (stderr, "%s: Cannot open '%s' for output\n", o->progname, opt_arg (o, "output"));
+        free (o);
+        return 1;
+    }
+    if (verbose > 3)
+        fprintf (fout, "%s: Running in very verbose mode\n", o->progname);
+
+
+
+    if (opt_given (o, "z")) {
+        fixed_z = proj_atof (opt_arg (o, "z"));
+        nfields--;
+    }
+
+    if (opt_given (o, "t")) {
+        fixed_time = proj_atof (opt_arg (o, "t"));
+        nfields--;
+    }
+
+    if (opt_given (o, "c")) {
+        int ncols = sscanf (opt_arg (o, "c"), "%d,%d,%d,%d", columns_xyzt, columns_xyzt+1, columns_xyzt+2, columns_xyzt+3);
+        if (ncols != nfields) {
+            fprintf (stderr, "%s: Too few input columns given: '%s'\n", o->progname, opt_arg (o, "c"));
+            free (o);
+            if (stdout != fout)
+                fclose (fout);
+            return 1;
+        }
+    }
+
+    /* Setup transformation */
+    P = proj_create_argv (0, o->pargc, o->pargv);
+    if ((0==P) || (0==o->pargc)) {
+        fprintf (stderr, "%s: Bad transformation arguments - (%s)\n    '%s -h' for help\n",
+                 o->progname, pj_strerrno (proj_errno(P)), o->progname);
+        free (o);
+        if (stdout != fout)
+            fclose (fout);
+        return 1;
+    }
+
+    if (direction==-1) {
+        /* fail if an inverse operation is not available */
+        if (!proj_pj_info(P).has_inverse) {
+            fprintf (stderr, "Inverse operation not available\n");
+            return 1;
+        }
+        /* We have no API call for inverting an operation, so we brute force it. */
+        P->inverted = !(P->inverted);
+    }
+    direction = 1;
+
+    /* Allocate input buffer */
+    buf = calloc (1, 10000);
+    if (0==buf) {
+        fprintf (stderr, "%s: Out of memory\n", o->progname);
+        pj_free (P);
+        free (o);
+        if (stdout != fout)
+            fclose (fout);
+        return 1;
+    }
+
+
+    /* Loop over all records of all input files */
+    while (opt_input_loop (o, optargs_file_format_text)) {
+        int err;
+        void *ret = fgets (buf, 10000, o->input);
+        opt_eof_handler (o);
+        if (0==ret) {
+            fprintf (stderr, "Read error in record %d\n", (int) o->record_index);
+            continue;
+        }
+        point = parse_input_line (buf, columns_xyzt, fixed_z, fixed_time);
+        if (HUGE_VAL==point.xyzt.x) {
+            char *c = column (buf, 1);
+
+            /* if it's a comment or blank line, we reflect it */
+            if (c && ((*c=='\0') || (*c=='#'))) {
+                fprintf (fout, "%s\n", buf);
+                continue;
+            }
+
+            /* otherwise, it must be a syntax error */
+            fprintf (fout, "# Record %d UNREADABLE: %s", (int) o->record_index, buf);
+            if (verbose)
+                fprintf (stderr, "%s: Could not parse file '%s' line %d\n", o->progname, opt_filename (o), opt_record (o));
+            continue;
+        }
+
+        if (proj_angular_input (P, direction)) {
+            point.lpzt.lam = proj_torad (point.lpzt.lam);
+            point.lpzt.phi = proj_torad (point.lpzt.phi);
+        }
+        err = proj_errno_reset (P);
+        point = proj_trans (P, direction, point);
+
+        if (HUGE_VAL==point.xyzt.x) {
+            /* transformation error */
+            fprintf (fout, "# Record %d TRANSFORMATION ERROR: %s (%s)",
+                            (int) o->record_index, buf, pj_strerrno (proj_errno(P)));
+            proj_errno_restore (P, err);
+            continue;
+        }
+        proj_errno_restore (P, err);
+
+        /* Time to print the result */
+        if (proj_angular_output (P, direction)) {
+            point.lpzt.lam = proj_todeg (point.lpzt.lam);
+            point.lpzt.phi = proj_todeg (point.lpzt.phi);
+            fprintf (fout, "%14.10f  %14.10f  %12.4f  %12.4f\n", point.xyzt.x, point.xyzt.y, point.xyzt.z, point.xyzt.t);
+        }
+        else
+            fprintf (fout, "%13.4f  %13.4f  %12.4f  %12.4f\n", point.xyzt.x, point.xyzt.y, point.xyzt.z, point.xyzt.t);
+    }
+
+    if (stdout != fout)
+        fclose (fout);
+    free (o);
+    return 0;
+}
+
+
+
+
+
+/* return a pointer to the n'th column of buf */
+char *column (char *buf, int n) {
+    int i;
+    if (n <= 0)
+        return buf;
+    for (i = 0;  i < n;  i++) {
+        while (isspace(*buf))
+            buf++;
+        if (i == n - 1)
+            break;
+        while ((0 != *buf) && !isspace(*buf))
+            buf++;
+    }
+    return buf;
+}
+
+/* column to double */
+static double cold (char *args, int col) {
+    char *endp;
+    char *target;
+    double d;
+    target = column (args, col);
+    d = proj_strtod (target, &endp);
+    if (endp==target)
+        return HUGE_VAL;
+    return d;
+}
+
+PJ_COORD parse_input_line (char *buf, int *columns, double fixed_height, double fixed_time) {
+    PJ_COORD err = proj_coord (HUGE_VAL, HUGE_VAL, HUGE_VAL, HUGE_VAL);
+    PJ_COORD result = err;
+    int prev_errno = errno;
+    errno = 0;
+
+    result.xyzt.z = fixed_height;
+    result.xyzt.t = fixed_time;
+    result.xyzt.x = cold (buf, columns[0]);
+    result.xyzt.y = cold (buf, columns[1]);
+    if (result.xyzt.z==HUGE_VAL)
+        result.xyzt.z = cold (buf, columns[2]);
+    if (result.xyzt.t==HUGE_VAL)
+        result.xyzt.t = cold (buf, columns[3]);
+
+    if (0!=errno)
+        return err;
+
+    errno = prev_errno;
+    return result;
+}
diff --git a/src/cs2cs.c b/src/cs2cs.c
index 9036932..730d37e 100644
--- a/src/cs2cs.c
+++ b/src/cs2cs.c
@@ -26,6 +26,7 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
+#include "proj.h"
 #include "projects.h"
 #include <stdio.h>
 #include <stdlib.h>
@@ -100,7 +101,7 @@ static void process(FILE *fid)
         if (!*s && (s > line)) --s; /* assumed we gobbled \n */
 
         if ( echoin) {
-            int t;
+            char t;
             t = *s;
             *s = '\0';
             (void)fputs(line, stdout);
@@ -166,7 +167,7 @@ int main(int argc, char **argv)
 {
     char *arg, **eargv = argv, *from_argv[MAX_PARGS], *to_argv[MAX_PARGS];
     FILE *fid;
-    int from_argc=0, to_argc=0, eargc = 0, c, mon = 0;
+    int from_argc=0, to_argc=0, eargc = 0, mon = 0;
     int have_to_flag = 0, inverse = 0, i;
     int use_env_locale = 0;
 
@@ -206,11 +207,11 @@ int main(int argc, char **argv)
               case 'l': /* list projections, ellipses or units */
                 if (!arg[1] || arg[1] == 'p' || arg[1] == 'P') {
                     /* list projections */
-                    struct PJ_LIST *lp;
+                    const struct PJ_LIST *lp;
                     int do_long = arg[1] == 'P', c;
                     char *str;
 
-                    for (lp = pj_get_list_ref() ; lp->id ; ++lp) {
+                    for (lp = proj_list_operations() ; lp->id ; ++lp) {
                         (void)printf("%s : ", lp->id);
                         if (do_long)  /* possibly multiline description */
                             (void)puts(*lp->descr);
@@ -222,28 +223,28 @@ int main(int argc, char **argv)
                         }
                     }
                 } else if (arg[1] == '=') { /* list projection 'descr' */
-                    struct PJ_LIST *lp;
+                    const struct PJ_LIST *lp;
 
                     arg += 2;
-                    for (lp = pj_get_list_ref() ; lp->id ; ++lp)
+                    for (lp = proj_list_operations() ; lp->id ; ++lp)
                         if (!strcmp(lp->id, arg)) {
                             (void)printf("%9s : %s\n", lp->id, *lp->descr);
                             break;
                         }
                 } else if (arg[1] == 'e') { /* list ellipses */
-                    struct PJ_ELLPS *le;
+                    const struct PJ_ELLPS *le;
 
-                    for (le = pj_get_ellps_ref(); le->id ; ++le)
+                    for (le = proj_list_ellps(); le->id ; ++le)
                         (void)printf("%9s %-16s %-16s %s\n",
                                      le->id, le->major, le->ell, le->name);
                 } else if (arg[1] == 'u') { /* list units */
-                    struct PJ_UNITS *lu;
+                    const struct PJ_UNITS *lu;
 
-                    for (lu = pj_get_units_ref(); lu->id ; ++lu)
+                    for (lu = proj_list_units(); lu->id ; ++lu)
                         (void)printf("%12s %-20s %s\n",
                                      lu->id, lu->to_meter, lu->name);
                 } else if (arg[1] == 'd') { /* list datums */
-                    struct PJ_DATUMS *ld;
+                    const struct PJ_DATUMS *ld;
 
                     printf("__datum_id__ __ellipse___ __definition/comments______________________________\n" );
                     for (ld = pj_get_datums_ref(); ld->id ; ++ld)
@@ -254,9 +255,9 @@ int main(int argc, char **argv)
                             printf( "%25s %s\n", " ", ld->comments );
                     }
                 } else if( arg[1] == 'm') { /* list prime meridians */
-                    struct PJ_PRIME_MERIDIANS *lpm;
+                    const struct PJ_PRIME_MERIDIANS *lpm;
 
-                    for (lpm = pj_get_prime_meridians_ref(); lpm->id ; ++lpm)
+                    for (lpm = proj_list_prime_meridians(); lpm->id ; ++lpm)
                         (void)printf("%12s %-30s\n",
                                      lpm->id, lpm->defn);
                 } else
@@ -271,12 +272,15 @@ int main(int argc, char **argv)
                 continue;
               case 'W': /* specify seconds precision */
               case 'w': /* -W for constant field width */
-                if ((c = arg[1]) != 0 && isdigit(c)) {
+              {
+                char c = arg[1];
+                if (c != 0 && isdigit(c)) {
                     set_rtodms(c - '0', *arg == 'W');
                     ++arg;
                 } else
                     emess(1,"-W argument missing or non-digit");
                 continue;
+              }
               case 'f': /* alternate output format degrees or xy */
                 if (--argc <= 0) goto noargument;
                 oform = *++argv;
@@ -331,8 +335,6 @@ int main(int argc, char **argv)
         
         for( i = 0; i < MAX_PARGS; i++ )
         {
-            char *arg;
-
             arg = from_argv[i];
             from_argv[i] = to_argv[i];
             to_argv[i] = arg;
@@ -404,7 +406,7 @@ int main(int argc, char **argv)
 
     if( use_env_locale )
     {
-        /* Restore C locale to avoid issues in parsing/outputing numbers*/
+        /* Restore C locale to avoid issues in parsing/outputting numbers*/
         setlocale(LC_ALL, "C");
     }
 
@@ -415,7 +417,7 @@ int main(int argc, char **argv)
         pj_pr_list(toProj);
     }
 
-    /* set input formating control */
+    /* set input formatting control */
     if( !fromProj->is_latlong )
         informat = strtod;
     else {
diff --git a/src/dmstor.c b/src/dmstor.c
index 9665d5a..b994589 100644
--- a/src/dmstor.c
+++ b/src/dmstor.c
@@ -5,7 +5,7 @@
 
 static double proj_strtod(char *nptr, char **endptr);
 
-/* following should be sufficient for all but the rediculous */
+/* following should be sufficient for all but the ridiculous */
 #define MAX_WORK 64
 	static const char
 *sym = "NnEeSsWw";
diff --git a/src/emess.c b/src/emess.c
index 0c7f6c9..dc4cb82 100644
--- a/src/emess.c
+++ b/src/emess.c
@@ -18,7 +18,7 @@
 #define EMESS_ROUTINE
 #include "emess.h"
 	void
-emess(int code, char *fmt, ...) {
+emess(int code, const char *fmt, ...) {
 	va_list args;
 
 	va_start(args, fmt);
@@ -37,13 +37,18 @@ emess(int code, char *fmt, ...) {
 		putc('\n', stderr);
 	/* if |code|==2, print errno code data */
 	if (code == 2 || code == -2)
-		(void)fprintf(stderr, "Sys errno: %d: %s\n",
-			errno,
+        {
+                int my_errno = errno;
 #ifdef HAVE_STRERROR
-			strerror(errno));
-#else
-			"<system mess. texts unavail.>");
+                const char* my_strerror = strerror(my_errno);
+#endif
+#ifndef HAVE_STRERROR
+                const char* my_strerror = "<system mess. texts unavail.>";
 #endif
+		(void)fprintf(stderr, "Sys errno: %d: %s\n",
+			my_errno, my_strerror);
+        }
+
 	/* post remainder of call data */
 	(void)vfprintf(stderr,fmt,args);
 	va_end(args);
diff --git a/src/emess.h b/src/emess.h
index 4106e11..4a6f758 100644
--- a/src/emess.h
+++ b/src/emess.h
@@ -6,7 +6,7 @@ struct EMESS {
 	char	*File_name,	/* input file name */
 			*Prog_name;	/* name of program */
 	int		File_line;	/* approximate line read
-							where error occured */
+							where error occurred */
 };
 
 #ifdef EMESS_ROUTINE	/* use type */
@@ -21,8 +21,9 @@ extern char *sys_errlist[];
 #else	/* for for calling procedures */
 
 extern struct EMESS emess_dat;
-void emess(int, char *, ...);
 
 #endif /* use type */
 
+void emess(int, const char *, ...);
+
 #endif /* end EMESS_H */
diff --git a/src/gen_cheb.c b/src/gen_cheb.c
index b7c41d8..351d960 100644
--- a/src/gen_cheb.c
+++ b/src/gen_cheb.c
@@ -6,15 +6,20 @@
 #include <errno.h>
 #include "emess.h"
 #ifndef COEF_LINE_MAX
-#define COEF_LINE_MAX 60
+#define COEF_LINE_MAX 50
 #endif
-	void
-gen_cheb(int inverse, projUV (*proj)(projUV), char *s, PJ *P, int iargc, char **iargv) {
+
+/* FIXME: put the declaration in a header. Also used in proj.c */
+void gen_cheb(int inverse, projUV (*proj)(projUV), char *s, PJ *P,
+              int iargc, char **iargv);
+extern void p_series(Tseries *, FILE *, char *);
+
+void gen_cheb(int inverse, projUV (*proj)(projUV), char *s, PJ *P,
+              int iargc, char **iargv) {
 	int NU = 15, NV = 15, res = -1, errin = 0, pwr;
 	char *arg, fmt[15];
 	projUV low, upp, resid;
 	Tseries *F;
-	extern void p_series(Tseries *, FILE *, char *);
 	double (*input)(const char *, char **);
 
 	input = inverse ? strtod : dmstor;
@@ -38,7 +43,7 @@ gen_cheb(int inverse, projUV (*proj)(projUV), char *s, PJ *P, int iargc, char **
 			if (*arg != '+') {
 				if (!n) { putchar('#'); ++n; }
 				(void)printf(" %s%n",arg, &L);
-				if ((n += L) > 50) { putchar('\n'); n = 0; }
+				if ((n += L) > COEF_LINE_MAX) { putchar('\n'); n = 0; }
 			}
 		}
 		if (n) putchar('\n');
diff --git a/src/geocent.c b/src/geocent.c
index 6ac6c40..a8cec04 100644
--- a/src/geocent.c
+++ b/src/geocent.c
@@ -320,7 +320,7 @@ void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi,
 * das Gravitationspotential der Erde. Wiss. Arb. Univ. Hannover
 * Nr. 137, p. 130-131.
 
-* Programmed by GGA- Leibniz-Institue of Applied Geophysics
+* Programmed by GGA- Leibniz-Institute of Applied Geophysics
 *               Stilleweg 2
 *               D-30655 Hannover
 *               Federal Republic of Germany
@@ -344,7 +344,7 @@ void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi,
 * (e.g. -6300000.m),	algorithm needs about 15 steps.
 */
 
-/* local defintions and variables */
+/* local definitions and variables */
 /* end-criterium of loop, accuracy of sin(Latitude) */
 #define genau   1.E-12
 #define genau2  (genau*genau)
@@ -362,7 +362,7 @@ void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi,
     double CPHI;     /* cos of searched geodetic latitude */
     double SPHI;     /* sin of searched geodetic latitude */
     double SDPHI;    /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */
-    int iter;        /* # of continous iteration, max. 30 is always enough (s.a.) */
+    int iter;        /* # of continuous iteration, max. 30 is always enough (s.a.) */
 
     P = sqrt(X*X+Y*Y);
     RR = sqrt(X*X+Y*Y+Z*Z);
@@ -389,7 +389,7 @@ void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi,
     }
 
 /* --------------------------------------------------------------
- * Following iterative algorithm was developped by
+ * Following iterative algorithm was developed by
  * "Institut für Erdmessung", University of Hannover, July 1988.
  * Internet: www.ife.uni-hannover.de
  * Iterative computation of CPHI,SPHI and Height.
@@ -414,6 +414,11 @@ void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi,
 /*  ellipsoidal (geodetic) height */
         *Height = P*CPHI0+Z*SPHI0-RN*(1.0-gi->Geocent_e2*SPHI0*SPHI0);
 
+        /* avoid zero division */
+        if (RN+*Height==0.0) {
+            *Latitude = 0.0;
+            return;
+        }
         RK = gi->Geocent_e2*RN/(RN+*Height);
         RX = 1.0/sqrt(1.0-RK*(2.0-RK)*ST*ST);
         CPHI = ST*(1.0-RK)*RX;
@@ -425,7 +430,7 @@ void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo *gi,
     while (SDPHI*SDPHI > genau2 && iter < maxiter);
 
 /*	ellipsoidal (geodetic) latitude */
-    *Latitude=atan(SPHI/fabs(CPHI));
+    *Latitude=atan2(SPHI, fabs(CPHI));
 
     return;
 #endif /* defined(USE_ITERATIVE_METHOD) */
diff --git a/src/geod.c b/src/geod.c
index 12513cb..e90d71b 100644
--- a/src/geod.c
+++ b/src/geod.c
@@ -1,4 +1,6 @@
 /* <<<< Geodesic filter program >>>> */
+
+#include "proj.h"
 # include "projects.h"
 # include "geod_interface.h"
 # include "emess.h"
@@ -127,7 +129,7 @@ static char *pargv[MAX_PARGS];
 static int   pargc = 0;
 
 int main(int argc, char **argv) {
-	char *arg, **eargv = argv, *strnchr();
+	char *arg, **eargv = argv;
 	FILE *fid;
 	static int eargc = 0, c;
 
@@ -175,15 +177,15 @@ noargument:		   emess(1,"missing argument for -%c",*arg);
 				continue;
 			case 'l':
 				if (!arg[1] || arg[1] == 'e') { /* list of ellipsoids */
-                                    struct PJ_ELLPS *le;
+                                    const struct PJ_ELLPS *le;
                                     
-                                    for (le=pj_get_ellps_ref(); le->id ; ++le)
+                                    for (le=proj_list_ellps(); le->id ; ++le)
                                         (void)printf("%9s %-16s %-16s %s\n",
                                                      le->id, le->major, le->ell, le->name);
 				} else if (arg[1] == 'u') { /* list of units */
-                                    struct PJ_UNITS *lu;
+                                    const struct PJ_UNITS *lu;
                                     
-                                    for (lu = pj_get_units_ref();lu->id ; ++lu)
+                                    for (lu = proj_list_units();lu->id ; ++lu)
                                         (void)printf("%12s %-20s %s\n",
                                                      lu->id, lu->to_meter, lu->name);
 				} else
diff --git a/src/geod_set.c b/src/geod_set.c
index f61ab43..26a86b6 100644
--- a/src/geod_set.c
+++ b/src/geod_set.c
@@ -2,6 +2,7 @@
 #define _IN_GEOD_SET
 
 #include <string.h>
+#include "proj.h"
 #include "projects.h"
 #include "geod_interface.h"
 #include "emess.h"
@@ -16,8 +17,12 @@ geod_set(int argc, char **argv) {
 	if (argc <= 0)
 		emess(1, "no arguments in initialization list");
 	start = curr = pj_mkparam(argv[0]);
+	if (!curr)
+		emess(1, "memory allocation failed");
 	for (i = 1; i < argc; ++i) {
 		curr->next = pj_mkparam(argv[i]);
+		if (!curr->next)
+			emess(1, "memory allocation failed");
 		curr = curr->next;
 	}
 	/* set elliptical parameters */
@@ -25,7 +30,7 @@ geod_set(int argc, char **argv) {
 	/* set units */
 	if ((name = pj_param(NULL,start, "sunits").s) != NULL) {
 		char *s;
-                struct PJ_UNITS *unit_list = pj_get_units_ref();
+                const struct PJ_UNITS *unit_list = proj_list_units();
 		for (i = 0; (s = unit_list[i].id) && strcmp(name, s) ; ++i) ;
 		if (!s)
 			emess(1,"%s unknown unit conversion id", name);
@@ -51,7 +56,7 @@ geod_set(int argc, char **argv) {
 			geod_for();
 		} else emess(1,"incomplete geodesic/arc info");
 		if ((n_alpha = pj_param(NULL,start, "in_A").i) > 0) {
-			if (!(del_alpha = pj_param(NULL,start, "rdel_A").f))
+			if ((del_alpha = pj_param(NULL,start, "rdel_A").f) == 0.0)
 				emess(1,"del azimuth == 0");
 		} else if ((del_S = fabs(pj_param(NULL,start, "ddel_S").f)) != 0.) {
 			n_S = (int)(geod_S / del_S + .5);
diff --git a/src/geodesic.c b/src/geodesic.c
index e897e89..233dc34 100644
--- a/src/geodesic.c
+++ b/src/geodesic.c
@@ -13,19 +13,23 @@
  *   C. F. F. Karney,
  *   Algorithms for geodesics,
  *   J. Geodesy <b>87</b>, 43--55 (2013);
- *   https://dx.doi.org/10.1007/s00190-012-0578-z
- *   Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+ *   https://doi.org/10.1007/s00190-012-0578-z
+ *   Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
  *
  * See the comments in geodesic.h for documentation.
  *
- * Copyright (c) Charles Karney (2012-2016) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2012-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  */
 
 #include "geodesic.h"
 #include <math.h>
 
+#if !defined(HAVE_C99_MATH)
+#define HAVE_C99_MATH 0
+#endif
+
 #define GEOGRAPHICLIB_GEODESIC_ORDER 6
 #define nA1   GEOGRAPHICLIB_GEODESIC_ORDER
 #define nC1   GEOGRAPHICLIB_GEODESIC_ORDER
@@ -85,7 +89,10 @@ static void Init() {
     tolb = tol0 * tol2;
     xthresh = 1000 * tol2;
     degree = pi/180;
-    NaN = sqrt(-1.0);
+    {
+      real minus1 = -1;
+      NaN = sqrt(minus1);
+    }
     init = 1;
   }
 }
@@ -102,6 +109,12 @@ enum captype {
 };
 
 static real sq(real x) { return x * x; }
+#if HAVE_C99_MATH
+#define atanhx atanh
+#define copysignx copysign
+#define hypotx hypot
+#define cbrtx cbrt
+#else
 static real log1px(real x) {
   volatile real
     y = 1 + x,
@@ -130,6 +143,7 @@ static real cbrtx(real x) {
   real y = pow(fabs(x), 1/(real)(3)); /* Return the real cube root */
   return x < 0 ? -y : y;
 }
+#endif
 
 static real sumx(real u, real v, real* t) {
   volatile real s = u + v;
@@ -167,22 +181,37 @@ static void norm2(real* sinx, real* cosx) {
 }
 
 static real AngNormalize(real x) {
-  x = fmod(x, (real)(360));
-  return x < -180 ? x + 360 : (x < 180 ? x : x - 360);
+#if HAVE_C99_MATH
+  x = remainder(x, (real)(360));
+  return x != -180 ? x : 180;
+#else
+  real y = fmod(x, (real)(360));
+#if defined(_MSC_VER) && _MSC_VER < 1900
+  /*
+    Before version 14 (2015), Visual Studio had problems dealing
+    with -0.0.  Specifically
+      VC 10,11,12 and 32-bit compile: fmod(-0.0, 360.0) -> +0.0
+    sincosdx has a similar fix.
+    python 2.7 on Windows 32-bit machines has the same problem.
+  */
+  if (x == 0) y = x;
+#endif
+  return y <= -180 ? y + 360 : (y <= 180 ? y : y - 360);
+#endif
 }
 
 static real LatFix(real x)
 { return fabs(x) > 90 ? NaN : x; }
 
 static real AngDiff(real x, real y, real* e) {
-  real t, d = - AngNormalize(sumx(AngNormalize(x), AngNormalize(-y), &t));
-  /* Here y - x = d - t (mod 360), exactly, where d is in (-180,180] and
+  real t, d = AngNormalize(sumx(AngNormalize(-x), AngNormalize(y), &t));
+  /* Here y - x = d + t (mod 360), exactly, where d is in (-180,180] and
    * abs(t) <= eps (eps = 2^-45 for doubles).  The only case where the
    * addition of t takes the result outside the range (-180,180] is d = 180
-   * and t < 0.  The case, d = -180 + eps, t = eps, can't happen, since
+   * and t > 0.  The case, d = -180 + eps, t = -eps, can't happen, since
    * sum would have returned the exact result in such a case (i.e., given t
    * = 0). */
-  return sumx(d == 180 && t < 0 ? -180 : d, -t, e);
+  return sumx(d == 180 && t > 0 ? -180 : d, t, e);
 }
 
 static real AngRound(real x) {
@@ -199,19 +228,37 @@ static void sincosdx(real x, real* sinx, real* cosx) {
   /* In order to minimize round-off errors, this function exactly reduces
    * the argument to the range [-45, 45] before converting it to radians. */
   real r, s, c; int q;
+#if HAVE_C99_MATH && !defined(__GNUC__)
+  /* Disable for gcc because of bug in glibc version < 2.22, see
+   * https://sourceware.org/bugzilla/show_bug.cgi?id=17569 */
+  r = remquo(x, (real)(90), &q);
+#else
   r = fmod(x, (real)(360));
   q = (int)(floor(r / 90 + (real)(0.5)));
   r -= 90 * q;
+#endif
   /* now abs(r) <= 45 */
   r *= degree;
   /* Possibly could call the gnu extension sincos */
   s = sin(r); c = cos(r);
+#if defined(_MSC_VER) && _MSC_VER < 1900
+  /*
+    Before version 14 (2015), Visual Studio had problems dealing
+    with -0.0.  Specifically
+      VC 10,11,12 and 32-bit compile: fmod(-0.0, 360.0) -> +0.0
+      VC 12       and 64-bit compile:  sin(-0.0)        -> +0.0
+    AngNormalize has a similar fix.
+    python 2.7 on Windows 32-bit machines has the same problem.
+  */
+  if (x == 0) s = x;
+#endif
   switch ((unsigned)q & 3U) {
-  case 0U: *sinx =     s; *cosx =     c; break;
-  case 1U: *sinx =     c; *cosx = 0 - s; break;
-  case 2U: *sinx = 0 - s; *cosx = 0 - c; break;
-  default: *sinx = 0 - c; *cosx =     s; break; /* case 3U */
+  case 0U: *sinx =  s; *cosx =  c; break;
+  case 1U: *sinx =  c; *cosx = -s; break;
+  case 2U: *sinx = -s; *cosx = -c; break;
+  default: *sinx = -c; *cosx =  s; break; /* case 3U */
   }
+  if (x != 0) { *sinx += (real)(0); *cosx += (real)(0); }
 }
 
 static real atan2dx(real y, real x) {
@@ -230,7 +277,7 @@ static real atan2dx(real y, real x) {
      *
      *   case 0: ang = 0 + ang; break;
      */
-  case 1: ang = (y > 0 ? 180 : -180) - ang; break;
+  case 1: ang = (y >= 0 ? 180 : -180) - ang; break;
   case 2: ang =  90 - ang; break;
   case 3: ang = -90 + ang; break;
   }
@@ -274,7 +321,7 @@ static real Lambda12(const struct geod_geodesic* g,
                      real* pssig1, real* pcsig1,
                      real* pssig2, real* pcsig2,
                      real* peps,
-                     real* psomg12, real* pcomg12,
+                     real* pgomg12,
                      boolx diffp, real* pdlam12,
                      /* Scratch area of the right size */
                      real Ca[]);
@@ -534,7 +581,9 @@ real geod_genposition(const struct geod_geodesicline* l,
   salp2 = l->salp0; calp2 = l->calp0 * csig2; /* No need to normalize */
 
   if (outmask & GEOD_DISTANCE)
-    s12 = flags & GEOD_ARCMODE ? l->b * ((1 + l->A1m1) * sig12 + AB1) : s12_a12;
+    s12 = flags & GEOD_ARCMODE ?
+      l->b * ((1 + l->A1m1) * sig12 + AB1) :
+      s12_a12;
 
   if (outmask & GEOD_LONGITUDE) {
     real E = copysignx(1, l->salp0); /* east or west going? */
@@ -572,7 +621,8 @@ real geod_genposition(const struct geod_geodesicline* l,
       m12 = l->b * ((dn2 * (l->csig1 * ssig2) - l->dn1 * (l->ssig1 * csig2))
                     - l->csig1 * csig2 * J12);
     if (outmask & GEOD_GEODESICSCALE) {
-      real t = l->k2 * (ssig2 - l->ssig1) * (ssig2 + l->ssig1) / (l->dn1 + dn2);
+      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;
     }
@@ -635,7 +685,9 @@ static void geod_setarc(struct geod_geodesicline* l, real a13) {
 
 void geod_gensetdistance(struct geod_geodesicline* l,
  unsigned flags, real s13_a13) {
-  flags & GEOD_ARCMODE ? geod_setarc(l, s13_a13) : geod_setdistance(l, s13_a13);
+  flags & GEOD_ARCMODE ?
+    geod_setarc(l, s13_a13) :
+    geod_setdistance(l, s13_a13);
 }
 
 void geod_position(const struct geod_geodesicline* l, real s12,
@@ -786,7 +838,7 @@ static real geod_geninverse_int(const struct geod_geodesic* g,
 
     /* sig12 = sig2 - sig1 */
     sig12 = atan2(maxx((real)(0), csig1 * ssig2 - ssig1 * csig2),
-                  csig1 * csig2 + ssig1 * ssig2);
+                                  csig1 * csig2 + ssig1 * ssig2);
     Lengths(g, g->n, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2,
             cbet1, cbet2, &s12x, &m12x, 0,
             outmask & GEOD_GEODESICSCALE ? &M12 : 0,
@@ -858,7 +910,7 @@ static real geod_geninverse_int(const struct geod_geodesic* g,
        * value of alp1 is then further from the solution) or if the new
        * estimate of alp1 lies outside (0,pi); in this case, the new starting
        * guess is taken to be (alp1a + alp1b) / 2. */
-      real ssig1 = 0, csig1 = 0, ssig2 = 0, csig2 = 0, eps = 0;
+      real ssig1 = 0, csig1 = 0, ssig2 = 0, csig2 = 0, eps = 0, domg12 = 0;
       unsigned numit = 0;
       /* Bracketing range */
       real salp1a = tiny, calp1a = 1, salp1b = tiny, calp1b = -1;
@@ -870,7 +922,7 @@ static real geod_geninverse_int(const struct geod_geodesic* g,
           v = Lambda12(g, sbet1, cbet1, dn1, sbet2, cbet2, dn2, salp1, calp1,
                         slam12, clam12,
                         &salp2, &calp2, &sig12, &ssig1, &csig1, &ssig2, &csig2,
-                        &eps, &somg12, &comg12, numit < maxit1, &dv, Ca);
+                        &eps, &domg12, numit < maxit1, &dv, Ca);
         /* 2 * tol0 is approximately 1 ulp for a number in [0, pi]. */
         /* Reversed test to allow escape with NaNs */
         if (tripb || !(fabs(v) >= (tripn ? 8 : 1) * tol0)) break;
@@ -896,7 +948,7 @@ static real geod_geninverse_int(const struct geod_geodesic* g,
             continue;
           }
         }
-        /* Either dv was not postive or updated value was outside legal
+        /* Either dv was not positive or updated value was outside legal
          * range.  Use the midpoint of the bracket as the next estimate.
          * This mechanism is not needed for the WGS84 ellipsoid, but it does
          * catch problems with more eccentric ellipsoids.  Its efficacy is
@@ -918,6 +970,12 @@ static real geod_geninverse_int(const struct geod_geodesic* g,
       m12x *= g->b;
       s12x *= g->b;
       a12 = sig12 / degree;
+      if (outmask & GEOD_AREA) {
+        /* omg12 = lam12 - domg12 */
+        real sdomg12 = sin(domg12), cdomg12 = cos(domg12);
+        somg12 = slam12 * cdomg12 - clam12 * sdomg12;
+        comg12 = clam12 * cdomg12 + slam12 * sdomg12;
+      }
     }
   }
 
@@ -953,11 +1011,8 @@ static real geod_geninverse_int(const struct geod_geodesic* g,
       /* Avoid problems with indeterminate sig1, sig2 on equator */
       S12 = 0;
 
-    if (!meridian) {
-      if (somg12 > 1) {
-        somg12 = sin(omg12); comg12 = cos(omg12);
-      } else
-        norm2(&somg12, &comg12);
+    if (!meridian && somg12 > 1) {
+      somg12 = sin(omg12); comg12 = cos(omg12);
     }
 
     if (!meridian &&
@@ -1385,15 +1440,15 @@ real Lambda12(const struct geod_geodesic* g,
               real* pssig1, real* pcsig1,
               real* pssig2, real* pcsig2,
               real* peps,
-              real* psomg12, real* pcomg12,
+              real* pdomg12,
               boolx diffp, real* pdlam12,
               /* Scratch area of the right size */
               real Ca[]) {
   real salp2 = 0, calp2 = 0, sig12 = 0,
     ssig1 = 0, csig1 = 0, ssig2 = 0, csig2 = 0, eps = 0,
-    somg12 = 0, comg12 = 0, dlam12 = 0;
+    domg12 = 0, dlam12 = 0;
   real salp0, calp0;
-  real somg1, comg1, somg2, comg2, lam12;
+  real somg1, comg1, somg2, comg2, somg12, comg12, lam12;
   real B312, eta, k2;
 
   if (sbet1 == 0 && calp1 == 0)
@@ -1436,7 +1491,7 @@ real Lambda12(const struct geod_geodesic* g,
 
   /* sig12 = sig2 - sig1, limit to [0, pi] */
   sig12 = atan2(maxx((real)(0), csig1 * ssig2 - ssig1 * csig2),
-                csig1 * csig2 + ssig1 * ssig2);
+                                csig1 * csig2 + ssig1 * ssig2);
 
   /* omg12 = omg2 - omg1, limit to [0, pi] */
   somg12 = maxx((real)(0), comg1 * somg2 - somg1 * comg2);
@@ -1449,7 +1504,8 @@ real Lambda12(const struct geod_geodesic* g,
   C3f(g, eps, Ca);
   B312 = (SinCosSeries(TRUE, ssig2, csig2, Ca, nC3-1) -
           SinCosSeries(TRUE, ssig1, csig1, Ca, nC3-1));
-  lam12 = eta - g->f * A3f(g, eps) * salp0 * (sig12 + B312);
+  domg12 = -g->f * A3f(g, eps) * salp0 * (sig12 + B312);
+  lam12 = eta + domg12;
 
   if (diffp) {
     if (calp2 == 0)
@@ -1469,8 +1525,7 @@ real Lambda12(const struct geod_geodesic* g,
   *pssig2 = ssig2;
   *pcsig2 = csig2;
   *peps = eps;
-  *psomg12 = somg12;
-  *pcomg12 = comg12;
+  *pdomg12 = domg12;
   if (diffp)
     *pdlam12 = dlam12;
 
@@ -1484,7 +1539,7 @@ real A3f(const struct geod_geodesic* g, real eps) {
 
 void C3f(const struct geod_geodesic* g, real eps, real c[]) {
   /* Evaluate C3 coeffs
-   * Elements c[1] thru c[nC3 - 1] are set */
+   * Elements c[1] through c[nC3 - 1] are set */
   real mult = 1;
   int o = 0, l;
   for (l = 1; l < nC3; ++l) {   /* l is index of C3[l] */
@@ -1497,7 +1552,7 @@ void C3f(const struct geod_geodesic* g, real eps, real c[]) {
 
 void C4f(const struct geod_geodesic* g, real eps, real c[]) {
   /* Evaluate C4 coeffs
-   * Elements c[0] thru c[nC4 - 1] are set */
+   * Elements c[0] through c[nC4 - 1] are set */
   real mult = 1;
   int o = 0, l;
   for (l = 0; l < nC4; ++l) {   /* l is index of C4[l] */
@@ -1746,15 +1801,22 @@ int transit(real lon1, real lon2) {
   lon1 = AngNormalize(lon1);
   lon2 = AngNormalize(lon2);
   lon12 = AngDiff(lon1, lon2, 0);
-  return lon1 < 0 && lon2 >= 0 && lon12 > 0 ? 1 :
-    (lon2 < 0 && lon1 >= 0 && lon12 < 0 ? -1 : 0);
+  return lon1 <= 0 && lon2 > 0 && lon12 > 0 ? 1 :
+    (lon2 <= 0 && lon1 > 0 && lon12 < 0 ? -1 : 0);
 }
 
 int transitdirect(real lon1, real lon2) {
+#if HAVE_C99_MATH
+  lon1 = remainder(lon1, (real)(720));
+  lon2 = remainder(lon2, (real)(720));
+  return ( (lon2 >= 0 && lon2 < 360 ? 0 : 1) -
+           (lon1 >= 0 && lon1 < 360 ? 0 : 1) );
+#else
   lon1 = fmod(lon1, (real)(720));
   lon2 = fmod(lon2, (real)(720));
   return ( ((lon2 >= 0 && lon2 < 360) || lon2 < -360 ? 0 : 1) -
            ((lon1 >= 0 && lon1 < 360) || lon1 < -360 ? 0 : 1) );
+#endif
 }
 
 void accini(real s[]) {
@@ -1810,7 +1872,7 @@ void geod_polygon_addpoint(const struct geod_geodesic* g,
     p->lat0 = p->lat = lat;
     p->lon0 = p->lon = lon;
   } else {
-    real s12, S12;
+    real s12, S12 = 0;       /* Initialize S12 to stop Visual Studio warning */
     geod_geninverse(g, p->lat, p->lon, lat, lon,
                     &s12, 0, 0, 0, 0, 0, p->polyline ? 0 : &S12);
     accadd(p->P, s12);
@@ -1827,7 +1889,7 @@ 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;
+    real lat, lon, S12 = 0;  /* Initialize S12 to stop Visual Studio warning */
     geod_gendirect(g, p->lat, p->lon, azi, GEOD_LONG_UNROLL, s,
                    &lat, &lon, 0,
                    0, 0, 0, 0, p->polyline ? 0 : &S12);
@@ -1902,7 +1964,7 @@ unsigned geod_polygon_testpoint(const struct geod_geodesic* g,
   tempsum = p->polyline ? 0 : p->A[0];
   crossings = p->crossings;
   for (i = 0; i < (p->polyline ? 1 : 2); ++i) {
-    real s12, S12;
+    real s12, S12 = 0;       /* Initialize S12 to stop Visual Studio warning */
     geod_geninverse(g,
                     i == 0 ? p->lat  : lat, i == 0 ? p->lon  : lon,
                     i != 0 ? p->lat0 : lat, i != 0 ? p->lon0 : lon,
diff --git a/src/geodesic.h b/src/geodesic.h
index c3f28c7..43fd0d1 100644
--- a/src/geodesic.h
+++ b/src/geodesic.h
@@ -4,12 +4,12 @@
  *
  * This an implementation in C of the geodesic algorithms described in
  * - C. F. F. Karney,
- *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   <a href="https://doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43--55 (2013);
- *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
  *   10.1007/s00190-012-0578-z</a>;
- *   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+ *   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
  *   geod-addenda.html</a>.
  * .
  * The principal advantages of these algorithms over previous ones (e.g.,
@@ -96,7 +96,7 @@
  *   [\e d, \e d], for arbitrary \e d.
  *
  * These routines are a simple transcription of the corresponding C++ classes
- * in <a href="http://geographiclib.sourceforge.net"> GeographicLib</a>.  The
+ * in <a href="https://geographiclib.sourceforge.io"> 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.
@@ -107,12 +107,12 @@
  * twice about restructuring the internals of the C code since this may make
  * porting fixes from the C++ code more difficult.
  *
- * Copyright (c) Charles Karney (2012-2016) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2012-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * This library was distributed with
- * <a href="../index.html">GeographicLib</a> 1.46.
+ * <a href="../index.html">GeographicLib</a> 1.49.
  **********************************************************************/
 
 #if !defined(GEODESIC_H)
@@ -127,7 +127,7 @@
  * The minor version of the geodesic library.  (This tracks the version of
  * GeographicLib.)
  **********************************************************************/
-#define GEODESIC_VERSION_MINOR 46
+#define GEODESIC_VERSION_MINOR 49
 /**
  * The patch level of the geodesic library.  (This tracks the version of
  * GeographicLib.)
@@ -242,7 +242,7 @@ extern "C" {
    *
    * \e g must have been initialized with a call to geod_init().  \e lat1
    * should be in the range [−90°, 90°].  The values of \e lon2
-   * and \e azi2 returned are in the range [−180°, 180°).  Any of
+   * 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.
    *
@@ -327,7 +327,7 @@ extern "C" {
    *
    * \e g must have been initialized with a call to geod_init().  \e lat1 and
    * \e lat2 should be in the range [−90°, 90°].  The values of
-   * \e azi1 and \e azi2 returned are in the range [−180°, 180°).
+   * \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.
    *
@@ -448,7 +448,7 @@ extern "C" {
    *
    * This function sets point 3 of the geod_geodesicline to correspond to point
    * 2 of the direct geodesic problem.  See geod_lineinit() for more
-   * informaion.
+   * information.
    **********************************************************************/
   void geod_directline(struct geod_geodesicline* l,
                        const struct geod_geodesic* g,
@@ -478,7 +478,7 @@ extern "C" {
    *
    * This function sets point 3 of the geod_geodesicline to correspond to point
    * 2 of the direct geodesic problem.  See geod_lineinit() for more
-   * informaion.
+   * information.
    **********************************************************************/
   void geod_gendirectline(struct geod_geodesicline* l,
                           const struct geod_geodesic* g,
@@ -504,7 +504,7 @@ extern "C" {
    *
    * This function sets point 3 of the geod_geodesicline to correspond to point
    * 2 of the inverse geodesic problem.  See geod_lineinit() for more
-   * informaion.
+   * information.
    **********************************************************************/
   void geod_inverseline(struct geod_geodesicline* l,
                        const struct geod_geodesic* g,
@@ -525,7 +525,7 @@ extern "C" {
    *
    * \e l must have been initialized with a call, e.g., 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
+   * 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.
    *
@@ -594,7 +594,7 @@ extern "C" {
    *
    * \e l must have been initialized with a call to geod_lineinit() with \e
    * caps |= GEOD_DISTANCE_IN.  The value \e azi2 returned is in the range
-   * [−180°, 180°).  Any of the "return" arguments \e plat2,
+   * [−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.
@@ -881,16 +881,16 @@ extern "C" {
    * mask values for 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 */
+    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 */
   };
 
   /**
diff --git a/src/geodtest.c b/src/geodtest.c
index 990a213..0f2c0ac 100644
--- a/src/geodtest.c
+++ b/src/geodtest.c
@@ -4,9 +4,9 @@
  *
  * Run these tests by configuring with cmake and running "make test".
  *
- * Copyright (c) Charles Karney (2015-2016) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2015-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 /** @cond SKIP */
@@ -16,21 +16,21 @@
 #include <math.h>
 
 #if defined(_MSC_VER)
-// Squelch warnings about assignment within conditional expression
+/* Squelch warnings about assignment within conditional expression */
 #  pragma warning (disable: 4706)
 #endif
 
-double wgs84_a = 6378137, wgs84_f = 1/298.257223563; /* WGS84 */
+static const double wgs84_a = 6378137, wgs84_f = 1/298.257223563; /* WGS84 */
 
-int assertEquals(double x, double y, double d) {
+static int assertEquals(double x, double y, double d) {
   if (fabs(x - y) <= d)
     return 0;
   printf("assertEquals fails: %.7g != %.7g +/- %.7g\n", x, y, d);
   return 1;
 }
 
-const int ncases = 20;
-double testcases[20][12] = {
+static const int ncases = 20;
+static const double testcases[20][12] = {
   {35.60777, -139.44815, 111.098748429560326,
    -11.17491, -69.95921, 129.289270889708762,
    8935244.5604818305, 80.50729714281974, 6273170.2055303837,
@@ -112,7 +112,7 @@ double testcases[20][12] = {
    13487015.8381145492, 121.294026715742277, 5481428.9945736388,
    -0.51527225545373252, -0.51556587964721788, 104679964020340.318}};
 
-int testinverse() {
+static int testinverse() {
   double lat1, lon1, azi1, lat2, lon2, azi2, s12, a12, m12, M12, M21, S12;
   double azi1a, azi2a, s12a, a12a, m12a, M12a, M21a, S12a;
   struct geod_geodesic g;
@@ -137,7 +137,7 @@ int testinverse() {
   return result;
 }
 
-int testdirect() {
+static int testdirect() {
   double lat1, lon1, azi1, lat2, lon2, azi2, s12, a12, m12, M12, M21, S12;
   double lat2a, lon2a, azi2a, a12a, m12a, M12a, M21a, S12a;
   struct geod_geodesic g;
@@ -164,7 +164,7 @@ int testdirect() {
   return result;
 }
 
-int testarcdirect() {
+static int testarcdirect() {
   double lat1, lon1, azi1, lat2, lon2, azi2, s12, a12, m12, M12, M21, S12;
   double lat2a, lon2a, azi2a, s12a, m12a, M12a, M21a, S12a;
   struct geod_geodesic g;
@@ -190,7 +190,7 @@ int testarcdirect() {
   return result;
 }
 
-int GeodSolve0() {
+static int GeodSolve0() {
   double azi1, azi2, s12;
   struct geod_geodesic g;
   int result = 0;
@@ -202,7 +202,7 @@ int GeodSolve0() {
   return result;
 }
 
-int GeodSolve1() {
+static int GeodSolve1() {
   double lat2, lon2, azi2;
   struct geod_geodesic g;
   int result = 0;
@@ -215,7 +215,7 @@ int GeodSolve1() {
   return result;
 }
 
-int GeodSolve2() {
+static int GeodSolve2() {
   /* Check fix for antipodal prolate bug found 2010-09-04 */
   double azi1, azi2, s12;
   struct geod_geodesic g;
@@ -232,7 +232,7 @@ int GeodSolve2() {
   return result;
 }
 
-int GeodSolve4() {
+static int GeodSolve4() {
   /* Check fix for short line bug found 2010-05-21 */
   double s12;
   struct geod_geodesic g;
@@ -244,7 +244,7 @@ int GeodSolve4() {
   return result;
 }
 
-int GeodSolve5() {
+static int GeodSolve5() {
   /* Check fix for point2=pole bug found 2010-05-03 */
   double lat2, lon2, azi2;
   struct geod_geodesic g;
@@ -254,7 +254,7 @@ int GeodSolve5() {
   result += assertEquals(lat2, 90, 0.5e-5);
   if (lon2 < 0) {
     result += assertEquals(lon2, -150, 0.5e-5);
-    result += assertEquals(azi2, -180, 0.5e-5);
+    result += assertEquals(fabs(azi2), 180, 0.5e-5);
   } else {
     result += assertEquals(lon2, 30, 0.5e-5);
     result += assertEquals(azi2, 0, 0.5e-5);
@@ -262,7 +262,7 @@ int GeodSolve5() {
   return result;
 }
 
-int GeodSolve6() {
+static int GeodSolve6() {
   /* Check fix for volatile sbet12a bug found 2011-06-25 (gcc 4.4.4
    * x86 -O3).  Found again on 2012-03-27 with tdm-mingw32 (g++ 4.6.1). */
   double s12;
@@ -281,7 +281,7 @@ int GeodSolve6() {
   return result;
 }
 
-int GeodSolve9() {
+static int GeodSolve9() {
   /* Check fix for volatile x bug found 2011-06-25 (gcc 4.4.4 x86 -O3) */
   double s12;
   struct geod_geodesic g;
@@ -293,7 +293,7 @@ int GeodSolve9() {
   return result;
 }
 
-int GeodSolve10() {
+static int GeodSolve10() {
   /* Check fix for adjust tol1_ bug found 2011-06-25 (Visual Studio
    * 10 rel + debug) */
   double s12;
@@ -306,7 +306,7 @@ int GeodSolve10() {
   return result;
 }
 
-int GeodSolve11() {
+static int GeodSolve11() {
   /* Check fix for bet2 = -bet1 bug found 2011-06-25 (Visual Studio
    * 10 rel + debug) */
   double s12;
@@ -319,7 +319,7 @@ int GeodSolve11() {
   return result;
 }
 
-int GeodSolve12() {
+static int GeodSolve12() {
   /* Check fix for inverse geodesics on extreme prolate/oblate
    * ellipsoids Reported 2012-08-29 Stefan Guenther
    * <stefan.gunther at embl.de>; fixed 2012-10-07 */
@@ -334,11 +334,15 @@ int GeodSolve12() {
   return result;
 }
 
-int GeodSolve14() {
+static int GeodSolve14() {
   /* Check fix for inverse ignoring lon12 = nan */
-  double azi1, azi2, s12, nan = sqrt(-1.0);
+  double azi1, azi2, s12, nan;
   struct geod_geodesic g;
   int result = 0;
+  {
+    double minus1 = -1;
+    nan = sqrt(minus1);
+  }
   geod_init(&g, wgs84_a, wgs84_f);
   geod_inverse(&g, 0, 0, 1, nan, &s12, &azi1, &azi2);
   result += azi1 == azi1 ? 1 : 0;
@@ -347,7 +351,7 @@ int GeodSolve14() {
   return result;
 }
 
-int GeodSolve15() {
+static int GeodSolve15() {
   /* Initial implementation of Math::eatanhe was wrong for e^2 < 0.  This
    * checks that this is fixed. */
   double S12;
@@ -360,7 +364,7 @@ int GeodSolve15() {
   return result;
 }
 
-int GeodSolve17() {
+static int GeodSolve17() {
   /* Check fix for LONG_UNROLL bug found on 2015-05-07 */
   double lat2, lon2, azi2;
   struct geod_geodesic g;
@@ -389,7 +393,7 @@ int GeodSolve17() {
   return result;
 }
 
-int GeodSolve26() {
+static int GeodSolve26() {
   /* Check 0/0 problem with area calculation on sphere 2015-09-08 */
   double S12;
   struct geod_geodesic g;
@@ -400,7 +404,7 @@ int GeodSolve26() {
   return result;
 }
 
-int GeodSolve28() {
+static int GeodSolve28() {
   /* Check for bad placement of assignment of r.a12 with |f| > 0.01 (bug in
    * Java implementation fixed on 2015-05-19). */
   double a12;
@@ -412,7 +416,7 @@ int GeodSolve28() {
   return result;
 }
 
-int GeodSolve33() {
+static int GeodSolve33() {
   /* Check max(-0.0,+0.0) issues 2015-08-22 (triggered by bugs in Octave --
    * sind(-0.0) = +0.0 -- and in some version of Visual Studio --
    * fmod(-0.0, 360.0) = +0.0. */
@@ -430,11 +434,11 @@ int GeodSolve33() {
   result += assertEquals(s12, 19980862, 0.5);
   geod_inverse(&g, 0, 0, 0, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 20003931, 0.5);
   geod_inverse(&g, 0, 0, 1, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 19893357, 0.5);
   geod_init(&g, 6.4e6, 0);
   geod_inverse(&g, 0, 0, 0, 179, &s12, &azi1, &azi2);
@@ -443,11 +447,11 @@ int GeodSolve33() {
   result += assertEquals(s12, 19994492, 0.5);
   geod_inverse(&g, 0, 0, 0, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 20106193, 0.5);
   geod_inverse(&g, 0, 0, 1, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 19994492, 0.5);
   geod_init(&g, 6.4e6, -1/300.0);
   geod_inverse(&g, 0, 0, 0, 179, &s12, &azi1, &azi2);
@@ -464,18 +468,22 @@ int GeodSolve33() {
   result += assertEquals(s12, 20082617, 0.5);
   geod_inverse(&g, 0, 0, 1, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 20027270, 0.5);
 
   return result;
 }
 
-int GeodSolve55() {
+static int GeodSolve55() {
   /* Check fix for nan + point on equator or pole not returning all nans in
    * Geodesic::Inverse, found 2015-09-23. */
-  double azi1, azi2, s12, nan = sqrt(-1.0);
+  double azi1, azi2, s12, nan;
   struct geod_geodesic g;
   int result = 0;
+  {
+    double minus1 = -1;
+    nan = sqrt(minus1);
+  }
   geod_init(&g, wgs84_a, wgs84_f);
   geod_inverse(&g, nan, 0, 0, 90, &s12, &azi1, &azi2);
   result += azi1 == azi1 ? 1 : 0;
@@ -488,7 +496,7 @@ int GeodSolve55() {
   return result;
 }
 
-int GeodSolve59() {
+static int GeodSolve59() {
   /* Check for points close with longitudes close to 180 deg apart. */
   double azi1, azi2, s12;
   struct geod_geodesic g;
@@ -497,11 +505,11 @@ int GeodSolve59() {
   geod_inverse(&g, 5, 0.00000000000001, 10, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.000000000000035, 1.5e-14);
   result += assertEquals(azi2, 179.99999999999996, 1.5e-14);
-  result += assertEquals(s12, 18345191.174332713, 2.5e-9);
+  result += assertEquals(s12, 18345191.174332713, 5e-9);
   return result;
 }
 
-int GeodSolve61() {
+static int GeodSolve61() {
   /* Make sure small negative azimuths are west-going */
   double lat2, lon2, azi2;
   struct geod_geodesic g;
@@ -513,16 +521,16 @@ int GeodSolve61() {
                  &lat2, &lon2, &azi2, 0, 0, 0, 0, 0);
   result += assertEquals(lat2, 45.30632, 0.5e-5);
   result += assertEquals(lon2, -180, 0.5e-5);
-  result += assertEquals(azi2, -180, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180, 0.5e-5);
   geod_inverseline(&l, &g, 45, 0, 80, -0.000000000000000003, 0);
   geod_genposition(&l, flags, 1e7, &lat2, &lon2, &azi2, 0, 0, 0, 0, 0);
   result += assertEquals(lat2, 45.30632, 0.5e-5);
   result += assertEquals(lon2, -180, 0.5e-5);
-  result += assertEquals(azi2, -180, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180, 0.5e-5);
   return result;
 }
 
-int GeodSolve65() {
+static int GeodSolve65() {
   /* Check for bug in east-going check in GeodesicLine (needed to check for
    * sign of 0) and sign error in area calculation due to a bogus override of
    * the code for alp12.  Found/fixed on 2015-12-19. */
@@ -537,7 +545,7 @@ int GeodSolve65() {
                          &lat2, &lon2, &azi2, &s12, &m12, &M12, &M21, &S12);
   result += assertEquals(lat2, -60.23169, 0.5e-5);
   result += assertEquals(lon2, -0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 10000000, 0.5);
   result += assertEquals(a12, 90.06544, 0.5e-5);
   result += assertEquals(m12, 6363636, 0.5);
@@ -558,7 +566,7 @@ int GeodSolve65() {
   return result;
 }
 
-int GeodSolve67() {
+static int GeodSolve67() {
   /* Check for InverseLine if line is slightly west of S and that s13 is
      correctly set. */
   double lat2, lon2, azi2;
@@ -579,7 +587,7 @@ int GeodSolve67() {
   return result;
 }
 
-int GeodSolve71() {
+static int GeodSolve71() {
   /* Check that DirectLine sets s13. */
   double lat2, lon2, azi2;
   struct geod_geodesic g;
@@ -594,7 +602,7 @@ int GeodSolve71() {
   return result;
 }
 
-int GeodSolve73() {
+static int GeodSolve73() {
   /* Check for backwards from the pole bug reported by Anon on 2016-02-13.
    * This only affected the Java implementation.  It was introduced in Java
    * version 1.44 and fixed in 1.46-SNAPSHOT on 2016-01-17. */
@@ -610,8 +618,9 @@ int GeodSolve73() {
   return result;
 }
 
-void planimeter(const struct geod_geodesic* g, double points[][2], int N,
-                double* perimeter, double* area) {
+static void planimeter(const struct geod_geodesic* g,
+                       double points[][2], int N,
+                       double* perimeter, double* area) {
   struct geod_polygon p;
   int i;
   geod_polygon_init(&p, 0);
@@ -620,8 +629,9 @@ void planimeter(const struct geod_geodesic* g, double points[][2], int N,
   geod_polygon_compute(g, &p, 0, 1, area, perimeter);
 }
 
-void polylength(const struct geod_geodesic* g, double points[][2], int N,
-                double* perimeter) {
+static void polylength(const struct geod_geodesic* g,
+                       double points[][2], int N,
+                       double* perimeter) {
   struct geod_polygon p;
   int i;
   geod_polygon_init(&p, 1);
@@ -630,7 +640,55 @@ void polylength(const struct geod_geodesic* g, double points[][2], int N,
   geod_polygon_compute(g, &p, 0, 1, 0, perimeter);
 }
 
-int Planimeter0() {
+static int GeodSolve74() {
+  /* Check fix for inaccurate areas, bug introduced in v1.46, fixed
+     2015-10-16. */
+  double a12, s12, azi1, azi2, m12, M12, M21, S12;
+  struct geod_geodesic g;
+  int result = 0;
+  geod_init(&g, wgs84_a, wgs84_f);
+  a12 = geod_geninverse(&g, 54.1589, 15.3872, 54.1591, 15.3877,
+                        &s12, &azi1, &azi2, &m12, &M12, &M21, &S12);
+  result += assertEquals(azi1, 55.723110355, 5e-9);
+  result += assertEquals(azi2, 55.723515675, 5e-9);
+  result += assertEquals(s12,  39.527686385, 5e-9);
+  result += assertEquals(a12,   0.000355495, 5e-9);
+  result += assertEquals(m12,  39.527686385, 5e-9);
+  result += assertEquals(M12,   0.999999995, 5e-9);
+  result += assertEquals(M21,   0.999999995, 5e-9);
+  result += assertEquals(S12, 286698586.30197, 5e-4);
+  return result;
+}
+
+static int GeodSolve76() {
+  /* The distance from Wellington and Salamanca (a classic failure of
+     Vincenty) */
+  double azi1, azi2, s12;
+  struct geod_geodesic g;
+  int result = 0;
+  geod_init(&g, wgs84_a, wgs84_f);
+  geod_inverse(&g, -(41+19/60.0), 174+49/60.0, 40+58/60.0, -(5+30/60.0),
+               &s12, &azi1, &azi2);
+  result += assertEquals(azi1, 160.39137649664, 0.5e-11);
+  result += assertEquals(azi2,  19.50042925176, 0.5e-11);
+  result += assertEquals(s12,  19960543.857179, 0.5e-6);
+  return result;
+}
+
+static int GeodSolve78() {
+  /* An example where the NGS calculator fails to converge */
+  double azi1, azi2, s12;
+  struct geod_geodesic g;
+  int result = 0;
+  geod_init(&g, wgs84_a, wgs84_f);
+  geod_inverse(&g, 27.2, 0.0, -27.1, 179.5, &s12, &azi1, &azi2);
+  result += assertEquals(azi1,  45.82468716758, 0.5e-11);
+  result += assertEquals(azi2, 134.22776532670, 0.5e-11);
+  result += assertEquals(s12,  19974354.765767, 0.5e-6);
+  return result;
+}
+
+static int Planimeter0() {
   /* Check fix for pole-encircling bug found 2011-03-16 */
   double pa[4][2] = {{89, 0}, {89, 90}, {89, 180}, {89, 270}};
   double pb[4][2] = {{-89, 0}, {-89, 90}, {-89, 180}, {-89, 270}};
@@ -663,7 +721,7 @@ int Planimeter0() {
   return result;
 }
 
-int Planimeter5() {
+static int Planimeter5() {
   /* Check fix for Planimeter pole crossing bug found 2011-06-24 */
   double points[3][2] = {{89, 0.1}, {89, 90.1}, {89, -179.9}};
   struct geod_geodesic g;
@@ -676,7 +734,7 @@ int Planimeter5() {
   return result;
 }
 
-int Planimeter6() {
+static int Planimeter6() {
   /* Check fix for Planimeter lon12 rounding bug found 2012-12-03 */
   double pa[3][2] = {{9, -0.00000000000001}, {9, 180}, {9, 0}};
   double pb[3][2] = {{9, 0.00000000000001}, {9, 0}, {9, 180}};
@@ -702,7 +760,7 @@ int Planimeter6() {
   return result;
 }
 
-int Planimeter12() {
+static int Planimeter12() {
   /* Area of arctic circle (not really -- adjunct to rhumb-area test) */
   double points[2][2] = {{66.562222222, 0}, {66.562222222, 180}};
   struct geod_geodesic g;
@@ -715,7 +773,7 @@ int Planimeter12() {
   return result;
 }
 
-int Planimeter13() {
+static int Planimeter13() {
   /* Check encircling pole twice */
   double points[6][2] = {{89,-360}, {89,-240}, {89,-120},
                          {89,0}, {89,120}, {89,240}};
@@ -757,6 +815,9 @@ int main() {
   if ((i = GeodSolve67())) {++n; printf("GeodSolve67 fail: %d\n", i);}
   if ((i = GeodSolve71())) {++n; printf("GeodSolve71 fail: %d\n", i);}
   if ((i = GeodSolve73())) {++n; printf("GeodSolve73 fail: %d\n", i);}
+  if ((i = GeodSolve74())) {++n; printf("GeodSolve74 fail: %d\n", i);}
+  if ((i = GeodSolve76())) {++n; printf("GeodSolve76 fail: %d\n", i);}
+  if ((i = GeodSolve78())) {++n; printf("GeodSolve78 fail: %d\n", i);}
   if ((i = Planimeter0())) {++n; printf("Planimeter0 fail: %d\n", i);}
   if ((i = Planimeter5())) {++n; printf("Planimeter5 fail: %d\n", i);}
   if ((i = Planimeter6())) {++n; printf("Planimeter6 fail: %d\n", i);}
diff --git a/src/gie.c b/src/gie.c
new file mode 100644
index 0000000..b2673d1
--- /dev/null
+++ b/src/gie.c
@@ -0,0 +1,1890 @@
+/***********************************************************************
+
+       gie - The Geospatial Integrity Investigation Environment
+
+************************************************************************
+
+The Geospatial Integrity Investigation Environment "gie" is a modest
+regression testing environment for the PROJ.4 transformation library.
+
+Its primary design goal was to be able to replace those thousands of
+lines of regression testing code that are (at time of writing) part
+of PROJ.4, while not requiring any other kind of tooling than the same
+C compiler already employed for compiling the library.
+
+The basic functionality of the gie command language is implemented
+through just 3 command verbs:
+
+operation,     which defines the PROJ.4 operation to test,
+accept,        which defines the input coordinate to read, and
+expect,        which defines the result to expect.
+
+E.g:
+
+operation  +proj=utm  +zone=32  +ellps=GRS80
+accept     12  55
+expect     691_875.632_14   6_098_907.825_05
+
+Note that gie accepts the underscore ("_") as a thousands separator.
+It is not required (in fact, it is entirely ignored by the input
+routine), but it significantly improves the readability of the very
+long strings of numbers typically required in projected coordinates.
+
+By default, gie considers the EXPECTation met, if the result comes to
+within 0.5 mm of the expected. This default can be changed using the
+'tolerance' command verb (and yes, I know, linguistically speaking, both
+"operation" and "tolerance" are nouns, not verbs). See the first
+few hundred lines of the "builtins.gie" test file for more details of
+the command verbs available (verbs of both the VERBal and NOUNistic
+persuation).
+
+--
+
+But more importantly than being an acronym for "Geospatial Integrity
+Investigation Environment", gie were also the initials, user id, and
+USGS email address of Gerald Ian Evenden (1935--2016), the geospatial
+visionary, who, already in the 1980s, started what was to become the
+PROJ.4 of today.
+
+Gerald's clear vision was that map projections are *just special
+functions*. Some of them rather complex, most of them of two variables,
+but all of them *just special functions*, and not particularly more
+special than the sin(), cos(), tan(), and hypot() already available in
+the C standard library.
+
+And hence, according to Gerald, *they should not be particularly much
+harder to use*, for a programmer, than the sin()s, tan()s and hypot()s
+so readily available.
+
+Gerald's ingenuity also showed in the implementation of the vision,
+where he devised a comprehensive, yet simple, system of key-value
+pairs for parameterising a map projection, and the highly flexible
+PJ struct, storing run-time compiled versions of those key-value pairs,
+hence making a map projection function call, pj_fwd(PJ, point), as easy
+as a traditional function call like hypot(x,y).
+
+While today, we may have more formally well defined metadata systems
+(most prominent the OGC WKT2 representation), nothing comes close being
+as easily readable ("human compatible") as Gerald's key-value system.
+This system in particular, and the PROJ.4 system in general, was
+Gerald's great gift to anyone using and/or communicating about geodata.
+
+It is only reasonable to name a program, keeping an eye on the integrity
+of the PROJ.4 system, in honour of Gerald.
+
+So in honour, and hopefully also in the spirit, of Gerald Ian Evenden
+(1935--2016), this is the Geospatial Integrity Investigation Environment.
+
+************************************************************************
+
+Thomas Knudsen, thokn at sdfe.dk, 2017-10-01/2017-10-08
+
+************************************************************************
+
+* Copyright (c) 2017 Thomas Knudsen
+* Copyright (c) 2017, SDFE
+*
+* 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 <ctype.h>
+#include <errno.h>
+#include <math.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <proj.h>
+#include "proj_internal.h"
+#include "projects.h"
+
+#include "optargpm.h"
+
+/* Package for flexible format I/O - ffio */
+typedef struct ffio {
+    FILE *f;
+    const char **tags;
+    const char *tag;
+    char *args;
+    char *next_args;
+    size_t n_tags;
+    size_t args_size;
+    size_t next_args_size;
+    size_t argc;
+    size_t lineno, next_lineno;
+    size_t level;
+}  ffio;
+
+FILE *test = 0;
+
+static int get_inp (ffio *F);
+static int skip_to_next_tag (ffio *F);
+static int step_into_gie_block (ffio *F);
+static int locate_tag (ffio *F, const char *tag);
+static int nextline (ffio *F);
+static int at_end_delimiter (ffio *F);
+static const char *at_tag (ffio *F);
+static int at_decorative_element (ffio *F);
+static ffio *ffio_destroy (ffio *F);
+static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_size);
+
+static const char *gie_tags[] = {
+    "<gie>", "operation", "accept", "expect", "roundtrip", "banner", "verbose",
+    "direction", "tolerance", "builtins", "echo", "</gie>"
+};
+
+static const size_t n_gie_tags = sizeof gie_tags / sizeof gie_tags[0];
+
+
+/* from proj_strtod.c */
+double proj_strtod(const char *str, char **endptr);
+double proj_atof(const char *str);
+
+int   main(int argc, char **argv);
+
+static int   dispatch (const char *cmnd, const char *args);
+static int   errmsg (int errlev, const char *msg, ...);
+static int   errno_from_err_const (const char *err_const);
+static int   list_err_codes (void);
+static int   process_file (const char *fname);
+
+static const char *column (const char *buf, int n);
+static const char *err_const_from_errno (int err);
+
+
+
+#define SKIP -1
+
+typedef struct {
+    char operation[10000];
+    PJ *P;
+    PJ_COORD a, b, c, e;
+    PJ_DIRECTION dir;
+    int verbosity;
+    int op_id;
+    int op_ok,    op_ko;
+    int total_ok, total_ko;
+    int grand_ok, grand_ko;
+    size_t operation_lineno;
+    size_t dimensions_given, dimensions_given_at_last_accept;
+    double tolerance;
+    const char *curr_file;
+    FILE *fout;
+} gie_ctx;
+
+ffio *F = 0;
+
+static gie_ctx T;
+
+
+static const char delim[] = {"-------------------------------------------------------------------------------\n"};
+
+
+static const char usage[] = {
+    "--------------------------------------------------------------------------------\n"
+    "Usage: %s [-options]... infile...\n"
+    "--------------------------------------------------------------------------------\n"
+    "Options:\n"
+    "--------------------------------------------------------------------------------\n"
+    "    -h                Help: print this usage information\n"
+    "    -o /path/to/file  Specify output file name\n"
+    "    -v                Verbose: Provide non-essential informational output.\n"
+    "                      Repeat -v for more verbosity (e.g. -vv)\n"
+    "    -q                Quiet: Opposite of verbose. In quiet mode not even errors\n"
+    "                      are reported. Only interaction is through the return code\n"
+    "                      (0 on success, non-zero indicates number of FAILED tests)\n"
+    "    -l                List the PROJ internal system error codes\n"
+    "--------------------------------------------------------------------------------\n"
+    "Long Options:\n"
+    "--------------------------------------------------------------------------------\n"
+    "    --output          Alias for -o\n"
+    "    --verbose         Alias for -v\n"
+    "    --help            Alias for -h\n"
+    "    --list            Alias for -l\n"
+    "--------------------------------------------------------------------------------\n"
+    "Examples:\n"
+    "--------------------------------------------------------------------------------\n"
+    "1. Run all tests in file \"corner-cases.gie\", providing much extra information\n"
+    "       gie -vvvv corner-cases.gie\n"
+    "2. Run all tests in files \"foo\" and \"bar\", providing info on failures only\n"
+    "       gie foo bar\n"
+    "--------------------------------------------------------------------------------\n"
+};
+
+int main (int argc, char **argv) {
+    int  i;
+    const char *longflags[]  = {"v=verbose", "q=quiet", "h=help", "l=list", 0};
+    const char *longkeys[]   = {"o=output", 0};
+    OPTARGS *o;
+
+    memset (&T, 0, sizeof (T));
+    T.dir = PJ_FWD;
+    T.verbosity = 1;
+    T.tolerance = 5e-4;
+
+    test = fopen ("test.c", "wt");
+    o = opt_parse (argc, argv, "hlvq", "o", longflags, longkeys);
+    if (0==o)
+        return 0;
+
+    if (opt_given (o, "h")) {
+        printf (usage, o->progname);
+        return 0;
+    }
+
+    if (opt_given (o, "l"))
+        return list_err_codes ();
+
+
+    T.verbosity = opt_given (o, "q");
+    if (T.verbosity)
+        T.verbosity = -1;
+    if (T.verbosity != -1)
+        T.verbosity = opt_given (o, "v") + 1;
+
+    T.fout = stdout;
+    if (opt_given (o, "o"))
+        T.fout = fopen (opt_arg (o, "output"), "rt");
+
+    if (0==T.fout) {
+        fprintf (stderr, "%s: Cannot open '%s' for output\n", o->progname, opt_arg (o, "output"));
+        free (o);
+        return 1;
+    }
+
+    if (0==o->fargc) {
+        if (T.verbosity==-1)
+            return -1;
+        fprintf (T.fout, "Nothing to do\n");
+        free (o);
+        return 0;
+    }
+
+    F = ffio_create (gie_tags, n_gie_tags, 1000);
+    if (0==F) {
+        fprintf (stderr, "%s: No memory\n", o->progname);
+        free (o);
+        return 1;
+    }
+
+    for (i = 0;  i < o->fargc;  i++)
+        process_file (o->fargv[i]);
+
+    if (T.verbosity > 0) {
+        if (o->fargc > 1)
+        fprintf (T.fout, "%sGrand total: %d. Success: %d, Failure: %d\n", delim, T.grand_ok+T.grand_ko, T.grand_ok, T.grand_ko);
+        fprintf (T.fout, "%s", delim);
+    }
+    else
+        if (T.grand_ko)
+            fprintf (T.fout, "Failures: %d", T.grand_ko);
+
+    if (stdout != T.fout)
+        fclose (T.fout);
+
+    free (o);
+    ffio_destroy (F);
+    return T.grand_ko;
+}
+
+static int another_failure (void) {
+    T.op_ko++;
+    T.total_ko++;
+    return 0;
+}
+
+static int another_success (void) {
+    T.op_ok++;
+    T.total_ok++;
+    return 0;
+}
+
+
+static int process_file (const char *fname) {
+    FILE *f;
+
+    F->lineno = F->next_lineno = F->level = 0;
+    T.op_ok = T.total_ok = 0;
+    T.op_ko = T.total_ko = 0;
+
+    f = fopen (fname, "rt");
+    if (0==f) {
+        if (T.verbosity > 0) {
+            fprintf (T.fout, "%sCannot open spec'd input file '%s' - bye!\n", delim, fname);
+            return 2;
+        }
+        errmsg (2, "Cannot open spec'd input file '%s' - bye!\n", fname);
+    }
+    F->f = f;
+
+    if (T.verbosity > 0)
+        fprintf (T.fout, "%sReading file '%s'\n", delim, fname);
+    T.curr_file = fname;
+
+    while (get_inp(F)) {
+        if (SKIP==dispatch (F->tag, F->args))
+            return proj_destroy (T.P), T.P = 0, 0;
+    }
+
+    fclose (f);
+    F->lineno = F->next_lineno = 0;
+
+    T.grand_ok += T.total_ok;
+    T.grand_ko += T.total_ko;
+    if (T.verbosity > 0)
+    fprintf (T.fout, "%stotal: %2d tests succeeded,  %2d tests %s\n", delim, T.total_ok, T.total_ko, T.total_ko? "FAILED!": "failed.");
+
+    if (F->level==0)
+        return errmsg (-3, "File '%s':Missing '<gie>' cmnd - bye!\n", fname);
+    if (F->level && F->level%2)
+        return errmsg (-4, "File '%s':Missing '</gie>' cmnd - bye!\n", fname);
+    return 0;
+}
+
+
+/*****************************************************************************/
+const char *column (const char *buf, int n) {
+/*****************************************************************************
+Return a pointer to the n'th column of buf. Column numbers start at 0.
+******************************************************************************/
+    int i;
+    if (n <= 0)
+        return buf;
+    for (i = 0;  i < n;  i++) {
+        while (isspace(*buf))
+            buf++;
+        if (i == n - 1)
+            break;
+        while ((0 != *buf) && !isspace(*buf))
+            buf++;
+    }
+    return buf;
+}
+
+
+/*****************************************************************************/
+static double strtod_scaled (const char *args, double default_scale) {
+/*****************************************************************************
+Interpret <args> as a numeric followed by a linear decadal prefix.
+Return the properly scaled numeric
+******************************************************************************/
+    double s;
+    const double GRS80_DEG = 111319.4908; /* deg-to-m at equator of GRS80 */
+    const char *endp = args;
+    s = proj_strtod (args, (char **) &endp);
+    if (args==endp)
+        return HUGE_VAL;
+
+    endp = column (args, 2);
+
+    if (0==strcmp(endp, "km"))
+        s *= 1000;
+    else if (0==strcmp(endp, "m"))
+        s *= 1;
+    else if (0==strcmp(endp, "dm"))
+        s /= 10;
+    else if (0==strcmp(endp, "cm"))
+        s /= 100;
+    else if (0==strcmp(endp, "mm"))
+        s /= 1000;
+    else if (0==strcmp(endp, "um"))
+        s /= 1e6;
+    else if (0==strcmp(endp, "nm"))
+        s /= 1e9;
+    else if (0==strcmp(endp, "rad"))
+        s = GRS80_DEG * proj_todeg (s);
+    else if (0==strcmp(endp, "deg"))
+        s = GRS80_DEG * s;
+    else
+        s *= default_scale;
+    return s;
+}
+
+
+static int banner (const char *args) {
+    char dots[] = {"..."}, nodots[] = {""}, *thedots = nodots;
+    if (strlen(args) > 70)
+        thedots = dots;
+    fprintf (T.fout, "%s%-70.70s%s\n", delim, args, thedots);
+    return 0;
+}
+
+
+static int tolerance (const char *args) {
+    T.tolerance = strtod_scaled (args, 1);
+    if (HUGE_VAL==T.tolerance) {
+        T.tolerance = 0.0005;
+        return 1;
+    }
+    return 0;
+}
+
+
+static int direction (const char *args) {
+    const char *endp = args;
+    while (isspace (*endp))
+        endp++;
+    switch (*endp) {
+        case 'F':
+        case 'f':
+        T.dir = PJ_FWD;
+            break;
+        case 'I':
+        case 'i':
+        case 'R':
+        case 'r':
+            T.dir = PJ_INV;
+            break;
+        default:
+            return 1;
+    }
+
+    return 0;
+}
+
+
+static void finish_previous_operation (const char *args) {
+    if (T.verbosity > 1 && T.op_id > 1 && T.op_ok+T.op_ko)
+        fprintf (T.fout, "%s     %d tests succeeded,  %d tests %s\n", delim, T.op_ok, T.op_ko, T.op_ko? "FAILED!": "failed.");
+    (void) args;
+}
+
+
+
+/*****************************************************************************/
+static int operation (char *args) {
+/*****************************************************************************
+Define the operation to apply to the input data (in ISO 19100 lingo,
+an operation is the general term describing something that can be
+either a conversion or a transformation)
+******************************************************************************/
+    T.op_id++;
+
+    T.operation_lineno = F->lineno;
+
+    strcpy (&(T.operation[0]), F->args);
+
+    if (T.verbosity > 1) {
+        finish_previous_operation (F->args);
+        banner (args);
+    }
+
+
+    T.op_ok = 0;
+    T.op_ko = 0;
+
+    direction ("forward");
+    tolerance ("0.5 mm");
+
+    proj_errno_reset (T.P);
+
+    if (T.P)
+        proj_destroy (T.P);
+    proj_errno_reset (0);
+
+    T.P = proj_create (0, F->args);
+
+    /* Checking that proj_create succeeds is first done at "expect" time, */
+    /* since we want to support "expect"ing specific error codes */
+
+    return 0;
+}
+
+
+
+
+static int pj_unitconvert_selftest (void);
+static int pj_cart_selftest (void);
+static int pj_horner_selftest (void);
+
+/*****************************************************************************/
+static int builtins (const char *args) {
+/*****************************************************************************
+There are still a few tests that cannot be described using gie
+primitives. Instead, they are implemented as builtins, and invoked
+using the "builtins" command verb.
+******************************************************************************/
+    int i;
+    if (T.verbosity > 1) {
+        finish_previous_operation (args);
+        banner ("builtins: unitconvert, horner, cart");
+    }
+    T.op_ok = 0;
+    T.op_ko = 0;
+    i = pj_unitconvert_selftest ();
+    if (i!=0) {
+        fprintf (T.fout, "pj_unitconvert_selftest fails with %d\n", i);
+        another_failure();
+    }
+    else
+        another_success ();
+
+
+    i = pj_cart_selftest ();
+    if (i!=0) {
+        fprintf (T.fout, "pj_cart_selftest fails with %d\n", i);
+        another_failure();
+    }
+    else
+        another_success ();
+
+    i = pj_horner_selftest ();
+    if (i!=0) {
+        fprintf (T.fout, "pj_horner_selftest fails with %d\n", i);
+        another_failure();
+    }
+    else
+        another_success ();
+
+    return 0;
+}
+
+
+static PJ_COORD torad_coord (PJ *P, PJ_DIRECTION dir, PJ_COORD a) {
+    size_t i, n;
+    char *axis = "enut";
+    paralist *l = pj_param_exists (P->params, "axis");
+    if (l && dir==PJ_INV)
+        axis = l->param + strlen ("axis=");
+    for (i = 0,  n = strlen (axis);  i < n;  i++)
+        if (strchr ("news", axis[i]))
+            a.v[i] = proj_torad (a.v[i]);
+    return a;
+}
+
+
+static PJ_COORD todeg_coord (PJ *P, PJ_DIRECTION dir, PJ_COORD a) {
+    size_t i, n;
+    char *axis = "enut";
+    paralist *l = pj_param_exists (P->params, "axis");
+    if (l && dir==PJ_FWD)
+        axis = l->param + strlen ("axis=");
+    for (i = 0,  n = strlen (axis);  i < n;  i++)
+        if (strchr ("news", axis[i]))
+            a.v[i] = proj_todeg (a.v[i]);
+    return a;
+}
+
+
+
+/*****************************************************************************/
+static PJ_COORD parse_coord (const char *args) {
+/*****************************************************************************
+Attempt to interpret args as a PJ_COORD.
+******************************************************************************/
+    int i;
+    const char *endp, *prev = args;
+    PJ_COORD a = proj_coord (0,0,0,0);
+
+    for (i = 0, T.dimensions_given = 0;   i < 4;   i++, T.dimensions_given++) {
+        double d = proj_strtod (prev,  (char **) &endp);
+
+        /* Break out if there were no more numerals */
+        if (prev==endp)
+            return i > 1? a: proj_coord_error ();
+
+        a.v[i] = d;
+        prev = endp;
+    }
+
+    return a;
+}
+
+
+/*****************************************************************************/
+static int accept (const char *args) {
+/*****************************************************************************
+Read ("ACCEPT") a 2, 3, or 4 dimensional input coordinate.
+******************************************************************************/
+    T.a = parse_coord (args);
+    if (T.verbosity > 3)
+        printf ("#  %s\n", args);
+    T.dimensions_given_at_last_accept = T.dimensions_given;
+    return 0;
+}
+
+
+/*****************************************************************************/
+static int roundtrip (const char *args) {
+/*****************************************************************************
+Check how far we go from the ACCEPTed point when doing successive
+back/forward transformation pairs.
+******************************************************************************/
+    int ntrips;
+    double d, r, ans;
+    char *endp;
+    PJ_COORD coo;
+
+    if (0==T.P)
+        return another_failure ();
+
+    ans = proj_strtod (args, &endp);
+    ntrips = (int) (endp==args? 100: fabs(ans));
+    d = strtod_scaled (endp, 1);
+    d = d==HUGE_VAL?  T.tolerance:  d;
+
+    /* input ("accepted") values - probably in degrees */
+    coo = proj_angular_input  (T.P, T.dir)? torad_coord (T.P, T.dir, T.a):  T.a;
+
+    r = proj_roundtrip (T.P, T.dir, ntrips, &coo);
+    if (r <= d)
+        return another_success ();
+
+    if (T.verbosity > -1) {
+        if (0==T.op_ko && T.verbosity < 2)
+            banner (T.operation);
+        fprintf (T.fout, "%s", T.op_ko? "     -----\n": delim);
+        fprintf (T.fout, "     FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) F->lineno);
+        fprintf (T.fout, "     roundtrip deviation: %.3f mm, expected: %.3f mm\n", 1000*r, 1000*d);
+    }
+    return another_failure ();
+}
+
+
+static int expect_message (double d, const char *args) {
+    another_failure ();
+
+    if (T.verbosity < 0)
+        return 1;
+    if (d > 1e6)
+        d = 999999.999999;
+    if (0==T.op_ko && T.verbosity < 2)
+        banner (T.operation);
+    fprintf (T.fout, "%s", T.op_ko? "     -----\n": delim);
+
+    fprintf (T.fout, "     FAILURE in %s(%d):\n", opt_strip_path (T.curr_file), (int) F->lineno);
+    fprintf (T.fout, "     expected: %s\n", args);
+    fprintf (T.fout, "     got:      %.9f   %.9f", T.b.xy.x,  T.b.xy.y);
+    if (T.b.xyzt.t!=0 || T.b.xyzt.z!=0)
+        fprintf (T.fout, "   %.9f", T.b.xyz.z);
+    if (T.b.xyzt.t!=0)
+        fprintf (T.fout, "   %.9f", T.b.xyzt.t);
+    fprintf (T.fout, "\n");
+    fprintf (T.fout, "     deviation:  %.3f mm,  expected:  %.3f mm\n", 1000*d, 1000*T.tolerance);
+    return 1;
+}
+
+
+static int expect_message_cannot_parse (const char *args) {
+    another_failure ();
+    if (T.verbosity > -1) {
+        if (0==T.op_ko && T.verbosity < 2)
+            banner (T.operation);
+        fprintf (T.fout, "%s", T.op_ko? "     -----\n": delim);
+        fprintf (T.fout, "     FAILURE in %s(%d):\n     Too few args: %s\n", opt_strip_path (T.curr_file), (int) F->lineno, args);
+    }
+    return 1;
+}
+
+static int expect_failure_with_errno_message (int expected, int got) {
+    another_failure ();
+
+    if (T.verbosity < 0)
+        return 1;
+    if (0==T.op_ko && T.verbosity < 2)
+        banner (T.operation);
+    fprintf (T.fout, "%s", T.op_ko? "     -----\n": delim);
+    fprintf (T.fout, "     FAILURE in %s(%d):\n",    opt_strip_path (T.curr_file), (int) F->lineno);
+    fprintf (T.fout, "     got errno %s (%d): %s\n", err_const_from_errno(got), got,  pj_strerrno (got));
+    fprintf (T.fout, "     expected %s (%d):  %s",   err_const_from_errno(expected), expected, pj_strerrno (expected));
+    fprintf (T.fout, "\n");
+    return 1;
+}
+
+
+/* For test purposes, we want to call a transformation of the same */
+/* dimensionality as the number of dimensions given in accept */
+static PJ_COORD expect_trans_n_dim (PJ_COORD ci) {
+    if (4==T.dimensions_given_at_last_accept)
+        return proj_trans (T.P, T.dir, ci);
+
+    if (3==T.dimensions_given_at_last_accept)
+        return pj_approx_3D_trans (T.P, T.dir, ci);
+
+    return pj_approx_2D_trans (T.P, T.dir, ci);
+}
+
+
+/*****************************************************************************/
+static int expect (const char *args) {
+/*****************************************************************************
+Tell GIE what to expect, when transforming the ACCEPTed input
+******************************************************************************/
+    PJ_COORD ci, co, ce;
+    double d;
+    int expect_failure = 0;
+    int expect_failure_with_errno = 0;
+
+    if (0==strncmp (args, "failure", 7)) {
+        expect_failure = 1;
+
+        /* Option: Fail with an expected errno (syntax: expect failure errno -33) */
+        if (0==strncmp (column (args, 2), "errno", 5))
+            expect_failure_with_errno = errno_from_err_const (column (args, 3));
+    }
+
+    if (0==T.P) {
+        /* If we expect failure, and fail, then it's a success... */
+        if (expect_failure) {
+            /* Failed to fail correctly? */
+            if (expect_failure_with_errno && proj_errno (T.P)!=expect_failure_with_errno)
+                return expect_failure_with_errno_message (expect_failure_with_errno, proj_errno(T.P));
+            return another_success ();
+        }
+
+        /* Otherwise, it's a true failure */
+        banner (T.operation);
+        errmsg(3, "%sInvalid operation definition in line no. %d: %s\n",
+            delim, (int) T.operation_lineno, pj_strerrno(proj_errno(T.P)));
+        return another_failure ();
+    }
+
+    /* We may still successfully fail even if the proj_create succeeded */
+    if (expect_failure) {
+        proj_errno_reset (T.P);
+
+        /* Try to carry out the operation - and expect failure */
+        ci = proj_angular_input (T.P, T.dir)? torad_coord (T.P, T.dir, T.a): T.a;
+        co = expect_trans_n_dim (ci);
+
+        /* Failed to fail? - that's a failure */
+        if (co.xyz.x!=HUGE_VAL)
+            return another_failure ();
+
+        if (expect_failure_with_errno) {
+            printf ("errno=%d, expected=%d\n", proj_errno (T.P), expect_failure_with_errno);
+            if (proj_errno (T.P)==expect_failure_with_errno)
+                return another_success ();
+
+            return another_failure ();
+        }
+
+        /* Yes, we failed successfully */
+        return another_success ();
+    }
+
+
+    if (T.verbosity > 3) {
+        puts (T.P->inverted? "INVERTED": "NOT INVERTED");
+        puts (T.dir== 1? "forward": "reverse");
+        puts (proj_angular_input (T.P, T.dir)?  "angular in":  "linear in");
+        puts (proj_angular_output (T.P, T.dir)? "angular out": "linear out");
+        printf ("left: %d   right:  %d\n", T.P->left, T.P->right);
+    }
+
+    T.e  =  parse_coord (args);
+    if (HUGE_VAL==T.e.v[0])
+        return expect_message_cannot_parse (args);
+
+    /* expected angular values, probably in degrees */
+    ce = proj_angular_output (T.P, T.dir)? torad_coord (T.P, T.dir, T.e): T.e;
+    if (T.verbosity > 3)
+        printf ("EXPECTS  %.4f  %.4f  %.4f  %.4f\n", ce.v[0],ce.v[1],ce.v[2],ce.v[3]);
+
+    /* input ("accepted") values, also probably in degrees */
+    ci = proj_angular_input (T.P, T.dir)? torad_coord (T.P, T.dir, T.a): T.a;
+    if (T.verbosity > 3)
+        printf ("ACCEPTS  %.4f  %.4f  %.4f  %.4f\n", ci.v[0],ci.v[1],ci.v[2],ci.v[3]);
+
+    /* angular output from proj_trans comes in radians */
+    co = expect_trans_n_dim (ci);
+    T.b = proj_angular_output (T.P, T.dir)? todeg_coord (T.P, T.dir, co): co;
+    if (T.verbosity > 3)
+        printf ("GOT      %.4f  %.4f  %.4f  %.4f\n", co.v[0],co.v[1],co.v[2],co.v[3]);
+
+    /* but there are a few more possible input conventions... */
+    if (proj_angular_output (T.P, T.dir)) {
+        double e = HUGE_VAL;
+        d = proj_lpz_dist (T.P, ce.lpz, co.lpz);
+        /* check whether input was already in radians */
+        if (d > T.tolerance)
+            e = proj_lpz_dist (T.P, T.e.lpz, co.lpz);
+        if (e < d)
+            d = e;
+
+        /* or the tolerance may be based on euclidean distance */
+        if (d > T.tolerance)
+            e = proj_xyz_dist (T.b.xyz, T.e.xyz);
+        if (e < d)
+            d = e;
+    }
+    else
+        d = proj_xyz_dist (T.b.xyz, T.e.xyz);
+    if (d > T.tolerance)
+        return expect_message (d, args);
+
+    another_success ();
+
+    return 0;
+}
+
+
+
+/*****************************************************************************/
+static int verbose (const char *args) {
+/*****************************************************************************
+Tell the system how noisy it should be
+******************************************************************************/
+    int i = (int) proj_atof (args);
+
+    /* if -q/--quiet flag has been given, we do nothing */
+    if (T.verbosity < 0)
+        return 0;
+
+    if (strlen (args))
+        T.verbosity = i;
+    else
+        T.verbosity++;
+    return 0;
+}
+
+
+/*****************************************************************************/
+static int echo (const char *args) {
+/*****************************************************************************
+Add user defined noise to the output stream
+******************************************************************************/
+fprintf (T.fout, "%s\n", args);
+    return 0;
+}
+
+
+
+static int dispatch (const char *cmnd, const char *args) {
+    if  (0==strcmp (cmnd, "operation")) return  operation ((char *) args);
+    if  (0==strcmp (cmnd, "accept"))    return  accept    (args);
+    if  (0==strcmp (cmnd, "expect"))    return  expect    (args);
+    if  (0==strcmp (cmnd, "roundtrip")) return  roundtrip (args);
+    if  (0==strcmp (cmnd, "banner"))    return  banner    (args);
+    if  (0==strcmp (cmnd, "verbose"))   return  verbose   (args);
+    if  (0==strcmp (cmnd, "direction")) return  direction (args);
+    if  (0==strcmp (cmnd, "tolerance")) return  tolerance (args);
+    if  (0==strcmp (cmnd, "builtins"))  return  builtins  (args);
+    if  (0==strcmp (cmnd, "echo"))      return  echo      (args);
+
+    return 0;
+}
+
+
+
+
+struct errno_vs_err_const {const char *the_err_const; int the_errno;};
+static const struct errno_vs_err_const lookup[] = {
+    {"pjd_err_no_args"                  ,  -1},
+    {"pjd_err_no_option_in_init_file"   ,  -2},
+    {"pjd_err_no_colon_in_init_string"  ,  -3},
+    {"pjd_err_proj_not_named"           ,  -4},
+    {"pjd_err_unknown_projection_id"    ,  -5},
+    {"pjd_err_eccentricity_is_one"      ,  -6},
+    {"pjd_err_unknow_unit_id"           ,  -7},
+    {"pjd_err_invalid_boolean_param"    ,  -8},
+    {"pjd_err_unknown_ellp_param"       ,  -9},
+    {"pjd_err_rev_flattening_is_zero"   ,  -10},
+    {"pjd_err_ref_rad_larger_than_90"   ,  -11},
+    {"pjd_err_es_less_than_zero"        ,  -12},
+    {"pjd_err_major_axis_not_given"     ,  -13},
+    {"pjd_err_lat_or_lon_exceed_limit"  ,  -14},
+    {"pjd_err_invalid_x_or_y"           ,  -15},
+    {"pjd_err_wrong_format_dms_value"   ,  -16},
+    {"pjd_err_non_conv_inv_meri_dist"   ,  -17},
+    {"pjd_err_non_con_inv_phi2"         ,  -18},
+    {"pjd_err_acos_asin_arg_too_large"  ,  -19},
+    {"pjd_err_tolerance_condition"      ,  -20},
+    {"pjd_err_conic_lat_equal"          ,  -21},
+    {"pjd_err_lat_larger_than_90"       ,  -22},
+    {"pjd_err_lat1_is_zero"             ,  -23},
+    {"pjd_err_lat_ts_larger_than_90"    ,  -24},
+    {"pjd_err_control_point_no_dist"    ,  -25},
+    {"pjd_err_no_rotation_proj"         ,  -26},
+    {"pjd_err_w_or_m_zero_or_less"      ,  -27},
+    {"pjd_err_lsat_not_in_range"        ,  -28},
+    {"pjd_err_path_not_in_range"        ,  -29},
+    {"pjd_err_h_less_than_zero"         ,  -30},
+    {"pjd_err_k_less_than_zero"         ,  -31},
+    {"pjd_err_lat_1_or_2_zero_or_90"    ,  -32},
+    {"pjd_err_lat_0_or_alpha_eq_90"     ,  -33},
+    {"pjd_err_ellipsoid_use_required"   ,  -34},
+    {"pjd_err_invalid_utm_zone"         ,  -35},
+    {"pjd_err_tcheby_val_out_of_range"  ,  -36},
+    {"pjd_err_failed_to_find_proj"      ,  -37},
+    {"pjd_err_failed_to_load_grid"      ,  -38},
+    {"pjd_err_invalid_m_or_n"           ,  -39},
+    {"pjd_err_n_out_of_range"           ,  -40},
+    {"pjd_err_lat_1_2_unspecified"      ,  -41},
+    {"pjd_err_abs_lat1_eq_abs_lat2"     ,  -42},
+    {"pjd_err_lat_0_half_pi_from_mean"  ,  -43},
+    {"pjd_err_unparseable_cs_def"       ,  -44},
+    {"pjd_err_geocentric"               ,  -45},
+    {"pjd_err_unknown_prime_meridian"   ,  -46},
+    {"pjd_err_axis"                     ,  -47},
+    {"pjd_err_grid_area"                ,  -48},
+    {"pjd_err_invalid_sweep_axis"       ,  -49},
+    {"pjd_err_malformed_pipeline"       ,  -50},
+    {"pjd_err_unit_factor_less_than_0"  ,  -51},
+    {"pjd_err_invalid_scale"            ,  -52},
+    {"pjd_err_non_convergent"           ,  -53},
+    {"pjd_err_missing_args"             ,  -54},
+    {"pjd_err_lat_0_is_zero"            ,  -55},
+    {"pjd_err_ellipsoidal_unsupported"  ,  -56},
+    {"pjd_err_too_many_inits"           ,  -57},
+    {"pjd_err_invalid_arg"              ,  -58},
+    {"pjd_err_unknown"                  ,  9999},
+    {"pjd_err_enomem"                   ,  ENOMEM},
+};
+
+static const struct errno_vs_err_const unknown = {"PJD_ERR_UNKNOWN", 9999};
+
+
+static int list_err_codes (void) {
+    int i;
+    const int n = sizeof lookup / sizeof lookup[0];
+
+    for (i = 0;  i < n;  i++) {
+        if (9999==lookup[i].the_errno)
+            break;
+        printf ("%25s  (%2.2d):  %s\n", lookup[i].the_err_const + 8, lookup[i].the_errno, pj_strerrno(lookup[i].the_errno));
+    }
+    return 0;
+}
+
+
+static const char *err_const_from_errno (int err) {
+    size_t i;
+    const size_t n = sizeof lookup / sizeof lookup[0];
+
+    for (i = 0;  i < n;  i++) {
+        if (err==lookup[i].the_errno)
+            return lookup[i].the_err_const + 8;
+    }
+    return unknown.the_err_const;
+}
+
+
+static int errno_from_err_const (const char *err_const) {
+    const size_t n = sizeof lookup / sizeof lookup[0];
+    size_t i, len;
+    int ret;
+    char tolower_err_const[100];
+
+    /* Make a lower case copy for matching */
+    for (i = 0;  i < 99; i++) {
+        if (0==err_const[i] || isspace (err_const[i]))
+             break;
+        tolower_err_const[i] = (char) tolower (err_const[i]);
+    }
+    tolower_err_const[i] = 0;
+
+    /* If it looks numeric, return that numeric */
+    ret = (int) pj_atof (err_const);
+    if (0!=ret)
+        return ret;
+
+    /* Else try to find a matching identifier */
+    len = strlen (tolower_err_const);
+
+    /* First try to find a match excluding the PJD_ERR_ prefix */
+    for (i = 0;  i < n;  i++) {
+        if (0==strncmp (lookup[i].the_err_const + 8, err_const, len))
+            return lookup[i].the_errno;
+    }
+
+    /* If that did not work, try with the full name */
+    for (i = 0;  i < n;  i++) {
+        if (0==strncmp (lookup[i].the_err_const, err_const, len))
+            return lookup[i].the_errno;
+    }
+
+    /* On failure, return something unlikely */
+    return 9999;
+}
+
+
+static int errmsg (int errlev, const char *msg, ...) {
+    va_list args;
+    va_start(args, msg);
+    vfprintf(stdout, msg, args);
+    va_end(args);
+    if (errlev)
+        errno = errlev;
+    return errlev;
+}
+
+
+
+
+
+
+
+
+/****************************************************************************************
+
+FFIO - Flexible format I/O
+
+FFIO provides functionality for reading proj style instruction strings written
+in a less strict format than usual:
+
+*  Whitespace is generally allowed everywhere
+*  Comments can be written inline, '#' style
+*  ... or as free format blocks
+
+The overall mission of FFIO is to facilitate communications of geodetic
+parameters and test material in a format that is highly human readable,
+and provides ample room for comment, documentation, and test material.
+
+See the PROJ ".gie" test suites for examples of supported formatting.
+
+****************************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include <string.h>
+#include <ctype.h>
+
+#include <math.h>
+#include <errno.h>
+
+
+
+static int get_inp (ffio *F);
+static int skip_to_next_tag (ffio *F);
+static int step_into_gie_block (ffio *F);
+static int locate_tag (ffio *F, const char *tag);
+static int nextline (ffio *F);
+static int at_end_delimiter (ffio *F);
+static const char *at_tag (ffio *F);
+static int at_decorative_element (ffio *F);
+static ffio *ffio_destroy (ffio *F);
+static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_size);
+
+
+
+/***************************************************************************************/
+static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_size) {
+/****************************************************************************************
+Constructor for the ffio object.
+****************************************************************************************/
+    ffio *G = calloc (1, sizeof (ffio));
+    if (0==G)
+        return 0;
+
+    if (0==max_record_size)
+        max_record_size = 1000;
+
+    G->args = calloc (1, 5*max_record_size);
+    if (0==G->args) {
+        free (G);
+        return 0;
+    }
+
+    G->next_args = calloc (1, max_record_size);
+    if (0==G->args) {
+        free (G->args);
+        free (G);
+        return 0;
+    }
+
+    G->args_size = 5*max_record_size;
+    G->next_args_size = max_record_size;
+
+    G->tags = tags;
+    G->n_tags = n_tags;
+    return G;
+}
+
+
+
+/***************************************************************************************/
+static ffio *ffio_destroy (ffio *G) {
+/****************************************************************************************
+Free all allocated associated memory, then free G itself. For extra RAII compliancy,
+the file object should also be closed if still open, but this will require additional
+control logic, and ffio is a gie tool specific package, so we fall back to asserting that
+fclose has been called prior to ffio_destroy.
+****************************************************************************************/
+    free (G->args);
+    free (G->next_args);
+    free (G);
+    return 0;
+}
+
+
+
+/***************************************************************************************/
+static int at_decorative_element (ffio *G) {
+/****************************************************************************************
+A decorative element consists of a line of at least 5 consecutive identical chars,
+starting at buffer position 0:
+"-----", "=====", "*****", etc.
+
+A decorative element serves as a end delimiter for the current element, and
+continues until a gie command verb is found at the start of a line
+****************************************************************************************/
+    int i;
+    char *c;
+    if (0==G)
+        return 0;
+    c = G->next_args;
+    if (0==c)
+        return 0;
+    if (0==c[0])
+        return 0;
+    for (i = 1; i < 5; i++)
+        if (c[i]!=c[0])
+            return 0;
+    return 1;
+}
+
+
+
+/***************************************************************************************/
+static const char *at_tag (ffio *G) {
+/****************************************************************************************
+A start of a new command serves as an end delimiter for the current command
+****************************************************************************************/
+    size_t j;
+    for (j = 0;  j < G->n_tags;  j++)
+        if (strncmp (G->next_args, G->tags[j], strlen(G->tags[j]))==0)
+            return G->tags[j];
+    return 0;
+}
+
+
+
+/***************************************************************************************/
+static int at_end_delimiter (ffio *G) {
+/****************************************************************************************
+An instruction consists of everything from its introductory tag to its end
+delimiter.  An end delimiter can be either the introductory tag of the next
+instruction, or a "decorative element", i.e. one of the "ascii art" style
+block delimiters typically used to mark up block comments in a free format
+file.
+****************************************************************************************/
+    if (G==0)
+        return 0;
+    if (at_decorative_element (G))
+        return 1;
+    if (at_tag (G))
+        return 1;
+    return 0;
+}
+
+
+
+/***************************************************************************************/
+static int nextline (ffio *G) {
+/****************************************************************************************
+Read next line of input file. Returns 1 on success, 0 on failure.
+****************************************************************************************/
+    G->next_args[0] = 0;
+    if (0==fgets (G->next_args, (int) G->next_args_size - 1, G->f))
+        return 0;
+    if (feof (G->f))
+        return 0;
+    pj_chomp (G->next_args);
+    G->next_lineno++;
+    return 1;
+}
+
+
+
+/***************************************************************************************/
+static int locate_tag (ffio *G, const char *tag) {
+/****************************************************************************************
+Find start-of-line tag (currently only used to search for for <gie>, but any tag
+valid).
+
+Returns 1 on success, 0 on failure.
+****************************************************************************************/
+    size_t n = strlen (tag);
+    while (0!=strncmp (tag, G->next_args, n))
+        if (0==nextline (G))
+            return 0;
+    return 1;
+}
+
+
+
+/***************************************************************************************/
+static int step_into_gie_block (ffio *G) {
+/****************************************************************************************
+Make sure we're inside a <gie>-block. Return 1 on success, 0 otherwise.
+****************************************************************************************/
+    /* Already inside */
+    if (G->level % 2)
+        return 1;
+
+    if (0==locate_tag (G, "<gie>"))
+        return 0;
+
+    while (0!=strncmp ("<gie>", G->next_args, 5)) {
+        G->next_args[0] = 0;
+        if (feof (G->f))
+            return 0;
+        if (0==fgets (G->next_args, (int) G->next_args_size - 1, G->f))
+            return 0;
+        pj_chomp (G->next_args);
+        G->next_lineno++;
+    }
+    G->level++;
+
+    /* We're ready at the start - now step into the block */
+    return nextline (G);
+}
+
+
+
+/***************************************************************************************/
+static int skip_to_next_tag (ffio *G) {
+/****************************************************************************************
+Skip forward to the next command tag. Return 1 on success, 0 otherwise.
+****************************************************************************************/
+    const char *c;
+    if (0==step_into_gie_block (G))
+        return 0;
+
+    c = at_tag (G);
+
+    /* If not already there - get there */
+    while (!c) {
+        if (0==nextline (G))
+            return 0;
+        c = at_tag (G);
+    }
+
+    /* If we reached the end of a <gie> block, locate the next and retry */
+    if (0==strcmp (c, "</gie>")) {
+        G->level++;
+        if (feof (G->f))
+            return 0;
+        if (0==step_into_gie_block (G))
+            return 0;
+        G->args[0] = 0;
+        return skip_to_next_tag (G);
+    }
+    G->lineno = G->next_lineno;
+
+    return 1;
+}
+
+/* Add the most recently read line of input to the block already stored. */
+static int append_args (ffio *G) {
+    size_t skip_chars = 0;
+    size_t next_len = strlen (G->next_args);
+    size_t args_len = strlen (G->args);
+    const char *tag = at_tag (G);
+
+    if (tag)
+        skip_chars = strlen (tag);
+
+    if (G->args_size < args_len + next_len - skip_chars + 1) {
+        void *p = realloc (G->args, 2 * G->args_size);
+        if (0==p)
+            return 0;
+        G->args = p;
+        G->args_size = 2 * G->args_size;
+    }
+
+    G->args[args_len] = ' ';
+    strcpy (G->args + args_len + 1,  G->next_args + skip_chars);
+
+    G->next_args[0] = 0;
+    return 1;
+}
+
+
+
+
+
+/***************************************************************************************/
+static int get_inp (ffio *G) {
+/****************************************************************************************
+The primary command reader for gie. Reads a block of gie input, cleans up repeated
+whitespace etc. The block is stored in G->args. Returns 1 on success, 0 otherwise.
+****************************************************************************************/
+    G->args[0] = 0;
+
+    if (0==skip_to_next_tag (G))
+        return 0;
+    G->tag = at_tag (G);
+
+    if (0==G->tag)
+        return 0;
+
+    do {
+        append_args (G);
+        if (0==nextline (G))
+            return 0;
+    } while (!at_end_delimiter (G));
+
+    pj_shrink (G->args);
+    return 1;
+}
+
+
+
+
+
+static const char tc32_utm32[] = {
+    " +proj=horner"
+    " +ellps=intl"
+    " +range=500000"
+    " +fwd_origin=877605.269066,6125810.306769"
+    " +inv_origin=877605.760036,6125811.281773"
+    " +deg=4"
+    " +fwd_v=6.1258112678e+06,9.9999971567e-01,1.5372750011e-10,5.9300860915e-15,2.2609497633e-19,4.3188227445e-05,2.8225130416e-10,7.8740007114e-16,-1.7453997279e-19,1.6877465415e-10,-1.1234649773e-14,-1.7042333358e-18,-7.9303467953e-15,-5.2906832535e-19,3.9984284847e-19"
+    " +fwd_u=8.7760574982e+05,9.9999752475e-01,2.8817299305e-10,5.5641310680e-15,-1.5544700949e-18,-4.1357045890e-05,4.2106213519e-11,2.8525551629e-14,-1.9107771273e-18,3.3615590093e-10,2.4380247154e-14,-2.0241230315e-18,1.2429019719e-15,5.3886155968e-19,-1.0167505000e-18"
+    " +inv_v=6.1258103208e+06,1.0000002826e+00,-1.5372762184e-10,-5.9304261011e-15,-2.2612705361e-19,-4.3188331419e-05,-2.8225549995e-10,-7.8529116371e-16,1.7476576773e-19,-1.6875687989e-10,1.1236475299e-14,1.7042518057e-18,7.9300735257e-15,5.2881862699e-19,-3.9990736798e-19"
+    " +inv_u=8.7760527928e+05,1.0000024735e+00,-2.8817540032e-10,-5.5627059451e-15,1.5543637570e-18,4.1357152105e-05,-4.2114813612e-11,-2.8523713454e-14,1.9109017837e-18,-3.3616407783e-10,-2.4382678126e-14,2.0245020199e-18,-1.2441377565e-15,-5.3885232238e-19,1.0167203661e-18"
+};
+
+
+static const char sb_utm32[] = {
+    " +proj=horner"
+    " +ellps=intl"
+    " +range=500000"
+    " +tolerance=0.0005"
+    " +fwd_origin=4.94690026817276e+05,6.13342113183056e+06"
+    " +inv_origin=6.19480258923588e+05,6.13258568148837e+06"
+    " +deg=3"
+    " +fwd_c=6.13258562111350e+06,6.19480105709997e+05,9.99378966275206e-01,-2.82153291753490e-02,-2.27089979140026e-10,-1.77019590701470e-09,1.08522286274070e-14,2.11430298751604e-15"
+    " +inv_c=6.13342118787027e+06,4.94690181709311e+05,9.99824464710368e-01,2.82279070814774e-02,7.66123542220864e-11,1.78425334628927e-09,-1.05584823306400e-14,-3.32554258683744e-15"
+};
+
+static int pj_horner_selftest (void) {
+    PJ *P;
+    PJ_COORD a, b, c;
+    double dist;
+
+    /* Real polynonia relating the technical coordinate system TC32 to "System 45 Bornholm" */
+    P = proj_create (PJ_DEFAULT_CTX, tc32_utm32);
+    if (0==P)
+        return 10;
+
+    a = b = proj_coord (0,0,0,0);
+    a.uv.v = 6125305.4245;
+    a.uv.u =  878354.8539;
+    c = a;
+
+    /* Check roundtrip precision for 1 iteration each way, starting in forward direction */
+    dist = proj_roundtrip (P, PJ_FWD, 1, &c);
+    if (dist > 0.01)
+        return 1;
+    proj_destroy(P);
+
+    /* The complex polynomial transformation between the "System Storebaelt" and utm32/ed50 */
+    P = proj_create (PJ_DEFAULT_CTX, sb_utm32);
+    if (0==P)
+        return 11;
+
+    /* Test value: utm32_ed50(620000, 6130000) = sb_ed50(495136.8544, 6130821.2945) */
+    a = b = c = proj_coord (0,0,0,0);
+    a.uv.v = 6130821.2945;
+    a.uv.u =  495136.8544;
+    c.uv.v = 6130000.0000;
+    c.uv.u =  620000.0000;
+
+    /* Forward projection */
+    b = proj_trans (P, PJ_FWD, a);
+    dist = proj_xy_dist (b.xy, c.xy);
+    if (dist > 0.001)
+        return 2;
+
+    /* Inverse projection */
+    b = proj_trans (P, PJ_INV, c);
+    dist = proj_xy_dist (b.xy, a.xy);
+    if (dist > 0.001)
+        return 3;
+
+    /* Check roundtrip precision for 1 iteration each way */
+    dist = proj_roundtrip (P, PJ_FWD, 1, &a);
+    if (dist > 0.01)
+        return 4;
+
+    proj_destroy(P);
+    return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+/* Testing quite a bit of the pj_obs_api as a side effect (inspired by pj_obs_api_test.c) */
+static int pj_cart_selftest (void) {
+    PJ_CONTEXT *ctx;
+    PJ *P;
+    PJ_COORD a, b, obs[2];
+    PJ_COORD coord[2];
+
+    PJ_INFO info;
+    PJ_PROJ_INFO pj_info;
+    PJ_GRID_INFO grid_info;
+    PJ_INIT_INFO init_info;
+
+    PJ_FACTORS factors;
+
+    const PJ_OPERATIONS *oper_list;
+    const PJ_ELLPS *ellps_list;
+    const PJ_UNITS *unit_list;
+    const PJ_PRIME_MERIDIANS *pm_list;
+
+    int err;
+    size_t n, sz;
+    double dist, h, t;
+    char *args[3] = {"proj=utm", "zone=32", "ellps=GRS80"};
+    const char *arg = {"+proj=utm +zone=32 +ellps=GRS80"};
+    char buf[40];
+
+    /* An utm projection on the GRS80 ellipsoid */
+    P = proj_create (PJ_DEFAULT_CTX, arg);
+    if (0==P)
+        return 1;
+
+
+    /* Clean up */
+    proj_destroy (P);
+
+    /* Same projection, now using argc/argv style initialization */
+    P = proj_create_argv (PJ_DEFAULT_CTX, 3, args);
+    if (0==P)
+        return 2;
+
+    /* zero initialize everything, then set (longitude, latitude) to (12, 55) */
+    a = proj_coord (0,0,0,0);
+    /* a.lp: The coordinate part of a, interpreted as a classic LP pair */
+    a.lp.lam = PJ_TORAD(12);
+    a.lp.phi = PJ_TORAD(55);
+
+    /* Forward projection */
+    b = proj_trans (P, PJ_FWD, a);
+
+    /* Inverse projection */
+    a = proj_trans (P, PJ_INV, b);
+
+    /* Null projection */
+    a = proj_trans (P, PJ_IDENT, a);
+
+    /* Forward again, to get two linear items for comparison */
+    a = proj_trans (P, PJ_FWD, a);
+
+    dist = proj_xy_dist (a.xy, b.xy);
+    if (dist > 2e-9)
+        return 3;
+
+    /* Clear any previous error */
+    proj_errno_reset (P);
+
+    /* Invalid projection */
+    a = proj_trans (P, 42, a);
+    if (a.lpz.lam!=HUGE_VAL)
+        return 4;
+    err = proj_errno (P);
+    if (0==err)
+        return 5;
+
+    /* Clear error again */
+    proj_errno_reset (P);
+
+    /* Clean up */
+    proj_destroy (P);
+
+    /* Now do some 3D transformations */
+    P = proj_create (PJ_DEFAULT_CTX, "+proj=cart +ellps=GRS80");
+    if (0==P)
+        return 6;
+
+    /* zero initialize everything, then set (longitude, latitude, height) to (12, 55, 100) */
+    a = b = proj_coord (0,0,0,0);
+    a.lpz.lam = PJ_TORAD(12);
+    a.lpz.phi = PJ_TORAD(55);
+    a.lpz.z   = 100;
+
+    /* Forward projection: 3D-Cartesian-to-Ellipsoidal */
+    b = proj_trans (P, PJ_FWD, a);
+
+    /* Check roundtrip precision for 10000 iterations each way */
+    dist  = proj_roundtrip (P, PJ_FWD, 10000, &a);
+    dist += proj_roundtrip (P, PJ_INV, 10000, &b);
+    if (dist > 4e-9)
+        return 7;
+
+
+    /* Test at the North Pole */
+    a = b = proj_coord (0,0,0,0);
+    a.lpz.lam = PJ_TORAD(0);
+    a.lpz.phi = PJ_TORAD(90);
+    a.lpz.z   = 100;
+
+    /* Forward projection: Ellipsoidal-to-3D-Cartesian */
+    dist = proj_roundtrip (P, PJ_FWD, 1, &a);
+    if (dist > 1e-12)
+        return 8;
+
+    /* Test at the South Pole */
+    a = b = proj_coord (0,0,0,0);
+    a.lpz.lam = PJ_TORAD(0);
+    a.lpz.phi = PJ_TORAD(-90);
+    a.lpz.z   = 100;
+    b = a;
+
+    /* Forward projection: Ellipsoidal-to-3D-Cartesian */
+    dist = proj_roundtrip (P, PJ_FWD, 1, &a);
+    if (dist > 1e-12)
+        return 9;
+
+
+    /* Inverse projection: 3D-Cartesian-to-Ellipsoidal */
+    b = proj_trans (P, PJ_INV, b);
+
+    /* Move p to another context */
+    ctx = proj_context_create ();
+    if (ctx==pj_get_default_ctx())
+        return 10;
+    proj_context_set (P, ctx);
+    if (ctx != P->ctx)
+        return 11;
+    b = proj_trans (P, PJ_FWD, b);
+
+    /* Move it back to the default context */
+    proj_context_set (P, 0);
+    if (pj_get_default_ctx() != P->ctx)
+        return 12;
+    proj_context_destroy (ctx);
+
+    /* We go on with the work - now back on the default context */
+    b = proj_trans (P, PJ_INV, b);
+    proj_destroy (P);
+
+
+    /* Testing proj_trans_generic () */
+
+    /* An utm projection on the GRS80 ellipsoid */
+    P = proj_create (PJ_DEFAULT_CTX, "+proj=utm +zone=32 +ellps=GRS80");
+    if (0==P)
+        return 13;
+
+    obs[0] = proj_coord (PJ_TORAD(12), PJ_TORAD(55), 45, 0);
+    obs[1] = proj_coord (PJ_TORAD(12), PJ_TORAD(56), 50, 0);
+    sz = sizeof (PJ_COORD);
+
+    /* Forward projection */
+    a = proj_trans (P, PJ_FWD, obs[0]);
+    b = proj_trans (P, PJ_FWD, obs[1]);
+
+    n = proj_trans_generic (
+        P, PJ_FWD,
+        &(obs[0].lpz.lam), sz, 2,
+        &(obs[0].lpz.phi), sz, 2,
+        &(obs[0].lpz.z),   sz, 2,
+        0,                     sz, 0
+    );
+    if (2!=n)
+        return 14;
+    if (a.lpz.lam != obs[0].lpz.lam)  return 15;
+    if (a.lpz.phi != obs[0].lpz.phi)  return 16;
+    if (a.lpz.z   != obs[0].lpz.z)    return 17;
+    if (b.lpz.lam != obs[1].lpz.lam)  return 18;
+    if (b.lpz.phi != obs[1].lpz.phi)  return 19;
+    if (b.lpz.z   != obs[1].lpz.z)    return 20;
+
+    /* now test the case of constant z */
+    obs[0] = proj_coord (PJ_TORAD(12), PJ_TORAD(55), 45, 0);
+    obs[1] = proj_coord (PJ_TORAD(12), PJ_TORAD(56), 50, 0);
+    h = 27;
+    t = 33;
+    n = proj_trans_generic (
+        P, PJ_FWD,
+        &(obs[0].lpz.lam), sz, 2,
+        &(obs[0].lpz.phi), sz, 2,
+        &h,                     0, 1,
+        &t,                     0, 1
+    );
+    if (2!=n)
+        return 21;
+    if (a.lpz.lam != obs[0].lpz.lam)  return 22;
+    if (a.lpz.phi != obs[0].lpz.phi)  return 23;
+    if (45            != obs[0].lpz.z)    return 24;
+    if (b.lpz.lam != obs[1].lpz.lam)  return 25;
+    if (b.lpz.phi != obs[1].lpz.phi)  return 26;
+    if (50            != obs[1].lpz.z)    return 27; /* NOTE: unchanged */
+    if (50==h) return 28;
+
+    /* test proj_trans_array () */
+
+    coord[0] = proj_coord (PJ_TORAD(12), PJ_TORAD(55), 45, 0);
+    coord[1] = proj_coord (PJ_TORAD(12), PJ_TORAD(56), 50, 0);
+    if (proj_trans_array (P, PJ_FWD, 2, coord))
+        return 40;
+
+    if (a.lpz.lam != coord[0].lpz.lam)  return 41;
+    if (a.lpz.phi != coord[0].lpz.phi)  return 42;
+    if (a.lpz.z   != coord[0].lpz.z)    return 43;
+    if (b.lpz.lam != coord[1].lpz.lam)  return 44;
+    if (b.lpz.phi != coord[1].lpz.phi)  return 45;
+    if (b.lpz.z   != coord[1].lpz.z)    return 46;
+
+    /* Clean up  after proj_trans_* tests */
+    proj_destroy (P);
+
+    /* test proj_create_crs_to_crs() */
+    P = proj_create_crs_to_crs(PJ_DEFAULT_CTX, "epsg:25832", "epsg:25833", NULL);
+    if (P==0)
+        return 50;
+
+    a.xy.x =  700000.0;
+    a.xy.y = 6000000.0;
+    b.xy.x =  307788.8761171057;
+    b.xy.y = 5999669.3036037628;
+
+    a = proj_trans(P, PJ_FWD, a);
+    if (dist > 1e-7)
+        return 51;
+    proj_destroy(P);
+
+    /* let's make sure that only entries in init-files results in a usable PJ */
+    P = proj_create_crs_to_crs(PJ_DEFAULT_CTX, "proj=utm +zone=32 +datum=WGS84", "proj=utm +zone=33 +datum=WGS84", NULL);
+    if (P != 0) {
+        proj_destroy(P);
+        return 52;
+    }
+    proj_destroy(P);
+
+    /* ********************************************************************** */
+    /*                          Test info functions                           */
+    /* ********************************************************************** */
+
+    /* proj_info()                                                            */
+    /* this one is difficult to test, since the output changes with the setup */
+    info = proj_info();
+
+    if (info.version[0] != '\0' ) {
+        char tmpstr[64];
+        sprintf(tmpstr, "%d.%d.%d", info.major, info.minor, info.patch);
+        if (strcmp(info.version, tmpstr)) return 55;
+    }
+    if (info.release[0] == '\0')    return 56;
+    if (info.searchpath[0] == '\0') return 57;
+
+    /* proj_pj_info() */
+    P = proj_create(PJ_DEFAULT_CTX, "+proj=august"); /* august has no inverse */
+    if (proj_pj_info(P).has_inverse) { proj_destroy(P); return 60; }
+    proj_destroy(P);
+
+    P = proj_create(PJ_DEFAULT_CTX, arg);
+    pj_info = proj_pj_info(P);
+    if ( !pj_info.has_inverse )            {  proj_destroy(P); return 61; }
+    if ( strcmp(pj_info.definition, arg) ) {  proj_destroy(P); return 62; }
+    if ( strcmp(pj_info.id, "utm") )       {  proj_destroy(P); return 63; }
+
+    proj_destroy(P);
+
+    /* proj_grid_info() */
+    grid_info = proj_grid_info("egm96_15.gtx");
+    if ( strlen(grid_info.filename) == 0 )            return 64;
+    if ( strcmp(grid_info.gridname, "egm96_15.gtx") ) return 65;
+    grid_info = proj_grid_info("nonexistinggrid");
+    if ( strlen(grid_info.filename) > 0 )             return 66;
+
+    /* proj_init_info() */
+    init_info = proj_init_info("unknowninit");
+    if ( strlen(init_info.filename) != 0 )  return 67;
+
+    init_info = proj_init_info("epsg");
+    /* Need to allow for "Unknown" until all commonly distributed EPSG-files comes with a metadata section */
+    if ( strcmp(init_info.origin, "EPSG") && strcmp(init_info.origin, "Unknown") )    return 69;
+    if ( strcmp(init_info.name, "epsg") )      return 68;
+
+
+    /* test proj_rtodms() and proj_dmstor() */
+    if (strcmp("180dN", proj_rtodms(buf, M_PI, 'N', 'S')))
+        return 70;
+
+    if (proj_dmstor(&buf[0], NULL) != M_PI)
+        return 71;
+
+    if (strcmp("114d35'29.612\"S", proj_rtodms(buf, -2.0, 'N', 'S')))
+        return 72;
+
+    /* we can't expect perfect numerical accuracy so testing with a tolerance */
+    if (fabs(-2.0 - proj_dmstor(&buf[0], NULL)) > 1e-7)
+        return 73;
+
+
+    /* test proj_derivatives_retrieve() and proj_factors_retrieve() */
+    P = proj_create(PJ_DEFAULT_CTX, "+proj=merc");
+    a = proj_coord (0,0,0,0);
+    a.lp.lam = PJ_TORAD(12);
+    a.lp.phi = PJ_TORAD(55);
+
+    factors = proj_factors(P, a.lp);
+    if (proj_errno(P))
+        return 85; /* factors not created correctly */
+
+    /* check a few key characteristics of the Mercator projection */
+    if (factors.angular_distortion != 0.0)  return 86; /* angular distortion should be 0 */
+    if (factors.meridian_parallel_angle != M_PI_2)  return 87; /* Meridian/parallel angle should be 90 deg */
+    if (factors.meridian_convergence != 0.0)  return 88; /* meridian convergence should be 0 */
+
+    proj_destroy(P);
+
+    /* Check that proj_list_* functions work by looping through them */
+    n = 0;
+    for (oper_list = proj_list_operations(); oper_list->id; ++oper_list) n++;
+    if (n == 0) return 90;
+
+    n = 0;
+    for (ellps_list = proj_list_ellps(); ellps_list->id; ++ellps_list) n++;
+    if (n == 0) return 91;
+
+    n = 0;
+    for (unit_list = proj_list_units(); unit_list->id; ++unit_list) n++;
+    if (n == 0) return 92;
+
+    n = 0;
+    for (pm_list = proj_list_prime_meridians(); pm_list->id; ++pm_list) n++;
+    if (n == 0) return 93;
+
+
+    /* check io-predicates */
+
+    /* angular in on fwd, linear out */
+    P = proj_create (PJ_DEFAULT_CTX, "+proj=cart +ellps=GRS80");
+    if (0==P) return 0;
+    if (!proj_angular_input (P, PJ_FWD))  return 100;
+    if ( proj_angular_input (P, PJ_INV))  return 101;
+    if ( proj_angular_output (P, PJ_FWD)) return 102;
+    if (!proj_angular_output (P, PJ_INV)) return 103;
+    P->inverted = 1;
+    if ( proj_angular_input (P, PJ_FWD))  return 104;
+    if (!proj_angular_input (P, PJ_INV))  return 105;
+    if (!proj_angular_output (P, PJ_FWD)) return 106;
+    if ( proj_angular_output (P, PJ_INV)) return 107;
+    proj_destroy(P);
+
+    /* angular in and out */
+    P = proj_create(PJ_DEFAULT_CTX,
+        "+proj=molodensky +a=6378160 +rf=298.25 "
+        "+da=-23 +df=-8.120449e-8 +dx=-134 +dy=-48 +dz=149 "
+        "+abridged "
+    );
+    if (0==P) return 0;
+    if (!proj_angular_input (P, PJ_FWD))  return 108;
+    if (!proj_angular_input (P, PJ_INV))  return 109;
+    if (!proj_angular_output (P, PJ_FWD)) return 110;
+    if (!proj_angular_output (P, PJ_INV)) return 111;
+    P->inverted = 1;
+    if (!proj_angular_input (P, PJ_FWD))  return 112;
+    if (!proj_angular_input (P, PJ_INV))  return 113;
+    if (!proj_angular_output (P, PJ_FWD)) return 114;
+    if (!proj_angular_output (P, PJ_INV)) return 115;
+    proj_destroy(P);
+
+    /* linear in and out */
+    P = proj_create(PJ_DEFAULT_CTX,
+        " +proj=helmert +ellps=GRS80"
+        " +x=0.0127 +y=0.0065 +z=-0.0209 +s=0.00195"
+        " +rx=-0.00039 +ry=0.00080 +rz=-0.00114"
+        " +dx=-0.0029 +dy=-0.0002 +dz=-0.0006 +ds=0.00001"
+        " +drx=-0.00011 +dry=-0.00019 +drz=0.00007"
+        " +t_epoch=1988.0 +transpose"
+    );
+    if (0==P) return 0;
+    if (proj_angular_input (P, PJ_FWD))  return 116;
+    if (proj_angular_input (P, PJ_INV))  return 117;
+    if (proj_angular_output (P, PJ_FWD)) return 118;
+    if (proj_angular_output (P, PJ_INV)) return 119;
+    P->inverted = 1;
+    if (proj_angular_input (P, PJ_FWD))  return 120;
+    if (proj_angular_input (P, PJ_INV))  return 121;
+    if (proj_angular_output (P, PJ_FWD)) return 122;
+    if (proj_angular_output (P, PJ_INV)) return 123;
+    proj_destroy(P);
+
+
+    return 0;
+}
+
+
+
+
+
+
+
+static int test_time(const char* args, double tol, double t_in, double t_exp) {
+    PJ_COORD in, out;
+    PJ *P = proj_create(PJ_DEFAULT_CTX, args);
+    int ret = 0;
+
+    if (P == 0)
+        return 5;
+
+    in.xyzt.t = t_in;
+
+    out = proj_trans(P, PJ_FWD, in);
+    if (fabs(out.xyzt.t - t_exp) > tol) {
+        proj_log_error(P, "out: %10.10g, expect: %10.10g", out.xyzt.t, t_exp);
+        ret = 1;
+    }
+    out = proj_trans(P, PJ_INV, out);
+    if (fabs(out.xyzt.t - t_in) > tol) {
+        proj_log_error(P, "out: %10.10g, expect: %10.10g", out.xyzt.t, t_in);
+        ret = 2;
+    }
+    pj_free(P);
+
+    proj_log_level(NULL, 0);
+    return ret;
+}
+
+static int pj_unitconvert_selftest (void) {
+    int ret = 0;
+    char args1[] = "+proj=unitconvert +t_in=decimalyear +t_out=decimalyear";
+    double in1 = 2004.25;
+
+    char args2[] = "+proj=unitconvert +t_in=gps_week +t_out=gps_week";
+    double in2 = 1782.0;
+
+    char args3[] = "+proj=unitconvert +t_in=mjd +t_out=mjd";
+    double in3 = 57390.0;
+
+    char args4[] = "+proj=unitconvert +t_in=gps_week +t_out=decimalyear";
+    double in4 = 1877.71428, exp4 = 2016.0;
+
+    char args5[] = "+proj=unitconvert +t_in=yyyymmdd +t_out=yyyymmdd";
+    double in5 = 20170131;
+
+    ret = test_time(args1, 1e-6, in1, in1);   if (ret) return ret + 10;
+    ret = test_time(args2, 1e-6, in2, in2);   if (ret) return ret + 20;
+    ret = test_time(args3, 1e-6, in3, in3);   if (ret) return ret + 30;
+    ret = test_time(args4, 1e-6, in4, exp4);  if (ret) return ret + 40;
+    ret = test_time(args5, 1e-6, in5, in5);   if (ret) return ret + 50;
+
+    return 0;
+
+}
diff --git a/src/jniproj.c b/src/jniproj.c
index 6094d57..85d984d 100644
--- a/src/jniproj.c
+++ b/src/jniproj.c
@@ -454,7 +454,7 @@ JNIEXPORT jstring JNICALL Java_org_proj4_PJ_getLastError
  * This method will also set the Java "ptr" final field to 0 as a safety. In theory we are not
  * supposed to change the value of a final field. But no Java code should use this field, and
  * the PJ object is being garbage collected anyway. We set the field to 0 as a safety in case
- * some user invoked the finalize() method explicitely despite our warning in the Javadoc to
+ * some user invoked the finalize() method explicitly despite our warning in the Javadoc to
  * never do such thing.
  *
  * \param env    - The JNI environment.
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
index a90cdac..f1337a5 100644
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -36,7 +36,7 @@ endif(USE_THREAD AND NOT Threads_FOUND)
 
 
 ##############################################
-### librairie source list and include_list ###
+###  library source list and include_list  ###
 ##############################################
 SET(SRC_LIBPROJ_PJ
         nad_init.c
@@ -45,18 +45,22 @@ SET(SRC_LIBPROJ_PJ
         PJ_airy.c
         PJ_aitoff.c
         PJ_august.c
+        PJ_axisswap.c
         PJ_bacon.c
         PJ_bipc.c
         PJ_boggs.c
         PJ_bonne.c
         PJ_calcofi.c
+        PJ_cart.c
         PJ_cass.c
         PJ_cc.c
+        PJ_ccon.c
         PJ_cea.c
         PJ_chamb.c
         PJ_collg.c
         PJ_comill.c
         PJ_crast.c
+        PJ_deformation.c
         PJ_denoy.c
         PJ_eck1.c
         PJ_eck2.c
@@ -68,6 +72,7 @@ SET(SRC_LIBPROJ_PJ
         PJ_fahey.c
         PJ_fouc_s.c
         PJ_gall.c
+        PJ_geoc.c
         PJ_geos.c
         PJ_gins8.c
         PJ_gnom.c
@@ -76,6 +81,9 @@ SET(SRC_LIBPROJ_PJ
         PJ_gstmerc.c
         PJ_hammer.c
         PJ_hatano.c
+        PJ_helmert.c
+        PJ_hgridshift.c
+        PJ_horner.c
         PJ_igh.c
         PJ_isea.c
         PJ_imw_p.c
@@ -85,6 +93,7 @@ SET(SRC_LIBPROJ_PJ
         PJ_lagrng.c
         PJ_larr.c
         PJ_lask.c
+        PJ_latlong.c
         PJ_lcca.c
         PJ_lcc.c
         PJ_loxim.c
@@ -97,6 +106,7 @@ SET(SRC_LIBPROJ_PJ
         PJ_mill.c
         PJ_mod_ster.c
         PJ_moll.c
+        PJ_molodensky.c
         PJ_natearth.c
         PJ_natearth2.c
         PJ_nell.c
@@ -110,6 +120,7 @@ SET(SRC_LIBPROJ_PJ
         PJ_omerc.c
         PJ_ortho.c
         PJ_patterson.c
+        PJ_pipeline.c
         PJ_poly.c
         PJ_putp2.c
         PJ_putp3.c
@@ -130,11 +141,13 @@ SET(SRC_LIBPROJ_PJ
         PJ_times.c
         PJ_tmerc.c
         PJ_tpeqd.c
+        PJ_unitconvert.c
         PJ_urm5.c
         PJ_urmfps.c
         PJ_vandg.c
         PJ_vandg2.c
         PJ_vandg4.c
+        PJ_vgridshift.c
         PJ_wag2.c
         PJ_wag3.c
         PJ_wag7.c
@@ -172,10 +185,8 @@ SET(SRC_LIBPROJ_CORE
         pj_errno.c
         pj_factors.c
         pj_fwd.c
-        pj_fwd3d.c
         pj_gauss.c
         pj_gc_reader.c
-        pj_generic_selftest.c
         pj_geocent.c
         pj_gridcatalog.c
         pj_gridinfo.c
@@ -184,8 +195,6 @@ SET(SRC_LIBPROJ_CORE
         pj_init.c
         pj_initcache.c
         pj_inv.c
-        pj_inv3d.c
-        pj_latlong.c
         pj_list.c
         pj_list.h
         pj_log.c
@@ -193,13 +202,15 @@ SET(SRC_LIBPROJ_CORE
         pj_mlfn.c
         pj_msfn.c
         pj_mutex.c
+        proj_4D_api.c
+        pj_internal.c
+        proj_internal.h
         pj_open_lib.c
         pj_param.c
         pj_phi2.c
         pj_pr_list.c
         pj_qsfn.c
         pj_release.c
-        pj_run_selftests.c
         pj_strerrno.c
         pj_transform.c
         pj_tsfn.c
@@ -217,6 +228,7 @@ SET(SRC_LIBPROJ_CORE
 set(HEADERS_LIBPROJ
         projects.h
         proj_api.h
+        proj.h
         geodesic.h
 )
 
@@ -334,7 +346,3 @@ boost_report_value(PROJ_CORE_TARGET)
 boost_report_value(PROJ_CORE_TARGET_OUTPUT_NAME)
 boost_report_value(PROJ_LIBRARY_TYPE)
 boost_report_value(PROJ_LIBRARIES)
-
-
-
-
diff --git a/src/makefile.vc b/src/makefile.vc
index 6f63bc6..ee89beb 100644
--- a/src/makefile.vc
+++ b/src/makefile.vc
@@ -11,7 +11,7 @@ azimuthal = \
 conic = \
 	PJ_aea.obj PJ_bipc.obj PJ_bonne.obj PJ_eqdc.obj \
 	PJ_imw_p.obj PJ_lcc.obj PJ_poly.obj \
-	PJ_rpoly.obj PJ_sconics.obj PJ_lcca.obj
+	PJ_rpoly.obj PJ_sconics.obj PJ_lcca.obj PJ_ccon.obj
 
 cylinder = \
 	PJ_cass.obj PJ_cc.obj PJ_cea.obj PJ_eqc.obj \
@@ -25,8 +25,8 @@ misc = \
 	PJ_chamb.obj PJ_hammer.obj PJ_lagrng.obj PJ_larr.obj \
 	PJ_lask.obj PJ_nocol.obj PJ_ob_tran.obj PJ_oea.obj \
 	PJ_sch.obj PJ_tpeqd.obj PJ_vandg.obj PJ_vandg2.obj \
-    PJ_vandg4.obj PJ_wag7.obj pj_latlong.obj PJ_krovak.obj \
-    pj_geocent.obj PJ_healpix.obj PJ_qsc.obj
+    PJ_vandg4.obj PJ_wag7.obj PJ_latlong.obj PJ_krovak.obj \
+    PJ_geoc.obj pj_geocent.obj PJ_healpix.obj PJ_qsc.obj
 
 pseudo = \
 	PJ_boggs.obj PJ_collg.obj PJ_crast.obj PJ_denoy.obj \
@@ -45,7 +45,6 @@ support = \
 	biveval.obj dmstor.obj mk_cheby.obj pj_auth.obj \
 	pj_deriv.obj pj_ell_set.obj pj_ellps.obj pj_errno.obj \
 	pj_factors.obj pj_fwd.obj pj_init.obj pj_inv.obj \
-    pj_fwd3d.obj pj_inv3d.obj \
 	pj_list.obj pj_malloc.obj pj_mlfn.obj pj_msfn.obj \
 	pj_open_lib.obj pj_param.obj pj_phi2.obj pj_pr_list.obj \
 	pj_qsfn.obj pj_strerrno.obj pj_tsfn.obj pj_units.obj \
@@ -56,19 +55,30 @@ support = \
 	pj_utils.obj pj_gridlist.obj pj_gridinfo.obj \
 	proj_mdist.obj pj_mutex.obj pj_initcache.obj \
 	pj_ctx.obj pj_fileapi.obj pj_log.obj pj_apply_vgridshift.obj \
-	pj_strtod.obj pj_run_selftests.obj pj_generic_selftest.obj
+	pj_strtod.obj pj_internal.obj
+
+pipeline = \
+	proj_4D_api.obj PJ_cart.obj PJ_pipeline.obj PJ_horner.obj PJ_helmert.obj \
+	PJ_vgridshift.obj PJ_hgridshift.obj PJ_unitconvert.obj PJ_molodensky.obj \
+	PJ_deformation.obj PJ_axisswap.obj
 
 geodesic = geodesic.obj
+
 LIBOBJ	=	$(support) $(pseudo) $(azimuthal) $(conic) $(cylinder) $(misc) \
-	$(geodesic)
+	$(geodesic) $(pipeline)
 PROJEXE_OBJ	= proj.obj gen_cheb.obj p_series.obj emess.obj
 CS2CSEXE_OBJ	= cs2cs.obj gen_cheb.obj p_series.obj emess.obj
 GEODEXE_OBJ	= geod.obj geod_set.obj geod_interface.obj emess.obj
+CCTEXE_OBJ = cct.obj proj_strtod.obj
+GIEEXE_OBJ = gie.obj proj_strtod.obj
+
 MULTISTRESSTEST_OBJ = multistresstest.obj
 PROJ_DLL 	= proj$(VERSION).dll
 PROJ_EXE    = proj.exe
 CS2CS_EXE   = cs2cs.exe
 GEOD_EXE    = geod.exe
+CCT_EXE     = cct.exe
+GIE_EXE     = gie.exe
 NAD2BIN_EXE = nad2bin.exe
 MULTISTRESSTEST_EXE = multistresstest.exe
 
@@ -77,7 +87,7 @@ CFLAGS	=	/nologo -I. -DPROJ_LIB=\"$(PROJ_LIB_DIR)\" \
 
 default:	all
 
-all: proj.lib $(PROJ_EXE) $(CS2CS_EXE) $(GEOD_EXE) $(NAD2BIN_EXE)
+all: proj.lib $(PROJ_EXE) $(CS2CS_EXE) $(GEOD_EXE) $(CCT_EXE) $(GIE_EXE) $(NAD2BIN_EXE)
 
 proj.lib:	$(LIBOBJ)
 	if exist proj.lib del proj.lib
@@ -91,19 +101,27 @@ proj_i.lib:	$(LIBOBJ)
 	if exist $(PROJ_DLL).manifest mt -manifest $(PROJ_DLL).manifest -outputresource:$(PROJ_DLL);2
 
 $(PROJ_EXE):	$(PROJEXE_OBJ) $(EXE_PROJ)
-	cl $(PROJEXE_OBJ) $(EXE_PROJ)
+	cl $(PROJEXE_OBJ) $(EXE_PROJ) /link setargv.obj
 	if exist $(PROJ_EXE).manifest mt -manifest $(PROJ_EXE).manifest -outputresource:$(PROJ_EXE);1
 
 $(CS2CS_EXE):	$(CS2CSEXE_OBJ) $(EXE_PROJ)
-	cl $(CS2CSEXE_OBJ) $(EXE_PROJ)
+	cl $(CS2CSEXE_OBJ) $(EXE_PROJ) /link setargv.obj
 	if exist $(CS2CS_EXE).manifest mt -manifest $(CS2CS_EXE).manifest -outputresource:$(CS2CS_EXE);1
 
 $(GEOD_EXE):	$(GEODEXE_OBJ) $(EXE_PROJ)
-	cl $(GEODEXE_OBJ) $(EXE_PROJ)
+	cl $(GEODEXE_OBJ) $(EXE_PROJ) /link setargv.obj
 	if exist $(GEOD_EXE).manifest mt -manifest $(GEOD_EXE).manifest -outputresource:$(GEOD_EXE);1
 
+$(CCT_EXE):	$(CCTEXE_OBJ) $(EXE_PROJ)
+	cl $(CCTEXE_OBJ) $(EXE_PROJ) /link setargv.obj
+	if exist $(CCT_EXE).manifest mt -manifest $(CCT_EXE).manifest -outputresource:$(CCT_EXE);1
+
+$(GIE_EXE):	$(GIEEXE_OBJ) $(EXE_PROJ)
+	cl $(GIEEXE_OBJ) $(EXE_PROJ) /link setargv.obj
+	if exist $(GIE_EXE).manifest mt -manifest $(GIE_EXE).manifest -outputresource:$(GIE_EXE);1
+
 $(NAD2BIN_EXE):	nad2bin.obj emess.obj $(EXE_PROJ)
-	cl nad2bin.obj emess.obj $(EXE_PROJ)
+	cl nad2bin.obj emess.obj $(EXE_PROJ) /link setargv.obj
 
 $(MULTISTRESSTEST_EXE): $(MULTISTRESSTEST_OBJ)
 	cl $(MULTISTRESSTEST_OBJ) $(EXE_PROJ)
@@ -140,10 +158,13 @@ install: all
 	-mkdir $(INSTDIR)\share
 	-mkdir $(INSTDIR)\lib
 	-mkdir $(INSTDIR)\include
+	-mkdir $(INSTDIR)\test
+	-mkdir $(INSTDIR)\test\gie
 	copy *.exe $(INSTDIR)\bin
 	copy *.dll $(INSTDIR)\bin
 	copy *.lib $(INSTDIR)\lib
+	copy proj.h     $(INSTDIR)\include
 	copy proj_api.h $(INSTDIR)\include
 	copy projects.h $(INSTDIR)\include
 	copy geodesic.h $(INSTDIR)\include
-
+	copy ..\test\gie\*.gie $(INSTDIR)\test\gie
diff --git a/src/mk_cheby.c b/src/mk_cheby.c
index 32f22f1..b074650 100644
--- a/src/mk_cheby.c
+++ b/src/mk_cheby.c
@@ -19,18 +19,23 @@ makeT(int nru, int nrv) {
     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
+    if (!(T = (Tseries *)pj_malloc(sizeof(Tseries))))
         return 0;
+    if (!(T->cu = (struct PW_COEF *)pj_malloc(sizeof(struct PW_COEF) * nru))) {
+        pj_dalloc(T);
+        return 0;
+    }
+    if (!(T->cv = (struct PW_COEF *)pj_malloc(sizeof(struct PW_COEF) * nrv))) {
+        pj_dalloc(T->cu);
+        pj_dalloc(T);
+        return 0;
+    }
+
+    for (i = 0; i < nru; ++i)
+        T->cu[i].c = 0;
+    for (i = 0; i < nrv; ++i)
+        T->cv[i].c = 0;
+    return T;
 }
 Tseries *
 mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV), 
@@ -40,9 +45,12 @@ mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV),
     projUV **w;
     double cutres;
 
-    if (!(w = (projUV **)vector2(nu, nv, sizeof(projUV))) ||
-        !(ncu = (int *)vector1(nu + nv, sizeof(int))))
+    if (!(w = (projUV **)vector2(nu, nv, sizeof(projUV))))
         return 0;
+    if (!(ncu = (int *)vector1(nu + nv, sizeof(int)))) {
+        freev2((void **)w, nu);
+        return 0;
+    }
     ncv = ncu + nu;
     if (!bchgen(a, b, nu, nv, w, func)) {
         projUV *s;
@@ -83,9 +91,9 @@ mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV),
             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)
+                    if (s->u != 0.0)
                         ncu[j] = i + 1;	/* update column max */
-                    if (s->v)
+                    if (s->v != 0.0)
                         ncv[j] = i + 1;
                 }
                 if (ncu[j]) nru = j + 1;	/* update row max */
diff --git a/src/multistresstest.c b/src/multistresstest.c
index 8c5df18..e32c7ae 100644
--- a/src/multistresstest.c
+++ b/src/multistresstest.c
@@ -32,10 +32,10 @@
 #include "proj_api.h"
 
 #ifdef _WIN32
-	#include <windows.h>
+    #include <windows.h>
 #else
-	#include <pthread.h>
-	#include <unistd.h>
+    #include <pthread.h>
+    #include <unistd.h>
 #endif
 
 #define num_threads    10
@@ -49,93 +49,125 @@ typedef struct {
 
     double  src_x, src_y, src_z;
     double  dst_x, dst_y, dst_z;
-    
+
     int     dst_error;
     int     skip;
-} TestItem; 
+} TestItem;
 
-TestItem test_list[] = {
+static TestItem test_list[] = {
     {
         "+proj=utm +zone=11 +datum=WGS84",
         "+proj=latlong +datum=WGS84",
         150000.0, 3000000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=utm +zone=11 +datum=NAD83",
         "+proj=latlong +datum=NAD27",
-        150000.0, 3000000.0, 0.0,  
+        150000.0, 3000000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=utm +zone=11 +datum=NAD83",
         "+proj=latlong +nadgrids=@null +ellps=WGS84",
         150000.0, 3000000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=utm +zone=11 +datum=WGS84",
         "+proj=merc +datum=potsdam",
         150000.0, 3000000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=latlong +nadgrids=nzgd2kgrid0005.gsb",
         "+proj=latlong +datum=WGS84",
         150000.0, 3000000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=latlong +nadgrids=nzgd2kgrid0005.gsb",
         "+proj=latlong +datum=WGS84",
         170 * DEG_TO_RAD, -40 * DEG_TO_RAD, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=latlong +ellps=GRS80 +towgs84=2,3,5",
         "+proj=latlong +ellps=intl +towgs84=10,12,15",
         170 * DEG_TO_RAD, -40 * DEG_TO_RAD, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=eqc +lat_0=11 +lon_0=12 +x_0=100000 +y_0=200000 +datum=WGS84 ",
         "+proj=stere +lat_0=11 +lon_0=12 +x_0=100000 +y_0=200000 +datum=WGS84 ",
         150000.0, 250000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=cea +lat_ts=11 +lon_0=12 +y_0=200000 +datum=WGS84 ",
         "+proj=merc +lon_0=12 +k=0.999 +x_0=100000 +y_0=200000 +datum=WGS84 ",
         150000.0, 250000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=bonne +lat_1=11 +lon_0=12 +y_0=200000 +datum=WGS84 ",
         "+proj=cass +lat_0=11 +lon_0=12 +x_0=100000 +y_0=200000 +datum=WGS84 ",
         150000.0, 250000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=nzmg +lat_0=11 +lon_0=12 +y_0=200000 +datum=WGS84 ",
         "+proj=gnom +lat_0=11 +lon_0=12 +x_0=100000 +y_0=200000 +datum=WGS84 ",
         150000.0, 250000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=ortho +lat_0=11 +lon_0=12 +y_0=200000 +datum=WGS84 ",
         "+proj=laea +lat_0=11 +lon_0=12 +x_0=100000 +y_0=200000 +datum=WGS84 ",
         150000.0, 250000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=aeqd +lat_0=11 +lon_0=12 +y_0=200000 +datum=WGS84 ",
         "+proj=eqdc +lat_1=20 +lat_2=5 +lat_0=11 +lon_0=12 +x_0=100000 +y_0=200000 +datum=WGS84 ",
         150000.0, 250000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+proj=mill +lat_0=11 +lon_0=12 +y_0=200000 +datum=WGS84 ",
         "+proj=moll +lon_0=12 +x_0=100000 +y_0=200000 +datum=WGS84 ",
         150000.0, 250000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
     {
         "+init=epsg:3309",
         "+init=epsg:4326",
         150000.0, 30000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
     },
-	{
-		//Bad projection (invalid ellipsoid parameter +R_A=0)
-		"+proj=utm +zone=11 +datum=WGS84",
-		"+proj=merc +datum=potsdam +R_A=0",
-		150000.0, 3000000.0, 0.0,
-	}
+    {
+        /* Bad projection (invalid ellipsoid parameter +R_A=0) */
+        "+proj=utm +zone=11 +datum=WGS84",
+        "+proj=merc +datum=potsdam +R_A=0",
+        150000.0, 3000000.0, 0.0,
+        0.0, 0.0, 0.0,
+        0, 0
+    }
 };
 
 static volatile int active_thread_count = 0;
@@ -160,7 +192,7 @@ static projPJ* custom_pj_init_plus_ctx(projCtx ctx, const char* def)
 static void TestThread()
 
 {
-    int i, test_count = sizeof(test_list) / sizeof(TestItem); 
+    int i, test_count = sizeof(test_list) / sizeof(TestItem);
     int repeat_count = num_iterations;
     int i_iter;
 
@@ -169,11 +201,10 @@ static void TestThread()
 /* -------------------------------------------------------------------- */
     projPJ *src_pj_list, *dst_pj_list;
     projCtx ctx = pj_ctx_alloc();
-//    projCtx ctx = pj_get_default_ctx();
-    
+
     src_pj_list = (projPJ *) calloc(test_count,sizeof(projPJ));
     dst_pj_list = (projPJ *) calloc(test_count,sizeof(projPJ));
-                                
+
     if(!reinit_every_iteration)
     {
         for( i = 0; i < test_count; i++ )
@@ -184,11 +215,11 @@ static void TestThread()
             dst_pj_list[i] = custom_pj_init_plus_ctx( ctx, test->dst_def );
         }
     }
-    
+
 /* -------------------------------------------------------------------- */
 /*      Perform tests - over and over.                                  */
 /* -------------------------------------------------------------------- */
-    
+
     for( i_iter = 0; i_iter < repeat_count; i_iter++ )
     {
         for( i = 0; i < test_count; i++ )
@@ -208,7 +239,7 @@ static void TestThread()
 
                 {
                     int skipTest = (src_pj_list[i] == NULL || dst_pj_list[i] == NULL);
-                            
+
                     if ( skipTest != test->skip )
                         fprintf( stderr, "Threaded projection initialization does not match unthreaded initialization\n" );
 
@@ -224,23 +255,23 @@ static void TestThread()
             if ( test->skip )
                 continue;
 
-            error = pj_transform( src_pj_list[i], dst_pj_list[i], 1, 0, 
+            error = pj_transform( src_pj_list[i], dst_pj_list[i], 1, 0,
                                   &x, &y, &z );
-            
+
 
             if( error != test->dst_error )
             {
-                fprintf( stderr, "Got error %d, expected %d\n", 
+                fprintf( stderr, "Got error %d, expected %d\n",
                          error, test->dst_error );
             }
 
             if( x != test->dst_x || y != test->dst_y || z != test->dst_z )
             {
-                fprintf( stderr, 
+                fprintf( stderr,
                          "Got %.15g,%.15g,%.15g\n"
                          "Expected %.15g,%.15g,%.15g\n"
                          "Diff %.15g,%.15g,%.15g\n",
-                         x, y, z, 
+                         x, y, z,
                          test->dst_x, test->dst_y, test->dst_z,
                          x-test->dst_x, y-test->dst_y, z-test->dst_z);
             }
@@ -264,13 +295,13 @@ static void TestThread()
             pj_free( dst_pj_list[i] );
         }
     }
-    
+
     free( src_pj_list );
     free( dst_pj_list );
 
     pj_ctx_free( ctx );
 
-    printf( "%d iterations of the %d tests complete in thread X\n", 
+    printf( "%d iterations of the %d tests complete in thread X\n",
             repeat_count, test_count );
 
     active_thread_count--;
@@ -297,6 +328,7 @@ static DWORD WINAPI WinTestThread( LPVOID lpParameter )
 static void *PosixTestThread( void *pData )
 
 {
+    (void)pData;
     TestThread();
     return NULL;
 }
@@ -308,14 +340,14 @@ static void *PosixTestThread( void *pData )
 #ifdef _WIN32
 static DWORD WINAPI do_main( LPVOID unused )
 #else
-int do_main(void)
+static int do_main(void)
 #endif
 {
 /* -------------------------------------------------------------------- */
 /*      Our first pass is to establish the correct answers for all      */
 /*      the tests.                                                      */
 /* -------------------------------------------------------------------- */
-    int i, test_count = sizeof(test_list) / sizeof(TestItem); 
+    int i, test_count = sizeof(test_list) / sizeof(TestItem);
 
     for( i = 0; i < test_count; i++ )
     {
@@ -330,6 +362,7 @@ int do_main(void)
         {
             printf( "Unable to translate:\n%s\n", test->src_def );
             test->skip = 1;
+            pj_free (dst_pj);
             continue;
         }
 
@@ -337,18 +370,19 @@ int do_main(void)
         {
             printf( "Unable to translate:\n%s\n", test->dst_def );
             test->skip = 1;
+            pj_free (src_pj);
             continue;
         }
-        
+
         test->dst_x = test->src_x;
         test->dst_y = test->src_y;
         test->dst_z = test->src_z;
 
-        test->dst_error = pj_transform( src_pj, dst_pj, 1, 0, 
-                                        &(test->dst_x), 
+        test->dst_error = pj_transform( src_pj, dst_pj, 1, 0,
+                                        &(test->dst_x),
                                         &(test->dst_y),
                                         &(test->dst_z) );
-     
+
         pj_free( src_pj );
         pj_free( dst_pj );
 
@@ -366,47 +400,47 @@ int do_main(void)
 /* -------------------------------------------------------------------- */
 #ifdef _WIN32
 
-	{ //Scoped to workaround lack of c99 support in VS
-		HANDLE ahThread[num_threads];
+    { //Scoped to workaround lack of c99 support in VS
+        HANDLE ahThread[num_threads];
 
-		for( i = 0; i < num_threads; i++ )
-		{
-			active_thread_count++;
+        for( i = 0; i < num_threads; i++ )
+        {
+            active_thread_count++;
 
-			ahThread[i] = CreateThread(NULL, 0, WinTestThread, NULL, 0, NULL);
-			
-			if (ahThread[i] == 0)
-			{
-				printf( "Thread creation failed.");
-				return 1;
-			}
-		}
+            ahThread[i] = CreateThread(NULL, 0, WinTestThread, NULL, 0, NULL);
 
-		printf( "%d test threads launched.\n", num_threads );
+            if (ahThread[i] == 0)
+            {
+                printf( "Thread creation failed.");
+                return 1;
+            }
+        }
+
+        printf( "%d test threads launched.\n", num_threads );
 
-		WaitForMultipleObjects(num_threads, ahThread, TRUE, INFINITE);
-	}
+        WaitForMultipleObjects(num_threads, ahThread, TRUE, INFINITE);
+    }
 
 #else
     {
-	pthread_t ahThread[num_threads];
-	pthread_attr_t hThreadAttr;
+    pthread_t ahThread[num_threads];
+    pthread_attr_t hThreadAttr;
 
-	pthread_attr_init( &hThreadAttr );
-	pthread_attr_setdetachstate( &hThreadAttr, PTHREAD_CREATE_DETACHED );
+    pthread_attr_init( &hThreadAttr );
+    pthread_attr_setdetachstate( &hThreadAttr, PTHREAD_CREATE_DETACHED );
 
-	for( i = 0; i < num_threads; i++ )
-	{
-		active_thread_count++;
+    for( i = 0; i < num_threads; i++ )
+    {
+        active_thread_count++;
 
-		pthread_create( &(ahThread[i]), &hThreadAttr, 
-			PosixTestThread, NULL );
-	}
+        pthread_create( &(ahThread[i]), &hThreadAttr,
+            PosixTestThread, NULL );
+    }
 
-	printf( "%d test threads launched.\n", num_threads );
+    printf( "%d test threads launched.\n", num_threads );
 
-	while( active_thread_count > 0 )				       
-		sleep( 1 );
+    while( active_thread_count > 0 )
+        sleep( 1 );
     }
 #endif
 
diff --git a/src/nad2bin.c b/src/nad2bin.c
index 59ec165..03a5532 100644
--- a/src/nad2bin.c
+++ b/src/nad2bin.c
@@ -1,10 +1,10 @@
 /* Convert bivariate ASCII NAD27 to NAD83 tables to NTv2 binary structure */
 #include <stdio.h>
 #include <stdlib.h>
-#include <assert.h>
 
 #define PJ_LIB__
-#include <projects.h>
+#include "proj_internal.h"
+#include "projects.h"
 #define U_SEC_TO_RAD 4.848136811095359935899141023e-12
 
 /************************************************************************/
@@ -13,8 +13,8 @@
 /*      Convert the byte order of the given word(s) in place.           */
 /************************************************************************/
 
-static int  byte_order_test = 1;
-#define IS_LSB	(((unsigned char *) (&byte_order_test))[0] == 1)
+static const int  byte_order_test = 1;
+#define IS_LSB	(((const unsigned char *) (&byte_order_test))[0] == 1)
 
 static void swap_words( void *data_in, int word_size, int word_count )
 
@@ -28,7 +28,7 @@ static void swap_words( void *data_in, int word_size, int word_count )
         
         for( i = 0; i < word_size/2; i++ )
         {
-            int	t;
+            unsigned char	t;
             
             t = data[i];
             data[i] = data[word_size-i-1];
@@ -127,16 +127,16 @@ int main(int argc, char **argv) {
             fprintf(stderr,"format check on row\n");
             exit(1);
         }
-        t.lam = laml * U_SEC_TO_RAD;
-        t.phi = phil * U_SEC_TO_RAD;
+        t.lam = (float) (laml * U_SEC_TO_RAD);
+        t.phi = (float) (phil * U_SEC_TO_RAD);
         *p++ = t;
         for (j = 1; j < ct.lim.lam; ++j) {
             if ( EOF == scanf("%ld %ld", &lam, &phi) ) {
                 perror("scanf on column");
                 exit(1);
             }
-            t.lam = (laml += lam) * U_SEC_TO_RAD;
-            t.phi = (phil += phi) * U_SEC_TO_RAD;
+            t.lam = (float) ((laml += lam) * U_SEC_TO_RAD);
+            t.phi = (float) ((phil += phi) * U_SEC_TO_RAD);
             *p++ = t;
         }
     }
@@ -177,8 +177,8 @@ int main(int argc, char **argv) {
             exit(2);
 	}
 
-        assert( MAX_TAB_ID == 80 );
-        assert( sizeof(int) == 4 ); /* for ct.lim.lam/phi */
+        STATIC_ASSERT( MAX_TAB_ID == 80 );
+        STATIC_ASSERT( sizeof(pj_int32) == 4 ); /* for ct.lim.lam/phi */
 
         memset( header, 0, sizeof(header) );
 
@@ -267,13 +267,13 @@ int main(int argc, char **argv) {
         {
             unsigned char achHeader[11*16];
             double dfValue;
-            int nGSCount = ct.lim.lam * ct.lim.phi;
+            pj_int32 nGSCount = ct.lim.lam * ct.lim.phi;
             LP ur;
 
             ur.lam = ct.ll.lam + (ct.lim.lam-1) * ct.del.lam;
             ur.phi = ct.ll.phi + (ct.lim.phi-1) * ct.del.phi;
 
-            assert( sizeof(nGSCount) == 4 );
+            STATIC_ASSERT( sizeof(nGSCount) == 4 );
 
             memset( achHeader, 0, sizeof(achHeader) );
 
@@ -342,16 +342,14 @@ int main(int argc, char **argv) {
 
             for( row = 0; row < ct.lim.phi; row++ )
             {
-                int	    i;
-
                 for( i = 0; i < ct.lim.lam; i++ )
                 {
                     FLP *cvs = ct.cvs + (row) * ct.lim.lam
                         + (ct.lim.lam - i - 1);
 
                     /* convert radians to seconds */
-                    row_buf[i*4+0] = cvs->phi * (3600.0 / (M_PI/180.0));
-                    row_buf[i*4+1] = cvs->lam * (3600.0 / (M_PI/180.0));
+                    row_buf[i*4+0] = (float) (cvs->phi * (3600.0 / (M_PI/180.0)));
+                    row_buf[i*4+1] = (float) (cvs->lam * (3600.0 / (M_PI/180.0)));
 
                     /* We leave the accuracy values as zero */
                 }
diff --git a/src/nad_cvt.c b/src/nad_cvt.c
index f48f9e0..c913511 100644
--- a/src/nad_cvt.c
+++ b/src/nad_cvt.c
@@ -1,68 +1,70 @@
 #define PJ_LIB__
-#include <projects.h>
-#define MAX_TRY 9
+#include "projects.h"
+#define MAX_ITERATIONS 10
 #define TOL 1e-12
-	LP
-nad_cvt(LP in, int inverse, struct CTABLE *ct) {
-	LP t, tb;
 
-	if (in.lam == HUGE_VAL)
-		return in;
-	/* normalize input to ll origin */
-	tb = in;
-	tb.lam -= ct->ll.lam;
-	tb.phi -= ct->ll.phi;
-	tb.lam = adjlon(tb.lam - M_PI) + M_PI;
-	t = nad_intr(tb, ct);
-	if (inverse) {
-		LP del, dif;
-		int i = MAX_TRY;
+LP nad_cvt(LP in, int inverse, struct CTABLE *ct) {
+    LP t, tb,del, dif;
+    int i = MAX_ITERATIONS;
+    const double toltol = TOL*TOL;
 
-		if (t.lam == HUGE_VAL) return t;
-		t.lam = tb.lam + t.lam;
-		t.phi = tb.phi - t.phi;
+    if (in.lam == HUGE_VAL)
+        return in;
 
-		do {
-			del = nad_intr(t, ct);
+    /* normalize input to ll origin */
+    tb = in;
+    tb.lam -= ct->ll.lam;
+    tb.phi -= ct->ll.phi;
+    tb.lam = adjlon (tb.lam - M_PI) + M_PI;
 
-                        /* This case used to return failure, but I have
-                           changed it to return the first order approximation
-                           of the inverse shift.  This avoids cases where the
-                           grid shift *into* this grid came from another grid.
-                           While we aren't returning optimally correct results
-                           I feel a close result in this case is better than
-                           no result.  NFW
-                           To demonstrate use -112.5839956 49.4914451 against
-                           the NTv2 grid shift file from Canada. */
-			if (del.lam == HUGE_VAL) 
-                        {
-                            if( getenv( "PROJ_DEBUG" ) != NULL )
-                                fprintf( stderr, 
-                                         "Inverse grid shift iteration failed, presumably at grid edge.\n"
-                                         "Using first approximation.\n" );
-                            /* return del */;
-                            break;
-                        }
+    t = nad_intr (tb, ct);
+    if (t.lam == HUGE_VAL)
+        return t;
 
-			t.lam -= dif.lam = t.lam - del.lam - tb.lam;
-			t.phi -= dif.phi = t.phi + del.phi - tb.phi;
-		} while (i-- && fabs(dif.lam) > TOL && fabs(dif.phi) > TOL);
-		if (i < 0) {
-                    if( getenv( "PROJ_DEBUG" ) != NULL )
-                        fprintf( stderr, 
-                                 "Inverse grid shift iterator failed to converge.\n" );
-                    t.lam = t.phi = HUGE_VAL;
-                    return t;
-		}
-		in.lam = adjlon(t.lam + ct->ll.lam);
-		in.phi = t.phi + ct->ll.phi;
-	} else {
-		if (t.lam == HUGE_VAL)
-			in = t;
-		else {
-			in.lam -= t.lam;
-			in.phi += t.phi;
-		}
-	}
-	return in;
+    if (!inverse) {
+        in.lam -= t.lam;
+        in.phi += t.phi;
+        return in;
+    }
+
+    t.lam = tb.lam + t.lam;
+    t.phi = tb.phi - t.phi;
+
+    do {
+        del = nad_intr(t, ct);
+
+        /* This case used to return failure, but I have
+           changed it to return the first order approximation
+           of the inverse shift.  This avoids cases where the
+           grid shift *into* this grid came from another grid.
+           While we aren't returning optimally correct results
+           I feel a close result in this case is better than
+           no result.  NFW
+           To demonstrate use -112.5839956 49.4914451 against
+           the NTv2 grid shift file from Canada. */
+        if (del.lam == HUGE_VAL)
+            break;
+
+        dif.lam = t.lam - del.lam - tb.lam;
+           dif.phi = t.phi + del.phi - tb.phi;
+        t.lam -= dif.lam;
+        t.phi -= dif.phi;
+
+    } while (--i && (dif.lam*dif.lam + dif.phi*dif.phi > toltol)); /* prob. slightly faster than hypot() */
+
+    if (i==0) {
+        /* If we had access to a context, this should go through pj_log, and we should set ctx->errno */
+        if (getenv ("PROJ_DEBUG"))
+            fprintf( stderr, "Inverse grid shift iterator failed to converge.\n" );
+        t.lam = t.phi = HUGE_VAL;
+        return t;
+    }
+
+    /* and again: pj_log and ctx->errno */
+    if (del.lam==HUGE_VAL && getenv ("PROJ_DEBUG"))
+        fprintf (stderr, "Inverse grid shift iteration failed, presumably at grid edge.\nUsing first approximation.\n");
+
+    in.lam = adjlon (t.lam + ct->ll.lam);
+    in.phi = t.phi + ct->ll.phi;
+    return in;
 }
diff --git a/src/nad_init.c b/src/nad_init.c
index 3b35ea6..04177a4 100644
--- a/src/nad_init.c
+++ b/src/nad_init.c
@@ -32,24 +32,14 @@
 #include <errno.h>
 #include <string.h>
 
-#ifdef _WIN32_WCE
-/* assert.h includes all Windows API headers and causes 'LP' name clash.
- * Here assert we disable assert() for Windows CE.
- * TODO - mloskot: re-implement porting friendly assert
- */
-# define assert(exp)	((void)0)
-#else
-# include <assert.h>
-#endif /* _WIN32_WCE */
-
 /************************************************************************/
 /*                             swap_words()                             */
 /*                                                                      */
 /*      Convert the byte order of the given word(s) in place.           */
 /************************************************************************/
 
-static int  byte_order_test = 1;
-#define IS_LSB	(((unsigned char *) (&byte_order_test))[0] == 1)
+static const int  byte_order_test = 1;
+#define IS_LSB	(((const unsigned char *) (&byte_order_test))[0] == 1)
 
 static void swap_words( void *data_in, int word_size, int word_count )
 
@@ -63,7 +53,7 @@ static void swap_words( void *data_in, int word_size, int word_count )
         
         for( i = 0; i < word_size/2; i++ )
         {
-            int	t;
+            unsigned char	t;
             
             t = data[i];
             data[i] = data[word_size-i-1];
@@ -122,6 +112,7 @@ struct CTABLE *nad_ctable_init( projCtx ctx, PAFile fid )
         || pj_ctx_fread( ctx, ct, sizeof(struct CTABLE), 1, fid ) != 1 )
     {
         pj_ctx_set_errno( ctx, -38 );
+        pj_dalloc( ct );
         return NULL;
     }
 
@@ -130,11 +121,12 @@ struct CTABLE *nad_ctable_init( projCtx ctx, PAFile fid )
         || ct->lim.phi < 1 || ct->lim.phi > 100000 )
     {
         pj_ctx_set_errno( ctx, -38 );
+        pj_dalloc( ct );
         return NULL;
     }
     
     /* trim white space and newlines off id */
-    for( id_end = strlen(ct->id)-1; id_end > 0; id_end-- )
+    for( id_end = (int)strlen(ct->id)-1; id_end > 0; id_end-- )
     {
         if( ct->id[id_end] == '\n' || ct->id[id_end] == ' ' )
             ct->id[id_end] = '\0';
@@ -181,7 +173,7 @@ int nad_ctable2_load( projCtx ctx, struct CTABLE *ct, PAFile fid )
 
     if( !IS_LSB )
     {
-        swap_words( ct->cvs, 4, a_size * 2 );
+        swap_words( ct->cvs, 4, (int)a_size * 2 );
     }
 
     return 1;
@@ -222,7 +214,7 @@ struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid )
     ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
     if( ct == NULL )
     {
-        pj_ctx_set_errno( ctx, -38 );
+        pj_ctx_set_errno( ctx, ENOMEM );
         return NULL;
     }
 
@@ -239,11 +231,12 @@ struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid )
         || ct->lim.phi < 1 || ct->lim.phi > 100000 )
     {
         pj_ctx_set_errno( ctx, -38 );
+        pj_dalloc( ct );
         return NULL;
     }
     
     /* trim white space and newlines off id */
-    for( id_end = strlen(ct->id)-1; id_end > 0; id_end-- )
+    for( id_end = (int)strlen(ct->id)-1; id_end > 0; id_end-- )
     {
         if( ct->id[id_end] == '\n' || ct->id[id_end] == ' ' )
             ct->id[id_end] = '\0';
diff --git a/src/nad_intr.c b/src/nad_intr.c
index 299f180..37b628b 100644
--- a/src/nad_intr.c
+++ b/src/nad_intr.c
@@ -10,8 +10,8 @@ nad_intr(LP t, struct CTABLE *ct) {
 	long index;
 	int in;
 
-	indx.lam = floor(t.lam /= ct->del.lam);
-	indx.phi = floor(t.phi /= ct->del.phi);
+	indx.lam = (int)floor(t.lam /= ct->del.lam);
+	indx.phi = (int)floor(t.phi /= ct->del.phi);
 	frct.lam = t.lam - indx.lam;
 	frct.phi = t.phi - indx.phi;
 	val.lam = val.phi = HUGE_VAL;
diff --git a/src/optargpm.h b/src/optargpm.h
new file mode 100644
index 0000000..d464b5a
--- /dev/null
+++ b/src/optargpm.h
@@ -0,0 +1,621 @@
+/***********************************************************************
+
+          OPTARGPM - a header-only library for decoding
+                PROJ.4 style command line options
+
+                   Thomas Knudsen, 2017-09-10
+
+************************************************************************
+
+For PROJ.4 command line programs, we have a somewhat complex option
+decoding situation, since we have to navigate in a cocktail of classic
+single letter style options, prefixed by "-", GNU style long options
+prefixed by "--", transformation specification elements prefixed by "+",
+and input file names prefixed by "" (i.e. nothing).
+
+Hence, classic getopt.h style decoding does not cut the mustard, so
+this is an attempt to catch up and chop the ketchup.
+
+Since optargpm (for "optarg plus minus") does not belong, in any
+obvious way, in any systems development library, it is provided as
+a "header only" library.
+
+While this is conventional in C++, it is frowned at in plain C.
+But frown away - "header only" has its places, and this is one of
+them.
+
+By convention, we expect a command line to consist of the following
+elements:
+
+        <operator/program name>
+        [short ("-")/long ("--") options}
+        [operator ("+") specs]
+        [operands/input files]
+
+or less verbose:
+
+        <operator>   [options]   [operator specs]   [operands]
+
+or less abstract:
+
+   proj  -I --output=foo  +proj=utm +zone=32 +ellps=GRS80   bar baz...
+
+Where
+
+Operator is              proj
+Options are             -I --output=foo
+Operator specs are      +proj=utm +zone=32 +ellps=GRS80
+Operands are             bar baz
+
+
+While neither claiming to save the world, nor to hint at the "shape of
+jazz to come", at least optargpm has shown useful in constructing cs2cs
+style transformation filters.
+
+Supporting a wide range of option syntax, the getoptpm API is somewhat
+quirky, but also compact, consisting of one data type, 3(+2) functions,
+and one enumeration:
+
+OPTARGS
+        Housekeeping data type. An instance of OPTARGS is conventionally
+        called o or opt
+opt_parse (opt, argc, argv ...):
+        The work horse: Define supported options; Split (argc, argv)
+        into groups (options, op specs, operands); Parse option
+        arguments.
+opt_given (o, option):
+        The number of times <option> was given on the command line.
+        (i.e. 0 if not given or option unsupported)
+opt_arg (o, option):
+        A char pointer to the argument for <option>
+
+The 2 additional functions (of which, one is really a macro) implements
+a "read all operands sequentially" functionality, eliminating the need to
+handle open/close of a sequence of input files:
+
+enum OPTARGS_FILE_MODE:
+        indicates whether to read operands in text (0) or binary (1) mode
+opt_input_loop (o, mode):
+        When used as condition in a while loop, traverses all operands,
+        giving the impression of reading just a single input file.
+opt_eof_handler (o):
+        Auxiliary macro, to be called inside the input loop after each
+        read operation
+
+Usage is probably easiest understood by a brief textbook style example:
+
+Consider a simple program taking the conventinal "-v, -h, -o" options
+indicating "verbose output", "help please", and "output file specification",
+respectively.
+
+The "-v" and "-h" options are *flags*, taking no arguments, while the
+"-o" option is a *key*, taking a *value* argument, representing the
+output file name.
+
+The short options have long aliases: "--verbose", "--help" and "--output".
+Additionally, the long key "--hello", without any short counterpart, is
+supported.
+
+-------------------------------------------------------------------------------
+
+
+int main(int argc, char **argv) {
+    PJ *P;
+    OPTARGS *o;
+    FILE *out = stdout;
+    char *longflags[]  = {"v=verbose", "h=help", 0};
+    char *longkeys[]   = {"o=output", "hello", 0};
+
+    o = opt_parse (argc, argv, "hv", "o", longflags, longkeys);
+    if (0==o)
+        return 0;
+
+
+    if (opt_given (o, "h")) {
+        printf ("Usage: %s [-v|--verbose] [-h|--help] [-o|--output <filename>] [--hello=<name>] infile...", o->progname);
+        exit (0);
+    }
+
+    if (opt_given (o, "v"))
+        puts ("Feeling chatty today?");
+
+    if (opt_given (o, "hello")) {
+        printf ("Hello, %s!\n", opt_arg(o, "hello"));
+        exit (0);
+    }
+
+    if (opt_given (o, "o"))
+        out = fopen (opt_arg (o, "output"), "rt"); // Note: "output" translates to "o" internally
+
+    // Setup transformation
+    P = proj_create_argv (0, o->pargc, o->pargv);
+
+    // Loop over all lines of all input files
+    while (opt_input_loop (o, optargs_file_format_text)) {
+        char buf[1000];
+        int ret = fgets (buf, 1000, o->input);
+        opt_eof_handler (o);
+        if (0==ret) {
+            fprintf (stderr, "Read error in record %d\n", (int) o->record_index);
+            continue;
+        }
+        do_what_needs_to_be_done (buf);
+    }
+
+    return 0;
+}
+
+
+-------------------------------------------------------------------------------
+
+Note how short aliases for longflags and longkeys are defined by prefixing
+an "o=", "h=" or "v=", respectively. This also means that it is possible to
+have more than one alias for each short option, e.g.
+
+               longkeys = {"o=output", "o=banana", 0}
+
+would define both "--output" and "--banana" to be aliases for "-o".
+
+************************************************************************
+
+Thomas Knudsen, thokn at sdfe.dk, 2016-05-25/2017-09-10
+
+************************************************************************
+
+* Copyright (c) 2016, 2017 Thomas Knudsen
+*
+* 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 <ctype.h>
+#include <errno.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/**************************************************************************************************/
+struct OPTARGS;
+typedef struct OPTARGS OPTARGS;
+enum OPTARGS_FILE_FORMAT {optargs_file_format_text = 0, optargs_file_format_binary = 1};
+
+char *opt_filename (OPTARGS *opt);
+static int opt_eof (OPTARGS *opt);
+int opt_record (OPTARGS *opt);
+int opt_input_loop (OPTARGS *opt, int binary);
+static int opt_is_flag (OPTARGS *opt, int ordinal);
+static int opt_raise_flag (OPTARGS *opt, int ordinal);
+static int opt_ordinal (OPTARGS *opt, char *option);
+int opt_given (OPTARGS *opt, char *option);
+char *opt_arg (OPTARGS *opt, char *option);
+const char *opt_strip_path (const char *full_name);
+OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, const char **longflags, const char **longkeys);
+
+#define opt_eof_handler(opt) if (opt_eof (opt)) {continue;} else {;}
+/**************************************************************************************************/
+
+struct OPTARGS {
+    int    argc,   margc,   pargc,   fargc;
+    char **argv, **margv, **pargv, **fargv;
+    FILE *input;
+    int   input_index;
+    int   record_index;
+    const char  *progname;   /* argv[0], stripped from /path/to, if present */
+    char   flaglevel[21];    /* if flag -f is specified n times, its optarg pointer is set to flaglevel + n */
+    char  *optarg[256];      /* optarg[(int) 'f'] holds a pointer to the argument of option "-f" */
+    char  *flags;            /* a list of flag style options supported, e.g. "hv" (help and verbose) */
+    char  *keys;             /* a list of key/value style options supported, e.g. "o" (output) */
+    const char **longflags;  /* long flags, {"help", "verbose"}, or {"h=help", "v=verbose"}, to indicate homologous short options */
+    const char **longkeys;   /* e.g. {"output"} or {o=output"} to support --output=/path/to/output-file. In the latter case, */
+                             /* all operations on "--output" gets redirected to "-o", so user code need handle arguments to "-o" only */
+};
+
+
+/* name of file currently read from */
+char *opt_filename (OPTARGS *opt) {
+    if (0==opt)
+        return 0;
+    if (0==opt->fargc)
+        return opt->flaglevel;
+    return opt->fargv[opt->input_index];
+}
+
+static int opt_eof (OPTARGS *opt) {
+    if (0==opt)
+        return 1;
+    return feof (opt->input);
+}
+
+/* record number of most recently read record */
+int opt_record (OPTARGS *opt) {
+    if (0==opt)
+        return 0;
+    return opt->record_index + 1;
+}
+
+
+/* handle closing/opening of a "stream-of-streams" */
+int opt_input_loop (OPTARGS *opt, int binary) {
+    if (0==opt)
+        return 0;
+
+    /* most common case: increment record index and read on */
+    if ( (opt->input!=0) && !feof (opt->input) ) {
+        opt->record_index++;
+        return 1;
+    }
+
+    opt->record_index = 0;
+
+    /* no input files specified - read from stdin */
+    if ((0==opt->fargc) && (0==opt->input)) {
+        opt->input = stdin;
+        return 1;
+    }
+
+    /* if we're here, we have either reached eof on current input file.   */
+    /*  or not yet opened a file. If eof on stdin, we're done             */
+    if (opt->input==stdin)
+        return 0;
+
+    /* end if no more input */
+    if (0!=opt->input)
+        fclose (opt->input);
+    if (opt->input_index >= opt->fargc)
+        return 0;
+
+    /* otherwise, open next input file */
+    opt->input = fopen (opt->fargv[opt->input_index++], binary? "rb": "rt");
+    if (0 != opt->input)
+        return 1;
+
+    /* ignore non-existing files - go on! */
+    if (0==opt->input)
+        return opt_input_loop (opt, binary);
+    return 0;
+}
+
+
+/* return true if option with given ordinal is a flag, false if undefined or key=value */
+static int opt_is_flag (OPTARGS *opt, int ordinal) {
+    if (opt->optarg[ordinal] < opt->flaglevel)
+        return 0;
+    if (opt->optarg[ordinal] > opt->flaglevel + 20)
+        return 0;
+    return 1;
+}
+
+static int opt_raise_flag (OPTARGS *opt, int ordinal) {
+    if (opt->optarg[ordinal] < opt->flaglevel)
+        return 1;
+    if (opt->optarg[ordinal] > opt->flaglevel + 20)
+        return 1;
+
+    /* Max out at 20 */
+    if (opt->optarg[ordinal]==opt->flaglevel + 20)
+        return 0;
+    opt->optarg[ordinal]++;
+    return 0;
+}
+
+/* Find the ordinal value of any (short or long) option */
+static int opt_ordinal (OPTARGS *opt, char *option) {
+    int i;
+    if (0==opt)
+        return 0;
+    if (0==option)
+        return 0;
+    if (0==option[0])
+        return 0;
+    /* An ordinary -o style short option */
+    if (strlen (option)==1) {
+        /* Undefined option? */
+        if (0==opt->optarg[(int) option[0]])
+            return 0;
+        return (int) option[0];
+    }
+
+    /* --longname style long options are slightly harder */
+    for (i = 0; i < 64; i++) {
+        const char **f = opt->longflags;
+        if (0==f)
+            break;
+        if (0==f[i])
+            break;
+        if (0==strcmp(f[i], "END"))
+            break;
+        if (0==strcmp(f[i], option))
+            return 128 + i;
+
+        /* long alias? - return ordinal for corresponding short */
+        if ((strlen(f[i]) > 2) && (f[i][1]=='=') && (0==strcmp(f[i]+2, option))) {
+                /* Undefined option? */
+                if (0==opt->optarg[(int) f[i][0]])
+                    return 0;
+                return (int) f[i][0];
+        }
+    }
+
+    for (i = 0; i < 64; i++) {
+        const char **v = opt->longkeys;
+        if (0==v)
+            return 0;
+        if (0==v[i])
+            return 0;
+        if (0==strcmp (v[i], "END"))
+            return 0;
+        if (0==strcmp(v[i], option))
+            return 192 + i;
+
+        /* long alias? - return ordinal for corresponding short */
+        if ((strlen(v[i]) > 2) && (v[i][1]=='=') && (0==strcmp(v[i]+2, option))) {
+            /* Undefined option? */
+            if (0==opt->optarg[(int) v[i][0]])
+                return 0;
+            return (int) v[i][0];
+        }
+
+    }
+    /* kill some potential compiler warnings about unused functions */
+    (void) opt_eof (0);
+    return 0;
+}
+
+
+/* Returns 0 if option was not given on command line, non-0 otherwise */
+int opt_given (OPTARGS *opt, char *option) {
+    int ordinal = opt_ordinal (opt, option);
+    if (0==ordinal)
+        return 0;
+    /* For flags we return the number of times the flag was specified (mostly for repeated -v(erbose) flags) */
+    if (opt_is_flag (opt, ordinal))
+        return (int) (opt->optarg[ordinal] - opt->flaglevel);
+    return opt->argv[0] != opt->optarg[ordinal];
+}
+
+
+/* Returns the argument to a given option */
+char *opt_arg (OPTARGS *opt, char *option) {
+    int ordinal = opt_ordinal (opt, option);
+    if (0==ordinal)
+        return 0;
+    return opt->optarg[ordinal];
+}
+
+const char *opt_strip_path (const char *full_name) {
+    const char *last_path_delim, *stripped_name = full_name;
+
+    last_path_delim = strrchr (stripped_name, '\\');
+    if (last_path_delim > stripped_name)
+        stripped_name = last_path_delim + 1;
+
+    last_path_delim = strrchr (stripped_name, '/');
+    if (last_path_delim > stripped_name)
+        stripped_name = last_path_delim + 1;
+    return stripped_name;
+}
+
+/* split command line options into options/flags ("-" style), projdefs ("+" style) and input file args */
+OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, const char **longflags, const char **longkeys) {
+    int i, j;
+    int free_format;
+    OPTARGS *o;
+
+    o = (OPTARGS *) calloc (1, sizeof(OPTARGS));
+    if (0==o)
+        return 0;
+
+    o->argc = argc;
+    o->argv = argv;
+    o->progname = opt_strip_path (argv[0]);
+
+    /* Reset all flags */
+    for (i = 0;  i < (int) strlen (flags);  i++)
+        o->optarg[(int) flags[i]] = o->flaglevel;
+
+     /* Flag args for all argument taking options as "unset" */
+    for (i = 0; i < (int) strlen (keys); i++)
+        o->optarg[(int) keys[i]] = argv[0];
+
+    /* Hence, undefined/illegal options have an argument of 0 */
+
+    /* long opts are handled similarly, but are mapped to the high bit character range (above 128) */
+    o->longflags  =  longflags;
+    o->longkeys   =  longkeys;
+
+
+    /* check aliases, An end user should never experience this, but */
+    /* the developer should make sure that aliases are valid */
+    for (i = 0;  longflags && longflags[i]; i++) {
+        /* Go on if it does not look like an alias */
+        if (strlen (longflags[i]) < 3)
+            continue;
+        if ('='!=longflags[i][1])
+            continue;
+        if (0==strchr (flags, longflags[i][0])) {
+            fprintf (stderr, "%s: Invalid alias - '%s'. Valid short flags are '%s'\n", o->progname, longflags[i], flags);
+            free (o);
+            return 0;
+        }
+    }
+    for (i = 0;  longkeys && longkeys[i]; i++) {
+        /* Go on if it does not look like an alias */
+        if (strlen (longkeys[i]) < 3)
+            continue;
+        if ('='!=longkeys[i][1])
+            continue;
+        if (0==strchr (keys, longkeys[i][0])) {
+            fprintf (stderr, "%s: Invalid alias - '%s'. Valid short flags are '%s'\n", o->progname, longkeys[i], keys);
+            free (o);
+            return 0;
+        }
+    }
+
+    /* aside from counting the number of times a flag has been specified, we also abuse the */
+    /* flaglevel array to provide a pseudo-filename for the case of reading from stdin      */
+    strcpy (o->flaglevel, "<stdin>");
+
+    for (i = 128; (longflags != 0) && (longflags[i - 128] != 0); i++) {
+        if (i==192) {
+            free (o);
+            fprintf (stderr, "Too many flag style long options\n");
+            return 0;
+        }
+        o->optarg[i] = o->flaglevel;
+    }
+
+    for (i = 192;  (longkeys != 0) && (longkeys[i - 192] != 0);  i++) {
+        if (i==256) {
+            free (o);
+            fprintf (stderr, "Too many value style long options\n");
+            return 0;
+        }
+        o->optarg[i] = argv[0];
+    }
+
+    /* Now, set up the agrc/argv pairs, and interpret args */
+    o->argc = argc;
+    o->argv = argv;
+
+    /* Process all '-' and '--'-style options */
+    for (i = 1;  i < argc;  i++) {
+        int arg_group_size = (int) strlen (argv[i]);
+
+        if ('-' != argv[i][0])
+            break;
+
+        if (0==o->margv)
+            o->margv = argv + i;
+        o->margc++;
+
+        for (j = 1;  j < arg_group_size;  j++) {
+            int c =  argv[i][j];
+            char cstring[2], *crepr = cstring;
+            cstring[0] = (char) c;
+            cstring[1] = 0;
+
+
+            /* Long style flags and options (--long_opt_name, --long_opt_namr arg, --long_opt_name=arg) */
+            if (c== (int)'-') {
+                char *equals;
+                crepr = argv[i] + 2;
+
+                /* We need to manipulate a bit to support gnu style --foo=bar syntax.   */
+                /* NOTE: This will segfault for read-only (const char * style) storage, */
+                /* but since the canonical use case, int main (int argc, char **argv),  */
+                /* is non-const, we ignore this for now */
+                equals = strchr (crepr, '=');
+                if (equals)
+                    *equals = 0;
+                c = opt_ordinal (o, crepr);
+                if (0==c)
+                    return fprintf (stderr, "Invalid option \"%s\"\n", crepr), (OPTARGS *) 0;
+
+                /* inline (gnu) --foo=bar style arg */
+                if (equals) {
+                    *equals = '=';
+                    if (opt_is_flag (o, c))
+                        return fprintf (stderr, "Option \"%s\" takes no arguments\n", crepr), (OPTARGS *) 0;
+                    o->optarg[c] = equals + 1;
+                    break;
+                }
+
+                /* "outline" --foo bar style arg */
+                if (!opt_is_flag (o, c)) {
+                    if ((argc==i + 1) || ('+'==argv[i+1][0]) || ('-'==argv[i+1][0]))
+                        return fprintf (stderr, "Missing argument for option \"%s\"\n", crepr), (OPTARGS *) 0;
+                    o->optarg[c] = argv[i + 1];
+                    i++; /* eat the arg */
+                    break;
+                }
+
+                if (!opt_is_flag (o, c))
+                    return fprintf (stderr, "Expected flag style long option here, but got \"%s\"\n", crepr), (OPTARGS *) 0;
+
+                /* Flag style option, i.e. taking no arguments */
+                opt_raise_flag (o, c);
+                break;
+            }
+
+            /* classic short options */
+            if (0==o->optarg[c])
+                return fprintf (stderr, "Invalid option \"%s\"\n", crepr), (OPTARGS *) 0;
+
+            /* Flag style option, i.e. taking no arguments */
+            if (opt_is_flag (o, c)) {
+                opt_raise_flag (o, c);
+                continue;
+            }
+
+            /* options taking argumants */
+
+            /* argument separate (i.e. "-i 10") */
+            if (j + 1==arg_group_size) {
+                if ((argc==i + 1) || ('+'==argv[i+1][0]) || ('-'==argv[i+1][0]))
+                    return fprintf (stderr, "Bad or missing arg for option \"%s\"\n", crepr), (OPTARGS *) 0;
+                o->optarg[(int) c] = argv[i + 1];
+                i++;
+                break;
+            }
+
+            /* Option arg inline (i.e. "-i10") */
+            o->optarg[c] = argv[i] + j + 1;
+            break;
+        }
+    }
+
+    /* Process all '+'-style options, starting from where '-'-style processing ended */
+    o->pargv = argv + i;
+
+    /* Is free format in use, instead of plus-style? */
+    for (free_format = 0, j = 1;  j < argc;  j++) {
+        if (0==strcmp ("--", argv[j])) {
+            free_format = j;
+            break;
+        }
+    }
+
+    if (free_format) {
+        o->pargc = free_format - (o->margc + 1);
+        o->fargc = argc - (free_format + 1);
+        if (0 != o->fargc)
+            o->fargv = argv + free_format + 1;
+        return o;
+    }
+
+    for (/* empty */; i < argc; i++) {
+        if ('-' == argv[i][0]) {
+            free (o);
+            fprintf (stderr, "+ and - style options must not be mixed\n");
+            return 0;
+        }
+
+        if ('+' != argv[i][0])
+            break;
+        o->pargc++;
+    }
+
+    /* Handle input file names */
+    o->fargc = argc - i;
+    if (0!=o->fargc)
+        o->fargv = argv + i;
+
+    return o;
+
+}
diff --git a/src/p_series.c b/src/p_series.c
index 7499ab4..cddea88 100644
--- a/src/p_series.c
+++ b/src/p_series.c
@@ -4,8 +4,11 @@
 #include <string.h>
 #define NF 20 /* length of final format string */
 #define CUT 60 /* check length of line */
-	void
-p_series(Tseries *T, FILE *file, char *fmt) {
+
+/* FIXME: put the declaration in a header. Also used in gen_cheb.c */
+void p_series(Tseries *T, FILE *file, char *fmt);
+
+void p_series(Tseries *T, FILE *file, char *fmt) {
 	int i, j, n, L;
 	char format[NF+1];
 
diff --git a/src/pj_apply_gridshift.c b/src/pj_apply_gridshift.c
index d614190..a2267cb 100644
--- a/src/pj_apply_gridshift.c
+++ b/src/pj_apply_gridshift.c
@@ -2,7 +2,7 @@
  * Project:  PROJ.4
  * Purpose:  Apply datum shifts based on grid shift files (normally NAD27 to
  *           NAD83 or the reverse).  This module is responsible for keeping
- *           a list of loaded grids, and calling with each one that is 
+ *           a list of loaded grids, and calling with each one that is
  *           allowed for a given datum (expressed as the nadgrids= parameter).
  * Author:   Frank Warmerdam, warmerdam at pobox.com
  *
@@ -30,9 +30,10 @@
 
 #define PJ_LIB__
 
-#include <projects.h>
 #include <string.h>
 #include <math.h>
+#include "proj_internal.h"
+#include "projects.h"
 
 /************************************************************************/
 /*                         pj_apply_gridshift()                         */
@@ -43,7 +44,7 @@
 /*      it to honour our public api.                                    */
 /************************************************************************/
 
-int pj_apply_gridshift( projCtx ctx, const char *nadgrids, int inverse, 
+int pj_apply_gridshift( projCtx ctx, const char *nadgrids, int inverse,
                         long point_count, int point_offset,
                         double *x, double *y, double *z )
 
@@ -51,16 +52,16 @@ int pj_apply_gridshift( projCtx ctx, const char *nadgrids, int inverse,
     PJ_GRIDINFO **gridlist;
     int           grid_count;
     int           ret;
-    
+
     gridlist = pj_gridlist_from_nadgrids( ctx, nadgrids, &grid_count );
 
     if( gridlist == NULL || grid_count == 0 )
         return ctx->last_errno;
 
-    ret = pj_apply_gridshift_3( ctx, gridlist, grid_count, inverse, 
+    ret = pj_apply_gridshift_3( ctx, gridlist, grid_count, inverse,
                                 point_count, point_offset, x, y, z );
 
-    /* 
+    /*
     ** Note this frees the array of grid list pointers, but not the grids
     ** which is as intended.  The grids themselves live on.
     */
@@ -72,13 +73,13 @@ int pj_apply_gridshift( projCtx ctx, const char *nadgrids, int inverse,
 /************************************************************************/
 /*                        pj_apply_gridshift_2()                        */
 /*                                                                      */
-/*      This implmentation takes uses the gridlist from a coordinate    */
+/*      This implementation uses the gridlist from a coordinate         */
 /*      system definition.  If the gridlist has not yet been            */
 /*      populated in the coordinate system definition we set it up      */
 /*      now.                                                            */
 /************************************************************************/
 
-int pj_apply_gridshift_2( PJ *defn, int inverse, 
+int pj_apply_gridshift_2( PJ *defn, int inverse,
                           long point_count, int point_offset,
                           double *x, double *y, double *z )
 
@@ -86,10 +87,10 @@ int pj_apply_gridshift_2( PJ *defn, int inverse,
     if( defn->catalog_name != NULL )
         return pj_gc_apply_gridshift( defn, inverse, point_count, point_offset,
                                       x, y, z );
-                                      
+
     if( defn->gridlist == NULL )
     {
-        defn->gridlist = 
+        defn->gridlist =
             pj_gridlist_from_nadgrids( pj_get_ctx( defn ),
                                        pj_param(defn->ctx, defn->params,"snadgrids").s,
                                        &(defn->gridlist_count) );
@@ -97,12 +98,75 @@ int pj_apply_gridshift_2( PJ *defn, int inverse,
         if( defn->gridlist == NULL || defn->gridlist_count == 0 )
             return defn->ctx->last_errno;
     }
-     
+
     return pj_apply_gridshift_3( pj_get_ctx( defn ),
-                                 defn->gridlist, defn->gridlist_count, inverse, 
+                                 defn->gridlist, defn->gridlist_count, inverse,
                                  point_count, point_offset, x, y, z );
 }
 
+/************************************************************************/
+/*                             find_ctable()                            */
+/*                                                                      */
+/*    Determine which grid is the correct given an input coordinate.    */
+/************************************************************************/
+
+static struct CTABLE* find_ctable(projCtx ctx, LP input, int grid_count, PJ_GRIDINFO **tables) {
+    int itable;
+
+    /* keep trying till we find a table that works */
+    for( itable = 0; itable < grid_count; itable++ )
+    {
+
+        PJ_GRIDINFO *gi = tables[itable];
+        struct CTABLE *ct = gi->ct;
+        double epsilon = (fabs(ct->del.phi)+fabs(ct->del.lam))/10000.0;
+        /* skip tables that don't match our point at all.  */
+        if ( ct->ll.phi - epsilon > input.phi
+                || ct->ll.lam - epsilon > input.lam
+                || (ct->ll.phi + (ct->lim.phi-1) * ct->del.phi + epsilon < input.phi)
+                || (ct->ll.lam + (ct->lim.lam-1) * ct->del.lam + epsilon < input.lam) ) {
+            continue;
+        }
+
+        /* If we have child nodes, check to see if any of them apply. */
+        while( gi->child )
+        {
+            PJ_GRIDINFO *child;
+
+            for( child = gi->child; child != NULL; child = child->next )
+            {
+                struct CTABLE *ct1 = child->ct;
+                epsilon = (fabs(ct1->del.phi)+fabs(ct1->del.lam))/10000.0;
+
+                if( ct1->ll.phi - epsilon > input.phi
+                    || ct1->ll.lam - epsilon > input.lam
+                    || (ct1->ll.phi+(ct1->lim.phi-1)*ct1->del.phi + epsilon < input.phi)
+                    || (ct1->ll.lam+(ct1->lim.lam-1)*ct1->del.lam + epsilon < input.lam) ) {
+                    continue;
+                }
+                break;
+            }
+
+            /* 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. */
+        if( ct->cvs == NULL) {
+            if (!pj_gridinfo_load( ctx, gi ) ) {
+                pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID );
+                return NULL;
+            }
+        }
+        /* if we get this far we have found a suitable grid */
+        return ct;
+    }
+
+    return NULL;
+}
 
 /************************************************************************/
 /*                        pj_apply_gridshift_3()                        */
@@ -113,16 +177,16 @@ int pj_apply_gridshift_2( PJ *defn, int inverse,
 int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **tables, int grid_count,
                           int inverse, long point_count, int point_offset,
                           double *x, double *y, double *z )
-
 {
     int  i;
+    struct CTABLE *ct;
     static int debug_count = 0;
     (void) z;
 
     if( tables == NULL || grid_count == 0 )
     {
-        pj_ctx_set_errno( ctx, -38);
-        return -38;
+        pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID);
+        return PJD_ERR_FAILED_TO_LOAD_GRID;
     }
 
     ctx->last_errno = 0;
@@ -138,100 +202,42 @@ int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **tables, int grid_count,
         output.phi = HUGE_VAL;
         output.lam = HUGE_VAL;
 
-        /* keep trying till we find a table that works */
-        for( itable = 0; itable < grid_count; itable++ )
+        ct = find_ctable(ctx, input, grid_count, tables);
+        if( ct != NULL )
         {
-            PJ_GRIDINFO *gi = tables[itable];
-            struct CTABLE *ct = gi->ct;
-            double epsilon = (fabs(ct->del.phi)+fabs(ct->del.lam))/10000.0;
-
-            /* skip tables that don't match our point at all.  */
-            if( ct->ll.phi - epsilon > input.phi 
-                || ct->ll.lam - epsilon > input.lam
-                || (ct->ll.phi + (ct->lim.phi-1) * ct->del.phi + epsilon 
-                    < input.phi)
-                || (ct->ll.lam + (ct->lim.lam-1) * ct->del.lam + epsilon 
-                    < input.lam) )
-                continue;
-
-            /* If we have child nodes, check to see if any of them apply. */
-            while( gi->child )
-            {
-                PJ_GRIDINFO *child;
-
-                for( child = gi->child; child != NULL; child = child->next )
-                {
-                    struct CTABLE *ct1 = child->ct;
-                    double epsilon = 
-                        (fabs(ct1->del.phi)+fabs(ct1->del.lam))/10000.0;
-
-                    if( ct1->ll.phi - epsilon > input.phi 
-                        || ct1->ll.lam - epsilon > input.lam
-                        || (ct1->ll.phi+(ct1->lim.phi-1)*ct1->del.phi + epsilon 
-                            < input.phi)
-                        || (ct1->ll.lam+(ct1->lim.lam-1)*ct1->del.lam + epsilon 
-                            < input.lam) )
-                        continue;
-
-                    break;
-                }
-
-                /* 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. */
-            if( ct->cvs == NULL && !pj_gridinfo_load( ctx, gi ) )
-            {
-                pj_ctx_set_errno( ctx, -38 );
-                return -38;
-            }
-            
             output = nad_cvt( input, inverse, ct );
-            if( output.lam != HUGE_VAL )
-            {
-                if( debug_count++ < 20 )
-                    pj_log( ctx, PJ_LOG_DEBUG_MINOR,
-                            "pj_apply_gridshift(): used %s", ct->id );
-                break;
-            }
         }
 
-        if( output.lam == HUGE_VAL )
+        if ( output.lam != HUGE_VAL && debug_count++ < 20 )
+            pj_log( ctx, PJ_LOG_DEBUG_MINOR, "pj_apply_gridshift(): used %s", ct->id );
+
+        if ( output.lam == HUGE_VAL )
         {
             if( ctx->debug_level >= PJ_LOG_DEBUG_MAJOR )
             {
                 pj_log( ctx, PJ_LOG_DEBUG_MAJOR,
                     "pj_apply_gridshift(): failed to find a grid shift table for\n"
                     "                      location (%.7fdW,%.7fdN)",
-                    x[io] * RAD_TO_DEG, 
+                    x[io] * RAD_TO_DEG,
                     y[io] * RAD_TO_DEG );
                 for( itable = 0; itable < grid_count; itable++ )
                 {
                     PJ_GRIDINFO *gi = tables[itable];
                     if( itable == 0 )
-                        pj_log( ctx, PJ_LOG_DEBUG_MAJOR,
-                                "   tried: %s", gi->gridname );
+                        pj_log( ctx, PJ_LOG_DEBUG_MAJOR, "   tried: %s", gi->gridname );
                     else
-                        pj_log( ctx, PJ_LOG_DEBUG_MAJOR,
-                                ",%s", gi->gridname );
+                        pj_log( ctx, PJ_LOG_DEBUG_MAJOR, ",%s", gi->gridname );
                 }
             }
 
-            /* 
-             * We don't actually have any machinery currently to set the 
-             * following macro, so this is mostly kept here to make it clear 
-             * how we ought to operate if we wanted to make it super clear 
-             * that an error has occured when points are outside our available
-             * datum shift areas.  But if this is on, we will find that "low 
-             * value" points on the fringes of some datasets will completely 
-             * fail causing lots of problems when it is more or less ok to 
+            /*
+             * We don't actually have any machinery currently to set the
+             * following macro, so this is mostly kept here to make it clear
+             * how we ought to operate if we wanted to make it super clear
+             * that an error has occurred when points are outside our available
+             * datum shift areas.  But if this is on, we will find that "low
+             * value" points on the fringes of some datasets will completely
+             * fail causing lots of problems when it is more or less ok to
              * just not apply a datum shift.  So rather than deal with
              * that we just fallback to no shift. (see also bug #45).
              */
@@ -252,3 +258,92 @@ int pj_apply_gridshift_3( projCtx ctx, PJ_GRIDINFO **tables, int grid_count,
     return 0;
 }
 
+/**********************************************/
+int proj_hgrid_init(PJ* P, const char *grids) {
+/**********************************************
+
+  Initizalize and populate list of horizontal
+  grids.
+
+    Takes a PJ-object and the plus-parameter
+    name that is used in the proj-string to
+    specify the grids to load, e.g. "+grids".
+    The + should be left out here.
+
+    Returns the number of loaded grids.
+
+***********************************************/
+
+    /* prepend "s" to the "grids" string to allow usage with pj_param */
+    char *sgrids = (char *) pj_malloc( (strlen(grids)+1+1) *sizeof(char) );
+    sprintf(sgrids, "%s%s", "s", grids);
+
+    if (P->gridlist == NULL) {
+        P->gridlist = pj_gridlist_from_nadgrids(
+            P->ctx,
+            pj_param(P->ctx, P->params, sgrids).s,
+            &(P->gridlist_count)
+        );
+
+        if( P->gridlist == NULL || P->gridlist_count == 0 ) {
+            pj_dealloc(sgrids);
+            return 0;
+        }
+    }
+
+    if (P->gridlist_count == 0) {
+        proj_errno_set(P, PJD_ERR_FAILED_TO_LOAD_GRID);
+    }
+
+    pj_dealloc(sgrids);
+    return P->gridlist_count;
+}
+
+/********************************************/
+/*           proj_hgrid_value()             */
+/*                                          */
+/*    Return coordinate offset in grid      */
+/********************************************/
+LP proj_hgrid_value(PJ *P, LP lp) {
+    struct CTABLE *ct;
+    LP out;
+
+    ct = find_ctable(P->ctx, lp, P->gridlist_count, P->gridlist);
+
+    /* normalize input to ll origin */
+    lp.lam -= ct->ll.lam;
+    lp.phi -= ct->ll.phi;
+    lp.lam = adjlon(lp.lam - M_PI) + M_PI;
+
+    out = nad_intr(lp, ct);
+
+    if (out.lam == HUGE_VAL || out.phi == HUGE_VAL) {
+        pj_ctx_set_errno(P->ctx, PJD_ERR_GRID_AREA);
+    }
+
+    return out;
+}
+
+LP proj_hgrid_apply(PJ *P, LP lp, PJ_DIRECTION direction) {
+    struct CTABLE *ct;
+    int inverse;
+    LP out;
+
+    out.lam = HUGE_VAL; out.phi = HUGE_VAL;
+
+    ct = find_ctable(P->ctx, lp, P->gridlist_count, P->gridlist);
+
+    if (ct == NULL || ct->cvs == NULL) {
+        pj_ctx_set_errno( P->ctx, PJD_ERR_FAILED_TO_LOAD_GRID );
+        return out;
+    }
+
+    inverse = direction == PJ_FWD ? 0 : 1;
+    out = nad_cvt(lp, inverse, ct);
+
+    if (out.lam == HUGE_VAL || out.phi == HUGE_VAL)
+        pj_ctx_set_errno(P->ctx, PJD_ERR_FAILED_TO_LOAD_GRID);
+
+    return out;
+
+}
diff --git a/src/pj_apply_vgridshift.c b/src/pj_apply_vgridshift.c
index 297211c..6435b95 100644
--- a/src/pj_apply_vgridshift.c
+++ b/src/pj_apply_vgridshift.c
@@ -28,23 +28,120 @@
 
 #define PJ_LIB__
 
-#include <projects.h>
 #include <string.h>
 #include <math.h>
+#include "proj_internal.h"
+#include "projects.h"
+
+static double pj_read_vgrid_value( PJ *defn, LP input, int *gridlist_count_p, PJ_GRIDINFO **tables, struct CTABLE *ct) {
+    int  itable = 0;
+    double value = HUGE_VAL;
+    double grid_x, grid_y;
+    int    grid_ix, grid_iy;
+    int    grid_ix2, grid_iy2;
+    float  *cvs;
+    /* do not deal with NaN coordinates */
+    if( input.phi != input.phi || input.lam != input.lam )
+        itable = *gridlist_count_p;
+
+    /* keep trying till we find a table that works */
+    for ( ; itable < *gridlist_count_p; itable++ )
+    {
+        PJ_GRIDINFO *gi = tables[itable];
+
+        ct = gi->ct;
+
+        /* skip tables that don't match our point at all.  */
+        if( ct->ll.phi > input.phi || ct->ll.lam > input.lam
+            || ct->ll.phi + (ct->lim.phi-1) * ct->del.phi < input.phi
+            || ct->ll.lam + (ct->lim.lam-1) * ct->del.lam < input.lam )
+            continue;
+
+        /* If we have child nodes, check to see if any of them apply. */
+        while( gi->child != NULL )
+        {
+            PJ_GRIDINFO *child;
+
+            for( child = gi->child; child != NULL; child = child->next )
+            {
+                struct CTABLE *ct1 = child->ct;
+
+                if( ct1->ll.phi > input.phi || ct1->ll.lam > input.lam
+                  || ct1->ll.phi+(ct1->lim.phi-1)*ct1->del.phi < input.phi
+                  || ct1->ll.lam+(ct1->lim.lam-1)*ct1->del.lam < input.lam)
+                    continue;
+
+                break;
+            }
+
+            /* we didn't find a more refined child node to use, so go with current grid */
+            if( child == NULL )
+            {
+                break;
+            }
+
+            /* Otherwise let's try for childrens children .. */
+            gi = child;
+            ct = child->ct;
+        }
+
+        /* load the grid shift info if we don't have it. */
+        if( ct->cvs == NULL && !pj_gridinfo_load( pj_get_ctx(defn), gi ) )
+        {
+            pj_ctx_set_errno( defn->ctx, PJD_ERR_FAILED_TO_LOAD_GRID );
+            return PJD_ERR_FAILED_TO_LOAD_GRID;
+        }
+
+
+        /* Interpolation a location within the grid */
+        grid_x = (input.lam - ct->ll.lam) / ct->del.lam;
+        grid_y = (input.phi - ct->ll.phi) / ct->del.phi;
+        grid_ix = (int) floor(grid_x);
+        grid_iy = (int) floor(grid_y);
+        grid_x -= grid_ix;
+        grid_y -= grid_iy;
+
+        grid_ix2 = grid_ix + 1;
+        if( grid_ix2 >= ct->lim.lam )
+            grid_ix2 = ct->lim.lam - 1;
+        grid_iy2 = grid_iy + 1;
+        if( grid_iy2 >= ct->lim.phi )
+            grid_iy2 = ct->lim.phi - 1;
+
+        cvs = (float *) ct->cvs;
+        value = cvs[grid_ix + grid_iy * ct->lim.lam]
+            * (1.0-grid_x) * (1.0-grid_y)
+            + cvs[grid_ix2 + grid_iy * ct->lim.lam]
+            * (grid_x) * (1.0-grid_y)
+            + cvs[grid_ix + grid_iy2 * ct->lim.lam]
+            * (1.0-grid_x) * (grid_y)
+            + cvs[grid_ix2 + grid_iy2 * ct->lim.lam]
+            * (grid_x) * (grid_y);
+
+    }
+    /* nodata?  */
+    /* GTX official nodata value if  -88.88880f, but some grids also */
+    /* use other  big values for nodata (e.g naptrans2008.gtx has */
+    /* nodata values like -2147479936), so test them too */
+    if( value > 1000 || value < -1000 || value == -88.88880f )
+        value = HUGE_VAL;
+
+
+    return value;
+}
 
 /************************************************************************/
 /*                        pj_apply_vgridshift()                         */
 /*                                                                      */
-/*      This implmentation takes uses the gridlist from a coordinate    */
+/*      This implementation takes uses the gridlist from a coordinate   */
 /*      system definition.  If the gridlist has not yet been            */
 /*      populated in the coordinate system definition we set it up      */
 /*      now.                                                            */
 /************************************************************************/
-
 int pj_apply_vgridshift( PJ *defn, const char *listname,
-                         PJ_GRIDINFO ***gridlist_p, 
+                         PJ_GRIDINFO ***gridlist_p,
                          int *gridlist_count_p,
-                         int inverse, 
+                         int inverse,
                          long point_count, int point_offset,
                          double *x, double *y, double *z )
 
@@ -52,22 +149,23 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
     int  i;
     static int debug_count = 0;
     PJ_GRIDINFO **tables;
+    struct CTABLE ct;
 
     if( *gridlist_p == NULL )
     {
-        *gridlist_p = 
-            pj_gridlist_from_nadgrids( pj_get_ctx(defn), 
+        *gridlist_p =
+            pj_gridlist_from_nadgrids( pj_get_ctx(defn),
                                        pj_param(defn->ctx,defn->params,listname).s,
                                        gridlist_count_p );
 
         if( *gridlist_p == NULL || *gridlist_count_p == 0 )
             return defn->ctx->last_errno;
     }
-     
+
     if( *gridlist_count_p == 0 )
     {
-        pj_ctx_set_errno( defn->ctx, -38);
-        return -38;
+        pj_ctx_set_errno( defn->ctx, PJD_ERR_FAILED_TO_LOAD_GRID);
+        return PJD_ERR_FAILED_TO_LOAD_GRID;
     }
 
     tables = *gridlist_p;
@@ -75,115 +173,37 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
 
     for( i = 0; i < point_count; i++ )
     {
+        double value;
         long io = i * point_offset;
         LP   input;
-        int  itable;
-        double value = HUGE_VAL;
 
         input.phi = y[io];
         input.lam = x[io];
 
-        /* keep trying till we find a table that works */
-        for( itable = 0; itable < *gridlist_count_p; itable++ )
-        {
-            PJ_GRIDINFO *gi = tables[itable];
-            struct CTABLE *ct = gi->ct;
-            double grid_x, grid_y;
-            int    grid_ix, grid_iy;
-            float  *cvs;
-
-            /* skip tables that don't match our point at all.  */
-            if( ct->ll.phi > input.phi || ct->ll.lam > input.lam
-                || ct->ll.phi + (ct->lim.phi-1) * ct->del.phi < input.phi
-                || ct->ll.lam + (ct->lim.lam-1) * ct->del.lam < input.lam )
-                continue;
-
-            /* If we have child nodes, check to see if any of them apply. */
-            while( gi->child != NULL )
-            {
-                PJ_GRIDINFO *child;
-
-                for( child = gi->child; child != NULL; child = child->next )
-                {
-                    struct CTABLE *ct1 = child->ct;
-
-                    if( ct1->ll.phi > input.phi || ct1->ll.lam > input.lam
-                      || ct1->ll.phi+(ct1->lim.phi-1)*ct1->del.phi < input.phi
-                      || ct1->ll.lam+(ct1->lim.lam-1)*ct1->del.lam < input.lam)
-                        continue;
+        value = pj_read_vgrid_value(defn, input, gridlist_count_p, tables, &ct);
 
-                    break;
-                }
-
-                /* we didn't find a more refined child node to use, so go with current grid */
-                if( child == NULL )
-                {
-                    break;
-                }
-
-                /* Otherwise let's try for childrens children .. */
-                gi = child;
-                ct = child->ct;
-            }
-
-            /* load the grid shift info if we don't have it. */
-            if( ct->cvs == NULL && !pj_gridinfo_load( pj_get_ctx(defn), gi ) )
-            {
-                pj_ctx_set_errno( defn->ctx, -38 );
-                return -38;
-            }
-
-            /* Interpolation a location within the grid */
-            grid_x = (input.lam - ct->ll.lam) / ct->del.lam;
-            grid_y = (input.phi - ct->ll.phi) / ct->del.phi;
-            grid_ix = (int) floor(grid_x);
-            grid_iy = (int) floor(grid_y);
-            grid_x -= grid_ix;
-            grid_y -= grid_iy;
-
-            cvs = (float *) ct->cvs;
-            value = cvs[grid_ix + grid_iy * ct->lim.lam] 
-                * (1.0-grid_x) * (1.0-grid_y)
-                + cvs[grid_ix + 1 + grid_iy * ct->lim.lam] 
-                * (grid_x) * (1.0-grid_y)
-                + cvs[grid_ix + (grid_iy+1) * ct->lim.lam] 
-                * (1.0-grid_x) * (grid_y)
-                + cvs[grid_ix + 1 + (grid_iy+1) * ct->lim.lam] 
-                * (grid_x) * (grid_y);
-
-            /* nodata?  */
-            /* GTX official nodata value if  -88.88880f, but some grids also */
-            /* use other  big values for nodata (e.g naptrans2008.gtx has */
-            /* nodata values like -2147479936), so test them too */
-            if( value > 1000 || value < -1000 || value == -88.88880f )
-                value = HUGE_VAL;
-            else
-            {
-                if( inverse )
-                    z[io] -= value;
-                else
-                    z[io] += value;
-            }
-                
-            if( value != HUGE_VAL )
-            {
-                if( debug_count++ < 20 )
-                    pj_log( defn->ctx, PJ_LOG_DEBUG_MINOR, 
-                            "pj_apply_gridshift(): used %s",
-                            ct->id );
+        if( inverse )
+            z[io] -= value;
+        else
+            z[io] += value;
+        if( value != HUGE_VAL )
+        {
+            if( debug_count++ < 20 ) {
+                proj_log_trace(defn, "pj_apply_gridshift(): used %s", ct.id);
                 break;
             }
         }
 
         if( value == HUGE_VAL )
         {
+            int itable;
             char gridlist[3000];
 
-            pj_log( defn->ctx, PJ_LOG_DEBUG_MAJOR,
-                    "pj_apply_vgridshift(): failed to find a grid shift table for\n"
-                    "                       location (%.7fdW,%.7fdN)",
-                    x[io] * RAD_TO_DEG, 
-                    y[io] * RAD_TO_DEG );
+            proj_log_debug(defn,
+                "pj_apply_vgridshift(): failed to find a grid shift table for\n"
+                "                       location (%.7fdW,%.7fdN)",
+                x[io] * RAD_TO_DEG,
+                y[io] * RAD_TO_DEG );
 
             gridlist[0] = '\0';
             for( itable = 0; itable < *gridlist_count_p; itable++ )
@@ -200,10 +220,10 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
                 else
                     sprintf( gridlist+strlen(gridlist), ",%s", gi->gridname );
             }
-            pj_log( defn->ctx, PJ_LOG_DEBUG_MAJOR,
-                    "%s", gridlist );
-                
+
+            proj_log_debug(defn, "%s", gridlist);
             pj_ctx_set_errno( defn->ctx, PJD_ERR_GRID_AREA );
+
             return PJD_ERR_GRID_AREA;
         }
     }
@@ -211,3 +231,64 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
     return 0;
 }
 
+/**********************************************/
+int proj_vgrid_init(PJ* P, const char *grids) {
+/**********************************************
+
+  Initizalize and populate gridlist.
+
+    Takes a PJ-object and the plus-parameter
+    name that is used in the proj-string to
+    specify the grids to load, e.g. "+grids".
+    The + should be left out here.
+
+    Returns the number of loaded grids.
+
+***********************************************/
+
+    /* prepend "s" to the "grids" string to allow usage with pj_param */
+    char *sgrids = (char *) pj_malloc( (strlen(grids)+1+1) *sizeof(char) );
+    sprintf(sgrids, "%s%s", "s", grids);
+
+    if (P->vgridlist_geoid == NULL) {
+        P->vgridlist_geoid = pj_gridlist_from_nadgrids(
+            P->ctx,
+            pj_param(P->ctx, P->params, sgrids).s,
+            &(P->vgridlist_geoid_count)
+        );
+
+        if( P->vgridlist_geoid == NULL || P->vgridlist_geoid_count == 0 ) {
+            pj_dealloc(sgrids);
+            return 0;
+        }
+    }
+
+    if (P->vgridlist_geoid_count == 0) {
+        proj_errno_set(P, PJD_ERR_FAILED_TO_LOAD_GRID);
+    }
+
+    pj_dealloc(sgrids);
+    return P->vgridlist_geoid_count;
+}
+
+/***********************************************/
+double proj_vgrid_value(PJ *P, LP lp){
+/***********************************************
+
+  Read grid value at position lp in grids loaded
+  with proj_grid_init.
+
+  Returns the grid value of the given coordinate.
+
+************************************************/
+
+    struct CTABLE used_grid;
+    double value;
+    memset(&used_grid, 0, sizeof(struct CTABLE));
+
+    value = pj_read_vgrid_value(P, lp, &(P->vgridlist_geoid_count), P->vgridlist_geoid, &used_grid);
+    proj_log_trace(P, "proj_vgrid_value: (%f, %f) = %f", lp.lam*RAD_TO_DEG, lp.phi*RAD_TO_DEG, value);
+
+    return value;
+}
+
diff --git a/src/pj_ctx.c b/src/pj_ctx.c
index 43d1225..fc52f30 100644
--- a/src/pj_ctx.c
+++ b/src/pj_ctx.c
@@ -27,6 +27,7 @@
 
 #include <projects.h>
 #include <string.h>
+#include <errno.h>
 
 static projCtx_t default_context;
 static volatile int       default_context_initialized = 0;
@@ -38,6 +39,10 @@ static volatile int       default_context_initialized = 0;
 projCtx pj_get_ctx( projPJ pj )
 
 {
+    if (0==pj)
+        return pj_get_default_ctx ();
+    if (0==pj->ctx)
+        return pj_get_default_ctx ();
     return pj->ctx;
 }
 
@@ -50,6 +55,8 @@ projCtx pj_get_ctx( projPJ pj )
 void pj_set_ctx( projPJ pj, projCtx ctx )
 
 {
+    if (pj==0)
+        return;
     pj->ctx = ctx;
 }
 
@@ -60,8 +67,13 @@ void pj_set_ctx( projPJ pj, projCtx ctx )
 projCtx pj_get_default_ctx()
 
 {
+    /* If already initialized, don't bother locking */
+    if( default_context_initialized )
+        return &default_context;
+
     pj_acquire_lock();
 
+    /* Ask again, since it may have been initialized in another thread */
     if( !default_context_initialized )
     {
         default_context.last_errno = 0;
@@ -72,7 +84,7 @@ projCtx pj_get_default_ctx()
 
         if( getenv("PROJ_DEBUG") != NULL )
         {
-            if( atoi(getenv("PROJ_DEBUG")) > 0 )
+            if( atoi(getenv("PROJ_DEBUG")) >= -PJ_LOG_DEBUG_MINOR )
                 default_context.debug_level = atoi(getenv("PROJ_DEBUG"));
             else
                 default_context.debug_level = PJ_LOG_DEBUG_MINOR;
@@ -93,6 +105,8 @@ projCtx pj_ctx_alloc()
 
 {
     projCtx ctx = (projCtx_t *) malloc(sizeof(projCtx_t));
+    if (0==ctx)
+        return 0;
     memcpy( ctx, pj_get_default_ctx(), sizeof(projCtx_t) );
     ctx->last_errno = 0;
 
@@ -106,7 +120,7 @@ projCtx pj_ctx_alloc()
 void pj_ctx_free( projCtx ctx )
 
 {
-    free( ctx );
+    pj_dealloc( ctx );
 }
 
 /************************************************************************/
@@ -116,21 +130,25 @@ void pj_ctx_free( projCtx ctx )
 int pj_ctx_get_errno( projCtx ctx )
 
 {
+    if (0==ctx)
+        return pj_get_default_ctx ()->last_errno;
     return ctx->last_errno;
 }
 
 /************************************************************************/
 /*                          pj_ctx_set_errno()                          */
 /*                                                                      */
-/*      Also sets the global errno.                                     */
+/*                      Also sets the global errno                      */
 /************************************************************************/
 
 void pj_ctx_set_errno( projCtx ctx, int new_errno )
 
 {
     ctx->last_errno = new_errno;
-    if( new_errno != 0 )
-        pj_errno = new_errno;
+    if( new_errno == 0 )
+        return;
+    errno = new_errno;
+    pj_errno = new_errno;
 }
 
 /************************************************************************/
@@ -140,6 +158,8 @@ void pj_ctx_set_errno( projCtx ctx, int new_errno )
 void pj_ctx_set_debug( projCtx ctx, int new_debug )
 
 {
+    if (0==ctx)
+        return;
     ctx->debug_level = new_debug;
 }
 
@@ -150,6 +170,8 @@ void pj_ctx_set_debug( projCtx ctx, int new_debug )
 void pj_ctx_set_logger( projCtx ctx, void (*new_logger)(void*,int,const char*) )
 
 {
+    if (0==ctx)
+        return;
     ctx->logger = new_logger;
 }
 
@@ -160,6 +182,8 @@ void pj_ctx_set_logger( projCtx ctx, void (*new_logger)(void*,int,const char*) )
 void pj_ctx_set_app_data( projCtx ctx, void *new_app_data )
 
 {
+    if (0==ctx)
+        return;
     ctx->app_data = new_app_data;
 }
 
@@ -170,6 +194,8 @@ void pj_ctx_set_app_data( projCtx ctx, void *new_app_data )
 void *pj_ctx_get_app_data( projCtx ctx )
 
 {
+    if (0==ctx)
+        return 0;
     return ctx->app_data;
 }
 
@@ -180,6 +206,8 @@ void *pj_ctx_get_app_data( projCtx ctx )
 void pj_ctx_set_fileapi( projCtx ctx, projFileAPI *fileapi )
 
 {
+    if (0==ctx)
+        return;
     ctx->fileapi = fileapi;
 }
 
@@ -190,7 +218,7 @@ void pj_ctx_set_fileapi( projCtx ctx, projFileAPI *fileapi )
 projFileAPI *pj_ctx_get_fileapi( projCtx ctx )
 
 {
+    if (0==ctx)
+        return 0;
     return ctx->fileapi;
 }
-
-
diff --git a/src/pj_datum_set.c b/src/pj_datum_set.c
index 194bfe5..c2fb160 100644
--- a/src/pj_datum_set.c
+++ b/src/pj_datum_set.c
@@ -25,6 +25,7 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
+#include <errno.h>
 #include <projects.h>
 #include <string.h>
 
@@ -71,7 +72,10 @@ int pj_datum_set(projCtx ctx, paralist *pl, PJ *projdef)
             char	entry[100];
             
             strcpy( entry, "ellps=" );
-            strncat( entry, pj_datums[i].ellipse_id, 80 );
+            strncpy( entry + strlen(entry), pj_datums[i].ellipse_id,
+                     sizeof(entry) - 1 - strlen(entry) );
+            entry[ sizeof(entry) - 1 ] = '\0';
+
             curr = curr->next = pj_mkparam(entry);
         }
         
@@ -98,7 +102,11 @@ int pj_datum_set(projCtx ctx, paralist *pl, PJ *projdef)
         const char *date;
 
         projdef->datum_type = PJD_GRIDSHIFT;
-        projdef->catalog_name = strdup(catalog);
+        projdef->catalog_name = pj_strdup(catalog);
+        if (!projdef->catalog_name) {
+            pj_ctx_set_errno(ctx, ENOMEM);
+            return 1;
+        }
 
         date = pj_param(ctx, pl, "sdate").s;
         if( date != NULL) 
diff --git a/src/pj_datums.c b/src/pj_datums.c
index c9655cd..48c77c6 100644
--- a/src/pj_datums.c
+++ b/src/pj_datums.c
@@ -25,17 +25,18 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
-#define PJ_DATUMS__
+#include "proj.h"
 
+#define PJ_DATUMS__
 #include <projects.h>
 
-/* 
+/*
  * The ellipse code must match one from pj_ellps.c.  The datum id should
- * be kept to 12 characters or less if possible.  Use the official OGC 
- * datum name for the comments if available. 
+ * be kept to 12 characters or less if possible.  Use the official OGC
+ * datum name for the comments if available.
  */
 
-C_NAMESPACE_VAR struct PJ_DATUMS pj_datums[] = {
+C_NAMESPACE_VAR const struct PJ_DATUMS pj_datums[] = {
 /* id       definition                               ellipse  comments */
 /* --       ----------                               -------  -------- */
 {"WGS84",   "towgs84=0,0,0",                         "WGS84", ""},
@@ -65,12 +66,11 @@ C_NAMESPACE_VAR struct PJ_DATUMS pj_datums[] = {
 };
 
 struct PJ_DATUMS *pj_get_datums_ref()
-
 {
-    return pj_datums;
+    return (struct PJ_DATUMS *)pj_datums;
 }
 
-C_NAMESPACE_VAR struct PJ_PRIME_MERIDIANS pj_prime_meridians[] = {
+C_NAMESPACE_VAR const struct PJ_PRIME_MERIDIANS pj_prime_meridians[] = {
     /* id        definition                         */
     /* --        ----------                         */
     {"greenwich", "0dE"},
@@ -86,12 +86,16 @@ C_NAMESPACE_VAR struct PJ_PRIME_MERIDIANS pj_prime_meridians[] = {
     {"stockholm", "18d3'29.8\"E"},
     {"athens",    "23d42'58.815\"E"},
     {"oslo",      "10d43'22.5\"E"},
+    {"copenhagen","12d34'40.35\"E"},
     {NULL,        NULL}
 };
 
 struct PJ_PRIME_MERIDIANS *pj_get_prime_meridians_ref()
+{
+    return (struct PJ_PRIME_MERIDIANS *)pj_prime_meridians;
+}
 
+const PJ_PRIME_MERIDIANS *proj_list_prime_meridians(void)
 {
     return pj_prime_meridians;
 }
-
diff --git a/src/pj_deriv.c b/src/pj_deriv.c
index 2f88647..7c1fcde 100644
--- a/src/pj_deriv.c
+++ b/src/pj_deriv.c
@@ -1,33 +1,67 @@
 /* dervative of (*P->fwd) projection */
 #define PJ_LIB__
 #include "projects.h"
-	int
-pj_deriv(LP lp, double h, PJ *P, struct DERIVS *der) {
-	XY t;
-
-	lp.lam += h;
-	lp.phi += h;
-	if (fabs(lp.phi) > M_HALFPI) return 1;
-	h += h;
-	t = (*P->fwd)(lp, P);
-	if (t.x == HUGE_VAL) return 1;
-	der->x_l = t.x; der->y_p = t.y; der->x_p = -t.x; der->y_l = -t.y;
-	lp.phi -= h;
-	if (fabs(lp.phi) > M_HALFPI) return 1;
-	t = (*P->fwd)(lp, P);
-	if (t.x == HUGE_VAL) return 1;
-	der->x_l += t.x; der->y_p -= t.y; der->x_p += t.x; der->y_l -= t.y;
-	lp.lam -= h;
-	t = (*P->fwd)(lp, P);
-	if (t.x == HUGE_VAL) return 1;
-	der->x_l -= t.x; der->y_p -= t.y; der->x_p += t.x; der->y_l += t.y;
-	lp.phi += h;
-	t = (*P->fwd)(lp, P);
-	if (t.x == HUGE_VAL) return 1;
-	der->x_l -= t.x; der->y_p += t.y; der->x_p -= t.x; der->y_l += t.y;
-	der->x_l /= (h += h);
-	der->y_p /= h;
-	der->x_p /= h;
-	der->y_l /= h;
-	return 0;
+
+int pj_deriv(LP lp, double h, const PJ *P, struct DERIVS *der) {
+    XY t;
+    /* get rid of constness until we can do it for real */
+    PJ *Q = (PJ *) P;
+    if (0==Q->fwd)
+        return 1;
+
+    lp.lam += h;
+    lp.phi += h;
+    if (fabs(lp.phi) > M_HALFPI)
+        return 1;
+
+    h += h;
+    t = (*Q->fwd)(lp, Q);
+    if (t.x == HUGE_VAL)
+        return 1;
+
+    der->x_l = t.x;
+    der->y_p = t.y;
+    der->x_p = t.x;
+    der->y_l = t.y;
+
+    lp.phi -= h;
+    if (fabs(lp.phi) > M_HALFPI)
+        return 1;
+
+    t = (*Q->fwd)(lp, Q);
+    if (t.x == HUGE_VAL)
+        return 1;
+
+    der->x_l += t.x;
+    der->y_p -= t.y;
+    der->x_p -= t.x;
+    der->y_l += t.y;
+
+    lp.lam -= h;
+    t = (*Q->fwd)(lp, Q);
+    if (t.x == HUGE_VAL)
+        return 1;
+
+    der->x_l -= t.x;
+    der->y_p -= t.y;
+    der->x_p -= t.x;
+    der->y_l -= t.y;
+
+    lp.phi += h;
+    t = (*Q->fwd)(lp, Q);
+    if (t.x == HUGE_VAL)
+        return 1;
+
+    der->x_l -= t.x;
+    der->y_p += t.y;
+    der->x_p += t.x;
+    der->y_l -= t.y;
+
+    h += h;
+    der->x_l /= h;
+    der->y_p /= h;
+    der->x_p /= h;
+    der->y_l /= h;
+
+    return 0;
 }
diff --git a/src/pj_ell_set.c b/src/pj_ell_set.c
index 7ca88ed..ab2fa81 100644
--- a/src/pj_ell_set.c
+++ b/src/pj_ell_set.c
@@ -1,104 +1,714 @@
 /* set ellipsoid parameters a and es */
-#include <projects.h>
 #include <string.h>
-#define SIXTH .1666666666666666667 /* 1/6 */
-#define RA4 .04722222222222222222 /* 17/360 */
-#define RA6 .02215608465608465608 /* 67/3024 */
-#define RV4 .06944444444444444444 /* 5/72 */
-#define RV6 .04243827160493827160 /* 55/1296 */
-	int /* initialize geographic shape parameters */
-pj_ell_set(projCtx ctx, paralist *pl, double *a, double *es) {
-	int i;
-	double b=0.0, e;
-	char *name;
-	paralist *start = 0;
-
-        /* clear any previous error */
-        pj_ctx_set_errno(ctx,0);
-
-        /* check for varying forms of ellipsoid input */
-	*a = *es = 0.;
-	/* R takes precedence */
-	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 */
+#include <errno.h>
+#include <proj.h>
+#include "proj_internal.h"
+#include "projects.h"
+
+
+/* Prototypes of the pj_ellipsoid helper functions */
+static int ellps_ellps (PJ *P);
+static int ellps_size (PJ *P);
+static int ellps_shape (PJ *P);
+static int ellps_spherification (PJ *P);
+
+static paralist *pj_get_param (paralist *list, char *key);
+static char     *pj_param_value (paralist *list);
+static const PJ_ELLPS *pj_find_ellps (char *name);
+
+
+/***************************************************************************************/
+int pj_ellipsoid (PJ *P) {
+/****************************************************************************************
+    This is a replacement for the clasic PROJ pj_ell_set function. The main difference
+    is that pj_ellipsoid augments the PJ object with a copy of the exact tags used to
+    define its related ellipsoid.
+
+    This makes it possible to let a new PJ object inherit the geometrical properties
+    of an existing one.
+
+    A complete ellipsoid definition comprises a size (primary) and a shape (secondary)
+    parameter.
+
+    Size parameters supported are:
+        R, defining the radius of a spherical planet
+        a, defining the semimajor axis of an ellipsoidal planet
+
+    Shape parameters supported are:
+        rf, the reverse flattening of the ellipsoid
+        f,  the flattening of the ellipsoid
+        es, the eccentricity squared
+        e,  the eccentricity
+        b,  the semiminor axis
+
+    The ellps=xxx parameter provides both size and shape for a number of built in
+    ellipsoid definitions.
+
+    The ellipsoid definition may be augmented with a spherification flag, turning
+    the ellipsoid into a sphere with features defined by the ellipsoid.
+
+    Spherification parameters supported are:
+        R_A, which gives a sphere with the same surface area as the ellipsoid
+        R_A, which gives a sphere with the same volume as the ellipsoid
+
+        R_a, which gives a sphere with R = (a + b)/2   (arithmetic mean)
+        R_g, which gives a sphere with R = sqrt(a*b)   (geometric mean)
+        R_h, which gives a sphere with R = 2*a*b/(a+b) (harmonic mean)
+
+        R_lat_a=phi, which gives a sphere with R being the arithmetic mean of
+             of the corresponding ellipsoid at latitude phi.
+        R_lat_g=phi, which gives a sphere with R being the geometric mean of
+             of the corresponding ellipsoid at latitude phi.
+
+    If R is given as size parameter, any shape and spherification parameters
+    given are ignored.
+
+    If size and shape are given as ellps=xxx, later shape and size parameters
+    are are taken into account as modifiers for the built in ellipsoid definition.
+
+    While this may seem strange, it is in accordance with historical PROJ
+    behaviour. It can e.g. be used to define coordinates on the ellipsoid
+    scaled to unit semimajor axis by specifying "+ellps=xxx +a=1"
+
+****************************************************************************************/
+    int err = proj_errno_reset (P);
+    char *empty = {""};
+
+    P->def_size = P->def_shape = P->def_spherification = P->def_ellps = 0;
+
+    /* Specifying R overrules everything */
+    if (pj_get_param (P->params, "R")) {
+        ellps_size (P);
+        pj_calc_ellipsoid_params (P, P->a, 0);
+        if (proj_errno (P))
+            return 1;
+        return proj_errno_restore (P, err);
+    }
+
+
+    /* If an ellps argument is specified, start by using that */
+    if (0 != ellps_ellps (P))
+        return 1;
+
+    /* We may overwrite the size */
+    if (0 != ellps_size (P))
+        return 2;
+
+    /* We may also overwrite the shape */
+    if (0 != ellps_shape (P))
+        return 3;
+
+    /* When we're done with it, we compute all related ellipsoid parameters */
+    pj_calc_ellipsoid_params (P, P->a, P->es);
+
+    /* And finally, we may turn it into a sphere */
+    if (0 != ellps_spherification (P))
+        return 4;
+
+    proj_log_debug (P, "pj_ellipsoid - final: a=%.3f f=1/%7.3f, errno=%d",
+                        P->a,  P->f!=0? 1/P->f: 0,  proj_errno (P));
+    proj_log_debug (P, "pj_ellipsoid - final: %s %s %s %s",
+                        P->def_size?           P->def_size: empty,
+                        P->def_shape?          P->def_shape: empty,
+                        P->def_spherification? P->def_spherification: empty,
+                        P->def_ellps?          P->def_ellps: empty            );
+
+    if (proj_errno (P))
+        return 5;
+
+    /* success */
+    return proj_errno_restore (P, err);
+}
+
+
+/***************************************************************************************/
+static int ellps_ellps (PJ *P) {
+/***************************************************************************************/
+    PJ B;
+    const PJ_ELLPS *ellps;
+    paralist *par = 0;
+    char *name;
+    int err;
+
+    /* Sail home if ellps=xxx is not specified */
+    par = pj_get_param (P->params, "ellps");
+    if (0==par)
+        return 0;
+
+    /* Otherwise produce a fake PJ to make ellps_size/ellps_shape do the hard work for us */
+
+    /* First move B into P's context to get error messages onto the right channel */
+    B.ctx = P->ctx;
+
+    /* Then look up the right size and shape parameters from the builtin list */
+    if (strlen (par->param) < 7)
+        return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+    name = par->param + 6;
+    ellps = pj_find_ellps (name);
+    if (0==ellps)
+        return proj_errno_set (P, PJD_ERR_UNKNOWN_ELLP_PARAM);
+
+    /* Now, get things ready for ellps_size/ellps_shape, make them do their thing, and clean up */
+    err = proj_errno_reset (P);
+    B = *P;
+    pj_erase_ellipsoid_def (&B);
+    B.params = pj_mkparam (ellps->major);
+    B.params->next = pj_mkparam (ellps->ell);
+
+    ellps_size (&B);
+    ellps_shape (&B);
+
+    pj_dealloc (B.params->next);
+    pj_dealloc (B.params);
+    if (proj_errno (&B))
+        return proj_errno (&B);
+
+    /* Finally update P and sail home */
+    pj_inherit_ellipsoid_def (&B, P);
+    P->def_ellps = par->param;
+    par->used = 1;
+
+    return proj_errno_restore (P, err);
+}
+
+
+/***************************************************************************************/
+static int ellps_size (PJ *P) {
+/***************************************************************************************/
+    paralist *par = 0;
+    int a_was_set = 0;
+
+    /* A size parameter *must* be given, but may have been given as ellps prior */
+    if (P->a != 0)
+        a_was_set = 1;
+
+    /* Check which size key is specified */
+    par = pj_get_param (P->params, "R");
+    if (0==par)
+        par = pj_get_param (P->params, "a");
+    if (0==par)
+        return a_was_set? 0: proj_errno_set (P, PJD_ERR_MAJOR_AXIS_NOT_GIVEN);
+
+    P->def_size = par->param;
+    par->used = 1;
+    P->a = pj_atof (pj_param_value (par));
+    if (P->a <= 0)
+        return proj_errno_set (P, PJD_ERR_MAJOR_AXIS_NOT_GIVEN);
+    if (HUGE_VAL==P->a)
+        return proj_errno_set (P, PJD_ERR_MAJOR_AXIS_NOT_GIVEN);
+
+    if ('R'==par->param[0]) {
+        P->es = P->f = P->e = P->rf = 0;
+        P->b = P->a;
+    }
+    return 0;
+}
+
+
+/***************************************************************************************/
+static int ellps_shape (PJ *P) {
+/***************************************************************************************/
+    char *keys[]  = {"rf", "f", "es", "e", "b"};
+    paralist *par = 0;
+    char *def = 0;
+    size_t i, len;
+
+    par = 0;
+    len = sizeof (keys) / sizeof (char *);
+
+    /* Check which shape key is specified */
+    for (i = 0;  i < len;  i++) {
+        par = pj_get_param (P->params, keys[i]);
+        if (par)
+            break;
+    }
+
+    /* Not giving a shape parameter means selecting a sphere, unless shape */
+    /* has been selected previously via ellps=xxx */
+    if (0==par && P->es != 0)
+        return 0;
+    if (0==par && P->es==0) {
+        P->es = P->f = 0;
+        P->b = P->a;
+        return 0;
+    }
+
+    P->def_shape = def = par->param;
+    par->used = 1;
+    P->es = P->f = P->b = P->e = P->rf = 0;
+
+    switch (i) {
+
+    /* reverse flattening, rf */
+    case 0:
+         P->rf = pj_atof (pj_param_value (par));
+         if (HUGE_VAL==P->rf)
+             return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+         if (0==P->rf)
+             return proj_errno_set (P, PJD_ERR_REV_FLATTENING_IS_ZERO);
+         P->f = 1 / P->rf;
+         P->es = 2*P->f - P->f*P->f;
+         break;
+
+    /* flattening, f */
+    case 1:
+        P->f = pj_atof (pj_param_value (par));
+        if (HUGE_VAL==P->f)
+            return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+        if (0==P->f)
+            return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+        P->rf = 1 / P->f;
+        P->es = 2*P->f - P->f*P->f;
+        break;
+
+    /* eccentricity squared, es */
+    case 2:
+        P->es = pj_atof (pj_param_value (par));
+        if (HUGE_VAL==P->es)
+            return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+        if (1==P->es)
+            return proj_errno_set (P, PJD_ERR_ECCENTRICITY_IS_ONE);
+        break;
+
+    /* eccentricity, e */
+    case 3:
+        P->e = pj_atof (pj_param_value (par));
+        if (HUGE_VAL==P->e)
+            return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+        if (0==P->e)
+            return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+        if (1==P->e)
+             return proj_errno_set (P, PJD_ERR_ECCENTRICITY_IS_ONE);
+        P->es = P->e * P->e;
+        break;
+
+    /* semiminor axis, b */
+    case 4:
+        P->b = pj_atof (pj_param_value (par));
+        if (HUGE_VAL==P->b)
+            return proj_errno_set (P, PJD_ERR_INVALID_ARG);
+        if (0==P->b)
+            return proj_errno_set (P, PJD_ERR_ECCENTRICITY_IS_ONE);
+        if (P->b==P->a)
+            break;
+        P->f = (P->a - P->b) / P->a;
+        P->es = 2*P->f - P->f*P->f;
+        break;
+    default:
+        return PJD_ERR_INVALID_ARG;
+
+    }
+
+    if (P->es < 0)
+        return proj_errno_set (P, PJD_ERR_ES_LESS_THAN_ZERO);
+    return 0;
+}
+
+
+/* series coefficients for calculating ellipsoid-equivalent spheres */
+static const double SIXTH = 1/6.;
+static const double RA4   = 17/360.;
+static const double RA6   = 67/3024.;
+static const double RV4   = 5/72.;
+static const double RV6   = 55/1296.;
+
+/***************************************************************************************/
+static int ellps_spherification (PJ *P) {
+/***************************************************************************************/
+    char *keys[] =  {"R_A", "R_V", "R_a", "R_g", "R_h", "R_lat_a", "R_lat_g"};
+    size_t len, i;
+    paralist *par = 0;
+    char *def = 0;
+
+    double t;
+    char *v, *endp;
+
+    len = sizeof (keys) /  sizeof (char *);
+    P->def_spherification = 0;
+
+    /* Check which spherification key is specified */
+    for (i = 0;  i < len;  i++) {
+        par = pj_get_param (P->params, keys[i]);
+        if (par)
+            break;
+    }
+
+    /* No spherification specified? Then we're done */
+    if (i==len)
+        return 0;
+
+    /* Store definition */
+    P->def_spherification = def = par->param;
+    par->used = 1;
+
+    switch (i) {
+
+    /* R_A - a sphere with same area as ellipsoid */
+    case 0:
+        P->a *= 1. - P->es * (SIXTH + P->es * (RA4 + P->es * RA6));
+        break;
+
+    /* R_V - a sphere with same volume as ellipsoid */
+    case 1:
+        P->a *= 1. - P->es * (SIXTH + P->es * (RV4 + P->es * RV6));
+        break;
+
+    /* R_a - a sphere with R = the arithmetic mean of the ellipsoid */
+    case 2:
+        P->a = (P->a + P->b) / 2;
+        break;
+
+    /* R_g - a sphere with R = the geometric mean of the ellipsoid */
+    case 3:
+        P->a = sqrt (P->a * P->b);
+        break;
+
+    /* R_h - a sphere with R = the harmonic mean of the ellipsoid */
+    case 4:
+        if (P->a + P->b == 0)
+            return proj_errno_set (P, PJD_ERR_TOLERANCE_CONDITION);
+        P->a = (2*P->a * P->b) / (P->a + P->b);
+        break;
+
+    /* R_lat_a - a sphere with R = the arithmetic mean of the ellipsoid at given latitude */
+    case 5:
+    /* R_lat_g - a sphere with R = the geometric  mean of the ellipsoid at given latitude */
+    case 6:
+        v = pj_param_value (par);
+        t = proj_dmstor (v, &endp);
+        if (fabs (t) > M_HALFPI)
+            return proj_errno_set (P, PJD_ERR_REF_RAD_LARGER_THAN_90);
+        t = sin (t);
+        t = 1 - P->es * t * t;
+        if (i==5)   /* arithmetic */
+            P->a *= (1. - P->es + t) / (2 * t * sqrt(t));
+        else        /* geometric */
+            P->a *= sqrt (1 - P->es) / t;
+        break;
+    }
+
+    /* Clean up the ellipsoidal parameters to reflect the sphere */
+    P->es = P->e = P->f = 0;
+    P->rf = HUGE_VAL;
+    P->b = P->a;
+    pj_calc_ellipsoid_params (P, P->a, 0);
+
+    return 0;
+}
+
+
+/* locate parameter in list */
+static paralist *pj_get_param (paralist *list, char *key) {
+    size_t l = strlen(key);
+	while (list && !(0==strncmp(list->param, key, l) && (0==list->param[l] || list->param[l] == '=') ) )
+		list = list->next;
+	return list;
+}
+
+
+static char *pj_param_value (paralist *list) {
+    char *key, *value;
+    if (0==list)
+        return 0;
+
+    key = list->param;
+    value = strchr (key, '=');
+
+    /* a flag (i.e. a key without value) has its own name (key) as value */
+    return value? value + 1: key;
+}
+
+
+static const PJ_ELLPS *pj_find_ellps (char *name) {
+    int i;
+    char *s;
+    if (0==name)
+        return 0;
+
+    /* Search through internal ellipsoid list for name */
+    for (i = 0; (s = pj_ellps[i].id) && strcmp(name, s) ; ++i);
+    if (0==s)
+        return 0;
+    return pj_ellps + i;
+}
+
+
+/**************************************************************************************/
+void pj_erase_ellipsoid_def (PJ *P) {
+/***************************************************************************************
+    Erase all ellipsoidal parameters in P
+***************************************************************************************/
+    PJ B;
+
+    /* Make a blank PJ to copy from */
+    memset (&B, 0, sizeof (B));
+
+    /* And use it to overwrite all existing ellipsoid defs */
+    pj_inherit_ellipsoid_def (&B, P);
+}
+
+
+/**************************************************************************************/
+void pj_inherit_ellipsoid_def (const PJ *src, PJ *dst) {
+/***************************************************************************************
+    Brute force copy the ellipsoidal parameters from src to dst.  This code was
+    written before the actual ellipsoid setup parameters were kept available in
+    the PJ->def_xxx elements.
+***************************************************************************************/
+
+    /* The linear parameters */
+    dst->a  = src->a;
+    dst->b  = src->b;
+    dst->ra = src->ra;
+    dst->rb = src->rb;
+
+    /* The eccentricities */
+    dst->alpha   = src->alpha;
+    dst->e       = src->e;
+    dst->es      = src->es;
+    dst->e2      = src->e2;
+    dst->e2s     = src->e2s;
+    dst->e3      = src->e3;
+    dst->e3s     = src->e3s;
+    dst->one_es  = src->one_es;
+    dst->rone_es = src->rone_es;
+
+    /* The flattenings */
+    dst->f   = src->f;
+    dst->f2  = src->f2;
+    dst->n   = src->n;
+    dst->rf  = src->rf;
+    dst->rf2 = src->rf2;
+    dst->rn  = src->rn;
+
+    /* This one's for GRS80 */
+    dst->J = src->J;
+
+    /* es and a before any +proj related adjustment */
+    dst->es_orig = src->es_orig;
+    dst->a_orig  = src->a_orig;
+}
+
+
+/***************************************************************************************/
+int pj_calc_ellipsoid_params (PJ *P, double a, double es) {
+/****************************************************************************************
+    Calculate a large number of ancillary ellipsoidal parameters, in addition to
+    the two traditional PROJ defining parameters: Semimajor axis, a, and the
+    eccentricity squared, es.
+
+    Most of these parameters are fairly cheap to compute in comparison to the overall
+    effort involved in initializing a PJ object. They may, however, take a substantial
+    part of the time taken in computing an individual point transformation.
+
+    So by providing them up front, we can amortize the (already modest) cost over all
+    transformations carried out over the entire lifetime of a PJ object, rather than
+    incur that cost for every single transformation.
+
+    Most of the parameter calculations here are based on the "angular eccentricity",
+    i.e. the angle, measured from the semiminor axis, of a line going from the north
+    pole to one of the foci of the ellipsoid - or in other words: The arc sine of the
+    eccentricity.
+
+    The formulae used are mostly taken from:
+
+    Richard H. Rapp: Geometric Geodesy, Part I, (178 pp, 1991).
+    Columbus, Ohio:  Dept. of Geodetic Science
+    and Surveying, Ohio State University.
+
+****************************************************************************************/
+
+    P->a = a;
+    P->es = es;
+
+    /* Compute some ancillary ellipsoidal parameters */
+    if (P->e==0)
+        P->e = sqrt(P->es);  /* eccentricity */
+    P->alpha = asin (P->e);  /* angular eccentricity */
+
+    /* second eccentricity */
+    P->e2  = tan (P->alpha);
+    P->e2s = P->e2 * P->e2;
+
+    /* third eccentricity */
+    P->e3    = (0!=P->alpha)? sin (P->alpha) / sqrt(2 - sin (P->alpha)*sin (P->alpha)): 0;
+    P->e3s = P->e3 * P->e3;
+
+    /* flattening */
+    if (0==P->f)
+        P->f  = 1 - cos (P->alpha);   /* = 1 - sqrt (1 - PIN->es); */
+    P->rf = P->f != 0.0 ? 1.0/P->f: HUGE_VAL;
+
+    /* second flattening */
+    P->f2  = (cos(P->alpha)!=0)? 1/cos (P->alpha) - 1: 0;
+    P->rf2 = P->f2 != 0.0 ? 1/P->f2: HUGE_VAL;
+
+    /* third flattening */
+    P->n  = pow (tan (P->alpha/2), 2);
+    P->rn = P->n != 0.0 ? 1/P->n: HUGE_VAL;
+
+    /* ...and a few more */
+    if (0==P->b)
+        P->b  = (1 - P->f)*P->a;
+    P->rb = 1. / P->b;
+    P->ra = 1. / P->a;
+
+    P->one_es = 1. - P->es;
+    if (P->one_es == 0.) {
+        pj_ctx_set_errno( P->ctx, PJD_ERR_ECCENTRICITY_IS_ONE);
+        return PJD_ERR_ECCENTRICITY_IS_ONE;
+    }
+
+    P->rone_es = 1./P->one_es;
+
+    return 0;
+}
+
+
+
+#ifndef KEEP_ORIGINAL_PJ_ELL_SET
+/**************************************************************************************/
+int pj_ell_set (PJ_CONTEXT *ctx, paralist *pl, double *a, double *es) {
+/***************************************************************************************
+    Initialize ellipsoidal parameters by emulating the original ellipsoid setup
+    function by Gerald Evenden, through a call to pj_ellipsoid
+***************************************************************************************/
+    PJ B;
+    int ret;
+
+    memset (&B, 0, sizeof (B));
+    B.ctx = ctx;
+    B.params = pl;
+
+    ret = pj_ellipsoid (&B);
+    if (ret)
+        return ret;
+
+    *a = B.a;
+    *es = B.es;
+    return 0;
+}
+#else
+
+
+/**************************************************************************************/
+int pj_ell_set (projCtx ctx, paralist *pl, double *a, double *es) {
+/***************************************************************************************
+    Initialize ellipsoidal parameters: This is the original ellipsoid setup
+    function by Gerald Evenden - significantly more compact than pj_ellipsoid and
+    its many helper functions, and still quite readable.
+
+    It is, however, also so tight that it is hard to modify and add functionality,
+    and equally hard to find the right place to add further commentary for improved
+    future maintainability.
+
+    Hence, when the need to store in the PJ object, the parameters actually used to
+    define the ellipsoid came up, rather than modifying this little gem of
+    "economy of expression", a much more verbose reimplementation, pj_ellipsoid,
+    was written.
+***************************************************************************************/
+    int i;
+    double b=0.0, e;
+    char *name;
+    paralist *start = 0;
+
+    /* clear any previous error */
+    pj_ctx_set_errno(ctx,0);
+
+    /* check for varying forms of ellipsoid input */
+    *a = *es = 0.;
+
+    /* R takes precedence */
+    if (pj_param(ctx, pl, "tR").i)
+        *a = pj_param(ctx,pl, "dR").f;
+
+    /* probable elliptical figure */
+    else {
+        /* check if ellps present and temporarily append its values to pl */
         if ((name = pj_param(ctx,pl, "sellps").s) != NULL) {
-			char *s;
-
-			for (start = pl; start && start->next ; start = start->next) ;
-			for (i = 0; (s = pj_ellps[i].id) && strcmp(name, s) ; ++i) ;
-			if (!s) { pj_ctx_set_errno( ctx, -9); return 1; }
-			start->next = pj_mkparam(pj_ellps[i].major);
-			start->next->next = pj_mkparam(pj_ellps[i].ell);
-		}
-		*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(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(ctx,pl, "tf").i) { /* flattening */
-			*es = pj_param(ctx,pl, "df").f;
-			*es = *es * (2. - *es);
-		} 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(ctx,pl, "bR_A").i) { /* sphere--area of ellipsoid */
-			*a *= 1. - *es * (SIXTH + *es * (RA4 + *es * RA6));
-			*es = 0.;
-		} 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(ctx,pl, "bR_a").i) { /* sphere--arithmetic mean */
-			*a = .5 * (*a + b);
-			*es = 0.;
-		} else if (pj_param(ctx,pl, "bR_g").i) { /* sphere--geometric mean */
-			*a = sqrt(*a * b);
-			*es = 0.;
-		} 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(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(ctx,pl, i ? "rR_lat_a" : "rR_lat_g").f);
-			if (fabs(tmp) > M_HALFPI) {
+            char *s;
+
+            for (start = pl; start && start->next ; start = start->next) ;
+            for (i = 0; (s = pj_ellps[i].id) && strcmp(name, s) ; ++i) ;
+            if (!s) { pj_ctx_set_errno( ctx, -9); return 1; }
+            start->next = pj_mkparam(pj_ellps[i].major);
+            start->next->next = pj_mkparam(pj_ellps[i].ell);
+        }
+
+        *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(ctx,pl, "trf").i) { /* recip flattening */
+            *es = pj_param(ctx,pl, "drf").f;
+            if (*es == 0.0) {
+                pj_ctx_set_errno( ctx, -10);
+                goto bomb;
+            }
+            *es = 1./ *es;
+            *es = *es * (2. - *es);
+        } else if (pj_param(ctx,pl, "tf").i) { /* flattening */
+            *es = pj_param(ctx,pl, "df").f;
+            *es = *es * (2. - *es);
+        } 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 == 0.0)
+            b = *a * sqrt(1. - *es);
+
+
+        /* following options turn ellipsoid into equivalent sphere */
+        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(ctx,pl, "bR_V").i) { /* sphere--vol. of ellipsoid */
+            *a *= 1. - *es * (SIXTH + *es * (RV4 + *es * RV6));
+            *es = 0.;
+        } else if (pj_param(ctx,pl, "bR_a").i) { /* sphere--arithmetic mean */
+            *a = .5 * (*a + b);
+            *es = 0.;
+        } else if (pj_param(ctx,pl, "bR_g").i) { /* sphere--geometric mean */
+            *a = sqrt(*a * b);
+            *es = 0.;
+        } else if (pj_param(ctx,pl, "bR_h").i) { /* sphere--harmonic mean */
+            if ( (*a + b) == 0.0) {
+                pj_ctx_set_errno(ctx, -20);
+                goto bomb;
+            }
+            *a = 2. * *a * b / (*a + b);
+            *es = 0.;
+        } 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(ctx,pl, i ? "rR_lat_a" : "rR_lat_g").f);
+            if (fabs(tmp) > M_HALFPI) {
                                 pj_ctx_set_errno(ctx,-11);
-				goto bomb;
-			}
-			tmp = 1. - *es * tmp * tmp;
-			*a *= i ? .5 * (1. - *es + tmp) / ( tmp * sqrt(tmp)) :
-				sqrt(1. - *es) / tmp;
-			*es = 0.;
-		}
+                goto bomb;
+            }
+            tmp = 1. - *es * tmp * tmp;
+            *a *= i ? .5 * (1. - *es + tmp) / ( tmp * sqrt(tmp)) :
+                sqrt(1. - *es) / tmp;
+            *es = 0.;
+        }
 bomb:
-		if (start) { /* clean up temporary extension of list */
-			pj_dalloc(start->next->next);
-			pj_dalloc(start->next);
-			start->next = 0;
-		}
-		if (ctx->last_errno)
-			return 1;
-	}
-	/* some remaining checks */
-	if (*es < 0.)
-        	{ pj_ctx_set_errno( ctx, -12); return 1; }
-	if (*a <= 0.)
-        	{ pj_ctx_set_errno( ctx, -13); return 1; }
-	return 0;
+        if (start) { /* clean up temporary extension of list */
+            pj_dalloc(start->next->next);
+            pj_dalloc(start->next);
+            start->next = 0;
+        }
+        if (ctx->last_errno)
+            return 1;
+    }
+    /* some remaining checks */
+    if (*es < 0.)
+            { pj_ctx_set_errno( ctx, -12); return 1; }
+    if (*a <= 0.)
+            { pj_ctx_set_errno( ctx, -13); return 1; }
+    return 0;
 }
+#endif
diff --git a/src/pj_ellps.c b/src/pj_ellps.c
index 32fbbd4..4005d1c 100644
--- a/src/pj_ellps.c
+++ b/src/pj_ellps.c
@@ -1,8 +1,11 @@
 /* definition of standard geoids */
+
+#include "proj.h"
+
 #define PJ_ELLPS__
 #include "projects.h"
 
-C_NAMESPACE_VAR struct PJ_ELLPS
+C_NAMESPACE_VAR const struct PJ_ELLPS
 pj_ellps[] = {
 {"MERIT",	"a=6378137.0",		"rf=298.257",		"MERIT 1983"},
 {"SGS85",	"a=6378136.0",		"rf=298.257",		"Soviet Geodetic System 85"},
@@ -13,8 +16,10 @@ pj_ellps[] = {
 {"NWL9D",	"a=6378145.0.",		"rf=298.25",		"Naval Weapons Lab., 1965"},
 {"mod_airy",	"a=6377340.189",	"b=6356034.446",	"Modified Airy"},
 {"andrae",	"a=6377104.43",		"rf=300.0",		"Andrae 1876 (Den., Iclnd.)"},
+{"danish",	"a=6377019.2563",	"rf=300.0",		"Andrae 1876 (Denmark, Iceland)"},
 {"aust_SA",	"a=6378160.0",		"rf=298.25",		"Australian Natl & S. Amer. 1969"},
 {"GRS67",	"a=6378160.0",		"rf=298.2471674270",	"GRS 67(IUGG 1967)"},
+{"GSK2011",	"a=6378136.5",		"rf=298.2564151",	"GSK-2011"},
 {"bessel",	"a=6377397.155",	"rf=299.1528128",	"Bessel 1841"},
 {"bess_nam",	"a=6377483.865",	"rf=299.1528128",	"Bessel 1841 (Namibia)"},
 {"clrk66",	"a=6378206.4",		"b=6356583.8",		"Clarke 1866"},
@@ -40,6 +45,7 @@ pj_ellps[] = {
 {"mprts",	"a=6397300.",		"rf=191.",		"Maupertius 1738"},
 {"new_intl",	"a=6378157.5",		"b=6356772.2",		"New International 1967"},
 {"plessis",	"a=6376523.",		"b=6355863.", 		"Plessis 1817 (France)"},
+{"PZ90",	"a=6378136.0",		"rf=298.25784",		"PZ-90"},
 {"SEasia",	"a=6378155.0",		"b=6356773.3205",	"Southeast Asia"},
 {"walbeck",	"a=6376896.0",		"b=6355834.8467",	"Walbeck"},
 {"WGS60",	"a=6378165.0",		"rf=298.3",		"WGS 60"},
@@ -51,7 +57,11 @@ pj_ellps[] = {
 };
 
 struct PJ_ELLPS *pj_get_ellps_ref()
+{
+    return (struct PJ_ELLPS *)pj_ellps;
+}
 
+const PJ_ELLPS *proj_list_ellps(void)
 {
     return pj_ellps;
 }
diff --git a/src/pj_factors.c b/src/pj_factors.c
index ac23ed7..17b39c1 100644
--- a/src/pj_factors.c
+++ b/src/pj_factors.c
@@ -1,86 +1,105 @@
 /* projection scale factors */
 #define PJ_LIB__
-#include <projects.h>
+#include <proj.h>
+#include "projects.h"
+
 #include <errno.h>
+
 #ifndef DEFAULT_H
 #define DEFAULT_H   1e-5    /* radian default for numeric h */
 #endif
+
 #define EPS 1.0e-12
-	int
-pj_factors(LP lp, PJ *P, double h, struct FACTORS *fac) {
-	struct DERIVS der;
-	double cosphi, t, n, r;
-
-	/* check for forward and latitude or longitude overange */
-	if ((t = fabs(lp.phi)-M_HALFPI) > EPS || fabs(lp.lam) > 10.) {
-                pj_ctx_set_errno( P->ctx, -14);
-		return 1;
-	} else { /* proceed */
-		errno = pj_errno = 0;
-                P->ctx->last_errno = 0;
-
-		if (h < EPS)
-			h = DEFAULT_H;
-		if (fabs(lp.phi) > (M_HALFPI - h))
-                /* adjust to value around pi/2 where derived still exists*/
-		        lp.phi = lp.phi < 0. ? (-M_HALFPI+h) : (M_HALFPI-h);
-		else if (P->geoc)
-			lp.phi = atan(P->rone_es * tan(lp.phi));
-		lp.lam -= P->lam0;	/* compute del lp.lam */
-		if (!P->over)
-			lp.lam = adjlon(lp.lam); /* adjust del longitude */
-		if (P->spc)	/* get what projection analytic values */
-			P->spc(lp, P, fac);
-		if (((fac->code & (IS_ANAL_XL_YL+IS_ANAL_XP_YP)) !=
-			  (IS_ANAL_XL_YL+IS_ANAL_XP_YP)) &&
-			  pj_deriv(lp, h, P, &der))
-			return 1;
-		if (!(fac->code & IS_ANAL_XL_YL)) {
-			fac->der.x_l = der.x_l;
-			fac->der.y_l = der.y_l;
-		}
-		if (!(fac->code & IS_ANAL_XP_YP)) {
-			fac->der.x_p = der.x_p;
-			fac->der.y_p = der.y_p;
-		}
-		cosphi = cos(lp.phi);
-		if (!(fac->code & IS_ANAL_HK)) {
-			fac->h = hypot(fac->der.x_p, fac->der.y_p);
-			fac->k = hypot(fac->der.x_l, fac->der.y_l) / cosphi;
-			if (P->es) {
-				t = sin(lp.phi);
-				t = 1. - P->es * t * t;
-				n = sqrt(t);
-				fac->h *= t * n / P->one_es;
-				fac->k *= n;
-				r = t * t / P->one_es;
-			} else
-				r = 1.;
-		} else if (P->es) {
-			r = sin(lp.phi);
-			r = 1. - P->es * r * r;
-			r = r * r / P->one_es;
-		} else
-			r = 1.;
-		/* convergence */
-		if (!(fac->code & IS_ANAL_CONV)) {
-			fac->conv = - atan2(fac->der.y_l, fac->der.x_l);
-			if (fac->code & IS_ANAL_XL_YL)
-				fac->code |= IS_ANAL_CONV;
-		}
-		/* areal scale factor */
-		fac->s = (fac->der.y_p * fac->der.x_l - fac->der.x_p * fac->der.y_l) *
-			r / cosphi;
-		/* meridian-parallel angle theta prime */
-		fac->thetap = aasin(P->ctx,fac->s / (fac->h * fac->k));
-		/* Tissot ellips axis */
-		t = fac->k * fac->k + fac->h * fac->h;
-		fac->a = sqrt(t + 2. * fac->s);
-		t = (t = t - 2. * fac->s) <= 0. ? 0. : sqrt(t);
-		fac->b = 0.5 * (fac->a - t);
-		fac->a = 0.5 * (fac->a + t);
-		/* omega */
-		fac->omega = 2. * aasin(P->ctx,(fac->a - fac->b)/(fac->a + fac->b));
-	}
-	return 0;
+
+int pj_factors(LP lp, const PJ *P, double h, struct FACTORS *fac) {
+    double cosphi, t, n, r;
+    int err;
+    PJ_COORD coo = {{0, 0, 0, 0}};
+    coo.lp = lp;
+
+    /* Failing the 3 initial checks will most likely be due to */
+    /* earlier errors, so we leave errno alone */
+    if (0==fac)
+        return 1;
+
+    if (0==P)
+        return 1;
+
+    if (HUGE_VAL==lp.lam)
+        return 1;
+
+    /* But from here, we're ready to make our own mistakes */
+    err = proj_errno_reset (P);
+
+    /* Indicate that all factors are numerical approximations */
+    fac->code = 0;
+
+    /* Check for latitude or longitude overange */
+    if ((fabs (lp.phi)-M_HALFPI) > EPS || fabs (lp.lam) > 10.) {
+        proj_errno_set (P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT);
+        return 1;
+    }
+
+    /* Set a reasonable step size for the numerical derivatives */
+    h = fabs (h);
+    if (h < EPS)
+        h = DEFAULT_H;
+
+    /* If input latitudes are geocentric, convert to geographic */
+    if (P->geoc)
+        lp = proj_geocentric_latitude (P, PJ_INV, coo).lp;
+
+    /* If latitude + one step overshoots the pole, move it slightly inside, */
+    /* so the numerical derivative still exists */
+    if (fabs (lp.phi) > (M_HALFPI - h))
+        lp.phi = lp.phi < 0. ? -(M_HALFPI-h) : (M_HALFPI-h);
+
+    /* Longitudinal distance from central meridian */
+    lp.lam -= P->lam0;
+    if (!P->over)
+        lp.lam = adjlon(lp.lam);
+
+    /* Derivatives */
+    if (pj_deriv (lp, h, P, &(fac->der))) {
+        proj_errno_set (P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT);
+        return 1;
+    }
+
+    /* Scale factors */
+    cosphi = cos (lp.phi);
+    fac->h = hypot (fac->der.x_p, fac->der.y_p);
+    fac->k = hypot (fac->der.x_l, fac->der.y_l) / cosphi;
+
+    if (P->es != 0.0) {
+        t = sin(lp.phi);
+        t = 1. - P->es * t * t;
+        n = sqrt(t);
+        fac->h *= t * n / P->one_es;
+        fac->k *= n;
+        r = t * t / P->one_es;
+    } else
+        r = 1.;
+
+    /* Convergence */
+    fac->conv = -atan2 (fac->der.x_p, fac->der.y_p);
+
+    /* Areal scale factor */
+    fac->s = (fac->der.y_p * fac->der.x_l - fac->der.x_p * fac->der.y_l) * r / cosphi;
+
+    /* Meridian-parallel angle (theta prime) */
+    fac->thetap = aasin(P->ctx,fac->s / (fac->h * fac->k));
+
+    /* Tissot ellipse axis */
+    t = fac->k * fac->k + fac->h * fac->h;
+    fac->a = sqrt(t + 2. * fac->s);
+    t = t - 2. * fac->s;
+    t = t > 0? sqrt(t): 0;
+    fac->b = 0.5 * (fac->a - t);
+    fac->a = 0.5 * (fac->a + t);
+
+    /* Angular distortion */
+    fac->omega = 2. * aasin(P->ctx, (fac->a - fac->b) / (fac->a + fac->b) );
+
+    proj_errno_restore (P, err);
+    return 0;
 }
diff --git a/src/pj_fileapi.c b/src/pj_fileapi.c
index fa35f30..e223993 100644
--- a/src/pj_fileapi.c
+++ b/src/pj_fileapi.c
@@ -26,6 +26,7 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
+#include <errno.h>
 #include <projects.h>
 #include <string.h>
 
@@ -54,7 +55,7 @@ typedef struct {
 /*                       pj_get_default_fileapi()                       */
 /************************************************************************/
 
-projFileAPI *pj_get_default_fileapi() 
+projFileAPI *pj_get_default_fileapi(void) 
 {
     return &default_fileapi;
 }
@@ -76,6 +77,13 @@ static PAFile pj_stdio_fopen(projCtx ctx, const char *filename,
     }
 
     pafile = (stdio_pafile *) malloc(sizeof(stdio_pafile));
+    if (!pafile)
+    {
+        pj_ctx_set_errno(ctx, ENOMEM);
+        fclose(fp);
+        return NULL;
+    }
+
     pafile->fp = fp;
     pafile->ctx = ctx;
     return (PAFile) pafile;
diff --git a/src/pj_fwd.c b/src/pj_fwd.c
index 469e9a4..66b86aa 100644
--- a/src/pj_fwd.c
+++ b/src/pj_fwd.c
@@ -1,46 +1,255 @@
-/* general forward projection */
-#define PJ_LIB__
-#include <projects.h>
+/******************************************************************************
+ * Project:  PROJ.4
+ * Purpose:  Forward operation invocation
+ * Author:   Thomas Knudsen,  thokn at sdfe.dk,  2018-01-02
+ *           Based on material from Gerald Evenden (original pj_fwd)
+ *           and Piyush Agram (original pj_fwd3d)
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam
+ * Copyright (c) 2018, Thomas Knudsen / SDFE
+ *
+ * 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 <errno.h>
-# define EPS 1.0e-12
-	XY /* forward projection entry */
-pj_fwd(LP lp, PJ *P) {
-	XY xy;
-	double t;
-
-	/* check for forward and latitude or longitude overange */
-	if ((t = fabs(lp.phi)-M_HALFPI) > EPS || fabs(lp.lam) > 10.) {
-		xy.x = xy.y = HUGE_VAL;
-		pj_ctx_set_errno( P->ctx, -14);
-	} else { /* proceed with projection */
-                P->ctx->last_errno = 0;
-                pj_errno = 0;
-                errno = 0;
-
-		if (fabs(t) <= EPS)
-			lp.phi = lp.phi < 0. ? -M_HALFPI : M_HALFPI;
-		else if (P->geoc)
-			lp.phi = atan(P->rone_es * tan(lp.phi));
-		lp.lam -= P->lam0;	/* compute del lp.lam */
-		if (!P->over)
-			lp.lam = adjlon(lp.lam); /* adjust del longitude */
-
-                /* Check for NULL pointer */
-                if (P->fwd != NULL)
-                {
-		    xy = (*P->fwd)(lp, P); /* project */
-		    if ( P->ctx->last_errno )
-			xy.x = xy.y = HUGE_VAL;
-		    /* adjust for major axis and easting/northings */
-		    else {
-			xy.x = P->fr_meter * (P->a * xy.x + P->x0);
-			xy.y = P->fr_meter * (P->a * xy.y + P->y0);
-		    }
-                }
-                else
-                {
-                    xy.x = xy.y = HUGE_VAL;
-                }
-	}
-	return xy;
+
+#include "proj_internal.h"
+#include "projects.h"
+
+#define INPUT_UNITS  P->left
+#define OUTPUT_UNITS P->right
+
+
+static PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) {
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ();
+
+    /* The helmert datum shift will choke unless it gets a sensible 4D coordinate */
+    if (HUGE_VAL==coo.v[2] && P->helmert) coo.v[2] = 0.0;
+    if (HUGE_VAL==coo.v[3] && P->helmert) coo.v[3] = 0.0;
+
+    /* Check validity of angular input coordinates */
+    if (INPUT_UNITS==PJ_IO_UNITS_ANGULAR) {
+        double t;
+
+        /* check for latitude or longitude over-range */
+        t = (coo.lp.phi < 0  ?  -coo.lp.phi  :  coo.lp.phi) - M_HALFPI;
+        if (t > PJ_EPS_LAT  ||  coo.lp.lam > 10  ||  coo.lp.lam < -10) {
+            proj_errno_set (P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT);
+            return proj_coord_error ();
+        }
+
+        /* Clamp latitude to -90..90 degree range */
+        if (coo.lp.phi > M_HALFPI)
+            coo.lp.phi = M_HALFPI;
+        if (coo.lp.phi < -M_HALFPI)
+            coo.lp.phi = -M_HALFPI;
+
+        /* If input latitude is geocentrical, convert to geographical */
+        if (P->geoc)
+            coo = proj_geocentric_latitude (P, PJ_INV, coo);
+
+        /* Ensure longitude is in the -pi:pi range */
+        if (0==P->over)
+            coo.lp.lam = adjlon(coo.lp.lam);
+
+        if (P->hgridshift)
+            coo = proj_trans (P->hgridshift, PJ_INV, coo);
+        else if (P->helmert) {
+            coo = proj_trans (P->cart_wgs84, PJ_FWD, coo); /* Go cartesian in WGS84 frame */
+            coo = proj_trans (P->helmert,    PJ_FWD, coo); /* Step into local frame */
+            coo = proj_trans (P->cart,       PJ_INV, coo); /* Go back to angular using local ellps */
+        }
+        if (P->vgridshift)
+            coo = proj_trans (P->vgridshift, PJ_FWD, coo);
+
+        /* Distance from central meridian, taking system zero meridian into account */
+        coo.lp.lam = (coo.lp.lam - P->from_greenwich) - P->lam0;
+
+        /* Ensure longitude is in the -pi:pi range */
+        if (0==P->over)
+            coo.lp.lam = adjlon(coo.lp.lam);
+
+        return coo;
+    }
+
+
+    /* We do not support gridshifts on cartesian input */
+    if (INPUT_UNITS==PJ_IO_UNITS_CARTESIAN && P->helmert)
+            return proj_trans (P->helmert, PJ_FWD, coo);
+    return coo;
+}
+
+
+
+static PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) {
+
+    switch (OUTPUT_UNITS) {
+
+    /* Handle false eastings/northings and non-metric linear units */
+    case PJ_IO_UNITS_CARTESIAN:
+
+        if (P->is_geocent) {
+            coo = proj_trans (P->cart, PJ_FWD, coo);
+        }
+
+        coo.xyz.x = P->fr_meter * (coo.xyz.x + P->x0);
+        coo.xyz.y = P->fr_meter * (coo.xyz.y + P->y0);
+        coo.xyz.z = P->fr_meter * (coo.xyz.z + P->z0);
+        break;
+
+    /* Classic proj.4 functions return plane coordinates in units of the semimajor axis */
+    case PJ_IO_UNITS_CLASSIC:
+        coo.xy.x *= P->a;
+        coo.xy.y *= P->a;
+
+    /* Falls through */ /* (<-- GCC warning silencer) */
+    /* to continue processing in common with PJ_IO_UNITS_PROJECTED */
+    case PJ_IO_UNITS_PROJECTED:
+        coo.xyz.x = P->fr_meter  * (coo.xyz.x + P->x0);
+        coo.xyz.y = P->fr_meter  * (coo.xyz.y + P->y0);
+        coo.xyz.z = P->vfr_meter * (coo.xyz.z + P->z0);
+        break;
+
+    case PJ_IO_UNITS_WHATEVER:
+        break;
+
+    case PJ_IO_UNITS_ANGULAR:
+        if (INPUT_UNITS==PJ_IO_UNITS_ANGULAR)
+            break;
+
+        /* adjust longitude to central meridian */
+        if (0==P->over)
+            coo.lpz.lam = adjlon(coo.lpz.lam);
+
+        if (P->vgridshift)
+            coo = proj_trans (P->vgridshift, PJ_INV, coo);
+        if (P->hgridshift)
+            coo = proj_trans (P->hgridshift, PJ_FWD, coo);
+        else if (P->helmert) {
+            coo = proj_trans (P->cart_wgs84, PJ_FWD, coo); /* Go cartesian in WGS84 frame */
+            coo = proj_trans (P->helmert,    PJ_FWD, coo); /* Step into local frame */
+            coo = proj_trans (P->cart,       PJ_INV, coo); /* Go back to angular using local ellps */
+        }
+
+        /* If input latitude was geocentrical, convert back to geocentrical */
+        if (P->geoc)
+            coo = proj_geocentric_latitude (P, PJ_FWD, coo);
+
+
+        /* Distance from central meridian, taking system zero meridian into account */
+        coo.lp.lam = coo.lp.lam + P->from_greenwich + P->lam0;
+
+        /* adjust longitude to central meridian */
+        if (0==P->over)
+            coo.lpz.lam = adjlon(coo.lpz.lam);
+    }
+
+    if (P->axisswap)
+        coo = proj_trans (P->axisswap, PJ_FWD, coo);
+
+    return coo;
+}
+
+
+
+XY pj_fwd(LP lp, PJ *P) {
+    PJ_COORD coo = {{0,0,0,0}};
+    coo.lp = lp;
+
+    if (!P->skip_fwd_prepare)
+        coo = pj_fwd_prepare (P, coo);
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ().xy;
+
+    /* Do the transformation, using the lowest dimensional transformer available */
+    if (P->fwd)
+        coo.xy = P->fwd(coo.lp, P);
+    else if (P->fwd3d)
+        coo.xyz = P->fwd3d (coo.lpz, P);
+    else if (P->fwd4d)
+        coo = P->fwd4d (coo, P);
+    else {
+        proj_errno_set (P, EINVAL);
+        return proj_coord_error ().xy;
+    }
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ().xy;
+
+    if (!P->skip_fwd_finalize)
+        coo = pj_fwd_finalize (P, coo);
+    return coo.xy;
+}
+
+
+
+XYZ pj_fwd3d(LPZ lpz, PJ *P) {
+    PJ_COORD coo = {{0,0,0,0}};
+    coo.lpz = lpz;
+
+    if (!P->skip_fwd_prepare)
+        coo = pj_fwd_prepare (P, coo);
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ().xyz;
+
+    /* Do the transformation, using the lowest dimensional transformer feasible */
+    if (P->fwd3d)
+        coo.xyz = P->fwd3d(coo.lpz, P);
+    else if (P->fwd4d)
+        coo = P->fwd4d (coo, P);
+    else if (P->fwd)
+        coo.xy = P->fwd (coo.lp, P);
+    else {
+        proj_errno_set (P, EINVAL);
+        return proj_coord_error ().xyz;
+    }
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ().xyz;
+
+    if (!P->skip_fwd_finalize)
+        coo = pj_fwd_finalize (P, coo);
+    return coo.xyz;
+}
+
+
+
+PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P) {
+    if (!P->skip_fwd_prepare)
+        coo = pj_fwd_prepare (P, coo);
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ();
+
+    /* Call the highest dimensional converter available */
+    if (P->fwd4d)
+        coo = P->fwd4d (coo, P);
+    else if (P->fwd3d)
+        coo.xyz  =  P->fwd3d (coo.lpz, P);
+    else if (P->fwd)
+        coo.xy  =  P->fwd (coo.lp, P);
+    else {
+        proj_errno_set (P, EINVAL);
+        return proj_coord_error ();
+    }
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ();
+
+    if (!P->skip_fwd_finalize)
+        coo = pj_fwd_finalize (P, coo);
+    return coo;
 }
diff --git a/src/pj_fwd3d.c b/src/pj_fwd3d.c
deleted file mode 100644
index 63fc529..0000000
--- a/src/pj_fwd3d.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* general forward projection */
-#define PJ_LIB__
-#include <projects.h>
-#include <errno.h>
-# define EPS 1.0e-12
-	XYZ /* forward projection entry */
-pj_fwd3d(LPZ lpz, PJ *P) {
-	XYZ xyz;
-	double t;
-
-	/* check for forward and latitude or longitude overange */
-	if ((t = fabs(lpz.phi)-M_HALFPI) > EPS || fabs(lpz.lam) > 10.) {
-		xyz.x = xyz.y = xyz.z = HUGE_VAL;
-		pj_ctx_set_errno( P->ctx, -14);
-	} else { /* proceed with projection */
-                P->ctx->last_errno = 0;
-                pj_errno = 0;
-                errno = 0;
-
-		if (fabs(t) <= EPS)
-			lpz.phi = lpz.phi < 0. ? -M_HALFPI : M_HALFPI;
-		else if (P->geoc)   /* Maybe redundant and never used. */
-			lpz.phi = atan(P->rone_es * tan(lpz.phi));
-		lpz.lam -= P->lam0;	/* compute del lp.lam */
-		if (!P->over)
-			lpz.lam = adjlon(lpz.lam); /* adjust del longitude */
-
-                /* Check for NULL pointer */
-                if (P->fwd3d != NULL)
-                {
-		    xyz = (*P->fwd3d)(lpz, P); /* project */
-		    if ( P->ctx->last_errno )
-			xyz.x = xyz.y = xyz.z = HUGE_VAL;
-		    /* adjust for major axis and easting/northings */
-		    else {
-			xyz.x = P->fr_meter * (P->a * xyz.x + P->x0);
-			xyz.y = P->fr_meter * (P->a * xyz.y + P->y0);
-                        /* z is not scaled since this handled by vto_meter outside */
-		    }
-                }
-                else
-                {
-                    xyz.x = xyz.y = xyz.z = HUGE_VAL;
-                }
-	}
-	return xyz;
-}
diff --git a/src/pj_gauss.c b/src/pj_gauss.c
index 67a1ab0..bd49b6c 100644
--- a/src/pj_gauss.c
+++ b/src/pj_gauss.c
@@ -29,65 +29,69 @@
 #define MAX_ITER 20
 
 struct GAUSS {
-	double C;
-	double K;
-	double e;
-	double ratexp;
+    double C;
+    double K;
+    double e;
+    double ratexp;
 };
-#define EN ((struct GAUSS *)en)
 #define DEL_TOL 1e-14
-	static double
-srat(double esinp, double exp) {
-	return(pow((1.-esinp)/(1.+esinp), exp));
+
+static double srat(double esinp, double exp) {
+    return(pow((1.-esinp)/(1.+esinp), exp));
 }
 
-	void *
-pj_gauss_ini(double e, double phi0, double *chi, double *rc) {
-	double sphi, cphi, es;
-	struct GAUSS *en;
+void *pj_gauss_ini(double e, double phi0, double *chi, double *rc) {
+    double sphi, cphi, es;
+    struct GAUSS *en;
 
-	if ((en = (struct GAUSS *)malloc(sizeof(struct GAUSS))) == NULL)
-		return (NULL);
-	es = e * e;
-	EN->e = e;
-	sphi = sin(phi0);
-	cphi = cos(phi0);  cphi *= cphi;
-	*rc = sqrt(1. - es) / (1. - es * sphi * sphi);
-	EN->C = sqrt(1. + es * cphi * cphi / (1. - es));
-	*chi = asin(sphi / EN->C);
-	EN->ratexp = 0.5 * EN->C * e;
-	EN->K = tan(.5 * *chi + M_FORTPI) / (
-		pow(tan(.5 * phi0 + M_FORTPI), EN->C) *
-		srat(EN->e * sphi, EN->ratexp)  );
-	return ((void *)en);
+    if ((en = (struct GAUSS *)malloc(sizeof(struct GAUSS))) == NULL)
+        return (NULL);
+    es = e * e;
+    en->e = e;
+    sphi = sin(phi0);
+    cphi = cos(phi0);  cphi *= cphi;
+    *rc = sqrt(1. - es) / (1. - es * sphi * sphi);
+    en->C = sqrt(1. + es * cphi * cphi / (1. - es));
+    if (en->C == 0.0) {
+        free(en);
+        return NULL;
+    }
+    *chi = asin(sphi / en->C);
+    en->ratexp = 0.5 * en->C * e;
+    en->K = tan(.5 * *chi + M_FORTPI) / (
+        pow(tan(.5 * phi0 + M_FORTPI), en->C) *
+        srat(en->e * sphi, en->ratexp)  );
+    return ((void *)en);
 }
-	LP
-pj_gauss(projCtx ctx, LP elp, const void *en) {
-	LP slp;
-	(void) ctx;
 
-	slp.phi = 2. * atan( EN->K *
-		pow(tan(.5 * elp.phi + M_FORTPI), EN->C) *
-		srat(EN->e * sin(elp.phi), EN->ratexp) ) - M_HALFPI;
-	slp.lam = EN->C * (elp.lam);
-	return(slp);
+LP pj_gauss(projCtx ctx, LP elp, const void *data) {
+    const struct GAUSS *en = (const struct GAUSS *)data;
+    LP slp;
+    (void) ctx;
+
+    slp.phi = 2. * atan( en->K *
+        pow(tan(.5 * elp.phi + M_FORTPI), en->C) *
+        srat(en->e * sin(elp.phi), en->ratexp) ) - M_HALFPI;
+    slp.lam = en->C * (elp.lam);
+    return(slp);
 }
-	LP
-pj_inv_gauss(projCtx ctx, LP slp, const void *en) {
-	LP elp;
-	double num;
-	int i;
 
-	elp.lam = slp.lam / EN->C;
-	num = pow(tan(.5 * slp.phi + M_FORTPI)/EN->K, 1./EN->C);
-	for (i = MAX_ITER; i; --i) {
-		elp.phi = 2. * atan(num * srat(EN->e * sin(slp.phi), -.5 * EN->e))
-			- M_HALFPI;
-		if (fabs(elp.phi - slp.phi) < DEL_TOL) break;
-			slp.phi = elp.phi;
-	}	
-	/* convergence failed */
-	if (!i)
-		pj_ctx_set_errno( ctx, -17 );
-	return (elp);
+LP pj_inv_gauss(projCtx ctx, LP slp, const void *data) {
+    const struct GAUSS *en = (const struct GAUSS *)data;
+    LP elp;
+    double num;
+    int i;
+
+    elp.lam = slp.lam / en->C;
+    num = pow(tan(.5 * slp.phi + M_FORTPI)/en->K, 1./en->C);
+    for (i = MAX_ITER; i; --i) {
+        elp.phi = 2. * atan(num * srat(en->e * sin(slp.phi), -.5 * en->e))
+            - M_HALFPI;
+        if (fabs(elp.phi - slp.phi) < DEL_TOL) break;
+            slp.phi = elp.phi;
+    }
+    /* convergence failed */
+    if (!i)
+        pj_ctx_set_errno( ctx, -17 );
+    return (elp);
 }
diff --git a/src/pj_gc_reader.c b/src/pj_gc_reader.c
index 458737c..90610a1 100644
--- a/src/pj_gc_reader.c
+++ b/src/pj_gc_reader.c
@@ -27,6 +27,7 @@
 
 #define PJ_LIB__
 
+#include <errno.h>
 #include <projects.h>
 #include <string.h>
 #include <ctype.h>
@@ -46,7 +47,7 @@ PJ_GridCatalog *pj_gc_readcatalog( projCtx ctx, const char *catalog_name )
     int entry_max;
     char line[302];
     
-    fid = pj_open_lib( ctx, (char *) catalog_name, "r" );
+    fid = pj_open_lib( ctx, catalog_name, "r" );
     if (fid == NULL) 
         return NULL;
 
@@ -55,13 +56,30 @@ PJ_GridCatalog *pj_gc_readcatalog( projCtx ctx, const char *catalog_name )
 
     catalog = (PJ_GridCatalog *) calloc(1,sizeof(PJ_GridCatalog));
     if( !catalog )
+    {
+        pj_ctx_set_errno(ctx, ENOMEM);
+        pj_ctx_fclose(ctx, fid);
         return NULL;
+    }
     
-    catalog->catalog_name = strdup(catalog_name);
+    catalog->catalog_name = pj_strdup(catalog_name);
+    if (!catalog->catalog_name) {
+        pj_ctx_set_errno(ctx, ENOMEM);
+        free(catalog);
+        pj_ctx_fclose(ctx, fid);
+        return NULL;
+    }
     
     entry_max = 10;
     catalog->entries = (PJ_GridCatalogEntry *) 
         malloc(entry_max * sizeof(PJ_GridCatalogEntry));
+    if (!catalog->entries) {
+        pj_ctx_set_errno(ctx, ENOMEM);
+        free(catalog->catalog_name);
+        free(catalog);
+        pj_ctx_fclose(ctx, fid);
+        return NULL;
+    }
     
     while( pj_gc_readentry( ctx, fid, 
                             catalog->entries+catalog->entry_count) == 0)
@@ -70,15 +88,28 @@ PJ_GridCatalog *pj_gc_readcatalog( projCtx ctx, const char *catalog_name )
         
         if( catalog->entry_count == entry_max ) 
         {
+            PJ_GridCatalogEntry* new_entries;
             entry_max = entry_max * 2;
-            catalog->entries = (PJ_GridCatalogEntry *) 
+            new_entries = (PJ_GridCatalogEntry *) 
                 realloc(catalog->entries, 
                         entry_max * sizeof(PJ_GridCatalogEntry));
-            if (catalog->entries == NULL )
+            if (new_entries == NULL )
+            {
+                int i;
+                for( i = 0; i < catalog->entry_count; i++ )
+                    free( catalog->entries[i].definition );
+                free( catalog->entries );
+                free( catalog->catalog_name );
+                free( catalog );
+                pj_ctx_fclose(ctx, fid);
                 return NULL;
+            }
+            catalog->entries = new_entries;
         }
     }
 
+    pj_ctx_fclose(ctx, fid);
+
     return catalog;
 }
 
@@ -109,6 +140,7 @@ static int pj_gc_read_csv_line( projCtx ctx, PAFile fid,
         while( token_count < max_tokens && *next != '\0' ) 
         {
             const char *start = next;
+            char* token;
             
             while( *next != '\0' && *next != ',' ) 
                 next++;
@@ -119,7 +151,14 @@ static int pj_gc_read_csv_line( projCtx ctx, PAFile fid,
                 next++;
             }
             
-            tokens[token_count++] = strdup(start);
+            token = pj_strdup(start);
+            if (!token) {
+                while (token_count > 0)
+                    free(tokens[--token_count]);
+                pj_ctx_set_errno(ctx, ENOMEM);
+                return 0;
+            }
+            tokens[token_count++] = token;
         }
 
         return token_count;
@@ -184,9 +223,8 @@ static int pj_gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry)
     }
     else
     {
-        memset( entry, 0, sizeof(PJ_GridCatalogEntry));
-        
-        entry->definition = strdup( tokens[0] );
+        entry->definition = tokens[0];
+        tokens[0] = NULL;   /* We take ownership of tokens[0] */
         entry->region.ll_long = dmstor_ctx( ctx, tokens[1], NULL );
         entry->region.ll_lat = dmstor_ctx( ctx, tokens[2], NULL );
         entry->region.ur_long = dmstor_ctx( ctx, tokens[3], NULL );
diff --git a/src/pj_generic_selftest.c b/src/pj_generic_selftest.c
deleted file mode 100644
index 88b5c30..0000000
--- a/src/pj_generic_selftest.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/******************************************************************************
- * Project:  PROJ.4
- * Purpose:  Generic regression test for PROJ.4 projection algorithms.
- * Author:   Thomas Knudsen
- *
- ******************************************************************************
- * Copyright (c) 2016, Thomas Knudsen
- *
- * 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 <stdio.h>
-#define PJ_LIB__
-#include <projects.h>
-
-
-static int deviates_xy (XY expected, XY got, double tolerance);
-static int deviates_lp (LP expected, LP got, double tolerance);
-static XY pj_fwd_deg (LP in, PJ *P);
-
-
-/**********************************************************************/
-int pj_generic_selftest (
-/**********************************************************************/
-    char *e_args,
-    char *s_args,
-    double tolerance_xy,
-    double tolerance_lp,
-    int n_fwd,
-    int n_inv,
-    LP *fwd_in,
-    XY *e_fwd_expect,
-    XY *s_fwd_expect,
-    XY *inv_in,
-    LP *e_inv_expect,
-    LP *s_inv_expect
-) {
-/***********************************************************************
-
-Generic regression test for PROJ.4 projection algorithms, testing both
-ellipsoidal ("e_") and spheroidal ("s_") versions of the projection
-algorithms in both forward ("_fwd_") and inverse ("_inv_") mode.
-
-Compares the "known good" results in <e_fwd_expect> and <s_fwd_expect>
-with the actual results obtained by transforming the forward input data
-set in <fwd_in> with pj_fwd() using setup arguments <e_args> and
-<s_args>, respectively.
-
-Then
-
-Compares the "known good" results in <e_inv_expect> and <s_inv_expect>
-with the actual results obtained by transforming the inverse input data
-set in <inv_in> with pj_inv() using setup arguments <e_args> and
-<s_args>, respectively.
-
-Any of the pointers passed may be set to 0, indicating "don't test this
-part".
-
-Returns 0 if all data agree to within the accuracy specified in
-<tolerance_xy> and <tolerance_lp>. Non-zero otherwise.
-
-***********************************************************************/
-    int i;
-
-    PJ *P;
-
-    if (e_args) {
-        P = pj_init_plus(e_args);
-        if (0==P)
-            return 2;
-
-        /* Test forward ellipsoidal */
-        if (e_fwd_expect) {
-            for (i = 0; i < n_fwd; i++)
-                if (deviates_xy (e_fwd_expect[i], pj_fwd_deg ( fwd_in[i], P ), tolerance_xy))
-                    break;
-            if ( i != n_fwd )
-                return 100 + i;
-        }
-
-        /* Test inverse ellipsoidal */
-        if (e_inv_expect)  {
-            for (i = 0; i < n_inv; i++)
-                if (deviates_lp (e_inv_expect[i], pj_inv ( inv_in[i], P ), tolerance_lp))
-                    break;
-            if ( i != n_inv )
-                return 200 + i;
-        }
-
-        pj_free (P);
-    }
-
-
-    if (s_args) {
-        P = pj_init_plus(s_args);
-        if (0==P)
-            return 3;
-
-        /* Test forward spherical */
-        if (s_fwd_expect)  {
-            for (i = 0; i < n_fwd; i++)
-                if (deviates_xy (s_fwd_expect[i], pj_fwd_deg ( fwd_in[i], P ), tolerance_xy))
-                    break;
-            if ( i != n_fwd )
-                return 300 + i;
-        }
-
-        /* Test inverse spherical */
-        if (s_inv_expect)  {
-            for (i = 0; i < n_inv; i++)
-                if (deviates_lp (s_inv_expect[i], pj_inv ( inv_in[i], P ), tolerance_lp))
-                    break;
-            if ( i != n_inv )
-                return 400 + i;
-        }
-
-        pj_free (P);
-    }
-
-    return 0;
-}
-
-
-
-/**********************************************************************/
-static int deviates_xy (XY expected, XY got, double tolerance) {
-/***********************************************************************
-
-    Determine whether two XYs deviate by more than <tolerance>.
-
-    The test material ("expected" values) may contain coordinates that
-    are indeterminate. For those cases, we test the other coordinate
-    only by forcing expected and actual ("got") coordinates to 0.
-
-***********************************************************************/
-    if (HUGE_VAL== expected.x)
-        return 0;
-    if (HUGE_VAL== expected.y)
-        return 0;
-    if (hypot ( expected.x - got.x, expected.y - got.y ) > tolerance)
-        return 1;
-    return 0;
-}
-
-
-/**********************************************************************/
-static int deviates_lp (LP expected, LP got, double tolerance) {
-/***********************************************************************
-
-    Determine whether two LPs deviate by more than <tolerance>.
-
-    This one is slightly tricky, since the <expected> LP is
-    supposed to be represented as degrees (since it was at some
-    time written down by a real human), whereas the <got> LP is
-    represented in radians (since it is supposed to be the result
-    output from pj_inv)
-
-***********************************************************************/
-    if (HUGE_VAL== expected.lam)
-        return 0;
-    if (HUGE_VAL== expected.phi)
-        return 0;
-    if (hypot ( DEG_TO_RAD * expected.lam - got.lam, DEG_TO_RAD * expected.phi - got.phi ) > tolerance)
-        return 1;
-    return 0;
-}
-
-
-/**********************************************************************/
-static XY pj_fwd_deg (LP in, PJ *P) {
-/***********************************************************************
-
-    Wrapper for pj_fwd, accepting input in degrees.
-
-***********************************************************************/
-    LP in_rad;
-    in_rad.lam = DEG_TO_RAD * in.lam;
-    in_rad.phi = DEG_TO_RAD * in.phi;
-    return  pj_fwd (in_rad, P);
-}
diff --git a/src/pj_geocent.c b/src/pj_geocent.c
index a00fc99..6530b10 100644
--- a/src/pj_geocent.c
+++ b/src/pj_geocent.c
@@ -48,72 +48,15 @@ static LP inverse(XY xy, PJ *P) {
     return lp;
 }
 
-
-static void *freeup_new (PJ *P) {
-    if (0==P)
-        return 0;
-
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 PJ *PROJECTION(geocent) {
     P->is_geocent = 1;
     P->x0 = 0.0;
     P->y0 = 0.0;
     P->inv = inverse;
     P->fwd = forward;
+    P->left = PJ_IO_UNITS_ANGULAR;
+    P->right = PJ_IO_UNITS_CARTESIAN;
 
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_geocent_selftest (void) {return 0;}
-#else
-
-int pj_geocent_selftest (void) {
-
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=geocent   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-    char s_args[] = {"+proj=geocent   +a=6400000    +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222638.98158654713,  111319.49079327357},
-        { 222638.98158654713, -111319.49079327357},
-        {-222638.98158654713,  111319.49079327357},
-        {-222638.98158654713, -111319.49079327357},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966305682390426,  0.00089831528411952132},
-        { 0.0017966305682390426, -0.00089831528411952132},
-        {-0.0017966305682390426,  0.00089831528411952132},
-        {-0.0017966305682390426, -0.00089831528411952132},
-    };
-
-    return pj_generic_selftest (e_args, s_args, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-#endif
-
diff --git a/src/pj_gridcatalog.c b/src/pj_gridcatalog.c
index 7954318..053de5e 100644
--- a/src/pj_gridcatalog.c
+++ b/src/pj_gridcatalog.c
@@ -56,6 +56,7 @@ void pj_gc_unloadall( projCtx ctx )
             free( catalog->entries[i].definition );
         }
         free( catalog->entries );
+        free( catalog->catalog_name );
         free( catalog );
     }
 }
@@ -136,6 +137,11 @@ int pj_gc_apply_gridshift( PJ *defn, int inverse,
                                 1, input, defn->datum_date, 
                                 &(defn->last_after_region), 
                                 &(defn->last_after_date));
+            if( defn->last_after_grid == NULL )
+            {
+                pj_ctx_set_errno( defn->ctx, -38 );
+                return -38;
+            }
         }
         gi = defn->last_after_grid;
         assert( gi->child == NULL );
@@ -179,6 +185,11 @@ int pj_gc_apply_gridshift( PJ *defn, int inverse,
                                 0, input, defn->datum_date, 
                                 &(defn->last_before_region), 
                                 &(defn->last_before_date));
+            if( defn->last_before_grid == NULL )
+            {
+                pj_ctx_set_errno( defn->ctx, -38 );
+                return -38;
+            }
         }
 
         gi = defn->last_before_grid;
diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c
index 5f528de..b1b39e0 100644
--- a/src/pj_gridinfo.c
+++ b/src/pj_gridinfo.c
@@ -28,29 +28,20 @@
 
 #define PJ_LIB__
 
-#include <projects.h>
+#include "proj_internal.h"
+#include "projects.h"
 #include <string.h>
 #include <math.h>
 #include <errno.h>
 
-#ifdef _WIN32_WCE
-/* assert.h includes all Windows API headers and causes 'LP' name clash.
- * Here assert we disable assert() for Windows CE.
- * TODO - mloskot: re-implement porting friendly assert
- */
-# define assert(exp)	((void)0)
-#else
-# include <assert.h>
-#endif /* _WIN32_WCE */
-
 /************************************************************************/
 /*                             swap_words()                             */
 /*                                                                      */
 /*      Convert the byte order of the given word(s) in place.           */
 /************************************************************************/
 
-static int  byte_order_test = 1;
-#define IS_LSB	(1 == ((unsigned char *) (&byte_order_test))[0])
+static const int  byte_order_test = 1;
+#define IS_LSB	(1 == ((const unsigned char *) (&byte_order_test))[0])
 
 static void swap_words( unsigned char *data, int word_size, int word_count )
 
@@ -63,7 +54,7 @@ static void swap_words( unsigned char *data, int word_size, int word_count )
 
         for( i = 0; i < word_size/2; i++ )
         {
-            int	t;
+            unsigned char	t;
 
             t = data[i];
             data[i] = data[word_size-i-1];
@@ -212,7 +203,9 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
         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_dalloc( row_buf );
+            pj_dalloc( ct_tmp.cvs );
+            pj_ctx_set_errno( ctx, ENOMEM );
             pj_release_lock();
             return 0;
         }
@@ -230,6 +223,7 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
                 pj_dalloc( row_buf );
                 pj_dalloc( ct_tmp.cvs );
                 pj_ctx_set_errno( ctx, -38 );
+                pj_release_lock();
                 return 0;
             }
 
@@ -244,8 +238,8 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
                 cvs = ct_tmp.cvs + (row) * gi->ct->lim.lam
                     + (gi->ct->lim.lam - i - 1);
 
-                cvs->phi = *(diff_seconds++) * ((M_PI/180.0) / 3600.0);
-                cvs->lam = *(diff_seconds++) * ((M_PI/180.0) / 3600.0);
+                cvs->phi = (float) (*(diff_seconds++) * ((M_PI/180.0) / 3600.0));
+                cvs->lam = (float) (*(diff_seconds++) * ((M_PI/180.0) / 3600.0));
             }
         }
 
@@ -290,7 +284,9 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
         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_dalloc( row_buf );
+            pj_dalloc( ct_tmp.cvs );
+            pj_ctx_set_errno( ctx, ENOMEM );
             pj_release_lock();
             return 0;
         }
@@ -324,8 +320,8 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
                 cvs = ct_tmp.cvs + (row) * gi->ct->lim.lam
                     + (gi->ct->lim.lam - i - 1);
 
-                cvs->phi = *(diff_seconds++) * ((M_PI/180.0) / 3600.0);
-                cvs->lam = *(diff_seconds++) * ((M_PI/180.0) / 3600.0);
+                cvs->phi = (float) (*(diff_seconds++) * ((M_PI/180.0) / 3600.0));
+                cvs->lam = (float) (*(diff_seconds++) * ((M_PI/180.0) / 3600.0));
                 diff_seconds += 2; /* skip accuracy values */
             }
         }
@@ -362,7 +358,7 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
         ct_tmp.cvs = (FLP *) pj_malloc(words*sizeof(float));
         if( ct_tmp.cvs == NULL )
         {
-            pj_ctx_set_errno( ctx, -38 );
+            pj_ctx_set_errno( ctx, ENOMEM );
             pj_release_lock();
             return 0;
         }
@@ -371,6 +367,7 @@ int pj_gridinfo_load( projCtx ctx, PJ_GRIDINFO *gi )
             != (size_t)words )
         {
             pj_dalloc( ct_tmp.cvs );
+            pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID );
             pj_release_lock();
             return 0;
         }
@@ -425,15 +422,8 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, PAFile fid, PJ_GRIDINFO *gilist )
     int num_subfiles, subfile;
     int must_swap;
 
-    assert( sizeof(int) == 4 );
-    assert( sizeof(double) == 8 );
-    if( sizeof(int) != 4 || sizeof(double) != 8 )
-    {
-        pj_log( ctx, PJ_LOG_ERROR,
-             "basic types of inappropraiate size in pj_gridinfo_init_ntv2()" );
-        pj_ctx_set_errno( ctx, -38 );
-        return 0;
-    }
+    STATIC_ASSERT( sizeof(pj_int32) == 4 );
+    STATIC_ASSERT( sizeof(double) == 8 );
 
 /* -------------------------------------------------------------------- */
 /*      Read the overview header.                                       */
@@ -511,6 +501,10 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, PAFile fid, PJ_GRIDINFO *gilist )
 /*      Initialize a corresponding "ct" structure.                      */
 /* -------------------------------------------------------------------- */
         ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
+        if (!ct) {
+            pj_ctx_set_errno(ctx, ENOMEM);
+            return 0;
+        }
         strncpy( ct->id, (const char *) header + 8, 8 );
         ct->id[8] = '\0';
 
@@ -523,8 +517,8 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, PAFile fid, PJ_GRIDINFO *gilist )
         ct->del.lam = *((double *) (header+9*16+8));
         ct->del.phi = *((double *) (header+8*16+8));
 
-        ct->lim.lam = (int) (fabs(ur.lam-ct->ll.lam)/ct->del.lam + 0.5) + 1;
-        ct->lim.phi = (int) (fabs(ur.phi-ct->ll.phi)/ct->del.phi + 0.5) + 1;
+        ct->lim.lam = (pj_int32) (fabs(ur.lam-ct->ll.lam)/ct->del.lam + 0.5) + 1;
+        ct->lim.phi = (pj_int32) (fabs(ur.phi-ct->ll.phi)/ct->del.phi + 0.5) + 1;
 
         pj_log( ctx, PJ_LOG_DEBUG_MINOR,
                 "NTv2 %s %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)\n",
@@ -545,6 +539,7 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, PAFile fid, PJ_GRIDINFO *gilist )
                     "GS_COUNT(%d) does not match expected cells (%dx%d=%d)\n",
                     gs_count, ct->lim.lam, ct->lim.phi,
                     ct->lim.lam * ct->lim.phi );
+            pj_dalloc(ct);
             pj_ctx_set_errno( ctx, -38 );
             return 0;
         }
@@ -559,11 +554,23 @@ static int pj_gridinfo_init_ntv2( projCtx ctx, PAFile fid, PJ_GRIDINFO *gilist )
             gi = gilist;
         else
         {
-            gi = (PJ_GRIDINFO *) pj_malloc(sizeof(PJ_GRIDINFO));
-            memset( gi, 0, sizeof(PJ_GRIDINFO) );
+            gi = (PJ_GRIDINFO *) pj_calloc(1, sizeof(PJ_GRIDINFO));
+            if (!gi) {
+                pj_dalloc(ct);
+                pj_gridinfo_free(ctx, gilist);
+                pj_ctx_set_errno(ctx, ENOMEM);
+                return 0;
+            }
 
-            gi->gridname = strdup( gilist->gridname );
-            gi->filename = strdup( gilist->filename );
+            gi->gridname = pj_strdup( gilist->gridname );
+            gi->filename = pj_strdup( gilist->filename );
+            if (!gi->gridname || gi->filename) {
+                pj_gridinfo_free(ctx, gi);
+                pj_dalloc(ct);
+                pj_gridinfo_free(ctx, gilist);
+                pj_ctx_set_errno(ctx, ENOMEM);
+                return 0;
+            }
             gi->next = NULL;
         }
 
@@ -638,15 +645,8 @@ static int pj_gridinfo_init_ntv1( projCtx ctx, PAFile fid, PJ_GRIDINFO *gi )
     struct CTABLE *ct;
     LP		ur;
 
-    assert( sizeof(int) == 4 );
-    assert( sizeof(double) == 8 );
-    if( sizeof(int) != 4 || sizeof(double) != 8 )
-    {
-        pj_log( ctx, PJ_LOG_ERROR,
-                 "basic types of inappropraiate size in nad_load_ntv1()" );
-        pj_ctx_set_errno( ctx, -38 );
-        return 0;
-    }
+    STATIC_ASSERT( sizeof(pj_int32) == 4 );
+    STATIC_ASSERT( sizeof(double) == 8 );
 
 /* -------------------------------------------------------------------- */
 /*      Read the header.                                                */
@@ -683,6 +683,10 @@ static int pj_gridinfo_init_ntv1( projCtx ctx, PAFile fid, PJ_GRIDINFO *gi )
 /*      Fill in CTABLE structure.                                       */
 /* -------------------------------------------------------------------- */
     ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
+    if (!ct) {
+        pj_ctx_set_errno(ctx, ENOMEM);
+        return 0;
+    }
     strcpy( ct->id, "NTv1 Grid Shift File" );
 
     ct->ll.lam = - *((double *) (header+72));
@@ -691,8 +695,8 @@ static int pj_gridinfo_init_ntv1( projCtx ctx, PAFile fid, PJ_GRIDINFO *gi )
     ur.phi = *((double *) (header+40));
     ct->del.lam = *((double *) (header+104));
     ct->del.phi = *((double *) (header+88));
-    ct->lim.lam = (int) (fabs(ur.lam-ct->ll.lam)/ct->del.lam + 0.5) + 1;
-    ct->lim.phi = (int) (fabs(ur.phi-ct->ll.phi)/ct->del.phi + 0.5) + 1;
+    ct->lim.lam = (pj_int32) (fabs(ur.lam-ct->ll.lam)/ct->del.lam + 0.5) + 1;
+    ct->lim.phi = (pj_int32) (fabs(ur.phi-ct->ll.phi)/ct->del.phi + 0.5) + 1;
 
     pj_log( ctx, PJ_LOG_DEBUG_MINOR,
             "NTv1 %dx%d: LL=(%.9g,%.9g) UR=(%.9g,%.9g)",
@@ -726,15 +730,8 @@ static int pj_gridinfo_init_gtx( projCtx ctx, PAFile fid, PJ_GRIDINFO *gi )
     double      xorigin,yorigin,xstep,ystep;
     int         rows, columns;
 
-    assert( sizeof(int) == 4 );
-    assert( sizeof(double) == 8 );
-    if( sizeof(int) != 4 || sizeof(double) != 8 )
-    {
-        pj_log( ctx, PJ_LOG_ERROR,
-                "basic types of inappropraiate size in nad_load_gtx()" );
-        pj_ctx_set_errno( ctx, -38 );
-        return 0;
-    }
+    STATIC_ASSERT( sizeof(pj_int32) == 4 );
+    STATIC_ASSERT( sizeof(double) == 8 );
 
 /* -------------------------------------------------------------------- */
 /*      Read the header.                                                */
@@ -775,6 +772,10 @@ static int pj_gridinfo_init_gtx( projCtx ctx, PAFile fid, PJ_GRIDINFO *gi )
 /*      Fill in CTABLE structure.                                       */
 /* -------------------------------------------------------------------- */
     ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
+    if (!ct) {
+        pj_ctx_set_errno(ctx, ENOMEM);
+        return 0;
+    }
     strcpy( ct->id, "GTX Vertical Grid Shift File" );
 
     ct->ll.lam = xorigin;
@@ -839,10 +840,18 @@ PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname )
 /*      Initialize a GRIDINFO with stub info we would use if it         */
 /*      cannot be loaded.                                               */
 /* -------------------------------------------------------------------- */
-    gilist = (PJ_GRIDINFO *) pj_malloc(sizeof(PJ_GRIDINFO));
-    memset( gilist, 0, sizeof(PJ_GRIDINFO) );
+    gilist = (PJ_GRIDINFO *) pj_calloc(1, sizeof(PJ_GRIDINFO));
+    if (!gilist) {
+        pj_ctx_set_errno(ctx, ENOMEM);
+        return NULL;
+    }
 
-    gilist->gridname = strdup( gridname );
+    gilist->gridname = pj_strdup( gridname );
+    if (!gilist->gridname) {
+        pj_dalloc(gilist);
+        pj_ctx_set_errno(ctx, ENOMEM);
+        return NULL;
+    }
     gilist->filename = NULL;
     gilist->format = "missing";
     gilist->grid_offset = 0;
@@ -858,7 +867,13 @@ PJ_GRIDINFO *pj_gridinfo_init( projCtx ctx, const char *gridname )
         return gilist;
     }
 
-    gilist->filename = strdup(fname);
+    gilist->filename = pj_strdup(fname);
+    if (!gilist->filename) {
+        pj_dalloc(gilist->gridname);
+        pj_dalloc(gilist);
+        pj_ctx_set_errno(ctx, ENOMEM);
+        return NULL;
+    }
 
 /* -------------------------------------------------------------------- */
 /*      Load a header, to determine the file type.                      */
diff --git a/src/pj_gridlist.c b/src/pj_gridlist.c
index a54dbe6..fbefdce 100644
--- a/src/pj_gridlist.c
+++ b/src/pj_gridlist.c
@@ -28,20 +28,11 @@
 
 #define PJ_LIB__
 
+#include <errno.h>
 #include <projects.h>
 #include <string.h>
 #include <math.h>
 
-#ifdef _WIN32_WCE
-/* assert.h includes all Windows API headers and causes 'LP' name clash.
- * Here assert we disable assert() for Windows CE.
- * TODO - mloskot: re-implement porting friendly assert
- */
-# define assert(exp)	((void)0)
-#else
-# include <assert.h>
-#endif /* _WIN32_WCE */
-
 static PJ_GRIDINFO *grid_list = NULL;
 #define PJ_MAX_PATH_LENGTH 1024
 
@@ -92,7 +83,7 @@ static int pj_gridlist_merge_gridfile( projCtx ctx,
         {
             got_match = 1;
 
-            /* dont add to the list if it is invalid. */
+            /* don't add to the list if it is invalid. */
             if( this_grid->ct == NULL )
                 return 0;
 
@@ -102,11 +93,15 @@ static int pj_gridlist_merge_gridfile( projCtx ctx,
                 PJ_GRIDINFO **new_list;
                 int new_max = *p_gridmax + 20;
 
-                new_list = (PJ_GRIDINFO **) pj_malloc(sizeof(void*) * new_max);
+                new_list = (PJ_GRIDINFO **) pj_calloc(new_max, sizeof(void *));
+                if (!new_list) {
+                    pj_ctx_set_errno( ctx, ENOMEM );
+                    return 0;
+                }
                 if( *p_gridlist != NULL )
                 {
                     memcpy( new_list, *p_gridlist,
-                            sizeof(void*) * (*p_gridmax) );
+                            sizeof(void *) * (*p_gridmax) );
                     pj_dalloc( *p_gridlist );
                 }
 
@@ -132,8 +127,6 @@ static int pj_gridlist_merge_gridfile( projCtx ctx,
 
     if( this_grid == NULL )
     {
-        /* we should get at least a stub grid with a missing "ct" member */
-        assert( FALSE );
         return 0;
     }
     
@@ -193,7 +186,8 @@ PJ_GRIDINFO **pj_gridlist_from_nadgrids( projCtx ctx, const char *nadgrids,
 
         if( end_char >= sizeof(name) )
         {
-            pj_ctx_set_errno( ctx, -38 );
+            pj_dalloc( gridlist );
+            pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID );
             pj_release_lock();
             return NULL;
         }
@@ -209,7 +203,8 @@ PJ_GRIDINFO **pj_gridlist_from_nadgrids( projCtx ctx, const char *nadgrids,
                                          &grid_max) 
             && required )
         {
-            pj_ctx_set_errno( ctx, -38 );
+            pj_dalloc( gridlist );
+            pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID );
             pj_release_lock();
             return NULL;
         }
diff --git a/src/pj_init.c b/src/pj_init.c
index 79b64bb..0acc6c7 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -27,269 +27,355 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
+
+
 #define PJ_LIB__
-#include <projects.h>
+#include <geodesic.h>
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <ctype.h>
+#include <proj.h>
+#include "proj_internal.h"
+#include "projects.h"
 
-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;
-    size_t 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';
+/**************************************************************************************/
+static paralist *string_to_paralist (PJ_CONTEXT *ctx, char *definition) {
+/***************************************************************************************
+    Convert a string (presumably originating from get_init_string) to a paralist.
+***************************************************************************************/
+    char *c = definition;
+    paralist *first = 0, *next = 0;
+
+    while (*c) {
+        /* Find start of next substring */
+        while (isspace (*c))
+            c++;
+
+        /* Keep a handle to the start of the list, so we have something to return */
+        if (0==first)
+            first = next = pj_mkparam_ws (c);
+        else
+            next = next->next = pj_mkparam_ws (c);
+        if (0==next)
+            return pj_dealloc_params (ctx, first, ENOMEM);
+
+        /* And skip to the end of the substring */
+        while ((!isspace(*c)) && 0!=*c)
+            c++;
     }
 
-    state->buffer_filled += bytes_read;
-    return last_char;
+    /* Terminate list and return */
+    next->next = 0;
+    return first;
 }
 
-/************************************************************************/
-/*                              get_opt()                               */
-/************************************************************************/
-static paralist *
-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';
-
-    /* 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);
+/**************************************************************************************/
+static char *get_init_string (PJ_CONTEXT *ctx, char *name) {
+/***************************************************************************************
+    Read a section of an init file. Return its contents as a plain character string.
+    It is the duty of the caller to free the memory allocated for the string.
+***************************************************************************************/
+#define MAX_LINE_LENGTH 1000
+    size_t current_buffer_size = 5 * (MAX_LINE_LENGTH + 1);
+    char *fname, *section, *key;
+    char *buffer = 0;
+    char *line = 0;
+    PAFile fid;
+    size_t n;
 
-        /* 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++;
+    line = pj_malloc (MAX_LINE_LENGTH + 1);
+    if (0==line)
+        return 0;
 
-        }
+    fname = pj_malloc (MAX_PATH_FILENAME+ID_TAG_MAX+3);
+    if (0==fname) {
+        pj_dealloc (line);
+        return 0;
+    }
 
-        /* Is this our target? */
-        else if( *next_char == '<' )
-        {
-            /* terminate processing target on the next block definition */
-            if (in_target)
-                break;
+    /* Support "init=file:section", "+init=file:section", and "file:section" format */
+    key = strstr (name, "init=");
+    if (0==key)
+        key = name;
+    else
+        key += 5;
+    if (MAX_PATH_FILENAME + ID_TAG_MAX + 2 < strlen (key)) {
+        pj_dealloc (fname);
+        pj_dealloc (line);
+        return 0;
+    }
+    memmove (fname, key, strlen (key) + 1);
+
+    /* Locate the name of the section we search for */
+    section = strrchr(fname, ':');
+    if (0==section) {
+        proj_context_errno_set (ctx, PJD_ERR_NO_COLON_IN_INIT_STRING);
+        pj_dealloc (fname);
+        pj_dealloc (line);
+        return 0;
+    }
+    *section = 0;
+    section++;
+    n = strlen (section);
+    pj_log (ctx, 3, "get_init_string: searching for section [%s] in init file [%s]\n", section, fname);
+
+    fid = pj_open_lib (ctx, fname, "rt");
+    if (0==fid) {
+        pj_dealloc (fname);
+        pj_dealloc (line);
+        proj_context_errno_set (ctx, PJD_ERR_NO_OPTION_IN_INIT_FILE);
+        return 0;
+    }
 
-            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
-            {
-                /* skip past end of line */
-                while( *next_char && *next_char != '\n' )
-                    next_char++;
-            }
+    /* Search for section in init file */
+    for (;;) {
+
+        /* End of file? */
+        if (0==pj_ctx_fgets (ctx, line, MAX_LINE_LENGTH, fid)) {
+            pj_dealloc (buffer);
+            pj_dealloc (fname);
+            pj_dealloc (line);
+            pj_ctx_fclose (ctx, fid);
+            proj_context_errno_set (ctx, PJD_ERR_NO_OPTION_IN_INIT_FILE);
+            return 0;
         }
-        else if (in_target)
-        {
-            const char *start_of_word = next_char;
-            int word_len = 0;
 
-            if (*start_of_word == '+')
-            {
-                start_of_word++;
-                next_char++;
-            }
+        /* At start of right section? */
+        pj_chomp (line);
+        if ('<'!=line[0])
+            continue;
+        if (strlen (line) < n + 2)
+            continue;
+        if (line[n + 1] != '>')
+            continue;
+        if (0==strncmp (line + 1, section, n))
+            break;
+    }
 
-            /* capture parameter */
-            while( *next_char && !isspace(*next_char) )
-            {
-                next_char++;
-                word_len++;
-            }
+    /* We're at the first line of the right section - copy line to buffer */
+    buffer = pj_malloc (current_buffer_size);
+    if (0==buffer) {
+        pj_dealloc (fname);
+        pj_dealloc (line);
+        pj_ctx_fclose (ctx, fid);
+        return 0;
+    }
 
-            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);
-                }
-            }
+    /* Skip the "<section>" indicator, and copy the rest of the line over */
+    strcpy (buffer, line + strlen (section) + 2);
+
+    /* Copy the remaining lines of the section to buffer */
+    for (;;) {
+        char *end_i_cator;
+        size_t next_length, buffer_length;
 
+        /* Did the section end somewhere in the most recently read line? */
+        end_i_cator = strchr (buffer, '<');
+        if (end_i_cator) {
+            *end_i_cator = 0;
+            break;
         }
-        else
-        {
-            /* skip past word */
-            while( *next_char && !isspace(*next_char) )
-                next_char++;
 
+        /* End of file? - done! */
+        if (0==pj_ctx_fgets (ctx, line, MAX_LINE_LENGTH, fid))
+            break;
+
+        /* Otherwise, handle the line. It MAY be the start of the next section, */
+        /* but that will be handled at the start of next trip through the loop  */
+        buffer_length = strlen (buffer);
+        pj_chomp (line);   /* Remove '#' style comments */
+        next_length = strlen (line) + buffer_length + 2;
+        if (next_length > current_buffer_size) {
+            char *b = pj_malloc (2 * current_buffer_size);
+            if (0==b) {
+                pj_dealloc (buffer);
+                buffer = 0;
+                break;
+            }
+            strcpy (b, buffer);
+            current_buffer_size *= 2;
+            pj_dealloc (buffer);
+            buffer = b;
         }
+        buffer[buffer_length] = ' ';
+        strcpy (buffer + buffer_length + 1, line);
     }
 
-    if (errno == 25)
-        errno = 0;
+    pj_ctx_fclose (ctx, fid);
+    pj_dealloc (fname);
+    pj_dealloc (line);
+    if (0==buffer)
+        return 0;
+    pj_shrink (buffer);
+    pj_log (ctx, 3, "key=%s, value: [%s]\n", key, buffer);
+    return buffer;
+}
 
-    free(state);
 
-    return next;
-}
 
 /************************************************************************/
-/*                            get_defaults()                            */
-/************************************************************************/
-static paralist *
-get_defaults(projCtx ctx, paralist **start, paralist *next, char *name) {
-    PAFile fid;
+static paralist *get_init(PJ_CONTEXT *ctx, char *key) {
+/*************************************************************************
+Expand key from buffer or (if not in buffer) from init file
+*************************************************************************/
+    char *xkey, *definition;
+    paralist *init_items = 0;
+
+    /* support "init=file:section", "+init=file:section", and "file:section" format */
+    xkey = strstr (key, "init=");
+    if (0==xkey)
+        xkey = key;
+    else
+        xkey += 5;
+    pj_log (ctx, 3, "get_init: searching cache for key: [%s]\n", xkey);
+
+    /* Is file/key pair already in cache? */
+    init_items = pj_search_initcache (xkey);
+    if (init_items)
+        return init_items;
+
+    /* If not, we must read it from file */
+    pj_log (ctx, 3, "get_init: searching on in init files for [%s]\n", xkey);
+    definition = get_init_string (ctx, xkey);
+    if (0==definition)
+        return 0;
+    init_items = string_to_paralist (ctx, definition);
+    if (init_items)
+        pj_log (ctx, 3, "get_init: got [%s], paralist[0,1]: [%s,%s]\n", definition, init_items->param, init_items->next? init_items->next->param: "(empty)");
+    pj_dealloc (definition);
+    if (0==init_items)
+        return 0;
+
+    /* We found it in file - now insert into the cache, before returning */
+    pj_insert_initcache (xkey, init_items);
+    return init_items;
+}
+
+
+
+static paralist *append_defaults_to_paralist (PJ_CONTEXT *ctx, paralist *start, char *key) {
+    paralist *defaults, *last = 0;
+    char keystring[ID_TAG_MAX + 20];
+    paralist *next, *proj;
+    int err;
+
+    if (0==start)
+        return 0;
+
+    if (strlen(key) > ID_TAG_MAX)
+        return 0;
+
+    /* Set defaults, unless inhibited (either explicitly through a "no_defs" token */
+    /* or implicitly, because we are initializing a pipeline) */
+    if (pj_param_exists (start, "no_defs"))
+        return start;
+    proj = pj_param_exists (start, "proj");
+    if (0==proj)
+        return start;
+    if (strlen (proj->param) < 6)
+        return start;
+    if (0==strcmp ("pipeline", proj->param + 5))
+        return start;
+
+    err = pj_ctx_get_errno (ctx);
+    pj_ctx_set_errno (ctx, 0);
+
+    /* Locate end of start-list */
+    for (last = start;  last->next;  last = last->next);
+
+    strcpy (keystring, "proj_def.dat:");
+    strcat (keystring, key);
+    defaults = get_init (ctx, keystring);
+
+    /* Defaults are optional - so we don't care if we cannot open the file */
+    pj_ctx_set_errno (ctx, err);
+
+    if (!defaults)
+        return last;
+
+    /* Loop over all default items */
+    for (next = defaults;  next;  next = next->next) {
+
+        /* Don't override existing parameter value of same name */
+        if (pj_param_exists (start, next->param))
+            continue;
+
+        /* Don't default ellipse if datum, ellps or any ellipsoid information is set */
+        if (0==strncmp(next->param,"ellps=", 6)) {
+            if  (pj_param_exists (start, "datum"))  continue;
+            if  (pj_param_exists (start, "ellps"))  continue;
+            if  (pj_param_exists (start, "a"))      continue;
+            if  (pj_param_exists (start, "b"))      continue;
+            if  (pj_param_exists (start, "rf"))     continue;
+            if  (pj_param_exists (start, "f"))      continue;
+            if  (pj_param_exists (start, "e"))      continue;
+            if  (pj_param_exists (start, "es"))     continue;
+        }
 
-    if ( (fid = pj_open_lib(ctx,"proj_def.dat", "rt")) != NULL) {
-        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 we're here, it's OK to append the current default item */
+        last = last->next = pj_mkparam(next->param);
     }
-    if (errno)
-        errno = 0; /* don't care if can't open file */
-    ctx->last_errno = 0;
+    last->next = 0;
 
-    return next;
+    pj_dealloc_params (ctx, defaults, 0);
+    return last;
 }
 
-/************************************************************************/
-/*                              get_init()                              */
-/************************************************************************/
-static paralist *
-get_init(projCtx ctx, paralist **start, paralist *next, char *name,
-         int *found_def) {
-    char fname[MAX_PATH_FILENAME+ID_TAG_MAX+3], *opt;
-    PAFile fid;
-    paralist *init_items = NULL;
-    const paralist *orig_next = next;
+/*****************************************************************************/
+paralist *pj_expand_init(PJ_CONTEXT *ctx, paralist *init) {
+/******************************************************************************
+Append expansion of <key> to the paralist <init>. The expansion is appended,
+rather than inserted at <init>'s place, since <init> may contain
+overrides to the expansion. These must take precedence, and hence come first
+in the expanded list.
 
-    (void)strncpy(fname, name, MAX_PATH_FILENAME + ID_TAG_MAX + 1);
+Consider e.g. the key 'foo:bar' which (hypothetically) expands to 'proj=utm
+zone=32 ellps=GRS80', i.e. a UTM projection on the GRS80 ellipsoid.
 
-    /*
-    ** Search for file/key pair in cache
-    */
+The expression 'init=foo:bar ellps=intl' will then expand to:
 
-    init_items = pj_search_initcache( name );
-    if( init_items != NULL )
-    {
-        next->next = init_items;
-        while( next->next != NULL )
-            next = next->next;
-        *found_def = 1;
-        return next;
-    }
+           'init=foo:bar ellps=intl proj=utm zone=32 ellps=GRS80',
 
-    /*
-    ** Otherwise we try to open the file and search for it.
-    */
-    if ((opt = strrchr(fname, ':')) != NULL)
-        *opt++ = '\0';
-    else { pj_ctx_set_errno(ctx,-3); return NULL; }
+where 'ellps=intl' precedes 'ellps=GRS80', and hence takes precedence,
+turning the expansion into an UTM projection on the Hayford ellipsoid.
 
-    if ( (fid = pj_open_lib(ctx,fname, "rt")) != NULL)
-        next = get_opt(ctx, start, fid, opt, next, found_def);
-    else
-        return NULL;
-    pj_ctx_fclose(ctx, fid);
-    if (errno == 25)
-        errno = 0; /* unknown problem with some sys errno<-25 */
-
-    /*
-    ** If we seem to have gotten a result, insert it into the
-    ** init file cache.
-    */
-    if( next != NULL && next != orig_next )
-        pj_insert_initcache( name, orig_next->next );
-
-    return next;
+Note that 'init=foo:bar' stays in the list. It is ignored after expansion.
+
+******************************************************************************/
+    paralist *last;
+    paralist *expn;
+
+    /* Nowhere to start? */
+    if (0==init)
+        return 0;
+
+    expn = get_init(ctx, init->param);
+
+    /* Nothing in expansion? */
+    if (0==expn)
+        return 0;
+
+    /* Locate  the end of the list */
+    for (last = init;  last && last->next;  last = last->next);
+
+    /* Then append and return */
+    last->next = expn;
+    return init;
 }
 
+
+
 /************************************************************************/
 /*                            pj_init_plus()                            */
 /*                                                                      */
 /*      Same as pj_init() except it takes one argument string with      */
-/*      individual arguments preceeded by '+', such as "+proj=utm       */
+/*      individual arguments preceded by '+', such as "+proj=utm        */
 /*      +zone=11 +ellps=WGS84".                                         */
 /************************************************************************/
 
@@ -311,6 +397,8 @@ pj_init_plus_ctx( projCtx ctx, const char *definition )
 
     /* make a copy that we can manipulate */
     defn_copy = (char *) pj_malloc( strlen(definition)+1 );
+    if (!defn_copy)
+        return NULL;
     strcpy( defn_copy, definition );
 
     /* split into arguments based on '+' and trim white space */
@@ -331,8 +419,9 @@ pj_init_plus_ctx( projCtx ctx, const char *definition )
 
                 if( argc+1 == MAX_ARG )
                 {
-                    pj_ctx_set_errno( ctx, -44 );
-                    goto bum_call;
+                    pj_dalloc( defn_copy );
+                    pj_ctx_set_errno( ctx, PJD_ERR_UNPARSEABLE_CS_DEF );
+                    return 0;
                 }
 
                 argv[argc++] = defn_copy + i + 1;
@@ -360,12 +449,12 @@ pj_init_plus_ctx( projCtx ctx, const char *definition )
     /* perform actual initialization */
     result = pj_init_ctx( ctx, argc, argv );
 
-bum_call:
     pj_dalloc( defn_copy );
-
     return result;
 }
 
+
+
 /************************************************************************/
 /*                              pj_init()                               */
 /*                                                                      */
@@ -380,51 +469,112 @@ pj_init(int argc, char **argv) {
     return pj_init_ctx( pj_get_default_ctx(), argc, argv );
 }
 
+
+typedef    PJ *(constructor)(PJ *);
+
+static constructor *pj_constructor (const char *name) {
+    int i;
+    char *s;
+    for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ;
+    if (0==s)
+        return 0;
+    return (constructor *) pj_list[i].proj;
+}
+
+
 PJ *
 pj_init_ctx(projCtx ctx, int argc, char **argv) {
     char *s, *name;
-    paralist *start = NULL;
-    PJ *(*proj)(PJ *);
-    paralist *curr;
+    constructor *proj;
+    paralist *curr, *init, *start;
     int i;
+    int err;
     PJ *PIN = 0;
+    int n_pipelines = 0;
+    int n_inits = 0;
+
+    if (0==ctx)
+        ctx = pj_get_default_ctx ();
 
     ctx->last_errno = 0;
-    start = NULL;
+
+    if (argc <= 0) {
+        pj_ctx_set_errno (ctx, PJD_ERR_NO_ARGS);
+        return 0;
+    }
+
+    /* count occurrences of pipelines and inits */
+    for (i = 0; i < argc; ++i) {
+        if (!strcmp (argv[i], "+proj=pipeline") || !strcmp(argv[i], "proj=pipeline") )
+                n_pipelines++;
+        if (!strncmp (argv[i], "+init=", 6) || !strncmp(argv[i], "init=", 5))
+            n_inits++;
+    }
+
+    /* can't have nested pipeline directly */
+    if (n_pipelines > 1) {
+        pj_ctx_set_errno (ctx, PJD_ERR_MALFORMED_PIPELINE);
+        return 0;
+    }
+
+    /* don't allow more than one +init in non-pipeline operations */
+    if (n_pipelines == 0 && n_inits > 1) {
+        pj_ctx_set_errno (ctx, PJD_ERR_TOO_MANY_INITS);
+        return 0;
+    }
+
 
     /* put arguments into internal linked list */
-    if (argc <= 0) { pj_ctx_set_errno( ctx, -1 ); goto bum_call; }
     start = curr = pj_mkparam(argv[0]);
+    if (!curr)
+        return pj_dealloc_params (ctx, start, ENOMEM);
+
     for (i = 1; i < argc; ++i) {
         curr->next = pj_mkparam(argv[i]);
+        if (!curr->next)
+            return pj_dealloc_params (ctx, start, ENOMEM);
         curr = curr->next;
     }
-    if (ctx->last_errno) goto bum_call;
 
-    /* check if +init present */
-    if (pj_param(ctx, start, "tinit").i) {
-        int found_def = 0;
 
-        if (!(curr = get_init(ctx,&start, curr,
-                              pj_param(ctx, start, "sinit").s,
-                              &found_def)))
-            goto bum_call;
-        if (!found_def) { pj_ctx_set_errno( ctx, -2); goto bum_call; }
+    /* Only expand '+init's in non-pipeline operations. '+init's in pipelines are */
+    /* expanded in the individual pipeline steps during pipeline initialization.  */
+    /* Potentially this leads to many nested pipelines, which shouldn't be a      */
+    /* problem when '+init's are expanded as late as possible.                    */
+    init = pj_param_exists (start, "init");
+    if (init && n_pipelines == 0) {
+        init = pj_expand_init (ctx, init);
+        if (!init)
+            return pj_dealloc_params (ctx, start, PJD_ERR_NO_ARGS);
     }
+    if (ctx->last_errno)
+        return pj_dealloc_params (ctx, start, ctx->last_errno);
+
+    /* Find projection selection */
+    curr = pj_param_exists (start, "proj");
+    if (0==curr)
+        return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED);
+    name =  curr->param;
+    if (strlen (name) < 6)
+        return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED);
+    name += 5;
+
+    proj = pj_constructor (name);
+    if (0==proj)
+        return pj_dealloc_params (ctx, start, PJD_ERR_UNKNOWN_PROJECTION_ID);
 
-    /* find projection selection */
-    if (!(name = pj_param(ctx, start, "sproj").s))
-    { pj_ctx_set_errno( ctx, -4 ); goto bum_call; }
-    for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ;
-    if (!s) { pj_ctx_set_errno( ctx, -5 ); goto bum_call; }
 
-    /* set defaults, unless inhibited */
-    if (!pj_param(ctx, start, "bno_defs").i)
-        curr = get_defaults(ctx,&start, curr, name);
-    proj = (PJ *(*)(PJ *)) pj_list[i].proj;
+    /* Append general and projection specific defaults to the definition list */
+    append_defaults_to_paralist (ctx, start, "general");
+    append_defaults_to_paralist (ctx, start, name);
+
+
+    /* Allocate projection structure */
+    PIN = proj(0);
+    if (0==PIN)
+        return pj_dealloc_params (ctx, start, ENOMEM);
+
 
-    /* allocate projection structure */
-    if (!(PIN = (*proj)(0))) goto bum_call;
     PIN->ctx = ctx;
     PIN->params = start;
     PIN->is_latlong = 0;
@@ -439,20 +589,21 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
     PIN->vgridlist_geoid = NULL;
     PIN->vgridlist_geoid_count = 0;
 
-    /* set datum parameters */
-    if (pj_datum_set(ctx, start, PIN)) goto bum_call;
-
-    /* set ellipsoid/sphere parameters */
-    if (pj_ell_set(ctx, start, &PIN->a, &PIN->es)) goto bum_call;
-
-    PIN->a_orig = PIN->a;
-    PIN->es_orig = PIN->es;
+    /* Set datum parameters */
+    if (pj_datum_set(ctx, start, PIN))
+        return pj_default_destructor (PIN, proj_errno(PIN));
 
-    PIN->e = sqrt(PIN->es);
-    PIN->ra = 1. / PIN->a;
-    PIN->one_es = 1. - PIN->es;
-    if (PIN->one_es == 0.) { pj_ctx_set_errno( ctx, -6 ); goto bum_call; }
-    PIN->rone_es = 1./PIN->one_es;
+    if (PIN->need_ellps) {
+        int ret = pj_ellipsoid (PIN);
+        if (0 != ret) {
+            pj_log (ctx, PJ_LOG_DEBUG_MINOR, "pj_init_ctx: Must specify ellipsoid or sphere");
+            return pj_default_destructor (PIN, proj_errno(PIN));
+        }
+        PIN->a_orig = PIN->a;
+        PIN->es_orig = PIN->es;
+        if (pj_calc_ellipsoid_params (PIN, PIN->a, PIN->es))
+            return pj_default_destructor (PIN, PJD_ERR_ECCENTRICITY_IS_ONE);
+    }
 
     /* Now that we have ellipse information check for WGS84 datum */
     if( PIN->datum_type == PJD_3PARAM
@@ -465,104 +616,116 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
         PIN->datum_type = PJD_WGS84;
     }
 
-    /* set PIN->geoc coordinate system */
-    PIN->geoc = (PIN->es && pj_param(ctx, start, "bgeoc").i);
+    /* Set PIN->geoc coordinate system */
+    PIN->geoc = (PIN->es != 0.0 && pj_param(ctx, start, "bgeoc").i);
 
-    /* over-ranging flag */
+    /* Over-ranging flag */
     PIN->over = pj_param(ctx, start, "bover").i;
 
-    /* vertical datum geoid grids */
+    /* Vertical datum geoid grids */
     PIN->has_geoid_vgrids = pj_param(ctx, start, "tgeoidgrids").i;
     if( PIN->has_geoid_vgrids ) /* we need to mark it as used. */
         pj_param(ctx, start, "sgeoidgrids");
 
-    /* longitude center for wrapping */
+    /* Longitude center for wrapping */
     PIN->is_long_wrap_set = pj_param(ctx, start, "tlon_wrap").i;
-    if (PIN->is_long_wrap_set)
+    if (PIN->is_long_wrap_set) {
         PIN->long_wrap_center = pj_param(ctx, start, "rlon_wrap").f;
+        /* Don't accept excessive values otherwise we might perform badly */
+        /* when correcting longitudes around it */
+        /* The test is written this way to error on long_wrap_center "=" NaN */
+        if( !(fabs(PIN->long_wrap_center) < 10 * M_TWOPI) )
+            return pj_default_destructor (PIN, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT);
+    }
 
-    /* axis orientation */
+    /* Axis orientation */
     if( (pj_param(ctx, start,"saxis").s) != NULL )
     {
-        static const char *axis_legal = "ewnsud";
+        const char *axis_legal = "ewnsud";
         const char *axis_arg = pj_param(ctx, start,"saxis").s;
         if( strlen(axis_arg) != 3 )
-        {
-            pj_ctx_set_errno( ctx, PJD_ERR_AXIS );
-            goto bum_call;
-        }
+            return pj_default_destructor (PIN, PJD_ERR_AXIS);
 
         if( strchr( axis_legal, axis_arg[0] ) == NULL
             || strchr( axis_legal, axis_arg[1] ) == NULL
             || strchr( axis_legal, axis_arg[2] ) == NULL)
-        {
-            pj_ctx_set_errno( ctx, PJD_ERR_AXIS );
-            goto bum_call;
-        }
+            return pj_default_destructor (PIN, PJD_ERR_AXIS);
 
-        /* it would be nice to validate we don't have on axis repeated */
+        /* TODO: it would be nice to validate we don't have on axis repeated */
         strcpy( PIN->axis, axis_arg );
     }
 
-    PIN->is_long_wrap_set = pj_param(ctx, start, "tlon_wrap").i;
-    if (PIN->is_long_wrap_set)
-        PIN->long_wrap_center = pj_param(ctx, start, "rlon_wrap").f;
-
-    /* central meridian */
+    /* Central meridian */
     PIN->lam0=pj_param(ctx, start, "rlon_0").f;
 
-    /* central latitude */
+    /* Central latitude */
     PIN->phi0 = pj_param(ctx, start, "rlat_0").f;
 
-    /* false easting and northing */
+    /* False easting and northing */
     PIN->x0 = pj_param(ctx, start, "dx_0").f;
     PIN->y0 = pj_param(ctx, start, "dy_0").f;
+    PIN->z0 = pj_param(ctx, start, "dz_0").f;
+    PIN->t0 = pj_param(ctx, start, "dt_0").f;
 
-    /* general scaling factor */
+    /* General scaling factor */
     if (pj_param(ctx, start, "tk_0").i)
         PIN->k0 = pj_param(ctx, start, "dk_0").f;
     else if (pj_param(ctx, start, "tk").i)
         PIN->k0 = pj_param(ctx, start, "dk").f;
     else
         PIN->k0 = 1.;
-    if (PIN->k0 <= 0.) {
-        pj_ctx_set_errno( ctx, -31 );
-        goto bum_call;
-    }
+    if (PIN->k0 <= 0.)
+        return pj_default_destructor (PIN, PJD_ERR_K_LESS_THAN_ZERO);
 
-    /* set units */
+    /* Set units */
     s = 0;
     if ((name = pj_param(ctx, start, "sunits").s) != NULL) {
         for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i) ;
-        if (!s) { pj_ctx_set_errno( ctx, -7 ); goto bum_call; }
+        if (!s)
+            return pj_default_destructor (PIN, PJD_ERR_UNKNOW_UNIT_ID);
         s = pj_units[i].to_meter;
     }
     if (s || (s = pj_param(ctx, start, "sto_meter").s)) {
-        PIN->to_meter = pj_strtod(s, &s);
-        if (*s == '/') /* ratio number */
-            PIN->to_meter /= pj_strtod(++s, 0);
-        PIN->fr_meter = 1. / PIN->to_meter;
+        double factor;
+        int ratio = 0;
+
+        /* ratio number? */
+        if (strlen (s) > 1 && s[0] == '1' && s[1]=='/') {
+            ratio = 1;
+            s += 2;
+        }
+
+        factor = pj_strtod(s, &s);
+        if ((factor <= 0.0) || (1/factor==0))
+            return pj_default_destructor (PIN, PJD_ERR_UNIT_FACTOR_LESS_THAN_0);
+
+        PIN->to_meter = ratio?  1 / factor: factor;
+        PIN->fr_meter = 1 / PIN->to_meter;
+
     } else
         PIN->to_meter = PIN->fr_meter = 1.;
 
-    /* set vertical units */
+    /* Set vertical units */
     s = 0;
     if ((name = pj_param(ctx, start, "svunits").s) != NULL) {
         for (i = 0; (s = pj_units[i].id) && strcmp(name, s) ; ++i) ;
-        if (!s) { pj_ctx_set_errno( ctx, -7 ); goto bum_call; }
+        if (!s)
+            return pj_default_destructor (PIN, PJD_ERR_UNKNOW_UNIT_ID);
         s = pj_units[i].to_meter;
     }
     if (s || (s = pj_param(ctx, start, "svto_meter").s)) {
         PIN->vto_meter = pj_strtod(s, &s);
         if (*s == '/') /* ratio number */
             PIN->vto_meter /= pj_strtod(++s, 0);
+        if (PIN->vto_meter <= 0.0)
+            return pj_default_destructor (PIN, PJD_ERR_UNIT_FACTOR_LESS_THAN_0);
         PIN->vfr_meter = 1. / PIN->vto_meter;
     } else {
         PIN->vto_meter = PIN->to_meter;
         PIN->vfr_meter = PIN->fr_meter;
     }
 
-    /* prime meridian */
+    /* Prime meridian */
     s = 0;
     if ((name = pj_param(ctx, start, "spm").s) != NULL) {
         const char *value = NULL;
@@ -582,84 +745,26 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
             && *next_str == '\0' )
             value = name;
 
-        if (!value) { pj_ctx_set_errno( ctx, -46 ); goto bum_call; }
+        if (!value)
+            return pj_default_destructor (PIN, PJD_ERR_UNKNOWN_PRIME_MERIDIAN);
         PIN->from_greenwich = dmstor_ctx(ctx,value,NULL);
     }
     else
         PIN->from_greenwich = 0.0;
 
-    /* projection specific initialization */
-    if (!(PIN = (*proj)(PIN)) || ctx->last_errno) {
-      bum_call: /* cleanup error return */
-        if (PIN)
-            pj_free(PIN);
-        else
-            for ( ; start; start = curr) {
-                curr = start->next;
-                pj_dalloc(start);
-            }
-        PIN = 0;
+    /* Private object for the geodesic functions */
+    PIN->geod = pj_calloc (1, sizeof (struct geod_geodesic));
+    if (0==PIN->geod)
+        return pj_default_destructor (PIN, ENOMEM);
+    geod_init(PIN->geod, PIN->a,  (1 - sqrt (1 - PIN->es)));
+
+    /* Projection specific initialization */
+    err = proj_errno_reset (PIN);
+    PIN = proj(PIN);
+    if (proj_errno (PIN)) {
+        pj_free(PIN);
+        return 0;
     }
-
+    proj_errno_restore (PIN, err);
     return PIN;
 }
-
-/************************************************************************/
-/*                              pj_free()                               */
-/*                                                                      */
-/*      This is the application callable entry point for destroying     */
-/*      a projection definition.  It does work generic to all           */
-/*      projection types, and then calls the projection specific        */
-/*      free function (P->pfree()) to do local work.  This maps to      */
-/*      the FREEUP code in the individual projection source files.      */
-/************************************************************************/
-
-void
-pj_free(PJ *P) {
-    if (P) {
-        paralist *t, *n;
-
-        /* free parameter list elements */
-        for (t = P->params; t; t = n) {
-            n = t->next;
-            pj_dalloc(t);
-        }
-
-        /* free array of grid pointers if we have one */
-        if( P->gridlist != NULL )
-            pj_dalloc( P->gridlist );
-
-        if( P->vgridlist_geoid != NULL )
-            pj_dalloc( P->vgridlist_geoid );
-
-        if( P->catalog != NULL )
-            pj_dalloc( P->catalog );
-
-        /* free projection parameters */
-        P->pfree(P);
-    }
-}
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*                              pj_prepare()                            */
-/*                                                                      */
-/*      Helper function for the PJ_xxxx functions providing the         */
-/*      projection specific setup for each projection type.             */
-/*                                                                      */
-/*      Currently not used, but placed here as part of the  material    */
-/*      Demonstrating the idea for a future PJ_xxx architecture         */
-/*      (cf. pj_minimal.c)                                              */
-/*                                                                      */
-/************************************************************************/
-void pj_prepare (PJ *P, const char *description, void (*freeup)(struct PJconsts *), size_t sizeof_struct_opaque) {
-    P->descr = description;
-    P->pfree = freeup;
-    P->opaque  = pj_calloc (1, sizeof_struct_opaque);
-}
diff --git a/src/pj_initcache.c b/src/pj_initcache.c
index e36b0ab..30ac2aa 100644
--- a/src/pj_initcache.c
+++ b/src/pj_initcache.c
@@ -150,14 +150,20 @@ void pj_insert_initcache( const char *filekey, const paralist *list )
         cache_alloc = cache_alloc * 2 + 15;
 
         cache_key_new = (char **) pj_malloc(sizeof(char*) * cache_alloc);
-        memcpy( cache_key_new, cache_key, sizeof(char*) * cache_count);
+        if( cache_key && cache_count )
+        {
+            memcpy( cache_key_new, cache_key, sizeof(char*) * cache_count);
+        }
         pj_dalloc( cache_key );
         cache_key = cache_key_new;
 
         cache_paralist_new = (paralist **) 
             pj_malloc(sizeof(paralist*) * cache_alloc);
-        memcpy( cache_paralist_new, cache_paralist, 
-                sizeof(paralist*) * cache_count );
+        if( cache_paralist && cache_count )
+        {
+            memcpy( cache_paralist_new, cache_paralist,
+                    sizeof(paralist*) * cache_count );
+        }
         pj_dalloc( cache_paralist );
         cache_paralist = cache_paralist_new;
     }
diff --git a/src/pj_internal.c b/src/pj_internal.c
new file mode 100644
index 0000000..6bb33d6
--- /dev/null
+++ b/src/pj_internal.c
@@ -0,0 +1,493 @@
+/******************************************************************************
+ * Project:  PROJ.4
+ * Purpose:  This is primarily material originating from pj_obs_api.c
+ *           (now proj_4D_api.c), that does not fit into the API
+ *           category. Hence this pile of tubings and fittings for
+ *           PROJ.4 internal plumbing.
+ *
+ * Author:   Thomas Knudsen,  thokn at sdfe.dk,  2017-07-05
+ *
+ ******************************************************************************
+ * Copyright (c) 2016, 2017, 2018, Thomas Knudsen/SDFE
+ *
+ * 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 <ctype.h>
+#include <stddef.h>
+#include <stdarg.h>
+#include <errno.h>
+
+#include <geodesic.h>
+#include "proj_internal.h"
+#include "projects.h"
+
+
+enum pj_io_units pj_left (PJ *P) {
+    enum pj_io_units u = P->inverted? P->right: P->left;
+    if (u==PJ_IO_UNITS_CLASSIC)
+        return PJ_IO_UNITS_PROJECTED;
+    return u;
+}
+
+enum pj_io_units pj_right (PJ *P) {
+    enum pj_io_units u = P->inverted? P->left: P->right;
+    if (u==PJ_IO_UNITS_CLASSIC)
+        return PJ_IO_UNITS_PROJECTED;
+    return u;
+}
+
+
+/* Work around non-constness of MSVC HUGE_VAL by providing functions rather than constants */
+PJ_COORD proj_coord_error (void) {
+    PJ_COORD c;
+    c.v[0] = c.v[1] = c.v[2] = c.v[3] = HUGE_VAL;
+    return c;
+}
+
+
+
+/**************************************************************************************/
+PJ_COORD pj_approx_2D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo) {
+/***************************************************************************************
+Behave mostly as proj_trans, but attempt to use 2D interfaces only.
+Used in gie.c, to enforce testing 2D code, and by PJ_pipeline.c to implement
+chained calls starting out with a call to its 2D interface.
+***************************************************************************************/
+    if (0==P)
+        return coo;
+    if (P->inverted)
+        direction = -direction;
+    switch (direction) {
+        case PJ_FWD:
+            coo.xy = pj_fwd (coo.lp, P);
+            return coo;
+        case PJ_INV:
+            coo.lp = pj_inv (coo.xy, P);
+            return coo;
+        case PJ_IDENT:
+            return coo;
+        default:
+            break;
+    }
+    proj_errno_set (P, EINVAL);
+    return proj_coord_error ();
+}
+
+
+/**************************************************************************************/
+PJ_COORD pj_approx_3D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo) {
+/***************************************************************************************
+Companion to pj_approx_2D_trans.
+
+Behave mostly as proj_trans, but attempt to use 3D interfaces only.
+Used in gie.c, to enforce testing 3D code, and by PJ_pipeline.c to implement
+chained calls starting out with a call to its 3D interface.
+***************************************************************************************/
+    if (0==P)
+        return coo;
+    if (P->inverted)
+        direction = -direction;
+    switch (direction) {
+        case PJ_FWD:
+            coo.xyz = pj_fwd3d (coo.lpz, P);
+            return coo;
+        case PJ_INV:
+            coo.lpz = pj_inv3d (coo.xyz, P);
+            return coo;
+        case PJ_IDENT:
+            return coo;
+        default:
+            break;
+    }
+    proj_errno_set (P, EINVAL);
+    return proj_coord_error ();
+}
+
+/**************************************************************************************/
+int pj_has_inverse(PJ *P) {
+/***************************************************************************************
+Check if a a PJ has an inverse.
+***************************************************************************************/
+    return ( (P->inverted && (P->fwd || P->fwd3d || P->fwd4d) ) ||
+             ( P->inv || P->inv3d || P->inv4d) );
+}
+
+
+/* Move P to a new context - or to the default context if 0 is specified */
+void proj_context_set (PJ *P, PJ_CONTEXT *ctx) {
+    if (0==ctx)
+        ctx = pj_get_default_ctx ();
+    pj_set_ctx (P, ctx);
+    return;
+}
+
+
+void proj_context_inherit (PJ *parent, PJ *child) {
+    if (0==parent)
+        pj_set_ctx (child, pj_get_default_ctx());
+    else
+        pj_set_ctx (child, pj_get_ctx(parent));
+    return;
+}
+
+
+
+/**************************************************************************************/
+size_t pj_strlcpy(char *dst, const char *src, size_t dsize) {
+/***************************************************************************************
+   Copy src to string dst of size siz.  At most siz-1 characters
+   will be copied.  Always NUL terminates (unless siz == 0).
+   Returns strlen(src); if retval >= siz, truncation occurred.
+
+ *
+ * Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller at courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND 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, DIRECT, 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.
+ *
+
+  Source: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/strlcpy.c
+
+***************************************************************************************/
+    const char *osrc = src;
+    size_t nleft = dsize;
+
+    /* Copy as many bytes as will fit. */
+    if (nleft != 0) {
+        while (--nleft != 0) {
+            if ((*dst++ = *src++) == '\0')
+                break;
+        }
+    }
+
+    /* Not enough room in dst, add NUL and traverse rest of src. */
+    if (nleft == 0) {
+        if (dsize != 0)
+            *dst = '\0';		/* NUL-terminate dst */
+        while (*src++)
+            ;
+    }
+
+    return(src - osrc - 1);	/* count does not include NUL */
+}
+
+
+
+/*****************************************************************************/
+char *pj_chomp (char *c) {
+/******************************************************************************
+Strip pre- and postfix whitespace. Inline comments (indicated by '#') are
+considered whitespace.
+******************************************************************************/
+    size_t i, n;
+    char *comment;
+    char *start = c;
+
+    if (0==c)
+        return 0;
+
+    comment = strchr (c, '#');
+    if (comment)
+        *comment = 0;
+
+    n = strlen (c);
+    if (0==n)
+        return c;
+
+    /* Eliminate postfix whitespace */
+    for (i = n - 1;  (i > 0) && (isspace (c[i]) || ';'==c[i]);  i--)
+        c[i] = 0;
+
+    /* Find start of non-whitespace */
+    while (0 != *start  &&  (';'==*start  ||  isspace (*start)))
+        start++;
+
+    n = strlen (start);
+    if (0==n) {
+        c[0] = 0;
+        return c;
+    }
+
+    memmove (c, start, n + 1);
+    return c;
+}
+
+
+
+/*****************************************************************************/
+char *pj_shrink (char *c) {
+/******************************************************************************
+Collapse repeated whitespace. Remove '+' and ';'. Make ',' and '=' greedy,
+consuming their surrounding whitespace.
+******************************************************************************/
+    size_t i, j, n;
+
+    /* Flag showing that a whitespace (ws) has been written after last non-ws */
+    size_t ws;
+
+    if (0==c)
+       return 0;
+
+    pj_chomp (c);
+    n = strlen (c);
+
+    /* First collapse repeated whitespace (including +/;) */
+    for (i = j = 0, ws = 0;  j < n;  j++) {
+
+        /* Eliminate prefix '+', only if preceeded by whitespace */
+        /* (i.e. keep it in 1.23e+08) */
+        if ((i > 0) && ('+'==c[j]) && isspace (c[i]))
+            c[j] = ' ';
+
+        if (isspace (c[j]) || ';'==c[j]) {
+            if (0==ws && (i > 0))
+                c[i++] = ' ';
+            ws = 1;
+            continue;
+        }
+        else {
+            ws = 0;
+            c[i++] = c[j];
+        }
+    }
+    c[i] = 0;
+    n = strlen(c);
+
+    /* Then make ',' and '=' greedy */
+    for (i = j = 0;  j < n;  j++) {
+        if (i==0) {
+            c[i++] = c[j];
+            continue;
+        }
+
+        /* Skip space before '='/',' */
+        if ('='==c[j] || ','==c[j]) {
+            if (c[i - 1]==' ')
+               c[i - 1] = c[j];
+            else
+                c[i++] = c[j];
+            continue;
+        }
+
+        if (' '==c[j] && ('='==c[i - 1] || ','==c[i - 1]) )
+            continue;
+
+        c[i++] = c[j];
+    }
+    c[i] = 0;
+    return c;
+}
+
+
+
+/*****************************************************************************/
+size_t pj_trim_argc (char *args) {
+/******************************************************************************
+Trim all unnecessary whitespace (and non-essential syntactic tokens) from the
+argument string, args, and count its number of elements.
+******************************************************************************/
+    size_t i, m, n;
+    pj_shrink (args);
+    n = strlen (args);
+    if (n==0)
+        return 0;
+    for (i = m = 0;  i < n;  i++) {
+        if (' '==args[i]) {
+            args[i] = 0;
+            m++;
+        }
+    }
+    return m + 1;
+}
+
+
+
+/*****************************************************************************/
+char **pj_trim_argv (size_t argc, char *args) {
+/******************************************************************************
+Create an argv-style array from elements placed in the argument string, args.
+
+args is a trimmed string as returned by pj_trim_argc(), and argc is the number
+of trimmed strings found (i.e. the return value of pj_trim_args()). Hence,
+    int argc    = pj_trim_argc (args);
+    char **argv = pj_trim_argv (argc, args);
+will produce a classic style (argc, argv) pair from a string of whitespace
+separated args. No new memory is allocated for storing the individual args
+(they stay in the args string), but for the pointers to the args a new array
+is allocated and returned.
+
+It is the duty of the caller to free this array.
+******************************************************************************/
+    size_t i, j;
+    char **argv;
+
+    if (0==args)
+        return 0;
+    if (0==argc)
+        return 0;
+
+
+    /* turn the input string into an array of strings */
+    argv = (char **) calloc (argc, sizeof (char *));
+    if (0==argv)
+        return 0;
+    argv[0] = args;
+    for (i = 0, j = 1;  ;  i++) {
+        if (0==args[i]) {
+            argv[j++] = args + (i + 1);
+        }
+        if (j==argc)
+            break;
+    }
+    return argv;
+}
+
+
+
+/*****************************************************************************/
+char *pj_make_args (size_t argc, char **argv) {
+/******************************************************************************
+pj_make_args is the inverse of the pj_trim_argc/pj_trim_argv combo: It
+converts free format command line input to something proj_create can consume.
+
+Allocates, and returns, an array of char, large enough to hold a whitespace
+separated copy of the args in argv. It is the duty of the caller to free this
+array.
+******************************************************************************/
+    size_t i, n;
+    char *p;
+
+    for (i = n = 0;  i < argc;  i++)
+        n += strlen (argv[i]);
+
+    p = pj_calloc (n + argc + 1, sizeof (char));
+    if (0==p)
+        return 0;
+    if (0==argc)
+        return p;
+
+    for (i = n = 0;  i < argc;  i++) {
+        strcat (p, argv[i]);
+        strcat (p, " ");
+    }
+    return pj_shrink (p);
+}
+
+
+
+/*****************************************************************************/
+void proj_context_errno_set (PJ_CONTEXT *ctx, int err) {
+/******************************************************************************
+Raise an error directly on a context, without going through a PJ belonging
+to that context.
+******************************************************************************/
+    if (0==ctx)
+        ctx = pj_get_default_ctx();
+    pj_ctx_set_errno (ctx, err);
+    return;
+}
+
+
+
+
+
+
+/*  logging  */
+
+/* pj_vlog resides in pj_log.c and relates to pj_log as vsprintf relates to sprintf */
+void pj_vlog( projCtx ctx, int level, const char *fmt, va_list args );
+
+
+/***************************************************************************************/
+enum proj_log_level proj_log_level (PJ_CONTEXT *ctx, enum proj_log_level log_level) {
+/****************************************************************************************
+   Set logging level 0-3. Higher number means more debug info. 0 turns it off
+****************************************************************************************/
+    enum proj_log_level previous;
+    if (0==ctx)
+        ctx = pj_get_default_ctx();
+    if (0==ctx)
+        return PJ_LOG_TELL;
+    previous = abs (ctx->debug_level);
+    if (PJ_LOG_TELL==log_level)
+        return previous;
+    ctx->debug_level = log_level;
+    return previous;
+}
+
+
+/*****************************************************************************/
+void proj_log_error (PJ *P, const char *fmt, ...) {
+/******************************************************************************
+   For reporting the most severe events.
+******************************************************************************/
+    va_list args;
+    va_start( args, fmt );
+    pj_vlog (pj_get_ctx (P), PJ_LOG_ERROR , fmt, args);
+    va_end( args );
+}
+
+
+/*****************************************************************************/
+void proj_log_debug (PJ *P, const char *fmt, ...) {
+/******************************************************************************
+   For reporting debugging information.
+******************************************************************************/
+    va_list args;
+    va_start( args, fmt );
+    pj_vlog (pj_get_ctx (P), PJ_LOG_DEBUG_MAJOR , fmt, args);
+    va_end( args );
+}
+
+
+/*****************************************************************************/
+void proj_log_trace (PJ *P, const char *fmt, ...) {
+/******************************************************************************
+   For reporting embarrasingly detailed debugging information.
+******************************************************************************/
+    va_list args;
+    va_start( args, fmt );
+    pj_vlog (pj_get_ctx (P), PJ_LOG_DEBUG_MINOR , fmt, args);
+    va_end( args );
+}
+
+
+/*****************************************************************************/
+void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION log) {
+/******************************************************************************
+    Put a new logging function into P's context. The opaque object app_data is
+    passed as first arg at each call to the logger
+******************************************************************************/
+    if (0==ctx)
+        pj_get_default_ctx ();
+    if (0==ctx)
+        return;
+    ctx->app_data = app_data;
+    if (0!=log)
+        ctx->logger = log;
+}
diff --git a/src/pj_inv.c b/src/pj_inv.c
index 9a34176..5e44eb3 100644
--- a/src/pj_inv.c
+++ b/src/pj_inv.c
@@ -1,42 +1,254 @@
-/* general inverse projection */
-#define PJ_LIB__
-#include <projects.h>
+/******************************************************************************
+ * Project:  PROJ.4
+ * Purpose:  Inverse operation invocation
+ * Author:   Thomas Knudsen,  thokn at sdfe.dk,  2018-01-02
+ *           Based on material from Gerald Evenden (original pj_inv)
+ *           and Piyush Agram (original pj_inv3d)
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam
+ * Copyright (c) 2018, Thomas Knudsen / SDFE
+ *
+ * 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 <errno.h>
-# define EPS 1.0e-12
-	LP /* inverse projection entry */
-pj_inv(XY xy, PJ *P) {
-	LP lp;
-
-	/* can't do as much preliminary checking as with forward */
-	if (xy.x == HUGE_VAL || xy.y == HUGE_VAL) {
-		lp.lam = lp.phi = HUGE_VAL;
-		pj_ctx_set_errno( P->ctx, -15);
-                return lp;
-	}
-
-	errno = pj_errno = 0;
-        P->ctx->last_errno = 0;
-
-	xy.x = (xy.x * P->to_meter - P->x0) * P->ra; /* descale and de-offset */
-	xy.y = (xy.y * P->to_meter - P->y0) * P->ra;
-
-        /* Check for NULL pointer */
-        if (P->inv != NULL)
-        {
-	    lp = (*P->inv)(xy, P); /* inverse project */
-	    if (P->ctx->last_errno )
-		lp.lam = lp.phi = HUGE_VAL;
-	    else {
-		lp.lam += P->lam0; /* reduce from del lp.lam */
-		if (!P->over)
-			lp.lam = adjlon(lp.lam); /* adjust longitude to CM */
-		if (P->geoc && fabs(fabs(lp.phi)-M_HALFPI) > EPS)
-			lp.phi = atan(P->one_es * tan(lp.phi));
-	    }
+
+#include "proj_internal.h"
+#include "projects.h"
+
+#define INPUT_UNITS  P->right
+#define OUTPUT_UNITS P->left
+
+static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) {
+    if (coo.xyz.x == HUGE_VAL) {
+        proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y);
+        return proj_coord_error ();
+    }
+
+    /* The helmert datum shift will choke unless it gets a sensible 4D coordinate */
+    if (HUGE_VAL==coo.v[2] && P->helmert) coo.v[2] = 0.0;
+    if (HUGE_VAL==coo.v[3] && P->helmert) coo.v[3] = 0.0;
+
+    if (P->axisswap)
+        coo = proj_trans (P->axisswap, PJ_INV, coo);
+
+    /* Check validity of angular input coordinates */
+    if (INPUT_UNITS==PJ_IO_UNITS_ANGULAR) {
+        double t;
+
+        /* check for latitude or longitude over-range */
+        t = (coo.lp.phi < 0  ?  -coo.lp.phi  :  coo.lp.phi) - M_HALFPI;
+        if (t > PJ_EPS_LAT  ||  coo.lp.lam > 10  ||  coo.lp.lam < -10) {
+            proj_errno_set (P, PJD_ERR_LAT_OR_LON_EXCEED_LIMIT);
+            return proj_coord_error ();
+        }
+
+        /* Clamp latitude to -90..90 degree range */
+        if (coo.lp.phi > M_HALFPI)
+            coo.lp.phi = M_HALFPI;
+        if (coo.lp.phi < -M_HALFPI)
+            coo.lp.phi = -M_HALFPI;
+
+        /* If input latitude is geocentrical, convert to geographical */
+        if (P->geoc)
+            coo = proj_geocentric_latitude (P, PJ_INV, coo);
+
+        /* Distance from central meridian, taking system zero meridian into account */
+        coo.lp.lam = (coo.lp.lam + P->from_greenwich) - P->lam0;
+
+        /* Ensure longitude is in the -pi:pi range */
+        if (0==P->over)
+            coo.lp.lam = adjlon(coo.lp.lam);
+
+        if (P->hgridshift)
+            coo = proj_trans (P->hgridshift, PJ_FWD, coo);
+        else if (P->helmert) {
+            coo = proj_trans (P->cart,       PJ_FWD, coo); /* Go cartesian in local frame */
+            coo = proj_trans (P->helmert,    PJ_INV, coo); /* Step into WGS84 */
+            coo = proj_trans (P->cart_wgs84, PJ_INV, coo); /* Go back to angular using WGS84 ellps */
         }
-        else
-        {
-           lp.lam = lp.phi = HUGE_VAL;
+        if (P->vgridshift)
+            coo = proj_trans (P->vgridshift, PJ_INV, coo);
+        return coo;
+    }
+
+    /* Handle remaining possible input types */
+    switch (INPUT_UNITS) {
+    case PJ_IO_UNITS_WHATEVER:
+        return coo;
+
+    /* de-scale and de-offset */
+    case PJ_IO_UNITS_CARTESIAN:
+        coo.xyz.x = P->to_meter * coo.xyz.x - P->x0;
+        coo.xyz.y = P->to_meter * coo.xyz.y - P->y0;
+        coo.xyz.z = P->to_meter * coo.xyz.z - P->z0;
+
+        if (P->is_geocent) {
+            coo = proj_trans (P->cart, PJ_INV, coo);
         }
-	return lp;
+
+        return coo;
+
+    case PJ_IO_UNITS_PROJECTED:
+    case PJ_IO_UNITS_CLASSIC:
+        coo.xyz.x = P->to_meter  * coo.xyz.x - P->x0;
+        coo.xyz.y = P->to_meter  * coo.xyz.y - P->y0;
+        coo.xyz.z = P->vto_meter * coo.xyz.z - P->z0;
+        if (INPUT_UNITS==PJ_IO_UNITS_PROJECTED)
+            return coo;
+
+        /* Classic proj.4 functions expect plane coordinates in units of the semimajor axis  */
+        /* Multiplying by ra, rather than dividing by a because the CALCOFI projection       */
+        /* stomps on a and hence (apparently) depends on this to roundtrip correctly         */
+        /* (CALCOFI avoids further scaling by stomping - but a better solution is possible)  */
+        coo.xyz.x *= P->ra;
+        coo.xyz.y *= P->ra;
+        return coo;
+    /* Silence some compiler warnings about PJ_IO_UNITS_ANGULAR not handled */
+    default:
+        break;
+    }
+
+    /* Should not happen, so we could return pj_coord_err here */
+    return coo;
+}
+
+
+
+static PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) {
+    if (coo.xyz.x == HUGE_VAL) {
+        proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y);
+        return proj_coord_error ();
+    }
+
+    if (OUTPUT_UNITS==PJ_IO_UNITS_ANGULAR) {
+
+        if (INPUT_UNITS!=PJ_IO_UNITS_ANGULAR) {
+            /* Distance from central meridian, taking system zero meridian into account */
+            coo.lp.lam = coo.lp.lam + P->from_greenwich + P->lam0;
+
+            /* adjust longitude to central meridian */
+            if (0==P->over)
+                coo.lpz.lam = adjlon(coo.lpz.lam);
+
+            if (P->vgridshift)
+                coo = proj_trans (P->vgridshift, PJ_INV, coo);
+            if (P->hgridshift)
+                coo = proj_trans (P->hgridshift, PJ_FWD, coo);
+            else if (P->helmert) {
+                coo = proj_trans (P->cart,       PJ_FWD, coo); /* Go cartesian in local frame */
+                coo = proj_trans (P->helmert,    PJ_INV, coo); /* Step into WGS84 */
+                coo = proj_trans (P->cart_wgs84, PJ_INV, coo); /* Go back to angular using WGS84 ellps */
+            }
+        }
+
+        /* If input latitude was geocentrical, convert back to geocentrical */
+        if (P->geoc)
+            coo = proj_geocentric_latitude (P, PJ_FWD, coo);
+    }
+
+    return coo;
+}
+
+
+
+LP pj_inv(XY xy, PJ *P) {
+    PJ_COORD coo = {{0,0,0,0}};
+    coo.xy = xy;
+
+    if (!P->skip_inv_prepare)
+        coo = pj_inv_prepare (P, coo);
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ().lp;
+
+    /* Do the transformation, using the lowest dimensional transformer available */
+    if (P->inv)
+        coo.lp = P->inv(coo.xy, P);
+    else if (P->inv3d)
+        coo.lpz = P->inv3d (coo.xyz, P);
+    else if (P->inv4d)
+        coo = P->inv4d (coo, P);
+    else {
+        proj_errno_set (P, EINVAL);
+        return proj_coord_error ().lp;
+    }
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ().lp;
+
+    if (!P->skip_inv_finalize)
+        coo = pj_inv_finalize (P, coo);
+    return coo.lp;
+}
+
+
+
+LPZ pj_inv3d (XYZ xyz, PJ *P) {
+    PJ_COORD coo = {{0,0,0,0}};
+    coo.xyz = xyz;
+
+    if (!P->skip_inv_prepare)
+        coo = pj_inv_prepare (P, coo);
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ().lpz;
+
+    /* Do the transformation, using the lowest dimensional transformer feasible */
+    if (P->inv3d)
+        coo.lpz = P->inv3d (coo.xyz, P);
+    else if (P->inv4d)
+        coo = P->inv4d (coo, P);
+    else if (P->inv)
+        coo.lp = P->inv (coo.xy, P);
+    else {
+        proj_errno_set (P, EINVAL);
+        return proj_coord_error ().lpz;
+    }
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ().lpz;
+
+    if (!P->skip_inv_finalize)
+        coo = pj_inv_finalize (P, coo);
+    return coo.lpz;
+}
+
+
+
+PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P) {
+    if (!P->skip_inv_prepare)
+        coo = pj_inv_prepare (P, coo);
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ();
+
+    /* Call the highest dimensional converter available */
+    if (P->inv4d)
+        coo = P->inv4d (coo, P);
+    else if (P->inv3d)
+        coo.lpz = P->inv3d (coo.xyz, P);
+    else if (P->inv)
+        coo.lp = P->inv (coo.xy, P);
+    else {
+        proj_errno_set (P, EINVAL);
+        return proj_coord_error ();
+    }
+    if (HUGE_VAL==coo.v[0])
+        return proj_coord_error ();
+
+    if (!P->skip_inv_finalize)
+        coo = pj_inv_finalize (P, coo);
+    return coo;
 }
diff --git a/src/pj_inv3d.c b/src/pj_inv3d.c
deleted file mode 100644
index bf6a932..0000000
--- a/src/pj_inv3d.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* general inverse projection */
-#define PJ_LIB__
-#include <projects.h>
-#include <errno.h>
-# define EPS 1.0e-12
-	LPZ /* inverse projection entry */
-pj_inv3d(XYZ xyz, PJ *P) {
-	LPZ lpz;
-
-	/* can't do as much preliminary checking as with forward */
-	if (xyz.x == HUGE_VAL || xyz.y == HUGE_VAL || xyz.z == HUGE_VAL ) {
-		lpz.lam = lpz.phi = lpz.z = HUGE_VAL;
-		pj_ctx_set_errno( P->ctx, -15);
-                return lpz;
-	}
-
-	errno = pj_errno = 0;
-        P->ctx->last_errno = 0;
-
-	xyz.x = (xyz.x * P->to_meter - P->x0) * P->ra; /* descale and de-offset */
-	xyz.y = (xyz.y * P->to_meter - P->y0) * P->ra;
-        /* z is not scaled since that is handled by vto_meter before we get here */
-
-        /* Check for NULL pointer */
-        if (P->inv3d != NULL)
-        {
-	    lpz = (*P->inv3d)(xyz, P); /* inverse project */
-	    if (P->ctx->last_errno )
-		lpz.lam = lpz.phi = lpz.z = HUGE_VAL;
-	    else {
-		lpz.lam += P->lam0; /* reduce from del lp.lam */
-		if (!P->over)
-			lpz.lam = adjlon(lpz.lam); /* adjust longitude to CM */
-
-                /* This may be redundant and never used */
-		if (P->geoc && fabs(fabs(lpz.phi)-M_HALFPI) > EPS)
-			lpz.phi = atan(P->one_es * tan(lpz.phi));
-	    }
-        }
-        else
-        {
-            lpz.lam = lpz.phi = lpz.z = HUGE_VAL;
-        }
-	return lpz;
-}
diff --git a/src/pj_list.c b/src/pj_list.c
index 9fde000..d34e055 100644
--- a/src/pj_list.c
+++ b/src/pj_list.c
@@ -2,54 +2,36 @@
 ** Use local definition of PJ_LIST_H for subset.
 */
 
+#include "proj.h"
+
 #define USE_PJ_LIST_H 1
 #include "projects.h"
 
 
-
-#define PASTE(a,b) a##b
-
 /* Generate prototypes for projection functions */
 #define PROJ_HEAD(id, name) struct PJconsts *pj_##id(struct PJconsts*);
 #include "pj_list.h"
 #undef PROJ_HEAD
 
-/* Generate prototypes for projection selftest functions */
-#define PROJ_HEAD(id, name) int PASTE(pj_##id, _selftest) (void);
-#include "pj_list.h"
-#undef PROJ_HEAD
-
-
 /* Generate extern declarations for description strings */
 #define PROJ_HEAD(id, name) extern char * const pj_s_##id;
 #include "pj_list.h"
 #undef PROJ_HEAD
 
-
 /* Generate the null-terminated list of projection functions with associated mnemonics and descriptions */
 #define PROJ_HEAD(id, name) {#id, pj_##id, &pj_s_##id},
-struct PJ_LIST pj_list[] = {
+const struct PJ_LIST pj_list[] = {
 #include "pj_list.h"
 		{0,     0,  0},
 	};
 #undef PROJ_HEAD
 
 
-/* Generate the null-terminated list of projection selftest functions with associated mnemonics */
-#define PROJ_HEAD(id, name) {#id, PASTE(pj_##id, _selftest)},
-struct PJ_SELFTEST_LIST pj_selftest_list[] = {
-#include "pj_list.h"
-		{0,     0},
-	};
-#undef PROJ_HEAD
-#undef PASTE
-
-
-struct PJ_LIST  *pj_get_list_ref (void) {
-    return pj_list;
+struct PJ_LIST *pj_get_list_ref()
+{
+    return (struct PJ_LIST *)pj_list;
 }
 
-
-struct PJ_SELFTEST_LIST  *pj_get_selftest_list_ref (void) {
-    return pj_selftest_list;
+const PJ_OPERATIONS *proj_list_operations(void) {
+    return pj_list;
 }
diff --git a/src/pj_list.h b/src/pj_list.h
index 454c0a3..09a6603 100644
--- a/src/pj_list.h
+++ b/src/pj_list.h
@@ -12,18 +12,22 @@ PROJ_HEAD(aitoff, "Aitoff")
 PROJ_HEAD(alsk, "Mod. Stererographics of Alaska")
 PROJ_HEAD(apian, "Apian Globular I")
 PROJ_HEAD(august, "August Epicycloidal")
+PROJ_HEAD(axisswap, "Axis ordering")
 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(cart,    "Geodetic/cartesian conversions")
 PROJ_HEAD(cass, "Cassini")
 PROJ_HEAD(cc, "Central Cylindrical")
+PROJ_HEAD(ccon, "Central Conic")
 PROJ_HEAD(cea, "Equal Area Cylindrical")
 PROJ_HEAD(chamb, "Chamberlin Trimetric")
 PROJ_HEAD(collg, "Collignon")
 PROJ_HEAD(comill, "Compact Miller")
 PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)")
+PROJ_HEAD(deformation, "Kinematic grid shift")
 PROJ_HEAD(denoy, "Denoyer Semi-Elliptical")
 PROJ_HEAD(eck1, "Eckert I")
 PROJ_HEAD(eck2, "Eckert II")
@@ -39,6 +43,7 @@ PROJ_HEAD(fahey, "Fahey")
 PROJ_HEAD(fouc, "Foucaut")
 PROJ_HEAD(fouc_s, "Foucaut Sinusoidal")
 PROJ_HEAD(gall, "Gall (Gall Stereographic)")
+PROJ_HEAD(geoc, "Geocentric Latitude")
 PROJ_HEAD(geocent, "Geocentric")
 PROJ_HEAD(geos, "Geostationary Satellite View")
 PROJ_HEAD(gins8, "Ginsburg VIII (TsNIIGAiK)")
@@ -51,8 +56,11 @@ PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
 PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area")
 PROJ_HEAD(healpix, "HEALPix")
 PROJ_HEAD(rhealpix, "rHEALPix")
+PROJ_HEAD(helmert,   "3- and 7-parameter Helmert shift")
+PROJ_HEAD(hgridshift, "Horizontal grid shift")
+PROJ_HEAD(horner,    "Horner polynomial evaluation")
 PROJ_HEAD(igh,  "Interrupted Goode Homolosine")
-PROJ_HEAD(imw_p, "Internation Map of the World Polyconic")
+PROJ_HEAD(imw_p, "International Map of the World Polyconic")
 PROJ_HEAD(isea, "Icosahedral Snyder Equal Area")
 PROJ_HEAD(kav5, "Kavraisky V")
 PROJ_HEAD(kav7, "Kavraisky VII")
@@ -82,6 +90,7 @@ PROJ_HEAD(mil_os, "Miller Oblated Stereographic")
 PROJ_HEAD(mill, "Miller Cylindrical")
 PROJ_HEAD(misrsom, "Space oblique for MISR")
 PROJ_HEAD(moll, "Mollweide")
+PROJ_HEAD(molodensky, "Molodensky transform")
 PROJ_HEAD(murd1, "Murdoch I")
 PROJ_HEAD(murd2, "Murdoch II")
 PROJ_HEAD(murd3, "Murdoch III")
@@ -100,6 +109,7 @@ PROJ_HEAD(ortel, "Ortelius Oval")
 PROJ_HEAD(ortho, "Orthographic")
 PROJ_HEAD(pconic, "Perspective Conic")
 PROJ_HEAD(patterson, "Patterson Cylindrical")
+PROJ_HEAD(pipeline, "Transformation pipeline manager")
 PROJ_HEAD(poly, "Polyconic (American)")
 PROJ_HEAD(putp1, "Putnins P1")
 PROJ_HEAD(putp2, "Putnins P2")
@@ -128,6 +138,7 @@ PROJ_HEAD(tissot, "Tissot Conic")
 PROJ_HEAD(tmerc, "Transverse Mercator")
 PROJ_HEAD(tpeqd, "Two Point Equidistant")
 PROJ_HEAD(tpers, "Tilted perspective")
+PROJ_HEAD(unitconvert, "Unit conversion")
 PROJ_HEAD(ups, "Universal Polar Stereographic")
 PROJ_HEAD(urm5, "Urmaev V")
 PROJ_HEAD(urmfps, "Urmaev Flat-Polar Sinusoidal")
@@ -137,6 +148,7 @@ PROJ_HEAD(vandg2, "van der Grinten II")
 PROJ_HEAD(vandg3, "van der Grinten III")
 PROJ_HEAD(vandg4, "van der Grinten IV")
 PROJ_HEAD(vitk1, "Vitkovsky I")
+PROJ_HEAD(vgridshift, "Vertical grid shift")
 PROJ_HEAD(wag1, "Wagner I (Kavraisky VI)")
 PROJ_HEAD(wag2, "Wagner II")
 PROJ_HEAD(wag3, "Wagner III")
diff --git a/src/pj_log.c b/src/pj_log.c
index 54b83a0..bab5f07 100644
--- a/src/pj_log.c
+++ b/src/pj_log.c
@@ -25,6 +25,7 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
+#include "proj.h"
 #include <projects.h>
 #include <string.h>
 #include <stdarg.h>
@@ -42,30 +43,53 @@ void pj_stderr_logger( void *app_data, int level, const char *msg )
 }
 
 /************************************************************************/
-/*                               pj_log()                               */
+/*                               pj_vlog()                              */
 /************************************************************************/
-
-void pj_log( projCtx ctx, int level, const char *fmt, ... )
+void pj_vlog( projCtx ctx, int level, const char *fmt, va_list args );
+/* Workhorse for the log functions - relates to pj_log as vsprintf relates to sprintf */
+void pj_vlog( projCtx ctx, int level, const char *fmt, va_list args )
 
 {
-    va_list args;
     char *msg_buf;
+    int debug_level = ctx->debug_level;
+    int shutup_unless_errno_set = debug_level < 0;
 
-    if( level > ctx->debug_level )
+    /* For negative debug levels, we first start logging when errno is set */
+    if (ctx->last_errno==0 && shutup_unless_errno_set)
+        return;
+
+    if (debug_level < 0)
+        debug_level = -debug_level;
+
+    if( level > debug_level )
         return;
 
     msg_buf = (char *) malloc(100000);
     if( msg_buf == NULL )
         return;
 
-    va_start( args, fmt );
-
     /* we should use vsnprintf where available once we add configure detect.*/
     vsprintf( msg_buf, fmt, args );
 
-    va_end( args );
-
     ctx->logger( ctx->app_data, level, msg_buf );
-    
+
     free( msg_buf );
 }
+
+
+/************************************************************************/
+/*                               pj_log()                               */
+/************************************************************************/
+
+void pj_log( projCtx ctx, int level, const char *fmt, ... )
+
+{
+    va_list args;
+
+    if( level > ctx->debug_level )
+        return;
+
+    va_start( args, fmt );
+    pj_vlog( ctx, level, fmt, args );
+    va_end( args );
+}
diff --git a/src/pj_malloc.c b/src/pj_malloc.c
index aab69e9..cfb7f65 100644
--- a/src/pj_malloc.c
+++ b/src/pj_malloc.c
@@ -1,41 +1,95 @@
+/******************************************************************************
+ * Project:  PROJ.4
+ * Purpose:  Memory management for proj.4.
+ *           This version includes an implementation of generic destructors,
+ *           for memory deallocation for the large majority of PJ-objects
+ *           that do not allocate anything else than the PJ-object itself,
+ *           and its associated opaque object - i.e. no additional malloc'ed
+ *           memory inside the opaque object.
+ *
+ * Author:   Gerald I. Evenden (Original proj.4 author),
+ *           Frank Warmerdam   (2000)  pj_malloc?
+ *           Thomas Knudsen    (2016) - freeup/dealloc parts
+ *
+ ******************************************************************************
+ * Copyright (c) 2000, Frank Warmerdam
+ * Copyright (c) 2016, Thomas Knudsen / SDFE
+ *
+ * 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.
+ *****************************************************************************/
+
+
 /* allocate and deallocate memory */
 /* These routines are used so that applications can readily replace
 ** projection system memory allocation/deallocation call with custom
 ** application procedures.  */
-#include <projects.h>
+
+#include <proj.h>
+#include "projects.h"
 #include <errno.h>
 
-	void *
-pj_malloc(size_t size) {
-/*
-/ Currently, pj_malloc is a hack to solve an errno problem.
-/ The problem is described in more details at
-/ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86420.
-/ It seems, that pj_init and similar functions incorrectly
-/ (under debian/glibs-2.3.2) assume that pj_malloc resets
-/ errno after success. pj_malloc tries to mimic this.
-*/
-        int old_errno = errno;
-        void *res = malloc(size);
-        if ( res && !old_errno )
-                errno = 0;
-        return res;
-}
-	void
-pj_dalloc(void *ptr) {
-	free(ptr);
+/**********************************************************************/
+void *pj_malloc(size_t size) {
+/***********************************************************************
+Currently, pj_malloc is a hack to solve an errno problem.
+The problem is described in more details at
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86420.
+It seems, that pj_init and similar functions incorrectly
+(under debian/glibs-2.3.2) assume that pj_malloc resets
+errno after success. pj_malloc tries to mimic this.
+
+NOTE (2017-09-29): The problem described at the bugzilla page
+referred to above, is most likely a case of someone not
+understanding the proper usage of errno. We should review
+whether "the problem is actually a problem" in PROJ.4 code.
+
+Library specific allocators can be useful, and improve
+interoperability, if properly used. That is, by making them
+run/initialization time switchable, somewhat like the file i/o
+interface.
+
+But as things stand, we are more likely to get benefit
+from reviewing the code for proper errno usage, which is hard,
+due to the presence of context local and global pj_errnos.
+
+Probably, these were introduced in order to support incomplete
+implementations of thread local errnos at an early phase of the
+implementation of multithreading support in PROJ.4).
+
+It is likely too late to get rid of contexts, but we can still
+benefit from a better usage of errno.
+***********************************************************************/
+    int old_errno = errno;
+    void *res = malloc(size);
+    if ( res && !old_errno )
+            errno = 0;
+    return res;
 }
 
 
 /**********************************************************************/
 void *pj_calloc (size_t n, size_t size) {
 /***********************************************************************
-
 pj_calloc is the pj-equivalent of calloc().
 
 It allocates space for an array of <n> elements of size <size>.
 The array is initialized to zeros.
-
 ***********************************************************************/
     void *res = pj_malloc (n*size);
     if (0==res)
@@ -46,9 +100,15 @@ The array is initialized to zeros.
 
 
 /**********************************************************************/
+void pj_dalloc(void *ptr) {
+/**********************************************************************/
+    free(ptr);
+}
+
+
+/**********************************************************************/
 void *pj_dealloc (void *ptr) {
 /***********************************************************************
-
 pj_dealloc supports the common use case of "clean up and return a null
 pointer" to signal an error in a multi level allocation:
 
@@ -70,3 +130,106 @@ pointer" to signal an error in a multi level allocation:
     pj_dalloc (ptr);
     return 0;
 }
+
+/**********************************************************************/
+char *pj_strdup(const char *str)
+/**********************************************************************/
+{
+    size_t len = strlen(str) + 1;
+    char *dup = pj_malloc(len);
+    if (dup)
+        memcpy(dup, str, len);
+    return dup;
+}
+
+
+/*****************************************************************************/
+void *pj_dealloc_params (PJ_CONTEXT *ctx, paralist *start, int errlev) {
+/*****************************************************************************
+    Companion to pj_default_destructor (below). Deallocates a linked list
+    of "+proj=xxx" initialization parameters.
+
+    Also called from pj_init_ctx when encountering errors before the PJ
+    proper is allocated.
+******************************************************************************/
+    paralist *t, *n;
+    for (t = start; t; t = n) {
+        n = t->next;
+        pj_dealloc(t);
+    }
+    pj_ctx_set_errno (ctx, errlev);
+    return (void *) 0;
+}
+
+
+
+
+/************************************************************************/
+/*                              pj_free()                               */
+/*                                                                      */
+/*      This is the application callable entry point for destroying     */
+/*      a projection definition.  It does work generic to all           */
+/*      projection types, and then calls the projection specific        */
+/*      free function, P->destructor(), to do local work.               */
+/*      In most cases P->destructor()==pj_default_destructor.           */
+/************************************************************************/
+
+void pj_free(PJ *P) {
+    if (0==P)
+        return;
+    /* free projection parameters - all the hard work is done by */
+    /* pj_default_destructor, which is supposed */
+    /* to be called as the last step of the local destructor     */
+    /* pointed to by P->destructor. In most cases,               */
+    /* pj_default_destructor actually *is* what is pointed to    */
+    P->destructor (P, 0);
+}
+
+
+
+
+/*****************************************************************************/
+void *pj_default_destructor (PJ *P, int errlev) {   /* Destructor */
+/*****************************************************************************
+    Does memory deallocation for "plain" PJ objects, i.e. that vast majority
+    of PJs where the opaque object does not contain any additionally
+    allocated memory below the P->opaque level.
+******************************************************************************/
+
+    /* Even if P==0, we set the errlev on pj_error and the default context   */
+    /* Note that both, in the multithreaded case, may then contain undefined */
+    /* values. This is expected behaviour. For MT have one ctx per thread    */
+    if (0!=errlev)
+        pj_ctx_set_errno (pj_get_ctx(P), errlev);
+
+    if (0==P)
+        return 0;
+
+    /* free grid lists */
+    pj_dealloc( P->gridlist );
+    pj_dealloc( P->vgridlist_geoid );
+    pj_dealloc( P->catalog_name );
+
+    /* We used to call pj_dalloc( P->catalog ), but this will leak */
+    /* memory. The safe way to clear catalog and grid is to call */
+    /* pj_gc_unloadall(pj_get_default_ctx()); and pj_deallocate_grids(); */
+    /* TODO: we should probably have a public pj_cleanup() method to do all */
+    /* that */
+
+    /* free the interface to Charles Karney's geodesic library */
+    pj_dealloc( P->geod );
+
+    /* free parameter list elements */
+    pj_dealloc_params (pj_get_ctx(P), P->params, errlev);
+
+    /* free the cs2cs emulation elements */
+    pj_free (P->axisswap);
+    pj_free (P->helmert);
+    pj_free (P->cart);
+    pj_free (P->cart_wgs84);
+    pj_free (P->hgridshift);
+    pj_free (P->vgridshift);
+
+    pj_dealloc (P->opaque);
+    return pj_dealloc(P);
+}
diff --git a/src/pj_mlfn.c b/src/pj_mlfn.c
index aeab611..e00f2bf 100644
--- a/src/pj_mlfn.c
+++ b/src/pj_mlfn.c
@@ -1,6 +1,6 @@
 #include <projects.h>
 /* meridinal distance for ellipsoid and inverse
-**	8th degree - accurate to < 1e-5 meters when used in conjuction
+**	8th degree - accurate to < 1e-5 meters when used in conjunction
 **		with typical major axis values.
 **	Inverse determines phi to EPS (1e-11) radians, about 1e-6 seconds.
 */
@@ -19,19 +19,23 @@
 #define EPS 1e-11
 #define MAX_ITER 10
 #define EN_SIZE 5
-	double *
-pj_enfn(double es) {
-	double t, *en;
 
-	if ((en = (double *)pj_malloc(EN_SIZE * sizeof(double))) != NULL) {
-		en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));
-		en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08)));
-		en[2] = (t = es * es) * (C44 - es * (C46 + es * C48));
-		en[3] = (t *= es) * (C66 - es * C68);
-		en[4] = t * es * C88;
-	} /* else return NULL if unable to allocate memory */
-	return en;
+double *pj_enfn(double es) {
+    double t, *en;
+
+	en = (double *) pj_malloc(EN_SIZE * sizeof (double));
+	if (0==en)
+	    return 0;
+
+    en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));
+    en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08)));
+    en[2] = (t = es * es) * (C44 - es * (C46 + es * C48));
+    en[3] = (t *= es) * (C66 - es * C68);
+	en[4] = t * es * C88;
+
+    return en;
 }
+
 	double
 pj_mlfn(double phi, double sphi, double cphi, double *en) {
 	cphi *= sphi;
diff --git a/src/pj_mutex.c b/src/pj_mutex.c
index 1590daa..2bcf31a 100644
--- a/src/pj_mutex.c
+++ b/src/pj_mutex.c
@@ -28,7 +28,7 @@
 
 /* projects.h and windows.h conflict - avoid this! */
 
-#if defined(MUTEX_pthread) && !defined(_XOPEN_SOURCE)
+#if defined(MUTEX_pthread) && !defined(_XOPEN_SOURCE) && !defined(__sun)
 /* For pthread_mutexattr_settype */
 #define _XOPEN_SOURCE 500
 #endif
diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c
index 0a2e7fe..054853c 100644
--- a/src/pj_open_lib.c
+++ b/src/pj_open_lib.c
@@ -29,6 +29,7 @@
  *****************************************************************************/
 
 #define PJ_LIB__
+#include "proj_internal.h"
 #include <projects.h>
 #include <stdio.h>
 #include <string.h>
@@ -37,7 +38,7 @@
 static const char *(*pj_finder)(const char *) = NULL;
 static int path_count = 0;
 static char **search_path = NULL;
-static char * proj_lib_name =
+static const char * proj_lib_name =
 #ifdef PROJ_LIB
 PROJ_LIB;
 #else
@@ -86,16 +87,26 @@ void pj_set_searchpath ( int count, const char **path )
             strcpy(search_path[i], path[i]);
         }
     }
-        
+
     path_count = count;
 }
 
+/* just a couple of helper functions that lets other functions
+   access the otherwise private search path */
+const char * const *proj_get_searchpath(void) {
+    return (const char * const *)search_path;
+}
+
+int proj_get_path_count(void) {
+    return path_count;
+}
 /************************************************************************/
-/*                            pj_open_lib()                             */
+/*                          pj_open_lib_ex()                            */
 /************************************************************************/
 
-PAFile
-pj_open_lib(projCtx ctx, const char *name, const char *mode) {
+static PAFile
+pj_open_lib_ex(projCtx ctx, const char *name, const char *mode,
+               char* out_full_filename, size_t out_full_filename_size) {
     char fname[MAX_PATH_FILENAME+1];
     const char *sysname;
     PAFile fid;
@@ -107,13 +118,18 @@ pj_open_lib(projCtx ctx, const char *name, const char *mode) {
     static const char dir_chars[] = "/";
 #endif
 
-#ifndef _WIN32_WCE
+    if( out_full_filename != NULL && out_full_filename_size > 0 )
+        out_full_filename[0] = '\0';
 
     /* check if ~/name */
     if (*name == '~' && strchr(dir_chars,name[1]) )
         if ((sysname = getenv("HOME")) != NULL) {
+            if( strlen(sysname) + 1 + strlen(name) + 1 > sizeof(fname) )
+            {
+                return NULL;
+            }
             (void)strcpy(fname, sysname);
-            fname[n = strlen(fname)] = DIR_CHAR;
+            fname[n = (int)strlen(fname)] = DIR_CHAR;
             fname[++n] = '\0';
             (void)strcpy(fname+n, name + 1);
             sysname = fname;
@@ -133,8 +149,12 @@ pj_open_lib(projCtx ctx, const char *name, const char *mode) {
 
     /* or is environment PROJ_LIB defined */
     else if ((sysname = getenv("PROJ_LIB")) || (sysname = proj_lib_name)) {
+        if( strlen(sysname) + 1 + strlen(name) + 1 > sizeof(fname) )
+        {
+            return NULL;
+        }
         (void)strcpy(fname, sysname);
-        fname[n = strlen(fname)] = DIR_CHAR;
+        fname[n = (int)strlen(fname)] = DIR_CHAR;
         fname[++n] = '\0';
         (void)strcpy(fname+n, name);
         sysname = fname;
@@ -142,19 +162,36 @@ pj_open_lib(projCtx ctx, const char *name, const char *mode) {
         sysname = name;
 
     if ((fid = pj_ctx_fopen(ctx, sysname, mode)) != NULL)
+    {
+        if( out_full_filename != NULL && out_full_filename_size > 0 )
+        {
+            strncpy(out_full_filename, sysname, out_full_filename_size);
+            out_full_filename[out_full_filename_size-1] = '\0';
+        }
         errno = 0;
+    }
 
     /* If none of those work and we have a search path, try it */
     if (!fid && path_count > 0)
     {
         for (i = 0; fid == NULL && i < path_count; i++)
         {
-            sprintf(fname, "%s%c%s", search_path[i], DIR_CHAR, name);
-            sysname = fname;
-            fid = pj_ctx_fopen(ctx, sysname, mode);
+            if( strlen(search_path[i]) + 1 + strlen(name) + 1 <= sizeof(fname) )
+            {
+                sprintf(fname, "%s%c%s", search_path[i], DIR_CHAR, name);
+                sysname = fname;
+                fid = pj_ctx_fopen(ctx, sysname, mode);
+            }
         }
         if (fid)
+        {
+            if( out_full_filename != NULL && out_full_filename_size > 0 )
+            {
+                strncpy(out_full_filename, sysname, out_full_filename_size);
+                out_full_filename[out_full_filename_size-1] = '\0';
+            }
             errno = 0;
+        }
     }
 
     if( ctx->last_errno == 0 && errno != 0 )
@@ -166,7 +203,41 @@ pj_open_lib(projCtx ctx, const char *name, const char *mode) {
             fid == NULL ? "failed" : "succeeded" );
 
     return(fid);
-#else
-    return NULL;
-#endif /* _WIN32_WCE */
+}
+
+/************************************************************************/
+/*                            pj_open_lib()                             */
+/************************************************************************/
+
+PAFile
+pj_open_lib(projCtx ctx, const char *name, const char *mode) {
+    return pj_open_lib_ex(ctx, name, mode, NULL, 0);
+}
+
+/************************************************************************/
+/*                           pj_find_file()                             */
+/************************************************************************/
+
+/** Returns the full filename corresponding to a proj resource file specified
+ *  as a short filename.
+ * 
+ * @param ctx context.
+ * @param short_filename short filename (e.g. egm96_15.gtx)
+ * @param out_full_filename output buffer, of size out_full_filename_size, that
+ *                          will receive the full filename on success.
+ *                          Will be zero-terminated.
+ * @param out_full_filename_size size of out_full_filename.
+ * @return 1 if the file was found, 0 otherwise.
+ */
+int pj_find_file(projCtx ctx, const char *short_filename,
+                 char* out_full_filename, size_t out_full_filename_size)
+{
+    PAFile f = pj_open_lib_ex(ctx, short_filename, "rb", out_full_filename,
+                              out_full_filename_size);
+    if( f != NULL )
+    {
+        pj_ctx_fclose(ctx, f);
+        return 1;
+    }
+    return 0;
 }
diff --git a/src/pj_param.c b/src/pj_param.c
index 434d453..133f3ea 100644
--- a/src/pj_param.c
+++ b/src/pj_param.c
@@ -1,21 +1,92 @@
 /* put parameters in linked list and retrieve */
-#include <projects.h>
+#include <ctype.h>
 #include <stdio.h>
 #include <string.h>
-	paralist * /* create parameter list entry */
-pj_mkparam(char *str) {
-	paralist *newitem;
-
-	if((newitem = (paralist *)pj_malloc(sizeof(paralist) + strlen(str))) != NULL) {
-		newitem->used = 0;
-		newitem->next = 0;
-		if (*str == '+')
-			++str;
-		(void)strcpy(newitem->param, str);
-	}
-	return newitem;
+
+#include "projects.h"
+
+/* create parameter list entry */
+paralist *pj_mkparam(char *str) {
+    paralist *newitem;
+
+    if((newitem = (paralist *)pj_malloc(sizeof(paralist) + strlen(str))) != NULL) {
+        newitem->used = 0;
+        newitem->next = 0;
+        if (*str == '+')
+            ++str;
+        (void)strcpy(newitem->param, str);
+    }
+    return newitem;
+}
+
+
+/* As pj_mkparam, but payload ends at first whitespace, rather than at end of <str> */
+paralist *pj_mkparam_ws (char *str) {
+    paralist *newitem;
+    size_t len = 0;
+
+    if (0==str)
+        return 0;
+
+    /* Find start and length of string */
+    while (isspace (*str))
+        str++;
+    while ((!isspace(str[len])) && 0!=str[len])
+        len++;
+    if (*str == '+') {
+        str++;
+        len--;
+    }
+
+    /* Use calloc to automagically 0-terminate the copy */
+    newitem = (paralist *) pj_calloc (1, sizeof(paralist) + len);
+    if (0==newitem)
+        return 0;
+    memmove(newitem->param, str, len);
+
+    newitem->used = 0;
+    newitem->next = 0;
+
+    return newitem;
 }
 
+/**************************************************************************************/
+paralist *pj_param_exists (paralist *list, const char *parameter) {
+/***************************************************************************************
+    Determine whether a given parameter exists in a paralist. If it does, return
+    a pointer to the corresponding list element - otherwise return 0.
+
+    In support of the pipeline syntax, the search is terminated once a "+step" list
+    element is reached, in which case a 0 is returned, unless the parameter
+    searched for is actually "step", in which case a pointer to the "step" list
+    element is returned.
+
+    This function is equivalent to the pj_param (...) call with the "opt" argument
+    set to the parameter name preceeeded by a 't'. But by using this one, one avoids
+    writing the code allocating memory for a new copy of parameter name, and prepending
+    the t (for compile time known names, this is obviously not an issue).
+***************************************************************************************/
+    paralist *next = list;
+    char *c = strchr (parameter, '=');
+    size_t len = strlen (parameter);
+    if (c)
+        len = c - parameter;
+    if (list==0)
+        return 0;
+
+    for (next = list; next; next = next->next) {
+        if (0==strncmp (parameter, next->param, len) && (next->param[len]=='=' || next->param[len]==0)) {
+            next->used = 1;
+            return next;
+        }
+        if (0==strcmp (parameter, "step"))
+            return 0;
+    }
+
+    return 0;
+}
+
+
 /************************************************************************/
 /*                              pj_param()                              */
 /*                                                                      */
@@ -23,86 +94,90 @@ pj_mkparam(char *str) {
 /*      character in `opt' is a parameter type which can take the       */
 /*      values:                                                         */
 /*                                                                      */
-/*       `t' - test for presence, return TRUE/FALSE in PROJVALUE.i         */
-/*       `i' - integer value returned in PROJVALUE.i                       */
-/*       `d' - simple valued real input returned in PROJVALUE.f            */
+/*       `t' - test for presence, return TRUE/FALSE in PROJVALUE.i      */
+/*       `i' - integer value returned in PROJVALUE.i                    */
+/*       `d' - simple valued real input returned in PROJVALUE.f         */
 /*       `r' - degrees (DMS translation applied), returned as           */
-/*             radians in PROJVALUE.f                                      */
-/*       `s' - string returned in PROJVALUE.s                              */
-/*       `b' - test for t/T/f/F, return in PROJVALUE.i                     */
+/*             radians in PROJVALUE.f                                   */
+/*       `s' - string returned in PROJVALUE.s                           */
+/*       `b' - test for t/T/f/F, return in PROJVALUE.i                  */
+/*                                                                      */
+/*      Search is terminated when "step" is found, in which case        */
+/*      0 is returned, unless "step" was the target searched for.       */
 /*                                                                      */
 /************************************************************************/
 
-	PROJVALUE /* test for presence or get parameter value */
-pj_param(projCtx ctx, paralist *pl, const char *opt) {
-
-	int type;
-	unsigned l;
-	PROJVALUE value;
-
-	if( ctx == NULL )
-		ctx = pj_get_default_ctx();
-
-	type = *opt++;
-	/* simple linear lookup */
-	l = strlen(opt);
-	while (pl && !(!strncmp(pl->param, opt, l) &&
-	  (!pl->param[l] || pl->param[l] == '=')))
-		pl = pl->next;
-	if (type == 't')
-		value.i = pl != 0;
-	else if (pl) {
-		pl->used |= 1;
-		opt = pl->param + l;
-		if (*opt == '=')
-			++opt;
-		switch (type) {
-		case 'i':	/* integer input */
-			value.i = atoi(opt);
-			break;
-		case 'd':	/* simple real input */
-			value.f = pj_atof(opt);
-			break;
-		case 'r':	/* degrees input */
-			value.f = dmstor_ctx(ctx, opt, 0);
-			break;
-		case 's':	/* char string */
-                        value.s = (char *) opt;
-			break;
-		case 'b':	/* boolean */
-			switch (*opt) {
-			case 'F': case 'f':
-				value.i = 0;
-				break;
-			case '\0': case 'T': case 't':
-				value.i = 1;
-				break;
-			default:
-				pj_ctx_set_errno(ctx, -8);
-				value.i = 0;
-				break;
-			}
-			break;
-		default:
-bum_type:	/* note: this is an error in parameter, not a user error */
-			fprintf(stderr, "invalid request to pj_param, fatal\n");
-			exit(1);
-		}
-	} else /* not given */
-		switch (type) {
-		case 'b':
-		case 'i':
-			value.i = 0;
-			break;
-		case 'd':
-		case 'r':
-			value.f = 0.;
-			break;
-		case 's':
-			value.s = 0;
-			break;
-		default:
-			goto bum_type;
-		}
-	return value;
+PROJVALUE pj_param (projCtx ctx, paralist *pl, const char *opt) {
+
+    int type;
+    unsigned l;
+    PROJVALUE value = {0};
+
+    if ( ctx == NULL )
+        ctx = pj_get_default_ctx();
+
+    type = *opt++;
+
+    if (0==strchr ("tbirds", type)) {
+        fprintf(stderr, "invalid request to pj_param, fatal\n");
+        exit(1);
+    }
+
+    pl = pj_param_exists (pl, opt);
+    if (type == 't') {
+        value.i = pl != 0;
+        return value;
+    }
+
+    /* Not found */
+    if (0==pl) {
+        switch (type) {
+        case 'b': case 'i':
+            value.i = 0;
+            return value;
+        case 'd': case 'r':
+            value.f = 0.;
+            return value;
+        case 's':
+            value.s = 0;
+            return value;
+        }
+    }
+
+    /* Found parameter - now find its value */
+    pl->used |= 1;
+    l = (int) strlen(opt);
+    opt = pl->param + l;
+    if (*opt == '=')
+        ++opt;
+
+    switch (type) {
+    case 'i':    /* integer input */
+        value.i = atoi(opt);
+        break;
+    case 'd':    /* simple real input */
+        value.f = pj_atof(opt);
+        break;
+    case 'r':    /* degrees input */
+        value.f = dmstor_ctx(ctx, opt, 0);
+        break;
+    case 's':    /* char string */
+        value.s = (char *) opt;
+        break;
+    case 'b':    /* boolean */
+        switch (*opt) {
+        case 'F': case 'f':
+            value.i = 0;
+            break;
+        case '\0': case 'T': case 't':
+            value.i = 1;
+            break;
+        default:
+            pj_ctx_set_errno (ctx, PJD_ERR_INVALID_BOOLEAN_PARAM);
+            value.i = 0;
+            break;
+        }
+        break;
+    }
+    return value;
 }
diff --git a/src/pj_phi2.c b/src/pj_phi2.c
index 60b36ec..fa6d995 100644
--- a/src/pj_phi2.c
+++ b/src/pj_phi2.c
@@ -6,18 +6,22 @@
 
 	double
 pj_phi2(projCtx ctx, double ts, double e) {
-	double eccnth, Phi, con, dphi;
+	double eccnth, Phi, con;
 	int i;
 
 	eccnth = .5 * e;
 	Phi = M_HALFPI - 2. * atan (ts);
 	i = N_ITER;
-	do {
+	for(;;) {
+		double dphi;
 		con = e * sin (Phi);
 		dphi = M_HALFPI - 2. * atan (ts * pow((1. - con) /
 		   (1. + con), eccnth)) - Phi;
 		Phi += dphi;
-	} while ( fabs(dphi) > TOL && --i);
+		if( fabs(dphi) > TOL && --i )
+			continue;
+                break;
+	}
 	if (i <= 0)
 		pj_ctx_set_errno( ctx, -18 );
 	return Phi;
diff --git a/src/pj_pr_list.c b/src/pj_pr_list.c
index 95aab4a..00cd4bc 100644
--- a/src/pj_pr_list.c
+++ b/src/pj_pr_list.c
@@ -11,7 +11,7 @@ pr_list(PJ *P, int not_used) {
 	(void)putchar('#');
 	for (t = P->params; t; t = t->next)
 		if ((!not_used && t->used) || (not_used && !t->used)) {
-			l = strlen(t->param) + 1;
+			l = (int)strlen(t->param) + 1;
 			if (n + l > LINE_LEN) {
 				(void)fputs("\n#", stdout);
 				n = 2;
@@ -62,6 +62,8 @@ char *pj_get_def( PJ *P, int options )
     (void) options;
 
     definition = (char *) pj_malloc(def_max);
+    if (!definition)
+        return NULL;
     definition[0] = '\0';
 
     for (t = P->params; t; t = t->next)
@@ -71,16 +73,22 @@ char *pj_get_def( PJ *P, int options )
             continue;
 
         /* grow the resulting string if needed */
-        l = strlen(t->param) + 1;
+        l = (int)strlen(t->param) + 1;
         if( strlen(definition) + l + 5 > def_max )
         {
             char *def2;
 
             def_max = def_max * 2 + l + 5;
             def2 = (char *) pj_malloc(def_max);
-            strcpy( def2, definition );
-            pj_dalloc( definition );
-            definition = def2;
+            if (def2) {
+                strcpy( def2, definition );
+                pj_dalloc( definition );
+                definition = def2;
+            }
+            else {
+                pj_dalloc( definition );
+                return NULL;
+            }
         }
 
         /* append this parameter */
diff --git a/src/pj_qsfn.c b/src/pj_qsfn.c
index ccb1230..c361014 100644
--- a/src/pj_qsfn.c
+++ b/src/pj_qsfn.c
@@ -3,14 +3,20 @@
 #include <projects.h>
 
 # define EPSILON 1.0e-7
-	double
-pj_qsfn(double sinphi, double e, double one_es) {
-	double con;
 
-	if (e >= EPSILON) {
-		con = e * sinphi;
-		return (one_es * (sinphi / (1. - con * con) -
-		   (.5 / e) * log ((1. - con) / (1. + con))));
-	} else
-		return (sinphi + sinphi);
+double pj_qsfn(double sinphi, double e, double one_es) {
+    double con, div1, div2;
+
+    if (e >= EPSILON) {
+        con = e * sinphi;
+        div1 = 1.0 - con * con;
+        div2 = 1.0 + con;
+
+        /* avoid zero division, fail gracefully */
+        if (div1 == 0.0 || div2 == 0.0)
+            return HUGE_VAL;
+
+        return (one_es * (sinphi / div1 - (.5 / e) * log ((1. - con) / div2 )));
+    } else
+        return (sinphi + sinphi);
 }
diff --git a/src/pj_release.c b/src/pj_release.c
index 1758a53..fdd66f9 100644
--- a/src/pj_release.c
+++ b/src/pj_release.c
@@ -2,7 +2,7 @@
 
 #include <projects.h>
 
-char const pj_release[]="Rel. 4.9.3, 15 August 2016";
+char const pj_release[]="Rel. 5.0.0, 15 february 2018";
 
 const char *pj_get_release()
 
diff --git a/src/pj_run_selftests.c b/src/pj_run_selftests.c
deleted file mode 100644
index c0d59f7..0000000
--- a/src/pj_run_selftests.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/******************************************************************************
- * Project:  PROJ.4
- * Purpose:  Generic regression test for PROJ.4 projection algorithms.
- * Author:   Thomas Knudsen
- *
- ******************************************************************************
- * Copyright (c) 2016, Thomas Knudsen
- *
- * 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 <stdio.h>
-#define PJ_LIB__
-#include <projects.h>
-
-
-static void run_one_test (const char *mnemonic, int (testfunc)(void), int verbosity, int *n_ok, int *n_ko, int *n_stubs) {
-    int ret = testfunc ();
-    switch (ret) {
-        case 0:      (*n_ok)++;     break;
-        case 10000:  (*n_stubs)++;  break;
-        default:     (*n_ko)++;
-    }
-
-    if (verbosity) {
-        if (ret==10000)
-            printf ("Testing: %10s - [stub]\n", mnemonic);
-        else
-            printf ("Testing: %10s - return code: %d\n", mnemonic, ret);
-    }
-    return;
-}
-
-
-#ifndef PJ_SELFTEST
-int pj_run_selftests (int verbosity) {
-    printf ("This version of libproj is not configured for internal regression tests.\n");
-    return 0;
-}
-#else
-
-
-int pj_run_selftests (int verbosity) {
-    int n_ok = 0, n_ko = 0, n_stubs = 0, i = 0;
-
-    struct PJ_SELFTEST_LIST *tests = pj_get_selftest_list_ref ();
-
-    if (0==tests)
-        printf ("This version of libproj is not configured for internal regression tests.\n");
-
-    if (verbosity)
-       printf ("Running internal regression tests\n");
-
-    for (i = 0; tests[i].testfunc != 0; i++)
-        run_one_test (tests[i].id,     tests[i].testfunc,      verbosity, &n_ok, &n_ko, &n_stubs);
-
-    if (0==verbosity)
-       printf ("Internal regression tests done. ");
-    printf ("[Stubs: %d]          Total: %d. Failure: %d. Success: %d\n", n_stubs, n_ok+n_ko, n_ko, n_ok);
-    return n_ko;
-}
-#endif
diff --git a/src/pj_strerrno.c b/src/pj_strerrno.c
index b46f143..c2221e5 100644
--- a/src/pj_strerrno.c
+++ b/src/pj_strerrno.c
@@ -4,82 +4,95 @@
 #include <errno.h>
 #include <string.h>
 
-	static char *
+    static const char * const
 pj_err_list[] = {
-	"no arguments in initialization list",	/*  -1 */
-	"no options found in 'init' file",		/*  -2 */
-	"no colon in init= string",			/*  -3 */
-	"projection not named",				/*  -4 */
-	"unknown projection id",			/*  -5 */
-	"effective eccentricity = 1.",			/*  -6 */
-	"unknown unit conversion id",			/*  -7 */
-	"invalid boolean param argument",		/*  -8 */
-	"unknown elliptical parameter name",	        /*  -9 */
-	"reciprocal flattening (1/f) = 0",		/* -10 */
-	"|radius reference latitude| > 90",		/* -11 */
-	"squared eccentricity < 0",			/* -12 */
-	"major axis or radius = 0 or not given",	/* -13 */
-	"latitude or longitude exceeded limits",	/* -14 */
-	"invalid x or y",				/* -15 */
-	"improperly formed DMS value",			/* -16 */
-	"non-convergent inverse meridional dist",	/* -17 */
-	"non-convergent inverse phi2",			/* -18 */
-	"acos/asin: |arg| >1.+1e-14",			/* -19 */
-	"tolerance condition error",			/* -20 */
-	"conic lat_1 = -lat_2",				/* -21 */
-	"lat_1 >= 90",					/* -22 */
-	"lat_1 = 0",					/* -23 */
-	"lat_ts >= 90",					/* -24 */
-	"no distance between control points",		/* -25 */
-	"projection not selected to be rotated",	/* -26 */
-	"W <= 0 or M <= 0",				/* -27 */
-	"lsat not in 1-5 range",			/* -28 */
-	"path not in range",				/* -29 */
-	"h <= 0",					/* -30 */
-	"k <= 0",					/* -31 */
-	"lat_0 = 0 or 90 or alpha = 90",		/* -32 */
-	"lat_1=lat_2 or lat_1=0 or lat_2=90",		/* -33 */
-	"elliptical usage required",			/* -34 */
-	"invalid UTM zone number",			/* -35 */
-	"arg(s) out of range for Tcheby eval",		/* -36 */
-	"failed to find projection to be rotated",	/* -37 */
-	"failed to load datum shift file",  	        /* -38 */
-	"both n & m must be spec'd and > 0",		/* -39 */
-	"n <= 0, n > 1 or not specified",		/* -40 */
-	"lat_1 or lat_2 not specified",			/* -41 */
-	"|lat_1| == |lat_2|",				/* -42 */
-	"lat_0 is pi/2 from mean lat",			/* -43 */
-	"unparseable coordinate system definition",	/* -44 */
-	"geocentric transformation missing z or ellps",	/* -45 */
-	"unknown prime meridian conversion id",		/* -46 */
-	"illegal axis orientation combination",		/* -47 */
-	"point not within available datum shift grids", /* -48 */
-	"invalid sweep axis, choose x or y",            /* -49 */
+    "no arguments in initialization list",                             /*  -1 */
+    "no options found in 'init' file",                                 /*  -2 */
+    "no colon in init= string",                                        /*  -3 */
+    "projection not named",                                            /*  -4 */
+    "unknown projection id",                                           /*  -5 */
+    "effective eccentricity = 1.",                                     /*  -6 */
+    "unknown unit conversion id",                                      /*  -7 */
+    "invalid boolean param argument",                                  /*  -8 */
+    "unknown elliptical parameter name",                               /*  -9 */
+    "reciprocal flattening (1/f) = 0",                                 /* -10 */
+    "|radius reference latitude| > 90",                                /* -11 */
+    "squared eccentricity < 0",                                        /* -12 */
+    "major axis or radius = 0 or not given",                           /* -13 */
+    "latitude or longitude exceeded limits",                           /* -14 */
+    "invalid x or y",                                                  /* -15 */
+    "improperly formed DMS value",                                     /* -16 */
+    "non-convergent inverse meridional dist",                          /* -17 */
+    "non-convergent inverse phi2",                                     /* -18 */
+    "acos/asin: |arg| >1.+1e-14",                                      /* -19 */
+    "tolerance condition error",                                       /* -20 */
+    "conic lat_1 = -lat_2",                                            /* -21 */
+    "lat_1 >= 90",                                                     /* -22 */
+    "lat_1 = 0",                                                       /* -23 */
+    "lat_ts >= 90",                                                    /* -24 */
+    "no distance between control points",                              /* -25 */
+    "projection not selected to be rotated",                           /* -26 */
+    "W <= 0 or M <= 0",                                                /* -27 */
+    "lsat not in 1-5 range",                                           /* -28 */
+    "path not in range",                                               /* -29 */
+    "h <= 0",                                                          /* -30 */
+    "k <= 0",                                                          /* -31 */
+    "lat_0 = 0 or 90 or alpha = 90",                                   /* -32 */
+    "lat_1=lat_2 or lat_1=0 or lat_2=90",                              /* -33 */
+    "elliptical usage required",                                       /* -34 */
+    "invalid UTM zone number",                                         /* -35 */
+    "arg(s) out of range for Tcheby eval",                             /* -36 */
+    "failed to find projection to be rotated",                         /* -37 */
+    "failed to load datum shift file",                                 /* -38 */
+    "both n & m must be spec'd and > 0",                               /* -39 */
+    "n <= 0, n > 1 or not specified",                                  /* -40 */
+    "lat_1 or lat_2 not specified",                                    /* -41 */
+    "|lat_1| == |lat_2|",                                              /* -42 */
+    "lat_0 is pi/2 from mean lat",                                     /* -43 */
+    "unparseable coordinate system definition",                        /* -44 */
+    "geocentric transformation missing z or ellps",                    /* -45 */
+    "unknown prime meridian conversion id",                            /* -46 */
+    "illegal axis orientation combination",                            /* -47 */
+    "point not within available datum shift grids",                    /* -48 */
+    "invalid sweep axis, choose x or y",                               /* -49 */
+    "malformed pipeline",                                              /* -50 */
+    "unit conversion factor must be > 0",                              /* -51 */
+    "invalid scale",                                                   /* -52 */
+    "non-convergent computation",                                      /* -53 */
+    "missing required arguments",                                      /* -54 */
+    "lat_0 = 0",                                                       /* -55 */
+    "ellipsoidal usage unsupported",                                   /* -56 */
+    "only one +init allowed for non-pipeline operations",              /* -57 */
+    "argument not numerical or out of range",                          /* -58 */
+
+    /* When adding error messages, remember to update ID defines in
+       projects.h, and transient_error array in pj_transform                  */
 };
-	char *
-pj_strerrno(int err) 
-{
+
+char *pj_strerrno(int err) {
     static char note[50];
+    size_t adjusted_err;
 
-    if (err > 0)
+    if (0==err)
+        return 0;
+
+    /* System error codes are positive */
+    if (err > 0) {
 #ifdef HAVE_STRERROR
         return strerror(err);
 #else
-    {   
-        sprintf(note,"no system list, errno: %d\n", err);
+        /* Defend string boundary against exorbitantly large err values */
+        /* which may occur on platforms with 64-bit ints */
+        sprintf(note,"no system list, errno: %d\n", (err < 9999)? err: 9999);
         return note;
-    }
 #endif
-    else if (err < 0) {
-        size_t adjusted_err = - err - 1;
-        if (adjusted_err < (sizeof(pj_err_list) / sizeof(char *)))
-            return(pj_err_list[adjusted_err]);
-        else
-        {
-            sprintf( note, "invalid projection system error (%d)",
-                     err );
-            return note;
-        }
-    } else
-        return NULL;
+    }
+
+    /* PROJ.4 error codes are negative */
+    adjusted_err = - err - 1;
+    if (adjusted_err < (sizeof(pj_err_list) / sizeof(char *)))
+        return (char *)pj_err_list[adjusted_err];
+
+    sprintf( note, "invalid projection system error (%d)", (err > -9999)? err: -9999);
+    return note;
 }
diff --git a/src/pj_strtod.c b/src/pj_strtod.c
index 7c2da9a..90d0b2e 100644
--- a/src/pj_strtod.c
+++ b/src/pj_strtod.c
@@ -75,7 +75,7 @@ double pj_atof( const char* nptr )
 static char* pj_replace_point_by_locale_point(const char* pszNumber, char point,
                                               char* pszWorkBuffer)
 {
-#if !defined(HAVE_LOCALECONV) || defined(_WIN32_WCE)
+#if !defined(HAVE_LOCALECONV)
 
 #if defined(_MSC_VER)  /* Visual C++ */
 #pragma message("localeconv not available")
@@ -101,8 +101,11 @@ static char* pj_replace_point_by_locale_point(const char* pszNumber, char point,
                 strcpy(pszWorkBuffer, pszNumber);
                 pszNew = pszWorkBuffer;
             }
-            else
-                pszNew = strdup(pszNumber);
+            else {
+                pszNew = pj_strdup(pszNumber);
+                if (!pszNew)
+                    return NULL;
+            }
             pszNew[pszPoint - pszNumber] = byPoint;
             return pszNew;
         }
@@ -127,8 +130,11 @@ static char* pj_replace_point_by_locale_point(const char* pszNumber, char point,
                     strcpy(pszWorkBuffer, pszNumber);
                     pszNew = pszWorkBuffer;
                 }
-                else
-                    pszNew = strdup(pszNumber);
+                else {
+                    pszNew = pj_strdup(pszNumber);
+                    if (!pszNew)
+                        return NULL;
+                }
                 if( pszLocalePoint )
                     pszNew[pszLocalePoint - pszNumber] = ' ';
                 if( pszPoint )
diff --git a/src/pj_transform.c b/src/pj_transform.c
index 1794678..fc0a324 100644
--- a/src/pj_transform.c
+++ b/src/pj_transform.c
@@ -54,22 +54,32 @@ static int pj_adjust_axis( projCtx ctx, const char *axis, int denormalize_flag,
 
 /*
 ** This table is intended to indicate for any given error code in
-** the range 0 to -44, whether that error will occur for all locations (ie.
+** the range 0 to -56, whether that error will occur for all locations (ie.
 ** it is a problem with the coordinate system as a whole) in which case the
 ** value would be 0, or if the problem is with the point being transformed
 ** in which case the value is 1.
 **
 ** At some point we might want to move this array in with the error message
 ** list or something, but while experimenting with it this should be fine.
+**
+**
+** NOTE (2017-10-01): Non-transient errors really should have resulted in a
+** PJ==0 during initialization, and hence should be handled at the level
+** before calling pj_transform. The only obvious example of the contrary
+** appears to be the PJD_ERR_GRID_AREA case, which may also be taken to
+** mean "no grids available"
+**
+**
 */
 
-static const int transient_error[50] = {
+static const int transient_error[60] = {
     /*             0  1  2  3  4  5  6  7  8  9   */
     /* 0 to 9 */   0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     /* 10 to 19 */ 0, 0, 0, 0, 1, 1, 0, 1, 1, 1,
     /* 20 to 29 */ 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,
     /* 30 to 39 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    /* 40 to 49 */ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 };
+    /* 40 to 49 */ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+    /* 50 to 59 */ 1, 0, 1, 0, 1, 1, 1, 1, 0, 0 };
 
 /************************************************************************/
 /*                            pj_transform()                            */
@@ -85,7 +95,6 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
 
 {
     long      i;
-    int       err;
 
     srcdefn->ctx->last_errno = 0;
     dstdefn->ctx->last_errno = 0;
@@ -108,19 +117,11 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
     }
 
 /* -------------------------------------------------------------------- */
-/*      Transform Z to meters if it isn't already.                      */
-/* -------------------------------------------------------------------- */
-    if( srcdefn->vto_meter != 1.0 && z != NULL )
-    {
-        for( i = 0; i < point_count; i++ )
-            z[point_offset*i] *= srcdefn->vto_meter;
-    }
-
-/* -------------------------------------------------------------------- */
 /*      Transform geocentric source coordinates to lat/long.            */
 /* -------------------------------------------------------------------- */
     if( srcdefn->is_geocent )
     {
+        int err;
         if( z == NULL )
         {
             pj_ctx_set_errno( pj_get_ctx(srcdefn), PJD_ERR_GEOCENTRIC);
@@ -135,6 +136,7 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
                 {
                     x[point_offset*i] *= srcdefn->to_meter;
                     y[point_offset*i] *= srcdefn->to_meter;
+                    z[point_offset*i] *= srcdefn->to_meter;
                 }
             }
         }
@@ -243,11 +245,12 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
             }
         }
     }
+
 /* -------------------------------------------------------------------- */
 /*      But if they are already lat long, adjust for the prime          */
 /*      meridian if there is one in effect.                             */
 /* -------------------------------------------------------------------- */
-    if( srcdefn->from_greenwich != 0.0 )
+    if ((srcdefn->is_geocent || srcdefn->is_latlong) && ( srcdefn->from_greenwich != 0.0 ))
     {
         for( i = 0; i < point_count; i++ )
         {
@@ -282,7 +285,7 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
     }
 
 /* -------------------------------------------------------------------- */
-/*      Do we need to translate from geoid to ellipsoidal vertical      */
+/*      Do we need to translate from ellipsoidal to geoid vertical      */
 /*      datum?                                                          */
 /* -------------------------------------------------------------------- */
     if( dstdefn->has_geoid_vgrids && z != NULL )
@@ -298,15 +301,14 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
 /*      But if they are staying lat long, adjust for the prime          */
 /*      meridian if there is one in effect.                             */
 /* -------------------------------------------------------------------- */
-    if( dstdefn->from_greenwich != 0.0 )
+    if ((dstdefn->is_geocent || dstdefn->is_latlong) && ( dstdefn->from_greenwich != 0.0 ))
     {
         for( i = 0; i < point_count; i++ )
         {
             if( x[point_offset*i] != HUGE_VAL )
                 x[point_offset*i] -= dstdefn->from_greenwich;
         }
-    }
-
+}
 
 /* -------------------------------------------------------------------- */
 /*      Transform destination latlong to geocentric if required.        */
@@ -330,6 +332,7 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
                 {
                     x[point_offset*i] *= dstdefn->fr_meter;
                     y[point_offset*i] *= dstdefn->fr_meter;
+                    z[point_offset*i] *= srcdefn->fr_meter;
                 }
             }
         }
@@ -344,6 +347,13 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
 
         if( dstdefn->fwd3d != NULL)
         {
+            /* Three dimensions must be defined */
+            if ( z == NULL)
+            {
+                pj_ctx_set_errno( pj_get_ctx(dstdefn), PJD_ERR_GEOCENTRIC);
+                return PJD_ERR_GEOCENTRIC;
+            }
+
             for( i = 0; i < point_count; i++ )
             {
                 XYZ projected_loc;
@@ -422,26 +432,21 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
     {
         for( i = 0; i < point_count; i++ )
         {
-            if( x[point_offset*i] == HUGE_VAL )
+            double val = x[point_offset*i];
+            if( val == HUGE_VAL )
                 continue;
 
-            while( x[point_offset*i] < dstdefn->long_wrap_center - M_PI )
-                x[point_offset*i] += M_TWOPI;
-            while( x[point_offset*i] > dstdefn->long_wrap_center + M_PI )
-                x[point_offset*i] -= M_TWOPI;
+            /* Get fast in ] -2 PI, 2 PI [ range */
+            val = fmod(val, M_TWOPI);
+            while( val < dstdefn->long_wrap_center - M_PI )
+                val += M_TWOPI;
+            while( val > dstdefn->long_wrap_center + M_PI )
+                val -= M_TWOPI;
+            x[point_offset*i] = val;
         }
     }
 
 /* -------------------------------------------------------------------- */
-/*      Transform Z from meters if needed.                              */
-/* -------------------------------------------------------------------- */
-    if( dstdefn->vto_meter != 1.0 && z != NULL )
-    {
-        for( i = 0; i < point_count; i++ )
-            z[point_offset*i] *= dstdefn->vfr_meter;
-    }
-
-/* -------------------------------------------------------------------- */
 /*      Transform normalized axes into unusual output coordinate axis   */
 /*      orientation if needed.                                          */
 /* -------------------------------------------------------------------- */
@@ -555,7 +560,7 @@ int pj_compare_datums( PJ *srcdefn, PJ *dstdefn )
     else if( srcdefn->a_orig != dstdefn->a_orig
              || ABS(srcdefn->es_orig - dstdefn->es_orig) > 0.000000000050 )
     {
-        /* the tolerence for es is to ensure that GRS80 and WGS84 are
+        /* the tolerance for es is to ensure that GRS80 and WGS84 are
            considered identical */
         return 0;
     }
@@ -577,8 +582,12 @@ int pj_compare_datums( PJ *srcdefn, PJ *dstdefn )
     }
     else if( srcdefn->datum_type == PJD_GRIDSHIFT )
     {
-        return strcmp( pj_param(srcdefn->ctx, srcdefn->params,"snadgrids").s,
-                       pj_param(dstdefn->ctx, dstdefn->params,"snadgrids").s ) == 0;
+        const char* srcnadgrids =
+            pj_param(srcdefn->ctx, srcdefn->params,"snadgrids").s;
+        const char* dstnadgrids =
+            pj_param(dstdefn->ctx, dstdefn->params,"snadgrids").s;
+        return srcnadgrids != 0 && dstnadgrids != 0 &&
+               strcmp( srcnadgrids, dstnadgrids ) == 0;
     }
     else
         return 1;
@@ -588,6 +597,7 @@ int pj_compare_datums( PJ *srcdefn, PJ *dstdefn )
 /*                       pj_geocentic_to_wgs84()                        */
 /************************************************************************/
 
+static
 int pj_geocentric_to_wgs84( PJ *defn,
                             long point_count, int point_offset,
                             double *x, double *y, double *z )
@@ -636,6 +646,7 @@ int pj_geocentric_to_wgs84( PJ *defn,
 /*                      pj_geocentic_from_wgs84()                       */
 /************************************************************************/
 
+static
 int pj_geocentric_from_wgs84( PJ *defn,
                               long point_count, int point_offset,
                               double *x, double *y, double *z )
@@ -737,17 +748,32 @@ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn,
 /* -------------------------------------------------------------------- */
     if( srcdefn->datum_type == PJD_GRIDSHIFT )
     {
+        const char* srcnadgrids = pj_param(srcdefn->ctx, srcdefn->params,"snadgrids").s;
+
         pj_apply_gridshift_2( srcdefn, 0, point_count, point_offset, x, y, z );
         CHECK_RETURN(srcdefn);
 
-        src_a = SRS_WGS84_SEMIMAJOR;
-        src_es = SRS_WGS84_ESQUARED;
+        /* If the gridlist has either "@null" or "null" as its only    */
+        /* grid we don't change the ellipsoid parameters, since the    */
+        /* datum shift to WGS84 was not performed in practice.         */
+        if ( srcnadgrids != NULL &&
+             strcmp("@null", srcnadgrids) && strcmp("null", srcnadgrids) ) {
+            src_a = SRS_WGS84_SEMIMAJOR;
+            src_es = SRS_WGS84_ESQUARED;
+        }
     }
 
     if( dstdefn->datum_type == PJD_GRIDSHIFT )
     {
-        dst_a = SRS_WGS84_SEMIMAJOR;
-        dst_es = SRS_WGS84_ESQUARED;
+        const char* dstnadgrids = pj_param(dstdefn->ctx, dstdefn->params,"snadgrids").s;
+        /* If the gridlist has either "@null" or "null" as its only    */
+        /* grid we don't change the ellipsoid parameters, since the    */
+        /* datum shift to WGS84 will not be performed.                 */
+        if ( dstnadgrids != NULL &&
+             strcmp("@null", dstnadgrids) && strcmp("null", dstnadgrids) ) {
+            dst_a = SRS_WGS84_SEMIMAJOR;
+            dst_es = SRS_WGS84_ESQUARED;
+          }
     }
 
 /* ==================================================================== */
@@ -846,17 +872,25 @@ static int pj_adjust_axis( projCtx ctx,
                 switch( axis[i_axis] )
                 {
                   case 'e':
-                    x[point_offset*i] = value; break;
+                    x[point_offset*i] = value;
+                    break;
                   case 'w':
-                    x[point_offset*i] = -value; break;
+                    x[point_offset*i] = -value;
+                    break;
                   case 'n':
-                    y[point_offset*i] = value; break;
+                    y[point_offset*i] = value;
+                    break;
                   case 's':
-                    y[point_offset*i] = -value; break;
+                    y[point_offset*i] = -value;
+                    break;
                   case 'u':
-                    if( z ) z[point_offset*i] = value; break;
+                    if( z )
+                        z[point_offset*i] = value;
+                    break;
                   case 'd':
-                    if( z ) z[point_offset*i] = -value; break;
+                    if( z )
+                        z[point_offset*i] = -value;
+                    break;
                   default:
                     pj_ctx_set_errno( ctx, PJD_ERR_AXIS );
                     return PJD_ERR_AXIS;
diff --git a/src/pj_tsfn.c b/src/pj_tsfn.c
index 448aae9..eff20ca 100644
--- a/src/pj_tsfn.c
+++ b/src/pj_tsfn.c
@@ -2,9 +2,15 @@
 #include <math.h>
 #include <projects.h>
 
-	double
-pj_tsfn(double phi, double sinphi, double e) {
-	sinphi *= e;
-	return (tan (.5 * (M_HALFPI - phi)) /
-	   pow((1. - sinphi) / (1. + sinphi), .5 * e));
+double pj_tsfn(double phi, double sinphi, double e) {
+    double denominator;
+    sinphi *= e;
+
+    /* avoid zero division, fail gracefully */
+    denominator = 1.0 + sinphi;
+    if (denominator == 0.0)
+        return HUGE_VAL;
+
+    return (tan (.5 * (M_HALFPI - phi)) /
+            pow((1. - sinphi) / (denominator), .5 * e));
 }
diff --git a/src/pj_units.c b/src/pj_units.c
index c6b5ae3..fe4ad45 100644
--- a/src/pj_units.c
+++ b/src/pj_units.c
@@ -1,37 +1,45 @@
 /* definition of standard cartesian units */
+
+#include "proj.h"
+
 #define PJ_UNITS__
 #include <projects.h>
+
 /* Field 2 that contains the multiplier to convert named units to meters
 ** may be expressed by either a simple floating point constant or a
 ** numerator/denomenator values (e.g. 1/1000) */
-C_NAMESPACE_VAR struct PJ_UNITS
+C_NAMESPACE_VAR const struct PJ_UNITS
 pj_units[] = {
-	{"km",		"1000.",		"Kilometer"},
-	{"m",		"1.",			"Meter"},
-	{"dm",		"1/10",			"Decimeter"},
-	{"cm",		"1/100",		"Centimeter"},
-	{"mm",		"1/1000",		"Millimeter"},
-	{"kmi",		"1852.0",		"International Nautical Mile"},
-	{"in",		"0.0254",		"International Inch"},
-	{"ft",		"0.3048",		"International Foot"},
-	{"yd",		"0.9144",		"International Yard"},
-	{"mi",		"1609.344",		"International Statute Mile"},
-	{"fath",	"1.8288",		"International Fathom"},
-	{"ch",		"20.1168",		"International Chain"},
-	{"link",	"0.201168",		"International Link"},
-	{"us-in",	"1./39.37",		"U.S. Surveyor's Inch"},
-	{"us-ft",	"0.304800609601219",	"U.S. Surveyor's Foot"},
-	{"us-yd",	"0.914401828803658",	"U.S. Surveyor's Yard"},
-	{"us-ch",	"20.11684023368047",	"U.S. Surveyor's Chain"},
-	{"us-mi",	"1609.347218694437",	"U.S. Surveyor's Statute Mile"},
-	{"ind-yd",	"0.91439523",		"Indian Yard"},
-	{"ind-ft",	"0.30479841",		"Indian Foot"},
-	{"ind-ch",	"20.11669506",		"Indian Chain"},
-	{NULL,		NULL,			NULL}
+    {"km",      "1000.",                "Kilometer",                    1000.0},
+    {"m",       "1.",                   "Meter",                        1.0},
+    {"dm",      "1/10",                 "Decimeter",                    0.1},
+    {"cm",      "1/100",                "Centimeter",                   0.01},
+    {"mm",      "1/1000",               "Millimeter",                   0.001},
+    {"kmi",     "1852.0",               "International Nautical Mile",  1852.0},
+    {"in",      "0.0254",               "International Inch",           0.0254},
+    {"ft",      "0.3048",               "International Foot",           0.3048},
+    {"yd",      "0.9144",               "International Yard",           0.9144},
+    {"mi",      "1609.344",             "International Statute Mile",   1609.344},
+    {"fath",    "1.8288",               "International Fathom",         1.8288},
+    {"ch",      "20.1168",              "International Chain",          20.1168},
+    {"link",    "0.201168",             "International Link",           0.201168},
+    {"us-in",   "1./39.37",             "U.S. Surveyor's Inch",         0.0254},
+    {"us-ft",   "0.304800609601219",    "U.S. Surveyor's Foot",         0.304800609601219},
+    {"us-yd",   "0.914401828803658",    "U.S. Surveyor's Yard",         0.914401828803658},
+    {"us-ch",   "20.11684023368047",    "U.S. Surveyor's Chain",        20.11684023368047},
+    {"us-mi",   "1609.347218694437",    "U.S. Surveyor's Statute Mile", 1609.347218694437},
+    {"ind-yd",  "0.91439523",           "Indian Yard",                  0.91439523},
+    {"ind-ft",  "0.30479841",           "Indian Foot",                  0.30479841},
+    {"ind-ch",  "20.11669506",          "Indian Chain",                 20.11669506},
+    {NULL,      NULL,                   NULL,                           0.0}
 };
 
 struct PJ_UNITS *pj_get_units_ref()
+{
+    return (struct PJ_UNITS *)pj_units;
+}
 
+const PJ_UNITS *proj_list_units()
 {
     return pj_units;
 }
diff --git a/src/pj_zpoly1.c b/src/pj_zpoly1.c
index 3d6418b..626a1fe 100644
--- a/src/pj_zpoly1.c
+++ b/src/pj_zpoly1.c
@@ -5,7 +5,7 @@
 **	n should always be >= 1 though no checks are made
 */
 	COMPLEX
-pj_zpoly1(COMPLEX z, COMPLEX *C, int n) {
+pj_zpoly1(COMPLEX z, const COMPLEX *C, int n) {
 	COMPLEX a;
 	double t;
 
@@ -20,7 +20,7 @@ pj_zpoly1(COMPLEX z, COMPLEX *C, int n) {
 }
 /* evaluate complex polynomial and derivative */
 	COMPLEX
-pj_zpolyd1(COMPLEX z, COMPLEX *C, int n, COMPLEX *der) {
+pj_zpolyd1(COMPLEX z, const COMPLEX *C, int n, COMPLEX *der) {
 	COMPLEX a, b;
 	double t;
 	int first = 1;
diff --git a/src/proj.c b/src/proj.c
index e452467..1c86854 100644
--- a/src/proj.c
+++ b/src/proj.c
@@ -1,4 +1,5 @@
 /* <<<< Cartographic projection filter program >>>> */
+#include "proj.h"
 #include "projects.h"
 #include <stdio.h>
 #include <stdlib.h>
@@ -7,247 +8,307 @@
 #include <math.h>
 #include "emess.h"
 
-/* TK 1999-02-13 */
 #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__WIN32__)
 #  include <fcntl.h>
 #  include <io.h>
-#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
+#  define SET_BINARY_MODE(file) _setmode(_fileno(file), O_BINARY)
 #else
 #  define SET_BINARY_MODE(file)
 #endif
-/* ! TK 1999-02-13 */
 
 #define MAX_LINE 1000
 #define MAX_PARGS 100
 #define PJ_INVERS(P) (P->inv ? 1 : 0)
-	static PJ
-*Proj;
-	static projUV
-(*proj)(projUV, PJ *);
-	static int
-reversein = 0,	/* != 0 reverse input arguments */
-reverseout = 0,	/* != 0 reverse output arguments */
-bin_in = 0,	/* != 0 then binary input */
-bin_out = 0,	/* != 0 then binary output */
-echoin = 0,	/* echo input data to output line */
-tag = '#',	/* beginning of line tag character */
-inverse = 0,	/* != 0 then inverse projection */
-prescale = 0,	/* != 0 apply cartesian scale factor */
-dofactors = 0,	/* determine scale factors */
-facs_bad = 0,	/* return condition from pj_factors */
-very_verby = 0, /* very verbose mode */
-postscale = 0;
-	static char
-*cheby_str,		/* string controlling Chebychev evaluation */
-*oform = (char *)0,	/* output format for x-y or decimal degrees */
-*oterr = "*\t*",	/* output line for unprojectable input */
-*usage =
-"%s\nusage: %s [ -bCeEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]\n";
-	static struct FACTORS
-facs;
-	static double
-(*informat)(const char *, char **),	/* input data deformatter function */
-fscale = 0.;	/* cartesian scale factor */
-	static projUV
-int_proj(projUV data) {
-	if (prescale) { data.u *= fscale; data.v *= fscale; }
-	data = (*proj)(data, Proj);
-	if (postscale && data.u != HUGE_VAL)
-		{ data.u *= fscale; data.v *= fscale; }
-	return(data);
+
+extern void gen_cheb(int, projUV(*)(projUV), char *, PJ *, int, char **);
+
+static PJ *Proj;
+static union {
+    projUV (*generic)(projUV, PJ *);
+    projXY (*fwd)(projLP, PJ *);
+    projLP (*inv)(projXY, PJ *);
+} proj;
+
+static int
+    reversein = 0,  /* != 0 reverse input arguments */
+    reverseout = 0, /* != 0 reverse output arguments */
+    bin_in = 0,     /* != 0 then binary input */
+    bin_out = 0,    /* != 0 then binary output */
+    echoin = 0,     /* echo input data to output line */
+    tag = '#',      /* beginning of line tag character */
+    inverse = 0,    /* != 0 then inverse projection */
+    prescale = 0,   /* != 0 apply cartesian scale factor */
+    dofactors = 0,  /* determine scale factors */
+    facs_bad = 0,   /* return condition from pj_factors */
+    very_verby = 0, /* very verbose mode */
+    postscale = 0;
+
+static char
+    *cheby_str,         /* string controlling Chebychev evaluation */
+    *oform = (char *)0; /* output format for x-y or decimal degrees */
+
+static const char
+    *oterr = "*\t*",    /* output line for unprojectable input */
+    *usage = "%s\nusage: %s [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]\n";
+
+static struct FACTORS facs;
+
+static double (*informat)(const char *, char **), /* input data deformatter function */
+              fscale = 0.;                        /* cartesian scale factor */
+
+static projUV int_proj(projUV data) {
+    if (prescale) {
+        data.u *= fscale;
+        data.v *= fscale;
+    }
+
+    data = (*proj.generic)(data, Proj);
+
+    if (postscale && data.u != HUGE_VAL) {
+        data.u *= fscale;
+        data.v *= fscale;
+    }
+
+    return data;
 }
-	static void	/* file processing function */
-process(FILE *fid) {
-	char line[MAX_LINE+3], *s, pline[40];
-	projUV data;
-
-	for (;;) {
-		++emess_dat.File_line;
-		if (bin_in) {	/* binary input */
-			if (fread(&data, sizeof(projUV), 1, fid) != 1)
-				break;
-		} else {	/* ascii input */
-			if (!(s = fgets(line, MAX_LINE, fid)))
-				break;
-			if (!strchr(s, '\n')) { /* overlong line */
-				int c;
-				(void)strcat(s, "\n");
-				/* gobble up to newline */
-				while ((c = fgetc(fid)) != EOF && c != '\n') ;
-			}
-			if (*s == tag) {
-				if (!bin_out)
-					(void)fputs(line, stdout);
-				continue;
-			}
-			if (reversein) {
-				data.v = (*informat)(s, &s);
-				data.u = (*informat)(s, &s);
-			} else {
-				data.u = (*informat)(s, &s);
-				data.v = (*informat)(s, &s);
-			}
-			if (data.v == HUGE_VAL)
-				data.u = HUGE_VAL;
-			if (!*s && (s > line)) --s; /* assumed we gobbled \n */
-			if (!bin_out && echoin) {
-				int t;
-				t = *s;
-				*s = '\0';
-				(void)fputs(line, stdout);
-				*s = t;
-				putchar('\t');
-			}
-		}
-		if (data.u != HUGE_VAL) {
-			if (prescale) { data.u *= fscale; data.v *= fscale; }
-			if (dofactors && !inverse)
-				facs_bad = pj_factors(data, Proj, 0., &facs);
-			data = (*proj)(data, Proj);
-			if (dofactors && inverse)
-				facs_bad = pj_factors(data, Proj, 0., &facs);
-			if (postscale && data.u != HUGE_VAL)
-				{ data.u *= fscale; data.v *= fscale; }
-		}
-		if (bin_out) { /* binary output */
-			(void)fwrite(&data, sizeof(projUV), 1, stdout);
-			continue;
-		} else if (data.u == HUGE_VAL) /* error output */
-			(void)fputs(oterr, stdout);
-		else if (inverse && !oform) {	/*ascii DMS output */
-			if (reverseout) {
-				(void)fputs(rtodms(pline, data.v, 'N', 'S'), stdout);
-				putchar('\t');
-				(void)fputs(rtodms(pline, data.u, 'E', 'W'), stdout);
-			} else {
-				(void)fputs(rtodms(pline, data.u, 'E', 'W'), stdout);
-				putchar('\t');
-				(void)fputs(rtodms(pline, data.v, 'N', 'S'), stdout);
-			}
-		} else {	/* x-y or decimal degree ascii output */
-			if (inverse) {
-				data.v *= RAD_TO_DEG;
-				data.u *= RAD_TO_DEG;
-			}
-			if (reverseout) {
-				(void)printf(oform,data.v); putchar('\t');
-				(void)printf(oform,data.u);
-			} else {
-				(void)printf(oform,data.u); putchar('\t');
-				(void)printf(oform,data.v);
-			}
-		}
-		if (dofactors) /* print scale factor data */
-                {
-			if (!facs_bad)
-				(void)printf("\t<%g %g %g %g %g %g>",
-					facs.h, facs.k, facs.s,
-					facs.omega * RAD_TO_DEG, facs.a, facs.b);
-			else
-				(void)fputs("\t<* * * * * *>", stdout);
+
+/* file processing function */
+static void process(FILE *fid) {
+    char line[MAX_LINE+3], *s = 0, pline[40];
+    PJ_COORD data;
+
+    for (;;) {
+        ++emess_dat.File_line;
+
+        if (bin_in) {   /* binary input */
+            if (fread(&data, sizeof(projUV), 1, fid) != 1)
+                break;
+        } else {    /* ascii input */
+            if (!(s = fgets(line, MAX_LINE, fid)))
+                break;
+
+            if (!strchr(s, '\n')) { /* overlong line */
+                int c;
+                (void)strcat(s, "\n");
+                /* gobble up to newline */
+                while ((c = fgetc(fid)) != EOF && c != '\n') ;
+            }
+
+            if (*s == tag) {
+                if (!bin_out)
+                    (void)fputs(line, stdout);
+                continue;
+            }
+
+            if (reversein) {
+                data.uv.v = (*informat)(s, &s);
+                data.uv.u = (*informat)(s, &s);
+            } else {
+                data.uv.u = (*informat)(s, &s);
+                data.uv.v = (*informat)(s, &s);
+            }
+
+            if (data.uv.v == HUGE_VAL)
+                data.uv.u = HUGE_VAL;
+
+            if (!*s && (s > line)) --s; /* assumed we gobbled \n */
+            if (!bin_out && echoin) {
+                char t;
+                t = *s;
+                *s = '\0';
+                (void)fputs(line, stdout);
+                *s = t;
+                putchar('\t');
+            }
+        }
+
+        if (data.uv.u != HUGE_VAL) {
+            if (prescale) { data.uv.u *= fscale; data.uv.v *= fscale; }
+            if (dofactors && !inverse)
+                facs_bad = pj_factors(data.lp, Proj, 0., &facs);
+            data.xy = (*proj.fwd)(data.lp, Proj);
+
+            if (dofactors && inverse)
+                facs_bad = pj_factors(data.lp, Proj, 0., &facs);
+
+            if (postscale && data.uv.u != HUGE_VAL)
+                { data.uv.u *= fscale; data.uv.v *= fscale; }
+        }
+
+        if (bin_out) { /* binary output */
+            (void)fwrite(&data, sizeof(projUV), 1, stdout);
+            continue;
+        } else if (data.uv.u == HUGE_VAL) /* error output */
+            (void)fputs(oterr, stdout);
+        else if (inverse && !oform) {   /*ascii DMS output */
+            if (reverseout) {
+                (void)fputs(rtodms(pline, data.uv.v, 'N', 'S'), stdout);
+                putchar('\t');
+                (void)fputs(rtodms(pline, data.uv.u, 'E', 'W'), stdout);
+            } else {
+                (void)fputs(rtodms(pline, data.uv.u, 'E', 'W'), stdout);
+                putchar('\t');
+                (void)fputs(rtodms(pline, data.uv.v, 'N', 'S'), stdout);
+            }
+        } else {    /* x-y or decimal degree ascii output, scale if warranted by output units */
+            if (inverse) {
+                if (Proj->left == PJ_IO_UNITS_ANGULAR) {
+                    data.uv.v *= RAD_TO_DEG;
+                    data.uv.u *= RAD_TO_DEG;
                 }
-		(void)fputs(bin_in ? "\n" : s, stdout);
-	}
+            } else {
+                if (Proj->right == PJ_IO_UNITS_ANGULAR) {
+                    data.uv.v *= RAD_TO_DEG;
+                    data.uv.u *= RAD_TO_DEG;
+                }
+            }
+
+            if (reverseout) {
+                (void)printf(oform, data.uv.v); putchar('\t');
+                (void)printf(oform, data.uv.u);
+            } else {
+                (void)printf(oform, data.uv.u); putchar('\t');
+                (void)printf(oform, data.uv.v);
+            }
+        }
+
+        /* print scale factor data */
+        if (dofactors) {
+            if (!facs_bad)
+                (void)printf("\t<%g %g %g %g %g %g>",
+                    facs.h, facs.k, facs.s,
+                    facs.omega * RAD_TO_DEG, facs.a, facs.b);
+            else
+                (void)fputs("\t<* * * * * *>", stdout);
+        }
+        (void)fputs(bin_in ? "\n" : s, stdout);
+    }
 }
-	static void	/* file processing function --- verbosely */
-vprocess(FILE *fid) {
-	char line[MAX_LINE+3], *s, pline[40];
-	projUV dat_ll, dat_xy;
-	int linvers;
-
-	if (!oform)
-		oform = "%.3f";
-	if (bin_in || bin_out)
-		emess(1,"binary I/O not available in -V option");
-	for (;;) {
-		++emess_dat.File_line;
-		if (!(s = fgets(line, MAX_LINE, fid)))
-			break;
-		if (!strchr(s, '\n')) { /* overlong line */
-			int c;
-			(void)strcat(s, "\n");
-			/* gobble up to newline */
-			while ((c = fgetc(fid)) != EOF && c != '\n') ;
-		}
-		if (*s == tag) { /* pass on data */
-			(void)fputs(s, stdout);
-			continue;
-		}
-		/* check to override default input mode */
-		if (*s == 'I' || *s == 'i') {
-			linvers = 1;
-			++s;
-		} else if (*s == 'I' || *s == 'i') {
-			linvers = 0;
-			++s;
-		} else
-			linvers = inverse;
-		if (linvers) {
-			if (!PJ_INVERS(Proj)) {
-				emess(-1,"inverse for this projection not avail.\n");
-				continue;
-			}
-			dat_xy.u = strtod(s, &s);
-			dat_xy.v = strtod(s, &s);
-			if (dat_xy.u == HUGE_VAL || dat_xy.v == HUGE_VAL) {
-				emess(-1,"lon-lat input conversion failure\n");
-				continue;
-			}
-			if (prescale) { dat_xy.u *= fscale; dat_xy.v *= fscale; }
-			dat_ll = pj_inv(dat_xy, Proj);
-		} else {
-			dat_ll.u = dmstor(s, &s);
-			dat_ll.v = dmstor(s, &s);
-			if (dat_ll.u == HUGE_VAL || dat_ll.v == HUGE_VAL) {
-				emess(-1,"lon-lat input conversion failure\n");
-				continue;
-			}
-			dat_xy = pj_fwd(dat_ll, Proj);
-			if (postscale) { dat_xy.u *= fscale; dat_xy.v *= fscale; }
-		}
-		if (pj_errno) {
-			emess(-1, pj_strerrno(pj_errno));
-			continue;
-		}
-		if (!*s && (s > line)) --s; /* assumed we gobbled \n */
-		if (pj_factors(dat_ll, Proj, 0., &facs)) {
-			emess(-1,"failed to conpute factors\n\n");
-			continue;
-		}
-		if (*s != '\n')
-			(void)fputs(s, stdout);
-		(void)fputs("Longitude: ", stdout);
-		(void)fputs(rtodms(pline, dat_ll.u, 'E', 'W'), stdout);
-		(void)printf(" [ %.11g ]\n", dat_ll.u * RAD_TO_DEG);
-		(void)fputs("Latitude:  ", stdout);
-		(void)fputs(rtodms(pline, dat_ll.v, 'N', 'S'), stdout);
-		(void)printf(" [ %.11g ]\n", dat_ll.v * RAD_TO_DEG);
-		(void)fputs("Easting (x):   ", stdout);
-		(void)printf(oform, dat_xy.u); putchar('\n');
-		(void)fputs("Northing (y):  ", stdout);
-		(void)printf(oform, dat_xy.v); putchar('\n');
-		(void)printf("Meridian scale (h)%c: %.8f  ( %.4g %% error )\n",
-			facs.code & IS_ANAL_HK ? '*' : ' ', facs.h, (facs.h-1.)*100.);
-		(void)printf("Parallel scale (k)%c: %.8f  ( %.4g %% error )\n",
-			facs.code & IS_ANAL_HK ? '*' : ' ', facs.k, (facs.k-1.)*100.);
-		(void)printf("Areal scale (s):     %.8f  ( %.4g %% error )\n",
-			facs.s, (facs.s-1.)*100.);
-		(void)printf("Angular distortion (w): %.3f\n", facs.omega *
-			RAD_TO_DEG);
-		(void)printf("Meridian/Parallel angle: %.5f\n",
-			facs.thetap * RAD_TO_DEG);
-		(void)printf("Convergence%c: ",facs.code & IS_ANAL_CONV ? '*' : ' ');
-		(void)fputs(rtodms(pline, facs.conv, 0, 0), stdout);
-		(void)printf(" [ %.8f ]\n", facs.conv * RAD_TO_DEG);
-		(void)printf("Max-min (Tissot axis a-b) scale error: %.5f %.5f\n\n",
-			facs.a, facs.b);
-	}
+
+/* file processing function --- verbosely */
+static void vprocess(FILE *fid) {
+    char line[MAX_LINE+3], *s, pline[40];
+    LP dat_ll;
+    projXY dat_xy;
+    int linvers;
+
+
+    if (!oform)
+        oform = "%.3f";
+
+    if (bin_in || bin_out)
+        emess(1,"binary I/O not available in -V option");
+
+    for (;;) {
+        ++emess_dat.File_line;
+
+        if (!(s = fgets(line, MAX_LINE, fid)))
+            break;
+
+        if (!strchr(s, '\n')) { /* overlong line */
+            int c;
+            (void)strcat(s, "\n");
+            /* gobble up to newline */
+            while ((c = fgetc(fid)) != EOF && c != '\n') ;
+        }
+
+        if (*s == tag) { /* pass on data */
+            (void)fputs(s, stdout);
+            continue;
+        }
+
+        /* check to override default input mode */
+        if (*s == 'I' || *s == 'i') {
+            linvers = 1;
+            ++s;
+        } else if (*s == 'I' || *s == 'i') {
+            linvers = 0;
+            ++s;
+        } else
+            linvers = inverse;
+
+        if (linvers) {
+            if (!PJ_INVERS(Proj)) {
+                emess(-1,"inverse for this projection not avail.\n");
+                continue;
+            }
+            dat_xy.x = strtod(s, &s);
+            dat_xy.y = strtod(s, &s);
+            if (dat_xy.x == HUGE_VAL || dat_xy.y == HUGE_VAL) {
+                emess(-1,"lon-lat input conversion failure\n");
+                continue;
+            }
+            if (prescale) { dat_xy.x *= fscale; dat_xy.y *= fscale; }
+            if (reversein) {
+                projXY temp = dat_xy;
+                dat_xy.x = temp.y;
+                dat_xy.y = temp.x;
+            }
+            dat_ll = pj_inv(dat_xy, Proj);
+        } else {
+            dat_ll.lam = dmstor(s, &s);
+            dat_ll.phi = dmstor(s, &s);
+            if (dat_ll.lam == HUGE_VAL || dat_ll.phi == HUGE_VAL) {
+                emess(-1,"lon-lat input conversion failure\n");
+                continue;
+            }
+            if (reversein) {
+                LP temp = dat_ll;
+                dat_ll.lam = temp.phi;
+                dat_ll.phi = temp.lam;
+            }
+            dat_xy = pj_fwd(dat_ll, Proj);
+            if (postscale) { dat_xy.x *= fscale; dat_xy.y *= fscale; }
+        }
+
+        /* apply rad->deg scaling in case the output from a pipeline has degrees as units */
+        if (!inverse && Proj->right == PJ_IO_UNITS_ANGULAR) {
+            dat_xy.x *= RAD_TO_DEG;
+            dat_xy.y *= RAD_TO_DEG;
+        }
+
+        /* For some reason pj_errno does not work as expected in some   */
+        /* versions of Visual Studio, so using pj_get_errno_ref instead */
+        if (*pj_get_errno_ref()) {
+            emess(-1, pj_strerrno(*pj_get_errno_ref()));
+            continue;
+        }
+
+        if (!*s && (s > line)) --s; /* assumed we gobbled \n */
+        if (pj_factors(dat_ll, Proj, 0., &facs)) {
+            emess(-1,"failed to compute factors\n\n");
+            continue;
+        }
+
+        if (*s != '\n')
+            (void)fputs(s, stdout);
+
+        (void)fputs("Longitude: ", stdout);
+        (void)fputs(rtodms(pline, dat_ll.lam, 'E', 'W'), stdout);
+        (void)printf(" [ %.11g ]\n", dat_ll.lam * RAD_TO_DEG);
+        (void)fputs("Latitude:  ", stdout);
+        (void)fputs(rtodms(pline, dat_ll.phi, 'N', 'S'), stdout);
+        (void)printf(" [ %.11g ]\n", dat_ll.phi * RAD_TO_DEG);
+        (void)fputs("Easting (x):   ", stdout);
+        (void)printf(oform, dat_xy.x); putchar('\n');
+        (void)fputs("Northing (y):  ", stdout);
+        (void)printf(oform, dat_xy.y); putchar('\n');
+        (void)printf("Meridian scale (h) : %.8f  ( %.4g %% error )\n", facs.h, (facs.h-1.)*100.);
+        (void)printf("Parallel scale (k) : %.8f  ( %.4g %% error )\n", facs.k, (facs.k-1.)*100.);
+        (void)printf("Areal scale (s):     %.8f  ( %.4g %% error )\n", facs.s, (facs.s-1.)*100.);
+        (void)printf("Angular distortion (w): %.3f\n", facs.omega * RAD_TO_DEG);
+        (void)printf("Meridian/Parallel angle: %.5f\n", facs.thetap * RAD_TO_DEG);
+        (void)printf("Convergence : ");
+        (void)fputs(rtodms(pline, facs.conv, 0, 0), stdout);
+        (void)printf(" [ %.8f ]\n", facs.conv * RAD_TO_DEG);
+        (void)printf("Max-min (Tissot axis a-b) scale error: %.5f %.5f\n\n", facs.a, facs.b);
+    }
 }
 
 int main(int argc, char **argv) {
     char *arg, **eargv = argv, *pargv[MAX_PARGS], **iargv = argv;
     FILE *fid;
-    int pargc = 0, iargc = argc, eargc = 0, c, mon = 0;
+    int pargc = 0, iargc = argc, eargc = 0, mon = 0;
 
     if ( (emess_dat.Prog_name = strrchr(*argv,DIR_CHAR)) != NULL)
         ++emess_dat.Prog_name;
@@ -257,6 +318,7 @@ int main(int argc, char **argv) {
         (void)fprintf(stderr, usage, pj_get_release(), emess_dat.Prog_name);
         exit (0);
     }
+
     /* process run line arguments */
     while (--argc > 0) { /* collect run line arguments */
         if(**++argv == '-') for(arg = *argv;;) {
@@ -267,9 +329,6 @@ int main(int argc, char **argv) {
               case 'b': /* binary I/O */
                 bin_in = bin_out = 1;
                 continue;
-              case 'C': /* Check - run internal regression tests */
-                return pj_run_selftests (very_verby);
-                continue;
               case 'v': /* monitor dump of initialization */
                 mon = 1;
                 continue;
@@ -288,6 +347,7 @@ int main(int argc, char **argv) {
               case 'V': /* very verbose processing mode */
                 very_verby = 1;
                 mon = 1;
+                continue;
               case 'S': /* compute scale factors */
                 dofactors = 1;
                 continue;
@@ -298,11 +358,11 @@ int main(int argc, char **argv) {
               case 'l': /* list projections, ellipses or units */
                 if (!arg[1] || arg[1] == 'p' || arg[1] == 'P') {
                     /* list projections */
-                    struct PJ_LIST *lp;
+                    const struct PJ_LIST *lp;
                     int do_long = arg[1] == 'P', c;
                     char *str;
 
-                    for (lp = pj_get_list_ref() ; lp->id ; ++lp) {
+                    for (lp = proj_list_operations() ; lp->id ; ++lp) {
                         if( strcmp(lp->id,"latlong") == 0
                             || strcmp(lp->id,"longlat") == 0
                             || strcmp(lp->id,"geocent") == 0 )
@@ -319,28 +379,28 @@ int main(int argc, char **argv) {
                         }
                     }
                 } else if (arg[1] == '=') { /* list projection 'descr' */
-                    struct PJ_LIST *lp;
+                    const struct PJ_LIST *lp;
 
                     arg += 2;
-                    for (lp = pj_get_list_ref(); lp->id ; ++lp)
+                    for (lp = proj_list_operations(); lp->id ; ++lp)
                         if (!strcmp(lp->id, arg)) {
                             (void)printf("%9s : %s\n", lp->id, *lp->descr);
                             break;
                         }
                 } else if (arg[1] == 'e') { /* list ellipses */
-                    struct PJ_ELLPS *le;
+                    const struct PJ_ELLPS *le;
 
-                    for (le = pj_get_ellps_ref(); le->id ; ++le)
+                    for (le = proj_list_ellps(); le->id ; ++le)
                         (void)printf("%9s %-16s %-16s %s\n",
                                      le->id, le->major, le->ell, le->name);
                 } else if (arg[1] == 'u') { /* list units */
-                    struct PJ_UNITS *lu;
+                    const struct PJ_UNITS *lu;
 
-                    for (lu = pj_get_units_ref(); lu->id ; ++lu)
+                    for (lu = proj_list_units(); lu->id ; ++lu)
                         (void)printf("%12s %-20s %s\n",
                                      lu->id, lu->to_meter, lu->name);
                 } else if (arg[1] == 'd') { /* list datums */
-                    struct PJ_DATUMS *ld;
+                    const struct PJ_DATUMS *ld;
 
                     printf("__datum_id__ __ellipse___ __definition/comments______________________________\n" );
                     for (ld = pj_get_datums_ref(); ld->id ; ++ld)
@@ -380,12 +440,15 @@ int main(int argc, char **argv) {
                 continue;
               case 'W': /* specify seconds precision */
               case 'w': /* -W for constant field width */
-                if ((c = arg[1]) != 0 && isdigit(c)) {
+              {
+                int c = arg[1];
+                if (c != 0 && isdigit(c)) {
                     set_rtodms(c - '0', *arg == 'W');
                     ++arg;
                 } else
                     emess(1,"-W argument missing or non-digit");
                 continue;
+              }
               case 'f': /* alternate output format degrees or xy */
                 if (--argc <= 0) goto noargument;
                 oform = *++argv;
@@ -432,21 +495,20 @@ int main(int argc, char **argv) {
     if (inverse) {
         if (!Proj->inv)
             emess(3,"inverse projection not available");
-        proj = pj_inv;
+        proj.inv = pj_inv;
     } else
-        proj = pj_fwd;
+        proj.fwd = pj_fwd;
     if (cheby_str) {
-        extern void gen_cheb(int, projUV(*)(projUV), char *, PJ *, int, char **);
-
         gen_cheb(inverse, int_proj, cheby_str, Proj, iargc, iargv);
         exit(0);
     }
-    /* set input formating control */
+
+    /* set input formatting control */
     if (mon) {
         pj_pr_list(Proj);
         if (very_verby) {
             (void)printf("#Final Earth figure: ");
-            if (Proj->es) {
+            if (Proj->es != 0.0) {
                 (void)printf("ellipsoid\n#  Major axis (a): ");
                 (void)printf(oform ? oform : "%.3f", Proj->a);
                 (void)printf("\n#  1/flattening: %.6f\n",
@@ -459,6 +521,7 @@ int main(int argc, char **argv) {
             }
         }
     }
+
     if (inverse)
         informat = strtod;
     else {
@@ -467,8 +530,7 @@ int main(int argc, char **argv) {
             oform = "%.2f";
     }
 
-    if (bin_out)
-    {
+    if (bin_out) {
         SET_BINARY_MODE(stdout);
     }
 
@@ -498,7 +560,9 @@ int main(int argc, char **argv) {
         (void)fclose(fid);
         emess_dat.File_name = 0;
     }
+
     if( Proj )
         pj_free(Proj);
+
     exit(0); /* normal completion */
 }
diff --git a/src/proj.def b/src/proj.def
index 1f228a6..f2936ed 100644
--- a/src/proj.def
+++ b/src/proj.def
@@ -88,4 +88,67 @@ EXPORTS
     geod_polygon_testedge           @86
     geod_polygon_testpoint          @87
     geod_polygon_clear              @88
-    pj_run_selftests                @89
+
+    pj_find_file                    @89
+    pj_chomp                        @90
+    pj_shrink                       @91
+    pj_approx_2D_trans              @92
+    pj_approx_3D_trans              @93
+    pj_has_inverse                  @94
+    pj_param_exists                 @95
+
+    proj_create                     @96
+    proj_create_argv                @97
+    proj_create_crs_to_crs          @98
+    proj_destroy                    @99
+
+    proj_trans                     @100
+    proj_trans_array               @101
+    proj_trans_generic             @102
+    proj_roundtrip                 @103
+
+    proj_coord                     @104
+    proj_coord_error               @105
+
+    proj_errno                     @106
+    proj_errno_set                 @107
+    proj_errno_reset               @108
+    proj_errno_restore             @109
+    proj_context_errno_set         @110
+
+    proj_context_create            @111
+    proj_context_set               @112
+    proj_context_inherit           @113
+    proj_context_destroy           @114
+
+    proj_lp_dist                   @115
+    proj_lpz_dist                  @116
+    proj_xy_dist                   @117
+    proj_xyz_dist                  @118
+
+    proj_log_level                 @119
+    proj_log_func                  @120
+    proj_log_error                 @121
+    proj_log_debug                 @122
+    proj_log_trace                 @123
+
+    proj_info                      @124
+    proj_pj_info                   @125
+    proj_grid_info                 @126
+    proj_init_info                 @127
+
+    proj_torad                     @128
+    proj_todeg                     @129
+    proj_geocentric_latitude       @130
+    proj_rtodms                    @131
+    proj_dmstor                    @132
+
+    proj_factors                   @133
+
+    proj_list_operations           @134
+    proj_list_ellps                @135
+    proj_list_units                @136
+    proj_list_prime_meridians      @137
+
+    proj_angular_input             @138
+    proj_angular_output            @139
diff --git a/src/proj.h b/src/proj.h
new file mode 100644
index 0000000..c3165cf
--- /dev/null
+++ b/src/proj.h
@@ -0,0 +1,387 @@
+/******************************************************************************
+ * Project:  PROJ.4
+ * Purpose:  Revised, experimental API for PROJ.4, intended as the foundation
+ *           for added geodetic functionality.
+ *
+ *           The original proj API (defined in projects.h) has grown organically
+ *           over the years, but it has also grown somewhat messy.
+ *
+ *           The same has happened with the newer high level API (defined in
+ *           proj_api.h): To support various historical objectives, proj_api.h
+ *           contains a rather complex combination of conditional defines and
+ *           typedefs. Probably for good (historical) reasons, which are not
+ *           always evident from today's perspective.
+ *
+ *           This is an evolving attempt at creating a re-rationalized API
+ *           with primary design goals focused on sanitizing the namespaces.
+ *           Hence, all symbols exposed are being moved to the proj_ namespace,
+ *           while all data types are being moved to the PJ_ namespace.
+ *
+ *           Please note that this API is *orthogonal* to  the previous APIs:
+ *           Apart from some inclusion guards, projects.h and proj_api.h are not
+ *           touched - if you do not include proj.h, the projects and proj_api
+ *           APIs should work as they always have.
+ *
+ *           A few implementation details:
+ *
+ *           Apart from the namespacing efforts, I'm trying to eliminate three
+ *           proj_api elements, which I have found especially confusing.
+ *
+ *           FIRST and foremost, I try to avoid typedef'ing away pointer
+ *           semantics. I agree that it can be occasionally useful, but I
+ *           prefer having the pointer nature of function arguments being
+ *           explicitly visible.
+ *
+ *           Hence, projCtx has been replaced by PJ_CONTEXT *.
+ *           and    projPJ  has been replaced by PJ *
+ *
+ *           SECOND, I try to eliminate cases of information hiding implemented
+ *           by redefining data types to void pointers.
+ *
+ *           I prefer using a combination of forward declarations and typedefs.
+ *           Hence:
+ *               typedef void *projCtx;
+ *           Has been replaced by:
+ *               struct projCtx_t;
+ *               typedef struct projCtx_t PJ_CONTEXT;
+ *           This makes it possible for the calling program to know that the
+ *           PJ_CONTEXT data type exists, and handle pointers to that data type
+ *           without having any idea about its internals.
+ *
+ *           (obviously, in this example, struct projCtx_t should also be
+ *           renamed struct pj_ctx some day, but for backwards compatibility
+ *           it remains as-is for now).
+ *
+ *           THIRD, I try to eliminate implicit type punning. Hence this API
+ *           introduces the PJ_COORD union data type, for generic 4D coordinate
+ *           handling.
+ *
+ *           PJ_COORD makes it possible to make explicit the previously used
+ *           "implicit type punning", where a XY is turned into a LP by
+ *           re#defining both as UV, behind the back of the user.
+ *
+ *           The PJ_COORD union is used for storing 1D, 2D, 3D and 4D coordinates.
+ *
+ *           The bare essentials API presented here follows the PROJ.4
+ *           convention of sailing the coordinate to be reprojected, up on
+ *           the stack ("call by value"), and symmetrically returning the
+ *           result on the stack. Although the PJ_COORD object is twice as large
+ *           as the traditional XY and LP objects, timing results have shown the
+ *           overhead to be very reasonable.
+ *
+ *           Contexts and thread safety
+ *           --------------------------
+ *
+ *           After a year of experiments (and previous experience from the
+ *           trlib transformation library) it has become clear that the
+ *           context subsystem is unavoidable in a multi-threaded world.
+ *           Hence, instead of hiding it away, we move it into the limelight,
+ *           highly recommending (but not formally requiring) the bracketing
+ *           of any code block calling PROJ.4 functions with calls to
+ *           proj_context_create(...)/proj_context_destroy()
+ *
+ *           Legacy single threaded code need not do anything, but *may*
+ *           implement a bit of future compatibility by using the backward
+ *           compatible call proj_context_create(0), which will not create
+ *           a new context, but simply provide a pointer to the default one.
+ *
+ *           See proj_4D_api_test.c for examples of how to use the API.
+ *
+ * Author:   Thomas Knudsen, <thokn at sdfe.dk>
+ *           Benefitting from a large number of comments and suggestions
+ *           by (primarily) Kristian Evers and Even Rouault.
+ *
+ ******************************************************************************
+ * Copyright (c) 2016, 2017, Thomas Knudsen / SDFE
+ *
+ * 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 COORD 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.
+ *****************************************************************************/
+/*
+#ifdef _MSC_VER
+#ifndef _USE_MATH_DEFINES
+#define _USE_MATH_DEFINES
+#endif
+#endif
+#include <math.h>    For M_PI */
+#include <stddef.h>  /* For size_t */
+
+
+#ifdef PROJECTS_H
+#error proj.h must be included before projects.h
+#endif
+#ifdef PROJ_API_H
+#error proj.h must be included before proj_api.h
+#endif
+
+#ifndef PROJ_H
+#define PROJ_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* The version numbers should be updated with every release! **/
+#define PROJ_VERSION_MAJOR 5
+#define PROJ_VERSION_MINOR 0
+#define PROJ_VERSION_PATCH 0
+
+extern char const pj_release[]; /* global release id string */
+
+/* first forward declare everything needed */
+
+/* Data type for generic geodetic 3D data plus epoch information */
+union PJ_COORD;
+typedef union PJ_COORD PJ_COORD;
+
+struct PJ_AREA;
+typedef struct PJ_AREA PJ_AREA;
+
+/* The slimmed down PROJ 5.0.0 version of struct FACTORS  */
+/* Will take over the world and the name when we can rid  */
+/* the library for deprecated stuff, but it's the typedef */
+/* which is userspace useful, so it does not do much of a */
+/* difference */
+struct P5_FACTORS {                  /* Common designation */
+    double meridional_scale;               /* h */
+    double parallel_scale;                 /* k */
+    double areal_scale;                    /* s */
+
+    double angular_distortion;             /* omega */
+    double meridian_parallel_angle;        /* theta-prime */
+    double meridian_convergence;           /* alpha */
+
+    double tissot_semimajor;               /* a */
+    double tissot_semiminor;               /* b */
+
+    double dx_dlam, dx_dphi;
+    double dy_dlam, dy_dphi;
+};
+typedef struct P5_FACTORS PJ_FACTORS;
+
+/* Data type for projection/transformation information */
+struct PJconsts;
+typedef struct PJconsts PJ;         /* the PJ object herself */
+
+/* Data type for library level information */
+struct PJ_INFO;
+typedef struct PJ_INFO PJ_INFO;
+
+struct PJ_PROJ_INFO;
+typedef struct PJ_PROJ_INFO PJ_PROJ_INFO;
+
+struct PJ_GRID_INFO;
+typedef struct PJ_GRID_INFO PJ_GRID_INFO;
+
+struct PJ_INIT_INFO;
+typedef struct PJ_INIT_INFO PJ_INIT_INFO;
+
+/* Data types for list of operations, ellipsoids, datums and units used in PROJ.4 */
+struct PJ_LIST;
+typedef struct PJ_LIST PJ_OPERATIONS;
+
+struct PJ_ELLPS;
+typedef struct PJ_ELLPS PJ_ELLPS;
+
+struct PJ_UNITS;
+typedef struct PJ_UNITS PJ_UNITS;
+
+struct PJ_PRIME_MERIDIANS;
+typedef struct PJ_PRIME_MERIDIANS PJ_PRIME_MERIDIANS;
+
+
+/* Geodetic, mostly spatiotemporal coordinate types */
+typedef struct { double   x,   y,  z, t; }  PJ_XYZT;
+typedef struct { double   u,   v,  w, t; }  PJ_UVWT;
+typedef struct { double lam, phi,  z, t; }  PJ_LPZT;
+typedef struct { double o, p, k; }          PJ_OPK;  /* Rotations: omega, phi, kappa */
+typedef struct { double e, n, u; }          PJ_ENU;  /* East, North, Up */
+
+/* Classic proj.4 pair/triplet types */
+typedef struct { double   u,   v; }  UV;
+typedef struct { double   x,   y; }  XY;
+typedef struct { double lam, phi; }  LP;
+
+typedef struct { double   x,   y,  z; }  XYZ;
+typedef struct { double   u,   v,  w; }  UVW;
+typedef struct { double lam, phi,  z; }  LPZ;
+
+
+/* Avoid preprocessor renaming and implicit type-punning: Use a union to make it explicit */
+union PJ_COORD {
+     double v[4];   /* First and foremost, it really is "just 4 numbers in a vector" */
+    PJ_XYZT xyzt;
+    PJ_UVWT uvwt;
+    PJ_LPZT lpzt;
+     PJ_OPK opk;
+     PJ_ENU enu;
+        XYZ xyz;
+        UVW uvw;
+        LPZ lpz;
+         XY xy;
+         UV uv;
+         LP lp;
+};
+
+
+struct PJ_INFO {
+    char        release[64];        /* Release info. Version + date         */
+    char        version[64];        /* Full version number                  */
+    int         major;              /* Major release number                 */
+    int         minor;              /* Minor release number                 */
+    int         patch;              /* Patch level                          */
+    char        searchpath[512];    /* Paths where init and grid files are  */
+                                    /* looked for. Paths are separated by   */
+                                    /* semi-colons.                         */
+};
+
+struct PJ_PROJ_INFO {
+    char        id[16];             /* Name of the projection in question                       */
+    char        description[128];   /* Description of the projection                            */
+    char        definition[512];    /* Projection definition                                    */
+    int         has_inverse;        /* 1 if an inverse mapping exists, 0 otherwise              */
+    double      accuracy;           /* Expected accuracy of the transformation. -1 if unknown.  */
+};
+
+struct PJ_GRID_INFO {
+    char        gridname[32];       /* name of grid                         */
+    char        filename[260];      /* full path to grid                    */
+    char        format[8];          /* file format of grid                  */
+    LP          lowerleft;          /* Coordinates of lower left corner     */
+    LP          upperright;         /* Coordinates of upper right corner    */
+    int         n_lon, n_lat;       /* Grid size                            */
+    double      cs_lon, cs_lat;     /* Cell size of grid                    */
+};
+
+struct PJ_INIT_INFO {
+    char        name[32];           /* name of init file                        */
+    char        filename[260];      /* full path to the init file.              */
+    char        version[32];        /* version of the init file                 */
+    char        origin[32];         /* origin of the file, e.g. EPSG            */
+    char        lastupdate[16];     /* Date of last update in YYYY-MM-DD format */
+};
+
+
+
+/* The context type - properly namespaced synonym for projCtx */
+struct projCtx_t;
+typedef struct projCtx_t PJ_CONTEXT;
+
+/* A P I */
+
+
+/* Functionality for handling thread contexts */
+#define PJ_DEFAULT_CTX 0
+PJ_CONTEXT *proj_context_create (void);
+PJ_CONTEXT *proj_context_destroy (PJ_CONTEXT *ctx);
+
+
+/* Manage the transformation definition object PJ */
+PJ  *proj_create (PJ_CONTEXT *ctx, const char *definition);
+PJ  *proj_create_argv (PJ_CONTEXT *ctx, int argc, char **argv);
+PJ  *proj_create_crs_to_crs(PJ_CONTEXT *ctx, const char *srid_from, const char *srid_to, PJ_AREA *area);
+PJ  *proj_destroy (PJ *P);
+
+/* Setter-functions for the opaque PJ_AREA struct */
+/* Uncomment these when implementing support for area-based transformations.
+void proj_area_bbox(PJ_AREA *area, LP ll, LP ur);
+void proj_area_description(PJ_AREA *area, const char *descr);
+*/
+
+/* Apply transformation to observation - in forward or inverse direction */
+enum PJ_DIRECTION {
+    PJ_FWD   =  1,   /* Forward    */
+    PJ_IDENT =  0,   /* Do nothing */
+    PJ_INV   = -1    /* Inverse    */
+};
+typedef enum PJ_DIRECTION PJ_DIRECTION;
+
+
+int proj_angular_input (PJ *P, enum PJ_DIRECTION dir);
+int proj_angular_output (PJ *P, enum PJ_DIRECTION dir);
+
+
+PJ_COORD proj_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coord);
+int proj_trans_array (PJ *P, PJ_DIRECTION direction, size_t n, PJ_COORD *coord);
+size_t proj_trans_generic (
+    PJ *P,
+    PJ_DIRECTION direction,
+    double *x, size_t sx, size_t nx,
+    double *y, size_t sy, size_t ny,
+    double *z, size_t sz, size_t nz,
+    double *t, size_t st, size_t nt
+);
+
+
+/* Initializers */
+PJ_COORD proj_coord (double x, double y, double z, double t);
+
+/* Measure internal consistency - in forward or inverse direction */
+double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo);
+
+/* Geodesic distance between two points with angular 2D coordinates */
+double proj_lp_dist (const PJ *P, LP a, LP b);
+
+/* The geodesic distance AND the vertical offset */
+double proj_lpz_dist (const PJ *P, LPZ a, LPZ b);
+
+/* Euclidean distance between two points with linear 2D coordinates */
+double proj_xy_dist (XY a, XY b);
+
+/* Euclidean distance between two points with linear 3D coordinates */
+double proj_xyz_dist (XYZ a, XYZ b);
+
+
+/* Set or read error level */
+int  proj_errno (const PJ *P);
+int  proj_errno_set (const PJ *P, int err);
+int  proj_errno_reset (const PJ *P);
+int  proj_errno_restore (const PJ *P, int err);
+
+/* Scaling and angular distortion factors */
+PJ_FACTORS proj_factors(PJ *P, LP lp);
+
+/* Info functions - get information about various PROJ.4 entities */
+PJ_INFO      proj_info(void);
+PJ_PROJ_INFO proj_pj_info(PJ *P);
+PJ_GRID_INFO proj_grid_info(const char *gridname);
+PJ_INIT_INFO proj_init_info(const char *initname);
+
+/* List functions: */
+/* Get lists of operations, ellipsoids, units and prime meridians. */
+const PJ_OPERATIONS       *proj_list_operations(void);
+const PJ_ELLPS            *proj_list_ellps(void);
+const PJ_UNITS            *proj_list_units(void);
+const PJ_PRIME_MERIDIANS  *proj_list_prime_meridians(void);
+
+/* These are trivial, and while occasionally useful in real code, primarily here to      */
+/* simplify demo code, and in acknowledgement of the proj-internal discrepancy between   */
+/* angular units expected by classical proj, and by Charles Karney's geodesics subsystem */
+double proj_torad (double angle_in_degrees);
+double proj_todeg (double angle_in_radians);
+
+/* Geographical to geocentric latitude - another of the "simple, but useful" */
+PJ_COORD proj_geocentric_latitude (const PJ *P, PJ_DIRECTION direction, PJ_COORD coo);
+
+double proj_dmstor(const char *is, char **rs);
+char*  proj_rtodms(char *s, double r, int pos, int neg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ndef PROJ_H */
diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c
new file mode 100644
index 0000000..0d50407
--- /dev/null
+++ b/src/proj_4D_api.c
@@ -0,0 +1,990 @@
+/******************************************************************************
+ * Project:  PROJ.4
+ * Purpose:  Implement a (currently minimalistic) proj API based primarily
+ *           on the PJ_COORD 4D geodetic spatiotemporal data type.
+ *
+ * Author:   Thomas Knudsen,  thokn at sdfe.dk,  2016-06-09/2016-11-06
+ *
+ ******************************************************************************
+ * Copyright (c) 2016, 2017 Thomas Knudsen/SDFE
+ *
+ * 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 <stddef.h>
+#include <errno.h>
+#include <proj.h>
+#include "proj_internal.h"
+#include "projects.h"
+#include "geodesic.h"
+
+
+/* Initialize PJ_COORD struct */
+PJ_COORD proj_coord (double x, double y, double z, double t) {
+    PJ_COORD res;
+    res.v[0] = x;
+    res.v[1] = y;
+    res.v[2] = z;
+    res.v[3] = t;
+    return res;
+}
+
+/*****************************************************************************/
+int proj_angular_input (PJ *P, enum PJ_DIRECTION dir) {
+/******************************************************************************
+    Returns 1 if the operator P expects angular input coordinates when
+    operating in direction dir, 0 otherwise.
+    dir: {PJ_FWD, PJ_INV}
+******************************************************************************/
+    if (PJ_FWD==dir)
+        return pj_left (P)==PJ_IO_UNITS_ANGULAR;
+    return pj_right (P)==PJ_IO_UNITS_ANGULAR;
+}
+
+/*****************************************************************************/
+int proj_angular_output (PJ *P, enum PJ_DIRECTION dir) {
+/******************************************************************************
+    Returns 1 if the operator P provides angular output coordinates when
+    operating in direction dir, 0 otherwise.
+    dir: {PJ_FWD, PJ_INV}
+******************************************************************************/
+    return proj_angular_input (P, -dir);
+}
+
+
+/* Geodesic distance (in meter) between two points with angular 2D coordinates */
+double proj_lp_dist (const PJ *P, LP a, LP b) {
+    double s12, azi1, azi2;
+    /* Note: the geodesic code takes arguments in degrees */
+    geod_inverse (P->geod, PJ_TODEG(a.phi), PJ_TODEG(a.lam), PJ_TODEG(b.phi), PJ_TODEG(b.lam), &s12, &azi1, &azi2);
+    return s12;
+}
+
+/* The geodesic distance AND the vertical offset */
+double proj_lpz_dist (const PJ *P, LPZ a, LPZ b) {
+    PJ_COORD aa, bb;
+    aa.lpz = a;
+    bb.lpz = b;
+    if (HUGE_VAL==a.lam || HUGE_VAL==b.lam)
+        return HUGE_VAL;
+    return hypot (proj_lp_dist (P, aa.lp, bb.lp), a.z - b.z);
+}
+
+/* Euclidean distance between two points with linear 2D coordinates */
+double proj_xy_dist (XY a, XY b) {
+    return hypot (a.x - b.x, a.y - b.y);
+}
+
+/* Euclidean distance between two points with linear 3D coordinates */
+double proj_xyz_dist (XYZ a, XYZ b) {
+    return hypot (hypot (a.x - b.x, a.y - b.y), a.z - b.z);
+}
+
+
+
+/* Measure numerical deviation after n roundtrips fwd-inv (or inv-fwd) */
+double proj_roundtrip (PJ *P, PJ_DIRECTION direction, int n, PJ_COORD *coo) {
+    int i;
+    PJ_COORD t, org;
+
+    if (0==P)
+        return HUGE_VAL;
+
+    if (n < 1) {
+        proj_errno_set (P, EINVAL);
+        return HUGE_VAL;
+    }
+
+    /* in the first half-step, we generate the output value */
+    org  = *coo;
+    *coo = proj_trans (P, direction, org);
+    t = *coo;
+
+    /* now we take n-1 full steps in inverse direction: We are */
+    /* out of phase due to the half step already taken */
+    for (i = 0;  i < n - 1;  i++)
+        t = proj_trans (P,  direction,  proj_trans (P, -direction, t) );
+
+    /* finally, we take the last half-step */
+    t = proj_trans (P, -direction, t);
+
+    /* checking for angular *input* since we do a roundtrip, and end where we begin */
+    if (proj_angular_input (P, direction))
+        return proj_lpz_dist (P, org.lpz, t.lpz);
+
+    return proj_xyz_dist (org.xyz, t.xyz);
+}
+
+
+
+/**************************************************************************************/
+PJ_COORD proj_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo) {
+/***************************************************************************************
+Apply the transformation P to the coordinate coo, preferring the 4D interfaces if
+available.
+
+See also pj_approx_2D_trans and pj_approx_3D_trans in pj_internal.c, which work
+similarly, but prefers the 2D resp. 3D interfaces if available.
+***************************************************************************************/
+    if (0==P)
+        return coo;
+    if (P->inverted)
+        direction = -direction;
+
+    switch (direction) {
+        case PJ_FWD:
+            return pj_fwd4d (coo, P);
+        case PJ_INV:
+            return  pj_inv4d (coo, P);
+        case PJ_IDENT:
+            return coo;
+        default:
+            break;
+    }
+
+    proj_errno_set (P, EINVAL);
+    return proj_coord_error ();
+}
+
+
+
+/*****************************************************************************/
+int proj_trans_array (PJ *P, PJ_DIRECTION direction, size_t n, PJ_COORD *coord) {
+/******************************************************************************
+    Batch transform an array of PJ_COORD.
+
+    Returns 0 if all coordinates are transformed without error, otherwise
+    returns error number.
+******************************************************************************/
+    size_t i;
+
+    for (i = 0;  i < n;  i++) {
+        coord[i] = proj_trans (P, direction, coord[i]);
+        if (proj_errno(P))
+            return proj_errno (P);
+    }
+
+   return 0;
+}
+
+
+
+/*************************************************************************************/
+size_t proj_trans_generic (
+    PJ *P,
+    PJ_DIRECTION direction,
+    double *x, size_t sx, size_t nx,
+    double *y, size_t sy, size_t ny,
+    double *z, size_t sz, size_t nz,
+    double *t, size_t st, size_t nt
+) {
+/**************************************************************************************
+
+    Transform a series of coordinates, where the individual coordinate dimension
+    may be represented by an array that is either
+
+        1. fully populated
+        2. a null pointer and/or a length of zero, which will be treated as a
+           fully populated array of zeroes
+        3. of length one, i.e. a constant, which will be treated as a fully
+           populated array of that constant value
+
+    The strides, sx, sy, sz, st, represent the step length, in bytes, between
+    consecutive elements of the corresponding array. This makes it possible for
+    proj_transform to handle transformation of a large class of application
+    specific data structures, without necessarily understanding the data structure
+    format, as in:
+
+        typedef struct {double x, y; int quality_level; char surveyor_name[134];} XYQS;
+        XYQS survey[345];
+        double height = 23.45;
+        PJ *P = {...};
+        size_t stride = sizeof (XYQS);
+        ...
+        proj_transform (
+            P, PJ_INV, sizeof(XYQS),
+            &(survey[0].x), stride, 345,  (*  We have 345 eastings  *)
+            &(survey[0].y), stride, 345,  (*  ...and 345 northings. *)
+            &height, 1,                   (*  The height is the constant  23.45 m *)
+            0, 0                          (*  and the time is the constant 0.00 s *)
+        );
+
+    This is similar to the inner workings of the pj_transform function, but the
+    stride functionality has been generalized to work for any size of basic unit,
+    not just a fixed number of doubles.
+
+    In most cases, the stride will be identical for x, y,z, and t, since they will
+    typically be either individual arrays (stride = sizeof(double)), or strided
+    views into an array of application specific data structures (stride = sizeof (...)).
+
+    But in order to support cases where x, y, z, and t come from heterogeneous
+    sources, individual strides, sx, sy, sz, st, are used.
+
+    Caveat: Since proj_transform does its work *in place*, this means that even the
+    supposedly constants (i.e. length 1 arrays) will return from the call in altered
+    state. Hence, remember to reinitialize between repeated calls.
+
+    Return value: Number of transformations completed.
+
+**************************************************************************************/
+    PJ_COORD coord = {{0,0,0,0}};
+    size_t i, nmin;
+    double null_broadcast = 0;
+
+    if (0==P)
+        return 0;
+
+    if (P->inverted)
+        direction = -direction;
+
+    /* ignore lengths of null arrays */
+    if (0==x) nx = 0;
+    if (0==y) ny = 0;
+    if (0==z) nz = 0;
+    if (0==t) nt = 0;
+
+    /* and make the nullities point to some real world memory for broadcasting nulls */
+    if (0==nx) x = &null_broadcast;
+    if (0==ny) y = &null_broadcast;
+    if (0==nz) z = &null_broadcast;
+    if (0==nt) t = &null_broadcast;
+
+    /* nothing to do? */
+    if (0==nx+ny+nz+nt)
+        return 0;
+
+    /* arrays of length 1 are constants, which we broadcast along the longer arrays */
+    /* so we need to find the length of the shortest non-unity array to figure out  */
+    /* how many coordinate pairs we must transform */
+    nmin = (nx > 1)? nx: (ny > 1)? ny: (nz > 1)? nz: (nt > 1)? nt: 1;
+    if ((nx > 1) && (nx < nmin))  nmin = nx;
+    if ((ny > 1) && (ny < nmin))  nmin = ny;
+    if ((nz > 1) && (nz < nmin))  nmin = nz;
+    if ((nt > 1) && (nt < nmin))  nmin = nt;
+
+    /* Check validity of direction flag */
+    switch (direction) {
+        case PJ_FWD:
+        case PJ_INV:
+            break;
+        case PJ_IDENT:
+            return nmin;
+        default:
+            proj_errno_set (P, EINVAL);
+            return 0;
+    }
+
+    /* Arrays of length==0 are broadcast as the constant 0               */
+    /* Arrays of length==1 are broadcast as their single value           */
+    /* Arrays of length >1 are iterated over (for the first nmin values) */
+    /* The slightly convolved incremental indexing is used due           */
+    /* to the stride, which may be any size supported by the platform    */
+    for (i = 0;  i < nmin;  i++) {
+        coord.xyzt.x = *x;
+        coord.xyzt.y = *y;
+        coord.xyzt.z = *z;
+        coord.xyzt.t = *t;
+
+        if (PJ_FWD==direction)
+            coord = pj_fwd4d (coord, P);
+        else
+            coord = pj_inv4d (coord, P);
+
+        /* in all full length cases, we overwrite the input with the output,  */
+        /* and step on to the next element.                                   */
+        /* The casts are somewhat funky, but they compile down to no-ops and  */
+        /* they tell compilers and static analyzers that we know what we do   */
+        if (nx > 1)  {
+           *x = coord.xyzt.x;
+            x = (double *) ((void *) ( ((char *) x) + sx));
+        }
+        if (ny > 1)  {
+           *y = coord.xyzt.y;
+            y = (double *) ((void *) ( ((char *) y) + sy));
+        }
+        if (nz > 1)  {
+           *z = coord.xyzt.z;
+            z = (double *) ((void *) ( ((char *) z) + sz));
+        }
+        if (nt > 1)  {
+           *t = coord.xyzt.t;
+            t = (double *) ((void *) ( ((char *) t) + st));
+        }
+    }
+
+    /* Last time around, we update the length 1 cases with their transformed alter egos */
+    if (nx==1)
+        *x = coord.xyzt.x;
+    if (ny==1)
+        *y = coord.xyzt.y;
+    if (nz==1)
+        *z = coord.xyzt.z;
+    if (nt==1)
+        *t = coord.xyzt.t;
+
+    return i;
+}
+
+
+/*************************************************************************************/
+PJ_COORD proj_geocentric_latitude (const PJ *P, PJ_DIRECTION direction, PJ_COORD coo) {
+/**************************************************************************************
+    Convert geographical latitude to geocentric (or the other way round if
+    direction = PJ_INV)
+
+    The conversion involves a call to the tangent function, which goes through the
+    roof at the poles, so very close (the last centimeter) to the poles no
+    conversion takes place and the input latitude is copied directly to the output.
+
+    Fortunately, the geocentric latitude converges to the geographical at the
+    poles, so the difference is negligible.
+
+    For the spherical case, the geographical latitude equals the geocentric, and
+    consequently, the input is copied directly to the output.
+**************************************************************************************/
+    const double limit = M_HALFPI - 1e-9;
+    PJ_COORD res = coo;
+    if ((coo.lp.phi > limit) || (coo.lp.phi < -limit) || (P->es==0))
+        return res;
+    if (direction==PJ_FWD)
+        res.lp.phi = atan (P->one_es * tan (coo.lp.phi) );
+    else
+        res.lp.phi = atan (P->rone_es * tan (coo.lp.phi) );
+
+    return res;
+}
+
+double proj_torad (double angle_in_degrees) { return PJ_TORAD (angle_in_degrees);}
+double proj_todeg (double angle_in_radians) { return PJ_TODEG (angle_in_radians);}
+
+double proj_dmstor(const char *is, char **rs) {
+    return dmstor(is, rs);
+}
+
+char*  proj_rtodms(char *s, double r, int pos, int neg) {
+    return rtodms(s, r, pos, neg);
+}
+
+/*************************************************************************************/
+static PJ* skip_prep_fin(PJ *P) {
+/**************************************************************************************
+Skip prepare and finalize function for the various "helper operations" added to P when
+in cs2cs compatibility mode.
+**************************************************************************************/
+    P->skip_fwd_prepare  = 1;
+    P->skip_fwd_finalize = 1;
+    P->skip_inv_prepare  = 1;
+    P->skip_inv_finalize = 1;
+    return P;
+}
+
+/*************************************************************************************/
+static int pj_cs2cs_emulation_setup (PJ *P) {
+/**************************************************************************************
+If any cs2cs style modifiers are given (axis=..., towgs84=..., ) create the 4D API
+equivalent operations, so the preparation and finalization steps in the pj_inv/pj_fwd
+invocators can emulate the behaviour of pj_transform and the cs2cs app.
+**************************************************************************************/
+    PJ *Q;
+    paralist *p;
+    if (0==P)
+        return 0;
+
+    /* Don't recurse when calling proj_create (which calls us back) */
+    if (pj_param_exists (P->params, "break_cs2cs_recursion"))
+        return 1;
+
+    /* Swap axes? */
+    p = pj_param_exists (P->params, "axis");
+
+    /* Don't axisswap if data are already in "enu" order */
+    if (p && (0!=strcmp ("enu", p->param))) {
+        char *def = malloc (100+strlen(P->axis));
+        if (0==def)
+            return 0;
+        sprintf (def, "break_cs2cs_recursion     proj=axisswap  axis=%s", P->axis);
+        Q = proj_create (P->ctx, def);
+        free (def);
+        if (0==Q)
+            return 0;
+        P->axisswap = skip_prep_fin(Q);
+    }
+
+    /* Geoid grid(s) given? */
+    p = pj_param_exists (P->params, "geoidgrids");
+    if (p  &&  strlen (p->param) > strlen ("geoidgrids=")) {
+        char *gridnames = p->param + strlen ("geoidgrids=");
+        char *def = malloc (100+strlen(gridnames));
+        if (0==def)
+            return 0;
+        sprintf (def, "break_cs2cs_recursion     proj=vgridshift  grids=%s", gridnames);
+        Q = proj_create (P->ctx, def);
+        free (def);
+        if (0==Q)
+            return 0;
+        P->vgridshift = skip_prep_fin(Q);
+    }
+
+    /* Datum shift grid(s) given? */
+    p = pj_param_exists (P->params, "nadgrids");
+    if (p  &&  strlen (p->param) > strlen ("nadgrids=")) {
+        char *gridnames = p->param + strlen ("nadgrids=");
+        char *def = malloc (100+strlen(gridnames));
+        if (0==def)
+            return 0;
+        sprintf (def, "break_cs2cs_recursion     proj=hgridshift  grids=%s", gridnames);
+        Q = proj_create (P->ctx, def);
+        free (def);
+        if (0==Q)
+            return 0;
+        P->hgridshift = skip_prep_fin(Q);
+    }
+
+    /* We ignore helmert if we have grid shift */
+    p = P->hgridshift ? 0 : pj_param_exists (P->params, "towgs84");
+    while (p) {
+        char *def;
+        char *s = p->param;
+        double *d = P->datum_params;
+        size_t n = strlen (s);
+
+        /* We ignore null helmert shifts (common in auto-translated resource files, e.g. epsg) */
+        if (0==d[0] && 0==d[1] && 0==d[2] && 0==d[3] && 0==d[4] && 0==d[5] && 0==d[6])
+            break;
+
+        if (n <= 8) /* 8==strlen ("towgs84=") */
+            return 0;
+
+        def = malloc (100+n);
+        if (0==def)
+            return 0;
+        sprintf (def, "break_cs2cs_recursion     proj=helmert %s", s);
+        Q = proj_create (P->ctx, def);
+        free (def);
+        if (0==Q)
+            return 0;
+        P->helmert = skip_prep_fin(Q);
+
+        break;
+    }
+
+    /* We also need cartesian/geographical transformations if we are working in */
+    /* geocentric/cartesian space or we need to do a Helmert transform.         */
+    if (P->is_geocent || P->helmert) {
+        char def[100];
+        sprintf (def, "break_cs2cs_recursion     proj=cart");
+        Q = proj_create (P->ctx, def);
+        if (0==Q)
+            return 0;
+        pj_inherit_ellipsoid_def(P, Q);
+        P->cart = skip_prep_fin(Q);
+
+        sprintf (def, "break_cs2cs_recursion     proj=cart  ellps=WGS84");
+        Q = proj_create (P->ctx, def);
+        if (0==Q)
+            return 0;
+        P->cart_wgs84 = skip_prep_fin(Q);
+    }
+
+    return 1;
+}
+
+
+/*************************************************************************************/
+PJ *proj_create (PJ_CONTEXT *ctx, const char *definition) {
+/**************************************************************************************
+    Create a new PJ object in the context ctx, using the given definition. If ctx==0,
+    the default context is used, if definition==0, or invalid, a null-pointer is
+    returned. The definition may use '+' as argument start indicator, as in
+    "+proj=utm +zone=32", or leave it out, as in "proj=utm zone=32".
+
+    It may even use free formatting "proj  =  utm;  zone  =32  ellps= GRS80".
+    Note that the semicolon separator is allowed, but not required.
+**************************************************************************************/
+    PJ    *P;
+    char  *args, **argv;
+    size_t argc, n;
+    int    ret;
+
+    if (0==ctx)
+        ctx = pj_get_default_ctx ();
+
+    /* Make a copy that we can manipulate */
+    n = strlen (definition);
+    args = (char *) malloc (n + 1);
+    if (0==args)
+        return 0;
+    strcpy (args, definition);
+
+    argc = pj_trim_argc (args);
+    if (argc==0) {
+        pj_dealloc (args);
+        return 0;
+    }
+
+    argv = pj_trim_argv (argc, args);
+
+    /* ...and let pj_init_ctx do the hard work */
+    P = pj_init_ctx (ctx, (int) argc, argv);
+
+    pj_dealloc (argv);
+    pj_dealloc (args);
+
+    /* Support cs2cs-style modifiers */
+    ret = pj_cs2cs_emulation_setup  (P);
+    if (0==ret)
+        return proj_destroy (P);
+
+    return P;
+}
+
+
+
+/*************************************************************************************/
+PJ *proj_create_argv (PJ_CONTEXT *ctx, int argc, char **argv) {
+/**************************************************************************************
+Create a new PJ object in the context ctx, using the given definition argument
+array argv. If ctx==0, the default context is used, if definition==0, or invalid,
+a null-pointer is returned. The definition arguments may use '+' as argument start
+indicator, as in {"+proj=utm", "+zone=32"}, or leave it out, as in {"proj=utm",
+"zone=32"}.
+**************************************************************************************/
+    PJ *P;
+    const char *c;
+
+    if (0==argv)
+        return 0;
+    if (0==ctx)
+        ctx = pj_get_default_ctx ();
+
+    /* We assume that free format is used, and build a full proj_create compatible string */
+    c = pj_make_args (argc, argv);
+    if (0==c)
+        return 0;
+
+    P = proj_create (ctx, c);
+
+    pj_dealloc ((char *) c);
+    return P;
+}
+
+
+
+/*****************************************************************************/
+PJ  *proj_create_crs_to_crs (PJ_CONTEXT *ctx, const char *srid_from, const char *srid_to, PJ_AREA *area) {
+/******************************************************************************
+    Create a transformation pipeline between two known coordinate reference
+    systems.
+
+    srid_from and srid_to should be the value part of a +init=... parameter
+    set, i.e. "epsg:25833" or "IGNF:AMST63". Any projection definition that
+    can be found in a init-file in PROJ_LIB is a valid input to this function.
+
+    For now the function mimics the cs2cs app: An input and an output CRS is
+    given and coordinates are transformed via a hub datum (WGS84). This
+    transformation strategy is referred to as "early-binding" by the EPSG. The
+    function can be extended to support "late-binding" transformations in the
+    future without affecting users of the function.
+
+    An "area of use" can be specified in area. In the current version of this
+    function is has no function, but is added in anticipation of a
+    "late-binding" implementation in the future. The idea being, that if a user
+    supplies an area of use, the more accurate transformation between two given
+    systems can be chosen.
+
+    Example call:
+
+        PJ *P = proj_create_crs_to_crs(0, "epsg:25832", "epsg:25833", NULL);
+
+******************************************************************************/
+    PJ *P;
+    char buffer[512];
+
+    /* area not in use yet, suppressing warning */
+    (void)area;
+
+    strcpy(buffer, "+proj=pipeline +step +init=");
+    strncat(buffer, srid_from, 512-strlen(buffer));
+    strncat(buffer, " +inv +step +init=", 512-strlen(buffer));
+    strncat(buffer, srid_to, 512-strlen(buffer));
+
+    P = proj_create(ctx, buffer);
+
+    return P;
+}
+
+PJ *proj_destroy (PJ *P) {
+    pj_free (P);
+    return 0;
+}
+
+int proj_errno (const PJ *P) {
+    return pj_ctx_get_errno (pj_get_ctx ((PJ *) P));
+}
+
+/*****************************************************************************/
+int proj_errno_set (const PJ *P, int err) {
+/******************************************************************************
+    Set context-errno, bubble it up to the thread local errno, return err
+******************************************************************************/
+    /* Use proj_errno_reset to explicitly clear the error status */
+    if (0==err)
+        return 0;
+
+    /* For P==0 err goes to the default context */
+    proj_context_errno_set (pj_get_ctx ((PJ *) P), err);
+    errno = err;
+    return err;
+}
+
+/*****************************************************************************/
+int proj_errno_restore (const PJ *P, int err) {
+/******************************************************************************
+    Use proj_errno_restore when the current function succeeds, but the
+    error flag was set on entry, and stored/reset using proj_errno_reset
+    in order to monitor for new errors.
+
+    See usage example under proj_errno_reset ()
+******************************************************************************/
+    if (0==err)
+        return 0;
+    proj_errno_set (P, err);
+    return 0;
+}
+
+/*****************************************************************************/
+int proj_errno_reset (const PJ *P) {
+/******************************************************************************
+    Clears errno in the context and thread local levels
+    through the low level pj_ctx interface.
+
+    Returns the previous value of the errno, for convenient reset/restore
+    operations:
+
+    int foo (PJ *P) {
+        // errno may be set on entry, but we need to reset it to be able to
+        // check for errors from "do_something_with_P(P)"
+        int last_errno = proj_errno_reset (P);
+
+        // local failure
+        if (0==P)
+            return proj_errno_set (P, 42);
+
+        // call to function that may fail
+        do_something_with_P (P);
+
+        // failure in do_something_with_P? - keep latest error status
+        if (proj_errno(P))
+            return proj_errno (P);
+
+        // success - restore previous error status, return 0
+        return proj_errno_restore (P, last_errno);
+    }
+******************************************************************************/
+    int last_errno;
+    last_errno = proj_errno (P);
+
+    pj_ctx_set_errno (pj_get_ctx ((PJ *) P), 0);
+    errno = 0;
+    return last_errno;
+}
+
+
+/* Create a new context */
+PJ_CONTEXT *proj_context_create (void) {
+    return pj_ctx_alloc ();
+}
+
+
+PJ_CONTEXT *proj_context_destroy (PJ_CONTEXT *ctx) {
+    if (0==ctx)
+        return 0;
+
+    /* Trying to free the default context is a no-op (since it is statically allocated) */
+    if (pj_get_default_ctx ()==ctx)
+        return 0;
+
+    pj_ctx_free (ctx);
+    return 0;
+}
+
+
+/*****************************************************************************/
+PJ_INFO proj_info(void) {
+/******************************************************************************
+    Basic info about the current instance of the PROJ.4 library.
+
+    Returns PJ_INFO struct. Searchpath member of the struct is truncated to 512
+    characters.
+
+******************************************************************************/
+    PJ_INFO info;
+    const char * const *paths;
+    char *tmpstr;
+    int i, n;
+    size_t len = 0;
+
+    memset(&info, 0, sizeof(PJ_INFO));
+
+    info.major = PROJ_VERSION_MAJOR;
+    info.minor = PROJ_VERSION_MINOR;
+    info.patch = PROJ_VERSION_PATCH;
+
+    /* This is a controlled environment, so no risk of sprintf buffer
+       overflow. A normal version string is xx.yy.zz which is 8 characters
+       long and there is room for 64 bytes in the version string. */
+    sprintf(info.version, "%d.%d.%d", info.major, info.minor, info.patch);
+
+    pj_strlcpy(info.release, pj_get_release(), sizeof(info.release));
+
+
+    /* build search path string */
+    tmpstr = getenv("HOME");
+    if (tmpstr != NULL) {
+        pj_strlcpy(info.searchpath, tmpstr, sizeof(info.searchpath));
+    }
+
+    tmpstr = getenv("PROJ_LIB");
+    if (tmpstr != NULL) {
+        if (strlen(info.searchpath) != 0) {
+            /* $HOME already in path */
+            strcat(info.searchpath, ";");
+            len = strlen(tmpstr);
+            strncat(info.searchpath, tmpstr, sizeof(info.searchpath)-len-1);
+        } else {
+            /* path is empty */
+            pj_strlcpy(info.searchpath, tmpstr, sizeof(info.searchpath));
+        }
+    }
+
+    paths = proj_get_searchpath();
+    n = proj_get_path_count();
+
+    for (i=0; i<n; i++) {
+        if (strlen(info.searchpath)+strlen(paths[i]) >= 511)
+            continue;
+
+        if (strlen(info.searchpath) != 0) {
+            strcat(info.searchpath, ";");
+            len = strlen(paths[i]);
+            strncat(info.searchpath, paths[i], sizeof(info.searchpath)-len-1);
+        } else {
+            pj_strlcpy(info.searchpath, paths[i], sizeof(info.searchpath));
+        }
+    }
+
+    return info;
+}
+
+
+/*****************************************************************************/
+PJ_PROJ_INFO proj_pj_info(PJ *P) {
+/******************************************************************************
+    Basic info about a particular instance of a projection object.
+
+    Returns PJ_PROJ_INFO struct.
+
+******************************************************************************/
+    PJ_PROJ_INFO info;
+    char *def;
+
+    memset(&info, 0, sizeof(PJ_PROJ_INFO));
+
+    /* Expected accuracy of the transformation. Hardcoded for now, will be improved */
+    /* later. Most likely to be used when a transformation is set up with           */
+    /* proj_create_crs_to_crs in a future version that leverages the EPSG database. */
+    info.accuracy = -1.0;
+
+    if (!P) {
+        return info;
+    }
+
+    /* projection id */
+    if (pj_param(P->ctx, P->params, "tproj").i)
+        pj_strlcpy(info.id, pj_param(P->ctx, P->params, "sproj").s, sizeof(info.id));
+
+    /* projection description */
+    pj_strlcpy(info.description, P->descr, sizeof(info.description));
+
+    /* projection definition */
+    def = pj_get_def(P, 0); /* pj_get_def takes a non-const PJ pointer */
+    pj_strlcpy(info.definition, &def[1], sizeof(info.definition)); /* def includes a leading space */
+    pj_dealloc(def);
+
+    info.has_inverse = pj_has_inverse(P);
+
+    return info;
+}
+
+
+/*****************************************************************************/
+PJ_GRID_INFO proj_grid_info(const char *gridname) {
+/******************************************************************************
+    Information about a named datum grid.
+
+    Returns PJ_GRID_INFO struct.
+
+******************************************************************************/
+    PJ_GRID_INFO info;
+
+    /*PJ_CONTEXT *ctx = proj_context_create(); */
+    PJ_CONTEXT *ctx = pj_get_default_ctx();
+    PJ_GRIDINFO *gridinfo = pj_gridinfo_init(ctx, gridname);
+    memset(&info, 0, sizeof(PJ_GRID_INFO));
+
+    /* in case the grid wasn't found */
+    if (gridinfo->filename == NULL) {
+        pj_gridinfo_free(ctx, gridinfo);
+        strcpy(info.format, "missing");
+        return info;
+    }
+
+    /* name of grid */
+    pj_strlcpy(info.gridname, gridname, sizeof(info.gridname));
+
+    /* full path of grid */
+    pj_find_file(ctx, gridname, info.filename, sizeof(info.filename));
+
+    /* grid format */
+    pj_strlcpy(info.format, gridinfo->format, sizeof(info.format));
+
+    /* grid size */
+    info.n_lon = gridinfo->ct->lim.lam;
+    info.n_lat = gridinfo->ct->lim.phi;
+
+    /* cell size */
+    info.cs_lon = gridinfo->ct->del.lam;
+    info.cs_lat = gridinfo->ct->del.phi;
+
+    /* bounds of grid */
+    info.lowerleft  = gridinfo->ct->ll;
+    info.upperright.lam = info.lowerleft.lam + info.n_lon*info.cs_lon;
+    info.upperright.phi = info.lowerleft.phi + info.n_lat*info.cs_lat;
+
+    pj_gridinfo_free(ctx, gridinfo);
+
+    return info;
+}
+
+
+
+/*****************************************************************************/
+PJ_INIT_INFO proj_init_info(const char *initname){
+/******************************************************************************
+    Information about a named init file.
+
+    Maximum length of initname is 64.
+
+    Returns PJ_INIT_INFO struct.
+
+    If the init file is not found all members of the return struct are set
+    to the empty string.
+
+    If the init file is found, but the metadata is missing, the value is
+    set to "Unknown".
+
+******************************************************************************/
+    int file_found;
+    char param[80], key[74];
+    paralist *start, *next;
+    PJ_INIT_INFO info;
+    PJ_CONTEXT *ctx = pj_get_default_ctx();
+
+    memset(&info, 0, sizeof(PJ_INIT_INFO));
+
+    file_found = pj_find_file(ctx, initname, info.filename, sizeof(info.filename));
+    if (!file_found || strlen(initname) > 64) {
+        return info;
+    }
+
+    pj_strlcpy(info.name, initname, sizeof(info.name));
+    strcpy(info.origin, "Unknown");
+    strcpy(info.version, "Unknown");
+    strcpy(info.lastupdate, "Unknown");
+
+    pj_strlcpy(key, initname, 64); /* make room for ":metadata\0" at the end */
+    strncat(key, ":metadata", 9);
+    strcpy(param, "+init=");
+    strncat(param, key, 73);
+
+    start = pj_mkparam(param);
+    pj_expand_init(ctx, start);
+
+    if (pj_param(ctx, start, "tversion").i) {
+        pj_strlcpy(info.version, pj_param(ctx, start, "sversion").s, sizeof(info.version));
+    }
+
+    if (pj_param(ctx, start, "torigin").i) {
+        pj_strlcpy(info.origin, pj_param(ctx, start, "sorigin").s, sizeof(info.origin));
+    }
+
+    if (pj_param(ctx, start, "tlastupdate").i) {
+        pj_strlcpy(info.lastupdate, pj_param(ctx, start, "slastupdate").s, sizeof(info.lastupdate));
+    }
+
+    for ( ; start; start = next) {
+        next = start->next;
+        pj_dalloc(start);
+    }
+
+   return info;
+}
+
+
+
+/*****************************************************************************/
+PJ_FACTORS proj_factors(PJ *P, LP lp) {
+/******************************************************************************
+    Cartographic characteristics at point lp.
+
+    Characteristics include meridian, parallel and areal scales, angular
+    distortion, meridian/parallel, meridian convergence and scale error.
+
+    returns PJ_FACTORS. If unsuccessfull, error number is set and the
+    struct returned contains NULL data.
+
+******************************************************************************/
+    PJ_FACTORS factors = {0,0,0,  0,0,0,  0,0,  0,0,0,0};
+    struct FACTORS f;
+
+    if (0==P)
+        return factors;
+
+    if (pj_factors(lp, P, 0.0, &f))
+        return factors;
+
+    factors.meridional_scale  =  f.h;
+    factors.parallel_scale    =  f.k;
+    factors.areal_scale       =  f.s;
+
+    factors.angular_distortion        =  f.omega;
+    factors.meridian_parallel_angle   =  f.thetap;
+    factors.meridian_convergence      =  f.conv;
+
+    factors.tissot_semimajor  =  f.a;
+    factors.tissot_semiminor  =  f.b;
+
+    /* Raw derivatives, for completeness's sake */
+    factors.dx_dlam = f.der.x_l;
+    factors.dx_dphi = f.der.x_p;
+    factors.dy_dlam = f.der.y_l;
+    factors.dy_dphi = f.der.y_p;
+
+    return factors;
+}
+
diff --git a/src/proj_api.h b/src/proj_api.h
index 24a6f05..40c40ad 100644
--- a/src/proj_api.h
+++ b/src/proj_api.h
@@ -25,45 +25,71 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
+
+
+ /*
+  * This version number should be updated with every release!
+  *
+  * This file is expected to be removed from the PROJ distribution
+  * when a few minor-version releases has been made.
+  *
+  */
+ #ifndef PJ_VERSION
+ #define PJ_VERSION 500
+ #endif
+
+
+/* If we're not asked for PJ_VERSION only, give them everything */
+#ifndef PROJ_API_INCLUDED_FOR_PJ_VERSION_ONLY
 /* General projections header file */
 #ifndef PROJ_API_H
 #define PROJ_API_H
 
-/* standard inclusions */
-#include <math.h>
-#include <stdlib.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/*
- * This version number should be updated with every release!  The format of
- * PJ_VERSION is
- *
- * * Before version 4.10.0: PJ_VERSION=MNP where M, N, and P are the major,
- *   minor, and patch numbers; e.g., PJ_VERSION=493 for version 4.9.3.
- *
- * * Version 4.10.0 and later: PJ_VERSION=MMMNNNPP later where MMM, NNN, PP
- *   are the major, minor, and patch numbers (the minor and patch numbers
- *   are padded with leading zeros if necessary); e.g., PJ_VERSION=401000
- *   for version 4.10.0.
- */
-#define PJ_VERSION 493
+
+/* standard inclusions */
+#include <math.h>
+#include <stdlib.h>
+
 
 /* pj_init() and similar functions can be used with a non-C locale */
 /* Can be detected too at runtime if the symbol pj_atof exists */
 #define PJ_LOCALE_SAFE 1
 
-extern char const pj_release[]; /* global release id string */
+#define RAD_TO_DEG    57.295779513082321
+#define DEG_TO_RAD   .017453292519943296
 
-#define RAD_TO_DEG	57.295779513082321
-#define DEG_TO_RAD	.017453292519943296
+
+#if defined(PROJECTS_H) || defined(PROJ_H)
+#define PROJ_API_H_NOT_INVOKED_AS_PRIMARY_API
+#endif
 
 
-extern int pj_errno;	/* global error return code */
 
-#if !defined(PROJECTS_H)
+extern char const pj_release[]; /* global release id string */
+extern int pj_errno;    /* global error return code */
+
+#ifndef PROJ_INTERNAL_H
+/* replaced by enum proj_log_level in proj_internal.h */
+#define PJ_LOG_NONE        0
+#define PJ_LOG_ERROR       1
+#define PJ_LOG_DEBUG_MAJOR 2
+#define PJ_LOG_DEBUG_MINOR 3
+#endif
+
+#ifdef PROJ_API_H_NOT_INVOKED_AS_PRIMARY_API
+    /* These make the function declarations below conform with classic proj */
+    typedef PJ *projPJ;          /* projPJ is a pointer to PJ */
+    typedef struct projCtx_t *projCtx;  /* projCtx is a pointer to projCtx_t */
+#   define projXY        XY
+#   define projLP       LP
+#   define projXYZ      XYZ
+#   define projLPZ      LPZ
+#else
+    /* i.e. proj_api invoked as primary API */
     typedef struct { double u, v; } projUV;
     typedef struct { double u, v, w; } projUVW;
     typedef void *projPJ;
@@ -72,15 +98,10 @@ extern int pj_errno;	/* global error return code */
     #define projXYZ projUVW
     #define projLPZ projUVW
     typedef void *projCtx;
-#else
-    typedef PJ *projPJ;
-    typedef projCtx_t *projCtx;
-#   define projXY	XY
-#   define projLP       LP
-#   define projXYZ      XYZ
-#   define projLPZ      LPZ
 #endif
 
+
+/* If included *after* proj.h finishes, we have alternative names */
 /* file reading api, like stdio */
 typedef int *PAFile;
 typedef struct projFileAPI_t {
@@ -91,14 +112,20 @@ typedef struct projFileAPI_t {
     void    (*FClose)(PAFile);
 } projFileAPI;
 
+
+
 /* procedure prototypes */
 
+projCtx pj_get_default_ctx(void);
+projCtx pj_get_ctx( projPJ );
+
 projXY pj_fwd(projLP, projPJ);
 projLP pj_inv(projXY, projPJ);
 
 projXYZ pj_fwd3d(projLPZ, projPJ);
 projLPZ pj_inv3d(projXYZ, projPJ);
 
+
 int pj_transform( projPJ src, projPJ dst, long point_count, int point_offset,
                   double *x, double *y, double *z );
 int pj_datum_transform( projPJ src, projPJ dst, long point_count, int point_offset,
@@ -128,10 +155,14 @@ projPJ pj_init_ctx( projCtx, int, char ** );
 projPJ pj_init_plus_ctx( projCtx, const char * );
 char *pj_get_def(projPJ, int);
 projPJ pj_latlong_from_proj( projPJ );
+int pj_has_inverse(projPJ);
+
+
 void *pj_malloc(size_t);
 void pj_dalloc(void *);
 void *pj_calloc (size_t n, size_t size);
 void *pj_dealloc (void *ptr);
+char *pj_strdup(const char *str);
 char *pj_strerrno(int);
 int *pj_get_errno_ref(void);
 const char *pj_get_release(void);
@@ -139,8 +170,6 @@ void pj_acquire_lock(void);
 void pj_release_lock(void);
 void pj_cleanup_lock(void);
 
-projCtx pj_get_default_ctx(void);
-projCtx pj_get_ctx( projPJ );
 void pj_set_ctx( projPJ, projCtx );
 projCtx pj_ctx_alloc(void);
 void    pj_ctx_free( projCtx );
@@ -157,7 +186,7 @@ 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();
+projFileAPI *pj_get_default_fileapi(void);
 
 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);
@@ -167,18 +196,12 @@ 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 *);
-
-int pj_run_selftests (int verbosity);
-
-
-#define PJ_LOG_NONE        0
-#define PJ_LOG_ERROR       1
-#define PJ_LOG_DEBUG_MAJOR 2
-#define PJ_LOG_DEBUG_MINOR 3
+int pj_find_file(projCtx ctx, const char *short_filename,
+                 char* out_full_filename, size_t out_full_filename_size);
 
 #ifdef __cplusplus
 }
 #endif
 
 #endif /* ndef PROJ_API_H */
-
+#endif /* ndef PROJ_API_INCLUDED_FOR_PJ_VERSION_ONLY */
diff --git a/src/proj_config.h.in b/src/proj_config.h.in
index f78a8d3..39c8e91 100644
--- a/src/proj_config.h.in
+++ b/src/proj_config.h.in
@@ -48,7 +48,8 @@
 /* Enabled for Java/JNI Support */
 #undef JNI_ENABLED
 
-/* Define to the sub-directory where libtool stores uninstalled libraries. */
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
 #undef LT_OBJDIR
 
 /* Name of package */
diff --git a/src/proj_etmerc.c b/src/proj_etmerc.c
index aed1499..67da498 100644
--- a/src/proj_etmerc.c
+++ b/src/proj_etmerc.c
@@ -39,10 +39,11 @@
 */
 
 
-#define PROJ_LIB__
 #define PJ_LIB__
 
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 
 struct pj_opaque {
@@ -57,7 +58,7 @@ struct pj_opaque {
 PROJ_HEAD(etmerc, "Extended Transverse Mercator")
     "\n\tCyl, Sph\n\tlat_ts=(0)\nlat_0=(0)";
 PROJ_HEAD(utm, "Universal Transverse Mercator (UTM)")
-	"\n\tCyl, Sph\n\tzone= south";
+    "\n\tCyl, Sph\n\tzone= south";
 
 #define PROJ_ETMERC_ORDER 6
 
@@ -231,27 +232,13 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-
-static void *freeup_new (PJ *P) {                       /* Destructor */
-    if (0==P)
-        return 0;
-    if (0==P->opaque)
-        return pj_dealloc (P);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
-
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
-}
-
 static PJ *setup(PJ *P) { /* general initialization */
     double f, n, np, Z;
     struct pj_opaque *Q = P->opaque;
 
-    if (P->es <= 0)
-        E_ERROR(-34);
+    if (P->es <= 0) {
+        return pj_default_destructor(P, PJD_ERR_ELLIPSOID_USE_REQUIRED);
+    }
 
     /* flattening */
     f = P->es / (1 + sqrt (1 -  P->es)); /* Replaces: f = 1 - sqrt(1-P->es); */
@@ -329,7 +316,7 @@ static PJ *setup(PJ *P) { /* general initialization */
     Q->Zb  = - Q->Qn*(Z + clens(Q->gtu, PROJ_ETMERC_ORDER, 2*Z));
     P->inv = e_inverse;
     P->fwd = e_forward;
-	return P;
+    return P;
 }
 
 
@@ -337,143 +324,50 @@ static PJ *setup(PJ *P) { /* general initialization */
 PJ *PROJECTION(etmerc) {
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
    return setup (P);
 }
 
 
 
-
-
-
-
-#ifndef PJ_SELFTEST
-int pj_etmerc_selftest (void) {return 0;}
-#else
-
-int pj_etmerc_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=etmerc   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5 +zone=30"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {222650.79679758562,  110642.22941193319},
-        {222650.79679758562,  -110642.22941193319},
-        {-222650.79679758562,  110642.22941193319},
-        {-222650.79679758562,  -110642.22941193319},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {0.0017966305681649398,  0.00090436947663183873},
-        {0.0017966305681649398,  -0.00090436947663183873},
-        {-0.0017966305681649398,  0.00090436947663183873},
-        {-0.0017966305681649398,  -0.00090436947663183873},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
 /* utm uses etmerc for the underlying projection */
 
 
 PJ *PROJECTION(utm) {
-	int zone;
+    int zone;
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor (P, ENOMEM);
     P->opaque = Q;
 
-	if (!P->es)
-        E_ERROR(-34);
-	P->y0 = pj_param (P->ctx, P->params, "bsouth").i ? 10000000. : 0.;
-	P->x0 = 500000.;
-	if (pj_param (P->ctx, P->params, "tzone").i) /* zone input ? */
-		if ((zone = pj_param(P->ctx, P->params, "izone").i) > 0 && zone <= 60)
-			--zone;
-		else
-			E_ERROR(-35)
-	else /* nearest central meridian input */
-		if ((zone = (int)(floor ((adjlon (P->lam0) + M_PI) * 30. / M_PI))) < 0)
-			zone = 0;
-		else if (zone >= 60)
-			zone = 59;
-	P->lam0 = (zone + .5) * M_PI / 30. - M_PI;
-	P->k0 = 0.9996;
-	P->phi0 = 0.;
+    if (P->es == 0.0) {
+        proj_errno_set(P, PJD_ERR_ELLIPSOID_USE_REQUIRED);
+        return pj_default_destructor(P, ENOMEM);
+    }
+    P->y0 = pj_param (P->ctx, P->params, "bsouth").i ? 10000000. : 0.;
+    P->x0 = 500000.;
+    if (pj_param (P->ctx, P->params, "tzone").i) /* zone input ? */
+    {
+        zone = pj_param(P->ctx, P->params, "izone").i;
+        if (zone > 0 && zone <= 60)
+            --zone;
+        else {
+            return pj_default_destructor(P, PJD_ERR_INVALID_UTM_ZONE);
+        }
+    }
+    else /* nearest central meridian input */
+    {
+        zone = (int)(floor ((adjlon (P->lam0) + M_PI) * 30. / M_PI));
+        if (zone < 0)
+            zone = 0;
+        else if (zone >= 60)
+            zone = 59;
+    }
+    P->lam0 = (zone + .5) * M_PI / 30. - M_PI;
+    P->k0 = 0.9996;
+    P->phi0 = 0.;
 
     return setup (P);
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_utm_selftest (void) {return 0;}
-#else
-
-int pj_utm_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=utm   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5 +zone=30"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        {1057002.4054912981,  110955.14117594929},
-        {1057002.4054912981,  -110955.14117594929},
-        {611263.81227890507,  110547.10569680421},
-        {611263.81227890507,  -110547.10569680421},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        {-7.4869520833902357,  0.00090193980983462605},
-        {-7.4869520833902357,  -0.00090193980983462605},
-        {-7.4905356820622613,  0.00090193535121489081},
-        {-7.4905356820622613,  -0.00090193535121489081},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-#endif
-
-
-
diff --git a/src/proj_internal.h b/src/proj_internal.h
new file mode 100644
index 0000000..3e0ecbe
--- /dev/null
+++ b/src/proj_internal.h
@@ -0,0 +1,141 @@
+/******************************************************************************
+ * Project:  PROJ.4
+ * Purpose:  Internal plumbing for the PROJ.4 library.
+ *
+ * Author:   Thomas Knudsen, <thokn at sdfe.dk>
+ *
+ ******************************************************************************
+ * Copyright (c) 2016, 2017, Thomas Knudsen / SDFE
+ *
+ * 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 COORD 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.
+ *****************************************************************************/
+
+#ifdef _MSC_VER
+#ifndef _USE_MATH_DEFINES
+#define _USE_MATH_DEFINES
+#endif
+#endif
+#include <math.h>   /* For M_PI */
+
+#include <proj.h>
+
+#ifdef PROJECTS_H
+#error proj_internal.h must be included before projects.h
+#endif
+#ifdef PROJ_API_H
+#error proj_internal.h must be included before proj_api.h
+#endif
+
+#ifndef PROJ_INTERNAL_H
+#define PROJ_INTERNAL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define STATIC_ASSERT(COND) ((void)sizeof(char[(COND) ? 1 : -1]))
+
+#ifndef PJ_TODEG
+#define PJ_TODEG(rad)  ((rad)*180.0/M_PI)
+#endif
+#ifndef PJ_TORAD
+#define PJ_TORAD(deg)  ((deg)*M_PI/180.0)
+#endif
+
+/* Maximum latitudinal overshoot accepted */
+#define PJ_EPS_LAT 1e-12
+
+
+/* This enum is also conditionally defined in projects.h - but enums cannot */
+/* be forward declared and we need it here for the pj_left/right prototypes */
+enum pj_io_units {
+    PJ_IO_UNITS_WHATEVER  = 0,  /* Doesn't matter (or depends on pipeline neighbours) */
+    PJ_IO_UNITS_CLASSIC   = 1,  /* Scaled meters (right), projected system */
+    PJ_IO_UNITS_PROJECTED = 2,  /* Meters, projected system */
+    PJ_IO_UNITS_CARTESIAN = 3,  /* Meters, 3D cartesian system */
+    PJ_IO_UNITS_ANGULAR   = 4   /* Radians */
+};
+enum pj_io_units pj_left (PJ *P);
+enum pj_io_units pj_right (PJ *P);
+
+PJ_COORD   proj_trans   (PJ *P, PJ_DIRECTION direction, PJ_COORD obs);
+
+PJ_COORD proj_coord_error (void);
+
+void proj_context_errno_set (PJ_CONTEXT *ctx, int err);
+void proj_context_set (PJ *P, PJ_CONTEXT *ctx);
+void proj_context_inherit (PJ *parent, PJ *child);
+
+PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P);
+PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P);
+
+PJ_COORD pj_approx_2D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo);
+PJ_COORD pj_approx_3D_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo);
+
+
+/* Grid functionality */
+int             proj_vgrid_init(PJ *P, const char *grids);
+int             proj_hgrid_init(PJ *P, const char *grids);
+double          proj_vgrid_value(PJ *P, LP lp);
+LP              proj_hgrid_value(PJ *P, LP lp);
+LP              proj_hgrid_apply(PJ *P, LP lp, PJ_DIRECTION direction);
+
+/* High level functionality for handling thread contexts */
+enum proj_log_level {
+    PJ_LOG_NONE  = 0,
+    PJ_LOG_ERROR = 1,
+    PJ_LOG_DEBUG = 2,
+    PJ_LOG_TRACE = 3,
+    PJ_LOG_TELL  = 4,
+    PJ_LOG_DEBUG_MAJOR = 2, /* for proj_api.h compatibility */
+    PJ_LOG_DEBUG_MINOR = 3  /* for proj_api.h compatibility */
+};
+
+/* Set logging level 0-3. Higher number means more debug info. 0 turns it off */
+enum proj_log_level proj_log_level (PJ_CONTEXT *ctx, enum proj_log_level log_level);
+typedef void (*PJ_LOG_FUNCTION)(void *, int, const char *);
+
+void proj_log_error (PJ *P, const char *fmt, ...);
+void proj_log_debug (PJ *P, const char *fmt, ...);
+void proj_log_trace (PJ *P, const char *fmt, ...);
+void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION log);
+
+int pj_ellipsoid (PJ *);
+void pj_inherit_ellipsoid_def (const PJ *src, PJ *dst);
+void pj_erase_ellipsoid_def (PJ *P);
+int pj_calc_ellipsoid_params (PJ *P, double a, double es);
+
+char  *pj_chomp (char *c);
+char  *pj_shrink (char *c);
+size_t pj_trim_argc (char *args);
+char **pj_trim_argv (size_t argc, char *args);
+char  *pj_make_args (size_t argc, char **argv);
+
+/* Lowest level: Minimum support for fileapi */
+void proj_fileapi_set (PJ *P, void *fileapi);
+
+const char * const *proj_get_searchpath(void);
+int    proj_get_path_count(void);
+
+size_t pj_strlcpy(char *dst, const char *src, size_t siz);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ndef PROJ_INTERNAL_H */
diff --git a/src/proj_mdist.c b/src/proj_mdist.c
index d7e4344..2495789 100644
--- a/src/proj_mdist.c
+++ b/src/proj_mdist.c
@@ -27,7 +27,7 @@
 ** and inverse on unit ellipsoid.
 ** Precision commensurate with double precision.
 */
-#define PROJ_LIB__
+#define PJ_LIB__
 #include <projects.h>
 #define MAX_ITER 20
 #define TOL 1e-14
@@ -38,7 +38,6 @@ struct MDIST {
 	double E;
 	double b[1];
 };
-#define B ((struct MDIST *)b)
 	void *
 proj_mdist_ini(double es) {
 	double numf, numfi, twon1, denf, denfi, ens, T, twon;
@@ -88,28 +87,30 @@ proj_mdist_ini(double es) {
 	return (b);
 }
 	double
-proj_mdist(double phi, double sphi, double cphi, const void *b) {
+proj_mdist(double phi, double sphi, double cphi, const void *data) {
+	const struct MDIST *b = (const struct MDIST *)data;
 	double sc, sum, sphi2, D;
 	int i;
 
 	sc = sphi * cphi;
 	sphi2 = sphi * sphi;
-	D = phi * B->E - B->es * sc / sqrt(1. - B->es * sphi2);
-	sum = B->b[i = B->nb];
-	while (i) sum = B->b[--i] + sphi2 * sum;
+	D = phi * b->E - b->es * sc / sqrt(1. - b->es * sphi2);
+	sum = b->b[i = b->nb];
+	while (i) sum = b->b[--i] + sphi2 * sum;
 	return(D + sc * sum);
 }
 	double
-proj_inv_mdist(projCtx ctx, double dist, const void *b) {
+proj_inv_mdist(projCtx ctx, double dist, const void *data) {
+	const struct MDIST *b = (const struct MDIST *)data;
 	double s, t, phi, k;
 	int i;
 
-	k = 1./(1.- B->es);
+	k = 1./(1.- b->es);
 	i = MAX_ITER;
 	phi = dist;
 	while ( i-- ) {
 		s = sin(phi);
-		t = 1. - B->es * s * s;
+		t = 1. - b->es * s * s;
 		phi -= t = (proj_mdist(phi, s, cos(phi), b) - dist) *
 			(t * sqrt(t)) * k;
 		if (fabs(t) < TOL) /* that is no change */
diff --git a/src/proj_rouss.c b/src/proj_rouss.c
index 264b1b7..5555e3e 100644
--- a/src/proj_rouss.c
+++ b/src/proj_rouss.c
@@ -24,7 +24,9 @@
 ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
 #define PJ_LIB__
-#include <projects.h>
+#include <errno.h>
+#include <proj.h>
+#include "projects.h"
 
 struct pj_opaque {
     double s0;
@@ -78,21 +80,17 @@ static LP e_inverse (XY xy, PJ *P) {          /* Ellipsoidal, inverse */
 }
 
 
-static void *freeup_new (PJ *P) {                       /* Destructor */
+static void *destructor (PJ *P, int errlev) {
     if (0==P)
         return 0;
+
     if (0==P->opaque)
-        return pj_dealloc (P);
+        return pj_default_destructor (P, errlev);
 
     if (P->opaque->en)
         pj_dealloc (P->opaque->en);
-    pj_dealloc (P->opaque);
-    return pj_dealloc(P);
-}
 
-static void freeup (PJ *P) {
-    freeup_new (P);
-    return;
+    return pj_default_destructor (P, ENOMEM);
 }
 
 
@@ -101,11 +99,12 @@ PJ *PROJECTION(rouss) {
 
     struct pj_opaque *Q = pj_calloc (1, sizeof (struct pj_opaque));
     if (0==Q)
-        return freeup_new (P);
+        return pj_default_destructor(P, ENOMEM);
     P->opaque = Q;
 
     if (!((Q->en = proj_mdist_ini(P->es))))
-        E_ERROR_0;
+        return pj_default_destructor (P, ENOMEM);
+
     es2 = sin(P->phi0);
     Q->s0 = proj_mdist(P->phi0, es2, cos(P->phi0), Q->en);
     t = 1. - (es2 = P->es * es2 * es2);
@@ -148,51 +147,8 @@ PJ *PROJECTION(rouss) {
 
     P->fwd = e_forward;
     P->inv = e_inverse;
+    P->destructor = destructor;
 
     return P;
 }
 
-
-#ifndef PJ_SELFTEST
-int pj_rouss_selftest (void) {return 0;}
-#else
-
-int pj_rouss_selftest (void) {
-    double tolerance_lp = 1e-10;
-    double tolerance_xy = 1e-7;
-
-    char e_args[] = {"+proj=rouss   +ellps=GRS80  +lat_1=0.5 +lat_2=2"};
-
-    LP fwd_in[] = {
-        { 2, 1},
-        { 2,-1},
-        {-2, 1},
-        {-2,-1}
-    };
-
-    XY e_fwd_expect[] = {
-        { 222644.89413161727,  110611.09186837047},
-        { 222644.89413161727, -110611.09186837047},
-        {-222644.89413161727,  110611.09186837047},
-        {-222644.89413161727, -110611.09186837047},
-    };
-
-    XY inv_in[] = {
-        { 200, 100},
-        { 200,-100},
-        {-200, 100},
-        {-200,-100}
-    };
-
-    LP e_inv_expect[] = {
-        { 0.0017966305682019911,  0.00090436947683699559},
-        { 0.0017966305682019911, -0.00090436947683699559},
-        {-0.0017966305682019911,  0.00090436947683699559},
-        {-0.0017966305682019911, -0.00090436947683699559},
-    };
-
-    return pj_generic_selftest (e_args, 0, tolerance_xy, tolerance_lp, 4, 4, fwd_in, e_fwd_expect, 0, inv_in, e_inv_expect, 0);
-}
-
-
-#endif
diff --git a/src/proj_strtod.c b/src/proj_strtod.c
new file mode 100644
index 0000000..fa68346
--- /dev/null
+++ b/src/proj_strtod.c
@@ -0,0 +1,440 @@
+/***********************************************************************
+
+ proj_strtod: Convert string to double, accepting underscore separators
+
+                    Thomas Knudsen, 2017-01-17/09-19
+
+************************************************************************
+
+Conventionally, PROJ.4 does not honor locale settings, consistently
+behaving as if LC_ALL=C.
+
+For this to work, we have, for many years, been using other solutions
+than the C standard library strtod/atof functions for converting strings
+to doubles.
+
+In the early versions of proj, iirc, a gnu version of strtod was used,
+mostly to work around cases where the same system library was used for
+C and Fortran linking, hence making strtod accept "D" and "d" as
+exponentiation indicators, following Fortran Double Precision constant
+syntax. This broke the proj angular syntax, accepting a "d" to mean
+"degree": 12d34'56", meaning 12 degrees 34 minutes and 56 seconds.
+
+With an explicit MIT licence, PROJ.4 could not include GPL code any
+longer, and apparently at some time, the GPL code was replaced by the
+current C port of a GDAL function (in pj_strtod.c), which reads the
+LC_NUMERIC setting and, behind the back of the user, momentarily changes
+the conventional '.' delimiter to whatever the locale requires, then
+calls the system supplied strtod.
+
+While this requires a minimum amount of coding, it only solves one
+problem, and not in a very generic way.
+
+Another problem, I would like to see solved, is the handling of underscores
+as generic delimiters. This is getting popular in a number of programming
+languages (Ada, C++, C#, D, Java, Julia, Perl 5, Python, Rust, etc.
+cf. e.g. https://www.python.org/dev/peps/pep-0515/), and in our case of
+handling numbers being in the order of magnitude of the Earth's dimensions,
+and a resolution of submillimetre, i.e. having 10 or more significant digits,
+splitting the "wall of digits" into smaller chunks is of immense value.
+
+Hence this reimplementation of strtod, which hardcodes '.' as indicator of
+numeric fractions, and accepts '_' anywhere in a numerical string sequence:
+So a typical northing value can be written
+
+                            6_098_907.8250 m
+rather than
+                             6098907.8250 m
+
+which, in my humble opinion, is well worth the effort.
+
+While writing this code, I took ample inspiration from Michael Ringgaard's
+strtod version over at http://www.jbox.dk/sanos/source/lib/strtod.c.html,
+and Yasuhiro Matsumoto's public domain version over at
+https://gist.github.com/mattn/1890186. The code below is, however, not
+copied from any of the two mentioned - it is a reimplementation, and
+probably suffers from its own set of bugs. So for now, it is intended
+not as a replacement of pj_strtod, but only as an experimental piece of
+code for use in an experimental new transformation program, cct.
+
+************************************************************************
+
+Thomas Knudsen, thokn at sdfe.dk, 2017-01-17/2017-09-18
+
+************************************************************************
+
+* Copyright (c) 2017 Thomas Knudsen & SDFE
+*
+* 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 <stdlib.h> /* for abs */
+#include <string.h> /* for strchr */
+#include <errno.h>
+#include <ctype.h>
+#include <float.h>  /* for HUGE_VAL */
+#include <math.h>   /* for pow() */
+
+double proj_strtod(const char *str, char **endptr);
+double proj_atof(const char *str);
+
+
+double proj_strtod(const char *str, char **endptr) {
+    double number = 0, integral_part = 0;
+    int exponent = 0;
+    int fraction_is_nonzero = 0;
+    int sign = 0;
+    char *p = (char *) str;
+    int n = 0;
+    int num_digits_total        = 0;
+    int num_digits_after_comma  = 0;
+    int num_prefixed_zeros      = 0;
+
+    if (0==str) {
+        errno = EFAULT;
+        if (endptr)
+            *endptr = p;
+        return HUGE_VAL;
+    }
+
+    /* First skip leading whitespace */
+    while (isspace(*p))
+        p++;
+
+    /* Empty string? */
+    if (0==*p) {
+        if (endptr)
+            *endptr = (char *) str;
+        return 0;
+    }
+
+    /* non-numeric? */
+    if (0==strchr("0123456789+-._", *p)) {
+        if (endptr)
+            *endptr = (char *) str;
+        return 0;
+    }
+
+    /* Then handle optional prefixed sign and skip prefix zeros */
+    switch (*p) {
+        case '-':
+            sign = -1,  p++;   break;
+        case '+':
+            sign =  1,  p++;  break;
+        default:
+            if (isdigit(*p) || '_'==*p || '.'==*p)
+                break;
+            if (endptr)
+                *endptr = (char *) str;
+            return 0;
+    }
+
+    /* stray sign, as in "+/-"? */
+    if (0!=sign && (0==strchr ("0123456789._", *p) || 0==*p)) {
+        if (endptr)
+            *endptr = (char *) str;
+        return 0;
+    }
+
+    /* skip prefixed zeros before '.' */
+    while ('0'==*p || '_'==*p)
+        p++;
+
+    /* zero? */
+    if ((0==*p) || 0==strchr ("0123456789eE.", *p) || isspace(*p)) {
+        if (endptr)
+            *endptr = p;
+        return sign==-1? -0: 0;
+    }
+
+    /* Now expect a (potentially zero-length) string of digits */
+    while (isdigit(*p) || ('_'==*p)) {
+        if ('_'==*p) {
+            p++;
+            continue;
+        }
+        number = number * 10. + (*p - '0');
+        p++;
+        num_digits_total++;
+    }
+    integral_part = number;
+
+    /* Done? */
+    if (0==*p) {
+        if (endptr)
+            *endptr = p;
+        if (sign==-1)
+            return -number;
+        return number;
+    }
+
+    /* Do we have a fractional part? */
+    if ('.'==*p) {
+        p++;
+
+        /* keep on skipping prefixed zeros (i.e. allow writing 1e-20 */
+        /* as 0.00000000000000000001 without losing precision) */
+        if (0==integral_part)
+            while ('0'==*p || '_'==*p) {
+                if ('0'==*p)
+                    num_prefixed_zeros++;
+                p++;
+            }
+
+        /* if the next character is nonnumeric, we have reached the end */
+        if (0==*p || 0==strchr ("_0123456789eE+-", *p)) {
+            if (endptr)
+                *endptr = p;
+            if (sign==-1)
+                return -number;
+            return number;
+        }
+
+        while (isdigit(*p) || '_'==*p) {
+            /* Don't let pathologically long fractions destroy precision */
+            if ('_'==*p || num_digits_total > 17) {
+                p++;
+                continue;
+            }
+
+            number = number * 10. + (*p - '0');
+            if (*p!='0')
+                fraction_is_nonzero = 1;
+            p++;
+            num_digits_total++;
+            num_digits_after_comma++;
+        }
+
+        /* Avoid having long zero-tails (4321.000...000) destroy precision */
+        if (fraction_is_nonzero)
+            exponent = -(num_digits_after_comma + num_prefixed_zeros);
+        else
+            number = integral_part;
+    }  /* end of fractional part */
+
+
+    /* non-digit */
+    if (0==num_digits_total) {
+        errno = EINVAL;
+        if (endptr)
+            *endptr = p;
+        return HUGE_VAL;
+    }
+
+    if (sign==-1)
+        number = -number;
+
+    /* Do we have an exponent part? */
+    while (*p == 'e' || *p == 'E') {
+        p++;
+
+        /* Just a stray "e", as in 100elephants? */
+        if (0==*p || 0==strchr ("0123456789+-_", *p)) {
+            p--;
+            break;
+        }
+
+        while ('_'==*p)
+            p++;
+        /* Does it have a sign? */
+        sign = 0;
+        if ('-'==*p)
+            sign = -1;
+        if ('+'==*p)
+            sign = +1;
+        if (0==sign) {
+            if (!isdigit(*p) && *p!='_') {
+                if (endptr)
+                    *endptr = p;
+                return HUGE_VAL;
+            }
+        }
+        else
+            p++;
+
+
+        /* Go on and read the exponent */
+        n = 0;
+        while (isdigit(*p) || '_'==*p) {
+            if ('_'==*p) {
+                p++;
+                continue;
+            }
+            n = n * 10 + (*p - '0');
+            p++;
+        }
+
+        if (-1==sign)
+            n = -n;
+        exponent += n;
+        break;
+    }
+
+    if (endptr)
+        *endptr = p;
+
+    if ((exponent < DBL_MIN_EXP) || (exponent > DBL_MAX_EXP)) {
+        errno = ERANGE;
+        return HUGE_VAL;
+    }
+
+    /* on some platforms pow() is very slow - so don't call it if exponent is close to 0 */
+    if (0==exponent)
+        return number;
+    if (abs (exponent) < 20) {
+        double ex = 1;
+        int absexp = exponent < 0? -exponent: exponent;
+        while (absexp--)
+            ex *= 10;
+        number = exponent < 0? number / ex: number * ex;
+    }
+    else
+        number *= pow (10, exponent);
+
+    return number;
+}
+
+double proj_atof(const char *str) {
+    return proj_strtod(str, (void *) 0);
+}
+
+#ifdef TEST
+
+/* compile/run: gcc -DTEST -o proj_strtod_test proj_strtod.c  &&  proj_strtod_test */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+char *un_underscore (char *s) {
+    static char u[1024];
+    int i, m,  n;
+    for (i = m = 0, n = strlen (s);  i < n;  i++) {
+        if (s[i]=='_') {
+            m++;
+            continue;
+        }
+        u[i - m] = s[i];
+    }
+    u[n-m] = 0;
+    return u;
+}
+
+int thetest (char *s, int line) {
+    char *endp, *endq, *u;
+    double p, q;
+    int errnop, errnoq, prev_errno;
+
+    prev_errno = errno;
+
+    u = un_underscore (s);
+
+    errno = 0;
+    p = proj_strtod (s, &endp);
+    errnop = errno;
+    errno = 0;
+    q = strtod (u, &endq);
+    errnoq = errno;
+
+    errno = prev_errno;
+
+    if (q==p && 0==strcmp (endp, endq) && errnop==errnoq)
+        return 0;
+
+    errno = line;
+    printf ("Line: %3.3d  -  [%s] [%s]\n", line, s, u);
+    printf ("proj_strtod: %2d %.17g  [%s]\n", errnop, p, endp);
+    printf ("libc_strtod: %2d %.17g  [%s]\n", errnoq, q, endq);
+    return 1;
+}
+
+#define test(s) thetest(s, __LINE__)
+
+int main (int argc, char **argv) {
+    double res;
+    char *endptr;
+
+    errno = 0;
+
+    test ("");
+    test ("     ");
+    test ("     abcde");
+    test ("     edcba");
+    test ("abcde");
+    test ("edcba");
+    test ("+");
+    test ("-");
+    test ("+ ");
+    test ("- ");
+    test (" + ");
+    test (" - ");
+    test ("e 1");
+    test ("e1");
+    test ("0 66");
+    test ("1.");
+    test ("0.");
+    test ("1.0");
+    test ("0.0");
+    test ("1 ");
+    test ("0 ");
+    test ("-0 ");
+    test ("0_ ");
+    test ("0_");
+    test ("1e");
+    test ("_1.0");
+    test ("_0.0");
+    test ("1_.0");
+    test ("0_.0");
+    test ("1__.0");
+    test ("0__.0");
+    test ("1.__0");
+    test ("0.__0");
+    test ("1.0___");
+    test ("0.0___");
+    test ("1e2");
+    test ("__123_456_789_._10_11_12");
+    test ("1______");
+    test ("1___e__2__");
+    test ("-1");
+    test ("-1.0");
+    test ("-0");
+    test ("-1e__-_2__rest");
+    test ("0.00002");
+    test ("0.00001");
+    test ("-0.00002");
+    test ("-0.00001");
+    test ("-0.00001e-2");
+    test ("-0.00001e2");
+    test ("1e9999");
+
+    /* We expect this one to differ */
+    test ("0.000000000000000000000000000000000000000000000000000000000000000000000000002");
+
+    if (errno)
+        printf ("First discrepancy in line %d\n", errno);
+
+    if (argc < 2)
+        return 0;
+    res =  proj_strtod (argv[1], &endptr);
+    printf ("res = %20.15g. Rest = [%s],  errno = %d\n", res, endptr, (int) errno);
+    return 0;
+}
+#endif
diff --git a/src/projects.h b/src/projects.h
index 5b88313..41f4aa3 100644
--- a/src/projects.h
+++ b/src/projects.h
@@ -37,10 +37,13 @@
 #    define _CRT_NONSTDC_NO_DEPRECATE
 #  endif
 /* enable predefined math constants M_* for MS Visual Studio workaround */
-#  define _USE_MATH_DEFINES
+#  ifndef _USE_MATH_DEFINES
+#     define _USE_MATH_DEFINES
+#  endif
 #endif
 
 /* standard inclusions */
+#include <limits.h>
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -76,33 +79,38 @@ extern "C" {
 #  define ABS(x)        ((x<0) ? (-1*(x)) : x)
 #endif
 
+#if INT_MAX == 2147483647
+typedef int pj_int32;
+#elif LONG_MAX == 2147483647
+typedef long pj_int32;
+#else
+#warning It seems no 32-bit integer type is available
+#endif
+
 /* maximum path/filename */
 #ifndef MAX_PATH_FILENAME
 #define MAX_PATH_FILENAME 1024
 #endif
 
 /* prototype hypot for systems where absent */
-#ifndef _WIN32
+#if !(defined(HAVE_C99_MATH) && HAVE_C99_MATH)
 extern double hypot(double, double);
 #endif
 
-#ifdef _WIN32_WCE
-#  include <wce_stdlib.h>
-#  include <wce_stdio.h>
-#  define rewind wceex_rewind
-#  define getenv wceex_getenv
-#  define strdup _strdup
-#  define hypot _hypot
-#endif
-
 /* If we still haven't got M_PI*, we rely on our own defines.
  * For example, this is necessary when compiling with gcc and
  * the -ansi flag.
  */
 #ifndef M_PI
-#define M_PI            3.14159265358979310
-#define M_PI_2          1.57079632679489660
-#define M_PI_4          0.78539816339744828
+#define M_PI            3.14159265358979323846
+#define M_PI_2          1.57079632679489661923
+#define M_PI_4          0.78539816339744830962
+#define M_2_PI          0.63661977236758134308
+#endif
+
+/* M_SQRT2 might be missing */
+#ifndef M_SQRT2
+#define M_SQRT2         1.41421356237309504880
 #endif
 
 /* some more useful math constants and aliases */
@@ -120,11 +128,11 @@ extern double hypot(double, double);
 #endif
 
 /* Use WIN32 as a standard windows 32 bit declaration */
-#if defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE)
+#if defined(_WIN32) && !defined(WIN32)
 #  define WIN32
 #endif
 
-#if defined(_WINDOWS) && !defined(WIN32) && !defined(_WIN32_WCE)
+#if defined(_WINDOWS) && !defined(WIN32)
 #  define WIN32
 #endif
 
@@ -135,206 +143,442 @@ 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 */
-#define PJD_UNKNOWN   0
-#define PJD_3PARAM    1
-#define PJD_7PARAM    2
-#define PJD_GRIDSHIFT 3
-#define PJD_WGS84     4   /* WGS84 (or anything considered equivelent) */
-
-/* library errors */
-#define PJD_ERR_GEOCENTRIC          -45
-#define PJD_ERR_AXIS                -47
-#define PJD_ERR_GRID_AREA           -48
-#define PJD_ERR_CATALOG             -49
-
 #define USE_PROJUV
 
 typedef struct { double u, v; } projUV;
 typedef struct { double r, i; } COMPLEX;
 typedef struct { double u, v, w; } projUVW;
 
+/* If user explicitly includes proj.h, before projects.h, then avoid implicit type-punning */
+#ifndef PROJ_H
 #ifndef PJ_LIB__
 #define XY projUV
 #define LP projUV
 #define XYZ projUVW
 #define LPZ projUVW
+
+/* Yes, this is ridiculous, but a consequence of an old and bad decision about implicit type-punning through preprocessor abuse */
+typedef struct { double u, v; }        UV;
+typedef struct { double u, v, w; }     UVW;
+
 #else
-typedef struct { double x, y; }     XY;
-typedef struct { double lam, phi; } LP;
-typedef struct { double x, y, z; } XYZ;
+typedef struct { double x, y; }        XY;
+typedef struct { double x, y, z; }     XYZ;
+typedef struct { double lam, phi; }    LP;
 typedef struct { double lam, phi, z; } LPZ;
-#endif
+typedef struct { double u, v; }        UV;
+typedef struct { double u, v, w; }     UVW;
+#endif  /* ndef PJ_LIB__ */
+#endif  /* ndef PROJ_H   */
 
-typedef union { double  f; int  i; char *s; } PROJVALUE;
+
+/* Forward declarations and typedefs for stuff needed inside the PJ object */
 struct PJconsts;
 
-struct PJ_LIST {
-    char             *id;                         /* projection keyword */
-    struct PJconsts  *(*proj)(struct PJconsts*);  /* projection entry point */
-    char * const     *descr;                      /* description text */
+union  PJ_COORD;
+struct geod_geodesic;
+struct pj_opaque;
+struct ARG_list;
+struct PJ_REGION_S;
+typedef struct PJ_REGION_S  PJ_Region;
+typedef struct ARG_list paralist;   /* parameter list */
+#ifndef PROJ_INTERNAL_H
+enum pj_io_units {
+    PJ_IO_UNITS_WHATEVER  = 0,  /* Doesn't matter (or depends on pipeline neighbours) */
+    PJ_IO_UNITS_CLASSIC   = 1,  /* Scaled meters (right), projected system */
+    PJ_IO_UNITS_PROJECTED = 2,  /* Meters, projected system */
+    PJ_IO_UNITS_CARTESIAN = 3,  /* Meters, 3D cartesian system */
+    PJ_IO_UNITS_ANGULAR   = 4   /* Radians */
 };
+#endif
+#ifndef PROJ_H
+typedef struct PJconsts PJ;         /* the PJ object herself */
+typedef union  PJ_COORD PJ_COORD;
+#endif
 
-/* Merging this into the PJ_LIST infrastructure is tempting, but may imply ABI breakage. Perhaps at next major version? */
-struct PJ_SELFTEST_LIST {
-    char    *id;                    /* projection keyword */
-    int     (* testfunc)(void);     /* projection entry point */
+struct PJ_REGION_S {
+    double ll_long;        /* lower left corner coordinates (radians) */
+    double ll_lat;
+    double ur_long;        /* upper right corner coordinates (radians) */
+    double ur_lat;
 };
 
-struct PJ_ELLPS {
-    char    *id;        /* ellipse keyword name */
-    char    *major;     /* a= value */
-    char    *ell;       /* elliptical parameter */
-    char    *name;      /* comments */
-};
-struct PJ_UNITS {
-    char    *id;        /* units keyword */
-    char    *to_meter;  /* multiply by value to get meters */
-    char    *name;      /* comments */
+struct PJ_AREA {
+    int     id;         /* Area ID in the EPSG database */
+    LP      ll;         /* Lower left corner of bounding box */
+    LP      ur;         /* Upper right corner of bounding box */
+    char    descr[64];  /* text representation of area */
 };
 
-struct PJ_DATUMS {
-    char    *id;        /* datum keyword */
-    char    *defn;      /* ie. "to_wgs84=..." */
-    char    *ellipse_id;/* ie from ellipse table */
-    char    *comments;  /* EPSG code, etc */
-};
+struct projCtx_t;
+typedef struct projCtx_t projCtx_t;
 
-struct PJ_PRIME_MERIDIANS {
-    char    *id;        /* prime meridian keyword */
-    char    *defn;      /* offset from greenwich in DMS format. */
-};
 
-typedef struct {
-    double ll_long;      /* lower left corner coordinates (radians) */
-    double ll_lat;
-    double ur_long;      /* upper right corner coordinates (radians) */
-    double ur_lat;
-} PJ_Region;
+/* base projection data structure */
+struct PJconsts {
 
-struct DERIVS {
-    double x_l, x_p;    /* derivatives of x for lambda-phi */
-    double y_l, y_p;    /* derivatives of y for lambda-phi */
-};
+    /*************************************************************************************
 
-struct FACTORS {
-    struct DERIVS der;
-    double h, k;        /* meridinal, parallel scales */
-    double omega, thetap;   /* angular distortion, theta prime */
-    double conv;        /* convergence */
-    double s;           /* areal scale factor */
-    double a, b;        /* max-min scale error */
-    int code;           /* info as to analytics, see following */
-};
+                         G E N E R A L   P A R A M E T E R   S T R U C T
 
-#define IS_ANAL_XL_YL 01    /* derivatives of lon analytic */
-#define IS_ANAL_XP_YP 02    /* derivatives of lat analytic */
-#define IS_ANAL_HK    04    /* h and k analytic */
-#define IS_ANAL_CONV 010    /* convergence analytic */
+    **************************************************************************************
 
-/* parameter list struct */
-typedef struct ARG_list {
-    struct ARG_list *next;
-    char used;
-    char param[1]; } paralist;
+        TODO: Need some description here - especially about the thread context...
+        This is the struct behind the PJ typedef
 
-/* base projection data structure */
-#ifdef PJ_LIB__
-    /* we need this forward declaration in order to be able to add a
-       pointer to struct opaque to the typedef struct PJconsts below */
-    struct pj_opaque;
-#endif
+    **************************************************************************************/
 
-typedef struct PJconsts {
     projCtx_t *ctx;
-    XY  (*fwd)(LP, struct PJconsts *);
-    LP  (*inv)(XY, struct PJconsts *);
-    XYZ (*fwd3d)(LPZ, struct PJconsts *);
-    LPZ (*inv3d)(XYZ, struct PJconsts *);
-    void (*spc)(LP, struct PJconsts *, struct FACTORS *);
-    void (*pfree)(struct PJconsts *);
-
-    const char *descr;
-    paralist *params;           /* parameter list */
-    int over;                   /* over-range flag */
-    int geoc;                   /* geocentric latitude flag */
-    int is_latlong;             /* proj=latlong ... not really a projection at all */
-    int is_geocent;             /* proj=geocent ... not really a projection at all */
-    double a;                   /* major axis or radius if es==0 */
-    double a_orig;              /* major axis before any +proj related adjustment */
-    double es;                  /* e ^ 2 */
-    double es_orig;             /* es before any +proj related adjustment */
-    double e;                   /* eccentricity */
-    double ra;                  /* 1/A */
-    double one_es;              /* 1 - e^2 */
-    double rone_es;             /* 1/one_es */
-    double lam0, phi0;          /* central longitude, latitude */
-    double x0, y0;              /* easting and northing */
-    double k0;                  /* general scaling factor */
-    double to_meter, fr_meter;  /* cartesian scaling */
-
-    int     datum_type;         /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */
-    double  datum_params[7];
-    struct _pj_gi **gridlist;
+    const char *descr;             /* From pj_list.h or individual PJ_*.c file */
+    paralist *params;              /* Parameter list */
+    char *def_size;                /* Shape and size parameters extracted from params */
+    char *def_shape;
+    char *def_spherification;
+    char *def_ellps;
+
+    struct geod_geodesic *geod;    /* For geodesic computations */
+    struct pj_opaque *opaque;      /* Projection specific parameters, Defined in PJ_*.c */
+    int inverted;                  /* Tell high level API functions to swap inv/fwd */
+
+
+    /*************************************************************************************
+
+                          F U N C T I O N    P O I N T E R S
+
+    **************************************************************************************
+
+        For projection xxx, these are pointers to functions in the corresponding
+        PJ_xxx.c file.
+
+        pj_init() delegates the setup of these to pj_projection_specific_setup_xxx(),
+        a name which is currently hidden behind the magic curtain of the PROJECTION
+        macro.
+
+    **************************************************************************************/
+
+
+    XY  (*fwd)(LP,    PJ *);
+    LP  (*inv)(XY,    PJ *);
+    XYZ (*fwd3d)(LPZ, PJ *);
+    LPZ (*inv3d)(XYZ, PJ *);
+    PJ_COORD (*fwd4d)(PJ_COORD, PJ *);
+    PJ_COORD (*inv4d)(PJ_COORD, PJ *);
+
+    void *(*destructor)(PJ *, int);
+
+
+    /*************************************************************************************
+
+                          E L L I P S O I D     P A R A M E T E R S
+
+    **************************************************************************************
+
+        Despite YAGNI, we add a large number of ellipsoidal shape parameters, which
+        are not yet set up in pj_init. They are, however, inexpensive to compute,
+        compared to the overall time taken for setting up the complex PJ object
+        (cf. e.g. https://en.wikipedia.org/wiki/Angular_eccentricity).
+
+        But during single point projections it will often be a useful thing to have
+        these readily available without having to recompute at every pj_fwd / pj_inv
+        call.
+
+        With this wide selection, we should be ready for quite a number of geodetic
+        algorithms, without having to incur further ABI breakage.
+
+    **************************************************************************************/
+
+    /* The linear parameters */
+
+    double  a;                         /* semimajor axis (radius if eccentricity==0) */
+    double  b;                         /* semiminor axis */
+    double  ra;                        /* 1/a */
+    double  rb;                        /* 1/b */
+
+    /* The eccentricities */
+
+    double  alpha;                     /* angular eccentricity */
+    double  e;                         /* first  eccentricity */
+    double  es;                        /* first  eccentricity squared */
+    double  e2;                        /* second eccentricity */
+    double  e2s;                       /* second eccentricity squared */
+    double  e3;                        /* third  eccentricity */
+    double  e3s;                       /* third  eccentricity squared */
+    double  one_es;                    /* 1 - e^2 */
+    double  rone_es;                   /* 1/one_es */
+
+
+    /* The flattenings */
+    double  f;                         /* first  flattening */
+    double  f2;                        /* second flattening */
+    double  n;                         /* third  flattening */
+    double  rf;                        /* 1/f  */
+    double  rf2;                       /* 1/f2 */
+    double  rn;                        /* 1/n  */
+
+    /* This one's for GRS80 */
+    double  J;                         /* "Dynamic form factor" */
+
+    double  es_orig, a_orig;           /* es and a before any +proj related adjustment */
+
+
+    /*************************************************************************************
+
+                          C O O R D I N A T E   H A N D L I N G
+
+    **************************************************************************************/
+
+    int  over;                      /* Over-range flag */
+    int  geoc;                      /* Geocentric latitude flag */
+    int  is_latlong;                /* proj=latlong ... not really a projection at all */
+    int  is_geocent;                /* proj=geocent ... not really a projection at all */
+    int  is_pipeline;               /* 1 if PJ represents a pipeline */
+    int  need_ellps;                /* 0 for operations that are purely cartesian */
+    int  skip_fwd_prepare;
+    int  skip_fwd_finalize;
+    int  skip_inv_prepare;
+    int  skip_inv_finalize;
+
+    enum pj_io_units left;          /* Flags for input/output coordinate types */
+    enum pj_io_units right;
+
+    /* These PJs are used for implementing cs2cs style coordinate handling in the 4D API */
+    PJ *axisswap;
+    PJ *cart;
+    PJ *cart_wgs84;
+    PJ *helmert;
+    PJ *hgridshift;
+    PJ *vgridshift;
+
+
+    /*************************************************************************************
+
+                       C A R T O G R A P H I C       O F F S E T S
+
+    **************************************************************************************/
+
+    double  lam0, phi0;                /* central meridian, parallel */
+    double  x0, y0, z0, t0;            /* false easting and northing (and height and time) */
+
+
+    /*************************************************************************************
+
+                                    S C A L I N G
+
+    **************************************************************************************/
+
+    double  k0;                        /* General scaling factor - e.g. the 0.9996 of UTM */
+    double  to_meter, fr_meter;        /* Plane coordinate scaling. Internal unit [m] */
+    double  vto_meter, vfr_meter;      /* Vertical scaling. Internal unit [m] */
+
+
+    /*************************************************************************************
+
+                  D A T U M S   A N D   H E I G H T   S Y S T E M S
+
+    **************************************************************************************
+
+        It may be possible, and meaningful, to move the list parts of this up to the
+        PJ_CONTEXT level.
+
+    **************************************************************************************/
+
+    int     datum_type;                /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */
+    double  datum_params[7];           /* Parameters for 3PARAM and 7PARAM */
+    struct _pj_gi **gridlist;          /* TODO: Description needed */
     int     gridlist_count;
 
-    int     has_geoid_vgrids;
-    struct _pj_gi **vgridlist_geoid;
+    int     has_geoid_vgrids;          /* TODO: Description needed */
+    struct _pj_gi **vgridlist_geoid;   /* TODO: Description needed */
     int     vgridlist_geoid_count;
-    double  vto_meter, vfr_meter;
 
-    double  from_greenwich;     /* prime meridian offset (in radians) */
-    double  long_wrap_center;   /* 0.0 for -180 to 180, actually in radians*/
+    double  from_greenwich;            /* prime meridian offset (in radians) */
+    double  long_wrap_center;          /* 0.0 for -180 to 180, actually in radians*/
     int     is_long_wrap_set;
-    char    axis[4];
+    char    axis[4];                   /* Axis order, pj_transform/pj_adjust_axis */
 
     /* New Datum Shift Grid Catalogs */
     char   *catalog_name;
     struct _PJ_GridCatalog *catalog;
 
-    double   datum_date;
+    double  datum_date;                 /* TODO: Description needed */
 
-    struct _pj_gi *last_before_grid;
-    PJ_Region     last_before_region;
-    double        last_before_date;
+    struct _pj_gi *last_before_grid;    /* TODO: Description needed */
+    PJ_Region     last_before_region;   /* TODO: Description needed */
+    double        last_before_date;     /* TODO: Description needed */
 
-    struct _pj_gi *last_after_grid;
-    PJ_Region     last_after_region;
-    double        last_after_date;
+    struct _pj_gi *last_after_grid;     /* TODO: Description needed */
+    PJ_Region     last_after_region;    /* TODO: Description needed */
+    double        last_after_date;      /* TODO: Description needed */
 
-#ifdef PJ_LIB__
-        struct pj_opaque *opaque;
-#endif
 
-#ifdef PROJ_PARMS__
-PROJ_PARMS__
-#endif /* end of optional extensions */
-} PJ;
+    /*************************************************************************************
+
+                 E N D   O F    G E N E R A L   P A R A M E T E R   S T R U C T
+
+    **************************************************************************************/
+
+};
+
+
+
+
+/* Parameter list (a copy of the +proj=... etc. parameters) */
+struct ARG_list {
+    paralist *next;
+    char used;
+    char param[1];
+};
+
+
+typedef union { double  f; int  i; char *s; } PROJVALUE;
+
+
+struct PJ_ELLPS {
+    char    *id;           /* ellipse keyword name */
+    char    *major;        /* a= value */
+    char    *ell;          /* elliptical parameter */
+    char    *name;         /* comments */
+};
+
+struct PJ_UNITS {
+    char    *id;           /* units keyword */
+    char    *to_meter;     /* multiply by value to get meters */
+    char    *name;         /* comments */
+    double   factor;       /* to_meter factor in actual numbers */
+};
+
+struct PJ_DATUMS {
+    char    *id;           /* datum keyword */
+    char    *defn;         /* ie. "to_wgs84=..." */
+    char    *ellipse_id;   /* ie from ellipse table */
+    char    *comments;     /* EPSG code, etc */
+};
+
+struct PJ_PRIME_MERIDIANS {
+    char    *id;           /* prime meridian keyword */
+    char    *defn;         /* offset from greenwich in DMS format. */
+};
+
+
+struct DERIVS {
+    double x_l, x_p;       /* derivatives of x for lambda-phi */
+    double y_l, y_p;       /* derivatives of y for lambda-phi */
+};
+
+struct FACTORS {
+    struct DERIVS der;
+    double h, k;           /* meridional, parallel scales */
+    double omega, thetap;  /* angular distortion, theta prime */
+    double conv;           /* convergence */
+    double s;              /* areal scale factor */
+    double a, b;           /* max-min scale error */
+    int    code;           /* always 0 */
+};
+
+enum deprecated_constants_for_now_dropped_analytical_factors {
+    IS_ANAL_XL_YL =  01,   /* derivatives of lon analytic */
+    IS_ANAL_XP_YP =  02,   /* derivatives of lat analytic */
+    IS_ANAL_HK    =  04,   /* h and k analytic */
+    IS_ANAL_CONV  = 010    /* convergence analytic */
+};
+
+
+
+/* datum_type values */
+#define PJD_UNKNOWN   0
+#define PJD_3PARAM    1
+#define PJD_7PARAM    2
+#define PJD_GRIDSHIFT 3
+#define PJD_WGS84     4   /* WGS84 (or anything considered equivalent) */
+
+/* library errors */
+#define PJD_ERR_NO_ARGS                  -1
+#define PJD_ERR_NO_OPTION_IN_INIT_FILE   -2
+#define PJD_ERR_NO_COLON_IN_INIT_STRING  -3
+#define PJD_ERR_PROJ_NOT_NAMED           -4
+#define PJD_ERR_UNKNOWN_PROJECTION_ID    -5
+#define PJD_ERR_ECCENTRICITY_IS_ONE      -6
+#define PJD_ERR_UNKNOW_UNIT_ID           -7
+#define PJD_ERR_INVALID_BOOLEAN_PARAM    -8
+#define PJD_ERR_UNKNOWN_ELLP_PARAM       -9
+#define PJD_ERR_REV_FLATTENING_IS_ZERO  -10
+#define PJD_ERR_REF_RAD_LARGER_THAN_90  -11
+#define PJD_ERR_ES_LESS_THAN_ZERO       -12
+#define PJD_ERR_MAJOR_AXIS_NOT_GIVEN    -13
+#define PJD_ERR_LAT_OR_LON_EXCEED_LIMIT -14
+#define PJD_ERR_INVALID_X_OR_Y          -15
+#define PJD_ERR_WRONG_FORMAT_DMS_VALUE  -16
+#define PJD_ERR_NON_CONV_INV_MERI_DIST  -17
+#define PJD_ERR_NON_CON_INV_PHI2        -18
+#define PJD_ERR_ACOS_ASIN_ARG_TOO_LARGE -19
+#define PJD_ERR_TOLERANCE_CONDITION     -20
+#define PJD_ERR_CONIC_LAT_EQUAL         -21
+#define PJD_ERR_LAT_LARGER_THAN_90      -22
+#define PJD_ERR_LAT1_IS_ZERO            -23
+#define PJD_ERR_LAT_TS_LARGER_THAN_90   -24
+#define PJD_ERR_CONTROL_POINT_NO_DIST   -25
+#define PJD_ERR_NO_ROTATION_PROJ        -26
+#define PJD_ERR_W_OR_M_ZERO_OR_LESS     -27
+#define PJD_ERR_LSAT_NOT_IN_RANGE       -28
+#define PJD_ERR_PATH_NOT_IN_RANGE       -29
+#define PJD_ERR_H_LESS_THAN_ZERO        -30
+#define PJD_ERR_K_LESS_THAN_ZERO        -31
+#define PJD_ERR_LAT_1_OR_2_ZERO_OR_90   -32
+#define PJD_ERR_LAT_0_OR_ALPHA_EQ_90    -33
+#define PJD_ERR_ELLIPSOID_USE_REQUIRED  -34
+#define PJD_ERR_INVALID_UTM_ZONE        -35
+#define PJD_ERR_TCHEBY_VAL_OUT_OF_RANGE -36
+#define PJD_ERR_FAILED_TO_FIND_PROJ     -37
+#define PJD_ERR_FAILED_TO_LOAD_GRID     -38
+#define PJD_ERR_INVALID_M_OR_N          -39
+#define PJD_ERR_N_OUT_OF_RANGE          -40
+#define PJD_ERR_LAT_1_2_UNSPECIFIED     -41
+#define PJD_ERR_ABS_LAT1_EQ_ABS_LAT2    -42
+#define PJD_ERR_LAT_0_HALF_PI_FROM_MEAN -43
+#define PJD_ERR_UNPARSEABLE_CS_DEF      -44
+#define PJD_ERR_GEOCENTRIC              -45
+#define PJD_ERR_UNKNOWN_PRIME_MERIDIAN  -46
+#define PJD_ERR_AXIS                    -47
+#define PJD_ERR_GRID_AREA               -48
+#define PJD_ERR_INVALID_SWEEP_AXIS      -49
+#define PJD_ERR_MALFORMED_PIPELINE      -50
+#define PJD_ERR_UNIT_FACTOR_LESS_THAN_0 -51
+#define PJD_ERR_INVALID_SCALE           -52
+#define PJD_ERR_NON_CONVERGENT          -53
+#define PJD_ERR_MISSING_ARGS            -54
+#define PJD_ERR_LAT_0_IS_ZERO           -55
+#define PJD_ERR_ELLIPSOIDAL_UNSUPPORTED -56
+#define PJD_ERR_TOO_MANY_INITS          -57
+#define PJD_ERR_INVALID_ARG             -58
+
+struct projFileAPI_t;
+
+/* proj thread context */
+struct projCtx_t {
+    int     last_errno;
+    int     debug_level;
+    void    (*logger)(void *, int, const char *);
+    void    *app_data;
+    struct projFileAPI_t *fileapi;
+};
 
-/* public API */
+/* classic public API */
 #include "proj_api.h"
 
 
 /* Generate pj_list external or make list from include file */
 
+struct PJ_LIST {
+    char    *id;                 /* projection keyword */
+    PJ *(*proj)(PJ *);           /* projection entry point */
+    char    * const *descr;      /* description text */
+};
+
+
 #ifndef USE_PJ_LIST_H
 extern struct PJ_LIST pj_list[];
-extern struct PJ_SELFTEST_LIST pj_selftest_list[];
 #endif
 
-
-
 #ifndef PJ_ELLPS__
 extern struct PJ_ELLPS pj_ellps[];
 #endif
@@ -348,76 +592,49 @@ extern struct PJ_DATUMS pj_datums[];
 extern struct PJ_PRIME_MERIDIANS pj_prime_meridians[];
 #endif
 
+
+
+
+
 #ifdef PJ_LIB__
-/* repetitive projection code */
-#define PROJ_HEAD(id, name) static const char des_##id [] = name
-#define ENTRYA(name) \
-    C_NAMESPACE_VAR const char * const pj_s_##name = des_##name; \
-    C_NAMESPACE PJ *pj_##name(PJ *P) { if (!P) { \
-    if( (P = (PJ*) pj_malloc(sizeof(PJ))) != NULL) { \
-        memset( P, 0, sizeof(PJ) ); \
-    P->pfree = freeup; P->fwd = 0; P->inv = 0; \
-        P->fwd3d = 0; P->inv3d = 0; \
-    P->spc = 0; P->descr = des_##name;
-#define ENTRYX } return P; } else {
-#define ENTRY0(name) ENTRYA(name) ENTRYX
-#define ENTRY1(name, a) ENTRYA(name) P->a = 0; ENTRYX
-#define ENTRY2(name, a, b) ENTRYA(name) P->a = 0; P->b = 0; ENTRYX
-#define ENDENTRY(p) } return (p); }
-#define E_ERROR(err) { pj_ctx_set_errno( P->ctx, err); freeup(P); return(0); }
-#define E_ERROR_0 { freeup(P); return(0); }
-#define F_ERROR { pj_ctx_set_errno( P->ctx, -20); return(xy); }
-#define F3_ERROR { pj_ctx_set_errno( P->ctx, -20); return(xyz); }
-#define I_ERROR { pj_ctx_set_errno( P->ctx, -20); return(lp); }
-#define I3_ERROR { pj_ctx_set_errno( P->ctx, -20); return(lpz); }
-#define FORWARD(name) static XY name(LP lp, PJ *P) { XY xy = {0.0,0.0}
-#define INVERSE(name) static LP name(XY xy, PJ *P) { LP lp = {0.0,0.0}
-#define FORWARD3D(name) static XYZ name(LPZ lpz, PJ *P) {XYZ xyz = {0.0, 0.0, 0.0}
-#define INVERSE3D(name) static LPZ name(XYZ xyz, PJ *P) {LPZ lpz = {0.0, 0.0, 0.0}
-#define FREEUP static void freeup(PJ *P) {
-#define SPECIAL(name) static void name(LP lp, PJ *P, struct FACTORS *fac)
-#define ELLIPSOIDAL(P) ((P->es==0)? (FALSE): (TRUE))
-
-/* cleaned up alternative to most of the "repetitive projection code" macros */
-#define PROJECTION(name)                                     \
+#define PROJ_HEAD(name, desc) static const char des_##name [] = desc
+
+#define OPERATION(name, NEED_ELLPS)                          \
+                                                             \
 pj_projection_specific_setup_##name (PJ *P);                 \
+C_NAMESPACE PJ *pj_##name (PJ *P);                           \
+                                                             \
 C_NAMESPACE_VAR const char * const pj_s_##name = des_##name; \
+                                                             \
 C_NAMESPACE PJ *pj_##name (PJ *P) {                          \
     if (P)                                                   \
         return pj_projection_specific_setup_##name (P);      \
     P = (PJ*) pj_calloc (1, sizeof(PJ));                     \
     if (0==P)                                                \
         return 0;                                            \
-    P->pfree = freeup;                                       \
+    P->destructor = pj_default_destructor;                   \
     P->descr = des_##name;                                   \
+    P->need_ellps = NEED_ELLPS;                              \
+    P->left  = PJ_IO_UNITS_ANGULAR;                          \
+    P->right = PJ_IO_UNITS_CLASSIC;                          \
     return P;                                                \
 }                                                            \
+                                                             \
 PJ *pj_projection_specific_setup_##name (PJ *P)
 
-#endif
-
-
-int pj_generic_selftest (
-    char *e_args,
-    char *s_args,
-    double tolerance_xy,
-    double tolerance_lp,
-    int n_fwd,
-    int n_inv,
-    LP *fwd_in,
-    XY *e_fwd_expect,
-    XY *s_fwd_expect,
-    XY *inv_in,
-    LP *e_inv_expect,
-    LP *s_inv_expect
-);
+/* In ISO19000 lingo, an operation is either a conversion or a transformation */
+#define CONVERSION(name, need_ellps)      OPERATION (name, need_ellps)
+#define TRANSFORMATION(name, need_ellps)  OPERATION (name, need_ellps)
 
+/* In PROJ.4 a projection is a conversion taking angular input and giving scaled linear output */
+#define PROJECTION(name) CONVERSION (name, 1)
 
+#endif /* def PJ_LIB__ */
 
 
 #define MAX_TAB_ID 80
 typedef struct { float lam, phi; } FLP;
-typedef struct { int lam, phi; } ILP;
+typedef struct { pj_int32 lam, phi; } ILP;
 
 struct CTABLE {
     char id[MAX_TAB_ID];    /* ascii info */
@@ -464,41 +681,49 @@ typedef struct _PJ_GridCatalog {
     struct _PJ_GridCatalog *next;
 } PJ_GridCatalog;
 
-
 /* procedure prototypes */
 double dmstor(const char *, char **);
 double dmstor_ctx(projCtx ctx, const char *, char **);
-void set_rtodms(int, int);
-char *rtodms(char *, double, int, int);
+void   set_rtodms(int, int);
+char  *rtodms(char *, double, int, int);
 double adjlon(double);
 double aacos(projCtx,double), aasin(projCtx,double), asqrt(double), aatan2(double, double);
+
 PROJVALUE pj_param(projCtx ctx, paralist *, const char *);
+paralist *pj_param_exists (paralist *list, const char *parameter);
 paralist *pj_mkparam(char *);
+paralist *pj_mkparam_ws (char *str);
+
+
 int pj_ell_set(projCtx ctx, paralist *, double *, double *);
 int pj_datum_set(projCtx,paralist *, PJ *);
 int pj_prime_meridian_set(paralist *, PJ *);
 int pj_angular_units_set(paralist *, PJ *);
-void pj_prepare (PJ *P, const char *description, void (*freeup)(struct PJconsts *), size_t sizeof_struct_opaque);
 
 paralist *pj_clone_paralist( const paralist* );
-paralist*pj_search_initcache( const char *filekey );
-void pj_insert_initcache( const char *filekey, const paralist *list);
+paralist *pj_search_initcache( const char *filekey );
+void      pj_insert_initcache( const char *filekey, const paralist *list);
+paralist *pj_expand_init(projCtx ctx, paralist *init);
+
+void     *pj_dealloc_params (projCtx ctx, paralist *start, int errlev);
+
 
 double *pj_enfn(double);
-double pj_mlfn(double, double, double, double *);
-double pj_inv_mlfn(projCtx, double, double, double *);
-double pj_qsfn(double, double, double);
-double pj_tsfn(double, double, double);
-double pj_msfn(double, double, double);
-double pj_phi2(projCtx, double, double);
-double pj_qsfn_(double, PJ *);
+double  pj_mlfn(double, double, double, double *);
+double  pj_inv_mlfn(projCtx, double, double, double *);
+double  pj_qsfn(double, double, double);
+double  pj_tsfn(double, double, double);
+double  pj_msfn(double, double, double);
+double  pj_phi2(projCtx, double, double);
+double  pj_qsfn_(double, PJ *);
 double *pj_authset(double);
-double pj_authlat(double, double *);
-COMPLEX pj_zpoly1(COMPLEX, COMPLEX *, int);
-COMPLEX pj_zpolyd1(COMPLEX, COMPLEX *, int, COMPLEX *);
+double  pj_authlat(double, double *);
+
+COMPLEX pj_zpoly1(COMPLEX, const COMPLEX *, int);
+COMPLEX pj_zpolyd1(COMPLEX, const COMPLEX *, int, COMPLEX *);
 
-int pj_deriv(LP, double, PJ *, struct DERIVS *);
-int pj_factors(LP, PJ *, double, struct FACTORS *);
+int pj_deriv(LP, double, const PJ *, struct DERIVS *);
+int pj_factors(LP, const PJ *, double, struct FACTORS *);
 
 struct PW_COEF {    /* row coefficient structure */
     int m;          /* number of c coefficients (=0 for none) */
@@ -513,25 +738,26 @@ typedef struct {    /* Chebyshev or Power series structure */
     int mu, mv;     /* maximum cu and cv index (+1 for count) */
     int power;      /* != 0 if power series, else Chebyshev */
 } Tseries;
+
 Tseries *mk_cheby(projUV, projUV, double, projUV *, projUV (*)(projUV), int, int, int);
-projUV bpseval(projUV, Tseries *);
-projUV bcheval(projUV, Tseries *);
-projUV biveval(projUV, Tseries *);
-void *vector1(int, int);
-void **vector2(int, int, int);
-void freev2(void **v, int nrows);
-int bchgen(projUV, projUV, int, int, projUV **, projUV(*)(projUV));
-int bch2bps(projUV, projUV, projUV **, int, int);
+projUV   bpseval(projUV, Tseries *);
+projUV   bcheval(projUV, Tseries *);
+projUV   biveval(projUV, Tseries *);
+void    *vector1(int, int);
+void   **vector2(int, int, int);
+void     freev2(void **v, int nrows);
+int      bchgen(projUV, projUV, int, int, projUV **, projUV(*)(projUV));
+int      bch2bps(projUV, projUV, projUV **, int, int);
 
 /* nadcon related protos */
-LP nad_intr(LP, struct CTABLE *);
-LP nad_cvt(LP, int, struct CTABLE *);
+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, PAFile fid );
-int nad_ctable_load( projCtx ctx, struct CTABLE *, 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 *);
+int            nad_ctable2_load( projCtx ctx, struct CTABLE *, PAFile fid );
+void           nad_free(struct CTABLE *);
 
 /* higher level handling of datum grid shift files */
 
@@ -553,8 +779,8 @@ PJ_GRIDINFO **pj_gridlist_from_nadgrids( projCtx, const char *, int * );
 void pj_deallocate_grids();
 
 PJ_GRIDINFO *pj_gridinfo_init( projCtx, const char * );
-int pj_gridinfo_load( projCtx, PJ_GRIDINFO * );
-void pj_gridinfo_free( projCtx, PJ_GRIDINFO * );
+int          pj_gridinfo_load( projCtx, PJ_GRIDINFO * );
+void         pj_gridinfo_free( projCtx, PJ_GRIDINFO * );
 
 PJ_GridCatalog *pj_gc_findcatalog( projCtx, const char * );
 PJ_GridCatalog *pj_gc_readcatalog( projCtx, const char * );
@@ -574,27 +800,32 @@ PJ_GRIDINFO *pj_gc_findgrid( projCtx ctx,
 
 double pj_gc_parsedate( projCtx, const char * );
 
-void *proj_mdist_ini(double);
+void  *proj_mdist_ini(double);
 double proj_mdist(double, double, double, const void *);
 double proj_inv_mdist(projCtx ctx, double, const void *);
-void *pj_gauss_ini(double, double, double *,double *);
-LP pj_gauss(projCtx, LP, const void *);
-LP pj_inv_gauss(projCtx, LP, const void *);
+void  *pj_gauss_ini(double, double, double *,double *);
+LP     pj_gauss(projCtx, LP, const void *);
+LP     pj_inv_gauss(projCtx, LP, const void *);
 
 extern char const pj_release[];
 
-struct PJ_ELLPS *pj_get_ellps_ref( void );
-struct PJ_DATUMS *pj_get_datums_ref( void );
-struct PJ_UNITS *pj_get_units_ref( void );
-struct PJ_LIST  *pj_get_list_ref( void );
-struct PJ_SELFTEST_LIST  *pj_get_selftest_list_ref ( void );
+struct PJ_ELLPS            *pj_get_ellps_ref( void );
+struct PJ_DATUMS           *pj_get_datums_ref( void );
+struct PJ_UNITS            *pj_get_units_ref( void );
+struct PJ_LIST             *pj_get_list_ref( void );
 struct PJ_PRIME_MERIDIANS  *pj_get_prime_meridians_ref( void );
 
+void *pj_default_destructor (PJ *P, int errlev);
+
 double pj_atof( const char* nptr );
 double pj_strtod( const char *nptr, char **endptr );
+void   pj_freeup_plain (PJ *P);
 
 #ifdef __cplusplus
 }
 #endif
 
+#ifndef PROJECTS_H_ATEND
+#define PROJECTS_H_ATEND
+#endif
 #endif /* end of basic projections header */
diff --git a/src/rtodms.c b/src/rtodms.c
index fa5c3cd..b6ad972 100644
--- a/src/rtodms.c
+++ b/src/rtodms.c
@@ -49,13 +49,13 @@ rtodms(char *s, double r, int pos, int neg) {
 	r = floor(r * CONV + .5);
 	sec = fmod(r / RES, 60.);
 	r = floor(r / RES60);
-	min = fmod(r, 60.);
-        r = floor(r / 60.);
-        deg = r;
+	min = (int)fmod(r, 60.);
+	r = floor(r / 60.);
+	deg = (int)r;
 
 	if (dolong)
 		(void)sprintf(ss,format,deg,min,sec,sign);
-	else if (sec) {
+	else if (sec != 0.0) {
 		char *p, *q;
 		/* double prime + pos/neg suffix (if included) + NUL */
 		size_t suffix_len = sign ? 3 : 2;
diff --git a/src/test228.c b/src/test228.c
index a8e55c4..5795246 100644
--- a/src/test228.c
+++ b/src/test228.c
@@ -17,14 +17,15 @@ int main(int argc, char* argv[])
 #include <assert.h>
 #include <unistd.h>
 
-volatile int run = 0;
-volatile int started = 0;
+static volatile int run = 0;
+static volatile int started = 0;
 
-void* thread_main(void* unused)
+static void* thread_main(void* unused)
 {
     projCtx p_proj_ctxt;
     projPJ p_WGS84_proj;
     projPJ p_OSGB36_proj;
+    (void)unused;
 
     __sync_add_and_fetch(&started, 1);
     while(run == 0);
@@ -53,12 +54,15 @@ void* thread_main(void* unused)
         assert(fabs(y - 49.999396034285531698) < 1e-15);
     }
 
+    pj_free (p_OSGB36_proj);
+    pj_free (p_WGS84_proj);
     return NULL;
 }
 
-int main(int argc, char* argv[])
+int main()
 {
     int i;
+
     pthread_t tid1, tid2;
     pthread_attr_t attr1, attr2;
 
diff --git a/test-driver b/test-driver
new file mode 100755
index 0000000..32bf39e
--- /dev/null
+++ b/test-driver
@@ -0,0 +1,127 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2012-06-27.10; # UTC
+
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+# Make unconditional expansion of undefined variables an error.  This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+  echo "$0: $*" >&2
+  print_usage >&2
+  exit 2
+}
+
+print_usage ()
+{
+  cat <<END
+Usage:
+  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+              [--expect-failure={yes|no}] [--color-tests={yes|no}]
+              [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+# TODO: better error handling in option parsing (in particular, ensure
+# TODO: $log_file, $trs_file and $test_name are defined).
+test_name= # Used for reporting.
+log_file=  # Where to save the output of the test script.
+trs_file=  # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+  case $1 in
+  --help) print_usage; exit $?;;
+  --version) echo "test-driver $scriptversion"; exit $?;;
+  --test-name) test_name=$2; shift;;
+  --log-file) log_file=$2; shift;;
+  --trs-file) trs_file=$2; shift;;
+  --color-tests) color_tests=$2; shift;;
+  --expect-failure) expect_failure=$2; shift;;
+  --enable-hard-errors) enable_hard_errors=$2; shift;;
+  --) shift; break;;
+  -*) usage_error "invalid option: '$1'";;
+  esac
+  shift
+done
+
+if test $color_tests = yes; then
+  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+  red='' # Red.
+  grn='' # Green.
+  lgn='' # Light green.
+  blu='' # Blue.
+  mgn='' # Magenta.
+  std=''     # No color.
+else
+  red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here.
+"$@" >$log_file 2>&1
+estatus=$?
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+  estatus=1
+fi
+
+case $estatus:$expect_failure in
+  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
+  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
+  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
+  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
+  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
+esac
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644
index 0000000..7475f71
--- /dev/null
+++ b/test/CMakeLists.txt
@@ -0,0 +1,46 @@
+set(GIE_BIN "gie")
+
+# Regression tests
+proj_add_gie_test("Builtins" "gie/builtins.gie")
+proj_add_gie_test("Builtins2" "gie/more_builtins.gie")
+proj_add_gie_test("Axisswap" "gie/axisswap.gie")
+proj_add_gie_test("Deformation" "gie/deformation.gie")
+proj_add_gie_test("Ellipsoid" "gie/ellipsoid.gie")
+proj_add_gie_test("GDA" "gie/GDA.gie")
+proj_add_gie_test("4D-API-cs2cs-style" "gie/4D-API_cs2cs-style.gie")
+
+# GIGS tests. Uncommented tests are expected to fail due to issues with
+# various projections. Should be investigated further and fixed.
+proj_add_gie_test("GIGS-5101.1-jhs" "gigs/5101.1-jhs.gie")
+proj_add_gie_test("GIGS-5101.2-jhs" "gigs/5101.2-jhs.gie")
+proj_add_gie_test("GIGS-5101.3-jhs" "gigs/5101.3-jhs.gie")
+proj_add_gie_test("GIGS-5101.4-jhs-etmerc" "gigs/5101.4-jhs-etmerc.gie")
+#proj_add_gie_test("GIGS-5101.4-jhs" "gigs/5101.4-jhs.gie") # Same as above, but using etmerc instead of tmerc
+proj_add_gie_test("GIGS-5102.1" "gigs/5102.1.gie")
+#proj_add_gie_test("GIGS-5102.2" "gigs/5102.2.gie")
+proj_add_gie_test("GIGS-5103.1" "gigs/5103.1.gie")
+proj_add_gie_test("GIGS-5103.2" "gigs/5103.2.gie")
+proj_add_gie_test("GIGS-5103.3" "gigs/5103.3.gie")
+#proj_add_gie_test("GIGS-5104" "gigs/5104.gie")
+#proj_add_gie_test("GIGS-5105.1" "gigs/5105.1.gie")
+proj_add_gie_test("GIGS-5105.2" "gigs/5105.2.gie")
+proj_add_gie_test("GIGS-5106" "gigs/5106.gie")
+proj_add_gie_test("GIGS-5107" "gigs/5107.gie")
+#proj_add_gie_test("GIGS-5108" "gigs/5108.gie")
+proj_add_gie_test("GIGS-5109" "gigs/5109.gie")
+#proj_add_gie_test("GIGS-5110" "gigs/5110.gie")
+proj_add_gie_test("GIGS-5111.1" "gigs/5111.1.gie")
+#proj_add_gie_test("GIGS-5111.2" "gigs/5111.2.gie")
+proj_add_gie_test("GIGS-5112" "gigs/5112.gie")
+proj_add_gie_test("GIGS-5113" "gigs/5113.gie")
+proj_add_gie_test("GIGS-5201" "gigs/5201.gie")
+#proj_add_gie_test("GIGS-5203" "gigs/5203.1.gie")
+#proj_add_gie_test("GIGS-5204.1" "gigs/5204.1.gie")
+#proj_add_gie_test("GIGS-5205.1" "gigs/5205.1.gie")
+#proj_add_gie_test("GIGS-5206" "gigs/5206.gie")
+#proj_add_gie_test("GIGS-5207.1" "gigs/5207.1.gie")
+#proj_add_gie_test("GIGS-5207.2" "gigs/5207.2.gie")
+proj_add_gie_test("GIGS-5208" "gigs/5208.gie")
+
+
+
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..0cb8334
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,12 @@
+EXEPATH = ../src
+GIEEXE = $(EXEPATH)/gie
+GIETESTS = gie
+GIGSTESTS = gigs
+
+SUBDIRS = gie gigs
+
+EXTRA_DIST = CMakeLists.txt
+
+check-local:
+	$(GIEEXE) $(GIETESTS)/*.gie
+	$(GIEEXE) $(GIGSTESTS)/*.gie
diff --git a/jniwrap/Makefile.in b/test/Makefile.in
similarity index 93%
copy from jniwrap/Makefile.in
copy to test/Makefile.in
index ab018b6..f9dd455 100644
--- a/jniwrap/Makefile.in
+++ b/test/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -87,7 +77,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-subdir = jniwrap
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -155,7 +145,6 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -223,7 +212,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -293,7 +281,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -302,8 +289,12 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-EXTRA_DIST = build.xml doxygen.cfg README
-SUBDIRS = org
+EXEPATH = ../src
+GIEEXE = $(EXEPATH)/gie
+GIETESTS = gie
+GIGSTESTS = gigs
+SUBDIRS = gie gigs
+EXTRA_DIST = CMakeLists.txt
 all: all-recursive
 
 .SUFFIXES:
@@ -316,9 +307,10 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu jniwrap/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu jniwrap/Makefile
+	  $(AUTOMAKE) --gnu test/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -498,6 +490,7 @@ distdir: $(DISTFILES)
 	  fi; \
 	done
 check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) check-local
 check: check-recursive
 all-am: Makefile
 installdirs: installdirs-recursive
@@ -552,7 +545,7 @@ info: info-recursive
 
 info-am:
 
-install-data-am: install-data-local
+install-data-am:
 
 install-dvi: install-dvi-recursive
 
@@ -598,14 +591,14 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: $(am__recursive_targets) install-am install-strip
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
 
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
-	check-am clean clean-generic clean-libtool cscopelist-am ctags \
-	ctags-am distclean distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am \
-	install-data-local install-dvi install-dvi-am install-exec \
+	check-am check-local clean clean-generic clean-libtool \
+	cscopelist-am ctags ctags-am distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
 	install-exec-am install-html install-html-am install-info \
 	install-info-am install-man install-pdf install-pdf-am \
 	install-ps install-ps-am install-strip installcheck \
@@ -614,11 +607,10 @@ uninstall-am:
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am
 
-.PRECIOUS: Makefile
-
 
-install-data-local:
-	echo In jniwrap
+check-local:
+	$(GIEEXE) $(GIETESTS)/*.gie
+	$(GIEEXE) $(GIGSTESTS)/*.gie
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie
new file mode 100644
index 0000000..853df99
--- /dev/null
+++ b/test/gie/4D-API_cs2cs-style.gie
@@ -0,0 +1,161 @@
+===============================================================================
+
+Test the 4D API handling of cs2cs style transformation options.
+
+These tests are mostly based on the same material as those in
+more_builtins.gie, since we are testing the same kinds of things,
+but provided through a different interface.
+
+===============================================================================
+
+
+<gie>
+
+-------------------------------------------------------------------------------
+Test the handling of the +towgs84 parameter
+-------------------------------------------------------------------------------
+This example is from Lotti Jivall: "Simplified transformations from
+ITRF2008/IGS08 to ETRS89 for maritime applications". The original
+XYZ data (cf. more_builtins.gie) have been transformed to LPZ using
+this command: echo x_val y_val z_val | cct -It0 proj=cart ellps=GRS80 --
+
+NOTE: Here, the ellipsoid has been swapped to WGS84, to align with
+      the WGS84 ellipsoid used in the cs2cs emulation introduced by
+      pj_cs2cs_emulation_setup()
+-------------------------------------------------------------------------------
+operation proj=latlong ellps=WGS84
+          towgs84 =  0.676780,  0.654950, -0.528270,
+                    -0.022742,  0.012667,  0.022704, -0.010700
+-------------------------------------------------------------------------------
+tolerance 0.05 mm
+direction forward
+
+accept    13.4999969828397   54.9999995493206   -0.6034
+expect    13.4999906103972   54.9999957469562   -0.6374
+
+direction inverse
+
+accept    13.4999906103972   54.9999957469562   -0.6374
+expect    13.4999969828397   54.9999995493206   -0.6034
+-------------------------------------------------------------------------------
+
+
+
+-------------------------------------------------------------------------------
+This example is a random point, transformed from ED50 to ETRS89 using KMStrans2.
+
+NOTE: Signs swapped wrt. KMStrans2, which apparently uses frame rotation.
+-------------------------------------------------------------------------------
+operation proj=latlong ellps=intl
+          towgs84 =  081.07030, 089.36030, 115.75260,
+                     000.48488, 000.02436, 000.41321, 0.540645
+-------------------------------------------------------------------------------
+tolerance  0.1 mm
+# echo SWAPPED and trimmed - expect succcess
+# accept     16.819999997    55.170000002        61.0
+accept     16.82    55.17        61.0
+expect     16.8210462130   55.1705688946       29.0317
+-------------------------------------------------------------------------------
+This commented-out version of the example above was used to detect the sign
+discrepancy between KMSTrans2 and PROJ.
+-------------------------------------------------------------------------------
+operation proj=latlong ellps=intl
+          towgs84 =  -081.07030, -089.36030, -115.75260,
+                     -000.48488, -000.02436, -000.41321, -0.540645
+-------------------------------------------------------------------------------
+# echo NOT SWAPPED - Expect failure
+# accept     16.8210462130   55.1705688946       29.0317
+# expect     16.819999997    55.170000002        61.0
+-------------------------------------------------------------------------------
+
+
+
+-------------------------------------------------------------------------------
+operation  proj=latlong nadgrids=nzgd2kgrid0005.gsb  ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 1 nm
+accept    173                 -45                  0 0
+expect    172.999892181021551 -45.001620431954613  0 0
+direction inverse
+accept    172.999892181021551 -45.001620431954613  0 0
+expect    173                 -45                  0 0
+-------------------------------------------------------------------------------
+
+
+
+-------------------------------------------------------------------------------
+operation  proj=latlong geoidgrids=egm96_15.gtx  ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 15 cm      # lax tolerance due to widespread bad egm96 file
+accept    12.5 55.5   0
+expect    12.5 55.5 -36.0213
+direction inverse
+accept    12.5 55.5 -36.0213
+expect    12.5 55.5  0
+-------------------------------------------------------------------------------
+operation  proj=merc geoidgrids=egm96_15.gtx  ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept    12.5 55.5 0
+expect    1391493.63492   7424275.19462  -36.0213
+direction inverse
+accept    1391493.63492   7424275.19462  -36.0213
+expect    12.5 55.5 0
+-------------------------------------------------------------------------------
+
+
+
+-------------------------------------------------------------------------------
+Same as the two above, but also do axis swapping.
+-------------------------------------------------------------------------------
+operation  proj=latlong geoidgrids=egm96_15.gtx  axis=neu ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 15 cm      # lax tolerance due to widely distributed, bad egm96 file
+accept    12.5 55.5  0
+expect    55.5 12.5 -36.0213
+direction inverse
+accept    55.5 12.5 -36.0213
+expect    12.5 55.5  0
+-------------------------------------------------------------------------------
+operation  proj=latlong geoidgrids=egm96_15.gtx  axis=dne ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 15 cm      # lax tolerance due to widely distributed, bad egm96 file
+accept    12.5 55.5  0
+expect    36.0213 55.5 12.5
+direction inverse
+accept    36.0213 55.5 12.5
+expect    12.5 55.5  0
+-------------------------------------------------------------------------------
+operation  proj=merc geoidgrids=egm96_15.gtx  ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+accept    12.5 55.5 0
+expect    1391493.63492   7424275.19462  -36.0213
+direction inverse
+accept    1391493.63492   7424275.19462  -36.0213
+expect    12.5 55.5 0
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+Some more complex axis swapping.
+-------------------------------------------------------------------------------
+operation  proj=latlong geoidgrids=egm96_15.gtx  axis=nue ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 15 cm      # lax tolerance due to widely distributed, bad egm96 file
+accept    12.5 55.5 0
+expect    55.5 -36.0213 12.5
+direction inverse
+accept    55.5 -36.0213 12.5
+expect    12.5 55.5 0
+-------------------------------------------------------------------------------
+operation  proj=merc geoidgrids=egm96_15.gtx axis=sue ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 15 cm
+accept    12.5 55.5 0
+expect    -7424275.1946 -36.0213  1391493.6349 0.0000
+direction inverse
+accept    -7424275.1946 -36.0213  1391493.6349 0.0000
+expect    12.5 55.5 0
+-------------------------------------------------------------------------------
+</gie>
diff --git a/test/gie/GDA.gie b/test/gie/GDA.gie
new file mode 100644
index 0000000..b77ca93
--- /dev/null
+++ b/test/gie/GDA.gie
@@ -0,0 +1,76 @@
+-----------------------------------------------------------------------------------
+Australian datum transformations
+-----------------------------------------------------------------------------------
+Based on material from:
+
+Intergovernmental Committee on Surveying and Mapping (ICSM)
+Permanent Committee on Geodesy (PCG):
+
+Geocentric Datum of Australia 2020 Technical Manual
+Version 1.0, 25 July 2017
+
+Which is distributed under Creative Commons CC-BY 4.0
+
+These tests will probably be useful as a template for an AU setup file, defining
+transformations for Australian systems, but I'm reluctant to provide such a file
+myself - it probably should come from official AU sources.
+
+Thomas Knudsen, thokn at sdfe.dk, 2017-11-27
+-----------------------------------------------------------------------------------
+
+<gie>
+
+-----------------------------------------------------------------------------------
+GDA94 to GDA2020
+-----------------------------------------------------------------------------------
+Just the Helmert transformation, to verify that we are within 100 um
+-----------------------------------------------------------------------------------
+operation proj=helmert
+          x =  0.06155   rx = -0.0394924
+          y = -0.01087   ry = -0.0327221
+          z = -0.04019   rz = -0.0328979    s = -0.009994
+
+-----------------------------------------------------------------------------------
+tolerance  75 um
+accept    -4052051.7643 4212836.2017 -2545106.0245
+expect    -4052052.7379 4212835.9897 -2545104.5898
+-------------------------------------------------------------------------------
+
+
+-----------------------------------------------------------------------------------
+GDA94 to GDA2020
+-----------------------------------------------------------------------------------
+All the way from geographic-to-cartesian-and-back-to-geographic
+-----------------------------------------------------------------------------------
+operation proj = pipeline ellps=GRS80;
+          step proj = cart;
+          step proj = helmert
+               x  =  0.06155;   rx = -0.0394924;
+               y  = -0.01087;   ry = -0.0327221;
+               z  = -0.04019;   rz = -0.0328979;  s = -0.009994;
+          step proj = cart inv;
+-----------------------------------------------------------------------------------
+accept    133.88551329 -23.67012389  603.3466  0   # Alice Springs GDA94
+expect    133.8855216  -23.67011014  603.2489  0   # Alice Springs GDA2020
+-------------------------------------------------------------------------------
+
+
+-----------------------------------------------------------------------------------
+ITRF2014 at 2018 to GDA2020  -  Test point ALIC (Alice Springs)
+-----------------------------------------------------------------------------------
+Just the Helmert transformation, to verify that we are within 100 um
+-----------------------------------------------------------------------------------
+operation proj = helmert    ellps=GRS80 exact
+
+          x = 0   rx = 0   dx = 0   drx = 0.00150379
+          y = 0   ry = 0   dy = 0   dry = 0.00118346
+          z = 0   rz = 0   dz = 0   drz = 0.00120716
+
+          s = 0   ds = 0   t_epoch=2020.0
+-----------------------------------------------------------------------------------
+tolerance  40 um
+accept     -4052052.6588 4212835.9938 -2545104.6946 2018.0      # ITRF2014 at 2018.0
+expect     -4052052.7373 4212835.9835 -2545104.5867             #  GDA2020
+-----------------------------------------------------------------------------------
+
+</gie>
diff --git a/test/gie/Makefile.am b/test/gie/Makefile.am
new file mode 100644
index 0000000..291bc3f
--- /dev/null
+++ b/test/gie/Makefile.am
@@ -0,0 +1,9 @@
+EXTRA_DIST = 4D-API_cs2cs-style.gie \
+	GDA.gie \
+	Makefile.am \
+	axisswap.gie \
+	builtins.gie \
+	deformation.gie \
+	ellipsoid.gie \
+	more_builtins.gie \
+	unitconvert.gie
diff --git a/jniwrap/org/proj4/Makefile.in b/test/gie/Makefile.in
similarity index 94%
copy from jniwrap/org/proj4/Makefile.in
copy to test/gie/Makefile.in
index a3c9327..9cd4ff1 100644
--- a/jniwrap/org/proj4/Makefile.in
+++ b/test/gie/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -87,7 +77,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-subdir = jniwrap/org/proj4
+subdir = test/gie
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -120,7 +110,6 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -163,7 +152,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -233,7 +221,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -242,7 +229,16 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-EXTRA_DIST = PJ.java PJException.java package-info.java
+EXTRA_DIST = 4D-API_cs2cs-style.gie \
+	GDA.gie \
+	Makefile.am \
+	axisswap.gie \
+	builtins.gie \
+	deformation.gie \
+	ellipsoid.gie \
+	more_builtins.gie \
+	unitconvert.gie
+
 all: all-am
 
 .SUFFIXES:
@@ -255,9 +251,10 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu jniwrap/org/proj4/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/gie/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu jniwrap/org/proj4/Makefile
+	  $(AUTOMAKE) --gnu test/gie/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -432,8 +429,6 @@ uninstall-am:
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/test/gie/axisswap.gie b/test/gie/axisswap.gie
new file mode 100644
index 0000000..5fe8620
--- /dev/null
+++ b/test/gie/axisswap.gie
@@ -0,0 +1,111 @@
+-------------------------------------------------------------------------------
+                        Tests for the axisswap operation
+-------------------------------------------------------------------------------
+
+<gie>
+
+operation   proj=axisswap order=1,2,3,4
+tolerance   0.000001 m
+accept      1 2 3 4
+expect      1 2 3 4
+roundtrip   100
+
+operation   proj=axisswap order=4,3,2,1
+tolerance   0.000001 m
+accept      1 2 3 4
+expect      4 3 2 1
+roundtrip   100
+
+operation   proj=axisswap order=-1,-2,-3,-4
+tolerance   0.000001 m
+accept       1  2  3  4
+expect      -1 -2 -3 -4
+roundtrip   100
+
+operation   proj=axisswap order=1,2,-3,4
+tolerance   0.000001 m
+accept      1 2  3 4
+expect      1 2 -3 4
+roundtrip   100
+
+operation   proj=axisswap order=-1,2,3,4
+tolerance   0.000001 m
+accept       1 2 3 4
+expect      -1 2 3 4
+roundtrip   100
+
+operation   proj=axisswap order=1,2,3,-4
+tolerance   0.000001 m
+accept      1 2 3  4
+expect      1 2 3 -4
+roundtrip   100
+
+operation   proj=axisswap order=-2,1
+tolerance   0.000001 m
+accept       1 2 3 4
+expect      -2 1 3 4
+roundtrip   100
+
+operation   proj=axisswap order=3,-2,1
+tolerance   0.000001 m
+accept      1  2 3 4
+expect      3 -2 1 4
+roundtrip   100
+
+operation   proj=axisswap axis=neu
+tolerance   0 m
+accept      1 2 3
+expect      2 1 3
+
+# when using the +axis parameter we specify the order of the INPUT coordinate,
+# as opposed to +order which relates to the OUTPUT coordinate. Here we test
+# that n(1), u(2) and e(3) are swapped correctly to enu ordering.
+operation   proj=axisswap axis=nue
+tolerance   0 m
+accept      1 2 3
+expect      2 3 1
+
+operation   proj=axisswap axis=swd
+tolerance   0.000001 m
+accept      1 2 3 4
+expect      -2 -1 -3 4
+
+operation   proj=pipeline
+            step proj=latlong
+            step proj=axisswap
+            order=1,2,3,4
+            angularunits
+
+tolerance   0.00001 m
+accept      12 55 0 0
+expect      12 55 0 0
+
+operation   proj=pipeline
+            step proj=latlong
+            step proj=axisswap
+            order=-2,-1,3,4
+            angularunits
+
+tolerance   0.00001 m
+accept       12 55 0 0
+expect      -55 -12 0 0
+
+operation   proj=axisswap order=1,2,3,4 axis=enu
+expect      failure pjd_err_axis
+
+operation   proj=axisswap
+expect      failure pjd_err_axis
+
+operation   proj=axisswap order=1,2,1,4
+expect      failure pjd_err_axis
+
+operation   proj=axisswap order=2,3
+expect      failure pjd_err_axis
+
+operation   proj=axisswap order=2,3,4
+expect      failure pjd_err_axis
+
+operation   proj=axisswap order=1,2,3,5
+expect      failure pjd_err_axis
+
+</gie>
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie
new file mode 100644
index 0000000..e8f1bfe
--- /dev/null
+++ b/test/gie/builtins.gie
@@ -0,0 +1,4722 @@
+===============================================================================
+
+Test material, mostly converted from selftest entries in PJ_xxx.c
+
+Most of this material was autogenerated, and does not attempt to exercise
+corner cases etc.
+
+See more_builtins.gie for some test cases with a more human touch.
+
+===============================================================================
+
+
+<gie>
+
+===============================================================================
+Albers Equal Area
+	Conic Sph&Ell
+	lat_1= lat_2=
+===============================================================================
+-------------------------------------------------------------------------------
+operation +proj=aea   +ellps=GRS80  +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222571.608757106 110653.326743030
+accept  2 -1
+expect  222706.306508391 -110484.267144400
+accept  -2 1
+expect  -222571.608757106 110653.326743030
+accept  -2 -1
+expect  -222706.306508391 -110484.267144400
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796630 -0.000904370
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796630 -0.000904370
+
+-------------------------------------------------------------------------------
+operation +proj=aea   +R=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223334.085170885 111780.431884472
+accept  2 -1
+expect  223470.154991687 -111610.339430990
+accept  -2 1
+expect  -223334.085170885 111780.431884472
+accept  -2 -1
+expect  -223470.154991687 -111610.339430990
+
+direction inverse
+accept  200 100
+expect  0.001790494 0.000895246
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790494 0.000895246
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Azimuthal Equidistant
+	Azi, Sph&Ell
+	lat_0 guam
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=aeqd   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222616.522190052 110596.996549550
+accept  2 -1
+expect  222616.522190052 -110596.996549550
+accept  -2 1
+expect  -222616.522190052 110596.996549550
+accept  -2 -1
+expect  -222616.522190052 -110596.996549550
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=aeqd   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223379.456047271 111723.757570854
+accept  2 -1
+expect  223379.456047271 -111723.757570854
+accept  -2 1
+expect  -223379.456047271 111723.757570854
+accept  -2 -1
+expect  -223379.456047271 -111723.757570854
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Airy
+	Misc Sph, no inv.
+	no_cut lat_b=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=airy   +a=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  189109.886908621 94583.752387504
+accept  2 -1
+expect  189109.886908621 -94583.752387504
+accept  -2 1
+expect  -189109.886908621 94583.752387504
+accept  -2 -1
+expect  -189109.886908621 -94583.752387504
+
+
+===============================================================================
+Aitoff
+	Misc Sph
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=aitoff   +R=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223379.458811696 111706.742883853
+accept  2 -1
+expect  223379.458811696 -111706.742883853
+accept  -2 1
+expect  -223379.458811696 111706.742883853
+accept  -2 -1
+expect  -223379.458811696 -111706.742883853
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Mod. Stereographic of Alaska
+	Azi(mod)
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=alsk +ellps=clrk66
+-------------------------------------------------------------------------------
+tolerance 0.00001 mm
+accept  -160.000000000 55.000000000
+expect  -513253.146950842 -968928.031867943
+accept  -160.000000000 70.000000000
+expect  -305001.133897637 687494.464958651
+accept  -145.000000000 70.000000000
+expect  266454.305088600 683423.477493031
+accept  -145.000000000 60.000000000
+expect  389141.322439244 -423913.251230397
+
+direction inverse
+accept  -500000.000000000 -950000.000000000
+expect  -159.830804303 55.183195262
+accept  -305000.000000000 700000.000000000
+expect  -160.042203156 70.111086864
+accept  250000.000000000 700000.000000000
+expect  -145.381043551 70.163900908
+accept  400000.000000000 -400000.000000000
+expect  -144.758985461 60.202929201
+
+-------------------------------------------------------------------------------
+operation +proj=alsk +R=6370997
+-------------------------------------------------------------------------------
+tolerance 0.0001 mm
+accept  -160.000000000 55.000000000
+expect  -511510.319410844 -967150.991676078
+accept  -160.000000000 70.000000000
+expect  -303744.771290369 685439.745941123
+accept  -145.000000000 70.000000000
+expect  265354.974019663 681386.892874573
+accept  -145.000000000 60.000000000
+expect  387711.995394027 -422980.685505463
+
+direction inverse
+accept  -500000.000000000 -950000.000000000
+expect  -159.854014458 55.165653849
+accept  -305000.000000000 700000.000000000
+expect  -160.082332372 70.128307618
+accept  250000.000000000 700000.000000000
+expect  -145.347827407 70.181566919
+accept  400000.000000000 -400000.000000000
+expect  -144.734239827 60.193564733
+
+
+===============================================================================
+Apian Globular I
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=apian   +a=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223374.577355253 111701.072127637
+accept  2 -1
+expect  223374.577355253 -111701.072127637
+accept  -2 1
+expect  -223374.577355253 111701.072127637
+accept  -2 -1
+expect  -223374.577355253 -111701.072127637
+
+
+===============================================================================
+August Epicycloidal
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=august   +a=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223404.978180972 111722.340289763
+accept  2 -1
+expect  223404.978180972 -111722.340289763
+accept  -2 1
+expect  -223404.978180972 111722.340289763
+accept  -2 -1
+expect  -223404.978180972 -111722.340289763
+
+
+===============================================================================
+Bacon Globular
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=bacon   +a=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223334.132555965 175450.725922666
+accept  2 -1
+expect  223334.132555965 -175450.725922666
+accept  -2 1
+expect  -223334.132555965 175450.725922666
+accept  -2 -1
+expect  -223334.132555965 -175450.725922666
+
+
+===============================================================================
+Bipolar conic of western hemisphere
+	Conic Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=bipc   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  2452160.217725756 -14548450.759654747
+accept  2 -1
+expect  2447915.213725341 -14763427.212798730
+accept  -2 1
+expect  2021695.522934909 -14540413.695283702
+accept  -2 -1
+expect  2018090.503004699 -14755620.651414108
+
+direction inverse
+accept  200 100
+expect  -73.038700285 17.248118466
+accept  200 -100
+expect  -73.037303739 17.249414978
+accept  -200 100
+expect  -73.035893173 17.245536403
+accept  -200 -100
+expect  -73.034496627 17.246832896
+
+-------------------------------------------------------------------------------
+operation +proj=bipc   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  2460565.740974965 -14598319.989330800
+accept  2 -1
+expect  2456306.185935200 -14814033.339502094
+accept  -2 1
+expect  2028625.497819099 -14590255.375482792
+accept  -2 -1
+expect  2025008.120589143 -14806200.018759441
+
+direction inverse
+accept  200 100
+expect  -73.038693105 17.248116270
+accept  200 -100
+expect  -73.037301330 17.249408353
+accept  -200 100
+expect  -73.035895582 17.245543028
+accept  -200 -100
+expect  -73.034503807 17.246835092
+
+
+===============================================================================
+Boggs Eumorphic
+	PCyl., no inv., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=boggs   +a=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  211949.700808182 117720.998305411
+accept  2 -1
+expect  211949.700808182 -117720.998305411
+accept  -2 1
+expect  -211949.700808182 117720.998305411
+accept  -2 -1
+expect  -211949.700808182 -117720.998305411
+
+
+===============================================================================
+Bonne (Werner lat_1=90)
+	Conic Sph&Ell
+	lat_1=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=bonne   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222605.296097157 55321.139565495
+accept  2 -1
+expect  222605.296099239 -165827.647799052
+accept  -2 1
+expect  -222605.296097157 55321.139565495
+accept  -2 -1
+expect  -222605.296099239 -165827.647799052
+
+direction inverse
+accept  200 100
+expect  0.001796699 0.500904369
+accept  200 -100
+expect  0.001796698 0.499095631
+accept  -200 100
+expect  -0.001796699 0.500904369
+accept  -200 -100
+expect  -0.001796698 0.499095631
+
+-------------------------------------------------------------------------------
+operation +proj=bonne   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223368.115572528 55884.555246394
+accept  2 -1
+expect  223368.115574632 -167517.599369694
+accept  -2 1
+expect  -223368.115572528 55884.555246394
+accept  -2 -1
+expect  -223368.115574632 -167517.599369694
+
+direction inverse
+accept  200 100
+expect  0.001790562 0.500895246
+accept  200 -100
+expect  0.001790561 0.499104753
+accept  -200 100
+expect  -0.001790562 0.500895246
+accept  -200 -100
+expect  -0.001790561 0.499104753
+
+
+===============================================================================
+Cal Coop Ocean Fish Invest Lines/Stations
+	Cyl, Sph&Ell
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=calcofi   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +no_defs
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  508.444872150 -1171.764860418
+accept  2 -1
+expect  514.999168152 -1145.821981468
+accept  -2 1
+expect  500.685384125 -1131.445377920
+accept  -2 -1
+expect  507.369719137 -1106.178201483
+
+direction inverse
+accept  200 100
+expect  -110.363307925 12.032056976
+accept  200 -100
+expect  -98.455008863 18.698723643
+accept  -200 100
+expect  -207.447024504 81.314089279
+accept  -200 -100
+expect  -62.486322854 87.980755945
+
+-------------------------------------------------------------------------------
+operation +proj=calcofi   +R=6400000    +lat_1=0.5 +lat_2=2 +no_defs
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  507.090507488 -1164.727375198
+accept  2 -1
+expect  513.686136375 -1138.999268217
+accept  -2 1
+expect  499.336261476 -1124.435130997
+accept  -2 -1
+expect  506.060570393 -1099.375665067
+
+direction inverse
+accept  200 100
+expect  -110.305190410 12.032056976
+accept  200 -100
+expect  -98.322360950 18.698723643
+accept  -200 100
+expect  -207.544906814 81.314089279
+accept  -200 -100
+expect  -62.576950372 87.980755945
+
+
+===============================================================================
+Cassini
+	Cyl, Sph&Ell
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=cass   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222605.285776991 110642.229253999
+accept  2 -1
+expect  222605.285776991 -110642.229253999
+accept  -2 1
+expect  -222605.285776991 110642.229253999
+accept  -2 -1
+expect  -222605.285776991 -110642.229253999
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=cass   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223368.105203484 111769.145040586
+accept  2 -1
+expect  223368.105203484 -111769.145040586
+accept  -2 1
+expect  -223368.105203484 111769.145040586
+accept  -2 -1
+expect  -223368.105203484 -111769.145040586
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+===============================================================================
+Central Conic
+	Sph
+	lat_1
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=pipeline +R=6390000
+    +step +proj=ccon +lat_1=52 +lat_0=52 +lon_0=19 +x_0=330000 +y_0=-350000
+	+step +proj=axisswap +order=1,-2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept 24 55
+expect 650031.54109413219363 4106.1617770643609028
+accept 15 49
+expect 37074.189007307473069 676826.23559270039774
+accept 24 49
+expect 696053.36061617843913 672294.56795827199940
+accept 19 52
+expect 330000.00000000000000 350000.00000000000000
+
+direction inverse
+accept 0 0
+expect 13.840227318521004431 55.030403993648806391
+accept 0 700000
+expect 14.514453594615022781 48.773847834747808675
+accept 700000 0
+expect 24.782707184271129766 55.003515505218481835
+accept 700000 700000
+expect 24.027610763560529927 48.750476070495021286
+accept 330000 350000
+expect 19.000000000000000000 52.000000000000000000
+
+
+===============================================================================
+Central Cylindrical
+	Cyl, Sph
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=cc   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 111712.415540593
+accept  2 -1
+expect  223402.144255274 -111712.415540593
+accept  -2 1
+expect  -223402.144255274 111712.415540593
+accept  -2 -1
+expect  -223402.144255274 -111712.415540593
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Equal Area Cylindrical
+	Cyl, Sph&Ell
+	lat_ts=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=cea   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222638.981586547 110568.812396267
+accept  2 -1
+expect  222638.981586547 -110568.812396266
+accept  -2 1
+expect  -222638.981586547 110568.812396267
+accept  -2 -1
+expect  -222638.981586547 -110568.812396266
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=cea   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 111695.401198614
+accept  2 -1
+expect  223402.144255274 -111695.401198614
+accept  -2 1
+expect  -223402.144255274 111695.401198614
+accept  -2 -1
+expect  -223402.144255274 -111695.401198614
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Chamberlin Trimetric
+	Misc Sph, no inv.
+	lat_1= lon_1= lat_2= lon_2= lat_3= lon_3=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=chamb   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  -27864.779586801 -223364.324593274
+accept  2 -1
+expect  -251312.283053493 -223402.145526208
+accept  -2 1
+expect  -27864.785649105 223364.327328827
+accept  -2 -1
+expect  -251312.289116443 223402.142197287
+
+
+===============================================================================
+Collignon
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=collg   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  249872.921577930 99423.174788460
+accept  2 -1
+expect  254272.532301245 -98559.307760743
+accept  -2 1
+expect  -249872.921577930 99423.174788460
+accept  -2 -1
+expect  -254272.532301245 -98559.307760743
+
+direction inverse
+accept  200 100
+expect  0.001586797 0.001010173
+accept  200 -100
+expect  0.001586769 -0.001010182
+accept  -200 100
+expect  -0.001586797 0.001010173
+accept  -200 -100
+expect  -0.001586769 -0.001010182
+
+
+===============================================================================
+Compact Miller
+	Cyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=comill   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 110611.859089459
+accept  2 -1
+expect  223402.144255274 -110611.859089459
+accept  -2 1
+expect  -223402.144255274 110611.859089459
+accept  -2 -1
+expect  -223402.144255274 -110611.859089459
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000904107
+accept  200 -100
+expect  0.001790493 -0.000904107
+accept  -200 100
+expect  -0.001790493 0.000904107
+accept  -200 -100
+expect  -0.001790493 -0.000904107
+
+
+===============================================================================
+Craster Parabolic (Putnins P4)
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=crast   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  218280.142056781 114306.045604280
+accept  2 -1
+expect  218280.142056781 -114306.045604280
+accept  -2 1
+expect  -218280.142056781 114306.045604280
+accept  -2 -1
+expect  -218280.142056781 -114306.045604280
+
+direction inverse
+accept  200 100
+expect  0.001832259 0.000874839
+accept  200 -100
+expect  0.001832259 -0.000874839
+accept  -200 100
+expect  -0.001832259 0.000874839
+accept  -200 -100
+expect  -0.001832259 -0.000874839
+
+
+===============================================================================
+Denoyer Semi-Elliptical
+	PCyl., no inv., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=denoy   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223377.422876954 111701.072127637
+accept  2 -1
+expect  223377.422876954 -111701.072127637
+accept  -2 1
+expect  -223377.422876954 111701.072127637
+accept  -2 -1
+expect  -223377.422876954 -111701.072127637
+
+
+===============================================================================
+Eckert I
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=eck1   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  204680.888202951 102912.178426065
+accept  2 -1
+expect  204680.888202951 -102912.178426065
+accept  -2 1
+expect  -204680.888202951 102912.178426065
+accept  -2 -1
+expect  -204680.888202951 -102912.178426065
+
+direction inverse
+accept  200 100
+expect  0.001943415 0.000971702
+accept  200 -100
+expect  0.001943415 -0.000971702
+accept  -200 100
+expect  -0.001943415 0.000971702
+accept  -200 -100
+expect  -0.001943415 -0.000971702
+
+
+===============================================================================
+Eckert II
+	PCyl. Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=eck2   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  204472.870907960 121633.734975242
+accept  2 -1
+expect  204472.870907960 -121633.734975242
+accept  -2 1
+expect  -204472.870907960 121633.734975242
+accept  -2 -1
+expect  -204472.870907960 -121633.734975242
+
+direction inverse
+accept  200 100
+expect  0.001943415 0.000824804
+accept  200 -100
+expect  0.001943415 -0.000824804
+accept  -200 100
+expect  -0.001943415 0.000824804
+accept  -200 -100
+expect  -0.001943415 -0.000824804
+
+
+===============================================================================
+Eckert III
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=eck3   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  188652.015721538 94328.919337031
+accept  2 -1
+expect  188652.015721538 -94328.919337031
+accept  -2 1
+expect  -188652.015721538 94328.919337031
+accept  -2 -1
+expect  -188652.015721538 -94328.919337031
+
+direction inverse
+accept  200 100
+expect  0.002120241 0.001060120
+accept  200 -100
+expect  0.002120241 -0.001060120
+accept  -200 100
+expect  -0.002120241 0.001060120
+accept  -200 -100
+expect  -0.002120241 -0.001060120
+
+
+===============================================================================
+Eckert IV
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=eck4   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  188646.389356416 132268.540174065
+accept  2 -1
+expect  188646.389356416 -132268.540174065
+accept  -2 1
+expect  -188646.389356416 132268.540174065
+accept  -2 -1
+expect  -188646.389356416 -132268.540174065
+
+direction inverse
+accept  200 100
+expect  0.002120241 0.000756015
+accept  200 -100
+expect  0.002120241 -0.000756015
+accept  -200 100
+expect  -0.002120241 0.000756015
+accept  -200 -100
+expect  -0.002120241 -0.000756015
+
+
+===============================================================================
+Eckert V
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=eck5   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  197031.392134061 98523.198847227
+accept  2 -1
+expect  197031.392134061 -98523.198847227
+accept  -2 1
+expect  -197031.392134061 98523.198847227
+accept  -2 -1
+expect  -197031.392134061 -98523.198847227
+
+direction inverse
+accept  200 100
+expect  0.002029979 0.001014989
+accept  200 -100
+expect  0.002029979 -0.001014989
+accept  -200 100
+expect  -0.002029979 0.001014989
+accept  -200 -100
+expect  -0.002029979 -0.001014989
+
+
+===============================================================================
+Eckert VI
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=eck6   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  197021.605628992 126640.420733174
+accept  2 -1
+expect  197021.605628992 -126640.420733174
+accept  -2 1
+expect  -197021.605628992 126640.420733174
+accept  -2 -1
+expect  -197021.605628992 -126640.420733174
+
+direction inverse
+accept  200 100
+expect  0.002029979 0.000789630
+accept  200 -100
+expect  0.002029979 -0.000789630
+accept  -200 100
+expect  -0.002029979 0.000789630
+accept  -200 -100
+expect  -0.002029979 -0.000789630
+
+
+===============================================================================
+Equidistant Cylindrical (Plate Caree)
+	Cyl, Sph
+	lat_ts=[, lat_0=0]
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=eqc   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 111701.072127637
+accept  2 -1
+expect  223402.144255274 -111701.072127637
+accept  -2 1
+expect  -223402.144255274 111701.072127637
+accept  -2 -1
+expect  -223402.144255274 -111701.072127637
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Equidistant Conic
+	Conic, Sph&Ell
+	lat_1= lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=eqdc   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222588.440269286 110659.134907347
+accept  2 -1
+expect  222756.836702042 -110489.578087221
+accept  -2 1
+expect  -222588.440269286 110659.134907347
+accept  -2 -1
+expect  -222756.836702042 -110489.578087221
+
+direction inverse
+accept  200 100
+expect  0.001796359 0.000904369
+accept  200 -100
+expect  0.001796358 -0.000904370
+accept  -200 100
+expect  -0.001796359 0.000904369
+accept  -200 -100
+expect  -0.001796358 -0.000904370
+
+-------------------------------------------------------------------------------
+operation +proj=eqdc   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223351.088175114 111786.108747174
+accept  2 -1
+expect  223521.200266735 -111615.970741241
+accept  -2 1
+expect  -223351.088175114 111786.108747174
+accept  -2 -1
+expect  -223521.200266735 -111615.970741241
+
+direction inverse
+accept  200 100
+expect  0.001790221 0.000895246
+accept  200 -100
+expect  0.001790220 -0.000895247
+accept  -200 100
+expect  -0.001790221 0.000895246
+accept  -200 -100
+expect  -0.001790220 -0.000895247
+
+
+===============================================================================
+Euler
+	Conic, Sph
+	lat_1= and lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=euler   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222597.634659108 111404.240549919
+accept  2 -1
+expect  222767.165631876 -111234.676491018
+accept  -2 1
+expect  -222597.634659108 111404.240549919
+accept  -2 -1
+expect  -222767.165631876 -111234.676491018
+
+direction inverse
+accept  200 100
+expect  0.001796281 0.000898315
+accept  200 -100
+expect  0.001796279 -0.000898316
+accept  -200 100
+expect  -0.001796281 0.000898315
+accept  -200 -100
+expect  -0.001796279 -0.000898316
+
+-------------------------------------------------------------------------------
+operation +proj=euler   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223360.655598694 111786.112389791
+accept  2 -1
+expect  223530.767690316 -111615.967098624
+accept  -2 1
+expect  -223360.655598694 111786.112389791
+accept  -2 -1
+expect  -223530.767690316 -111615.967098624
+
+direction inverse
+accept  200 100
+expect  0.001790144 0.000895246
+accept  200 -100
+expect  0.001790143 -0.000895247
+accept  -200 100
+expect  -0.001790144 0.000895246
+accept  -200 -100
+expect  -0.001790143 -0.000895247
+
+
+===============================================================================
+Extended Transverse Mercator
+	Cyl, Sph
+	lat_ts=(0)
+lat_0=(0)
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=etmerc   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5 +zone=30
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222650.796797586 110642.229411933
+accept  2 -1
+expect  222650.796797586 -110642.229411933
+accept  -2 1
+expect  -222650.796797586 110642.229411933
+accept  -2 -1
+expect  -222650.796797586 -110642.229411933
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+
+===============================================================================
+Fahey
+	Pcyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=fahey   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  182993.344649124 101603.193569884
+accept  2 -1
+expect  182993.344649124 -101603.193569884
+accept  -2 1
+expect  -182993.344649124 101603.193569884
+accept  -2 -1
+expect  -182993.344649124 -101603.193569884
+
+direction inverse
+accept  200 100
+expect  0.002185789 0.000984246
+accept  200 -100
+expect  0.002185789 -0.000984246
+accept  -200 100
+expect  -0.002185789 0.000984246
+accept  -200 -100
+expect  -0.002185789 -0.000984246
+
+
+===============================================================================
+Foucaut
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=fouc   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222588.120675892 111322.316700694
+accept  2 -1
+expect  222588.120675892 -111322.316700694
+accept  -2 1
+expect  -222588.120675892 111322.316700694
+accept  -2 -1
+expect  -222588.120675892 -111322.316700694
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000898315
+accept  200 -100
+expect  0.001796631 -0.000898315
+accept  -200 100
+expect  -0.001796631 0.000898315
+accept  -200 -100
+expect  -0.001796631 -0.000898315
+
+-------------------------------------------------------------------------------
+operation +proj=fouc   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223351.109003414 111703.907721713
+accept  2 -1
+expect  223351.109003414 -111703.907721713
+accept  -2 1
+expect  -223351.109003414 111703.907721713
+accept  -2 -1
+expect  -223351.109003414 -111703.907721713
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Foucaut Sinusoidal
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=fouc_s   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 111695.401198614
+accept  2 -1
+expect  223402.144255274 -111695.401198614
+accept  -2 1
+expect  -223402.144255274 111695.401198614
+accept  -2 -1
+expect  -223402.144255274 -111695.401198614
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Gall (Gall Stereographic)
+	Cyl, Sph
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=gall   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  157969.171134520 95345.249178386
+accept  2 -1
+expect  157969.171134520 -95345.249178386
+accept  -2 1
+expect  -157969.171134520 95345.249178386
+accept  -2 -1
+expect  -157969.171134520 -95345.249178386
+
+direction inverse
+accept  200 100
+expect  0.002532140 0.001048847
+accept  200 -100
+expect  0.002532140 -0.001048847
+accept  -200 100
+expect  -0.002532140 0.001048847
+accept  -200 -100
+expect  -0.002532140 -0.001048847
+
+
+===============================================================================
+Geocentric
+
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=geocent   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1 0
+expect  6373287.27950247        222560.09599219 110568.77482092
+accept  2 -1 0
+expect  6373287.27950247        222560.09599219 -110568.77482092
+accept  -2 1 0
+expect  6373287.27950247        -222560.09599219 110568.77482092
+accept  -2 -1 0
+expect  6373287.27950247        -222560.09599219 -110568.77482092
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000898315
+accept  200 -100
+expect  0.001796631 -0.000898315
+accept  -200 100
+expect  -0.001796631 0.000898315
+accept  -200 -100
+expect  -0.001796631 -0.000898315
+
+-------------------------------------------------------------------------------
+operation +proj=geocent   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+
+
+===============================================================================
+Geostationary Satellite View
+	Azi, Sph&Ell
+	h=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=geos   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +h=35785831
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222527.070365800 110551.303413329
+accept  2 -1
+expect  222527.070365800 -110551.303413329
+accept  -2 1
+expect  -222527.070365800 110551.303413329
+accept  -2 -1
+expect  -222527.070365800 -110551.303413329
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=geos   +R=6400000    +lat_1=0.5 +lat_2=2 +h=35785831
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223289.457635795 111677.657456537
+accept  2 -1
+expect  223289.457635795 -111677.657456537
+accept  -2 1
+expect  -223289.457635795 111677.657456537
+accept  -2 -1
+expect  -223289.457635795 -111677.657456537
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Ginsburg VIII (TsNIIGAiK)
+	PCyl, Sph., no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=gins8   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  194350.250939590 111703.907635335
+accept  2 -1
+expect  194350.250939590 -111703.907635335
+accept  -2 1
+expect  -194350.250939590 111703.907635335
+accept  -2 -1
+expect  -194350.250939590 -111703.907635335
+
+
+===============================================================================
+General Sinusoidal Series
+	PCyl, Sph.
+	m= n=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=gn_sinu   +a=6400000    +lat_1=0.5 +lat_2=2 +m=1 +n=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223385.132504696 111698.236447187
+accept  2 -1
+expect  223385.132504696 -111698.236447187
+accept  -2 1
+expect  -223385.132504696 111698.236447187
+accept  -2 -1
+expect  -223385.132504696 -111698.236447187
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Gnomonic
+	Azi, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=gnom   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223492.924747185 111780.509206593
+accept  2 -1
+expect  223492.924747185 -111780.509206593
+accept  -2 1
+expect  -223492.924747185 111780.509206593
+accept  -2 -1
+expect  -223492.924747185 -111780.509206593
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Goode Homolosine
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=goode   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223368.119026632 111701.072127637
+accept  2 -1
+expect  223368.119026632 -111701.072127637
+accept  -2 1
+expect  -223368.119026632 111701.072127637
+accept  -2 -1
+expect  -223368.119026632 -111701.072127637
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Mod. Stereographic of 48 U.S.
+	Azi(mod)
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=gs48 +R=6370997
+-------------------------------------------------------------------------------
+tolerance 0.0001 mm
+accept  -119.000000000 40.000000000
+expect  -1923908.446529346 355874.658944479
+accept  -70.000000000 64.000000000
+expect  1354020.375109298 3040846.007866525
+accept  -80.000000000 25.000000000
+expect  1625139.160484320 -1413614.894029108
+accept  -95.000000000 35.000000000
+expect  90241.658071458 -439595.048485902
+
+direction inverse
+accept  -1923000.000000000 355000.000000000
+expect  -118.987112613 39.994449789
+accept  1354000.000000000 3040000.000000000
+expect  -70.005208999 63.993387836
+accept  1625000.000000000 -1413000.000000000
+expect  -80.000346610 25.005602547
+accept  90000.000000000 -439000.000000000
+expect  -95.002606473 35.005424705
+
+
+===============================================================================
+Mod. Stereographic of 50 U.S.
+	Azi(mod)
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=gs50 +ellps=clrk66
+-------------------------------------------------------------------------------
+tolerance 0.0001 mm
+accept  -160.000000000 65.000000000
+expect  -1874628.537740233 2660907.942291015
+accept  -130.000000000 45.000000000
+expect  -771831.518853336 48465.166491305
+accept  -65.000000000 45.000000000
+expect  4030931.833981509 1323687.864777399
+accept  -80.000000000 36.000000000
+expect  3450764.261536101 -175619.041820732
+
+direction inverse
+accept  -1800000.000000000 2600000.000000000
+expect  -157.989285000 64.851559610
+accept  -800000.000000000 500000.000000000
+expect  -131.171390467 49.084969746
+accept  4000000.000000000 1300000.000000000
+expect  -65.491568685 44.992837924
+accept  3900000.000000000 -170000.000000000
+expect  -75.550660091 34.191114076
+
+-------------------------------------------------------------------------------
+operation +proj=gs50 +R=6370997
+-------------------------------------------------------------------------------
+tolerance 0.0001 mm
+accept  -160.000000000 65.000000000
+expect  -1867268.253460009 2656506.230401823
+accept  -130.000000000 45.000000000
+expect  -769572.189672994 48324.312440864
+accept  -65.000000000 45.000000000
+expect  4019393.068680791 1320191.309350289
+accept  -80.000000000 36.000000000
+expect  3442685.615172346 -178760.423489429
+
+direction inverse
+accept  -1800000.000000000 2600000.000000000
+expect  -158.163295045 64.854288365
+accept  -800000.000000000 500000.000000000
+expect  -131.206816960 49.082915351
+accept  4000000.000000000 1300000.000000000
+expect  -65.348945221 44.957292682
+accept  3900000.000000000 -170000.000000000
+expect  -75.446820242 34.185406226
+
+
+===============================================================================
+Hammer & Eckert-Greifendorff
+	Misc Sph,
+	W= M=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=hammer   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223373.788703241 111703.907397767
+accept  2 -1
+expect  223373.788703241 -111703.907397767
+accept  -2 1
+expect  -223373.788703241 111703.907397767
+accept  -2 -1
+expect  -223373.788703241 -111703.907397767
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Hatano Asymmetrical Equal Area
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=hatano   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  189878.878946528 131409.802440626
+accept  2 -1
+expect  189881.081952445 -131409.142276074
+accept  -2 1
+expect  -189878.878946528 131409.802440626
+accept  -2 -1
+expect  -189881.081952445 -131409.142276074
+
+direction inverse
+accept  200 100
+expect  0.002106462 0.000760957
+accept  200 -100
+expect  0.002106462 -0.000760958
+accept  -200 100
+expect  -0.002106462 0.000760957
+accept  -200 -100
+expect  -0.002106462 -0.000760958
+
+
+===============================================================================
+HEALPix
+	Sph., Ellps.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=healpix   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222390.103949239 130406.588664482
+accept  2 -1
+expect  222390.103949239 -130406.588664481
+accept  -2 1
+expect  -222390.103949239 130406.588664482
+accept  -2 -1
+expect  -222390.103949239 -130406.588664481
+
+direction inverse
+accept  200 100
+expect  0.001798641 0.000766795
+accept  200 -100
+expect  0.001798641 -0.000766795
+accept  -200 100
+expect  -0.001798641 0.000766795
+accept  -200 -100
+expect  -0.001798641 -0.000766795
+
+-------------------------------------------------------------------------------
+operation +proj=healpix   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 131588.044441999
+accept  2 -1
+expect  223402.144255274 -131588.044441999
+accept  -2 1
+expect  -223402.144255274 131588.044441999
+accept  -2 -1
+expect  -223402.144255274 -131588.044441999
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000759909
+accept  200 -100
+expect  0.001790493 -0.000759909
+accept  -200 100
+expect  -0.001790493 0.000759909
+accept  -200 -100
+expect  -0.001790493 -0.000759909
+
+
+===============================================================================
+rHEALPix
+	Sph., Ellps.
+	north_square= south_square=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=rhealpix   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222390.103949239 130406.588664482
+accept  2 -1
+expect  222390.103949239 -130406.588664481
+accept  -2 1
+expect  -222390.103949239 130406.588664482
+accept  -2 -1
+expect  -222390.103949239 -130406.588664481
+
+direction inverse
+accept  200 100
+expect  0.001798641 0.000766795
+accept  200 -100
+expect  0.001798641 -0.000766795
+accept  -200 100
+expect  -0.001798641 0.000766795
+accept  -200 -100
+expect  -0.001798641 -0.000766795
+
+-------------------------------------------------------------------------------
+operation +proj=rhealpix   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 131588.044441999
+accept  2 -1
+expect  223402.144255274 -131588.044441999
+accept  -2 1
+expect  -223402.144255274 131588.044441999
+accept  -2 -1
+expect  -223402.144255274 -131588.044441999
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000759909
+accept  200 -100
+expect  0.001790493 -0.000759909
+accept  -200 100
+expect  -0.001790493 0.000759909
+accept  -200 -100
+expect  -0.001790493 -0.000759909
+
+
+===============================================================================
+Interrupted Goode Homolosine
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=igh   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223878.497456271 111701.072127637
+accept  2 -1
+expect  223708.371313058 -111701.072127637
+accept  -2 1
+expect  -222857.740596992 111701.072127637
+accept  -2 -1
+expect  -223027.866740205 -111701.072127637
+
+direction inverse
+accept  200 100
+expect  0.001790489 0.000895247
+accept  200 -100
+expect  0.001790491 -0.000895247
+accept  -200 100
+expect  -0.001790497 0.000895247
+accept  -200 -100
+expect  -0.001790496 -0.000895247
+
+
+===============================================================================
+International Map of the World Polyconic
+	Mod. Polyconic, Ell
+	lat_1= and lat_2= [lon_1=]
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=imw_p   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222588.441139376 55321.128653810
+accept  2 -1
+expect  222756.906377687 -165827.584288324
+accept  -2 1
+expect  -222588.441139376 55321.128653810
+accept  -2 -1
+expect  -222756.906377687 -165827.584288324
+
+direction inverse
+accept  200 100
+expect  0.001796699 0.500904924
+accept  200 -100
+expect  0.001796698 0.499095076
+accept  -200 100
+expect  -0.001796699 0.500904924
+accept  -200 -100
+expect  -0.001796698 0.499095076
+
+
+===============================================================================
+Icosahedral Snyder Equal Area
+	Sph
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=isea   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  -1097074.948022474 3442909.309037183
+accept  2 -1
+expect  -1097074.948264795 3233611.728585708
+accept  -2 1
+expect  -1575486.353641554 3442168.342028188
+accept  -2 -1
+expect  -1575486.353880283 3234352.695594706
+
+
+===============================================================================
+Kavraisky V
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=kav5   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  200360.905308829 123685.082476998
+accept  2 -1
+expect  200360.905308829 -123685.082476998
+accept  -2 1
+expect  -200360.905308829 123685.082476998
+accept  -2 -1
+expect  -200360.905308829 -123685.082476998
+
+direction inverse
+accept  200 100
+expect  0.001996259 0.000808483
+accept  200 -100
+expect  0.001996259 -0.000808483
+accept  -200 100
+expect  -0.001996259 0.000808483
+accept  -200 -100
+expect  -0.001996259 -0.000808483
+
+-------------------------------------------------------------------------------
+operation +proj=kav5   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  201047.703110878 124109.050629171
+accept  2 -1
+expect  201047.703110878 -124109.050629171
+accept  -2 1
+expect  -201047.703110878 124109.050629171
+accept  -2 -1
+expect  -201047.703110878 -124109.050629171
+
+direction inverse
+accept  200 100
+expect  0.001989440 0.000805721
+accept  200 -100
+expect  0.001989440 -0.000805721
+accept  -200 100
+expect  -0.001989440 0.000805721
+accept  -200 -100
+expect  -0.001989440 -0.000805721
+
+
+===============================================================================
+Kavraisky VII
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=kav7   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  193462.974943729 111701.072127637
+accept  2 -1
+expect  193462.974943729 -111701.072127637
+accept  -2 1
+expect  -193462.974943729 111701.072127637
+accept  -2 -1
+expect  -193462.974943729 -111701.072127637
+
+direction inverse
+accept  200 100
+expect  0.002067483 0.000895247
+accept  200 -100
+expect  0.002067483 -0.000895247
+accept  -200 100
+expect  -0.002067483 0.000895247
+accept  -200 -100
+expect  -0.002067483 -0.000895247
+
+
+===============================================================================
+Krovak
+	PCyl., Ellps.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=krovak +ellps=GRS80  +no_defs
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  -3196535.232563641 -6617878.867551444
+accept  2 -1
+expect  -3260035.440552109 -6898873.614878031
+accept  -2 1
+expect  -3756305.328869175 -6478142.561571511
+accept  -2 -1
+expect  -3831703.658501982 -6759107.170155395
+
+direction inverse
+accept  200 100
+expect  24.836218919 59.758403933
+accept  200 -100
+expect  24.836315485 59.756888426
+accept  -200 100
+expect  24.830447748 59.758403933
+accept  -200 -100
+expect  24.830351182 59.756888426
+
+
+===============================================================================
+Laborde
+	Cyl, Sph
+	Special for Madagascar
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=labrd   +ellps=GRS80  +lon_0=0.5 +lat_0=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  166973.166090228 -110536.912730266
+accept  2 -1
+expect  166973.168287157 -331761.993650884
+accept  -2 1
+expect  -278345.500519976 -110469.032642032
+accept  -2 -1
+expect  -278345.504185270 -331829.870790275
+
+direction inverse
+accept  200 100
+expect  0.501797719 2.000904357
+accept  200 -100
+expect  0.501797717 1.999095641
+accept  -200 100
+expect  0.498202281 2.000904357
+accept  -200 -100
+expect  0.498202283 1.999095641
+
+
+===============================================================================
+Lambert Azimuthal Equal Area
+	Azi, Sph&Ell
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=laea   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222602.471450095 110589.827224410
+accept  2 -1
+expect  222602.471450095 -110589.827224409
+accept  -2 1
+expect  -222602.471450095 110589.827224410
+accept  -2 -1
+expect  -222602.471450095 -110589.827224409
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=laea   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223365.281370125 111716.668072916
+accept  2 -1
+expect  223365.281370125 -111716.668072916
+accept  -2 1
+expect  -223365.281370125 111716.668072916
+accept  -2 -1
+expect  -223365.281370125 -111716.668072916
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Lagrange
+	Misc Sph, no inv.
+	W=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=lagrng   +a=6400000 +W=2   +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  111703.375917226 27929.831908033
+accept  2 -1
+expect  111699.122088816 -83784.178013358
+accept  -2 1
+expect  -111703.375917226 27929.831908033
+accept  -2 -1
+expect  -111699.122088816 -83784.178013358
+
+
+===============================================================================
+Larrivee
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=larr   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223393.637624201 111707.215961256
+accept  2 -1
+expect  223393.637624201 -111707.215961256
+accept  -2 1
+expect  -223393.637624201 111707.215961256
+accept  -2 -1
+expect  -223393.637624201 -111707.215961256
+
+
+===============================================================================
+Laskowski
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=lask   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  217928.275907355 112144.329220142
+accept  2 -1
+expect  217928.275907355 -112144.329220142
+accept  -2 1
+expect  -217928.275907355 112144.329220142
+accept  -2 -1
+expect  -217928.275907355 -112144.329220142
+
+
+===============================================================================
+Lambert Conformal Conic
+	Conic, Sph&Ell
+	lat_1= and lat_2= or lat_0
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=lcc   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222588.439735968 110660.533870800
+accept  2 -1
+expect  222756.879700279 -110532.797660827
+accept  -2 1
+expect  -222588.439735968 110660.533870800
+accept  -2 -1
+expect  -222756.879700279 -110532.797660827
+
+direction inverse
+accept  200 100
+expect  0.001796359 0.000904232
+accept  200 -100
+expect  0.001796358 -0.000904233
+accept  -200 100
+expect  -0.001796359 0.000904232
+accept  -200 -100
+expect  -0.001796358 -0.000904233
+
+
+===============================================================================
+Lambert Conformal Conic Alternative
+	Conic, Sph&Ell
+	lat_0=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=lcca   +ellps=GRS80  +lat_0=1 +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222605.285770237 67.806007272
+accept  2 -1
+expect  222740.037637937 -221125.539829602
+accept  -2 1
+expect  -222605.285770237 67.806007272
+accept  -2 -1
+expect  -222740.037637937 -221125.539829602
+
+direction inverse
+accept  200 100
+expect  0.001796903 1.000904366
+accept  200 -100
+expect  0.001796902 0.999095633
+accept  -200 100
+expect  -0.001796903 1.000904366
+accept  -200 -100
+expect  -0.001796902 0.999095633
+
+
+===============================================================================
+Lambert Equal Area Conic
+	Conic, Sph&Ell
+	lat_1= south
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=leac   +ellps=GRS80  +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  220685.140542979 112983.500889396
+accept  2 -1
+expect  224553.312279826 -108128.636744873
+accept  -2 1
+expect  -220685.140542979 112983.500889396
+accept  -2 -1
+expect  -224553.312279826 -108128.636744873
+
+direction inverse
+accept  200 100
+expect  0.001796645 0.000904352
+accept  200 -100
+expect  0.001796616 -0.000904387
+accept  -200 100
+expect  -0.001796645 0.000904352
+accept  -200 -100
+expect  -0.001796616 -0.000904387
+
+-------------------------------------------------------------------------------
+operation +proj=leac   +R=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  221432.868592852 114119.454526532
+accept  2 -1
+expect  225331.724127111 -109245.829435056
+accept  -2 1
+expect  -221432.868592852 114119.454526532
+accept  -2 -1
+expect  -225331.724127111 -109245.829435056
+
+direction inverse
+accept  200 100
+expect  0.001790507 0.000895229
+accept  200 -100
+expect  0.001790479 -0.000895264
+accept  -200 100
+expect  -0.001790507 0.000895229
+accept  -200 -100
+expect  -0.001790479 -0.000895264
+
+
+===============================================================================
+Lee Oblated Stereographic
+	Azi(mod)
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=lee_os   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.0010 mm
+accept  2 1
+expect  -25564478.952605054 154490848.828625500
+accept  2 -1
+expect  30115393.938574642 125193997.439701970
+accept  -2 1
+expect  -31039340.592166007 57678685.044891544
+accept  -2 -1
+expect  -3088419.939423571 58150091.099111013
+
+direction inverse
+accept  200 100
+expect  -164.997479458 -9.998758861
+accept  200 -100
+expect  -164.997479439 -10.001241120
+accept  -200 100
+expect  -165.002520542 -9.998758861
+accept  -200 -100
+expect  -165.002520561 -10.001241120
+
+
+===============================================================================
+Loximuthal
+	PCyl Sph
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=loxim   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223382.295791339 55850.536063819
+accept  2 -1
+expect  223393.637462243 -167551.608191456
+accept  -2 1
+expect  -223382.295791339 55850.536063819
+accept  -2 -1
+expect  -223393.637462243 -167551.608191456
+
+direction inverse
+accept  200 100
+expect  0.001790561 0.500895247
+accept  200 -100
+expect  0.001790561 0.499104753
+accept  -200 100
+expect  -0.001790561 0.500895247
+accept  -200 -100
+expect  -0.001790561 0.499104753
+
+
+===============================================================================
+Space oblique for LANDSAT
+	Cyl, Sph&Ell
+	lsat= path=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=lsat +ellps=GRS80 +lat_1=0.5 +lat_2=2 +lsat=1 +path=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  18241950.014558550 9998256.839822935
+accept  2 -1
+expect  18746856.253319457 10215761.669925211
+accept  -2 1
+expect  18565503.683633164 9085039.146727053
+accept  -2 -1
+expect  19019696.902028911 9247763.039432822
+
+direction inverse
+accept  200 100
+expect  126.000423835 0.001723782
+accept  200 -100
+expect  126.002213738 0.001880155
+accept  -200 100
+expect  126.000734469 -0.001880155
+accept  -200 -100
+expect  126.002524373 -0.001723782
+
+
+===============================================================================
+McBryde-Thomas Flat-Polar Sine (No. 1)
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=mbt_s   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  204131.517850273 121400.330225508
+accept  2 -1
+expect  204131.517850273 -121400.330225508
+accept  -2 1
+expect  -204131.517850273 121400.330225508
+accept  -2 -1
+expect  -204131.517850273 -121400.330225508
+
+direction inverse
+accept  200 100
+expect  0.001959383 0.000823699
+accept  200 -100
+expect  0.001959383 -0.000823699
+accept  -200 100
+expect  -0.001959383 0.000823699
+accept  -200 -100
+expect  -0.001959383 -0.000823699
+
+-------------------------------------------------------------------------------
+operation +proj=mbt_s   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  204831.240570992 121816.466696035
+accept  2 -1
+expect  204831.240570992 -121816.466696035
+accept  -2 1
+expect  -204831.240570992 121816.466696035
+accept  -2 -1
+expect  -204831.240570992 -121816.466696035
+
+direction inverse
+accept  200 100
+expect  0.001952689 0.000820885
+accept  200 -100
+expect  0.001952689 -0.000820885
+accept  -200 100
+expect  -0.001952689 0.000820885
+accept  -200 -100
+expect  -0.001952689 -0.000820885
+
+
+===============================================================================
+McBryde-Thomas Flat-Pole Sine (No. 2)
+	Cyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=mbt_fps   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  198798.176129850 125512.017254531
+accept  2 -1
+expect  198798.176129850 -125512.017254531
+accept  -2 1
+expect  -198798.176129850 125512.017254531
+accept  -2 -1
+expect  -198798.176129850 -125512.017254531
+
+direction inverse
+accept  200 100
+expect  0.002011971 0.000796712
+accept  200 -100
+expect  0.002011971 -0.000796712
+accept  -200 100
+expect  -0.002011971 0.000796712
+accept  -200 -100
+expect  -0.002011971 -0.000796712
+
+
+===============================================================================
+McBride-Thomas Flat-Polar Parabolic
+	Cyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=mbtfpp   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  206804.786929820 120649.762565793
+accept  2 -1
+expect  206804.786929820 -120649.762565793
+accept  -2 1
+expect  -206804.786929820 120649.762565793
+accept  -2 -1
+expect  -206804.786929820 -120649.762565793
+
+direction inverse
+accept  200 100
+expect  0.001933954 0.000828837
+accept  200 -100
+expect  0.001933954 -0.000828837
+accept  -200 100
+expect  -0.001933954 0.000828837
+accept  -200 -100
+expect  -0.001933954 -0.000828837
+
+
+===============================================================================
+McBryde-Thomas Flat-Polar Quartic
+	Cyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=mbtfpq   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  209391.854738393 119161.040199055
+accept  2 -1
+expect  209391.854738393 -119161.040199055
+accept  -2 1
+expect  -209391.854738393 119161.040199055
+accept  -2 -1
+expect  -209391.854738393 -119161.040199055
+
+direction inverse
+accept  200 100
+expect  0.001910106 0.000839185
+accept  200 -100
+expect  0.001910106 -0.000839185
+accept  -200 100
+expect  -0.001910106 0.000839185
+accept  -200 -100
+expect  -0.001910106 -0.000839185
+
+
+===============================================================================
+McBryde-Thomas Flat-Polar Sinusoidal
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=mbtfps   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  204740.117478572 121864.729719340
+accept  2 -1
+expect  204740.117478572 -121864.729719340
+accept  -2 1
+expect  -204740.117478572 121864.729719340
+accept  -2 -1
+expect  -204740.117478572 -121864.729719340
+
+direction inverse
+accept  200 100
+expect  0.001953415 0.000820580
+accept  200 -100
+expect  0.001953415 -0.000820580
+accept  -200 100
+expect  -0.001953415 0.000820580
+accept  -200 -100
+expect  -0.001953415 -0.000820580
+
+
+===============================================================================
+Mercator
+	Cyl, Sph&Ell
+	lat_ts=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=merc   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222638.981586547 110579.965218250
+accept  2 -1
+expect  222638.981586547 -110579.965218249
+accept  -2 1
+expect  -222638.981586547 110579.965218250
+accept  -2 -1
+expect  -222638.981586547 -110579.965218249
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=merc   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 111706.743574944
+accept  2 -1
+expect  223402.144255274 -111706.743574944
+accept  -2 1
+expect  -223402.144255274 111706.743574944
+accept  -2 -1
+expect  -223402.144255274 -111706.743574944
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Miller Oblated Stereographic
+	Azi(mod)
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=mil_os   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  -1908527.949594205 -1726237.473061448
+accept  2 -1
+expect  -1916673.022918485 -1943133.888125523
+accept  -2 1
+expect  -2344429.412089623 -1706258.051218912
+accept  -2 -1
+expect  -2354637.835532999 -1926468.605135417
+
+direction inverse
+accept  200 100
+expect  20.002036394 18.000968347
+accept  200 -100
+expect  20.002036372 17.999031632
+accept  -200 100
+expect  19.997963606 18.000968347
+accept  -200 -100
+expect  19.997963628 17.999031632
+
+
+===============================================================================
+Miller Cylindrical
+	Cyl, Sph
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=mill   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 111704.701754394
+accept  2 -1
+expect  223402.144255274 -111704.701754396
+accept  -2 1
+expect  -223402.144255274 111704.701754394
+accept  -2 -1
+expect  -223402.144255274 -111704.701754396
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Space oblique for MISR
+	Cyl, Sph&Ell
+	path=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=misrsom   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +path=1
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  18556630.368369825 9533394.675311271
+accept  2 -1
+expect  19041866.006729737 9707182.175323525
+accept  -2 1
+expect  18816810.130184799 8647669.649802955
+accept  -2 -1
+expect  19252610.784536730 8778164.085801404
+
+direction inverse
+accept  200 100
+expect  127.759503988 0.001735150
+accept  200 -100
+expect  127.761295471 0.001871966
+accept  -200 100
+expect  127.759775774 -0.001871966
+accept  -200 -100
+expect  127.761567257 -0.001735150
+
+-------------------------------------------------------------------------------
+operation +proj=misrsom   +R=6400000    +lat_1=0.5 +lat_2=2 +path=1
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  18641249.279170386 9563342.532334166
+accept  2 -1
+expect  19130982.461581279 9739539.593504636
+accept  -2 1
+expect  18903483.515011538 8675064.500617975
+accept  -2 -1
+expect  19343388.399800610 8807471.904068489
+
+direction inverse
+accept  200 100
+expect  127.759505148 0.001716231
+accept  200 -100
+expect  127.761290324 0.001854121
+accept  -200 100
+expect  127.759780921 -0.001854121
+accept  -200 -100
+expect  127.761566096 -0.001716231
+
+
+===============================================================================
+Mollweide
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=moll   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  201113.698641813 124066.283433860
+accept  2 -1
+expect  201113.698641813 -124066.283433860
+accept  -2 1
+expect  -201113.698641813 124066.283433860
+accept  -2 -1
+expect  -201113.698641813 -124066.283433860
+
+direction inverse
+accept  200 100
+expect  0.001988738 0.000806005
+accept  200 -100
+expect  0.001988738 -0.000806005
+accept  -200 100
+expect  -0.001988738 0.000806005
+accept  -200 -100
+expect  -0.001988738 -0.000806005
+
+
+===============================================================================
+Murdoch I
+	Conic, Sph
+	lat_1= and lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=murd1   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222600.813473554 111404.244180546
+accept  2 -1
+expect  222770.349287864 -111234.672856675
+accept  -2 1
+expect  -222600.813473554 111404.244180546
+accept  -2 -1
+expect  -222770.349287864 -111234.672856675
+
+direction inverse
+accept  200 100
+expect  0.001796255 0.000898315
+accept  200 -100
+expect  0.001796254 -0.000898316
+accept  -200 100
+expect  -0.001796255 0.000898315
+accept  -200 -100
+expect  -0.001796254 -0.000898316
+
+-------------------------------------------------------------------------------
+operation +proj=murd1   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223363.845309492 111786.116032863
+accept  2 -1
+expect  223533.962259251 -111615.963451823
+accept  -2 1
+expect  -223363.845309492 111786.116032863
+accept  -2 -1
+expect  -223533.962259251 -111615.963451823
+
+direction inverse
+accept  200 100
+expect  0.001790119 0.000895246
+accept  200 -100
+expect  0.001790118 -0.000895247
+accept  -200 100
+expect  -0.001790119 0.000895246
+accept  -200 -100
+expect  -0.001790118 -0.000895247
+
+
+===============================================================================
+Murdoch II
+	Conic, Sph
+	lat_1= and lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=murd2   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222588.099751230 111426.140027412
+accept  2 -1
+expect  222757.726267018 -111341.431317505
+accept  -2 1
+expect  -222588.099751230 111426.140027412
+accept  -2 -1
+expect  -222757.726267018 -111341.431317505
+
+direction inverse
+accept  200 100
+expect  0.001796357 0.000897887
+accept  200 -100
+expect  0.001796356 -0.000897888
+accept  -200 100
+expect  -0.001796357 0.000897887
+accept  -200 -100
+expect  -0.001796356 -0.000897888
+
+-------------------------------------------------------------------------------
+operation +proj=murd2   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223351.088007027 111808.086934388
+accept  2 -1
+expect  223521.295969170 -111723.087859673
+accept  -2 1
+expect  -223351.088007027 111808.086934388
+accept  -2 -1
+expect  -223521.295969170 -111723.087859673
+
+direction inverse
+accept  200 100
+expect  0.001790221 0.000894820
+accept  200 -100
+expect  0.001790220 -0.000894821
+accept  -200 100
+expect  -0.001790221 0.000894820
+accept  -200 -100
+expect  -0.001790220 -0.000894821
+
+
+===============================================================================
+Murdoch III
+	Conic, Sph
+	lat_1= and lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=murd3   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222600.814077577 111404.246601372
+accept  2 -1
+expect  222770.354733899 -111234.670432178
+accept  -2 1
+expect  -222600.814077577 111404.246601372
+accept  -2 -1
+expect  -222770.354733899 -111234.670432178
+
+direction inverse
+accept  200 100
+expect  0.001796255 0.000898315
+accept  200 -100
+expect  0.001796254 -0.000898316
+accept  -200 100
+expect  -0.001796255 0.000898315
+accept  -200 -100
+expect  -0.001796254 -0.000898316
+
+-------------------------------------------------------------------------------
+operation +proj=murd3   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223363.845915585 111786.118461987
+accept  2 -1
+expect  223533.967723953 -111615.961019015
+accept  -2 1
+expect  -223363.845915585 111786.118461987
+accept  -2 -1
+expect  -223533.967723953 -111615.961019015
+
+direction inverse
+accept  200 100
+expect  0.001790119 0.000895246
+accept  200 -100
+expect  0.001790118 -0.000895247
+accept  -200 100
+expect  -0.001790119 0.000895246
+accept  -200 -100
+expect  -0.001790118 -0.000895247
+
+
+===============================================================================
+Natural Earth
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=natearth   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  194507.265257889 112508.737358295
+accept  2 -1
+expect  194507.265257889 -112508.737358295
+accept  -2 1
+expect  -194507.265257889 112508.737358295
+accept  -2 -1
+expect  -194507.265257889 -112508.737358295
+
+direction inverse
+accept  200 100
+expect  0.002056383 0.000888824
+accept  200 -100
+expect  0.002056383 -0.000888824
+accept  -200 100
+expect  -0.002056383 0.000888824
+accept  -200 -100
+expect  -0.002056383 -0.000888824
+
+
+===============================================================================
+Natural Earth 2
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=natearth2   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  189255.172934731 113022.495810907
+accept  2 -1
+expect  189255.172934731 -113022.495810907
+accept  -2 1
+expect  -189255.172934731 113022.495810907
+accept  -2 -1
+expect  -189255.172934731 -113022.495810907
+
+direction inverse
+accept  200 100
+expect  0.002113449 0.000884780
+accept  200 -100
+expect  0.002113449 -0.000884780
+accept  -200 100
+expect  -0.002113449 0.000884780
+accept  -200 -100
+expect  -0.002113449 -0.000884780
+
+
+===============================================================================
+Nell
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=nell   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223385.132504696 111698.236447187
+accept  2 -1
+expect  223385.132504696 -111698.236447187
+accept  -2 1
+expect  -223385.132504696 111698.236447187
+accept  -2 -1
+expect  -223385.132504696 -111698.236447187
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Nell-Hammer
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=nell_h   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223385.131640953 111698.236533562
+accept  2 -1
+expect  223385.131640953 -111698.236533562
+accept  -2 1
+expect  -223385.131640953 111698.236533562
+accept  -2 -1
+expect  -223385.131640953 -111698.236533562
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Nicolosi Globular
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=nicol   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223374.561814140 111732.553988545
+accept  2 -1
+expect  223374.561814140 -111732.553988545
+accept  -2 1
+expect  -223374.561814140 111732.553988545
+accept  -2 -1
+expect  -223374.561814140 -111732.553988545
+
+
+===============================================================================
+Near-sided perspective
+	Azi, Sph
+	h=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=nsper   +a=6400000  +h=1000000
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222239.816114100 111153.763991925
+accept  2 -1
+expect  222239.816114100 -111153.763991925
+accept  -2 1
+expect  -222239.816114100 111153.763991925
+accept  -2 -1
+expect  -222239.816114100 -111153.763991925
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+New Zealand Map Grid
+	fixed Earth
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=nzmg   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.010 mm
+accept  2 1
+expect  3352675144.747425100 -7043205391.100243600
+accept  2 -1
+expect  3691989502.779306400 -6729069415.332104700
+accept  -2 1
+expect  4099000768.453238500 -7863208779.667248700
+accept  -2 -1
+expect  4466166927.369976000 -7502531736.628604900
+
+direction inverse
+accept  200000.000000000 100000.000000000
+expect  175.482086827 -69.422692183
+accept  200000.000000000 -100000.000000000
+expect  175.756819473 -69.533571088
+accept  -200000.000000000 100000.000000000
+expect  134.605119233 -61.459995711
+accept  -200000.000000000 -100000.000000000
+expect  134.333684316 -61.621553676
+
+
+===============================================================================
+General Oblique Transformation
+	Misc Sph
+	o_proj= plus parameters for projection
+	o_lat_p= o_lon_p= (new pole) or
+	o_alpha= o_lon_c= o_lat_c= or
+	o_lon_1= o_lat_1= o_lon_2= o_lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=ob_tran +R=6400000 +o_proj=latlon +o_lon_p=20 +o_lat_p=20 +lon_0=180
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  -2.685687214 1.237430235
+accept  2 -1
+expect  -2.695406975 1.202683395
+accept  -2 1
+expect  -2.899366393 1.237430235
+accept  -2 -1
+expect  -2.889646631 1.202683395
+
+direction inverse
+accept  200 100
+expect  121.551874841 -2.536100157
+accept  200 -100
+expect  63.261184340 17.585319579
+accept  -200 100
+expect  -141.100733224 26.091712305
+accept  -200 -100
+expect  -65.862385599 51.830295078
+
+
+===============================================================================
+Oblique Cylindrical Equal Area
+	Cyl, Sphlonc= alpha= or
+	lat_1= lat_2= lon_1= lon_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=ocea   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  19994423.837934088 223322.760576728
+accept  2 -1
+expect  20217962.128015257 223322.760576729
+accept  -2 1
+expect  19994423.837934092 -223322.760576727
+accept  -2 -1
+expect  20217962.128015265 -223322.760576725
+
+direction inverse
+accept  200 100
+expect  179.999104753 0.001790493
+accept  200 -100
+expect  -179.999104753 0.001790493
+accept  -200 100
+expect  179.999104753 -0.001790493
+accept  -200 -100
+expect  -179.999104753 -0.001790493
+
+
+===============================================================================
+Oblated Equal Area
+	Misc Sph
+	n= m= theta=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=oea   +a=6400000    +lat_1=0.5 +lat_2=2 +n=1 +m=2 +theta=3
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  228926.872097864 99870.488430076
+accept  2 -1
+expect  217242.584036940 -123247.885607475
+accept  -2 1
+expect  -217242.584036940 123247.885607475
+accept  -2 -1
+expect  -228926.872097864 -99870.488430076
+
+direction inverse
+accept  200 100
+expect  0.001741186 0.000987727
+accept  200 -100
+expect  0.001834893 -0.000800312
+accept  -200 100
+expect  -0.001834893 0.000800312
+accept  -200 -100
+expect  -0.001741186 -0.000987727
+
+
+===============================================================================
+Oblique Mercator
+	Cyl, Sph&Ell no_rot
+	alpha= [gamma=] [no_off] lonc= or
+	 lon_1= lat_1= lon_2= lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=omerc   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222650.796885261 110642.229314984
+accept  2 -1
+expect  222650.796885261 -110642.229314984
+accept  -2 1
+expect  -222650.796885262 110642.229314984
+accept  -2 -1
+expect  -222650.796885262 -110642.229314984
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+
+===============================================================================
+Ortelius Oval
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=ortel   +a=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223374.577355253 111701.072127637
+accept  2 -1
+expect  223374.577355253 -111701.072127637
+accept  -2 1
+expect  -223374.577355253 111701.072127637
+accept  -2 -1
+expect  -223374.577355253 -111701.072127637
+
+
+===============================================================================
+Orthographic
+	Azi, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=ortho   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223322.760576727 111695.401198614
+accept  2 -1
+expect  223322.760576727 -111695.401198614
+accept  -2 1
+expect  -223322.760576727 111695.401198614
+accept  -2 -1
+expect  -223322.760576727 -111695.401198614
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Perspective Conic
+	Conic, Sph
+	lat_1= and lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=pconic   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222588.098841617 111416.604770067
+accept  2 -1
+expect  222757.718091090 -111331.881531080
+accept  -2 1
+expect  -222588.098841617 111416.604770067
+accept  -2 -1
+expect  -222757.718091090 -111331.881531080
+
+direction inverse
+accept  200 100
+expect  0.001796358 0.000897964
+accept  200 -100
+expect  0.001796356 -0.000897965
+accept  -200 100
+expect  -0.001796358 0.000897964
+accept  -200 -100
+expect  -0.001796356 -0.000897965
+
+-------------------------------------------------------------------------------
+operation +proj=pconic   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223351.087094295 111798.518992055
+accept  2 -1
+expect  223521.287765217 -111713.505338457
+accept  -2 1
+expect  -223351.087094295 111798.518992055
+accept  -2 -1
+expect  -223521.287765217 -111713.505338457
+
+direction inverse
+accept  200 100
+expect  0.001790221 0.000894897
+accept  200 -100
+expect  0.001790220 -0.000894897
+accept  -200 100
+expect  -0.001790221 0.000894897
+accept  -200 -100
+expect  -0.001790220 -0.000894897
+
+
+===============================================================================
+Patterson Cylindrical
+	Cyl.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=patterson   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 113354.250397780
+accept  2 -1
+expect  223402.144255274 -113354.250397780
+accept  -2 1
+expect  -223402.144255274 113354.250397780
+accept  -2 -1
+expect  -223402.144255274 -113354.250397780
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000882190
+accept  200 -100
+expect  0.001790493 -0.000882190
+accept  -200 100
+expect  -0.001790493 0.000882190
+accept  -200 -100
+expect  -0.001790493 -0.000882190
+
+
+===============================================================================
+Polyconic (American)
+	Conic, Sph&Ell
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=poly   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222605.285770237 110642.194561440
+accept  2 -1
+expect  222605.285770237 -110642.194561440
+accept  -2 1
+expect  -222605.285770237 110642.194561440
+accept  -2 -1
+expect  -222605.285770237 -110642.194561440
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=poly   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223368.105210219 111769.110491225
+accept  2 -1
+expect  223368.105210219 -111769.110491225
+accept  -2 1
+expect  -223368.105210219 111769.110491225
+accept  -2 -1
+expect  -223368.105210219 -111769.110491225
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Putnins P1
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=putp1   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  211642.762754160 105831.180787330
+accept  2 -1
+expect  211642.762754160 -105831.180787330
+accept  -2 1
+expect  -211642.762754160 105831.180787330
+accept  -2 -1
+expect  -211642.762754160 -105831.180787330
+
+direction inverse
+accept  200 100
+expect  0.001889802 0.000944901
+accept  200 -100
+expect  0.001889802 -0.000944901
+accept  -200 100
+expect  -0.001889802 0.000944901
+accept  -200 -100
+expect  -0.001889802 -0.000944901
+
+
+===============================================================================
+Putnins P2
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=putp2   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  211638.039634339 117895.033043380
+accept  2 -1
+expect  211638.039634339 -117895.033043380
+accept  -2 1
+expect  -211638.039634339 117895.033043380
+accept  -2 -1
+expect  -211638.039634339 -117895.033043380
+
+direction inverse
+accept  200 100
+expect  0.001889802 0.000848202
+accept  200 -100
+expect  0.001889802 -0.000848202
+accept  -200 100
+expect  -0.001889802 0.000848202
+accept  -200 -100
+expect  -0.001889802 -0.000848202
+
+
+===============================================================================
+Putnins P3
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=putp3   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  178227.115507794 89124.560786088
+accept  2 -1
+expect  178227.115507794 -89124.560786088
+accept  -2 1
+expect  -178227.115507794 89124.560786088
+accept  -2 -1
+expect  -178227.115507794 -89124.560786088
+
+direction inverse
+accept  200 100
+expect  0.002244050 0.001122025
+accept  200 -100
+expect  0.002244050 -0.001122025
+accept  -200 100
+expect  -0.002244050 0.001122025
+accept  -200 -100
+expect  -0.002244050 -0.001122025
+
+
+===============================================================================
+Putnins P3'
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=putp3p   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  178238.118539985 89124.560786088
+accept  2 -1
+expect  178238.118539985 -89124.560786088
+accept  -2 1
+expect  -178238.118539985 89124.560786088
+accept  -2 -1
+expect  -178238.118539985 -89124.560786088
+
+direction inverse
+accept  200 100
+expect  0.002244050 0.001122025
+accept  200 -100
+expect  0.002244050 -0.001122025
+accept  -200 100
+expect  -0.002244050 0.001122025
+accept  -200 -100
+expect  -0.002244050 -0.001122025
+
+
+===============================================================================
+Putnins P4'
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=putp4p   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  195241.477349386 127796.782307926
+accept  2 -1
+expect  195241.477349386 -127796.782307926
+accept  -2 1
+expect  -195241.477349386 127796.782307926
+accept  -2 -1
+expect  -195241.477349386 -127796.782307926
+
+direction inverse
+accept  200 100
+expect  0.002048528 0.000782480
+accept  200 -100
+expect  0.002048528 -0.000782480
+accept  -200 100
+expect  -0.002048528 0.000782480
+accept  -200 -100
+expect  -0.002048528 -0.000782480
+
+
+===============================================================================
+Putnins P5
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=putp5   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  226367.213380562 113204.568558475
+accept  2 -1
+expect  226367.213380562 -113204.568558475
+accept  -2 1
+expect  -226367.213380562 113204.568558475
+accept  -2 -1
+expect  -226367.213380562 -113204.568558475
+
+direction inverse
+accept  200 100
+expect  0.001766713 0.000883357
+accept  200 -100
+expect  0.001766713 -0.000883357
+accept  -200 100
+expect  -0.001766713 0.000883357
+accept  -200 -100
+expect  -0.001766713 -0.000883357
+
+
+===============================================================================
+Putnins P5'
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=putp5p   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  226388.175248756 113204.568558475
+accept  2 -1
+expect  226388.175248756 -113204.568558475
+accept  -2 1
+expect  -226388.175248756 113204.568558475
+accept  -2 -1
+expect  -226388.175248756 -113204.568558475
+
+direction inverse
+accept  200 100
+expect  0.001766713 0.000883357
+accept  200 -100
+expect  0.001766713 -0.000883357
+accept  -200 100
+expect  -0.001766713 0.000883357
+accept  -200 -100
+expect  -0.001766713 -0.000883357
+
+
+===============================================================================
+Putnins P6
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=putp6   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  226369.395133403 110218.523796521
+accept  2 -1
+expect  226369.395133403 -110218.523796521
+accept  -2 1
+expect  -226369.395133403 110218.523796521
+accept  -2 -1
+expect  -226369.395133403 -110218.523796521
+
+direction inverse
+accept  200 100
+expect  0.001766713 0.000907296
+accept  200 -100
+expect  0.001766713 -0.000907296
+accept  -200 100
+expect  -0.001766713 0.000907296
+accept  -200 -100
+expect  -0.001766713 -0.000907296
+
+
+===============================================================================
+Putnins P6'
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=putp6p   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  198034.195132195 125989.475461323
+accept  2 -1
+expect  198034.195132195 -125989.475461323
+accept  -2 1
+expect  -198034.195132195 125989.475461323
+accept  -2 -1
+expect  -198034.195132195 -125989.475461323
+
+direction inverse
+accept  200 100
+expect  0.002019551 0.000793716
+accept  200 -100
+expect  0.002019551 -0.000793716
+accept  -200 100
+expect  -0.002019551 0.000793716
+accept  -200 -100
+expect  -0.002019551 -0.000793716
+
+
+===============================================================================
+Quartic Authalic
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=qua_aut   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222613.549033097 111318.077887984
+accept  2 -1
+expect  222613.549033097 -111318.077887984
+accept  -2 1
+expect  -222613.549033097 111318.077887984
+accept  -2 -1
+expect  -222613.549033097 -111318.077887984
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000898315
+accept  200 -100
+expect  0.001796631 -0.000898315
+accept  -200 100
+expect  -0.001796631 0.000898315
+accept  -200 -100
+expect  -0.001796631 -0.000898315
+
+-------------------------------------------------------------------------------
+operation +proj=qua_aut   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223376.624524029 111699.654379186
+accept  2 -1
+expect  223376.624524029 -111699.654379186
+accept  -2 1
+expect  -223376.624524029 111699.654379186
+accept  -2 -1
+expect  -223376.624524029 -111699.654379186
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Quadrilateralized Spherical Cube
+	Azi, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=qsc   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  304638.450843852 164123.870923794
+accept  2 -1
+expect  304638.450843852 -164123.870923794
+accept  -2 1
+expect  -304638.450843852 164123.870923794
+accept  -2 -1
+expect  -304638.450843852 -164123.870923794
+
+direction inverse
+accept  200 100
+expect  0.001321341 0.000610653
+accept  200 -100
+expect  0.001321341 -0.000610653
+accept  -200 100
+expect  -0.001321341 0.000610653
+accept  -200 -100
+expect  -0.001321341 -0.000610653
+
+-------------------------------------------------------------------------------
+operation +proj=qsc   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  305863.792402891 165827.722754715
+accept  2 -1
+expect  305863.792402891 -165827.722754715
+accept  -2 1
+expect  -305863.792402891 165827.722754715
+accept  -2 -1
+expect  -305863.792402891 -165827.722754715
+
+direction inverse
+accept  200 100
+expect  0.001316827 0.000604493
+accept  200 -100
+expect  0.001316827 -0.000604493
+accept  -200 100
+expect  -0.001316827 0.000604493
+accept  -200 -100
+expect  -0.001316827 -0.000604493
+
+
+===============================================================================
+Robinson
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=robin   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  189588.423282508 107318.530350703
+accept  2 -1
+expect  189588.423282508 -107318.530350703
+accept  -2 1
+expect  -189588.423282508 107318.530350703
+accept  -2 -1
+expect  -189588.423282508 -107318.530350703
+
+direction inverse
+accept  200 100
+expect  0.002109689 0.000931806
+accept  200 -100
+expect  0.002109689 -0.000931806
+accept  -200 100
+expect  -0.002109689 0.000931806
+accept  -200 -100
+expect  -0.002109689 -0.000931806
+
+
+===============================================================================
+Roussilhe Stereographic
+	Azi., Ellps.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=rouss   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222644.894131617 110611.091868370
+accept  2 -1
+expect  222644.894131617 -110611.091868370
+accept  -2 1
+expect  -222644.894131617 110611.091868370
+accept  -2 -1
+expect  -222644.894131617 -110611.091868370
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+
+===============================================================================
+Rectangular Polyconic
+	Conic, Sph., no inv.
+	lat_ts=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=rpoly   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223368.098302014 111769.110486991
+accept  2 -1
+expect  223368.098302014 -111769.110486991
+accept  -2 1
+expect  -223368.098302014 111769.110486991
+accept  -2 -1
+expect  -223368.098302014 -111769.110486991
+
+
+===============================================================================
+Sinusoidal (Sanson-Flamsteed)
+	PCyl, Sph&Ell
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=sinu   +ellps=GRS80  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222605.299539466 110574.388554153
+accept  2 -1
+expect  222605.299539466 -110574.388554153
+accept  -2 1
+expect  -222605.299539466 110574.388554153
+accept  -2 -1
+expect  -222605.299539466 -110574.388554153
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=sinu   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223368.119026632 111701.072127637
+accept  2 -1
+expect  223368.119026632 -111701.072127637
+accept  -2 1
+expect  -223368.119026632 111701.072127637
+accept  -2 -1
+expect  -223368.119026632 -111701.072127637
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Swiss. Obl. Mercator
+	Cyl, Ell
+	For CH1903
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=somerc   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222638.981586547 110579.965218249
+accept  2 -1
+expect  222638.981586547 -110579.965218251
+accept  -2 1
+expect  -222638.981586547 110579.965218249
+accept  -2 -1
+expect  -222638.981586547 -110579.965218251
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=somerc   +R=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223402.144255274 111706.743574944
+accept  2 -1
+expect  223402.144255274 -111706.743574945
+accept  -2 1
+expect  -223402.144255274 111706.743574944
+accept  -2 -1
+expect  -223402.144255274 -111706.743574945
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Stereographic
+	Azi, Sph&Ell
+	lat_ts=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=stere   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222644.854550117 110610.883474174
+accept  2 -1
+expect  222644.854550117 -110610.883474174
+accept  -2 1
+expect  -222644.854550117 110610.883474174
+accept  -2 -1
+expect  -222644.854550117 -110610.883474174
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=stere   +R=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223407.810259507 111737.938996443
+accept  2 -1
+expect  223407.810259507 -111737.938996443
+accept  -2 1
+expect  -223407.810259507 111737.938996443
+accept  -2 -1
+expect  -223407.810259507 -111737.938996443
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Oblique Stereographic Alternative
+	Azimuthal, Sph&Ell
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=sterea   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222644.894109198 110611.091871737
+accept  2 -1
+expect  222644.894109198 -110611.091871738
+accept  -2 1
+expect  -222644.894109198 110611.091871737
+accept  -2 -1
+expect  -222644.894109198 -110611.091871738
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=sterea   +R=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223407.810259507 111737.938996443
+accept  2 -1
+expect  223407.810259507 -111737.938996443
+accept  -2 1
+expect  -223407.810259507 111737.938996443
+accept  -2 -1
+expect  -223407.810259507 -111737.938996443
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
+	Cyl, Sph&Ell
+	lat_0= lon_0= k_0=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=gstmerc   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223413.466406322 111769.145040586
+accept  2 -1
+expect  223413.466406322 -111769.145040587
+accept  -2 1
+expect  -223413.466406323 111769.145040586
+accept  -2 -1
+expect  -223413.466406323 -111769.145040587
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Transverse Central Cylindrical
+	Cyl, Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=tcc   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223458.844192458 111769.145040586
+accept  2 -1
+expect  223458.844192458 -111769.145040586
+accept  -2 1
+expect  -223458.844192458 111769.145040586
+accept  -2 -1
+expect  -223458.844192458 -111769.145040586
+
+
+===============================================================================
+Transverse Cylindrical Equal Area
+	Cyl, Sph
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=tcea   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223322.760576727 111769.145040586
+accept  2 -1
+expect  223322.760576727 -111769.145040586
+accept  -2 1
+expect  -223322.760576727 111769.145040586
+accept  -2 -1
+expect  -223322.760576727 -111769.145040586
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Times
+	Cyl, Sph
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=times +ellps=sphere
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  0.000000000 0.000000000
+expect  0.000000000 0.000000000
+accept  80.000000000 70.000000000
+expect  5785183.576067096 7615452.066120422
+accept  25.000000000 -10.000000000
+expect  2065971.530107881 -951526.064849459
+accept  -35.000000000 20.000000000
+expect  -2873054.045485095 1917730.953000521
+accept  -45.000000000 -30.000000000
+expect  -3651383.203521487 -2914213.457815921
+
+direction inverse
+accept  0.000000000 0.000000000
+expect  0.000000000 0.000000000
+accept  5785183.576067096 7615452.066120422
+expect  80.000000000 70.000000000
+accept  2065971.530107881 -951526.064849459
+expect  25.000000000 -10.000000000
+accept  -2873054.045485095 1917730.953000521
+expect  -35.000000000 20.000000000
+accept  -3651383.203521487 -2914213.457815921
+expect  -45.000000000 -30.000000000
+
+
+===============================================================================
+Tissot
+	Conic, Sph
+	lat_1= and lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=tissot   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222641.078699631 54347.828487281
+accept  2 -1
+expect  222810.614513941 -168291.088549939
+accept  -2 1
+expect  -222641.078699631 54347.828487281
+accept  -2 -1
+expect  -222810.614513941 -168291.088549939
+
+direction inverse
+accept  200 100
+expect  0.001796281 0.513444955
+accept  200 -100
+expect  0.001796279 0.511648325
+accept  -200 100
+expect  -0.001796281 0.513444955
+accept  -200 -100
+expect  -0.001796279 0.511648325
+
+-------------------------------------------------------------------------------
+operation +proj=tissot   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223404.248556849 54534.122161158
+accept  2 -1
+expect  223574.365506608 -168867.957323528
+accept  -2 1
+expect  -223404.248556849 54534.122161158
+accept  -2 -1
+expect  -223574.365506608 -168867.957323528
+
+direction inverse
+accept  200 100
+expect  0.001790144 0.513441886
+accept  200 -100
+expect  0.001790143 0.511651393
+accept  -200 100
+expect  -0.001790144 0.513441886
+accept  -200 -100
+expect  -0.001790143 0.511651393
+
+
+===============================================================================
+Transverse Mercator
+	Cyl, Sph&Ell
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=tmerc   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222650.796795778 110642.229411927
+accept  2 -1
+expect  222650.796795778 -110642.229411927
+accept  -2 1
+expect  -222650.796795778 110642.229411927
+accept  -2 -1
+expect  -222650.796795778 -110642.229411927
+
+direction inverse
+accept  200 100
+expect  0.001796631 0.000904369
+accept  200 -100
+expect  0.001796631 -0.000904369
+accept  -200 100
+expect  -0.001796631 0.000904369
+accept  -200 -100
+expect  -0.001796631 -0.000904369
+
+-------------------------------------------------------------------------------
+operation +proj=tmerc   +R=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223413.466406322 111769.145040597
+accept  2 -1
+expect  223413.466406322 -111769.145040597
+accept  -2 1
+expect  -223413.466406322 111769.145040597
+accept  -2 -1
+expect  -223413.466406322 -111769.145040597
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Two Point Equidistant
+	Misc Sph
+	lat_1= lon_1= lat_2= lon_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=tpeqd   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  -27750.758831679 -222599.403691777
+accept  2 -1
+expect  -250434.937024036 -222655.938193266
+accept  -2 1
+expect  -27750.758831679 222599.403691777
+accept  -2 -1
+expect  -250434.937024036 222655.938193266
+
+direction inverse
+accept  200 100
+expect  -0.000898556 1.251796630
+accept  200 -100
+expect  0.000898556 1.251796630
+accept  -200 100
+expect  -0.000898554 1.248203369
+accept  -200 -100
+expect  0.000898554 1.248203369
+
+-------------------------------------------------------------------------------
+operation +proj=tpeqd   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  -27845.882978485 -223362.430695260
+accept  2 -1
+expect  -251293.378764651 -223419.158985908
+accept  -2 1
+expect  -27845.882978485 223362.430695260
+accept  -2 -1
+expect  -251293.378764651 223419.158985908
+
+direction inverse
+accept  200 100
+expect  -0.000895486 1.251790493
+accept  200 -100
+expect  0.000895486 1.251790493
+accept  -200 100
+expect  -0.000895485 1.248209507
+accept  -200 -100
+expect  0.000895485 1.248209507
+
+
+===============================================================================
+Tilted perspective
+	Azi, Sph
+	tilt= azi= h=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=tpers   +a=6400000  +h=1000000 +azi=20
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  170820.288955531 180460.865555805
+accept  2 -1
+expect  246853.941538942 -28439.878035775
+accept  -2 1
+expect  -246853.941538942 28439.878035775
+accept  -2 -1
+expect  -170820.288955531 -180460.865555805
+
+direction inverse
+accept  200 100
+expect  0.001988706 0.000228872
+accept  200 -100
+expect  0.001376321 -0.001453641
+accept  -200 100
+expect  -0.001376321 0.001453641
+accept  -200 -100
+expect  -0.001988706 -0.000228872
+
+
+===============================================================================
+Universal Polar Stereographic
+	Azi, Sph&Ell
+	south
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=ups   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  2433455.563438467 -10412543.301512826
+accept  2 -1
+expect  2448749.118568199 -10850493.419804076
+accept  -2 1
+expect  1566544.436561533 -10412543.301512826
+accept  -2 -1
+expect  1551250.881431801 -10850493.419804076
+
+direction inverse
+accept  200 100
+expect  -44.998567498 64.918236287
+accept  200 -100
+expect  -44.995702709 64.917020251
+accept  -200 100
+expect  -45.004297076 64.915804281
+accept  -200 -100
+expect  -45.001432287 64.914588378
+
+
+===============================================================================
+Urmaev V
+	PCyl., Sph., no inv.
+	n= q= alpha=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=urm5   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223393.638433964 111696.818785117
+accept  2 -1
+expect  223393.638433964 -111696.818785117
+accept  -2 1
+expect  -223393.638433964 111696.818785117
+accept  -2 -1
+expect  -223393.638433964 -111696.818785117
+
+
+===============================================================================
+Urmaev Flat-Polar Sinusoidal
+	PCyl, Sph.
+	n=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=urmfps   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  196001.708134192 127306.843329993
+accept  2 -1
+expect  196001.708134192 -127306.843329993
+accept  -2 1
+expect  -196001.708134192 127306.843329993
+accept  -2 -1
+expect  -196001.708134192 -127306.843329993
+
+direction inverse
+accept  200 100
+expect  0.002040721 0.000785474
+accept  200 -100
+expect  0.002040721 -0.000785474
+accept  -200 100
+expect  -0.002040721 0.000785474
+accept  -200 -100
+expect  -0.002040721 -0.000785474
+
+
+===============================================================================
+Universal Transverse Mercator (UTM)
+	Cyl, Sph
+	zone= south
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=utm   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5 +zone=30
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  1057002.405491298 110955.141175949
+accept  2 -1
+expect  1057002.405491298 -110955.141175949
+accept  -2 1
+expect  611263.812278905 110547.105696804
+accept  -2 -1
+expect  611263.812278905 -110547.105696804
+
+direction inverse
+accept  200 100
+expect  -7.486952083 0.000901940
+accept  200 -100
+expect  -7.486952083 -0.000901940
+accept  -200 100
+expect  -7.490535682 0.000901935
+accept  -200 -100
+expect  -7.490535682 -0.000901935
+
+
+===============================================================================
+van der Grinten (I)
+	Misc Sph
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=vandg   +a=6400000    +lat_1=0.5 +lat_2=2 +no_defs
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223395.249543407 111704.596633675
+rem     223395.249543407 111704.596633675    osgeo
+rem	    223395.249543407 111704.596633675    debug/bin
+
+
+accept  2 -1
+expect  223395.249543407 -111704.596633675
+accept  -2 1
+expect  -223395.249543407 111704.596633675
+accept  -2 -1
+expect  -223395.249543407 -111704.596633675
+
+direction inverse
+accept  200 100
+expect  0.001790494 0.000895247
+accept  200 -100
+expect  0.001790494 -0.000895247
+accept  -200 100
+expect  -0.001790494 0.000895247
+accept  -200 -100
+expect  -0.001790494 -0.000895247
+
+
+===============================================================================
+van der Grinten II
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=vandg2   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223395.247850437 111718.491037226
+accept  2 -1
+expect  223395.247850437 -111718.491037226
+accept  -2 1
+expect  -223395.247850437 111718.491037226
+accept  -2 -1
+expect  -223395.247850437 -111718.491037226
+
+
+===============================================================================
+van der Grinten III
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=vandg3   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223395.249552831 111704.519904421
+accept  2 -1
+expect  223395.249552831 -111704.519904421
+accept  -2 1
+expect  -223395.249552831 111704.519904421
+accept  -2 -1
+expect  -223395.249552831 -111704.519904421
+
+
+===============================================================================
+van der Grinten IV
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=vandg4   +R=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.01 mm
+accept  2 1
+expect  223374.577294355 111701.195484154
+accept  2 -1
+expect  223374.577294355 -111701.195484154
+accept  -2 1
+expect  -223374.577294355 111701.195484154
+accept  -2 -1
+expect  -223374.577294355 -111701.195484154
+
+
+===============================================================================
+Vitkovsky I
+	Conic, Sph
+	lat_1= and lat_2=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=vitk1   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  222607.171211458 111404.251442435
+accept  2 -1
+expect  222776.716709598 -111234.665587445
+accept  -2 1
+expect  -222607.171211458 111404.251442435
+accept  -2 -1
+expect  -222776.716709598 -111234.665587445
+
+direction inverse
+accept  200 100
+expect  0.001796204 0.000898315
+accept  200 -100
+expect  0.001796202 -0.000898316
+accept  -200 100
+expect  -0.001796204 0.000898315
+accept  -200 -100
+expect  -0.001796202 -0.000898316
+
+-------------------------------------------------------------------------------
+operation +proj=vitk1   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223370.224840471 111786.123319644
+accept  2 -1
+expect  223540.351507255 -111615.956157675
+accept  -2 1
+expect  -223370.224840471 111786.123319644
+accept  -2 -1
+expect  -223540.351507255 -111615.956157675
+
+direction inverse
+accept  200 100
+expect  0.001790068 0.000895246
+accept  200 -100
+expect  0.001790066 -0.000895247
+accept  -200 100
+expect  -0.001790068 0.000895246
+accept  -200 -100
+expect  -0.001790066 -0.000895247
+
+
+===============================================================================
+Wagner I (Kavraisky VI)
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wag1   +a=6400000    +lat_1=0.5 +lat_2=2 +n=0.5
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  195986.781561158 127310.075060660
+accept  2 -1
+expect  195986.781561158 -127310.075060660
+accept  -2 1
+expect  -195986.781561158 127310.075060660
+accept  -2 -1
+expect  -195986.781561158 -127310.075060660
+
+direction inverse
+accept  200 100
+expect  0.002040721 0.000785474
+accept  200 -100
+expect  0.002040721 -0.000785474
+accept  -200 100
+expect  -0.002040721 0.000785474
+accept  -200 -100
+expect  -0.002040721 -0.000785474
+
+
+===============================================================================
+Wagner II
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wag2   +a=6400000  +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  206589.888099962 120778.040357547
+accept  2 -1
+expect  206589.888099962 -120778.040357547
+accept  -2 1
+expect  -206589.888099962 120778.040357547
+accept  -2 -1
+expect  -206589.888099962 -120778.040357547
+
+direction inverse
+accept  200 100
+expect  0.001936024 0.000827958
+accept  200 -100
+expect  0.001936024 -0.000827958
+accept  -200 100
+expect  -0.001936024 0.000827958
+accept  -200 -100
+expect  -0.001936024 -0.000827958
+
+
+===============================================================================
+Wagner III
+	PCyl., Sph.
+	lat_ts=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wag3   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223387.021718166 111701.072127637
+accept  2 -1
+expect  223387.021718166 -111701.072127637
+accept  -2 1
+expect  -223387.021718166 111701.072127637
+accept  -2 -1
+expect  -223387.021718166 -111701.072127637
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Wagner IV
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wag4   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  192801.218662384 129416.216394803
+accept  2 -1
+expect  192801.218662384 -129416.216394803
+accept  -2 1
+expect  -192801.218662384 129416.216394803
+accept  -2 -1
+expect  -192801.218662384 -129416.216394803
+
+direction inverse
+accept  200 100
+expect  0.002074503 0.000772683
+accept  200 -100
+expect  0.002074503 -0.000772683
+accept  -200 100
+expect  -0.002074503 0.000772683
+accept  -200 -100
+expect  -0.002074503 -0.000772683
+
+
+===============================================================================
+Wagner V
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wag5   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  203227.051925325 138651.631442713
+accept  2 -1
+expect  203227.051925325 -138651.631442713
+accept  -2 1
+expect  -203227.051925325 138651.631442713
+accept  -2 -1
+expect  -203227.051925325 -138651.631442713
+
+direction inverse
+accept  200 100
+expect  0.001968072 0.000721216
+accept  200 -100
+expect  0.001968072 -0.000721216
+accept  -200 100
+expect  -0.001968072 0.000721216
+accept  -200 -100
+expect  -0.001968072 -0.000721216
+
+
+===============================================================================
+Wagner VI
+	PCyl, Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wag6   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  211652.562164410 105831.180787330
+accept  2 -1
+expect  211652.562164410 -105831.180787330
+accept  -2 1
+expect  -211652.562164410 105831.180787330
+accept  -2 -1
+expect  -211652.562164410 -105831.180787330
+
+direction inverse
+accept  200 100
+expect  0.001889802 0.000944901
+accept  200 -100
+expect  0.001889802 -0.000944901
+accept  -200 100
+expect  -0.001889802 0.000944901
+accept  -200 -100
+expect  -0.001889802 -0.000944901
+
+
+===============================================================================
+Wagner VII
+	Misc Sph, no inv.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wag7   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  198601.876957312 125637.045714171
+accept  2 -1
+expect  198601.876957312 -125637.045714171
+accept  -2 1
+expect  -198601.876957312 125637.045714171
+accept  -2 -1
+expect  -198601.876957312 -125637.045714171
+
+
+===============================================================================
+Werenskiold I
+	PCyl., Sph.
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=weren   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223378.515757634 146214.093042288
+accept  2 -1
+expect  223378.515757634 -146214.093042288
+accept  -2 1
+expect  -223378.515757634 146214.093042288
+accept  -2 -1
+expect  -223378.515757634 -146214.093042288
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000683918
+accept  200 -100
+expect  0.001790493 -0.000683918
+accept  -200 100
+expect  -0.001790493 0.000683918
+accept  -200 -100
+expect  -0.001790493 -0.000683918
+
+
+===============================================================================
+Winkel I
+	PCyl., Sph.
+	lat_ts=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wink1   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223385.131640953 111701.072127637
+accept  2 -1
+expect  223385.131640953 -111701.072127637
+accept  -2 1
+expect  -223385.131640953 111701.072127637
+accept  -2 -1
+expect  -223385.131640953 -111701.072127637
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+
+===============================================================================
+Winkel II
+	PCyl., Sph., no inv.
+	lat_1=
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wink2   +a=6400000    +lat_1=0.5 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223387.396433786 124752.032797445
+accept  2 -1
+expect  223387.396433786 -124752.032797445
+accept  -2 1
+expect  -223387.396433786 124752.032797445
+accept  -2 -1
+expect  -223387.396433786 -124752.032797445
+
+
+===============================================================================
+Winkel Tripel
+	Misc Sph
+	lat_1
+===============================================================================
+
+-------------------------------------------------------------------------------
+operation +proj=wintri   +a=6400000    +lat_1=0 +lat_2=2
+-------------------------------------------------------------------------------
+tolerance 0.00010 mm
+accept  2 1
+expect  223390.801533485 111703.907505745
+accept  2 -1
+expect  223390.801533485 -111703.907505745
+accept  -2 1
+expect  -223390.801533485 111703.907505745
+accept  -2 -1
+expect  -223390.801533485 -111703.907505745
+
+direction inverse
+accept  200 100
+expect  0.001790493 0.000895247
+accept  200 -100
+expect  0.001790493 -0.000895247
+accept  -200 100
+expect  -0.001790493 0.000895247
+accept  -200 -100
+expect  -0.001790493 -0.000895247
+
+</gie>
diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie
new file mode 100644
index 0000000..8f0f0ca
--- /dev/null
+++ b/test/gie/deformation.gie
@@ -0,0 +1,55 @@
+===============================================================================
+Test for the deformation operation - Kinematic Gridshifting
+
+For all the deformation tests the alaska and egm96_15.gtx grids are used even
+though they are not parts of a deformation model, they are in the proper format
+and for testing purposes it doesn't really matter all that much...
+
+The input coordinate is located at lon=60, lam=-160 - somewhere in Alaska.
+
+===============================================================================
+
+<gie>
+
+-------------------------------------------------------------------------------
+Test using both horizontal and vertical grids as well as the +tobs parameter
+-------------------------------------------------------------------------------
+operation   +proj=deformation +xy_grids=alaska +z_grids=egm96_15.gtx
+            +t_epoch=2016.0 +t_obs=2000.0 +ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance   0.1 mm
+accept      -3004295.5882503074 -1093474.1690603832 5500477.1338251457
+expect      -3004295.7025       -1093474.2106       5500477.3444
+roundtrip   5
+
+-------------------------------------------------------------------------------
+Test using both horizontal and vertical grids
+-------------------------------------------------------------------------------
+operation   +proj=deformation
+            +xy_grids=alaska +z_grids=egm96_15.gtx +t_epoch=2016.0 +ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance   0.1 mm
+accept      -3004295.5882503074 -1093474.1690603832 5500477.1338251457 2000.0
+expect      -3004295.7025       -1093474.2106       5500477.3444       2000.0
+roundtrip   5
+
+-------------------------------------------------------------------------------
+operation   proj=deformation xy_grids=alaska t_epoch=2016.0 t_obs=2017.0
+            ellps=GRS80
+expect      failure pjd_err_no_args
+
+operation   proj=deformation z_grids=egm96_15.gtx t_epoch=2016.0 t_obs=2017.0
+            ellps=GRS80
+expect      failure pjd_err_no_args
+
+operation   proj=deformation xy_grids=nonexisting z_grids=egm96_15.gtx
+            t_epoch=2016.0 t_obs=2017.0 ellps=GRS80
+expect      failure pjd_err_failed_to_load_grid
+
+operation   proj=deformation xy_grids=alaska z_grids=nonexisting
+            t_epoch=2016.0 t_obs=2017.0 ellps=GRS80
+expect      failure pjd_err_failed_to_load_grid
+
+operation   proj=deformation xy_grids=alaska z_grids=nonexisting ellps=GRS80
+expect      failure pjd_err_missing_args
+</gie>
diff --git a/test/gie/ellipsoid.gie b/test/gie/ellipsoid.gie
new file mode 100644
index 0000000..81208bc
--- /dev/null
+++ b/test/gie/ellipsoid.gie
@@ -0,0 +1,162 @@
+===============================================================================
+
+Test pj_ellipsoid, the reimplementation of pj_ell_set
+
+===============================================================================
+
+
+<gie>
+
+-------------------------------------------------------------------------------
+First a spherical example
+-------------------------------------------------------------------------------
+operation proj=merc R=6400000
+-------------------------------------------------------------------------------
+tolerance 10 nm
+accept    1 2
+expect    111701.0721276371  223447.5262032605
+
+accept    12 55
+expect    1340412.8655316452  7387101.1430967357
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+Then an explicitly defined ellipsoidal example
+-------------------------------------------------------------------------------
+operation proj=merc a=6400000 rf=297
+-------------------------------------------------------------------------------
+tolerance 10 nm
+accept    1 2
+expect    111701.0721276371  221945.9681832088
+
+accept    12 55
+expect    1340412.8655316452  7351803.9151705895
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+Then try using a built in ellipsoid
+-------------------------------------------------------------------------------
+operation proj=merc ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 10 nm
+accept    1 2
+expect    111319.4907932736  221194.0771604237
+
+accept    12 55
+expect    1335833.8895192828  7326837.7148738774
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+Then try to fail deliberately
+-------------------------------------------------------------------------------
+operation proj=merc ellps=GRS80000000000
+expect    failure errno unknown_ellp_param
+operation proj=merc +a=-1
+expect    failure errno major_axis_not_given
+
+operation proj=merc no_defs
+expect    failure errno major_axis_not_given
+
+# This one should succeed due to ellps=WGS84 in proj_def.dat
+operation proj=merc
+accept    0 0
+expect    0 0
+
+operation proj=merc +es=-1
+expect    failure errno major_axis_not_given
+
+operation
+expect    failure
+operation cobra
+expect    failure
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+Finally test the spherification functionality
+-------------------------------------------------------------------------------
+operation proj=merc ellps=GRS80 R_A
+tolerance 10 nm
+accept    12 55
+expect    1334340.6237297705  7353636.6296552019
+-------------------------------------------------------------------------------
+operation proj=merc ellps=GRS80 R_V
+tolerance 10 nm
+accept    12 55
+expect    1334339.2852675652  7353629.2533042720
+-------------------------------------------------------------------------------
+operation proj=merc ellps=GRS80 R_a
+tolerance 10 nm
+accept    12 55
+expect    1333594.4904527504  7349524.6413825499
+-------------------------------------------------------------------------------
+operation proj=merc ellps=GRS80 R_g
+tolerance 10 nm
+accept    12 55
+expect    1333592.6102291327  7349514.2793497816
+-------------------------------------------------------------------------------
+operation proj=merc ellps=GRS80 R_h
+tolerance 10 nm
+accept    12 55
+expect    1333590.7300081658  7349503.9173316229
+-------------------------------------------------------------------------------
+operation proj=merc ellps=GRS80 R_lat_a=60
+tolerance 10 nm
+accept    12 55
+expect    1338073.7436268919  7374210.0924803326
+-------------------------------------------------------------------------------
+operation proj=merc ellps=GRS80 R_lat_g=60
+tolerance 10 nm
+accept    12 55
+expect    1338073.2696101593  7374207.4801437631
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+This one from testvarious failed at first version of the pull request
+-------------------------------------------------------------------------------
+operation  proj=healpix a=1 lon_0=0 ellps=WGS84
+-------------------------------------------------------------------------------
+accept     0 41.937853904844985
+expect     0 0.78452
+accept    -90 0
+expect    -1.56904	0
+-------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------
+Shape parameters
+-------------------------------------------------------------------------------
+operation  proj=utm zone=32   ellps=GRS80 rf=0
+expect     failure errno rev_flattening_is_zero
+
+operation  proj=utm zone=32   ellps=GRS80 es=1
+expect     failure errno eccentricity_is_one
+
+operation  proj=utm zone=32   ellps=GRS80 b=0
+expect     failure errno eccentricity_is_one
+
+operation  proj=utm zone=32   ellps=GRS80 b=6000000
+accept     12 55
+expect     699293.0880   5674591.5295
+
+operation  proj=utm zone=32   ellps=GRS80 rf=300
+accept     12 55
+expect     691873.1212   6099054.9661
+
+operation  proj=utm zone=32   ellps=GRS80 f=0.00333333333333
+accept     12 55
+expect     691873.1212   6099054.9661
+
+operation  proj=utm zone=32   ellps=GRS80 b=6000000
+accept     12 55
+expect     699293.0880   5674591.5295
+
+operation  proj=utm zone=32   a=6400000 b=6000000
+accept     12 55
+expect     700416.5900   5669475.8884
+-------------------------------------------------------------------------------
+
+</gie>
diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie
new file mode 100644
index 0000000..e21f032
--- /dev/null
+++ b/test/gie/more_builtins.gie
@@ -0,0 +1,371 @@
+===============================================================================
+
+Various test material, mostly converted from selftest entries in PJ_xxx.c
+
+Contrary to the material in builtins.gie, this material is handwritten and
+intends to exercise corner cases.
+
+===============================================================================
+
+
+<gie>
+
+-------------------------------------------------------------------------------
+Two ob_tran tests from nad/testvarious
+-------------------------------------------------------------------------------
+operation +proj=ob_tran  +o_proj=moll  +R=6378137.0  +o_lon_p=0  +o_lat_p=0  +lon_0=180
+-------------------------------------------------------------------------------
+tolerance 1 mm
+direction inverse
+
+accept    300000 400000
+expect    -42.7562158333  85.5911341667
+
+direction forward
+
+accept    10 20
+expect    -1384841.18787 7581707.88240
+-------------------------------------------------------------------------------
+
+
+
+
+
+-------------------------------------------------------------------------------
+Two tests from PJ_molodensky.c
+-------------------------------------------------------------------------------
+operation proj=molodensky a=6378160 rf=298.25
+          da=-23  df=-8.120449e-8  dx=-134  dy=-48  dz=149
+          abridged
+-------------------------------------------------------------------------------
+tolerance 2 m
+
+accept    144.9667  -37.8      50     0
+expect    144.968   -37.79848  46.378 0
+
+roundtrip 100    1 m
+-------------------------------------------------------------------------------
+Same thing once more, but this time unabridged
+-------------------------------------------------------------------------------
+operation proj=molodensky a=6378160 rf=298.25
+          da=-23  df=-8.120449e-8  dx=-134  dy=-48  dz=149
+-------------------------------------------------------------------------------
+tolerance 2 m
+
+accept    144.9667  -37.8      50     0
+expect    144.968   -37.79848  46.378 0
+
+roundtrip 100    1 m
+-------------------------------------------------------------------------------
+
+
+
+
+
+-------------------------------------------------------------------------------
+Some tests from PJ_pipeline.c
+-------------------------------------------------------------------------------
+Forward-reverse geo->utm->geo (4D functions)
+-------------------------------------------------------------------------------
+operation proj=pipeline zone=32 step
+          proj=utm  ellps=GRS80 step
+          proj=utm  ellps=GRS80 inv
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+
+accept 12 55 0 0
+expect 12 55 0 0
+
+Now the inverse direction (still same result: the pipeline is symmetrical)
+
+direction inverse
+expect 12 55 0 0
+-------------------------------------------------------------------------------
+And now the back-to-back situation utm->geo->utm (4D functions)
+-------------------------------------------------------------------------------
+operation proj=pipeline zone=32 ellps=GRS80 step
+          proj=utm inv                      step
+          proj=utm
+-------------------------------------------------------------------------------
+accept 691875.63214  6098907.82501  0  0
+expect 691875.63214  6098907.82501  0  0
+direction inverse
+expect 691875.63214  6098907.82501  0  0
+-------------------------------------------------------------------------------
+Forward-reverse geo->utm->geo (3D functions)
+-------------------------------------------------------------------------------
+operation proj=pipeline zone=32 step
+          proj=utm  ellps=GRS80 step
+          proj=utm  ellps=GRS80 inv
+-------------------------------------------------------------------------------
+tolerance 0.1 mm
+
+accept 12 55 0
+expect 12 55 0
+
+Now the inverse direction (still same result: the pipeline is symmetrical)
+
+direction inverse
+expect 12 55 0
+-------------------------------------------------------------------------------
+And now the back-to-back situation utm->geo->utm (3D functions)
+-------------------------------------------------------------------------------
+operation proj=pipeline zone=32 ellps=GRS80 step
+          proj=utm inv                      step
+          proj=utm
+-------------------------------------------------------------------------------
+accept 691875.63214  6098907.82501  0
+expect 691875.63214  6098907.82501  0
+direction inverse
+expect 691875.63214  6098907.82501  0
+-------------------------------------------------------------------------------
+Test a corner case: A rather pointless one-step pipeline geo->utm
+-------------------------------------------------------------------------------
+operation proj=pipeline step proj=utm zone=32 ellps=GRS80
+-------------------------------------------------------------------------------
+accept    12 55 0 0
+expect    691875.63214  6098907.82501  0  0
+direction inverse
+accept    691875.63214  6098907.82501  0  0
+expect    12 55 0 0
+-------------------------------------------------------------------------------
+Finally test a pipeline with more than one init step
+-------------------------------------------------------------------------------
+operation proj=pipeline
+          step init=epsg:25832 inv
+          step init=epsg:25833
+          step init=epsg:25833 inv
+          step init=epsg:25832
+-------------------------------------------------------------------------------
+accept    691875.63214  6098907.82501  0  0
+expect    691875.63214  6098907.82501  0  0
+direction inverse
+accept    12 55 0 0
+expect    12 55 0 0
+-------------------------------------------------------------------------------
+Test a few inversion scenarios (urm5 has no inverse operation)
+-------------------------------------------------------------------------------
+operation   proj=pipeline       step
+            proj=urm5 n=0.5 inv
+expect      failure pjd_err_malformed_pipeline
+
+operation   proj=pipeline   inv step
+            proj=urm5 n=0.5
+expect      failure pjd_err_malformed_pipeline
+
+operation   proj=pipeline   inv step
+            proj=urm5 n=0.5 inv
+accept      12 56
+expect      1215663.2814182492      5452209.5424045017
+
+operation   proj=pipeline step
+            proj=urm5 n=0.5
+accept      12 56
+expect      1215663.2814182492      5452209.5424045017
+-------------------------------------------------------------------------------
+Test various failing scenarios.
+-------------------------------------------------------------------------------
+operation   proj=pipeline   step
+            proj=pipeline   step
+            proj=merc
+expect      failure pjd_err_malformed_pipeline
+
+operation   step proj=pipeline step proj=merc
+expect      failure pjd_err_malformed_pipeline
+
+operation   proj=pipeline
+expect      failure pjd_err_malformed_pipeline
+
+
+-------------------------------------------------------------------------------
+Some tests from PJ_vgridshift.c
+-------------------------------------------------------------------------------
+operation  proj=vgridshift  grids=egm96_15.gtx  ellps=GRS80
+-------------------------------------------------------------------------------
+Appears there is a difference between the egm96_15.gtx distributed by OSGeo4W,
+and the one from http://download.osgeo.org/proj/vdatum/egm96_15/egm96_15.gtx
+N(12.5, 55.5) = -36.021305084228515625  (download.osgeo.org)
+N(12.5, 55.5) = -35.880001068115234000  (OSGeo4W)
+This is annoying, but must be handled elsewhere. We jump through the hoop by
+setting a very lax tolerance.
+-------------------------------------------------------------------------------
+tolerance 15 cm
+accept    12.5 55.5   0                  0
+expect    12.5 55.5 -36.021305084228516  0
+
+roundtrip 100 1 nm
+-------------------------------------------------------------------------------
+Fail on purpose: +grids parameter is mandatory
+operation proj=vgridshift
+expect    failure errno no_args
+
+Fail on purpose: open non-existing grid
+operation proj=vgridshift grids=nonexistinggrid.gtx
+expect    failure errno failed_to_load_grid
+-------------------------------------------------------------------------------
+
+
+
+
+
+-------------------------------------------------------------------------------
+Some tests from PJ_hgridshift.c
+-------------------------------------------------------------------------------
+operation  proj=hgridshift +grids=nzgd2kgrid0005.gsb  ellps=GRS80
+-------------------------------------------------------------------------------
+tolerance 1 nm
+accept    173 -45 0 0
+roundtrip 100
+-------------------------------------------------------------------------------
+expect    172.999892181021551 -45.001620431954613  0 0
+direction inverse
+accept    172.999892181021551 -45.001620431954613  0 0
+expect    173 -45 0 0
+-------------------------------------------------------------------------------
+
+# Fail on purpose: open non-existing grid:
+operation proj=hgridshift grids=@nonexistinggrid.gsb,anothernonexistinggrid.gsb
+expect    failure errno failed_to_load_grid
+
+# Fail on purpose: +grids parameter is mandatory:
+operation proj=hgridshift
+expect    failure errno no_args
+-------------------------------------------------------------------------------
+
+
+
+
+-------------------------------------------------------------------------------
+A number of tests from PJ_helmert.c
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+This example is from Lotti Jivall: "Simplified transformations from
+ITRF2008/IGS08 to ETRS89 for maritime applications"
+-------------------------------------------------------------------------------
+operation  proj=helmert ellps=GRS80
+           x=0.67678    y=0.65495   z=-0.52827
+           rx=-0.022742 ry=0.012667 rz=0.022704  s=-0.01070
+-------------------------------------------------------------------------------
+tolerance 1 um
+accept     3565285.00000000  855949.00000000  5201383.00000000
+expect     3565285.41342351  855948.67986759  5201382.72939791
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+This example is a random point, transformed from ED50 to ETRS89 using KMStrans2
+-------------------------------------------------------------------------------
+operation   proj=helmert   ellps=GRS80   exact
+            x=-081.0703    rx=-0.48488
+            y=-089.3603    ry=-0.02436
+            z=-115.7526    rz=-0.41321   s=-0.540645
+-------------------------------------------------------------------------------
+tolerance  1 um
+accept     3494994.30120000 1056601.97250000 5212382.16660000
+expect     3494909.84026368 1056506.78938633 5212265.66699761
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+This example is a coordinate from the geodetic observatory in Onsala,
+Sweden transformed from ITRF2000 @ 2017.0 to ITRF93 @ 2017.0.
+
+The test coordinate was transformed using GNSStrans, using transformation
+parameters published by ITRF: ftp://itrf.ensg.ign.fr/pub/itrf/ITRF.TP
+-------------------------------------------------------------------------------
+operation  proj=helmert ellps=GRS80  transpose
+           x =  0.0127   dx = -0.0029   rx = -0.00039  drx = -0.00011
+           y =  0.0065   dy = -0.0002   ry =  0.00080  dry = -0.00019
+           z = -0.0209   dz = -0.0006   rz = -0.00114  drz =  0.00007
+
+           s =  0.00195  ds =  0.00001  t_epoch = 1988.0
+-------------------------------------------------------------------------------
+tolerance  0.03 mm
+accept     3370658.37800 711877.31400 5349787.08600  2017.0  # ITRF2000 at 2017.0
+expect     3370658.18890 711877.42370 5349787.12430  2017.0  # ITRF93 at 2017.0
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+This example is from "A mathematical relationship between NAD27 and NAD83 (91)
+State Plane coordinates in Southeastern Wisconsin":
+http://www.sewrpc.org/SEWRPCFiles/Publications/TechRep/tr-034-Mathematical-Relationship-Between-NAD27-and-NAD83-91-State-Plane-Coordinates-Southeastern-Wisconsin.pdf
+
+The test data is taken from p. 29. Here we are using point 203 and converting it
+from NAD27 (ft) -> NAD83 (m). The paper reports a difference of 0.0014 m from
+measured to computed coordinates, hence the test tolerance is set accordingly.
+-------------------------------------------------------------------------------
+operation  proj=helmert ellps=GRS80
+           x=-9597.3572 y=.6112
+           s=0.304794780637 theta=-1.244048
+-------------------------------------------------------------------------------
+tolerance  1 mm
+accept     2546506.957 542256.609  0
+expect     766563.675  165282.277  0
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+Finally test the 4D-capabilities of the proj.h API, especially that the
+rotation matrix is updated when necessary.
+
+Test coordinates from GNSStrans.
+-------------------------------------------------------------------------------
+operation  proj=helmert ellps=GRS80 transpose
+           x = 0.01270  dx =-0.0029  rx =-0.00039  drx =-0.00011
+           y = 0.00650  dy =-0.0002  ry = 0.00080  dry =-0.00019
+           z =-0.0209   dz =-0.0006  rz =-0.00114  drz = 0.00007
+           s = 0.00195  ds = 0.00001
+           t_epoch=1988.0
+-------------------------------------------------------------------------------
+tolerance  0.1 mm
+accept     3370658.378    711877.314    5349787.086    2017.0
+expect     3370658.18890  711877.42370  5349787.12430  2017.0
+accept     3370658.378    711877.314    5349787.086    2018.0
+expect     3370658.18087  711877.42750  5349787.12648  2018.0
+-------------------------------------------------------------------------------
+
+
+
+-------------------------------------------------------------------------------
+geocentric latitude
+-------------------------------------------------------------------------------
+operation  proj=geoc ellps=GRS80
+accept     12   55                  0 0
+expect     12   54.818973308324573  0 0
+roundtrip  1000
+
+accept     12   90                  0 0
+expect     12   90                  0 0
+
+accept     12  -90                  0 0
+expect     12  -90                  0 0
+
+accept     12   89.99999999999      0 0
+expect     12   89.999999999989996  0 0
+-------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------
+some less used options
+-------------------------------------------------------------------------------
+operation  proj=utm  ellps=GRS80  zone=32  to_meter=0
+expect     failure   errno unit_factor_less_than_0
+
+operation  proj=utm  ellps=GRS80  zone=32  to_meter=10
+accept     12   55
+expect        69187.5632    609890.7825
+-------------------------------------------------------------------------------
+
+
+
+-------------------------------------------------------------------------------
+run the few gie-builtin tests, which are currently either awkward or impossible
+to express in the gie command set
+-------------------------------------------------------------------------------
+builtins
+-------------------------------------------------------------------------------
+
+</gie>
diff --git a/test/gie/unitconvert.gie b/test/gie/unitconvert.gie
new file mode 100644
index 0000000..30d9dc0
--- /dev/null
+++ b/test/gie/unitconvert.gie
@@ -0,0 +1,28 @@
+-------------------------------------------------------------------------------
+                        Tests for the unitconvert operation
+-------------------------------------------------------------------------------
+
+<gie>
+
+operation   proj=unitconvert xy_in=m xy_out=dm z_in=cm z_out=mm
+tolerance   0.1
+accept       55.25   23.23   45.5
+expect      552.5   232.3   455.0
+
+operation   proj=unitconvert +xy_in=m +xy_out=m +z_in=m +z_out=m
+tolerance   0.1
+accept      12.3    45.6    7.89
+expect      12.3    45.6    7.89
+
+operation   proj=unitconvert xy_in=dm xy_out=dm
+tolerance   0.1
+accept      1 1 1 1
+expect      1 1 1 1
+
+
+operation   proj=unitconvert xy_in=2.0 xy_out=4.0
+tolerance   0.1
+accept      1       1       1   1
+expect      0.5     0.5     1   1
+
+</gie>
diff --git a/test/gigs/5101.1-jhs.gie b/test/gigs/5101.1-jhs.gie
new file mode 100644
index 0000000..2fd9888
--- /dev/null
+++ b/test/gigs/5101.1-jhs.gie
@@ -0,0 +1,732 @@
+--------------------------------------------------------------------------------
+
+Test 5101 (part 1), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4326 +inv
+           +step +proj=etmerc +lat_0=49 +lon_0=-2 +k_0=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=WGS84 +units=m +no_def
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    3 80
+expect    496813.178 3358297.326
+
+tolerance  0.03 m
+accept    2.9999999 60
+expect    678711.584 1134498.83
+
+tolerance  0.03 m
+accept    3 49
+expect    765648.501 -87944.74
+
+tolerance  0.03 m
+accept    3.0000001 40
+expect    826893.845 -1087710.121
+
+tolerance  0.03 m
+accept    3 20
+expect    923539.353 -3308151.625
+
+tolerance  0.03 m
+accept    3 0
+expect    957087.829 -5527462.686
+
+tolerance  0.03 m
+accept    3 -20
+expect    923539.353 -7746773.748
+
+tolerance  0.03 m
+accept    3 -40
+expect    826893.845 -9967215.251
+
+tolerance  0.03 m
+accept    3 -60
+expect    678711.584 -12189424.202
+
+tolerance  0.03 m
+accept    3 -80
+expect    496813.178 -14413222.698
+
+tolerance  0.03 m
+accept    -2 80
+expect    400000 3354134.429
+
+tolerance  0.03 m
+accept    -2 60
+expect    400000 1123956.966
+
+tolerance  0.03 m
+accept    -2 49
+expect    400000 -100000
+
+tolerance  0.03 m
+accept    -2 40
+expect    400000 -1099699.834
+
+tolerance  0.03 m
+accept    -2 20
+expect    400000 -3315978.565
+
+tolerance  0.03 m
+accept    -2 0
+expect    400000 -5527462.686
+
+tolerance  0.03 m
+accept    -2 -20
+expect    400000 -7738946.807
+
+tolerance  0.03 m
+accept    -2 -40
+expect    400000 -9955225.538
+
+tolerance  0.03 m
+accept    -2 -60
+expect    400000 -12178882.338
+
+tolerance  0.03 m
+accept    -2 -80
+expect    400000 -14409059.801
+
+tolerance  0.03 m
+accept    -5 80
+expect    341867.711 3355633.571
+
+tolerance  0.03 m
+accept    -5 60
+expect    232704.966 1127751.264
+
+tolerance  0.03 m
+accept    -5 49
+expect    180586.02 -95662.911
+
+tolerance  0.03 m
+accept    -5 40
+expect    143900.026 -1095387.991
+
+tolerance  0.03 m
+accept    -5 20
+expect    86073.28 -3313165.843
+
+tolerance  0.03 m
+accept    -5 0
+expect    66021.018 -5527462.686
+
+tolerance  0.03 m
+accept    -5 -20
+expect    86073.28 -7741759.529
+
+tolerance  0.03 m
+accept    -5 -40
+expect    143900.026 -9959537.381
+
+tolerance  0.03 m
+accept    -5 -60
+expect    232704.966 -12182676.637
+
+tolerance  0.03 m
+accept    -5 -80
+expect    341867.711 -14410558.943
+
+tolerance  0.03 m
+accept    -7.5559037 49.7661327
+expect    0 0
+
+tolerance  0.03 m
+accept    -5 0
+expect    66021.018 -5527462.686
+
+tolerance  0.03 m
+accept    -4 0
+expect    177404.277 -5527462.686
+
+tolerance  0.03 m
+accept    -3 0
+expect    288719.208 -5527462.686
+
+tolerance  0.03 m
+accept    -2 0
+expect    400000.0 -5527462.686
+
+tolerance  0.03 m
+accept    -1 0
+expect    511280.792 -5527462.686
+
+tolerance  0.03 m
+accept    0 0
+expect    622595.723 -5527462.686
+
+tolerance  0.03 m
+accept    1 0
+expect    733978.982 -5527462.686
+
+tolerance  0.03 m
+accept    2 0
+expect    845464.865 -5527462.686
+
+tolerance  0.03 m
+accept    3 0
+expect    957087.829 -5527462.686
+
+tolerance  0.03 m
+accept    4 0
+expect    1068882.539 -5527462.686
+
+tolerance  0.03 m
+accept    5 0
+expect    1180883.933 -5527462.686
+
+tolerance  0.03 m
+accept    6 0
+expect    1293127.266 -5527462.686
+
+tolerance  0.03 m
+accept    7 0
+expect    1405648.179 -5527462.686
+
+tolerance  0.03 m
+accept    8 0
+expect    1518482.747 -5527462.686
+
+tolerance  0.03 m
+accept    -5 60
+expect    232704.966 1127751.264
+
+tolerance  0.03 m
+accept    -4 60
+expect    288455.816 1125643.213
+
+tolerance  0.03 m
+accept    -3 60
+expect    344223.662 1124378.512
+
+tolerance  0.03 m
+accept    -2 60
+expect    400000 1123956.966
+
+tolerance  0.03 m
+accept    -1 60
+expect    455776.338 1124378.512
+
+tolerance  0.03 m
+accept    0 60
+expect    511544.184 1125643.213
+
+tolerance  0.03 m
+accept    1 60
+expect    567295.034 1127751.264
+
+tolerance  0.03 m
+accept    2 60
+expect    623020.357 1130702.987
+
+tolerance  0.03 m
+accept    3 60
+expect    678711.584 1134498.83
+
+tolerance  0.03 m
+accept    4.0 60.0
+expect    734360.093 1139139.367
+
+tolerance  0.03 m
+accept    5.0 60.0
+expect    789957.197 1144625.296
+
+tolerance  0.03 m
+accept    6.0 60.0
+expect    845494.132 1150957.434
+
+tolerance  0.03 m
+accept    7.0 60.0
+expect    900962.042 1158136.713
+
+tolerance  0.03 m
+accept    8.0 60.0
+expect    956351.967 1166164.18
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +proj=etmerc +lat_0=49 +lon_0=-2 +k_0=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=WGS84 +units=m +no_def +inv
+           +step +init=epsg:4326
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    496813.178 3358297.326
+expect    3 80
+
+tolerance  0.03 m
+accept    678711.584 1134498.83
+expect    2.9999999 60
+
+tolerance  0.03 m
+accept    765648.501 -87944.74
+expect    3 49
+
+tolerance  0.03 m
+accept    826893.845 -1087710.121
+expect    3.0000001 40
+
+tolerance  0.03 m
+accept    923539.353 -3308151.625
+expect    3 20
+
+tolerance  0.03 m
+accept    957087.829 -5527462.686
+expect    3 0
+
+tolerance  0.03 m
+accept    923539.353 -7746773.748
+expect    3 -20
+
+tolerance  0.03 m
+accept    826893.845 -9967215.251
+expect    3 -40
+
+tolerance  0.03 m
+accept    678711.584 -12189424.202
+expect    3 -60
+
+tolerance  0.03 m
+accept    496813.178 -14413222.698
+expect    3 -80
+
+tolerance  0.03 m
+accept    400000 3354134.429
+expect    -2 80
+
+tolerance  0.03 m
+accept    400000 1123956.966
+expect    -2 60
+
+tolerance  0.03 m
+accept    400000 -100000
+expect    -2 49
+
+tolerance  0.03 m
+accept    400000 -1099699.834
+expect    -2 40
+
+tolerance  0.03 m
+accept    400000 -3315978.565
+expect    -2 20
+
+tolerance  0.03 m
+accept    400000 -5527462.686
+expect    -2 0
+
+tolerance  0.03 m
+accept    400000 -7738946.807
+expect    -2 -20
+
+tolerance  0.03 m
+accept    400000 -9955225.538
+expect    -2 -40
+
+tolerance  0.03 m
+accept    400000 -12178882.338
+expect    -2 -60
+
+tolerance  0.03 m
+accept    400000 -14409059.801
+expect    -2 -80
+
+tolerance  0.03 m
+accept    341867.711 3355633.571
+expect    -5 80
+
+tolerance  0.03 m
+accept    232704.966 1127751.264
+expect    -5 60
+
+tolerance  0.03 m
+accept    180586.02 -95662.911
+expect    -5 49
+
+tolerance  0.03 m
+accept    143900.026 -1095387.991
+expect    -5 40
+
+tolerance  0.03 m
+accept    86073.28 -3313165.843
+expect    -5 20
+
+tolerance  0.03 m
+accept    66021.018 -5527462.686
+expect    -5 0
+
+tolerance  0.03 m
+accept    86073.28 -7741759.529
+expect    -5 -20
+
+tolerance  0.03 m
+accept    143900.026 -9959537.381
+expect    -5 -40
+
+tolerance  0.03 m
+accept    232704.966 -12182676.637
+expect    -5 -60
+
+tolerance  0.03 m
+accept    341867.711 -14410558.943
+expect    -5 -80
+
+tolerance  0.03 m
+accept    0 0
+expect    -7.5559037 49.7661327
+
+tolerance  0.03 m
+accept    66021.018 -5527462.686
+expect    -5 0
+
+tolerance  0.03 m
+accept    177404.277 -5527462.686
+expect    -4 0
+
+tolerance  0.03 m
+accept    288719.208 -5527462.686
+expect    -3 0
+
+tolerance  0.03 m
+accept    400000.0 -5527462.686
+expect    -2 0
+
+tolerance  0.03 m
+accept    511280.792 -5527462.686
+expect    -1 0
+
+tolerance  0.03 m
+accept    622595.723 -5527462.686
+expect    0 0
+
+tolerance  0.03 m
+accept    733978.982 -5527462.686
+expect    1 0
+
+tolerance  0.03 m
+accept    845464.865 -5527462.686
+expect    2 0
+
+tolerance  0.03 m
+accept    957087.829 -5527462.686
+expect    3 0
+
+tolerance  0.03 m
+accept    1068882.539 -5527462.686
+expect    4 0
+
+tolerance  0.03 m
+accept    1180883.933 -5527462.686
+expect    5 0
+
+tolerance  0.03 m
+accept    1293127.266 -5527462.686
+expect    6 0
+
+tolerance  0.03 m
+accept    1405648.179 -5527462.686
+expect    7 0
+
+tolerance  0.03 m
+accept    1518482.747 -5527462.686
+expect    8 0
+
+tolerance  0.03 m
+accept    232704.966 1127751.264
+expect    -5 60
+
+tolerance  0.03 m
+accept    288455.816 1125643.213
+expect    -4 60
+
+tolerance  0.03 m
+accept    344223.662 1124378.512
+expect    -3 60
+
+tolerance  0.03 m
+accept    400000 1123956.966
+expect    -2 60
+
+tolerance  0.03 m
+accept    455776.338 1124378.512
+expect    -1 60
+
+tolerance  0.03 m
+accept    511544.184 1125643.213
+expect    0 60
+
+tolerance  0.03 m
+accept    567295.034 1127751.264
+expect    1 60
+
+tolerance  0.03 m
+accept    623020.357 1130702.987
+expect    2 60
+
+tolerance  0.03 m
+accept    678711.584 1134498.83
+expect    3 60
+
+tolerance  0.03 m
+accept    734360.093 1139139.367
+expect    4.0 60.0
+
+tolerance  0.03 m
+accept    789957.197 1144625.296
+expect    5.0 60.0
+
+tolerance  0.03 m
+accept    845494.132 1150957.434
+expect    6.0 60.0
+
+tolerance  0.03 m
+accept    900962.042 1158136.713
+expect    7.0 60.0
+
+tolerance  0.03 m
+accept    956351.967 1166164.18
+expect    8.0 60.0
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4326 +inv
+           +step +proj=etmerc +lat_0=49 +lon_0=-2 +k_0=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=WGS84 +units=m +no_def
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    3 80
+roundtrip 1000
+
+tolerance  0.006 m
+accept    2.9999999 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 49
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3.0000001 40
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 -20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 -40
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 -80
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 80
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 49
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 40
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 -20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 -40
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 -80
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 80
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 49
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 40
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 -20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 -40
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 -80
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -7.5559037 49.7661327
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -4 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -3 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -1 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    0 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    1 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    2 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    4 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    5 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    6 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    7 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    8 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -4 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -3 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -1 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    0 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    1 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    2 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    4.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    5.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    6.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    7.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    8.0 60.0
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5101.2-jhs.gie b/test/gigs/5101.2-jhs.gie
new file mode 100644
index 0000000..7ea6275
--- /dev/null
+++ b/test/gigs/5101.2-jhs.gie
@@ -0,0 +1,300 @@
+--------------------------------------------------------------------------------
+
+Test 5101 (part 2), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4326 +inv
+           +step +init=epsg:32631
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    -2.0 80.0
+expect    403186.945 8885748.708
+
+tolerance  0.03 m
+accept    -2.0 60.0
+expect    221288.77 6661953.041
+
+tolerance  0.03 m
+accept    -2.0 40.0
+expect    73106.698 4439746.917
+
+tolerance  0.03 m
+accept    -2.0 20.0
+expect    -23538.687 2219308.238
+
+tolerance  0.03 m
+accept    -2.0 0.0
+expect    -57087.12 0.0
+
+tolerance  0.03 m
+accept    -2.0 -20.0
+expect    -23538.687 -2219308.238
+
+tolerance  0.03 m
+accept    -2.0 -40.0
+expect    73106.698 -4439746.917
+
+tolerance  0.03 m
+accept    -2.0 -60.0
+expect    221288.77 -6661953.041
+
+tolerance  0.03 m
+accept    -2.0 -80.0
+expect    403186.945 -8885748.708
+
+tolerance  0.03 m
+accept    -5.0 60.0
+expect    54506.435 6678411.623
+
+tolerance  0.03 m
+accept    -4.0 60.0
+expect    110043.299 6672079.494
+
+tolerance  0.03 m
+accept    -3.0 60.0
+expect    165640.332 6666593.572
+
+tolerance  0.03 m
+accept    -2.0 60.0
+expect    221288.77 6661953.041
+
+tolerance  0.03 m
+accept    -1.0 60.0
+expect    276979.926 6658157.202
+
+tolerance  0.03 m
+accept    0.0 60.0
+expect    332705.179 6655205.484
+
+tolerance  0.03 m
+accept    1.0 60.0
+expect    388455.958 6653097.435
+
+tolerance  0.03 m
+accept    2.0 60.0
+expect    444223.733 6651832.735
+
+tolerance  0.03 m
+accept    3.0 60.0
+expect    500000.0 6651411.19
+
+tolerance  0.03 m
+accept    4.0 60.0
+expect    555776.267 6651832.735
+
+tolerance  0.03 m
+accept    5.0 60.0
+expect    611544.042 6653097.435
+
+tolerance  0.03 m
+accept    6.0 60.0
+expect    667294.821 6655205.484
+
+tolerance  0.03 m
+accept    7.0 60.0
+expect    723020.074 6658157.202
+
+tolerance  0.03 m
+accept    8.0 60.0
+expect    778711.23 6661953.041
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:32631 +inv
+           +step +init=epsg:4326
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    403186.945 8885748.708
+expect    -2.0 80.0
+
+tolerance  0.03 m
+accept    221288.77 6661953.041
+expect    -2.0 60.0
+
+tolerance  0.03 m
+accept    73106.698 4439746.917
+expect    -2.0 40.0
+
+tolerance  0.03 m
+accept    -23538.687 2219308.238
+expect    -2.0 20.0
+
+tolerance  0.03 m
+accept    -57087.12 0.0
+expect    -2.0 0.0
+
+tolerance  0.03 m
+accept    -23538.687 -2219308.238
+expect    -2.0 -20.0
+
+tolerance  0.03 m
+accept    73106.698 -4439746.917
+expect    -2.0 -40.0
+
+tolerance  0.03 m
+accept    221288.77 -6661953.041
+expect    -2.0 -60.0
+
+tolerance  0.03 m
+accept    403186.945 -8885748.708
+expect    -2.0 -80.0
+
+tolerance  0.03 m
+accept    54506.435 6678411.623
+expect    -5.0 60.0
+
+tolerance  0.03 m
+accept    110043.299 6672079.494
+expect    -4.0 60.0
+
+tolerance  0.03 m
+accept    165640.332 6666593.572
+expect    -3.0 60.0
+
+tolerance  0.03 m
+accept    221288.77 6661953.041
+expect    -2.0 60.0
+
+tolerance  0.03 m
+accept    276979.926 6658157.202
+expect    -1.0 60.0
+
+tolerance  0.03 m
+accept    332705.179 6655205.484
+expect    0.0 60.0
+
+tolerance  0.03 m
+accept    388455.958 6653097.435
+expect    1.0 60.0
+
+tolerance  0.03 m
+accept    444223.733 6651832.735
+expect    2.0 60.0
+
+tolerance  0.03 m
+accept    500000.0 6651411.19
+expect    3.0 60.0
+
+tolerance  0.03 m
+accept    555776.267 6651832.735
+expect    4.0 60.0
+
+tolerance  0.03 m
+accept    611544.042 6653097.435
+expect    5.0 60.0
+
+tolerance  0.03 m
+accept    667294.821 6655205.484
+expect    6.0 60.0
+
+tolerance  0.03 m
+accept    723020.074 6658157.202
+expect    7.0 60.0
+
+tolerance  0.03 m
+accept    778711.23 6661953.041
+expect    8.0 60.0
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4326 +inv
+           +step +init=epsg:32631
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    -2.0 80.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2.0 40.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2.0 20.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2.0 0.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2.0 -20.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2.0 -40.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2.0 -60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2.0 -80.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -5.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -4.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -3.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -2.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -1.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    0.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    1.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    2.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    4.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    5.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    6.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    7.0 60.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    8.0 60.0
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5101.3-jhs.gie b/test/gigs/5101.3-jhs.gie
new file mode 100644
index 0000000..d588df4
--- /dev/null
+++ b/test/gigs/5101.3-jhs.gie
@@ -0,0 +1,300 @@
+--------------------------------------------------------------------------------
+
+Test 5101 (part 3), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4283 +inv
+           +step +init=epsg:28354
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    146 80
+expect    596813.055 18885748.71
+
+tolerance  0.03 m
+accept    146 60
+expect    778711.23 16661953.04
+
+tolerance  0.03 m
+accept    146 40
+expect    926893.302 14439746.92
+
+tolerance  0.03 m
+accept    146 20
+expect    1023538.687 12219308.24
+
+tolerance  0.03 m
+accept    146 0
+expect    1057087.12 10000000.0
+
+tolerance  0.03 m
+accept    146 -20
+expect    1023538.687 7780691.762
+
+tolerance  0.03 m
+accept    146 -40
+expect    926893.302 5560253.083
+
+tolerance  0.03 m
+accept    146 -60
+expect    778711.23 3338046.96
+
+tolerance  0.03 m
+accept    146 -80
+expect    596813.055 1114251.292
+
+tolerance  0.03 m
+accept    136 -60
+expect    221288.77 3338046.96
+
+tolerance  0.03 m
+accept    137 -60
+expect    276979.926 3341842.798
+
+tolerance  0.03 m
+accept    138 -60
+expect    332705.179 3344794.516
+
+tolerance  0.03 m
+accept    139 -60
+expect    388455.958 3346902.565
+
+tolerance  0.03 m
+accept    140 -60
+expect    444223.733 3348167.265
+
+tolerance  0.03 m
+accept    141 -60
+expect    500000.0 3348588.81
+
+tolerance  0.03 m
+accept    142 -60
+expect    555776.267 3348167.265
+
+tolerance  0.03 m
+accept    143 -60
+expect    611544.042 3346902.565
+
+tolerance  0.03 m
+accept    144 -60
+expect    667294.821 3344794.516
+
+tolerance  0.03 m
+accept    145 -60
+expect    723020.074 3341842.798
+
+tolerance  0.03 m
+accept    146 -60
+expect    778711.23 3338046.96
+
+tolerance  0.03 m
+accept    147 -60
+expect    834359.668 3333406.428
+
+tolerance  0.03 m
+accept    148 -60
+expect    889956.701 3327920.506
+
+tolerance  0.03 m
+accept    149 -60
+expect    945493.565 3321588.377
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:28354 +inv
+           +step +init=epsg:4283
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    596813.055 18885748.71
+expect    146 80
+
+tolerance  0.03 m
+accept    778711.23 16661953.04
+expect    146 60
+
+tolerance  0.03 m
+accept    926893.302 14439746.92
+expect    146 40
+
+tolerance  0.03 m
+accept    1023538.687 12219308.24
+expect    146 20
+
+tolerance  0.03 m
+accept    1057087.12 10000000.0
+expect    146 0
+
+tolerance  0.03 m
+accept    1023538.687 7780691.762
+expect    146 -20
+
+tolerance  0.03 m
+accept    926893.302 5560253.083
+expect    146 -40
+
+tolerance  0.03 m
+accept    778711.23 3338046.96
+expect    146 -60
+
+tolerance  0.03 m
+accept    596813.055 1114251.292
+expect    146 -80
+
+tolerance  0.03 m
+accept    221288.77 3338046.96
+expect    136 -60
+
+tolerance  0.03 m
+accept    276979.926 3341842.798
+expect    137 -60
+
+tolerance  0.03 m
+accept    332705.179 3344794.516
+expect    138 -60
+
+tolerance  0.03 m
+accept    388455.958 3346902.565
+expect    139 -60
+
+tolerance  0.03 m
+accept    444223.733 3348167.265
+expect    140 -60
+
+tolerance  0.03 m
+accept    500000.0 3348588.81
+expect    141 -60
+
+tolerance  0.03 m
+accept    555776.267 3348167.265
+expect    142 -60
+
+tolerance  0.03 m
+accept    611544.042 3346902.565
+expect    143 -60
+
+tolerance  0.03 m
+accept    667294.821 3344794.516
+expect    144 -60
+
+tolerance  0.03 m
+accept    723020.074 3341842.798
+expect    145 -60
+
+tolerance  0.03 m
+accept    778711.23 3338046.96
+expect    146 -60
+
+tolerance  0.03 m
+accept    834359.668 3333406.428
+expect    147 -60
+
+tolerance  0.03 m
+accept    889956.701 3327920.506
+expect    148 -60
+
+tolerance  0.03 m
+accept    945493.565 3321588.377
+expect    149 -60
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4283 +inv
+           +step +init=epsg:28354
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    146 80
+roundtrip 1000
+
+tolerance  0.006 m
+accept    146 60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    146 40
+roundtrip 1000
+
+tolerance  0.006 m
+accept    146 20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    146 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    146 -20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    146 -40
+roundtrip 1000
+
+tolerance  0.006 m
+accept    146 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    146 -80
+roundtrip 1000
+
+tolerance  0.006 m
+accept    136 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    137 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    138 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    139 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    140 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    141 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    142 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    143 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    144 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    145 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    146 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    147 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    148 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    149 -60
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5101.4-jhs-etmerc.gie b/test/gigs/5101.4-jhs-etmerc.gie
new file mode 100644
index 0000000..b97b776
--- /dev/null
+++ b/test/gigs/5101.4-jhs-etmerc.gie
@@ -0,0 +1,300 @@
+--------------------------------------------------------------------------------
+
+Test 5101 (part 4), Transverse Mercator, v2-0_2011-06-28, recommended JHS formula
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4190 +inv
+           +step +proj=etmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    -63.9993433 80.0002644
+expect    5422500.0 18889800.0
+
+tolerance  0.03 m
+accept    -63.9998472 60.0001191
+expect    5276900.0 16662800.0
+
+tolerance  0.03 m
+accept    -63.9997361 40.0003081
+expect    5158399.999 14439199.99
+
+tolerance  0.03 m
+accept    -64.0004605 19.9996448
+expect    5081100.0 12219300.0
+
+tolerance  0.03 m
+accept    -63.9996186 0.0003092
+expect    5054400.005 10002000.0
+
+tolerance  0.03 m
+accept    -64.0004675 -19.9999283
+expect    5081100.017 7784599.993
+
+tolerance  0.03 m
+accept    -63.9997001 -39.9996924
+expect    5158400.0 5564800.0
+
+tolerance  0.03 m
+accept    -63.9998814 -60.0004008
+expect    5276899.994 3341099.995
+
+tolerance  0.03 m
+accept    -63.9991006 -79.9996521
+expect    5422500.0 1114200.0
+
+tolerance  0.03 m
+accept    -70.0002089 -40.000215
+expect    4645300.113 5524200.123
+
+tolerance  0.03 m
+accept    -69.0001441 -40.0002935
+expect    4730900.0 5533400.0
+
+tolerance  0.03 m
+accept    -67.9995333 -39.9996136
+expect    4816500.043 5541700.028
+
+tolerance  0.03 m
+accept    -66.9998073 -39.9999313
+expect    4902000.0 5548900.0
+
+tolerance  0.03 m
+accept    -65.9996522 -39.9995894
+expect    4987500.009 5555200.001
+
+tolerance  0.03 m
+accept    -64.9992796 -40.000411
+expect    5073000.0 5560400.0
+
+tolerance  0.03 m
+accept    -63.9997 -39.9996925
+expect    5158400.01 5564799.987
+
+tolerance  0.03 m
+accept    -62.9999842 -40.0002087
+expect    5243800.0 5568100.0
+
+tolerance  0.03 m
+accept    -62.0000778 -40.0001803
+expect    5329199.995 5570500.009
+
+tolerance  0.03 m
+accept    -61.0000574 -39.9996182
+expect    5414600.0 5572000.0
+
+tolerance  0.03 m
+accept    -60.0 -40.0003306
+expect    5500000.0 5572399.996
+
+tolerance  0.03 m
+accept    -58.9999426 -39.9996182
+expect    5585400.0 5572000.0
+
+tolerance  0.03 m
+accept    -57.9999222 -40.0001803
+expect    5670800.005 5570500.009
+
+tolerance  0.03 m
+accept    -57.0000158 -40.0002087
+expect    5756200.0 5568100.0
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +proj=etmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +inv
+           +step +init=epsg:4190
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    5422500.0 18889800.0
+expect    -63.9993433 80.0002644
+
+tolerance  0.03 m
+accept    5276900.0 16662800.0
+expect    -63.9998472 60.0001191
+
+tolerance  0.03 m
+accept    5158399.999 14439199.99
+expect    -63.9997361 40.0003081
+
+tolerance  0.03 m
+accept    5081100.0 12219300.0
+expect    -64.0004605 19.9996448
+
+tolerance  0.03 m
+accept    5054400.005 10002000.0
+expect    -63.9996186 0.0003092
+
+tolerance  0.03 m
+accept    5081100.017 7784599.993
+expect    -64.0004675 -19.9999283
+
+tolerance  0.03 m
+accept    5158400.0 5564800.0
+expect    -63.9997001 -39.9996924
+
+tolerance  0.03 m
+accept    5276899.994 3341099.995
+expect    -63.9998814 -60.0004008
+
+tolerance  0.03 m
+accept    5422500.0 1114200.0
+expect    -63.9991006 -79.9996521
+
+tolerance  0.03 m
+accept    4645300.113 5524200.123
+expect    -70.0002089 -40.000215
+
+tolerance  0.03 m
+accept    4730900.0 5533400.0
+expect    -69.0001441 -40.0002935
+
+tolerance  0.03 m
+accept    4816500.043 5541700.028
+expect    -67.9995333 -39.9996136
+
+tolerance  0.03 m
+accept    4902000.0 5548900.0
+expect    -66.9998073 -39.9999313
+
+tolerance  0.03 m
+accept    4987500.009 5555200.001
+expect    -65.9996522 -39.9995894
+
+tolerance  0.03 m
+accept    5073000.0 5560400.0
+expect    -64.9992796 -40.000411
+
+tolerance  0.03 m
+accept    5158400.01 5564799.987
+expect    -63.9997 -39.9996925
+
+tolerance  0.03 m
+accept    5243800.0 5568100.0
+expect    -62.9999842 -40.0002087
+
+tolerance  0.03 m
+accept    5329199.995 5570500.009
+expect    -62.0000778 -40.0001803
+
+tolerance  0.03 m
+accept    5414600.0 5572000.0
+expect    -61.0000574 -39.9996182
+
+tolerance  0.03 m
+accept    5500000.0 5572399.996
+expect    -60.0 -40.0003306
+
+tolerance  0.03 m
+accept    5585400.0 5572000.0
+expect    -58.9999426 -39.9996182
+
+tolerance  0.03 m
+accept    5670800.005 5570500.009
+expect    -57.9999222 -40.0001803
+
+tolerance  0.03 m
+accept    5756200.0 5568100.0
+expect    -57.0000158 -40.0002087
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4190 +inv
+           +step +proj=etmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    -63.9993433 80.0002644
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -63.9998472 60.0001191
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -63.9997361 40.0003081
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -64.0004605 19.9996448
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -63.9996186 0.0003092
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -64.0004675 -19.9999283
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -63.9997001 -39.9996924
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -63.9998814 -60.0004008
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -63.9991006 -79.9996521
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -70.0002089 -40.000215
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -69.0001441 -40.0002935
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -67.9995333 -39.9996136
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -66.9998073 -39.9999313
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -65.9996522 -39.9995894
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -64.9992796 -40.000411
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -63.9997 -39.9996925
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -62.9999842 -40.0002087
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -62.0000778 -40.0001803
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -61.0000574 -39.9996182
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -60.0 -40.0003306
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -58.9999426 -39.9996182
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -57.9999222 -40.0001803
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -57.0000158 -40.0002087
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5102.1.gie b/test/gigs/5102.1.gie
new file mode 100644
index 0000000..d3eef08
--- /dev/null
+++ b/test/gigs/5102.1.gie
@@ -0,0 +1,252 @@
+--------------------------------------------------------------------------------
+
+Test 5102, Lambert Conic Conformal (1SP), v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4230 +inv
+           +step +init=epsg:2192
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    5 58
+expect    760722.92 3457368.68
+
+tolerance  0.03 m
+accept    5 57
+expect    764566.844 3343948.93
+
+tolerance  0.03 m
+accept    5 56
+expect    768396.683 3230944.812
+
+tolerance  0.03 m
+accept    5 55
+expect    772213.973 3118310.947
+
+tolerance  0.03 m
+accept    5 54
+expect    776020.189 3006003.839
+
+tolerance  0.03 m
+accept    5 53
+expect    779816.748 2893981.68
+
+tolerance  0.03 m
+accept    4 51
+expect    717027.292 2668695.784
+
+tolerance  0.03 m
+accept    4 50
+expect    719385.249 2557252.841
+
+tolerance  0.03 m
+accept    4 49
+expect    721740.43 2445941.161
+
+tolerance  0.03 m
+accept    4 46.8
+expect    726915.752 2201342.519
+
+tolerance  0.03 m
+accept    3 53
+expect    644764.905 2891124.195
+
+tolerance  0.03 m
+accept    4 53
+expect    712299.916 2892123.369
+
+tolerance  0.03 m
+accept    5 53
+expect    779816.748 2893981.68
+
+tolerance  0.03 m
+accept    6 53
+expect    847304.473 2896698.827
+
+tolerance  0.03 m
+accept    7 53
+expect    914752.168 2900274.371
+
+tolerance  0.03 m
+accept    8 53
+expect    982148.913 2904707.734
+
+tolerance  0.03 m
+accept    9 53
+expect    1049483.8 2909998.196
+
+tolerance  0.03 m
+accept    10 53
+expect    1116745.929 2916144.902
+
+tolerance  0.03 m
+accept    11 53
+expect    1183924.412 2923146.858
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:2192 +inv
+           +step +init=epsg:4230
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    760722.92 3457368.68
+expect    5 58
+
+tolerance  0.03 m
+accept    764566.844 3343948.93
+expect    5 57
+
+tolerance  0.03 m
+accept    768396.683 3230944.812
+expect    5 56
+
+tolerance  0.03 m
+accept    772213.973 3118310.947
+expect    5 55
+
+tolerance  0.03 m
+accept    776020.189 3006003.839
+expect    5 54
+
+tolerance  0.03 m
+accept    779816.748 2893981.68
+expect    5 53
+
+tolerance  0.03 m
+accept    717027.292 2668695.784
+expect    4 51
+
+tolerance  0.03 m
+accept    719385.249 2557252.841
+expect    4 50
+
+tolerance  0.03 m
+accept    721740.43 2445941.161
+expect    4 49
+
+tolerance  0.03 m
+accept    726915.752 2201342.519
+expect    4 46.8
+
+tolerance  0.03 m
+accept    644764.905 2891124.195
+expect    3 53
+
+tolerance  0.03 m
+accept    712299.916 2892123.369
+expect    4 53
+
+tolerance  0.03 m
+accept    779816.748 2893981.68
+expect    5 53
+
+tolerance  0.03 m
+accept    847304.473 2896698.827
+expect    6 53
+
+tolerance  0.03 m
+accept    914752.168 2900274.371
+expect    7 53
+
+tolerance  0.03 m
+accept    982148.913 2904707.734
+expect    8 53
+
+tolerance  0.03 m
+accept    1049483.8 2909998.196
+expect    9 53
+
+tolerance  0.03 m
+accept    1116745.929 2916144.902
+expect    10 53
+
+tolerance  0.03 m
+accept    1183924.412 2923146.858
+expect    11 53
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4230 +inv
+           +step +init=epsg:2192
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    5 58
+roundtrip 1000
+
+tolerance  0.006 m
+accept    5 57
+roundtrip 1000
+
+tolerance  0.006 m
+accept    5 56
+roundtrip 1000
+
+tolerance  0.006 m
+accept    5 55
+roundtrip 1000
+
+tolerance  0.006 m
+accept    5 54
+roundtrip 1000
+
+tolerance  0.006 m
+accept    5 53
+roundtrip 1000
+
+tolerance  0.006 m
+accept    4 51
+roundtrip 1000
+
+tolerance  0.006 m
+accept    4 50
+roundtrip 1000
+
+tolerance  0.006 m
+accept    4 49
+roundtrip 1000
+
+tolerance  0.006 m
+accept    4 46.8
+roundtrip 1000
+
+tolerance  0.006 m
+accept    3 53
+roundtrip 1000
+
+tolerance  0.006 m
+accept    4 53
+roundtrip 1000
+
+tolerance  0.006 m
+accept    5 53
+roundtrip 1000
+
+tolerance  0.006 m
+accept    6 53
+roundtrip 1000
+
+tolerance  0.006 m
+accept    7 53
+roundtrip 1000
+
+tolerance  0.006 m
+accept    8 53
+roundtrip 1000
+
+tolerance  0.006 m
+accept    9 53
+roundtrip 1000
+
+tolerance  0.006 m
+accept    10 53
+roundtrip 1000
+
+tolerance  0.006 m
+accept    11 53
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5103.1.gie b/test/gigs/5103.1.gie
new file mode 100644
index 0000000..c972b73
--- /dev/null
+++ b/test/gigs/5103.1.gie
@@ -0,0 +1,211 @@
+--------------------------------------------------------------------------------
+
+Test 5103 (part 1), Lambert Conic Conformal (2SP), v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4313 +inv
+           +step +init=epsg:31370
+
+tolerance  30 mm
+--------------------------------------------------------------------------------
+accept    5 58
+expect    187742.7 969521.653
+
+accept    5 57
+expect    188698.877 857277.135
+
+accept    5 56
+expect    189652.853 745291.184
+
+accept    5 55
+expect    190604.967 633523.672
+
+accept    5 54
+expect    191555.55 521935.9
+
+accept    5 53
+expect    192504.921 410490.433
+
+accept    5.3876389 52.1561606
+expect    219843.841 316827.604
+
+accept    4 51
+expect    124202.936 187756.876
+
+accept    4 50
+expect    123652.406 76521.628
+
+accept    4 49
+expect    123101.889 -34711.068
+
+accept    3.3137281 47.9752611
+expect    71254.553 -148236.592
+
+accept    3 53
+expect    58108.966 411155.591
+
+accept    4 53
+expect    125304.704 410370.504
+
+accept    5 53
+expect    192504.921 410490.433
+
+accept    6 53
+expect    259697.429 411515.356
+
+accept    7 53
+expect    326870.04 413445.087
+
+accept    8 53
+expect    394010.571 416279.276
+
+accept    9 53
+expect    461106.844 420017.408
+
+accept    10 53
+expect    528146.69 424658.807
+
+accept    11 53
+expect    595117.95 430202.63
+
+
+--------------------------------------------------------------------------------
+operation  proj=pipeline
+           step init=epsg:31370 inv
+           step init=epsg:4313
+
+tolerance  30 mm
+--------------------------------------------------------------------------------
+accept    187742.7 969521.653
+expect    5 58
+
+accept    188698.877 857277.135
+expect    5 57
+
+accept    189652.853 745291.184
+expect    5 56
+
+accept    190604.967 633523.672
+expect    5 55
+
+accept    191555.55 521935.9
+expect    5 54
+
+accept    192504.921 410490.433
+expect    5 53
+
+accept    219843.841 316827.604
+expect    5.3876389 52.1561606
+
+accept    124202.936 187756.876
+expect    4 51
+
+accept    123652.406 76521.628
+expect    4 50
+
+accept    123101.889 -34711.068
+expect    4 49
+
+accept    71254.553 -148236.592
+expect    3.3137281 47.9752611
+
+accept    58108.966 411155.591
+expect    3 53
+
+accept    125304.704 410370.504
+expect    4 53
+
+accept    192504.921 410490.433
+expect    5 53
+
+accept    259697.429 411515.356
+expect    6 53
+
+accept    326870.04 413445.087
+expect    7 53
+
+accept    394010.571 416279.276
+expect    8 53
+
+accept    461106.844 420017.408
+expect    9 53
+
+accept    528146.69 424658.807
+expect    10 53
+
+accept    595117.95 430202.63
+expect    11 53
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline   towgs84=0,0,0   # turn off dual datum shift
+           +step +init=epsg:4313 +inv
+           +step +init=epsg:31370
+
+tolerance  6 mm
+--------------------------------------------------------------------------------
+accept    5 58
+roundtrip 1000
+
+accept    5 57
+roundtrip 1000
+
+accept    5 56
+roundtrip 1000
+
+accept    5 55
+roundtrip 1000
+
+accept    5 54
+roundtrip 1000
+
+accept    5 53
+roundtrip 1000
+
+accept    5.3876389 52.1561606
+roundtrip 1000
+
+accept    4 51
+roundtrip 1000
+
+accept    4 50
+roundtrip 1000
+
+accept    4 49
+roundtrip 1000
+
+accept    3.3137281 47.9752611
+roundtrip 1000
+
+accept    3 53
+roundtrip 1000
+
+accept    4 53
+roundtrip 1000
+
+accept    5 53
+roundtrip 1000
+
+accept    6 53
+roundtrip 1000
+
+accept    7 53
+roundtrip 1000
+
+accept    8 53
+roundtrip 1000
+
+accept    9 53
+roundtrip 1000
+
+accept    10 53
+roundtrip 1000
+
+accept    11 53
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5103.2.gie b/test/gigs/5103.2.gie
new file mode 100644
index 0000000..3975e9d
--- /dev/null
+++ b/test/gigs/5103.2.gie
@@ -0,0 +1,144 @@
+--------------------------------------------------------------------------------
+
+Test 5103 (part 2), Lambert Conic Conformal (2SP), v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4152 +inv
+           +step +init=epsg:2921
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    -110 49
+expect    2003937.27 6452491.7
+
+tolerance  0.03 m
+accept    -110 47
+expect    2016621.93 5717728.61
+
+tolerance  0.03 m
+accept    -110 45
+expect    2029255.57 4985920.56
+
+tolerance  0.03 m
+accept    -110 43
+expect    2041855.08 4256089.74
+
+tolerance  0.03 m
+accept    -110 41
+expect    2054436.57 3527302.73
+
+tolerance  0.03 m
+accept    -110 41
+expect    2054436.57 3527302.73
+
+tolerance  0.03 m
+accept    -108 41
+expect    2606245.52 3543182.55
+
+tolerance  0.03 m
+accept    -106 41
+expect    3157542.86 3571757.39
+
+tolerance  0.03 m
+accept    -104 41
+expect    3708036.57 3613012.12
+
+tolerance  0.03 m
+accept    -102 41
+expect    4257435.06 3666924.89
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:2921 +inv
+           +step +init=epsg:4152
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    2003937.27 6452491.7
+expect    -110 49
+
+tolerance  0.03 m
+accept    2016621.93 5717728.61
+expect    -110 47
+
+tolerance  0.03 m
+accept    2029255.57 4985920.56
+expect    -110 45
+
+tolerance  0.03 m
+accept    2041855.08 4256089.74
+expect    -110 43
+
+tolerance  0.03 m
+accept    2054436.57 3527302.73
+expect    -110 41
+
+tolerance  0.03 m
+accept    2054436.57 3527302.73
+expect    -110 41
+
+tolerance  0.03 m
+accept    2606245.52 3543182.55
+expect    -108 41
+
+tolerance  0.03 m
+accept    3157542.86 3571757.39
+expect    -106 41
+
+tolerance  0.03 m
+accept    3708036.57 3613012.12
+expect    -104 41
+
+tolerance  0.03 m
+accept    4257435.06 3666924.89
+expect    -102 41
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4152 +inv
+           +step +init=epsg:2921
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    -110 49
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 47
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 45
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 43
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -108 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -106 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -104 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -102 41
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5103.3.gie b/test/gigs/5103.3.gie
new file mode 100644
index 0000000..b896513
--- /dev/null
+++ b/test/gigs/5103.3.gie
@@ -0,0 +1,144 @@
+--------------------------------------------------------------------------------
+
+Test 5103 (part 3), Lambert Conic Conformal (2SP), v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4152 +inv
+           +step +init=epsg:3568
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    -110 49
+expect    2003933.27 6452478.8
+
+tolerance  0.03 m
+accept    -110 47
+expect    2016617.9 5717717.18
+
+tolerance  0.03 m
+accept    -110 45
+expect    2029251.51 4985910.59
+
+tolerance  0.03 m
+accept    -110 43
+expect    2041851.0 4256081.23
+
+tolerance  0.03 m
+accept    -110 41
+expect    2054432.46 3527295.67
+
+tolerance  0.03 m
+accept    -110 41
+expect    2054432.46 3527295.67
+
+tolerance  0.03 m
+accept    -108 41
+expect    2606240.3 3543175.46
+
+tolerance  0.03 m
+accept    -106 41
+expect    3157536.54 3571750.25
+
+tolerance  0.03 m
+accept    -104 41
+expect    3708029.16 3613004.9
+
+tolerance  0.03 m
+accept    -102 41
+expect    4257426.54 3666917.56
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:3568 +inv
+           +step +init=epsg:4152
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    2003933.27 6452478.8
+expect    -110 49
+
+tolerance  0.03 m
+accept    2016617.9 5717717.18
+expect    -110 47
+
+tolerance  0.03 m
+accept    2029251.51 4985910.59
+expect    -110 45
+
+tolerance  0.03 m
+accept    2041851.0 4256081.23
+expect    -110 43
+
+tolerance  0.03 m
+accept    2054432.46 3527295.67
+expect    -110 41
+
+tolerance  0.03 m
+accept    2054432.46 3527295.67
+expect    -110 41
+
+tolerance  0.03 m
+accept    2606240.3 3543175.46
+expect    -108 41
+
+tolerance  0.03 m
+accept    3157536.54 3571750.25
+expect    -106 41
+
+tolerance  0.03 m
+accept    3708029.16 3613004.9
+expect    -104 41
+
+tolerance  0.03 m
+accept    4257426.54 3666917.56
+expect    -102 41
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4152 +inv
+           +step +init=epsg:3568
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    -110 49
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 47
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 45
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 43
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -110 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -108 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -106 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -104 41
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -102 41
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5105.2.gie b/test/gigs/5105.2.gie
new file mode 100644
index 0000000..190c917
--- /dev/null
+++ b/test/gigs/5105.2.gie
@@ -0,0 +1,168 @@
+--------------------------------------------------------------------------------
+
+Test 5105 (part 2), Oblique Mercator (variant B), v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4237 +inv
+           +step +init=epsg:23700
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    16 48.5
+expect    424714.235 355124.6
+
+tolerance  0.05 m
+accept    17.2 48.0
+expect    512056.188 296756.716
+
+tolerance  0.05 m
+accept    17.5826505556 47.6361347222
+expect    539847.765 255701.086
+
+tolerance  0.05 m
+accept    19.0485716667 47.1443936111
+expect    650000 200000
+
+tolerance  0.05 m
+accept    19.2234294444 46.8756683333
+expect    663329.053 170142.318
+
+tolerance  0.05 m
+accept    20.1357405556 46.3703011111
+expect    733651.455 114532.099
+
+tolerance  0.05 m
+accept    21.4 45.7
+expect    833148.855 42191.482
+
+tolerance  0.05 m
+accept    22.3 49.3
+expect    886565.935 444656.613
+
+tolerance  0.05 m
+accept    21.2941986111 48.4899747222
+expect    815999.993 351999.998
+
+tolerance  0.05 m
+accept    19.2234294444 46.8756683333
+expect    663329.053 170142.318
+
+tolerance  0.05 m
+accept    17.6191536111 46.0687463889
+expect    539403.958 81440.103
+
+tolerance  0.05 m
+accept    16.36 45.5
+expect    439836.709 20816.456
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:23700 +inv
+           +step +init=epsg:4237
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    424714.235 355124.6
+expect    16 48.5
+
+tolerance  0.05 m
+accept    512056.188 296756.716
+expect    17.2 48.0
+
+tolerance  0.05 m
+accept    539847.765 255701.086
+expect    17.5826505556 47.6361347222
+
+tolerance  0.05 m
+accept    650000 200000
+expect    19.0485716667 47.1443936111
+
+tolerance  0.05 m
+accept    663329.053 170142.318
+expect    19.2234294444 46.8756683333
+
+tolerance  0.05 m
+accept    733651.455 114532.099
+expect    20.1357405556 46.3703011111
+
+tolerance  0.05 m
+accept    833148.855 42191.482
+expect    21.4 45.7
+
+tolerance  0.05 m
+accept    886565.935 444656.613
+expect    22.3 49.3
+
+tolerance  0.05 m
+accept    815999.993 351999.998
+expect    21.2941986111 48.4899747222
+
+tolerance  0.05 m
+accept    663329.053 170142.318
+expect    19.2234294444 46.8756683333
+
+tolerance  0.05 m
+accept    539403.958 81440.103
+expect    17.6191536111 46.0687463889
+
+tolerance  0.05 m
+accept    439836.709 20816.456
+expect    16.36 45.5
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4237 +inv
+           +step +init=epsg:23700
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    16 48.5
+roundtrip 1000
+
+tolerance  0.006 m
+accept    17.2 48.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    17.5826505556 47.6361347222
+roundtrip 1000
+
+tolerance  0.006 m
+accept    19.0485716667 47.1443936111
+roundtrip 1000
+
+tolerance  0.006 m
+accept    19.2234294444 46.8756683333
+roundtrip 1000
+
+tolerance  0.006 m
+accept    20.1357405556 46.3703011111
+roundtrip 1000
+
+tolerance  0.006 m
+accept    21.4 45.7
+roundtrip 1000
+
+tolerance  0.006 m
+accept    22.3 49.3
+roundtrip 1000
+
+tolerance  0.006 m
+accept    21.2941986111 48.4899747222
+roundtrip 1000
+
+tolerance  0.006 m
+accept    19.2234294444 46.8756683333
+roundtrip 1000
+
+tolerance  0.006 m
+accept    17.6191536111 46.0687463889
+roundtrip 1000
+
+tolerance  0.006 m
+accept    16.36 45.5
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5106.gie b/test/gigs/5106.gie
new file mode 100644
index 0000000..6c5940e
--- /dev/null
+++ b/test/gigs/5106.gie
@@ -0,0 +1,300 @@
+--------------------------------------------------------------------------------
+
+Test 5106, Hotine Oblique Mercator (variant A), v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4742 +inv
+           +step +init=epsg:3376
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    117 12
+expect    807919.144 1329535.334
+
+tolerance  0.05 m
+accept    117 10
+expect    808784.981 1107678.473
+
+tolerance  0.05 m
+accept    117 9
+expect    809334.177 996918.212
+
+tolerance  0.05 m
+accept    117 8
+expect    809939.302 886240.183
+
+tolerance  0.05 m
+accept    116.846552222 6.87845833333
+expect    793704.631 762081.047
+
+tolerance  0.05 m
+accept    117 6
+expect    811253.303 665041.265
+
+tolerance  0.05 m
+accept    117 5
+expect    811930.345 554475.627
+
+tolerance  0.05 m
+accept    117 4
+expect    812599.582 443902.706
+
+tolerance  0.05 m
+accept    115 4
+expect    590521.147 442890.861
+
+tolerance  0.05 m
+accept    117 3
+expect    813245.133 333300.13
+
+tolerance  0.05 m
+accept    117 2
+expect    813851.067 222645.511
+
+tolerance  0.05 m
+accept    117 1
+expect    814401.375 111916.452
+
+tolerance  0.05 m
+accept    109.685820833 -0.000173333333333
+expect    0 0
+
+tolerance  0.05 m
+accept    123 6
+expect    1475669.281 673118.573
+
+tolerance  0.05 m
+accept    122 6
+expect    1364854.862 671146.254
+
+tolerance  0.05 m
+accept    121 6
+expect    1254086.173 669446.249
+
+tolerance  0.05 m
+accept    120 6
+expect    1143352.598 668002.074
+
+tolerance  0.05 m
+accept    119 6
+expect    1032643.312 666797.354
+
+tolerance  0.05 m
+accept    118 6
+expect    921947.286 665815.815
+
+tolerance  0.05 m
+accept    117 6
+expect    811253.303 665041.265
+
+tolerance  0.05 m
+accept    116 6
+expect    700549.965 664457.586
+
+tolerance  0.05 m
+accept    115 6
+expect    589825.706 664048.715
+
+tolerance  0.05 m
+accept    114 6
+expect    479068.802 663798.63
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:3376 +inv
+           +step +init=epsg:4742
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    807919.144 1329535.334
+expect    117 12
+
+tolerance  0.05 m
+accept    808784.981 1107678.473
+expect    117 10
+
+tolerance  0.05 m
+accept    809334.177 996918.212
+expect    117 9
+
+tolerance  0.05 m
+accept    809939.302 886240.183
+expect    117 8
+
+tolerance  0.05 m
+accept    793704.631 762081.047
+expect    116.846552222 6.87845833333
+
+tolerance  0.05 m
+accept    811253.303 665041.265
+expect    117 6
+
+tolerance  0.05 m
+accept    811930.345 554475.627
+expect    117 5
+
+tolerance  0.05 m
+accept    812599.582 443902.706
+expect    117 4
+
+tolerance  0.05 m
+accept    590521.147 442890.861
+expect    115 4
+
+tolerance  0.05 m
+accept    813245.133 333300.13
+expect    117 3
+
+tolerance  0.05 m
+accept    813851.067 222645.511
+expect    117 2
+
+tolerance  0.05 m
+accept    814401.375 111916.452
+expect    117 1
+
+tolerance  0.05 m
+accept    0 0
+expect    109.685820833 -0.000173333333333
+
+tolerance  0.05 m
+accept    1475669.281 673118.573
+expect    123 6
+
+tolerance  0.05 m
+accept    1364854.862 671146.254
+expect    122 6
+
+tolerance  0.05 m
+accept    1254086.173 669446.249
+expect    121 6
+
+tolerance  0.05 m
+accept    1143352.598 668002.074
+expect    120 6
+
+tolerance  0.05 m
+accept    1032643.312 666797.354
+expect    119 6
+
+tolerance  0.05 m
+accept    921947.286 665815.815
+expect    118 6
+
+tolerance  0.05 m
+accept    811253.303 665041.265
+expect    117 6
+
+tolerance  0.05 m
+accept    700549.965 664457.586
+expect    116 6
+
+tolerance  0.05 m
+accept    589825.706 664048.715
+expect    115 6
+
+tolerance  0.05 m
+accept    479068.802 663798.63
+expect    114 6
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4742 +inv
+           +step +init=epsg:3376
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    117 12
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 10
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 9
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 8
+roundtrip 1000
+
+tolerance  0.006 m
+accept    116.846552222 6.87845833333
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 5
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 4
+roundtrip 1000
+
+tolerance  0.006 m
+accept    115 4
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 3
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 2
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 1
+roundtrip 1000
+
+tolerance  0.006 m
+accept    109.685820833 -0.000173333333333
+roundtrip 1000
+
+tolerance  0.006 m
+accept    123 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    122 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    121 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    120 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    119 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    118 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    117 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    116 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    115 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    114 6
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5107.gie b/test/gigs/5107.gie
new file mode 100644
index 0000000..f78e9c2
--- /dev/null
+++ b/test/gigs/5107.gie
@@ -0,0 +1,180 @@
+--------------------------------------------------------------------------------
+
+Test 5107, American Polyconic, v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4674 +inv
+           +step +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 
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    -54 0
+expect    5000000.0 10000000.0
+
+tolerance  0.05 m
+accept    -45 6
+expect    5996378.70982 10671650.0559
+
+tolerance  0.05 m
+accept    -45 0
+expect    6001875.41714 10000000.0
+
+tolerance  0.05 m
+accept    -45 -6
+expect    5996378.70982 9328349.94408
+
+tolerance  0.05 m
+accept    -41 -13
+expect    6409689.58688 8526306.26193
+
+tolerance  0.05 m
+accept    -38 -20
+expect    6671808.91963 7707735.72988
+
+tolerance  0.05 m
+accept    -37 -24
+expect    6725584.49173 7240461.99578
+
+tolerance  0.05 m
+accept    -36 -30
+expect    6729619.73995 6543762.57644
+
+tolerance  0.05 m
+accept    -57 -30
+expect    4710574.22344 6676097.81117
+
+tolerance  0.05 m
+accept    -54 -29.3674766667
+expect    5000000.0 6750000.0
+
+tolerance  0.05 m
+accept    -47 -27.5
+expect    5691318.14689 6937461.05067
+
+tolerance  0.05 m
+accept    -37 -24
+expect    6725584.49173 7240461.99578
+
+tolerance  0.05 m
+accept    -30 -22.5
+expect    7458947.70133 7313327.31691
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +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  +inv
+           +step +init=epsg:4674
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    5000000.0 10000000.0
+expect    -54 0
+
+tolerance  0.05 m
+accept    5996378.70982 10671650.0559
+expect    -45 6
+
+tolerance  0.05 m
+accept    6001875.41714 10000000.0
+expect    -45 0
+
+tolerance  0.05 m
+accept    5996378.70982 9328349.94408
+expect    -45 -6
+
+tolerance  0.05 m
+accept    6409689.58688 8526306.26193
+expect    -41 -13
+
+tolerance  0.05 m
+accept    6671808.91963 7707735.72988
+expect    -38 -20
+
+tolerance  0.05 m
+accept    6725584.49173 7240461.99578
+expect    -37 -24
+
+tolerance  0.05 m
+accept    6729619.73995 6543762.57644
+expect    -36 -30
+
+tolerance  0.05 m
+accept    4710574.22344 6676097.81117
+expect    -57 -30
+
+tolerance  0.05 m
+accept    5000000.0 6750000.0
+expect    -54 -29.3674766667
+
+tolerance  0.05 m
+accept    5691318.14689 6937461.05067
+expect    -47 -27.5
+
+tolerance  0.05 m
+accept    6725584.49173 7240461.99578
+expect    -37 -24
+
+tolerance  0.05 m
+accept    7458947.70133 7313327.31691
+expect    -30 -22.5
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4674 +inv
+           +step +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 
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    -54 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -45 6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -45 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -45 -6
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -41 -13
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -38 -20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -37 -24
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -36 -30
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -57 -30
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -54 -29.3674766667
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -47 -27.5
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -37 -24
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -30 -22.5
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5109.gie b/test/gigs/5109.gie
new file mode 100644
index 0000000..a104e66
--- /dev/null
+++ b/test/gigs/5109.gie
@@ -0,0 +1,180 @@
+--------------------------------------------------------------------------------
+
+Test 5109, Albers Equal Area, v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4283 +inv
+           +step +init=epsg:3577
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    132 0
+expect    0 0
+
+tolerance  0.05 m
+accept    132 -27
+expect    0 -2926820.89
+
+tolerance  0.05 m
+accept    140 0
+expect    966973.98 -30285.6
+
+tolerance  0.05 m
+accept    140 -20
+expect    832799.36 -2170181.93
+
+tolerance  0.05 m
+accept    140 -40
+expect    693250.21 -4395794.49
+
+tolerance  0.05 m
+accept    140 -60
+expect    567313.29 -6404311.16
+
+tolerance  0.05 m
+accept    140 -80
+expect    486878.674 -7687130.029
+
+tolerance  0.05 m
+accept    120 -60
+expect    -850274.75 -6426505.13
+
+tolerance  0.05 m
+accept    130 -60
+expect    -141915.26 -6387653.78
+
+tolerance  0.05 m
+accept    140 -60
+expect    567313.29 -6404311.16
+
+tolerance  0.05 m
+accept    150 -60
+expect    1273067.747 -6476375.276
+
+tolerance  0.05 m
+accept    160 -60
+expect    1971026.26 -6603404.82
+
+tolerance  0.05 m
+accept    170 -60
+expect    2656914.716 -6784621.89
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:3577 +inv
+           +step +init=epsg:4283
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    0 0
+expect    132 0
+
+tolerance  0.05 m
+accept    0 -2926820.89
+expect    132 -27
+
+tolerance  0.05 m
+accept    966973.98 -30285.6
+expect    140 0
+
+tolerance  0.05 m
+accept    832799.36 -2170181.93
+expect    140 -20
+
+tolerance  0.05 m
+accept    693250.21 -4395794.49
+expect    140 -40
+
+tolerance  0.05 m
+accept    567313.29 -6404311.16
+expect    140 -60
+
+tolerance  0.05 m
+accept    486878.674 -7687130.029
+expect    140 -80
+
+tolerance  0.05 m
+accept    -850274.75 -6426505.13
+expect    120 -60
+
+tolerance  0.05 m
+accept    -141915.26 -6387653.78
+expect    130 -60
+
+tolerance  0.05 m
+accept    567313.29 -6404311.16
+expect    140 -60
+
+tolerance  0.05 m
+accept    1273067.747 -6476375.276
+expect    150 -60
+
+tolerance  0.05 m
+accept    1971026.26 -6603404.82
+expect    160 -60
+
+tolerance  0.05 m
+accept    2656914.716 -6784621.89
+expect    170 -60
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4283 +inv
+           +step +init=epsg:3577
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    132 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    132 -27
+roundtrip 1000
+
+tolerance  0.006 m
+accept    140 0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    140 -20
+roundtrip 1000
+
+tolerance  0.006 m
+accept    140 -40
+roundtrip 1000
+
+tolerance  0.006 m
+accept    140 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    140 -80
+roundtrip 1000
+
+tolerance  0.006 m
+accept    120 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    130 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    140 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    150 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    160 -60
+roundtrip 1000
+
+tolerance  0.006 m
+accept    170 -60
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5111.1.gie b/test/gigs/5111.1.gie
new file mode 100644
index 0000000..335e1d6
--- /dev/null
+++ b/test/gigs/5111.1.gie
@@ -0,0 +1,450 @@
+--------------------------------------------------------------------------------
+
+Test 5111 (part 1), Mercator (variant A), v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+# Batavia
+<4211> +proj=longlat +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +no_defs  <>
+# Batavia / NEIEZ
+<3001> +proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +units=m +no_defs  <>
+
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline towgs84=0,0,0
+           +step +init=epsg:4211 +inv
+           +step +init=epsg:3001
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    100.0876483 77.6534822
+expect    2800000.0 15000000.0
+
+tolerance  0.05 m
+accept    100.0876483 73.1442856
+expect    2800000.0 13000000.0
+
+tolerance  0.05 m
+accept    100.0876483 67.0518325
+expect    2800000.0 11000000.0
+
+tolerance  0.05 m
+accept    100.0876483 58.9140458
+expect    2800000.0 9000000.0
+
+tolerance  0.05 m
+accept    100.0876483 48.2638981
+expect    2800000.0 7000000.0
+
+tolerance  0.05 m
+accept    100.0876483 34.8029044
+expect    2800000.0 5000000.0
+
+tolerance  0.05 m
+accept    100.0876483 18.7048581
+expect    2800000.0 3000000.0
+
+tolerance  0.05 m
+accept    100.0876483 0.9071392
+expect    2800000.0 1000000.0
+
+tolerance  0.05 m
+accept    110.0 0.0
+expect    3900000.0 900000.0
+
+tolerance  0.05 m
+accept    100.0876483 -0.9071392
+expect    2800000.0 800000.0
+
+tolerance  0.05 m
+accept    100.0876483 -1.8140483
+expect    2800000.0 700000.0
+
+tolerance  0.05 m
+accept    100.0876483 -2.0
+expect    2800000.0 679490.65
+
+tolerance  0.05 m
+accept    100.0876483 -3.6262553
+expect    2800000.0 500000.0
+
+tolerance  0.05 m
+accept    100.0876483 -4.531095
+expect    2800000.0 400000.0
+
+tolerance  0.05 m
+accept    100.0876483 -5.4347892
+expect    2800000.0 300000.0
+
+tolerance  0.05 m
+accept    100.0876483 -6.3371111
+expect    2800000.0 200000.0
+
+tolerance  0.05 m
+accept    100.0876483 -7.2378372
+expect    2800000.0 100000.0
+
+tolerance  0.05 m
+accept    74.8562083 -8.136745
+expect    0.0 0.0
+
+tolerance  0.05 m
+accept    -71.0 -2.0
+expect    23764105.84 679490.65
+
+tolerance  0.05 m
+accept    -90.0 -2.0
+expect    21655625.33 679490.65
+
+tolerance  0.05 m
+accept    -120.0 -2.0
+expect    18326445.58 679490.65
+
+tolerance  0.05 m
+accept    -150.0 -2.0
+expect    14997265.83 679490.65
+
+tolerance  0.05 m
+accept    180.0 -2.0
+expect    11668086.08 679490.65
+
+tolerance  0.05 m
+accept    150.0 -2.0
+expect    8338906.33 679490.65
+
+tolerance  0.05 m
+accept    120.0 -2.0
+expect    5009726.58 679490.65
+
+tolerance  0.05 m
+accept    110.0 -2.0
+expect    3900000.0 679490.65
+
+tolerance  0.05 m
+accept    106.8077194 -2.0
+expect    3545744.14 679490.65
+
+tolerance  0.05 m
+accept    100.0876483 -2.0
+expect    2800000.0 679490.65
+
+tolerance  0.05 m
+accept    90.0 -2.0
+expect    1680546.83 679490.65
+
+tolerance  0.05 m
+accept    60.0 -2.0
+expect    -1648632.92 679490.65
+
+tolerance  0.05 m
+accept    30.0 -2.0
+expect    -4977812.67 679490.65
+
+tolerance  0.05 m
+accept    0.0 -2.0
+expect    -8306992.42 679490.65
+
+tolerance  0.05 m
+accept    -30.0 -2.0
+expect    -11636172.17 679490.65
+
+tolerance  0.05 m
+accept    -60.0 -2.0
+expect    -14965351.92 679490.65
+
+tolerance  0.05 m
+accept    -69.0 -2.0
+expect    -15964105.84 679490.65
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline towgs84=0,0,0
+           +step +init=epsg:3001 +inv
+           +step +init=epsg:4211
+--------------------------------------------------------------------------------
+tolerance  0.05 m
+accept    2800000.0 15000000.0
+expect    100.0876483 77.6534822
+
+tolerance  0.05 m
+accept    2800000.0 13000000.0
+expect    100.0876483 73.1442856
+
+tolerance  0.05 m
+accept    2800000.0 11000000.0
+expect    100.0876483 67.0518325
+
+tolerance  0.05 m
+accept    2800000.0 9000000.0
+expect    100.0876483 58.9140458
+
+tolerance  0.05 m
+accept    2800000.0 7000000.0
+expect    100.0876483 48.2638981
+
+tolerance  0.05 m
+accept    2800000.0 5000000.0
+expect    100.0876483 34.8029044
+
+tolerance  0.05 m
+accept    2800000.0 3000000.0
+expect    100.0876483 18.7048581
+
+tolerance  0.05 m
+accept    2800000.0 1000000.0
+expect    100.0876483 0.9071392
+
+tolerance  0.05 m
+accept    3900000.0 900000.0
+expect    110.0 0.0
+
+tolerance  0.05 m
+accept    2800000.0 800000.0
+expect    100.0876483 -0.9071392
+
+tolerance  0.05 m
+accept    2800000.0 700000.0
+expect    100.0876483 -1.8140483
+
+tolerance  0.05 m
+accept    2800000.0 679490.65
+expect    100.0876483 -2.0
+
+tolerance  0.05 m
+accept    2800000.0 500000.0
+expect    100.0876483 -3.6262553
+
+tolerance  0.05 m
+accept    2800000.0 400000.0
+expect    100.0876483 -4.531095
+
+tolerance  0.05 m
+accept    2800000.0 300000.0
+expect    100.0876483 -5.4347892
+
+tolerance  0.05 m
+accept    2800000.0 200000.0
+expect    100.0876483 -6.3371111
+
+tolerance  0.05 m
+accept    2800000.0 100000.0
+expect    100.0876483 -7.2378372
+
+tolerance  0.05 m
+accept    0.0 0.0
+expect    74.8562083 -8.136745
+
+tolerance  0.05 m
+accept    23764105.84 679490.65
+expect    -71.0 -2.0
+
+tolerance  0.05 m
+accept    21655625.33 679490.65
+expect    -90.0 -2.0
+
+tolerance  0.05 m
+accept    18326445.58 679490.65
+expect    -120.0 -2.0
+
+tolerance  0.05 m
+accept    14997265.83 679490.65
+expect    -150.0 -2.0
+
+tolerance  0.05 m
+accept    11668086.08 679490.65
+expect    180.0 -2.0
+
+tolerance  0.05 m
+accept    8338906.33 679490.65
+expect    150.0 -2.0
+
+tolerance  0.05 m
+accept    5009726.58 679490.65
+expect    120.0 -2.0
+
+tolerance  0.05 m
+accept    3900000.0 679490.65
+expect    110.0 -2.0
+
+tolerance  0.05 m
+accept    3545744.14 679490.65
+expect    106.8077194 -2.0
+
+tolerance  0.05 m
+accept    2800000.0 679490.65
+expect    100.0876483 -2.0
+
+tolerance  0.05 m
+accept    1680546.83 679490.65
+expect    90.0 -2.0
+
+tolerance  0.05 m
+accept    -1648632.92 679490.65
+expect    60.0 -2.0
+
+tolerance  0.05 m
+accept    -4977812.67 679490.65
+expect    30.0 -2.0
+
+tolerance  0.05 m
+accept    -8306992.42 679490.65
+expect    0.0 -2.0
+
+tolerance  0.05 m
+accept    -11636172.17 679490.65
+expect    -30.0 -2.0
+
+tolerance  0.05 m
+accept    -14965351.92 679490.65
+expect    -60.0 -2.0
+
+tolerance  0.05 m
+accept    -15964105.84 679490.65
+expect    -69.0 -2.0
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline towgs84=0,0,0
+           +step +init=epsg:4211 +inv
+           +step +init=epsg:3001
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    100.0876483 77.6534822
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 73.1442856
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 67.0518325
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 58.9140458
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 48.2638981
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 34.8029044
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 18.7048581
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 0.9071392
+roundtrip 1000
+
+tolerance  0.006 m
+accept    110.0 0.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 -0.9071392
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 -1.8140483
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 -3.6262553
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 -4.531095
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 -5.4347892
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 -6.3371111
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 -7.2378372
+roundtrip 1000
+
+tolerance  0.006 m
+accept    74.8562083 -8.136745
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -71.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -90.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -120.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -150.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    180.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    150.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    120.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    110.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    106.8077194 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    100.0876483 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    90.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    60.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    30.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    0.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -30.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -60.0 -2.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    -69.0 -2.0
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5112.gie b/test/gigs/5112.gie
new file mode 100644
index 0000000..207632d
--- /dev/null
+++ b/test/gigs/5112.gie
@@ -0,0 +1,75 @@
+--------------------------------------------------------------------------------
+
+Test 5112, Mercator (variant B),  v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  proj=pipeline
+           step init=epsg:4284 inv
+           step init=epsg:3388
+
+tolerance 50 mm
+--------------------------------------------------------------------------------
+accept    51.0 42.0
+expect    0.0 3819897.85
+
+accept    51.0 0.0
+expect    0.0 0.0
+
+accept    57.0 0.0
+expect    497112.88 0.0
+
+accept    54.0 20.5
+expect    248556.44 1724781.5
+
+accept    67.0 -41.0
+expect    1325634.35 -3709687.25
+
+--------------------------------------------------------------------------------
+operation  proj=pipeline
+           step init=epsg:3388 inv
+           step init=epsg:4284
+
+tolerance 50 mm
+--------------------------------------------------------------------------------
+accept    0.0 3819897.85
+expect    51.0 42.0
+
+accept    0.0 0.0
+expect    51.0 0.0
+
+accept    497112.88 0.0
+expect    57.0 0.0
+
+accept    248556.44 1724781.5
+expect    54.0 20.5
+
+accept    1325634.35 -3709687.25
+expect    67.0 -41.0
+
+--------------------------------------------------------------------------------
+operation proj=pipeline towgs84=0,0,0
+          step init=epsg:4284 inv
+          step init=epsg:3388
+
+tolerance 6 mm
+--------------------------------------------------------------------------------
+accept    51.0 42.0
+roundtrip 1000
+
+accept    51.0 0.0
+roundtrip 1000
+
+accept    57.0 0.0
+roundtrip 1000
+
+accept    54.0 20.5
+roundtrip 1000
+
+accept    67.0 -41.0
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5113.gie b/test/gigs/5113.gie
new file mode 100644
index 0000000..5c3904e
--- /dev/null
+++ b/test/gigs/5113.gie
@@ -0,0 +1,84 @@
+--------------------------------------------------------------------------------
+
+Test 5113, Transverse Mercator (South Oriented), v2-0_2011-06-28.
+
+--------------------------------------------------------------------------------
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4148 +inv
+           +step +init=epsg:2049
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    22.5 0.0
+expect    -166998.44 0.0
+
+tolerance  0.03 m
+accept    21.5 -25.0
+expect    -50475.46 2766147.25
+
+tolerance  0.03 m
+accept    20.5 -30.0
+expect    48243.45 3320218.65
+
+tolerance  0.03 m
+accept    19.5 -35.0
+expect    136937.65 3875621.18
+
+tolerance  0.03 m
+accept    19.5 -35.0
+expect    136937.65 3875621.18
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:2049 +inv
+           +step +init=epsg:4148
+--------------------------------------------------------------------------------
+tolerance  0.03 m
+accept    -166998.44 0.0
+expect    22.5 0.0
+
+tolerance  0.03 m
+accept    -50475.46 2766147.25
+expect    21.5 -25.0
+
+tolerance  0.03 m
+accept    48243.45 3320218.65
+expect    20.5 -30.0
+
+tolerance  0.03 m
+accept    136937.65 3875621.18
+expect    19.5 -35.0
+
+tolerance  0.03 m
+accept    136937.65 3875621.18
+expect    19.5 -35.0
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4148 +inv
+           +step +init=epsg:2049
+--------------------------------------------------------------------------------
+tolerance  0.006 m
+accept    22.5 0.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    21.5 -25.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    20.5 -30.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    19.5 -35.0
+roundtrip 1000
+
+tolerance  0.006 m
+accept    19.5 -35.0
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5201.gie b/test/gigs/5201.gie
new file mode 100644
index 0000000..532443a
--- /dev/null
+++ b/test/gigs/5201.gie
@@ -0,0 +1,354 @@
+--------------------------------------------------------------------------------
+
+Test 5201, Geographic Geocentric conversions, v2.0_2011-09-28. (EPSG 4979 - WGS84 3d has been replaced with EPSG code 4326 WGS84 2d).
+
+--------------------------------------------------------------------------------
+
+# WGS 84
+<4978> +proj=geocent +datum=WGS84 +units=m +no_defs  <>
+# WGS 84
+<4326> +proj=longlat +datum=WGS84 +no_defs  <>
+
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4978 +inv
+           +step +init=epsg:4326
+--------------------------------------------------------------------------------
+tolerance  0.01 m
+accept    -962479.5924 555687.8517 6260738.6526
+expect    150 80 1214.137
+
+tolerance  0.01 m
+accept    -962297.0059 555582.4354 6259542.961
+expect    150 80 0
+
+tolerance  0.01  m
+accept    -1598248.169 2768777.623 5501278.468
+expect    119.99524538 60.00475191 619.6317
+
+tolerance  0.01  m
+accept    -1598023.169 2768387.912 5500499.045
+expect    119.9952447 60.00475258 -280.3683
+
+tolerance  0.01  m
+accept    2764210.4054 4787752.865 3170468.5199
+expect    60 30 189.569
+
+tolerance  0.01  m
+accept    2764128.3196 4787610.6883 3170373.7354
+expect    60 30 0
+
+tolerance  0.01  m
+accept    6377934.396 -112 434
+expect    -0.00100615 0.00392509 -202.5882
+
+tolerance  0.01  m
+accept    6374934.396 -112 434
+expect    -0.00100662 0.00392695 -3202.5881
+
+tolerance  0.01  m
+accept    6367934.396 -112 434
+expect    -0.00100773 0.00393129 -10202.5881
+
+tolerance  0.01  m
+accept    2764128.3196 -4787610.6883 -3170373.7354
+expect    -60 -30 0
+
+tolerance  0.01  m
+accept    2763900.3489 -4787215.8313 -3170110.4974
+expect    -60 -30 -526.476
+
+tolerance  0.01  m
+accept    2763880.8633 -4787182.0813 -3170087.9974
+expect    -60 -30 -571.476
+
+tolerance  0.01  m
+accept    -1598023.169 -2768611.912 -5499631.045
+expect    -119.99323757 -59.99934884 -935.0995
+
+tolerance  0.01  m
+accept    -1597798.169 -2768222.201 -5498851.622
+expect    -119.99323663 -59.99934874 -1835.0995
+
+tolerance  0.01  m
+accept    -962297.0059 -555582.4354 -6259542.961
+expect    -150 -80 0
+
+tolerance  0.01  m
+accept    -962150.945 -555498.1071 -6258586.4616
+expect    -150 -80 -971.255
+
+tolerance  0.01  m
+accept    -961798.2951 -555294.5046 -6256277.0874
+expect    -150 -80 -3316.255
+
+tolerance  0.01  m
+accept    -2187336.719 -112 5971017.093
+expect    -179.99706624 70.00490733 -223.6178
+
+tolerance  0.01  m
+accept    -2904698.5551 -2904698.5551 4862789.0377
+expect    -135 50 0
+
+tolerance  0.01  m
+accept    371 -5783593.614 2679326.11
+expect    -89.99632465 25.00366329 -274.7286
+
+tolerance  0.01  m
+accept    6378137 0 0
+expect    0 0 0
+
+tolerance  0.01  m
+accept    -4087095.478 2977467.559 -3875457.429
+expect    143.92649252 -37.65282217 737.7182
+
+tolerance  0.01  m
+accept    -4085919.959 2976611.233 -3874335.274
+expect    143.92649211 -37.65282206 -1099.2288
+
+tolerance  0.01  m
+accept    -4084000.165 2975212.729 -3872502.631
+expect    143.92649143 -37.65282187 -4099.2288
+
+tolerance  0.01  m
+accept    -4079520.647 2971949.553 -3868226.465
+expect    143.92648984 -37.65282143 -11099.2288
+
+tolerance  0.01  m
+accept    -2904698.5551 2904698.5551 -4862789.0377
+expect    135 -50 0
+
+tolerance  0.01  m
+accept    -2187336.719 -112 -5970149.093
+expect    -179.99706624 -70.00224647 -1039.2896
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4326 +inv
+           +step +init=epsg:4978
+--------------------------------------------------------------------------------
+tolerance  0.01  m
+accept    150 80 1214.137
+expect    -962479.5924 555687.8517 6260738.6526
+
+tolerance  0.01  m
+accept    150 80 0
+expect    -962297.0059 555582.4354 6259542.961
+
+tolerance  0.01  m
+accept    119.99524538 60.00475191 619.6317
+expect    -1598248.169 2768777.623 5501278.468
+
+tolerance  0.01  m
+accept    119.9952447 60.00475258 -280.3683
+expect    -1598023.169 2768387.912 5500499.045
+
+tolerance  0.01  m
+accept    60 30 189.569
+expect    2764210.4054 4787752.865 3170468.5199
+
+tolerance  0.01  m
+accept    60 30 0
+expect    2764128.3196 4787610.6883 3170373.7354
+
+tolerance  0.01  m
+accept    -0.00100615 0.00392509 -202.5882
+expect    6377934.396 -112 434
+
+tolerance  0.01  m
+accept    -0.00100662 0.00392695 -3202.5881
+expect    6374934.396 -112 434
+
+tolerance  0.01  m
+accept    -0.00100773 0.00393129 -10202.5881
+expect    6367934.396 -112 434
+
+tolerance  0.01  m
+accept    -60 -30 0
+expect    2764128.3196 -4787610.6883 -3170373.7354
+
+tolerance  0.01  m
+accept    -60 -30 -526.476
+expect    2763900.3489 -4787215.8313 -3170110.4974
+
+tolerance  0.01  m
+accept    -60 -30 -571.476
+expect    2763880.8633 -4787182.0813 -3170087.9974
+
+tolerance  0.01  m
+accept    -119.99323757 -59.99934884 -935.0995
+expect    -1598023.169 -2768611.912 -5499631.045
+
+tolerance  0.01  m
+accept    -119.99323663 -59.99934874 -1835.0995
+expect    -1597798.169 -2768222.201 -5498851.622
+
+tolerance  0.01  m
+accept    -150 -80 0
+expect    -962297.0059 -555582.4354 -6259542.961
+
+tolerance  0.01  m
+accept    -150 -80 -971.255
+expect    -962150.945 -555498.1071 -6258586.4616
+
+tolerance  0.01  m
+accept    -150 -80 -3316.255
+expect    -961798.2951 -555294.5046 -6256277.0874
+
+tolerance  0.01  m
+accept    -179.99706624 70.00490733 -223.6178
+expect    -2187336.719 -112 5971017.093
+
+tolerance  0.01  m
+accept    -135 50 0
+expect    -2904698.5551 -2904698.5551 4862789.0377
+
+tolerance  0.01  m
+accept    -89.99632465 25.00366329 -274.7286
+expect    371 -5783593.614 2679326.11
+
+tolerance  0.01  m
+accept    0 0 0
+expect    6378137 0 0
+
+tolerance  0.01  m
+accept    143.92649252 -37.65282217 737.7182
+expect    -4087095.478 2977467.559 -3875457.429
+
+tolerance  0.01  m
+accept    143.92649211 -37.65282206 -1099.2288
+expect    -4085919.959 2976611.233 -3874335.274
+
+tolerance  0.01  m
+accept    143.92649143 -37.65282187 -4099.2288
+expect    -4084000.165 2975212.729 -3872502.631
+
+tolerance  0.01  m
+accept    143.92648984 -37.65282143 -11099.2288
+expect    -4079520.647 2971949.553 -3868226.465
+
+tolerance  0.01  m
+accept    135 -50 0
+expect    -2904698.5551 2904698.5551 -4862789.0377
+
+tolerance  0.01  m
+accept    -179.99706624 -70.00224647 -1039.2896
+expect    -2187336.719 -112 -5970149.093
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4978 +inv
+           +step +init=epsg:4326
+--------------------------------------------------------------------------------
+tolerance  0.01  m
+accept    -962479.5924 555687.8517 6260738.6526
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -962297.0059 555582.4354 6259542.961
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -1598248.169 2768777.623 5501278.468
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -1598023.169 2768387.912 5500499.045
+roundtrip 1000
+
+tolerance  0.01  m
+accept    2764210.4054 4787752.865 3170468.5199
+roundtrip 1000
+
+tolerance  0.01  m
+accept    2764128.3196 4787610.6883 3170373.7354
+roundtrip 1000
+
+tolerance  0.01  m
+accept    6377934.396 -112 434
+roundtrip 1000
+
+tolerance  0.01  m
+accept    6374934.396 -112 434
+roundtrip 1000
+
+tolerance  0.01  m
+accept    6367934.396 -112 434
+roundtrip 1000
+
+tolerance  0.01  m
+accept    2764128.3196 -4787610.6883 -3170373.7354
+roundtrip 1000
+
+tolerance  0.01  m
+accept    2763900.3489 -4787215.8313 -3170110.4974
+roundtrip 1000
+
+tolerance  0.01  m
+accept    2763880.8633 -4787182.0813 -3170087.9974
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -1598023.169 -2768611.912 -5499631.045
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -1597798.169 -2768222.201 -5498851.622
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -962297.0059 -555582.4354 -6259542.961
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -962150.945 -555498.1071 -6258586.4616
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -961798.2951 -555294.5046 -6256277.0874
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -2187336.719 -112 5971017.093
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -2904698.5551 -2904698.5551 4862789.0377
+roundtrip 1000
+
+tolerance  0.01  m
+accept    371 -5783593.614 2679326.11
+roundtrip 1000
+
+tolerance  0.01  m
+accept    6378137 0 0
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -4087095.478 2977467.559 -3875457.429
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -4085919.959 2976611.233 -3874335.274
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -4084000.165 2975212.729 -3872502.631
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -4079520.647 2971949.553 -3868226.465
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -2904698.5551 2904698.5551 -4862789.0377
+roundtrip 1000
+
+tolerance  0.01  m
+accept    -2187336.719 -112 -5970149.093
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/5208.gie b/test/gigs/5208.gie
new file mode 100644
index 0000000..25a10b9
--- /dev/null
+++ b/test/gigs/5208.gie
@@ -0,0 +1,208 @@
+--------------------------------------------------------------------------------
+
+Test 5208, Longitude Rotation, v2.0_2011-06-28.
+
+The test tolerance is 0.01". Since gie can only use linear tolerances we
+convert that to an approximate liniar distance instead, by multiplying with
+111km:
+
+    0.01" * 111 km = 2.777777778-7 * 111000 m = 0.03 m
+
+To be on the safe side we, use 0.01 m as the tolerance.
+
+--------------------------------------------------------------------------------
+
+# NTF
+<4275> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs  <>
+
+# NTF (Paris)
+<4807> +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs  <>
+
+
+
+<gie>
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4275 +inv
+           +step +init=epsg:4807
+--------------------------------------------------------------------------------
+tolerance 0.01 m
+accept    5 58
+expect    2.66277083 58
+
+tolerance 0.01 m
+accept    5 56
+expect    2.66277083 56
+
+tolerance 0.01 m
+accept    5 55
+expect    2.66277083 55
+
+tolerance 0.01 m
+accept    5 53
+expect    2.66277083 53
+
+tolerance 0.01 m
+accept    4 51
+expect    1.66277083 51
+
+tolerance 0.01 m
+accept    4 49
+expect    1.66277083 49
+
+tolerance 0.01 m
+accept    2.33722917 46.8
+expect    0 46.8
+
+tolerance 0.01 m
+accept    3 53
+expect    0.66277083 53
+
+tolerance 0.01 m
+accept    4 53
+expect    1.66277083 53
+
+tolerance 0.01 m
+accept    6 53
+expect    3.66277083 53
+
+tolerance 0.01 m
+accept    7 53
+expect    4.66277083 53
+
+tolerance 0.01 m
+accept    9 53
+expect    6.66277083 53
+
+tolerance 0.01 m
+accept    10 53
+expect    7.66277083 53
+
+tolerance 0.01 m
+accept    11 53
+expect    8.66277083 53
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4807 +inv
+           +step +init=epsg:4275
+--------------------------------------------------------------------------------
+tolerance 0.01 m
+accept    2.66277083 58
+expect    5 58
+
+tolerance 0.01 m
+accept    2.66277083 56
+expect    5 56
+
+tolerance 0.01 m
+accept    2.66277083 55
+expect    5 55
+
+tolerance 0.01 m
+accept    2.66277083 53
+expect    5 53
+
+tolerance 0.01 m
+accept    1.66277083 51
+expect    4 51
+
+tolerance 0.01 m
+accept    1.66277083 49
+expect    4 49
+
+tolerance 0.01 m
+accept    0 46.8
+expect    2.33722917 46.8
+
+tolerance 0.01 m
+accept    0.66277083 53
+expect    3 53
+
+tolerance 0.01 m
+accept    1.66277083 53
+expect    4 53
+
+tolerance 0.01 m
+accept    3.66277083 53
+expect    6 53
+
+tolerance 0.01 m
+accept    4.66277083 53
+expect    7 53
+
+tolerance 0.01 m
+accept    6.66277083 53
+expect    9 53
+
+tolerance 0.01 m
+accept    7.66277083 53
+expect    10 53
+
+tolerance 0.01 m
+accept    8.66277083 53
+expect    11 53
+
+--------------------------------------------------------------------------------
+operation  +proj=pipeline
+           +step +init=epsg:4275 +inv
+           +step +init=epsg:4807
+--------------------------------------------------------------------------------
+tolerance 0.01 m
+accept    5 58
+roundtrip 1000
+
+tolerance 0.01 m
+accept    5 56
+roundtrip 1000
+
+tolerance 0.01 m
+accept    5 55
+roundtrip 1000
+
+tolerance 0.01 m
+accept    5 53
+roundtrip 1000
+
+tolerance 0.01 m
+accept    4 51
+roundtrip 1000
+
+tolerance 0.01 m
+accept    4 49
+roundtrip 1000
+
+tolerance 0.01 m
+accept    2.33722917 46.8
+roundtrip 1000
+
+tolerance 0.01 m
+accept    3 53
+roundtrip 1000
+
+tolerance 0.01 m
+accept    4 53
+roundtrip 1000
+
+tolerance 0.01 m
+accept    6 53
+roundtrip 1000
+
+tolerance 0.01 m
+accept    7 53
+roundtrip 1000
+
+tolerance 0.01 m
+accept    9 53
+roundtrip 1000
+
+tolerance 0.01 m
+accept    10 53
+roundtrip 1000
+
+tolerance 0.01 m
+accept    11 53
+roundtrip 1000
+
+</gie>
diff --git a/test/gigs/Makefile.am b/test/gigs/Makefile.am
new file mode 100644
index 0000000..4840c27
--- /dev/null
+++ b/test/gigs/Makefile.am
@@ -0,0 +1,18 @@
+EXTRA_DIST = \
+	5101.1-jhs.gie \
+	5101.2-jhs.gie \
+	5101.3-jhs.gie \
+	5101.4-jhs-etmerc.gie \
+	5102.1.gie \
+	5103.1.gie \
+	5103.2.gie \
+	5103.3.gie \
+	5105.2.gie \
+	5106.gie \
+	5107.gie \
+	5109.gie \
+	5111.1.gie \
+	5112.gie \
+	5113.gie \
+	5201.gie \
+	5208.gie
diff --git a/jniwrap/org/proj4/Makefile.in b/test/gigs/Makefile.in
similarity index 94%
copy from jniwrap/org/proj4/Makefile.in
copy to test/gigs/Makefile.in
index a3c9327..5fae78f 100644
--- a/jniwrap/org/proj4/Makefile.in
+++ b/test/gigs/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,17 +14,7 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -87,7 +77,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-subdir = jniwrap/org/proj4
+subdir = test/gigs
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -95,7 +86,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/proj_config.h
 CONFIG_CLEAN_FILES =
@@ -120,7 +110,6 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -163,7 +152,6 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -233,7 +221,6 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -242,7 +229,25 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-EXTRA_DIST = PJ.java PJException.java package-info.java
+EXTRA_DIST = \
+	5101.1-jhs.gie \
+	5101.2-jhs.gie \
+	5101.3-jhs.gie \
+	5101.4-jhs-etmerc.gie \
+	5102.1.gie \
+	5103.1.gie \
+	5103.2.gie \
+	5103.3.gie \
+	5105.2.gie \
+	5106.gie \
+	5107.gie \
+	5109.gie \
+	5111.1.gie \
+	5112.gie \
+	5113.gie \
+	5201.gie \
+	5208.gie
+
 all: all-am
 
 .SUFFIXES:
@@ -255,9 +260,10 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu jniwrap/org/proj4/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/gigs/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu jniwrap/org/proj4/Makefile
+	  $(AUTOMAKE) --gnu test/gigs/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -432,8 +438,6 @@ uninstall-am:
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

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



More information about the Pkg-grass-devel mailing list