[geographiclib] 03/19: Imported Upstream version 1.40

Bas Couwenberg sebastic at xs4all.nl
Sun Dec 28 19:47:28 UTC 2014


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

sebastic-guest pushed a commit to branch master
in repository geographiclib.

commit f51e78b6f4030fe80ef94f27c2ec783c9a2a7996
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Dec 28 16:26:22 2014 +0100

    Imported Upstream version 1.40
---
 CMakeLists.txt                                     |   9 +-
 Makefile.am                                        |  19 +-
 Makefile.in                                        |  19 +-
 NEWS                                               |  39 +-
 configure                                          |  22 +-
 configure.ac                                       |   4 +-
 doc/CMakeLists.txt                                 |  13 +-
 doc/{GeographicLib.dox => GeographicLib.dox.in}    | 705 ++++++++++++++-------
 doc/Makefile.am                                    |   7 +-
 doc/Makefile.in                                    |   7 +-
 doc/NETGeographicLib.dox                           |  18 +-
 doc/doxyfile.in                                    |   2 +-
 doc/geodesic-c.dox                                 |  14 +-
 doc/geodesic-for.dox                               |  14 +-
 doc/geodseries30.html                              |   6 +-
 doc/scripts/GeographicLib/Geodesic.js              |   5 +-
 doc/scripts/GeographicLib/GeodesicLine.js          |   2 +-
 doc/scripts/GeographicLib/Interface.js             |   2 +-
 doc/scripts/GeographicLib/PolygonArea.js           |   2 +-
 doc/scripts/geod-calc.html                         |   6 +-
 doc/scripts/geod-google-instructions.html          |   6 +-
 doc/tmseries30.html                                |   6 +-
 dotnet/NETGeographicLib/Accumulator.h              |   2 +-
 dotnet/NETGeographicLib/DMS.h                      |  39 +-
 dotnet/NETGeographicLib/EllipticFunction.h         |   8 +-
 dotnet/NETGeographicLib/GeoCoords.h                |   3 +-
 dotnet/NETGeographicLib/Geocentric.h               |   2 +-
 dotnet/NETGeographicLib/Geodesic.h                 |   4 +-
 dotnet/NETGeographicLib/GeodesicLine.h             |   4 +-
 dotnet/NETGeographicLib/Geohash.h                  |   4 +-
 dotnet/NETGeographicLib/Gnomonic.h                 |   4 +-
 dotnet/NETGeographicLib/MGRS.h                     |   7 +-
 dotnet/NETGeographicLib/MagneticModel.h            |   5 +-
 dotnet/NETGeographicLib/NormalGravity.h            |   2 +-
 dotnet/NETGeographicLib/OSGB.h                     |   5 +
 dotnet/NETGeographicLib/PolygonArea.h              |   4 +-
 dotnet/NETGeographicLib/TransverseMercator.h       |   4 +-
 dotnet/NETGeographicLib/TransverseMercatorExact.h  |   4 +-
 ...{Projections.csproj => Projections-vs13.csproj} |  39 +-
 dotnet/Projections/Projections.csproj              |  39 +-
 examples/CMakeLists.txt                            |   6 +-
 examples/JacobiConformal.cpp                       |  24 +
 examples/JacobiConformal.hpp                       | 135 ++++
 include/GeographicLib/Accumulator.hpp              |   2 +-
 include/GeographicLib/AlbersEqualArea.hpp          |   2 +-
 include/GeographicLib/Config.h                     |   4 +-
 include/GeographicLib/DMS.hpp                      |  42 +-
 include/GeographicLib/EllipticFunction.hpp         |  12 +-
 include/GeographicLib/GeoCoords.hpp                |  20 +-
 include/GeographicLib/Geocentric.hpp               |   4 +-
 include/GeographicLib/Geodesic.hpp                 |   4 +-
 include/GeographicLib/GeodesicLine.hpp             |   4 +-
 include/GeographicLib/Geohash.hpp                  |   2 +-
 include/GeographicLib/Gnomonic.hpp                 |   4 +-
 include/GeographicLib/LambertConformalConic.hpp    |   2 +-
 include/GeographicLib/MGRS.hpp                     |   7 +-
 include/GeographicLib/MagneticModel.hpp            |   5 +-
 include/GeographicLib/Math.hpp                     |  15 +-
 include/GeographicLib/NormalGravity.hpp            |   2 +-
 include/GeographicLib/OSGB.hpp                     |   9 +-
 include/GeographicLib/PolygonArea.hpp              |   4 +-
 include/GeographicLib/Rhumb.hpp                    |   2 +-
 include/GeographicLib/TransverseMercator.hpp       |   4 +-
 include/GeographicLib/TransverseMercatorExact.hpp  |   4 +-
 include/GeographicLib/Utility.hpp                  |   6 +-
 java/README.txt                                    |   2 +-
 java/direct/pom.xml                                | 145 ++---
 java/inverse/pom.xml                               | 145 ++---
 java/planimeter/pom.xml                            | 145 ++---
 java/pom.xml                                       | 151 ++---
 .../java/net/sf/geographiclib/Accumulator.java     |   2 +-
 .../main/java/net/sf/geographiclib/GeoMath.java    |   6 +-
 .../main/java/net/sf/geographiclib/Geodesic.java   |   7 +-
 .../java/net/sf/geographiclib/GeodesicLine.java    |   4 +-
 .../java/net/sf/geographiclib/PolygonArea.java     |   4 +-
 .../java/net/sf/geographiclib/package-info.java    |  18 +-
 legacy/C/00README.txt                              |   2 +-
 legacy/C/geodesic.c                                |   5 +-
 legacy/C/geodesic.h                                |   8 +-
 legacy/Fortran/00README.txt                        |   2 +-
 legacy/Fortran/geodesic.for                        |  10 +-
 man/CartConvert.1                                  |   2 +-
 man/CartConvert.usage                              |   2 +-
 man/ConicProj.1                                    |   2 +-
 man/ConicProj.usage                                |   2 +-
 man/GeoConvert.1                                   |  47 +-
 man/GeoConvert.1.html                              |  20 +-
 man/GeoConvert.pod                                 |  45 +-
 man/GeoConvert.usage                               |  40 +-
 man/GeodSolve.1                                    |  16 +-
 man/GeodSolve.1.html                               |   8 +-
 man/GeodSolve.pod                                  |  14 +-
 man/GeodSolve.usage                                |  20 +-
 man/GeodesicProj.1                                 |   4 +-
 man/GeodesicProj.1.html                            |   2 +-
 man/GeodesicProj.pod                               |   2 +-
 man/GeodesicProj.usage                             |   4 +-
 man/GeoidEval.1                                    |   7 +-
 man/GeoidEval.1.html                               |   4 +-
 man/GeoidEval.pod                                  |   5 +-
 man/GeoidEval.usage                                |   7 +-
 man/Gravity.1                                      |   2 +-
 man/Gravity.usage                                  |   2 +-
 man/MagneticField.1                                |  19 +-
 man/MagneticField.1.html                           |  17 +-
 man/MagneticField.pod                              |  17 +-
 man/MagneticField.usage                            |  19 +-
 man/Planimeter.1                                   |  11 +-
 man/Planimeter.1.html                              |   6 +-
 man/Planimeter.pod                                 |   9 +-
 man/Planimeter.usage                               |  15 +-
 man/RhumbSolve.1                                   |   8 +-
 man/RhumbSolve.1.html                              |   4 +
 man/RhumbSolve.pod                                 |   6 +
 man/RhumbSolve.usage                               |   8 +-
 man/TransverseMercatorProj.1                       |   4 +-
 man/TransverseMercatorProj.1.html                  |   2 +-
 man/TransverseMercatorProj.pod                     |   2 +-
 man/TransverseMercatorProj.usage                   |   4 +-
 matlab/CMakeLists.txt                              |  11 +-
 matlab/geodarea.m                                  |   2 +-
 matlab/geoddistance.m                              |   2 +-
 matlab/geoddoc.m                                   |   2 +-
 matlab/geodesicdirect.m                            |   2 +-
 matlab/geodesicinverse.m                           |   2 +-
 matlab/geodesicline.m                              |   2 +-
 matlab/geodproj.m                                  |   2 +-
 matlab/geodreckon.m                                |   2 +-
 matlab/geographiclibinterface.m                    |   9 +-
 matlab/gnomonic_fwd.m                              |   2 +-
 matlab/gnomonic_inv.m                              |   2 +-
 matlab/polygonarea.m                               |   2 +-
 maxima/geod.mac                                    |   4 +-
 maxima/geodesic.mac                                |   2 +-
 pom.xml                                            |   4 +-
 python/geographiclib/geodesic.py                   |   5 +-
 python/geographiclib/geodesicline.py               |   2 +-
 python/geographiclib/polygonarea.py                |   2 +-
 python/setup.py                                    |   2 +-
 src/EllipticFunction.cpp                           |  17 +-
 src/Geodesic.cpp                                   |   3 +-
 src/GeodesicExact.cpp                              |   3 +-
 src/GeographicLib.pro                              |   2 +-
 src/MagneticModel.cpp                              |   2 +-
 src/OSGB.cpp                                       |  38 +-
 src/TransverseMercatorExact.cpp                    |   2 +-
 tools/CMakeLists.txt                               |   5 +
 tools/geographiclib-get-geoids.sh                  |   2 +-
 tools/geographiclib-get-gravity.sh                 |   2 +-
 tools/geographiclib-get-magnetic.sh                |   8 +-
 windows/Geographic-vc13n.vcxproj                   | 227 +++++++
 windows/NETGeographic-vc10.sln                     |  59 ++
 windows/NETGeographic-vc13.sln                     |  76 +++
 windows/NETGeographic-vc13.vcxproj                 | 243 +++++++
 154 files changed, 2250 insertions(+), 997 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 06c445b..0b7eb73 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ project (GeographicLib)
 
 # Version information
 set (PROJECT_VERSION_MAJOR 1)
-set (PROJECT_VERSION_MINOR 39)
+set (PROJECT_VERSION_MINOR 40)
 set (PROJECT_VERSION_PATCH 0)
 set (PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
 if (PROJECT_VERSION_PATCH GREATER 0)
@@ -43,7 +43,7 @@ endif ()
 # The library version tracks the numbering given by libtool in the
 # autoconf set up.
 set (LIBVERSION 14)
-set (LIBVERSIONFULL 14.0.0)
+set (LIBVERSIONFULL 14.0.1)
 string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
 string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
 
@@ -385,7 +385,8 @@ endif ()
 # Create a Config.h to expose system information to the compiler
 configure_file (
   include/GeographicLib/Config.h.in
-  include/GeographicLib/Config.h )
+  include/GeographicLib/Config.h
+  @ONLY )
 
 # The documentation depends on doxygen.
 if (GEOGRAPHICLIB_DOCUMENTATION)
@@ -572,7 +573,7 @@ if (WIN32)
     "http://geographiclib.sf.net/${PROJECT_VERSION}/utilities.html"
     "Utilities documentation"
     "http://geographiclib.sf.net" "GeographicLib home page"
-    "http://sf.net/projects/geographiclib/" "Main project page")
+    "https://sf.net/projects/geographiclib/" "Main project page")
   set (CPACK_NSIS_MODIFY_PATH ON)
 elseif (APPLE)
   # Not tested
diff --git a/Makefile.am b/Makefile.am
index 84a4610..b637a97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,18 +13,19 @@ EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL README.md pom.xml \
 	Makefile.mk CMakeLists.txt windows maxima doc legacy java dotnet
 
 dist-hook:
-	rm -rf $(distdir)/doc/html $(distdir)/doc/manpages ; \
-	find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf ; \
-	rm -rf $(distdir)/java/targets ; \
-	find $(distdir)/java -type f -name '*.class' | xargs rm -rf ; \
-	find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf ; \
+	rm -rf $(distdir)/doc/html $(distdir)/doc/manpages \
+		$(distdir)/doc/GeographicLib.dox
+	find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf
+	rm -rf $(distdir)/java/targets
+	find $(distdir)/java -type f -name '*.class' | xargs rm -rf
+	find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf
 	find $(distdir)/windows -type f \
 		! \( -name '*.sln' -o -name '*.vc*proj' -o -name '*.mk' \)| \
-		xargs rm -f ; \
+		xargs rm -f
 	find $(distdir) \
-		\( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \)| \
-		xargs rm -rf ; \
-	echo include Makefile.mk > $(distdir)/Makefile ; \
+		\( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \) | \
+		xargs rm -rf
+	echo include Makefile.mk > $(distdir)/Makefile
 	sed -e "s/Unconfigured/$(PACKAGE_VERSION)/" \
 		-e "s/MAJOR .*/MAJOR ${GEOGRAPHICLIB_VERSION_MAJOR}/" \
 		-e "s/MINOR .*/MINOR ${GEOGRAPHICLIB_VERSION_MINOR}/" \
diff --git a/Makefile.in b/Makefile.in
index c4ae540..5b4f8c6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -818,18 +818,19 @@ uninstall-am:
 
 
 dist-hook:
-	rm -rf $(distdir)/doc/html $(distdir)/doc/manpages ; \
-	find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf ; \
-	rm -rf $(distdir)/java/targets ; \
-	find $(distdir)/java -type f -name '*.class' | xargs rm -rf ; \
-	find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf ; \
+	rm -rf $(distdir)/doc/html $(distdir)/doc/manpages \
+		$(distdir)/doc/GeographicLib.dox
+	find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf
+	rm -rf $(distdir)/java/targets
+	find $(distdir)/java -type f -name '*.class' | xargs rm -rf
+	find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf
 	find $(distdir)/windows -type f \
 		! \( -name '*.sln' -o -name '*.vc*proj' -o -name '*.mk' \)| \
-		xargs rm -f ; \
+		xargs rm -f
 	find $(distdir) \
-		\( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \)| \
-		xargs rm -rf ; \
-	echo include Makefile.mk > $(distdir)/Makefile ; \
+		\( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \) | \
+		xargs rm -rf
+	echo include Makefile.mk > $(distdir)/Makefile
 	sed -e "s/Unconfigured/$(PACKAGE_VERSION)/" \
 		-e "s/MAJOR .*/MAJOR ${GEOGRAPHICLIB_VERSION_MAJOR}/" \
 		-e "s/MINOR .*/MINOR ${GEOGRAPHICLIB_VERSION_MINOR}/" \
diff --git a/NEWS b/NEWS
index 77ed646..177bd9b 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,44 @@ For more information, see
 
     http://geographiclib.sourceforge.net/
 
-The current version of the library is 1.39.
+The current version of the library is 1.40.
+
+Changes between 1.40 (released 2014-12-18) and 1.39 versions:
+
+  * Add the World Magnetic Model 2015, wmm2015.  This is now the default
+    magnetic model for MagneticField (replacing wmm2010 which is valid
+    thru the end of 2014).
+
+  * Geodesic::Inverse didn't return NaN if one of the longitudes was a
+    NaN (bug introduced in version 1.25).  Fixed in the C++, Java,
+    JavaScript, C, Fortran, and Python implementations of the geodesic
+    routines.  This bug was not present in the Matlab version.
+
+  * Fix bug in Utility::readarray and Utility::writearray which caused
+    an exception in debug mode with zero-sized arrays.
+
+  * Fix BLUNDER in OSGB::GridReference (found by kalderami) where the
+    wrong result was returned if the easting or northing was negative.
+
+  * OSGB::GridReference now returns "INVALID" if either coordinate is
+    NaN.  Similarly a grid reference starting with "IN" results in NaNs
+    for the coordinates.
+
+  * Default constructor for GeoCoords corresponds to an undefined
+    position (latitude and longitude = NaN), instead of the north pole.
+
+  * Add an online version of RhumbSolve at
+    http://geographiclib.sourceforge.net/cgi-bin/RhumbSolve.
+
+  * Additions to the documentation:
+     + documentation on  Jacobi's conformal projection;
+     + a page on Auxiliary latitudes (actually, this was added in
+       version 1.39);
+     + document the use of two single quotes to stand for a double quote
+       in DMS (this feature was introduced in version 1.13).
+
+  * The Matlab function, geographiclibinterface, which compiles the
+    wrapper routines for Matlab now works with Matlab 2014b on a Mac.
 
 Changes between 1.39 (released 2014-11-11) and 1.38 versions:
 
diff --git a/configure b/configure
index 4256930..1f7b7eb 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 GeographicLib 1.39.
+# Generated by GNU Autoconf 2.69 for GeographicLib 1.40.
 #
 # Report bugs to <charles at karney.com>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GeographicLib'
 PACKAGE_TARNAME='geographiclib'
-PACKAGE_VERSION='1.39'
-PACKAGE_STRING='GeographicLib 1.39'
+PACKAGE_VERSION='1.40'
+PACKAGE_STRING='GeographicLib 1.40'
 PACKAGE_BUGREPORT='charles at karney.com'
 PACKAGE_URL=''
 
@@ -1343,7 +1343,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 GeographicLib 1.39 to adapt to many kinds of systems.
+\`configure' configures GeographicLib 1.40 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1414,7 +1414,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GeographicLib 1.39:";;
+     short | recursive ) echo "Configuration of GeographicLib 1.40:";;
    esac
   cat <<\_ACEOF
 
@@ -1525,7 +1525,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GeographicLib configure 1.39
+GeographicLib configure 1.40
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1966,7 +1966,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 GeographicLib $as_me 1.39, which was
+It was created by GeographicLib $as_me 1.40, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2943,7 +2943,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='geographiclib'
- VERSION='1.39'
+ VERSION='1.40'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3045,7 +3045,7 @@ ac_config_headers="$ac_config_headers include/GeographicLib/Config-ac.h"
 
 
 LT_CURRENT=14
-LT_REVISION=0
+LT_REVISION=1
 LT_AGE=0
 
 
@@ -16243,7 +16243,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 GeographicLib $as_me 1.39, which was
+This file was extended by GeographicLib $as_me 1.40, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16309,7 +16309,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="\\
-GeographicLib config.status 1.39
+GeographicLib config.status 1.40
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index ede81da..ed387c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl
 dnl Copyright (C) 2009, Francesco P. Lovergine <frankie at debian.org>
 
-AC_INIT([GeographicLib],[1.39],[charles at karney.com])
+AC_INIT([GeographicLib],[1.40],[charles at karney.com])
 AC_CANONICAL_SYSTEM
 AC_PREREQ(2.61)
 AC_CONFIG_SRCDIR(src/Geodesic.cpp)
@@ -35,7 +35,7 @@ dnl Interfaces changed/added/removed:   CURRENT++ REVISION=0
 dnl Interfaces added:                   AGE++
 dnl Interfaces removed:                 AGE=0
 LT_CURRENT=14
-LT_REVISION=0
+LT_REVISION=1
 LT_AGE=0
 AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 7390a40..7eca7f0 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -29,13 +29,15 @@ endif ()
 
 file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html-stage)
 if (DOXYGEN_FOUND)
-  configure_file (doxyfile.in doxyfile)
-  configure_file (doxyfile-c.in doxyfile-c)
-  configure_file (doxyfile-for.in doxyfile-for)
-  configure_file (doxyfile-net.in doxyfile-net)
+  configure_file (GeographicLib.dox.in GeographicLib.dox @ONLY)
+  configure_file (doxyfile.in doxyfile @ONLY)
+  configure_file (doxyfile-c.in doxyfile-c @ONLY)
+  configure_file (doxyfile-for.in doxyfile-for @ONLY)
+  configure_file (doxyfile-net.in doxyfile-net @ONLY)
   file (GLOB SOURCES
     ../src/[A-Za-z]*.cpp ../include/GeographicLib/[A-Za-z]*.hpp
     ../tools/[A-Za-z]*.cpp ../examples/[A-Za-z]*.cpp
+    ../examples/[A-Za-z]*.hpp
     ../legacy/C/*.[ch] ../legacy/Fortran/*.for ../legacy/Fortran/*.inc
     ../dotnet/NETGeographicLib/*.cpp ../dotnet/NETGeographicLib/*.h
     ../dotnet/examples/CS/*.cs ../dotnet/examples/ManagedCPP/*.cpp
@@ -52,7 +54,8 @@ if (DOXYGEN_FOUND)
       ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-c
       ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-for
       ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-net
-      GeographicLib.dox geodesic-c.dox geodesic-for.dox NETGeographicLib.dox
+      ${CMAKE_CURRENT_BINARY_DIR}/GeographicLib.dox
+      geodesic-c.dox geodesic-for.dox NETGeographicLib.dox
       ${SOURCES} ${EXTRA_FILES} ${FIGURES} ${HTMLMAN}
     COMMAND ${CMAKE_COMMAND} -E remove_directory html
     COMMAND ${CMAKE_COMMAND} -E copy_directory html-stage html
diff --git a/doc/GeographicLib.dox b/doc/GeographicLib.dox.in
similarity index 92%
rename from doc/GeographicLib.dox
rename to doc/GeographicLib.dox.in
index f21316b..3b9e6b3 100644
--- a/doc/GeographicLib.dox
+++ b/doc/GeographicLib.dox.in
@@ -11,15 +11,15 @@ namespace GeographicLib {
 /**
 \mainpage GeographicLib library
 \author Charles F. F. Karney (charles at karney.com)
-\version 1.39
-\date 2014-11-11
+\version @PROJECT_VERSION@
+\date 2014-12-18
 
 \section abstract Abstract
 
 GeographicLib is a small set of <a href="annotated.html">C++
 classes</a> for performing conversions between geographic, UTM, UPS,
 MGRS, geocentric, and local cartesian coordinates, for gravity (e.g.,
-EGM2008), geoid height and geomagnetic field (e.g., WMM2010)
+EGM2008), geoid height and geomagnetic field (e.g., WMM2015)
 calculations, and for solving geodesic problems.  The emphasis is on
 returning accurate results with errors close to round-off (about 5--15
 nanometers).  New accurate algorithms for \ref geodesic and \ref
@@ -41,20 +41,20 @@ hand, it does provide the core functionality offered by
 \section download Download
 
 The main project page is at
-- <a href="http://sourceforge.net/projects/geographiclib">
-  http://sourceforge.net/projects/geographiclib </a>
+- <a href="https://sourceforge.net/projects/geographiclib">
+  https://sourceforge.net/projects/geographiclib </a>
 .
 The code is available for download at
-- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.39.tar.gz">
-  GeographicLib-1.39.tar.gz</a>
-- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.39.zip">
-  GeographicLib-1.39.zip</a>
+- <a href="https://sf.net/projects/geographiclib/files/distrib/GeographicLib-@PROJECT_VERSION@.tar.gz">
+  GeographicLib- at PROJECT_VERSION@.tar.gz</a>
+- <a href="https://sf.net/projects/geographiclib/files/distrib/GeographicLib-@PROJECT_VERSION@.zip">
+  GeographicLib- at PROJECT_VERSION@.zip</a>
 .
 as either a compressed tar file (tar.gz) or a zip file.  (The two
 archives have identical contents, except that the zip file has DOS
 line endings.)  Alternatively you can get the latest release using git
 \verbatim
-  git clone -b r1.39 git://git.code.sf.net/p/geographiclib/code geographiclib
+  git clone -b r at PROJECT_VERSION@ git://git.code.sf.net/p/geographiclib/code geographiclib
 \endverbatim
 There are also binary installers available for some platforms.  See \ref
 binaryinst.
@@ -182,14 +182,14 @@ GeographicLib has been developed under Linux with the g++ compiler
 2012, and 2013.  Earlier versions were tested also under Visual Studio
 2005 and 2008 and under Darwin and Solaris.  It should compile on a wide
 range of other systems.  First download either
-<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.39.tar.gz">
-GeographicLib-1.39.tar.gz</a> or
-<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.39.zip">
-GeographicLib-1.39.zip</a> (or
-<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.39-win32.exe">
-GeographicLib-1.39-win32.exe</a> or
-<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.39-win64.exe">
-GeographicLib-1.39-win64.exe</a> for binary installation under Windows).
+<a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-@PROJECT_VERSION@.tar.gz">
+GeographicLib- at PROJECT_VERSION@.tar.gz</a> or
+<a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-@PROJECT_VERSION@.zip">
+GeographicLib- at PROJECT_VERSION@.zip</a> (or
+<a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-@PROJECT_VERSION@-win32.exe">
+GeographicLib- at PROJECT_VERSION@-win32.exe</a> or
+<a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-@PROJECT_VERSION@-win64.exe">
+GeographicLib- at PROJECT_VERSION@-win64.exe</a> for binary installation under Windows).
 Then pick one of the first five options below:
 - \ref cmake.  This is the preferred installation method as it will work
   on the widest range of platforms.  However it requires that you have
@@ -265,10 +265,10 @@ work also for Visual Studio 12 Express (2013).
 
 Here are the steps to compile and install GeographicLib:
 - Unpack the source, running one of \verbatim
-  tar xfpz GeographicLib-1.39.tar.gz
-  unzip -q GeographicLib-1.39.zip \endverbatim
+  tar xfpz GeographicLib- at PROJECT_VERSION@.tar.gz
+  unzip -q GeographicLib- at PROJECT_VERSION@.zip \endverbatim
   then enter the directory created with one of \verbatim
-  cd GeographicLib-1.39 \endverbatim
+  cd GeographicLib- at PROJECT_VERSION@ \endverbatim
 - Create a separate build directory and enter it, for example, \verbatim
   mkdir BUILD
   cd BUILD \endverbatim
@@ -276,8 +276,8 @@ Here are the steps to compile and install GeographicLib:
   and MacOSX systems, the command is \verbatim
   cmake .. \endverbatim
   For Windows, the command is typically one of \verbatim
-  cmake -G "Visual Studio 10" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10/GeographicLib-1.39 ..
-  cmake -G "Visual Studio 9 2008" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc9/GeographicLib-1.39 ..
+  cmake -G "Visual Studio 10" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10/GeographicLib- at PROJECT_VERSION@ ..
+  cmake -G "Visual Studio 9 2008" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc9/GeographicLib- at PROJECT_VERSION@ ..
 \endverbatim
   The definitions of CMAKE_INSTALL_PREFIX are optional (see below).  The
   settings given above are recommended to ensure that packages that use
@@ -293,7 +293,7 @@ Here are the steps to compile and install GeographicLib:
     convention.  If it is on ON (the Linux default), the installation
     is to a common directory, e.g., /usr/local.  If it is OFF (the
     Windows default), the installation directory contains the package
-    name, e.g., C:/pkg/GeographicLib-1.39.  The installation
+    name, e.g., C:/pkg/GeographicLib- at PROJECT_VERSION@.  The installation
     directories for the documentation, cmake configuration, python and
     matlab interfaces all depend on the variable with deeper paths
     relative to CMAKE_INSTALL_PREFIX being used when it's ON:
@@ -307,8 +307,9 @@ Here are the steps to compile and install GeographicLib:
     on Windows systems) specifies where the library will be installed.
     For windows systems, it is recommended to use a prefix which
     includes the compiler version, as shown above (and also, possibly,
-    whether this is a 64-bit build, e.g., <code>cmake -G "Visual Studio
-    10 Win64" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10-x64/GeographicLib-1.39
+    whether this is a 64-bit build, e.g., <code>cmake
+    -G "Visual Studio 10 Win64"
+    -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10-x64/GeographicLib- at PROJECT_VERSION@
     ..</code>).  If you just want to try the library to see if it suits
     your needs, pick, for example,
     <code>CMAKE_INSTALL_PREFIX</code>=/tmp/geographic.
@@ -405,9 +406,9 @@ Here are the steps to compile and install GeographicLib:
 The method works on most Unix-like systems including Linux and Mac OS X.
 Here are the steps to compile and install GeographicLib:
 - Unpack the source, running \verbatim
-  tar xfpz GeographicLib-1.39.tar.gz \endverbatim
+  tar xfpz GeographicLib- at PROJECT_VERSION@.tar.gz \endverbatim
   then enter the directory created \verbatim
-  cd GeographicLib-1.39 \endverbatim
+  cd GeographicLib- at PROJECT_VERSION@ \endverbatim
 - Create a separate build directory and enter it, for example, \verbatim
   mkdir BUILD
   cd BUILD \endverbatim
@@ -436,9 +437,9 @@ and g++.  This builds a static library and the examples.
 
 Here are the steps to compile and install GeographicLib:
 - Unpack the source, running \verbatim
-  tar xfpz GeographicLib-1.39.tar.gz \endverbatim
+  tar xfpz GeographicLib- at PROJECT_VERSION@.tar.gz \endverbatim
   then enter the directory created \verbatim
-  cd GeographicLib-1.39 \endverbatim
+  cd GeographicLib- at PROJECT_VERSION@ \endverbatim
 - Edit \verbatim
   include/GeographicLib/Config.h \endverbatim
   If your C++ compiler does not recognize the long double type
@@ -469,10 +470,11 @@ static library and the utilities.  If you only have Visual Studio 2003,
 use cmake to create the necessary solution file, see \ref cmake.  (cmake
 is needed to build the Matlab interface and to run the tests.)
 - Unpack the source, running \verbatim
-  unzip -q GeographicLib-1.39.zip \endverbatim
-- Open GeographicLib-1.39/windows/GeographicLib-vc10.sln in Visual Studio
-  2010 (for Visual Studio 2005 and 2008, replace -vc10 by -vc8 or -vc9;
-  for Visual Studio Express 2010, replace -vc10 by -vc10x).
+  unzip -q GeographicLib- at PROJECT_VERSION@.zip \endverbatim
+- Open GeographicLib- at PROJECT_VERSION@/windows/GeographicLib-vc10.sln in
+  Visual Studio 2010 (for Visual Studio 2005 and 2008, replace -vc10 by
+  -vc8 or -vc9; for Visual Studio Express 2010, replace -vc10 by
+  -vc10x).
 - Pick the build type (e.g., Release), and select "Build Solution".
 - The library and the compiled examples are in the windows/Release.
 - Copy the library windows/Release/GeographicLib.lib and the
@@ -502,14 +504,15 @@ be advisable to build it with the compiler you are using for your own
 code using either \ref cmake or \ref windows.
 
 Download and run
-<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.39-win32.exe">
-GeographicLib-1.39-win32.exe</a> or
-<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.39-win64.exe">
-GeographicLib-1.39-win64.exe</a>:
+<a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-@PROJECT_VERSION@-win32.exe">
+GeographicLib- at PROJECT_VERSION@-win32.exe</a> or
+<a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-@PROJECT_VERSION@-win64.exe">
+GeographicLib- at PROJECT_VERSION@-win64.exe</a>:
  - read the MIT/X11 License agreement,
  - select whether you want your PATH modified,
  - select the installation folder, by default
-   C:\\pkg-vc10\\GeographicLib-1.39 or C:\\pkg-vc10-x64\\GeographicLib-1.39,
+   C:\\pkg-vc10\\GeographicLib- at PROJECT_VERSION@ or
+   C:\\pkg-vc10-x64\\GeographicLib- at PROJECT_VERSION@,
  - select the start menu folder,
  - and install.
  .
@@ -517,15 +520,15 @@ GeographicLib-1.39-win64.exe</a>:
 given in \ref cmake.)  The start menu will now include links to the
 documentation for the library and for the utilities (and a link for
 uninstalling the library).  If you ask for your PATH to be modified, it
-will include C:/pkg-vc11/GeographicLib-1.39/bin where the utilities are
-installed.  The headers and library are installed in the
+will include C:/pkg-vc11/GeographicLib- at PROJECT_VERSION@/bin where the
+utilities are installed.  The headers and library are installed in the
 include/GeographicLib and lib folders.  With the 64-bit installer, the
 Matlab interface is installed in the matlab folder.  Add this to your
 path in Matlab to access this interface.  The libraries were built using
-using Visual Studio 11 2012 in release and debug modes.  The utilities were
-linked against the release-mode shared library.  The Matlab interface
-was compiled with Matlab R2013a 64-bit, however it may work with some
-other 64-bit versions of Matlab.
+using Visual Studio 11 2012 in release and debug modes.  The utilities
+were linked against the release-mode shared library.  The Matlab
+interface was compiled with Matlab R2013a 64-bit, however it may work
+with some other 64-bit versions of Matlab.
 <a href="NET/index.html">NETGeographicLib</a> library dlls (release and
 debug) are included with the binary installers; these are linked against
 the shared library for GeographicLib.
@@ -582,7 +585,7 @@ Check the code out of git with \verbatim
 Here the "master" branch is checked out.  There are three branches in
 the git repository:
 - <b>master</b>: the main branch for code maintainence.  Releases are
-  tagged on this branch as, e.g., v1.39.
+  tagged on this branch as, e.g., v at PROJECT_VERSION@.
 - <b>devel</b>: the development branch; changes made here are merged
   into master.
 - <b>release</b>: the release branch created by unpacking the source
@@ -592,7 +595,8 @@ the git repository:
   specifying a branch).  This differs from the master branch in that
   some administrative files are excluded while some intermediate files
   are included (in order to aid building on as many platforms as
-  possible).  Releases are tagged on this branch as, e.g., r1.39.
+  possible).  Releases are tagged on this branch as, e.g.,
+  r at PROJECT_VERSION@.
 .
 The autoconf configuration script and the formatted man pages are not
 checked into master branch of the repository.  In order to create the
@@ -608,8 +612,8 @@ In the case of cmake, you then run \verbatim
 which will copy the man pages from the build directory back into the
 source tree and package the resulting source tree for distribution as
 \verbatim
-  GeographicLib-1.39.tar.gz
-  GeographicLib-1.39.zip \endverbatim
+  GeographicLib- at PROJECT_VERSION@.tar.gz
+  GeographicLib- at PROJECT_VERSION@.zip \endverbatim
 Finally, \verbatim
   make package \endverbatim
 or building PACKAGE in Visual Studio will create a binary installer for
@@ -635,7 +639,7 @@ With configure, run \verbatim
   make dist-gzip \endverbatim
 which will create the additional files and packages the results ready
 for distribution as \verbatim
-  geographiclib-1.39.tar.gz \endverbatim
+  geographiclib- at PROJECT_VERSION@.tar.gz \endverbatim
 
 <center>
 Back to \ref intro.  Forward to \ref start.  Up to \ref contents.
@@ -709,10 +713,10 @@ In order to use GeographicLib from C++ code, you will need to
     directory under which GeographicLib is installed);
   - finally, if you need to point to a particular build of GeographicLib,
     define the <i>cmake variable</i> <code>GeographicLib_DIR</code>, which
-    specifies the directory containing the configuration file
-    <code>geographiclib-config.cmake</code> (for debugging this may be the
-    top-level <i>build</i> directory, as opposed to <i>installation</i>
-    directory, for GeographicLib).
+    specifies the absolute path of the directory containing the
+    configuration file <code>geographiclib-config.cmake</code> (for
+    debugging this may be the top-level <i>build</i> directory, as
+    opposed to <i>installation</i> directory, for GeographicLib).
   .
   Typically, specifying nothing or <code>CMAKE_PREFIX_PATH</code>
   suffices.  However the two <code>GeographicLib_DIR</code> variables allow
@@ -726,7 +730,7 @@ In order to use GeographicLib from C++ code, you will need to
 
   If GeographicLib is found, then the following cmake variables are set:
   - <code>GeographicLib_FOUND</code> = 1
-  - <code>GeographicLib_VERSION</code> = 1.39
+  - <code>GeographicLib_VERSION</code> = @PROJECT_VERSION@
   - <code>GeographicLib_INCLUDE_DIRS</code>
   - <code>GeographicLib_LIBRARIES</code> = one of the following two:
   - <code>GeographicLib_SHARED_LIBRARIES</code> = GeographicLib
@@ -953,6 +957,7 @@ Online versions of four of these utilities are provided:
  - <a href="http://geographiclib.sf.net/cgi-bin/GeodSolve">GeodSolve</a>
  - <a href="http://geographiclib.sf.net/cgi-bin/Planimeter">Planimeter</a>
  - <a href="http://geographiclib.sf.net/cgi-bin/GeoidEval">GeoidEval</a>
+ - <a href="http://geographiclib.sf.net/cgi-bin/RhumbSolve">RhumbSolve</a>
 
 <center>
 Back to \ref start.  Forward to \ref organization.  Up to \ref contents.
@@ -1037,13 +1042,11 @@ projections based on the Geodesic class.
 <a href="GeodesicProj.1.html">GeodesicProj</a> is a command line utility
 to exercise these projections.
 
-GeodesicExact and GeodesicLineExact are
-drop in replacements for Geodesic and
-GeodesicLine in which the solution is given in terms of
-elliptic integrals (computed by EllipticFunction).
-These classes should be used if the absolute value of the flattening
-exceeds 0.02.  The -E option to <a href="GeodSolve.1.html">GeodSolve</a>
-uses these classes.
+GeodesicExact and GeodesicLineExact are drop in replacements for
+Geodesic and GeodesicLine in which the solution is given in terms of
+elliptic integrals (computed by EllipticFunction).  These classes should
+be used if the absolute value of the flattening exceeds 0.02.  The -E
+option to <a href="GeodSolve.1.html">GeodSolve</a> uses these classes.
 
 Geocentric and LocalCartesian convert between
 geodetic and geocentric or a local cartesian system.  The constructor for
@@ -1152,11 +1155,11 @@ can test the values of the macros GEOGRAPHICLIB_VERSION_MAJOR,
 GEOGRAPHICLIB_VERSION_MINOR, and GEOGRAPHICLIB_VERSION_PATCH; these
 expand to numbers (and the last one is usually 0); these macros appeared
 starting in version 1.31.  There's also a macro
-GEOGRAPHICLIB_VERSION_STRING which expands to, e.g., "1.39"; this macro
-has been defined since version 1.9.  Since version 1.37, there's also
-been a macro GEOGRAPHICLIB_VERSION which encode the version as a single
-number, e.g, 1003900.  The macro GEOGRAPHICLIB_VERSION_NUM allows you to
-compare versions, e.g., \code
+GEOGRAPHICLIB_VERSION_STRING which expands to, e.g.,
+"@PROJECT_VERSION@"; this macro has been defined since version 1.9.
+Since version 1.37, there's also been a macro GEOGRAPHICLIB_VERSION
+which encode the version as a single number, e.g, 1003900.  The macro
+GEOGRAPHICLIB_VERSION_NUM allows you to compare versions, e.g., \code
 #if GEOGRAPHICLIB_VERSION >= GEOGRAPHICLIB_VERSION_NUM(1,36,0)
 ... \endcode
 
@@ -1308,7 +1311,7 @@ The <code>matlab</code> directory Matlab and Octave implementations of
 some of the functions of GeographicLib.  To use
 these, start Matlab or Octave and run one of (for example) \verbatim
    addpath /usr/local/libexec/GeographicLib/matlab
-   addpath 'C:/pkg-vc10-x64/GeographicLib-1.39/libexec/GeographicLib/matlab'
+   addpath 'C:/pkg-vc10-x64/GeographicLib- at PROJECT_VERSION@/libexec/GeographicLib/matlab'
    \endverbatim
 
 The functions fall into the following groups
@@ -1365,9 +1368,10 @@ The functions fall into the following groups
 
 There are two ways of compiling the interface code: (1) using cmake and
 (2) invoking the compiler from Matlab.
- - <b>Using cmake:</b> Before running cmake, configure MATLAB on
-   Windows to use the same compiler that you're going to use for compiling
-   GeographicLib.  For example \verbatim
+ - <b>Using cmake:</b> (Only tested on Linux and Windows.) Before
+   running cmake, configure MATLAB on Windows to use the same compiler
+   that you're going to use for compiling GeographicLib.  For example
+   \verbatim
    mex.bat -setup
 
    Please choose your compiler for building MEX-files:
@@ -1395,21 +1399,25 @@ There are two ways of compiling the interface code: (1) using cmake and
    instead by using \verbatim
    cmake -D MATLAB_COMPILER=mkoctfile ..
    make matlabinterface \endverbatim
- - <b>Invoking the compiler from Matlab or Octave:</b> Start Matlab or
-   Octave and run, e.g., \code
+ - <b>Invoking the compiler from Matlab or Octave:</b> (Tested with
+   Linux, Mac OSX, and Windows.)  Start Matlab or Octave and run, e.g.,
+   \code
    mex -setup
-   cd 'C:/pkg-vc10-x64/GeographicLib-1.39/matlab'
+   cd 'C:/pkg-vc10-x64/GeographicLib- at PROJECT_VERSION@/matlab'
    help geographiclibinterface
-   geographiclibinterface('C:/pkg-vc10/GeographicLib-1.39');
+   geographiclibinterface('C:/pkg-vc10/GeographicLib- at PROJECT_VERSION@');
    addpath(pwd);
    \endcode
    The first command allows you to select the compiler to use (which
-   should be the same as that used to compile GeographicLib).
+   should be the same as that used to compile GeographicLib).  On Mac
+   OSX and Matlab R2014b, the setup command is \code
+   mex -setup C++
+   \endcode
 
 To use the interface routines for GeographicLib, run one of (for
 example) \verbatim
   addpath /usr/local/libexec/GeographicLib/matlab
-  addpath 'C:/pkg-vc10-x64/GeographicLib-1.39/libexec/GeographicLib/matlab'
+  addpath 'C:/pkg-vc10-x64/GeographicLib- at PROJECT_VERSION@/libexec/GeographicLib/matlab'
 \endverbatim
 in Octave or Matlab.  The available functions are:
  - geodesicdirect: solve direct geodesic problem
@@ -1558,13 +1566,13 @@ EGM2008.  These data files are available for download:
  <td><center>30'</center>
  <td><center>0.6</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm84-30.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm84-30.tar.bz2">
  link</a> (0.5)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm84-30.exe">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm84-30.exe">
  link</a> (0.8)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm84-30.zip">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm84-30.zip">
  link</a> (0.5)</center>
 <tr>
  <td>egm84-15
@@ -1572,13 +1580,13 @@ EGM2008.  These data files are available for download:
  <td><center>15'</center>
  <td><center>2.1</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm84-15.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm84-15.tar.bz2">
  link</a> (1.5)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm84-15.exe">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm84-15.exe">
  link</a> (1.9)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm84-15.zip">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm84-15.zip">
  link</a> (2.0)</center>
 <tr>
  <td>egm96-15
@@ -1586,13 +1594,13 @@ EGM2008.  These data files are available for download:
  <td><center>15'</center>
  <td><center>2.1</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm96-15.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm96-15.tar.bz2">
  link</a> (1.5)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm96-15.exe">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm96-15.exe">
  link</a> (1.9)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm96-15.zip">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm96-15.zip">
  link</a> (2.0)</center>
 <tr>
  <td>egm96-5
@@ -1600,13 +1608,13 @@ EGM2008.  These data files are available for download:
  <td><center>5'</center>
  <td><center> 19</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm96-5.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm96-5.tar.bz2">
  link</a> (11)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm96-5.exe">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm96-5.exe">
  link</a> (11)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm96-5.zip">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm96-5.zip">
  link</a> (17)</center>
 <tr>
  <td>egm2008-5
@@ -1614,13 +1622,13 @@ EGM2008.  These data files are available for download:
  <td><center>5'</center>
  <td><center> 19</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-5.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-5.tar.bz2">
  link</a> (11)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-5.exe">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-5.exe">
  link</a> (11)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-5.zip">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-5.zip">
  link</a> (17)</center>
 <tr>
  <td>egm2008-2_5
@@ -1628,13 +1636,13 @@ EGM2008.  These data files are available for download:
  <td><center>2.5'</center>
  <td><center> 75</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-2_5.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-2_5.tar.bz2">
  link</a> (35)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-2_5.exe">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-2_5.exe">
  link</a> (33)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-2_5.zip">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-2_5.zip">
  link</a> (65)</center>
 <tr>
  <td>egm2008-1
@@ -1642,13 +1650,13 @@ EGM2008.  These data files are available for download:
  <td><center>1'</center>
  <td><center>470</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-1.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-1.tar.bz2">
  link</a> (170)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-1.exe">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-1.exe">
  link</a> (130)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-1.zip">
+ <a href="https://sf.net/projects/geographiclib/files/geoids-distrib/egm2008-1.zip">
  link</a> (390)</center>
 </table>
 </center>
@@ -1996,7 +2004,7 @@ two alternatives:
 \section testgeoid Test data for geoids
 
 A test set for the geoid models is available at
- - <a href="http://sf.net/projects/geographiclib/files/testdata/GeoidHeights.dat.gz">
+ - <a href="https://sf.net/projects/geographiclib/files/testdata/GeoidHeights.dat.gz">
    GeoidHeights.dat.gz</a>
  .
 This is about 11 MB (compressed).  This test set consists of a set of
@@ -2100,52 +2108,52 @@ These gravity models are available for download:
  <td><center>180</center>
  <td><center>27</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/egm84.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/egm84.tar.bz2">
  link</a> (26)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/egm84.exe">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/egm84.exe">
  link</a> (55)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/egm84.zip">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/egm84.zip">
  link</a> (26)</center>
 <tr>
  <td>egm96
  <td><center>360</center>
  <td><center>2100</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/egm96.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/egm96.tar.bz2">
  link</a> (2100)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/egm96.exe">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/egm96.exe">
  link</a> (2300)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/egm96.zip">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/egm96.zip">
  link</a> (2100)</center>
 <tr>
  <td>egm2008
  <td><center>2190</center>
  <td><center>76000</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/egm2008.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/egm2008.tar.bz2">
  link</a> (75000)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/egm2008.exe">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/egm2008.exe">
  link</a> (72000)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/egm2008.zip">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/egm2008.zip">
  link</a> (73000)</center>
 <tr>
  <td>wgs84
  <td><center>20</center>
  <td><center>1</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/wgs84.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/wgs84.tar.bz2">
  link</a> (1)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/wgs84.exe">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/wgs84.exe">
  link</a> (30)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/gravity-distrib/wgs84.zip">
+ <a href="https://sf.net/projects/geographiclib/files/gravity-distrib/wgs84.zip">
  link</a> (1)</center>
 </table>
 </center>
@@ -2560,6 +2568,10 @@ The supported models are
    <a href="http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml"> World
    Magnetic Model 2010</a>, which approximates the main magnetic field
    for the period 2010--2015.
+ - <b>wmm2015</b>, the
+   <a href="http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml"> World
+   Magnetic Model 2015</a>, which approximates the main magnetic field
+   for the period 2015--2020.
  - <b>igrf11</b>, the
    <a href="http://ngdc.noaa.gov/IAGA/vmod/igrf.html">International
    Geomagnetic Reference Field (11th generation)</a>, which approximates
@@ -2594,13 +2606,27 @@ These magnetic models are available for download:
  <td><center>2010--2015</center>
  <td><center>3</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/magnetic-distrib/wmm2010.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/wmm2010.tar.bz2">
+ link</a> (2)</center>
+ <td><center>
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/wmm2010.exe">
+ link</a> (300)</center>
+ <td><center>
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/wmm2010.zip">
+ link</a> (2)</center>
+<tr>
+ <td>wmm2015
+ <td><center>12</center>
+ <td><center>2015--2020</center>
+ <td><center>3</center>
+ <td><center>
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/wmm2015.tar.bz2">
  link</a> (2)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/magnetic-distrib/wmm2010.exe">
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/wmm2015.exe">
  link</a> (300)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/magnetic-distrib/wmm2010.zip">
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/wmm2015.zip">
  link</a> (2)</center>
 <tr>
  <td>igrf11
@@ -2608,13 +2634,13 @@ These magnetic models are available for download:
  <td><center>1900--2015</center>
  <td><center>25</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/magnetic-distrib/igrf11.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/igrf11.tar.bz2">
  link</a> (7)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/magnetic-distrib/igrf11.exe">
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/igrf11.exe">
  link</a> (310)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/magnetic-distrib/igrf11.zip">
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/igrf11.zip">
  link</a> (8)</center>
 <tr>
  <td>emm2010
@@ -2622,13 +2648,13 @@ These magnetic models are available for download:
  <td><center>2010--2015</center>
  <td><center>4400</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/magnetic-distrib/emm2010.tar.bz2">
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/emm2010.tar.bz2">
  link</a> (3700)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/magnetic-distrib/emm2010.exe">
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/emm2010.exe">
  link</a> (3000)</center>
  <td><center>
- <a href="http://sf.net/projects/geographiclib/files/magnetic-distrib/emm2010.zip">
+ <a href="https://sf.net/projects/geographiclib/files/magnetic-distrib/emm2010.zip">
  link</a> (4100)</center>
 </table>
 </center>
@@ -2639,7 +2665,7 @@ geographiclib-get-magnetic (typically installed in /usr/local/sbin)
 which automates the process of downloading and installing the magnetic
 models.  For example
 \verbatim
-   geographiclib-get-magnetic all  # to install wmm2010, igrf11, emm2010
+   geographiclib-get-magnetic all  # install wmm2010, wmm2015, igrf11, emm2010
    geographiclib-get-magnetic -h   # for help
 \endverbatim
 This script should be run as a user with write access to the
@@ -2660,7 +2686,7 @@ Otherwise download \e either the tar.bz2 file \e or the zip file (they
 have the same contents).  To unpack these, run, for example
 \verbatim
    mkdir -p /usr/local/share/GeographicLib
-   tar xofjC wmm2010.tar.bz2 /usr/local/share/GeographicLib
+   tar xofjC wmm2015.tar.bz2 /usr/local/share/GeographicLib
    tar xofjC emm2010.tar.bz2 /usr/local/share/GeographicLib
    etc.
 \endverbatim
@@ -2706,9 +2732,9 @@ keywords
  - keywords that affect the field calculation, namely:
    - <b>Radius</b> (required), the normalizing radius of the model in
      meters.
-   - <b>NumModels</b> (default 1), the number of models.  WMM2010
+   - <b>NumModels</b> (default 1), the number of models.  WMM2015
      consists of a single model giving the magnetic field and its time
-     variation at 2010.  IGRF11 consists of 23 models for 1900 thru 2010
+     variation at 2015.  IGRF11 consists of 23 models for 1900 thru 2010
      at 5 year intervals.  The time variation is given only for the last
      model to allow extrapolation beyond 2010.  For dates prior to 2010,
      linear interpolation is used.
@@ -2840,18 +2866,16 @@ equidistant projection in terms of geodesics.  The
 <a href="GeodesicProj.1.html">GeodesicProj</a> utility provides an
 interface to these projections.
 
-The algorithms used by Geodesic and
-GeodesicLine are based on a Taylor expansion of the
-geodesic integrals valid when the flattening \e f is small.
-GeodesicExact and GeodesicLineExact
-evaluate the integrals exactly (in terms of incomplete elliptic
-integrals).  For the WGS84 ellipsoid, the series solutions are about
-2--3 times faster and 2--3 times more accurate (because it's easier to
-control round-off errors with series solutions); thus
-Geodesic and GeodesicLine are
-recommended for most geodetic applications.  However, in applications
-where the absolute value of \e f is greater than about 0.02, the exact
-classes should be used.
+The algorithms used by Geodesic and GeodesicLine are based on a Taylor
+expansion of the geodesic integrals valid when the flattening \e f is
+small.  GeodesicExact and GeodesicLineExact evaluate the integrals
+exactly (in terms of incomplete elliptic integrals).  For the WGS84
+ellipsoid, the series solutions are about 2--3 times faster and 2--3
+times more accurate (because it's easier to control round-off errors
+with series solutions); thus Geodesic and GeodesicLine are recommended
+for most geodetic applications.  However, in applications where the
+absolute value of \e f is greater than about 0.02, the exact classes
+should be used.
 
 Go to
  - \ref testgeod
@@ -2865,7 +2889,7 @@ For some background information on geodesics on triaxial ellipsoids, see
 
 References:
  - F. W. Bessel,
-   <a href="http://dx.doi.org/10.1002/asna.201011352">The calculation
+   <a href="https://dx.doi.org/10.1002/asna.201011352">The calculation
    of longitude and latitude from geodesic measurements (1825)</a>,
    Astron. Nachr. 331(8), 852-861 (2010);
    translated by C. F. F. Karney and R. E. Deakin; preprint:
@@ -2878,13 +2902,13 @@ References:
  - J. Danielsen,
    The Area under the Geodesic,
    Survey Review 30(232), 61--66 (1989).
-   DOI: <a href="http://dx.doi.org/10.1179/003962689791474267">
+   DOI: <a href="https://dx.doi.org/10.1179/003962689791474267">
    10.1179/003962689791474267</a>
  - C. F. F. Karney,
-   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    Algorithms for geodesics</a>,
    J. Geodesy 87(1), 43--55 (2013);
-   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    10.1007/s00190-012-0578-z</a>;
    addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    geod-addenda.html</a>;
@@ -2899,13 +2923,13 @@ References:
 \section testgeod Test data for geodesics
 
 A test set a geodesics is available at
- - <a href="http://sf.net/projects/geographiclib/files/testdata/GeodTest.dat.gz">
+ - <a href="https://sf.net/projects/geographiclib/files/testdata/GeodTest.dat.gz">
    GeodTest.dat.gz</a>
  .
 This is about 39 MB (compressed).  This consists of a set of geodesics
 for the WGS84 ellipsoid.  A subset of this (consisting of 1/50 of the
 members — about 690 kB, compressed) is available at
- - <a href="http://sf.net/projects/geographiclib/files/testdata/GeodTest-short.dat.gz">
+ - <a href="https://sf.net/projects/geographiclib/files/testdata/GeodTest-short.dat.gz">
    GeodTest-short.dat.gz</a>
 
 Each line of the test set gives 10 space delimited numbers
@@ -2990,9 +3014,8 @@ in <a href="geodesic.mac"> geodesic.mac</a> (this depends on
 <a href="ellint.mac"> ellint.mac</a> and uses the series computed by
 <a href="geod.mac"> geod.mac</a>).  This solve both the direct and
 inverse geodesic problems and offers the ability to solve the problems
-either using series expansions (similar to Geodesic) or
-in terms of elliptic integrals (similar to
-GeodesicExact).
+either using series expansions (similar to Geodesic) or in terms of
+elliptic integrals (similar to GeodesicExact).
 
 \section geodseries Expansions for geodesics
 
@@ -3250,7 +3273,7 @@ C3[9] = + 2431/1179648 * eps^9;
 \endverbatim
 
 The formula for area between the geodesic and the equator is given in
-Sec. 6 of <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+Sec. 6 of <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
 Algorithms for geodesics</a> in terms of \e S,
 \f[
 S = c^2 \alpha + e^2 a^2 \cos\alpha_0 \sin\alpha_0 I_4(\sigma)
@@ -3323,9 +3346,9 @@ C4[9] = + 32768/92147055 * eps^9;
 
 \section geodellip Geodesics in terms of elliptic integrals
 
-GeodesicExact and GeodesicLineExact solve
-the geodesic problem using elliptic integrals.  The formulation of
-geodesic in terms of incomplete elliptic integrals is given in
+GeodesicExact and GeodesicLineExact solve the geodesic problem using
+elliptic integrals.  The formulation of geodesic in terms of incomplete
+elliptic integrals is given in
  - C. F. F. Karney,
    <a href="http://arxiv.org/abs/1102.1215v1">Geodesics
    on an ellipsoid of revolution</a>,
@@ -3811,6 +3834,7 @@ Go to
  - \ref triaxial-survey
  - \ref triaxial-stab
  - \ref triaxial-inverse
+ - \ref triaxial-conformal
 
 <b>NOTES</b>
  -# A triaxial ellipsoid approximates the earth only slightly better
@@ -3841,6 +3865,9 @@ Go to
       represent a degenerate class (they are all closed and all pass
       through the opposite pole).  It is of interest to see how this
       degeneracy is broken with a surface with a more general shape.
+    - Similarly, it is of interest to see how the Mercator projection of
+      the ellipsoid generalizes; this is another problem addressed by
+      Jacobi.
  -# My interest in this problem was piqued by Jean-Marc Baillard.  I put
     him onto Jacobi's solution without having looked at it in detail
     myself; and he quickly implemented the solution for an HP-41
@@ -3863,10 +3890,10 @@ Go to
  -# If you only want to learn about geodesics on a biaxial ellipsoid (an
     ellipsoid of revolution), then see \ref geodesic or the paper
     - C. F. F. Karney,
-      <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+      <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
       Algorithms for geodesics</a>,
       J. Geodesy 87(1), 43--55 (2013);
-      DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+      DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
       10.1007/s00190-012-0578-z</a>;
       addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
       geod-addenda.html</a>.
@@ -3875,7 +3902,7 @@ Go to
 
 Consider the ellipsoid defined by
 \f[
-  f = \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1,
+  f = \frac{X^2}{a^2} + \frac{Y^2}{b^2} + \frac{Z^2}{c^2} = 1,
 \f]
 where, without loss of generality, \f$ a \ge b \ge c \gt 0\f$.  A
 point on the surface is specified by a latitude and longitude.  The \e
@@ -3889,20 +3916,20 @@ The \e parametric latitude and longitude \f$(\phi', \lambda')\f$ are
 defined by
 \f[
 \begin{align}
- x &= a \cos\phi' \cos\lambda', \\
- y &= b \cos\phi' \sin\lambda', \\
- z &= c \sin\phi'.
+ X &= a \cos\phi' \cos\lambda', \\
+ Y &= b \cos\phi' \sin\lambda', \\
+ Z &= c \sin\phi'.
 \end{align}
 \f]
 Jacobi employed the \e ellipsoidal latitude and longitude \f$(\beta,
 \omega)\f$ defined by
 \f[
 \begin{align}
-  x &= a \cos\omega
+  X &= a \cos\omega
       \frac{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}}
            {\sqrt{a^2 - c^2}}, \\
-  y &= b \cos\beta \sin\omega, \\
-  z &= c \sin\beta
+  Y &= b \cos\beta \sin\omega, \\
+  Z &= c \sin\beta
       \frac{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}}
            {\sqrt{a^2 - c^2}}.
 \end{align}
@@ -3939,8 +3966,46 @@ two adjacent umbilical points.  For example, the lines of constant
 construction for ellipses with the ends of the string pinned to the two
 umbilical points.
 
-Inter-conversions between these three latitudes and longitudes and the
-cartesian coordinates are simple algebraic exercises.
+The element of length on the ellipsoid in ellipsoidal coordinates is
+given by
+\f[
+\begin{align}
+\frac{ds^2}{(a^2-b^2)\sin^2\omega+(b^2-c^2)\cos^2\beta} &=
+\frac{b^2\sin^2\beta+c^2\cos^2\beta}
+     {a^2-b^2\sin^2\beta-c^2\cos^2\beta}
+ d\beta^2 \\
+&\qquad+
+\frac{a^2\sin^2\omega+b^2\cos^2\omega}
+     {a^2\sin^2\omega+b^2\cos^2\omega-c^2}
+ d\omega^2.
+\end{align}
+\f]
+
+The torus \f$(\omega, \beta) \in [-\pi,\pi] \times [-\pi,\pi]\f$ covers
+the ellipsoid twice.  In order to facilitate passing to the limit of an
+oblate ellipsoid, we may regard as the principal sheet \f$[-\pi,\pi]
+\times [-\frac12\pi,\frac12\pi]\f$ and insert branch cuts at
+\f$\beta=\pm\frac12\pi\f$.  The rule for switching sheets is
+\f[
+\begin{align}
+\omega & \rightarrow -\omega,\\
+\beta & \rightarrow \pi-\beta,\\
+\alpha & \rightarrow \pi+\alpha,
+\end{align}
+\f]
+where \f$\alpha\f$ is the heading of a path, relative to a line of
+constant \f$\omega\f$.
+
+In the limit \f$b\rightarrow a\f$ (resp. \f$b\rightarrow c\f$), the
+umbilic points converge on the \f$z\f$ (resp. \f$x\f$) axis and an
+oblate (resp. prolate) ellipsoid is obtained with \f$\beta\f$
+(resp. \f$\omega\f$) becoming the standard parametric latitude and
+\f$\omega\f$ (resp. \f$\beta\f$) becoming the standard longitude.  The
+sphere is a non-uniform limit, with the position of the umbilic points
+depending on the ratio \f$(a-b)/(b-c)\f$.
+
+Inter-conversions between the three different latitudes and longitudes
+and the cartesian coordinates are simple algebraic exercises.
 
 \section triaxial-jacobi Jacobi's solution
 
@@ -3957,7 +4022,7 @@ problem in the first half of the nineteenth century.  Jacobi discovered
 that the geodesic equations are separable if they are expressed in
 ellipsoidal coordinates.  You can get an idea of the importance Jacobi
 attached to his discovery from the
-<a href="http://books.google.com/books?id=_09tAAAAMAAJ&pg=PA385">
+<a href="https://books.google.com/books?id=_09tAAAAMAAJ&pg=PA385">
 letter</a> he wrote to his friend and neighbor Bessel:
 <blockquote> The day before yesterday, I reduced to quadrature the
 problem of geodesic lines on an <i>ellipsoid with three unequal
@@ -3972,7 +4037,7 @@ and his result was published in J. Crelle in (1839) with a French
 translation (from German) appearing in J. Liouville in (1841).
 
 Here is the solution, exactly as given by Jacobi
-<a href="http://books.google.com/books?id=Rh8GAAAAYAAJ&pg=PA268"> here</a>
+<a href="https://books.google.com/books?id=Rh8GAAAAYAAJ&pg=PA268"> here</a>
 (with minor changes in notation):
 \f[
 \begin{align}
@@ -4000,10 +4065,10 @@ Incidentally the constant \f$\gamma\f$ may be expressed as
 \gamma = (b^2-c^2)\cos^2\beta\sin^2\alpha-(a^2-b^2)\sin^2\omega\cos^2\alpha
 \f]
 where \f$\alpha\f$ is the angle the geodesic makes with lines of
-constant \f$\omega\f$. In the limit \f$a\rightarrow b\f$, this reduces
+constant \f$\omega\f$. In the limit \f$b\rightarrow a\f$, this reduces
 to \f$\cos\beta\sin\alpha = \text{const.}\f$, the familiar Clairaut
 relation.  A nice derivation of Jacobi's result is given by Darboux
-(1894) <a href="http://books.google.com/books?id=hGMSAAAAIAAJ&pg=PA9">
+(1894) <a href="https://books.google.com/books?id=hGMSAAAAIAAJ&pg=PA9">
 §§583--584</a> where he gives the solution found by Liouville
 (1846) for general quadratic surfaces.  In this formulation, the
 distance along the geodesic, \f$s\f$, is also found using
@@ -4198,7 +4263,7 @@ differential equation with periodic coefficients.  In fact it's a
 special case of Hill's equation which can be treated using Floquet
 theory, see <a href="http://dlmf.nist.gov/28.29">DLMF, §28.29</a>.
 Using the notation of §3 of
-<a href="http://dx.doi.org/10.1007/s00190-012-0578-z"> Algorithms for
+<a href="https://dx.doi.org/10.1007/s00190-012-0578-z"> Algorithms for
 geodesics</a>, the stability is determined by computing the reduced
 length \f$m_{12}\f$ and the geodesic scales \f$M_{12}, M_{21}\f$ over
 half the perimeter of the ellipse and determining the eigenvalues
@@ -4239,7 +4304,7 @@ single point \f$(\beta_1, \omega_1)\f$.
  - Otherwise, the first envelope of the geodesics is a 4-pointed
    astroid.  The cusps of the astroid lie on either \f$\beta = -
    \beta_1\f$ or \f$\omega = \omega_1 + \pi\f$; see
-   <a href="http://dx.doi.org/10.1080/10586458.2003.10504515"> Sinclair
+   <a href="https://dx.doi.org/10.1080/10586458.2003.10504515"> Sinclair
    (2003)</a>.
  - All geodesics intersect (or, in the case of \f$\alpha_1 = 0\f$ or
    \f$\pi\f$, touch) the line \f$\omega = \omega_1 + \pi\f$.
@@ -4273,7 +4338,7 @@ ellipsoid.)  Consider now terminating the geodesics from \f$(\beta_1,
 These properties show that the inverse problem can be solved using
 techniques similar to those employed for an ellipsoid of revolution (see
 §4 of
-<a href="http://dx.doi.org/10.1007/s00190-012-0578-z"> Algorithms for
+<a href="https://dx.doi.org/10.1007/s00190-012-0578-z"> Algorithms for
 geodesics</a>).
  - If the points are opposite umbilical points, an arbitrary
    \f$\alpha_1\f$ may be chosen.
@@ -4317,6 +4382,172 @@ The shortest path found by this method is unique unless:
    shortest geodesic with azimuths \f$\pi - \alpha_1\f$ and
    \f$\pi - \alpha_2\f$.
 
+\section triaxial-conformal Jacobi's conformal projection
+
+In Vorlesungen über Dynamik, §28, Jacobi gives the following
+conformal mapping of the triaxial ellipsoid onto a plane
+\f[
+\begin{align}
+x &= 2 \int \frac
+{\sqrt{a^2 \sin^2\omega + b^2 \cos^2\omega}}
+{\sqrt{a^2 \sin^2\omega + b^2 \cos^2\omega - c^2}}\, d\omega, \\
+y &= 2 \int \frac
+{\sqrt{b^2 \sin^2\beta + c^2 \cos^2\beta}}
+{\sqrt{a^2 - b^2 \sin^2\beta - c^2 \cos^2\beta}}\, d\beta.
+\end{align}
+\f]
+The scale of the projection is
+\f[
+k = \frac2
+{\sqrt{a^2 \sin^2\omega + b^2 (\cos^2\omega-\sin^2\beta) - c^2 \cos^2\beta}}.
+\f]
+Nyrtsov, et al.,
+ - M. V. Nyrtsov, M. E. Flies, M. M. Borisov, P. J. Stooke,
+   <a href="https://dx.doi.org/10.1007/978-3-642-32618-9_17">
+   Jacobi conformal projection of the triaxial ellipsoid: new projection
+   for mapping of small celestial bodies,</a> in
+   <i>Cartography from Pole to Pole</i>,
+   selected contributions to the 26th international conference of the ICA,
+   Dresden 2013,
+   edited by M. Buchroithner, N. Prechtel, and D. Burghardt
+   (Springer, 2014), pp. 235--246.
+ .
+express the projection in terms of elliptic integrals,
+\f[
+\begin{align}
+x&=\frac{2b}{\sqrt{a^2-c^2}}
+G\biggl(\omega',\frac{a^2-b^2}{a^2-c^2},
+        \frac cb\frac{\sqrt{a^2-b^2}}{\sqrt{a^2-c^2}}\biggr),\\
+y&=\frac{2c}{\sqrt{a^2-b^2}}
+G\biggl(\beta',-\frac{b^2-c^2}{a^2-b^2},
+        i\frac ac\frac{\sqrt{b^2-c^2}}{\sqrt{a^2-b^2}}\biggr),
+\end{align}
+\f]
+where
+\f[
+\begin{align}
+\tan\omega' &= \frac{\sqrt{a^2-c^2}}{\sqrt{b^2-c^2}} \tan\omega, \\
+\tan\beta' &= \frac{\sqrt{a^2-b^2}}{\sqrt{a^2-c^2}} \tan\beta,
+\end{align}
+\f]
+and
+\f[
+\begin{align}
+ G(\phi,\alpha^2,k) &= \int_0^\phi
+ \frac{\sqrt{1 - k^2\sin^2\theta}}{1 - \alpha^2\sin^2\theta}\,d\theta\\
+ &=\frac{k^2}{\alpha^2}F(\phi, k)
+ +\biggl(1-\frac{k^2}{\alpha^2}\biggr)\Pi(\phi, \alpha^2, k)
+\end{align}
+\f]
+is the combination of elliptic integrals of the first and third kinds
+that appears in the integral, given by Legendre (1811), for the
+longitude of a geodesic on an ellipsoid of revolution.
+The function \f$ G(\phi,\alpha^2,k) \f$ is provided by the
+EllipticFunction class.  The expression for \f$ x \f$ is essentially the
+same at that given by Nyrtsov, et al.; I have put their expression for
+\f$ y \f$ into a somewhat simpler form using an imaginary modulus.
+
+Using http://dlmf.nist.gov/19.7.E9 the projection may also be written
+as
+\f[
+\begin{align}
+x &= \frac{2a^2}{b{\sqrt{a^2-c^2}}}
+\Pi\biggl(\omega', -\frac{a^2-b^2}{b^2},
+          \frac cb\frac{\sqrt{a^2-b^2}}{\sqrt{a^2-c^2}}\biggr) \\
+&\quad{}-2\tan^{-1}\biggl(\frac{(a^2-b^2) \sin\omega' \cos\omega'}
+{\sqrt{a^2(b^2-c^2)\sin^2\omega' + b^2(a^2-c^2)\cos^2\omega'}}\biggr),\\
+y &= \frac{2b^2}{c\sqrt{a^2-b^2}}
+\Pi\biggl(\beta',-\frac{b^2-c^2}{c^2},
+          i\frac ac\frac{\sqrt{b^2-c^2}}{\sqrt{a^2-b^2}}\biggr) \\
+&\quad{}-2\sinh^{-1}\biggl(\frac{(b^2-c^2)\sin\beta \cos\beta}
+{\sqrt{b^2(a^2-b^2)\sin^2\beta + c^2(a^2-c^2)\cos^2\beta}}\biggr).
+\end{align}
+\f]
+In the case of a nearly spherical ellipsoid, the parameter of the
+elliptic integral (its second argument) is small.
+
+Notes:
+ - \f$x\f$ (resp. \f$y\f$) depends on \f$\omega\f$ (resp. \f$\beta\f$)
+   alone, so that latitude-longitude grid maps to straight lines in the
+   projection.  In this sense, the Jacobi projection is the natural
+   generalization of the Mercator projection for the triaxial ellipsoid.
+   Indeed, in the limit \f$b\rightarrow a\f$, it reduces to the normal
+   Mercator projection for an oblate ellipsoid (apart from an overall
+   scale),
+   \f[
+   \begin{align}
+   x &= \frac{2a}{\sqrt{a^2 - c^2}} \omega,\\
+   y &= \frac{2a}{\sqrt{a^2 - c^2}} \int \frac
+   {\sqrt{a^2 \sin^2\beta + c^2 \cos^2\beta}}{a\cos\beta}\, d\beta\\
+   &= \frac{2a}{\sqrt{a^2 - c^2}} \sinh^{-1}\biggl(\frac ac \tan\beta\biggr) -
+   2\sinh^{-1}\biggl(\frac{\sqrt{a^2-c^2}}c\sin\beta\biggr),\\
+   k &= \frac{2a}{\sqrt{a^2 - c^2}}\frac1{a\cos\beta};
+   \end{align}
+   \f]
+   recall that \f$\beta\f$ is the parametric latitude in this limit.
+ - In the general case (all the axes are different), the scale diverges
+   only at the umbilic points, \f$\sin\omega = \cos\beta = 0\f$.  The
+   behavior of these singularities is illustrated by the complex
+   function
+   \f[
+   f(z;e) = \cosh^{-1}(z/e) - \log(2/e).
+   \f]
+   For \f$e > 0\f$, this function has two square root singularities at
+   \f$\pm e\f$, corresponding to the two northern umbilic points.
+   Plotting contours of its real (resp. imaginary) part gives the
+   behavior of the lines of constant latitude (resp. longitude) near the
+   north pole in Fig. 1.  If we pass to the limit \f$e\rightarrow 0\f$,
+   then \f$ f(z;e)\rightarrow\log z\f$, and the two branch points merge
+   yielding a stronger (logarithmic) singularity at \f$z = 0\f$,
+   concentric circles of latitude, and radial lines of longitude.
+ - Again in the general case, the extents of \f$x\f$ and \f$y\f$ are
+   finite (given by the complete elliptic integral of the third kind),
+   \f[
+   \begin{align}
+   x\bigl({\textstyle\frac12}\pi\bigr) &= \frac{2a^2}{b{\sqrt{a^2-c^2}}}
+   \Pi\biggl(-\frac{a^2-b^2}{b^2},
+   \frac cb\frac{\sqrt{a^2-b^2}}{\sqrt{a^2-c^2}}\biggr),\\
+   y\bigl({\textstyle\frac12}\pi\bigr) &= \frac{2b^2}{c\sqrt{a^2-b^2}}
+   \Pi\biggl(-\frac{b^2-c^2}{c^2},
+   i\frac ac\frac{\sqrt{b^2-c^2}}{\sqrt{a^2-b^2}}\biggr).
+   \end{align}
+   \f]
+ - In particular, if we substitute values appropriate for the earth,
+   \f[
+   \begin{align}
+   a&=(6378137+35)\,\mathrm m,\\
+   b&=(6378137-35)\,\mathrm m,\\
+   c&=6356752\,\mathrm m,\\
+   \end{align}
+   \f]
+   we have
+   \f[
+   \begin{align}
+   x\bigl({\textstyle\frac12}\pi\bigr) &= 38.396508 = 1.0000005\,q,\\
+   y\bigl({\textstyle\frac12}\pi\bigr) &= 103.717719 = 2.7012293\,q,\\
+   \end{align}
+   \f]
+   where
+   \f[
+   q = \pi \frac{\sqrt{a^2+b^2}}{\sqrt{a^2+b^2-2c^2}}.
+   \f]
+ - The projection may be inverted (to give \f$\omega\f$ in terms of
+   \f$x\f$ and \f$\beta\f$ in terms of \f$y\f$) by using Newton's
+   method to find the root of, for example, \f$x(\omega) - x_0 = 0\f$.
+   The derivative \f$ dx(\omega)/d\omega \f$ is, of course, twice the
+   integrand in the first expression for \f$x\f$.
+ - If rhumb lines are defined as curves with a constant bearing relative
+   to the ellipsoid coordinates, then these are straight lines in the
+   Jacobi projection.  A rhumb line which passes over an umbilic point
+   immediately retraces its path.  A rhumb line which crosses the line
+   joining the two northerly umbilic points starts traveling south with
+   a reversed heading (e.g., a NE heading becomes a SW heading).  This
+   behavior is preserved in the limit \f$b\rightarrow a\f$ (although the
+   longitude becomes indeterminate in this limit).
+
+An implementation of the Jacobi conformal projection is given here
+\include JacobiConformal.hpp
+
 <center>
 Back to \ref geodesic.  Forward to \ref rhumb.  Up to \ref contents.
 </center>
@@ -4342,6 +4573,7 @@ piqued by Botnev and Ustinov (2014) who discuss various techniques to
 improve the accuracy of rhumb line calculations.  The items of interest
 here are:
  - Review of accurate formulas for the auxiliary latitudes.
+ - The calculation of the area under a rhumb line.
  - Using divided differences to compute \f$\mu_{12}/\psi_{12}\f$
    maintaining full accuracy.  Two cases are treated:
    - If \f$f\f$ is small, Krüger's series for the transverse
@@ -4362,11 +4594,11 @@ Go to
 
 References:
  - G. G. Bennett,
-   <a href="http://dx.doi.org/10.1017/S0373463300013151">
+   <a href="https://dx.doi.org/10.1017/S0373463300013151">
    Practical Rhumb Line Calculations on the Spheroid</a>
    J. Navigation 49(1), 112--119 (1996).
  - F. W. Bessel,
-   <a href="http://dx.doi.org/10.1002/asna.201011352">The calculation
+   <a href="https://dx.doi.org/10.1002/asna.201011352">The calculation
    of longitude and latitude from geodesic measurements (1825)</a>,
    Astron. Nachr. 331(8), 852-861 (2010);
    translated by C. F. F. Karney and R. E. Deakin; preprint:
@@ -4379,7 +4611,7 @@ References:
    solving with high precision), St. Petersburg State Polytechnical
    University Journal 3(198), 49--58 (2014).
  - K. C. Carlton-Wippern
-   <a href="http://dx.doi.org/10.1017/S0373463300010791">
+   <a href="https://dx.doi.org/10.1017/S0373463300010791">
    On Loxodromic Navigation</a>,
    J. Navigation 45(2), 292--297 (1992).
  - K. E. Engsager and K. Poder,
@@ -4396,10 +4628,10 @@ References:
    <a href="http://www.cs.berkeley.edu/~fateman/papers/divdiff.pdf">
    Symbolic computation of divided differences</a>,
    SIGSAM Bull. 33(3), 7--28 (1999)
-   DOI: <a href="http://dx.doi.org/10.1145/334714.334716">
+   DOI: <a href="https://dx.doi.org/10.1145/334714.334716">
    10.1145/334714.334716</a>.
  - C. F. F. Karney,
-   <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
+   <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">
    Transverse Mercator with an accuracy of a few nanometers</a>,
    J. Geodesy 85(8), 475--485 (Aug. 2011);
    addenda: <a href="http://geographiclib.sourceforge.net/tm-addenda.html">
@@ -4409,17 +4641,17 @@ References:
    resource page:
    <a href="http://geographiclib.sf.net/tm.html"> tm.html</a>.
  - C. F. F. Karney,
-   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    Algorithms for geodesics</a>,
    J. Geodesy 87(1), 43--55 (2013);
-   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    10.1007/s00190-012-0578-z</a>;
    addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    geod-addenda.html</a>;
    resource page:
    <a href="http://geographiclib.sf.net/geod.html"> geod.html</a>.
  - L. Krüger,
-   <a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme
+   <a href="https://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme
    Abbildung des Erdellipsoids in der Ebene</a> (Conformal mapping of
    the ellipsoidal earth to the plane), Royal Prussian Geodetic Institute,
    New Series 52, 172 pp. (1912).
@@ -4427,11 +4659,11 @@ References:
    <a href="http://www.mercator99.webspace.virginmedia.com/">
    The Mercator Projections</a> (2013), §2.5 and §6.5.
  - W. M. Smart
-   <a href="http://dx.doi.org/10.1093/mnras/106.2.124">
+   <a href="https://dx.doi.org/10.1093/mnras/106.2.124">
    On a Problem in Navigation</a>
    MNRAS 106(2), 124--127 (1946).
  - J. E. D. Williams
-   <a href="http://dx.doi.org/10.1017/S0373463300045549">
+   <a href="https://dx.doi.org/10.1017/S0373463300045549">
    Loxodromic Distances on the Terrestrial Spheroid Journal</a>,
    J. Navigation 3(2), 133--140 (1950)
 
@@ -4569,7 +4801,7 @@ These conversions are implemented by Ellipsoid::RectifyingLatitude and
 Ellipsoid::InverseRectifyingLatitude.
 
 If the flattening is small, \f$\mu\f$ can be expressed as a series in
-various ways.  The most economical series is in terms of the second
+various ways.  The most economical series is in terms of the third
 flattening \f$ n = f/(2-f)\f$ and was found by Bessel (1825); see
 Eq. 5.5.7 of Helmert (1880).  Helmert (1880, Eq. 5.6.8) also gives the
 reverted series (finding \f$\beta\f$ given \f$\mu\f$).  These series are
@@ -4610,14 +4842,13 @@ S_{12} = c^2 \lambda_{12} \left<\sin\xi\right>_{12},
 where \f$\left<\sin\xi\right>_{12}\f$ is the mean value of \f$\sin\xi\f$
 given by
 \f[
-\left<\sin\xi\right>_{12} = \frac{S(\chi_2) - S(\chi_1)}{\psi_2 - \psi_1},
-\f]
-with
-\f[
-S(\chi) = \log\sec\chi + \sum_{l=1} R_l\cos(2l\chi),
+\begin{align}
+\left<\sin\xi\right>_{12} &= \frac{S(\chi_2) - S(\chi_1)}{\psi_2 - \psi_1},\\
+S(\chi) &= \log\sec\chi + \sum_{l=1} R_l\cos(2l\chi),
+\end{align}
 \f]
-and \f$R_l = O(n^l)\f$ is given as a series in \f$n\f$ below.  In the
-spherical limit, the sum vanishes.
+\f$\log\f$ is the natural logarithm, and \f$R_l = O(n^l)\f$ is given as
+a series in \f$n\f$ below.  In the spherical limit, the sum vanishes.
 
 Note the simple way that longitude enters into the expression for the
 area.  In the limit \f$\chi_2 \rightarrow \chi_1\f$, we can apply
@@ -4635,8 +4866,8 @@ divided differences (see the \ref divideddiffs "next section") and use
 Clenshaw summation to evaluate the sum (see the \ref dividedclenshaw
 "last section").
 
-Here is the series expansion accurate to 10th order, found by <a
-href="rhumbarea.mac">rhumbarea.mac</a>:
+Here is the series expansion accurate to 10th order, found by
+<a href="rhumbarea.mac">rhumbarea.mac</a>:
 
 \verbatim
 R[1] = - 1/3 * n
@@ -4947,35 +5178,39 @@ of package
 great ellipses.
 
 References:
+ - P. D. Thomas,
+   <a href="http://www.dtic.mil/docs/citations/AD0627893">
+   Mathematical Models for Navigation Systems</a>,
+   TR-182 (U.S. Naval Oceanographic Office, 1965).
  - B. R. Bowring,
-   <a href="http://dx.doi.org/10.1007/BF02521760">
+   <a href="https://dx.doi.org/10.1007/BF02521760">
    The direct and inverse solutions for the great elliptic line on the
    reference ellipsoid</a>, Bull. Geod. 58, 101--108 (1984).
  - M. A. Earle,
    A vector solution for navigation on a great ellipse,
    J. Navigation 53(3), 473--481 (2000).
  - M. A. Earle,
-   <a href="http://dx.doi.org/10.1017/S037346330800475X">
+   <a href="https://dx.doi.org/10.1017/S037346330800475X">
    Vector solutions for azimuth</a>,
    J. Navigation 61(3), 537--545 (2008).
  - C. F. F. Karney,
-   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    Algorithms for geodesics</a>, J. Geodesy 87(1), 43--55 (2013);
    addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    geod-addenda.html</a>.
  - A. Pallikaris & G. Latsas,
-   <a href="http://dx.doi.org/1017/S0373463309005323">
+   <a href="https://dx.doi.org/1017/S0373463309005323">
    New algorithm for great elliptic sailing (GES)</a>,
    J. Navigation 62(3), 493--507 (2009).
  - A. Pallikaris, L. Tsoulos, & D. Paradissis,
    New meridian arc formulas for sailing calculations in navigational
    GIS, International Hydrographic Review, 24--34 (May 2009).
  - L. E. Sjöberg,
-   <a href="http://dx.doi.org/10.2478/v10156-011-0040-9">
+   <a href="https://dx.doi.org/10.2478/v10156-011-0040-9">
    Solutions to the direct and inverse navigation problems on the great
    ellipse</a>, J. Geodetic Science 2(3), 200--205 (2012).
  - R. Williams,
-   <a href="http://dx.doi.org/10.1017/S0373463300013333">
+   <a href="https://dx.doi.org/10.1017/S0373463300013333">
    The Great Ellipse on the Surface of the Spheroid</a>,
    J. Navigation 49(2), 229--234 (1996).
  - T. Vincenty,
@@ -4996,7 +5231,7 @@ Go to
 Adopt the usual notation for the ellipsoid: equatorial semi-axis
 \f$a\f$, polar semi-axis \f$b\f$, flattening \f$f = (a-b)/a\f$,
 eccentricity \f$e = \sqrt{f(2-f)}\f$, second eccentricity \f$e' =
-e/(1-f)\f$.
+e/(1-f)\f$, and third flattening \f$n=(a-b)/(a+b)=f/(2-f)\f$.
 
 There are several ways in which an ellipsoid can be mapped into a sphere
 converting the great ellipse into a great circle.  The simplest ones
@@ -5015,9 +5250,9 @@ Bowring (1984), Williams (1996), Earle (2000, 2008) and Pallikaris &
 Latsas (2009), scale the ellipsoid radially onto a sphere preserving the
 geocentric latitude \f$\theta\f$.  More convenient than this is to scale
 the ellipsoid along \f$\hat z\f$ onto the sphere, as is done by
-Sjöberg (2012), thus preserving the parametric latitude
-\f$\beta\f$.  The advantage of this "parametric" mapping is that
-Bessel's rapidly converging series for meridian arc in terms of
+Thomas (1965) and Sjöberg (2012), thus preserving the parametric
+latitude \f$\beta\f$.  The advantage of this "parametric" mapping is
+that Bessel's rapidly converging series for meridian arc in terms of
 parametric latitude can be used (a possibility that is overlooked by
 Sjöberg).
 
@@ -5039,7 +5274,7 @@ The full parametric mapping is:
  - Positions on the great circle of radius \f$a\f$ are parametrized by
    arc length \f$\sigma\f$ measured from the northward crossing of the
    equator.  The great ellipse has semi-axes \f$a\f$ and
-   \f$a\sqrt{1-e^2\cos^2\gamma_0}\f$, where \f$\gamma_0\f$ is the
+   \f$b'=a\sqrt{1-e^2\cos^2\gamma_0}\f$, where \f$\gamma_0\f$ is the
    great-circle azimuth at the northward equator crossing, and
    \f$\sigma\f$ is the parametric angle on the ellipse.  [In constrast,
    the ellipse giving distances on a geodesic has semi-axes
@@ -5055,10 +5290,10 @@ the ellipsoid.
 \section gearea The area under a great ellipse
 
 The area between the segment of a great ellipse and the equator can be
-found by very similar methods to those used for geodesic areas; see <a
-href="http://dx.doi.org/10.1179/003962689791474267"> Danielsen
+found by very similar methods to those used for geodesic areas; see
+<a href="https://dx.doi.org/10.1179/003962689791474267"> Danielsen
 (1989)</a>.  The notation here is similar to that employed by
-<a href="http://dx.doi.org/10.1007/s00190-012-0578-z"> Karney
+<a href="https://dx.doi.org/10.1007/s00190-012-0578-z"> Karney
 (2013)</a>.
 \f[
 \begin{align}
@@ -5079,7 +5314,8 @@ r(x) &= \sqrt{1+x} + (\sinh^{-1}\sqrt x)/\sqrt x.
 \end{align}
 \f]
 Expand in terms of the third flattening of the ellipsoid, \f$n\f$, and the
-third flattening of the great ellipse, \f$\epsilon\f$, by substituting
+third flattening of the great ellipse, \f$\epsilon=(a-b')/(a+b')\f$, by
+substituting
 \f[
 \begin{align}
 e'&=\frac{2\sqrt n}{1-n},\\
@@ -5106,8 +5342,8 @@ Compared to the area under a geodesic, we have
   \f$e'\f$, whereas it is \f$e\cos\gamma_0\f$ that plays the role of the
   eccentricity for the great ellipse.
 
-Here is the series expansion accurate to 10th order, found by <a
-href="gearea.mac">gearea.mac</a>:
+Here is the series expansion accurate to 10th order, found by
+<a href="gearea.mac">gearea.mac</a>:
 
 \verbatim
 G4[0] = + (1/6 + 7/30 * n + 8/105 * n^2 + 4/315 * n^3 + 16/3465 * n^4 + 20/9009 * n^5 + 8/6435 * n^6 + 28/36465 * n^7 + 32/62985 * n^8 + 4/11305 * n^9)
@@ -5299,7 +5535,7 @@ Go to
 
 References:
  - L. Krüger,
-   <a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme
+   <a href="https://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme
    Abbildung des Erdellipsoids in der Ebene</a> (Conformal mapping of
    the ellipsoidal earth to the plane), Royal Prussian Geodetic Institute,
    New Series 52, 172 pp. (1912).
@@ -5310,10 +5546,10 @@ References:
    (Also appeared as:
    Monograph 16, Suppl. No. 1 to Canadian Cartographer, Vol 13).
    Part V, pp. 67--101,
-   <a href="http://dx.doi.org/10.3138/X687-1574-4325-WM62">Conformal
+   <a href="https://dx.doi.org/10.3138/X687-1574-4325-WM62">Conformal
    Projections Based On Jacobian Elliptic Functions</a>.
  - C. F. F. Karney,
-   <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
+   <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">
    Transverse Mercator with an accuracy of a few nanometers</a>,
    J. Geodesy 85(8), 475--485 (Aug. 2011);
    addenda: <a href="http://geographiclib.sourceforge.net/tm-addenda.html">
@@ -5334,7 +5570,7 @@ illustration of the exact transverse Mercator grid in Google Earth.
 \section testmerc Test data for the transverse Mercator projection
 
 A test set for the transverse Mercator projection is available at
- - <a href="http://sf.net/projects/geographiclib/files/testdata/TMcoords.dat.gz">
+ - <a href="https://sf.net/projects/geographiclib/files/testdata/TMcoords.dat.gz">
    TMcoords.dat.gz</a>
  .
 This is about 17 MB (compressed).  This test set consists of a set of
@@ -5554,7 +5790,7 @@ Further instructions are included at the top of the file.
 
 This section gives color versions of the figures in
  - C. F. F. Karney,
-   <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
+   <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">
    Transverse Mercator with an accuracy of a few nanometers</a>,
    J. Geodesy 85(8), 475--485 (Aug. 2011);
    addenda: <a href="http://geographiclib.sourceforge.net/tm-addenda.html">
@@ -5667,7 +5903,7 @@ Back to \ref transversemercator.  Forward to \ref auxlat.  Up to
 
 The implementation of Geocentric::Reverse is adapted from
  - H. Vermeille,
-   <a href="http://dx.doi.org/10.1007/s00190-002-0273-6">
+   <a href="https://dx.doi.org/10.1007/s00190-002-0273-6">
    Direct transformation from geocentric coordinates to geodetic
    coordinates</a>, J. Geodesy 76, 451--454 (2002).
 
@@ -5684,7 +5920,7 @@ described in Appendix B of
  .
 Vermeille similarly updated his method in
  - H. Vermeille,
-   <a href="http://dx.doi.org/10.1007/s00190-010-0419-x">
+   <a href="https://dx.doi.org/10.1007/s00190-010-0419-x">
    An analytical method to transform geocentric into
    geodetic coordinates</a>, J. Geodesy 85, 105--117 (2011).
 
@@ -5761,12 +5997,12 @@ inaccurate results due to underflow; in the other hand, the case of the
 sphere, \e f = 0, is treated specially and gives accurate results.
 
 Other comparable methods are K. M. Borkowski,
-<a href="http://dx.doi.org/10.1007/BF00643807"> Transformation
+<a href="https://dx.doi.org/10.1007/BF00643807"> Transformation
 of geocentric to geodetic coordinates without approximations</a>,
 Astrophys. Space Sci. 139, 1--4 (1987)
-(<a href="http://dx.doi.org/10.1007/BF00656995"> erratum</a>)
+(<a href="https://dx.doi.org/10.1007/BF00656995"> erratum</a>)
 and T. Fukushima,
-<a href="http://dx.doi.org/10.1007/s001900050271"> Fast transform from
+<a href="https://dx.doi.org/10.1007/s001900050271"> Fast transform from
 geocentric to geodetic coordinates</a>, J. Geodesy 73, 603--610 (1999).
 However the choice of independent variables in these methods leads
 to a loss of accuracy for points near the equatorial plane.
@@ -6596,11 +6832,11 @@ List of versions in reverse chronological order together with a brief
 list of changes.  (Note: Old versions of the library use a year-month
 style of numbering.  Now, the library uses a major and minor version
 number.)  Recent versions of GeographicLib are available at
-<a href="http://sf.net/projects/geographiclib/files/distrib/">
-http://sourceforge.net/projects/geographiclib/files/distrib/</a>.
+<a href="https://sf.net/projects/geographiclib/files/distrib/">
+https://sourceforge.net/projects/geographiclib/files/distrib/</a>.
 Older versions are in
-<a href="http://sf.net/projects/geographiclib/files/distrib/archive/">
-http://sourceforge.net/projects/geographiclib/files/distrib/archive/</a>.
+<a href="https://sf.net/projects/geographiclib/files/distrib/archive/">
+https://sourceforge.net/projects/geographiclib/files/distrib/archive/</a>.
 
 The corresponding documentation for these versions is obtained by
 clicking on the “Version <i>m.nn</i>” links below.  Some of
@@ -6608,7 +6844,38 @@ the links in the documentaion of older versions may be out of date (in
 particular the links for the source code will not work if the code has
 been migrated to the archive subdirectory).  All the releases are
 available as tags “r<i>m.nn</i>” in the the "release" branch
-of the git repository for GeographicLib.
+of the
+<a href="https://sourceforge.net/p/geographiclib/code/ci/release/tree/">
+git repository for GeographicLib</a>.
+
+ - <a href="http://geographiclib.sf.net/1.40">Version 1.40</a>
+   (released 2014-12-18)
+   - Add the World Magnetic Model 2015, wmm2015.  This is now the
+     default magnetic model for
+     <a href="MagneticField.1.html">MagneticField</a> (replacing wmm2010
+     which is valid thru the end of 2014).
+   - Geodesic::Inverse didn't return NaN if one of the longitudes was a
+     NaN (bug introduced in version 1.25).  Fixed in the C++, Java,
+     JavaScript, C, Fortran, and Python implementations of the geodesic
+     routines.  This bug was not present in the Matlab version.
+   - Fix bug in Utility::readarray and Utility::writearray which caused
+     an exception in debug mode with zero-sized arrays.
+   - Fix BLUNDER in OSGB::GridReference (found by kalderami) where the
+     wrong result was returned if the easting or northing was negative.
+   - OSGB::GridReference now returns "INVALID" if either coordinate is
+     NaN.  Similarly a grid reference starting with "IN" results in NaNs
+     for the coordinates.
+   - Default constructor for GeoCoords corresponds to an undefined
+     position (latitude and longitude = NaN), instead of the north pole.
+   - Add an online version of <a href="RhumbSolve.1.html">RhumbSolve</a>
+     at http://geographiclib.sourceforge.net/cgi-bin/RhumbSolve.
+   - Additions to the documentation:
+     - documentation on \ref triaxial-conformal;
+     - a page on \ref auxlat (actually, this was added in version 1.39);
+     - document the use of two single quotes to stand for a double quote
+       in DMS (this feature was introduced in version 1.13).
+   - The Matlab function, geographiclibinterface, which compiles the
+     wrapper routines for Matlab now works with Matlab on a Mac.
 
  - <a href="http://geographiclib.sf.net/1.39">Version 1.39</a>
    (released 2014-11-11)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 167ac69..566d3c4 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -120,19 +120,24 @@ manpages: $(MANPAGES)
 	cp $^ html/
 	touch $@
 
-html/index.html: manpages doxyfile.in GeographicLib.dox \
+html/index.html: manpages doxyfile.in GeographicLib.dox.in \
 	$(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES) \
 	doxyfile-c.in geodesic-c.dox doxyfile-for.in geodesic-for.dox \
 	$(LEGACYFILES)
 	cp -p $(EXTRAFILES) $(top_srcdir)/maxima/*.mac \
 	$(top_srcdir)/LICENSE.txt html/
+	sed -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
+	$(srcdir)/GeographicLib.dox.in > GeographicLib.dox
 	sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
+	-e "s%@PROJECT_BINARY_DIR@%..%g" \
 	-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
 	$(srcdir)/doxyfile.in | $(DOXYGEN) -
 	sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
+	-e "s%@PROJECT_BINARY_DIR@%..%g" \
 	-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
 	$(srcdir)/doxyfile-c.in | $(DOXYGEN) -
 	sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
+	-e "s%@PROJECT_BINARY_DIR@%..%g" \
 	-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
 	$(srcdir)/doxyfile-for.in | $(DOXYGEN) -
 else
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 934da26..519e65e 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -559,19 +559,24 @@ doc: html/index.html
 @HAVE_DOXYGEN_TRUE@	cp $^ html/
 @HAVE_DOXYGEN_TRUE@	touch $@
 
- at HAVE_DOXYGEN_TRUE@html/index.html: manpages doxyfile.in GeographicLib.dox \
+ at HAVE_DOXYGEN_TRUE@html/index.html: manpages doxyfile.in GeographicLib.dox.in \
 @HAVE_DOXYGEN_TRUE@	$(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES) \
 @HAVE_DOXYGEN_TRUE@	doxyfile-c.in geodesic-c.dox doxyfile-for.in geodesic-for.dox \
 @HAVE_DOXYGEN_TRUE@	$(LEGACYFILES)
 @HAVE_DOXYGEN_TRUE@	cp -p $(EXTRAFILES) $(top_srcdir)/maxima/*.mac \
 @HAVE_DOXYGEN_TRUE@	$(top_srcdir)/LICENSE.txt html/
+ at HAVE_DOXYGEN_TRUE@	sed -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
+ at HAVE_DOXYGEN_TRUE@	$(srcdir)/GeographicLib.dox.in > GeographicLib.dox
 @HAVE_DOXYGEN_TRUE@	sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
+ at HAVE_DOXYGEN_TRUE@	-e "s%@PROJECT_BINARY_DIR@%..%g" \
 @HAVE_DOXYGEN_TRUE@	-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
 @HAVE_DOXYGEN_TRUE@	$(srcdir)/doxyfile.in | $(DOXYGEN) -
 @HAVE_DOXYGEN_TRUE@	sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
+ at HAVE_DOXYGEN_TRUE@	-e "s%@PROJECT_BINARY_DIR@%..%g" \
 @HAVE_DOXYGEN_TRUE@	-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
 @HAVE_DOXYGEN_TRUE@	$(srcdir)/doxyfile-c.in | $(DOXYGEN) -
 @HAVE_DOXYGEN_TRUE@	sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
+ at HAVE_DOXYGEN_TRUE@	-e "s%@PROJECT_BINARY_DIR@%..%g" \
 @HAVE_DOXYGEN_TRUE@	-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
 @HAVE_DOXYGEN_TRUE@	$(srcdir)/doxyfile-for.in | $(DOXYGEN) -
 @HAVE_DOXYGEN_FALSE at html/index.html: index.html.in utilities.html.in
diff --git a/doc/NETGeographicLib.dox b/doc/NETGeographicLib.dox
index f616374..0bc8aa8 100644
--- a/doc/NETGeographicLib.dox
+++ b/doc/NETGeographicLib.dox
@@ -11,8 +11,8 @@
 /**
 \mainpage NETGeographicLib library
 \author Scott Heiman (mrmtdew2 at outlook.com)
-\version 1.39
-\date 2014-11-11
+\version 1.40
+\date 2014-12-18
 
 \section abstract Abstract
 
@@ -25,15 +25,15 @@ of the GeographicLib software.  It is a container that provides interfaces
 to the GeographicLib classes.  GeographicLib and NETGeographicLib is an
 integrated product.
 
-The NETGeographic project in the GeographicLib-vc10.sln file located in
-\<install folder\>/GeographicLib-1.39/windows will create the NETGeographicLib
-DLL.  The source code for NETGeographicLib is located in
-\<install folder\>/GeographicLib-1.39/dotnet/NETGeographicLib.  NETGeographicLib
-is not available for older versions of Microsoft Visual Studio.
+The NETGeographic solutions and C++ projects are located in the
+\<install\>/windows folder.  The C# Projections projects are located in
+the \<install\>/dotnet/Projections folder.  Solution files have been provided
+for VS 2010 and VS 2013 NETGeographicLib is not available for older
+versions of Microsoft Visual Studio.
 
 NETGeographicLib has been tested with C#, Managed C++, and Visual Basic.
 Sample code snippets can be found in
-\<install folder\>/GeographicLib-1.39/dotnet/examples.
+\<install folder\>/GeographicLib-1.40/dotnet/examples.
 
 \section differences Differences between NETGeographicLib and GeographicLib
 
@@ -135,7 +135,7 @@ to any Visual Basic source that uses NETGeographicLib classes.
 
 A C# sample application is provided that demonstrates NETGeographicLib classes.
 The source code for the sample application is located in
-\<install folder\>/GeographicLib-1.39/dotnet/Projections.  The sample
+\<install folder\>/GeographicLib-1.40/dotnet/Projections.  The sample
 application creates a tabbed dialog.  Each tab provides data entry fields that
 allow the user to exercise one or more NETGeographicLib classes.
 
diff --git a/doc/doxyfile.in b/doc/doxyfile.in
index 38e4666..8882c86 100644
--- a/doc/doxyfile.in
+++ b/doc/doxyfile.in
@@ -650,7 +650,7 @@ WARN_LOGFILE           =
 INPUT                  = @PROJECT_SOURCE_DIR@/src \
                          @PROJECT_SOURCE_DIR@/include/GeographicLib \
                          @PROJECT_SOURCE_DIR@/tools \
-                         @PROJECT_SOURCE_DIR@/doc/GeographicLib.dox
+                         @PROJECT_BINARY_DIR@/doc/GeographicLib.dox
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
diff --git a/doc/geodesic-c.dox b/doc/geodesic-c.dox
index 3a62436..2c4552e 100644
--- a/doc/geodesic-c.dox
+++ b/doc/geodesic-c.dox
@@ -11,7 +11,7 @@
 /**
 \mainpage Geodesic routines implemented in C
 \author Charles F. F. Karney (charles at karney.com)
-\version 1.39
+\version 1.40
 
 \section abstract Abstract
 
@@ -27,13 +27,13 @@ about any C compiler.
 \section download Downloading the source
 
 The C library is part of %GeographicLib which available for download at
-- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.39.tar.gz">
-  GeographicLib-1.39.tar.gz</a>
-- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.39.zip">
-  GeographicLib-1.39.zip</a>
+- <a href="https://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.40.tar.gz">
+  GeographicLib-1.40.tar.gz</a>
+- <a href="https://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.40.zip">
+  GeographicLib-1.40.zip</a>
 .
 as either a compressed tar file (tar.gz) or a zip file.  After unpacking
-the source, the C library can be found in GeographicLib-1.39/legacy/C.
+the source, the C library can be found in GeographicLib-1.40/legacy/C.
 The library consists of two files geodesic.c and geodesic.h.
 
 The library is also included as part of
@@ -95,7 +95,7 @@ echo 30 0 29.5 179.5 | ./inverse \endverbatim
 \section external External links
 
 - These algorithms are derived in C. F. F. Karney,
-  <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+  <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
   Algorithms for geodesics</a>,
   J. Geodesy <b>87</b>, 43--55 (2013)
   (<a href="http://geographiclib.sf.net/geod-addenda.html"> addenda</a>).
diff --git a/doc/geodesic-for.dox b/doc/geodesic-for.dox
index ce03d24..8618aca 100644
--- a/doc/geodesic-for.dox
+++ b/doc/geodesic-for.dox
@@ -11,7 +11,7 @@
 /**
 \mainpage Geodesic routines implemented in Fortran
 \author Charles F. F. Karney (charles at karney.com)
-\version 1.39
+\version 1.40
 
 \section abstract Abstract
 
@@ -25,14 +25,14 @@ compile correctly with just about any Fortran compiler.
 \section download Downloading the source
 
 The Fortran library is part of %GeographicLib which available for download at
-- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.39.tar.gz">
-  GeographicLib-1.39.tar.gz</a>
-- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.39.zip">
-  GeographicLib-1.39.zip</a>
+- <a href="https://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.40.tar.gz">
+  GeographicLib-1.40.tar.gz</a>
+- <a href="https://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.40.zip">
+  GeographicLib-1.40.zip</a>
 .
 as either a compressed tar file (tar.gz) or a zip file.  After unpacking
 the source, the Fortran library can be found in
-GeographicLib-1.39/legacy/Fortran.  The library consists of the file
+GeographicLib-1.40/legacy/Fortran.  The library consists of the file
 geodesic.for.
 
 \section doc Library documentation
@@ -97,7 +97,7 @@ and are therefore in the public domain.
 \section external External links
 
 - These algorithms are derived in C. F. F. Karney,
-  <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+  <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
   Algorithms for geodesics</a>,
   J. Geodesy <b>87</b>, 43--55 (2013)
   (<a href="http://geographiclib.sf.net/geod-addenda.html"> addenda</a>).
diff --git a/doc/geodseries30.html b/doc/geodseries30.html
index 9305117..98ed2de 100644
--- a/doc/geodseries30.html
+++ b/doc/geodseries30.html
@@ -12,13 +12,13 @@ This extends the series given
 flattening.  See
     <blockquote>
       Charles F. F. Karney,<br>
-      <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+      <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
 	<i>Algorithms for geodesics</i></a>,<br>
       J. Geodesy <b>87</b>(1), 43–55 (Jan. 2013);<br>
       DOI:
-      <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+      <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
 	10.1007/s00190-012-0578-z</a>
-      (<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">pdf</a>);
+      (<a href="https://dx.doi.org/10.1007/s00190-012-0578-z">pdf</a>);
       addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
 	geod-addenda.html</a>.
     </blockquote>
diff --git a/doc/scripts/GeographicLib/Geodesic.js b/doc/scripts/GeographicLib/Geodesic.js
index 3c34841..3fdbd43 100644
--- a/doc/scripts/GeographicLib/Geodesic.js
+++ b/doc/scripts/GeographicLib/Geodesic.js
@@ -9,7 +9,7 @@
  *
  *    Charles F. F. Karney,
  *    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
- *    http://dx.doi.org/10.1007/s00190-012-0578-z
+ *    https://dx.doi.org/10.1007/s00190-012-0578-z
  *    Addenda: http://geographiclib.sf.net/geod-addenda.html
  *
  * Copyright (c) Charles Karney (2011-2014) <charles at karney.com> and licensed
@@ -543,7 +543,8 @@ GeographicLib.GeodesicLine = {};
           cbet2 * sbet1 * m.sq(somg12) / (1 - comg12);
       }
     }
-    if (vals.salp1 > 0) {       // Sanity check on starting guess
+    // Sanity check on starting guess.  Backwards check allows NaN through.
+    if (!(vals.salp1 <= 0)) {
       // SinCosNorm(vals.salp1, vals.calp1);
       t = m.hypot(vals.salp1, vals.calp1); vals.salp1 /= t; vals.calp1 /= t;
     } else {
diff --git a/doc/scripts/GeographicLib/GeodesicLine.js b/doc/scripts/GeographicLib/GeodesicLine.js
index 6699c50..89d46aa 100644
--- a/doc/scripts/GeographicLib/GeodesicLine.js
+++ b/doc/scripts/GeographicLib/GeodesicLine.js
@@ -9,7 +9,7 @@
  *
  *    Charles F. F. Karney,
  *    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
- *    http://dx.doi.org/10.1007/s00190-012-0578-z
+ *    https://dx.doi.org/10.1007/s00190-012-0578-z
  *    Addenda: http://geographiclib.sf.net/geod-addenda.html
  *
  * Copyright (c) Charles Karney (2011-2014) <charles at karney.com> and licensed
diff --git a/doc/scripts/GeographicLib/Interface.js b/doc/scripts/GeographicLib/Interface.js
index 1ab1b27..f25a9e4 100644
--- a/doc/scripts/GeographicLib/Interface.js
+++ b/doc/scripts/GeographicLib/Interface.js
@@ -14,7 +14,7 @@
  *
  *    Charles F. F. Karney,
  *    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
- *    http://dx.doi.org/10.1007/s00190-012-0578-z
+ *    https://dx.doi.org/10.1007/s00190-012-0578-z
  *    Addenda: http://geographiclib.sf.net/geod-addenda.html
  *
  * Copyright (c) Charles Karney (2011-2014) <charles at karney.com> and licensed
diff --git a/doc/scripts/GeographicLib/PolygonArea.js b/doc/scripts/GeographicLib/PolygonArea.js
index f720842..ae9d0a7 100644
--- a/doc/scripts/GeographicLib/PolygonArea.js
+++ b/doc/scripts/GeographicLib/PolygonArea.js
@@ -9,7 +9,7 @@
  *
  *    Charles F. F. Karney,
  *    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
- *    http://dx.doi.org/10.1007/s00190-012-0578-z
+ *    https://dx.doi.org/10.1007/s00190-012-0578-z
  *    Addenda: http://geographiclib.sf.net/geod-addenda.html
  *
  * Copyright (c) Charles Karney (2011-2014) <charles at karney.com> and licensed
diff --git a/doc/scripts/geod-calc.html b/doc/scripts/geod-calc.html
index d126275..adb0481 100644
--- a/doc/scripts/geod-calc.html
+++ b/doc/scripts/geod-calc.html
@@ -171,13 +171,13 @@ function GeodesicArea(input, polyline) {
       algorithms are derived in
       <blockquote>
 	Charles F. F. Karney,<br>
-	<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+	<a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
 	  <i>Algorithms for geodesics</i></a>,<br>
 	J. Geodesy <b>87</b>(1), 43–55 (Jan. 2013);<br>
 	DOI:
-	<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+	<a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
 	  10.1007/s00190-012-0578-z</a>
-	(<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">pdf</a>);
+	(<a href="https://dx.doi.org/10.1007/s00190-012-0578-z">pdf</a>);
 	addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
 	  geod-addenda.html</a>.
       </blockquote>
diff --git a/doc/scripts/geod-google-instructions.html b/doc/scripts/geod-google-instructions.html
index a93d2b6..d967982 100644
--- a/doc/scripts/geod-google-instructions.html
+++ b/doc/scripts/geod-google-instructions.html
@@ -89,13 +89,13 @@
       The algorithms are derived in
       <blockquote>
 	Charles F. F. Karney,<br>
-	<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+	<a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
 	  <i>Algorithms for geodesics</i></a>,<br>
 	J. Geodesy <b>87</b>(1), 43–55 (Jan. 2013);<br>
 	DOI:
-	<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+	<a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
 	  10.1007/s00190-012-0578-z</a>
-	(<a href="http://dx.doi.org/10.1007/s00190-012-0578-z">pdf</a>);<br>
+	(<a href="https://dx.doi.org/10.1007/s00190-012-0578-z">pdf</a>);<br>
 	addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
 	  geod-addenda.html</a>.
       </blockquote>
diff --git a/doc/tmseries30.html b/doc/tmseries30.html
index 26b1f93..0ce8832 100644
--- a/doc/tmseries30.html
+++ b/doc/tmseries30.html
@@ -12,17 +12,17 @@
     order in the flattening.  See
     <blockquote>
       Louis Krueger,
-      <a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28">
+      <a href="https://dx.doi.org/10.2312/GFZ.b103-krueger28">
         Konforme Abbildung des Erdellipsoids in der Ebene</a>,
       Royal Prussian Geodetic Institute, New Series 52, 172 pp. (1912),
       DOI:
-      <a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28">
+      <a href="https://dx.doi.org/10.2312/GFZ.b103-krueger28">
         10.2312/GFZ.b103-krueger28</a>
     </blockquote>
     and
     <blockquote>
       Charles F. F. Karney,
-      <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
+      <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">
         Transverse Mercator with an accuracy of a few nanometers</a>,
       J. Geodesy 85(8), 475–485 (Aug. 2011); preprint
       <a href="http://arxiv.org/abs/1002.1417">arXiv:1002.1417</a>;
diff --git a/dotnet/NETGeographicLib/Accumulator.h b/dotnet/NETGeographicLib/Accumulator.h
index 825306f..a0fa765 100644
--- a/dotnet/NETGeographicLib/Accumulator.h
+++ b/dotnet/NETGeographicLib/Accumulator.h
@@ -22,7 +22,7 @@ namespace NETGeographicLib
     precision of the sum is 106 bits or about 32 decimal places.
 
     The implementation follows J. R. Shewchuk,
-    <a href="http://dx.doi.org/10.1007/PL00009321"> Adaptive Precision
+    <a href="https://dx.doi.org/10.1007/PL00009321"> Adaptive Precision
     Floating-Point Arithmetic and Fast Robust Geometric Predicates</a>,
     Discrete & Computational Geometry 18(3) 305--363 (1997).
 
diff --git a/dotnet/NETGeographicLib/DMS.h b/dotnet/NETGeographicLib/DMS.h
index 5b796ca..a72e639 100644
--- a/dotnet/NETGeographicLib/DMS.h
+++ b/dotnet/NETGeographicLib/DMS.h
@@ -95,24 +95,25 @@ public:
      * Degrees, minutes, and seconds are indicated by the characters d, '
      * (single quote), " (double quote), and these components may only be
      * given in this order.  Any (but not all) components may be omitted and
-     * other symbols (e.g., the ° symbol for degrees and the unicode
-     * prime and double prime symbols for minutes and seconds) may be
-     * substituted.  The last component indicator may be omitted and is assumed
-     * to be the next smallest unit (thus 33d10 is interpreted as 33d10').  The
-     * final component may be a decimal fraction but the non-final components
-     * must be integers.  Instead of using d, ', and " to indicate
-     * degrees, minutes, and seconds, : (colon) may be used to <i>separate</i>
-     * these components (numbers must appear before and after each colon); thus
-     * 50d30'10.3" may be written as 50:30:10.3, 5.5' may be written
-     * 0:5.5, and so on.  The integer parts of the minutes and seconds
-     * components must be less than 60.  A single leading sign is permitted.  A
-     * hemisphere designator (N, E, W, S) may be added to the beginning or end
-     * of the string.  The result is multiplied by the implied sign of the
-     * hemisphere designator (negative for S and W).  In addition \e ind is set
-     * to DMS::LATITUDE if N or S is present, to DMS::LONGITUDE if E or W is
-     * present, and to DMS::NONE otherwise.  Throws an error on a malformed
-     * string.  No check is performed on the range of the result.  Examples of
-     * legal and illegal strings are
+     * other symbols (e.g., the ° symbol for degrees and the unicode prime
+     * and double prime symbols for minutes and seconds) may be substituted;
+     * two single quotes can be used instead of ".  The last component
+     * indicator may be omitted and is assumed to be the next smallest unit
+     * (thus 33d10 is interpreted as 33d10').  The final component may be a
+     * decimal fraction but the non-final components must be integers.  Instead
+     * of using d, ', and " to indicate degrees, minutes, and seconds, :
+     * (colon) may be used to <i>separate</i> these components (numbers must
+     * appear before and after each colon); thus 50d30'10.3" may be
+     * written as 50:30:10.3, 5.5' may be written 0:5.5, and so on.  The
+     * integer parts of the minutes and seconds components must be less than
+     * 60.  A single leading sign is permitted.  A hemisphere designator (N, E,
+     * W, S) may be added to the beginning or end of the string.  The result is
+     * multiplied by the implied sign of the hemisphere designator (negative
+     * for S and W).  In addition \e ind is set to DMS::LATITUDE if N or S is
+     * present, to DMS::LONGITUDE if E or W is present, and to DMS::NONE
+     * otherwise.  Throws an error on a malformed string.  No check is
+     * performed on the range of the result.  Examples of legal and illegal
+     * strings are
      * - <i>LEGAL</i> (all the entries on each line are equivalent)
      *   - -20.51125, 20d30'40.5"S, -20°30'40.5, -20d30.675,
      *     N-20d30'40.5", -20:30:40.5
@@ -125,7 +126,7 @@ public:
      * <b>NOTE:</b> At present, all the string handling in the C++
      * implementation %GeographicLib is with 8-bit characters.  The support for
      * unicode symbols for degrees, minutes, and seconds is therefore via the
-     * <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> encoding.  (The
+     * <a href="https://en.wikipedia.org/wiki/UTF-8">UTF-8</a> encoding.  (The
      * JavaScript implementation of this class uses unicode natively, of
      * course.)
      *
diff --git a/dotnet/NETGeographicLib/EllipticFunction.h b/dotnet/NETGeographicLib/EllipticFunction.h
index e62442a..10b8294 100644
--- a/dotnet/NETGeographicLib/EllipticFunction.h
+++ b/dotnet/NETGeographicLib/EllipticFunction.h
@@ -43,14 +43,14 @@ namespace NETGeographicLib
    *
    * The computation of the elliptic integrals uses the algorithms given in
    * - B. C. Carlson,
-   *   <a href="http://dx.doi.org/10.1007/BF02198293"> Computation of real or
+   *   <a href="https://dx.doi.org/10.1007/BF02198293"> Computation of real or
    *   complex elliptic integrals</a>, Numerical Algorithms 10, 13--26 (1995)
    * .
    * with the additional optimizations given in http://dlmf.nist.gov/19.36.i.
    * The computation of the Jacobi elliptic functions uses the algorithm given
    * in
    * - R. Bulirsch,
-   *   <a href="http://dx.doi.org/10.1007/BF01397975"> Numerical Calculation of
+   *   <a href="https://dx.doi.org/10.1007/BF01397975"> Numerical Calculation of
    *   Elliptic Integrals and Elliptic Functions</a>, Numericshe Mathematik 7,
    *   78--90 (1965).
    * .
@@ -365,7 +365,7 @@ namespace NETGeographicLib
          * Legendre expresses the longitude of a point on the geodesic in terms of
          * this combination of elliptic integrals in Exercices de Calcul
          * Intégral, Vol. 1 (1811), p. 181,
-         * http://books.google.com/books?id=riIOAAAAQAAJ&pg=PA181.
+         * https://books.google.com/books?id=riIOAAAAQAAJ&pg=PA181.
          *
          * See \ref geodellip for the expression for the longitude in terms of this
          * function.
@@ -392,7 +392,7 @@ namespace NETGeographicLib
          *
          * Cayley expresses the longitude difference of a point on the geodesic in
          * terms of this combination of elliptic integrals in Phil. Mag. <b>40</b>
-         * (1870), p. 333, http://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA333.
+         * (1870), p. 333, https://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA333.
          *
          * See \ref geodellip for the expression for the longitude in terms of this
          * function.
diff --git a/dotnet/NETGeographicLib/GeoCoords.h b/dotnet/NETGeographicLib/GeoCoords.h
index 1ce789a..332d1c1 100644
--- a/dotnet/NETGeographicLib/GeoCoords.h
+++ b/dotnet/NETGeographicLib/GeoCoords.h
@@ -65,8 +65,7 @@ namespace NETGeographicLib
          **********************************************************************/
         ///@{
         /**
-         * The default constructor is equivalent to \e latitude = 90°,
-         * \e longitude = 0°.
+         * The default constructor sets the coordinate as undefined.
          **********************************************************************/
         GeoCoords();
 
diff --git a/dotnet/NETGeographicLib/Geocentric.h b/dotnet/NETGeographicLib/Geocentric.h
index 2052ac4..a4912dc 100644
--- a/dotnet/NETGeographicLib/Geocentric.h
+++ b/dotnet/NETGeographicLib/Geocentric.h
@@ -28,7 +28,7 @@ namespace NETGeographicLib
    * The conversion from geographic to geocentric coordinates is
    * straightforward.  For the reverse transformation we use
    * - H. Vermeille,
-   *   <a href="http://dx.doi.org/10.1007/s00190-002-0273-6"> Direct
+   *   <a href="https://dx.doi.org/10.1007/s00190-002-0273-6"> Direct
    *   transformation from geocentric coordinates to geodetic coordinates</a>,
    *   J. Geodesy 76, 451--454 (2002).
    * .
diff --git a/dotnet/NETGeographicLib/Geodesic.h b/dotnet/NETGeographicLib/Geodesic.h
index 250a2b6..abb9a98 100644
--- a/dotnet/NETGeographicLib/Geodesic.h
+++ b/dotnet/NETGeographicLib/Geodesic.h
@@ -140,10 +140,10 @@ namespace NETGeographicLib
    *
    * The algorithms are described in
    * - C. F. F. Karney,
-   *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   Algorithms for geodesics</a>,
    *   J. Geodesy <b>87</b>, 43--55 (2013);
-   *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
    *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    *   geod-addenda.html</a>.
diff --git a/dotnet/NETGeographicLib/GeodesicLine.h b/dotnet/NETGeographicLib/GeodesicLine.h
index 940efe1..6f492e0 100644
--- a/dotnet/NETGeographicLib/GeodesicLine.h
+++ b/dotnet/NETGeographicLib/GeodesicLine.h
@@ -39,10 +39,10 @@ namespace NETGeographicLib
    *
    * The algorithms are described in
    * - C. F. F. Karney,
-   *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   Algorithms for geodesics</a>,
    *   J. Geodesy <b>87</b>, 43--55 (2013);
-   *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
    *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    *   geod-addenda.html</a>.
diff --git a/dotnet/NETGeographicLib/Geohash.h b/dotnet/NETGeographicLib/Geohash.h
index c198776..abedf89 100644
--- a/dotnet/NETGeographicLib/Geohash.h
+++ b/dotnet/NETGeographicLib/Geohash.h
@@ -16,8 +16,8 @@ namespace NETGeographicLib
    * \brief .NET wrapper for GeographicLib::Geohash.
    *
    * Geohashes are described in
-   * - http://en.wikipedia.org/wiki/Geohash
-   * - http://geohash.org/
+   * - https://en.wikipedia.org/wiki/Geohash
+   * - http://geohash.org/ (this link is broken as of 2012-12-11)
    * .
    * They provide a compact string representation of a particular geographic
    * location (expressed as latitude and longitude), with the property that if
diff --git a/dotnet/NETGeographicLib/Gnomonic.h b/dotnet/NETGeographicLib/Gnomonic.h
index 67ef1a7..d97e795 100644
--- a/dotnet/NETGeographicLib/Gnomonic.h
+++ b/dotnet/NETGeographicLib/Gnomonic.h
@@ -21,10 +21,10 @@ namespace NETGeographicLib
    * %Gnomonic projection centered at an arbitrary position \e C on the
    * ellipsoid.  This projection is derived in Section 8 of
    * - C. F. F. Karney,
-   *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   Algorithms for geodesics</a>,
    *   J. Geodesy <b>87</b>, 43--55 (2013);
-   *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
    *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    *   geod-addenda.html</a>.
diff --git a/dotnet/NETGeographicLib/MGRS.h b/dotnet/NETGeographicLib/MGRS.h
index c3ae100..c32c27c 100644
--- a/dotnet/NETGeographicLib/MGRS.h
+++ b/dotnet/NETGeographicLib/MGRS.h
@@ -132,7 +132,7 @@ namespace NETGeographicLib
          * of a band boundary.  For prec in [6, 11], the conversion is accurate to
          * roundoff.
          *
-         * If \e prec = -1, then the "grid zone designation", e.g., 18T, is
+         * If \e prec = −1, then the "grid zone designation", e.g., 18T, is
          * returned.  This consists of the UTM zone number (absent for UPS) and the
          * first letter of the MGRS string which labels the latitude band for UTM
          * and the hemisphere for UPS.
@@ -210,10 +210,11 @@ namespace NETGeographicLib
          * suitable (but essentially arbitrary) point within that grid zone is
          * returned.  The main utility of the conversion is to allow \e zone and \e
          * northp to be determined.  In this case, the \e centerp parameter is
-         * ignored.
+         * ignored and \e prec is set to −1.
          *
          * If the first 3 characters of \e mgrs are "INV", then \e x and \e y are
-         * set to NaN and \e zone is set to UTMUPS::INVALID.
+         * set to NaN, \e zone is set to UTMUPS::INVALID, and \e prec is set to
+         * −2.
          *
          * If an exception is thrown, then the arguments are unchanged.
          **********************************************************************/
diff --git a/dotnet/NETGeographicLib/MagneticModel.h b/dotnet/NETGeographicLib/MagneticModel.h
index 71804af..d474044 100644
--- a/dotnet/NETGeographicLib/MagneticModel.h
+++ b/dotnet/NETGeographicLib/MagneticModel.h
@@ -34,6 +34,9 @@ namespace NETGeographicLib
    * - WMM2010:
    *   - http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
    *   - http://ngdc.noaa.gov/geomag/WMM/data/WMM2010/WMM2010COF.zip
+   * - WMM2015:
+   *   - http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
+   *   - http://ngdc.noaa.gov/geomag/WMM/data/WMM2015/WMM2015COF.zip
    * - IGRF11:
    *   - http://ngdc.noaa.gov/IAGA/vmod/igrf.html
    *   - http://ngdc.noaa.gov/IAGA/vmod/igrf11coeffs.txt
@@ -356,7 +359,7 @@ namespace NETGeographicLib
          * @return the default name for the magnetic model.
          *
          * This is the value of the environment variable
-         * GEOGRAPHICLIB_MAGNETIC_NAME, if set, otherwise, it is "wmm2010".
+         * GEOGRAPHICLIB_MAGNETIC_NAME, if set, otherwise, it is "wmm2015".
          * The MagneticModel class does not use this function; it is just
          * provided as a convenience for a calling program when constructing a
          * MagneticModel object.
diff --git a/dotnet/NETGeographicLib/NormalGravity.h b/dotnet/NETGeographicLib/NormalGravity.h
index e034e75..256b35f 100644
--- a/dotnet/NETGeographicLib/NormalGravity.h
+++ b/dotnet/NETGeographicLib/NormalGravity.h
@@ -51,7 +51,7 @@ namespace NETGeographicLib
    * - W. A. Heiskanen and H. Moritz, Physical Geodesy (Freeman, San
    *   Francisco, 1967), Secs. 1-19, 2-7, 2-8 (2-9, 2-10), 6-2 (6-3).
    * - H. Moritz, Geodetic Reference System 1980, J. Geodesy 54(3), 395-405
-   *   (1980) http://dx.doi.org/10.1007/BF02521480
+   *   (1980) https://dx.doi.org/10.1007/BF02521480
    *
    * C# Example:
    * \include example-NormalGravity.cs
diff --git a/dotnet/NETGeographicLib/OSGB.h b/dotnet/NETGeographicLib/OSGB.h
index 6dcc754..7819396 100644
--- a/dotnet/NETGeographicLib/OSGB.h
+++ b/dotnet/NETGeographicLib/OSGB.h
@@ -124,6 +124,8 @@ namespace NETGeographicLib
          * northing must be in the range [−500 km, 2000 km).  These bounds
          * are consistent with rules for the letter designations for the grid
          * system.
+         *
+         * If \e x or \e y is NaN, the returned grid reference is "INVALID".
          **********************************************************************/
         static void GridReference(double x, double y, int prec,
             [System::Runtime::InteropServices::Out] System::String^% gridref);
@@ -141,6 +143,9 @@ namespace NETGeographicLib
          *
          * The grid reference must be of the form: two letters (not including I)
          * followed by an even number of digits (up to 22).
+         *
+         * If the first 2 characters of \e gridref are "IN", then \e x and \e y are
+         * set to NaN and \e prec is set to −2.
          **********************************************************************/
         static void GridReference(System::String^ gridref,
                 [System::Runtime::InteropServices::Out] double% x,
diff --git a/dotnet/NETGeographicLib/PolygonArea.h b/dotnet/NETGeographicLib/PolygonArea.h
index b5e1138..a055680 100644
--- a/dotnet/NETGeographicLib/PolygonArea.h
+++ b/dotnet/NETGeographicLib/PolygonArea.h
@@ -21,10 +21,10 @@ namespace NETGeographicLib
    * This computes the area of a geodesic polygon using the method given
    * Section 6 of
    * - C. F. F. Karney,
-   *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   Algorithms for geodesics</a>,
    *   J. Geodesy <b>87</b>, 43--55 (2013);
-   *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
    *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    *   geod-addenda.html</a>.
diff --git a/dotnet/NETGeographicLib/TransverseMercator.h b/dotnet/NETGeographicLib/TransverseMercator.h
index a18147c..69c6ac2 100644
--- a/dotnet/NETGeographicLib/TransverseMercator.h
+++ b/dotnet/NETGeographicLib/TransverseMercator.h
@@ -20,12 +20,12 @@ namespace NETGeographicLib
    * This uses Krüger's method which evaluates the projection and its
    * inverse in terms of a series.  See
    *  - L. Krüger,
-   *    <a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme
+   *    <a href="https://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme
    *    Abbildung des Erdellipsoids in der Ebene</a> (Conformal mapping of the
    *    ellipsoidal earth to the plane), Royal Prussian Geodetic Institute, New
    *    Series 52, 172 pp. (1912).
    *  - C. F. F. Karney,
-   *    <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
+   *    <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">
    *    Transverse Mercator with an accuracy of a few nanometers,</a>
    *    J. Geodesy 85(8), 475--485 (Aug. 2011);
    *    preprint
diff --git a/dotnet/NETGeographicLib/TransverseMercatorExact.h b/dotnet/NETGeographicLib/TransverseMercatorExact.h
index 26ebe58..7322675 100644
--- a/dotnet/NETGeographicLib/TransverseMercatorExact.h
+++ b/dotnet/NETGeographicLib/TransverseMercatorExact.h
@@ -19,7 +19,7 @@ namespace NETGeographicLib
    *
    * Implementation of the Transverse Mercator Projection given in
    *  - L. P. Lee,
-   *    <a href="http://dx.doi.org/10.3138/X687-1574-4325-WM62"> Conformal
+   *    <a href="https://dx.doi.org/10.3138/X687-1574-4325-WM62"> Conformal
    *    Projections Based On Jacobian Elliptic Functions</a>, Part V of
    *    Conformal Projections Based on Elliptic Functions,
    *    (B. V. Gutsell, Toronto, 1976), 128pp.,
@@ -27,7 +27,7 @@ namespace NETGeographicLib
    *    (also appeared as:
    *    Monograph 16, Suppl. No. 1 to Canadian Cartographer, Vol 13).
    *  - C. F. F. Karney,
-   *    <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
+   *    <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">
    *    Transverse Mercator with an accuracy of a few nanometers,</a>
    *    J. Geodesy 85(8), 475--485 (Aug. 2011);
    *    preprint
diff --git a/dotnet/Projections/Projections.csproj b/dotnet/Projections/Projections-vs13.csproj
similarity index 93%
copy from dotnet/Projections/Projections.csproj
copy to dotnet/Projections/Projections-vs13.csproj
index 8bfdc73..0bb5f95 100644
--- a/dotnet/Projections/Projections.csproj
+++ b/dotnet/Projections/Projections-vs13.csproj
@@ -77,6 +77,7 @@
     <Compile Include="AlbersPanel.Designer.cs">
       <DependentUpon>AlbersPanel.cs</DependentUpon>
     </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="EllipsoidPanel.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -156,7 +157,16 @@
     <Compile Include="ProjectionsPanel.Designer.cs">
       <DependentUpon>ProjectionsPanel.cs</DependentUpon>
     </Compile>
-    <Compile Include="Properties/AssemblyInfo.cs" />
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+      <DependentUpon>Settings.settings</DependentUpon>
+    </Compile>
     <Compile Include="RhumbPanel.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -220,15 +230,10 @@
     <EmbeddedResource Include="ProjectionsPanel.resx">
       <DependentUpon>ProjectionsPanel.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="Properties/Resources.resx">
+    <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-      <SubType>Designer</SubType>
     </EmbeddedResource>
-    <Compile Include="Properties/Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
     <EmbeddedResource Include="RhumbPanel.resx">
       <DependentUpon>RhumbPanel.cs</DependentUpon>
     </EmbeddedResource>
@@ -238,15 +243,6 @@
     <EmbeddedResource Include="TypeIIIProjPanel.resx">
       <DependentUpon>TypeIIIProjPanel.cs</DependentUpon>
     </EmbeddedResource>
-    <None Include="Properties/Settings.settings">
-      <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
-    </None>
-    <Compile Include="Properties/Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="../../windows/NETGeographic-vc10.vcxproj">
@@ -254,9 +250,16 @@
       <Name>NETGeographic</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
+  <!-- To modify your build process, add your task inside one of the
+       targets below and uncomment it.  Other similar extension points
+       exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   </Target>
   <Target Name="AfterBuild">
diff --git a/dotnet/Projections/Projections.csproj b/dotnet/Projections/Projections.csproj
index 8bfdc73..0bb5f95 100644
--- a/dotnet/Projections/Projections.csproj
+++ b/dotnet/Projections/Projections.csproj
@@ -77,6 +77,7 @@
     <Compile Include="AlbersPanel.Designer.cs">
       <DependentUpon>AlbersPanel.cs</DependentUpon>
     </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="EllipsoidPanel.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -156,7 +157,16 @@
     <Compile Include="ProjectionsPanel.Designer.cs">
       <DependentUpon>ProjectionsPanel.cs</DependentUpon>
     </Compile>
-    <Compile Include="Properties/AssemblyInfo.cs" />
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+      <DependentUpon>Settings.settings</DependentUpon>
+    </Compile>
     <Compile Include="RhumbPanel.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -220,15 +230,10 @@
     <EmbeddedResource Include="ProjectionsPanel.resx">
       <DependentUpon>ProjectionsPanel.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="Properties/Resources.resx">
+    <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-      <SubType>Designer</SubType>
     </EmbeddedResource>
-    <Compile Include="Properties/Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
     <EmbeddedResource Include="RhumbPanel.resx">
       <DependentUpon>RhumbPanel.cs</DependentUpon>
     </EmbeddedResource>
@@ -238,15 +243,6 @@
     <EmbeddedResource Include="TypeIIIProjPanel.resx">
       <DependentUpon>TypeIIIProjPanel.cs</DependentUpon>
     </EmbeddedResource>
-    <None Include="Properties/Settings.settings">
-      <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
-    </None>
-    <Compile Include="Properties/Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="../../windows/NETGeographic-vc10.vcxproj">
@@ -254,9 +250,16 @@
       <Name>NETGeographic</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
+  <!-- To modify your build process, add your task inside one of the
+       targets below and uncomment it.  Other similar extension points
+       exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   </Target>
   <Target Name="AfterBuild">
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 8b9cbf5..4676cad 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -8,7 +8,8 @@ if (GEOGRAPHICLIB_PRECISION EQUAL 2)
 else ()
   set (EXAMPLE_SOURCES)
 endif ()
-set (EXAMPLE_SOURCES ${EXAMPLE_SOURCES} GeoidToGTX.cpp make-egmcof.cpp)
+set (EXAMPLE_SOURCES ${EXAMPLE_SOURCES}
+  GeoidToGTX.cpp make-egmcof.cpp JacobiConformal.cpp)
 
 set (EXAMPLES)
 add_definitions (${PROJECT_DEFINITIONS})
@@ -16,6 +17,9 @@ add_definitions (${PROJECT_DEFINITIONS})
 foreach (EXAMPLE_SOURCE ${EXAMPLE_SOURCES})
   get_filename_component (EXAMPLE ${EXAMPLE_SOURCE} NAME_WE)
   set (EXAMPLES ${EXAMPLES} ${EXAMPLE})
+  if (EXISTS ${EXAMPLE}.hpp)
+    set (EXAMPLE_SOURCE ${EXAMPLE_SOURCE} ${EXAMPLE}.hpp)
+  endif ()
   add_executable (${EXAMPLE} EXCLUDE_FROM_ALL ${EXAMPLE_SOURCE})
   target_link_libraries (${EXAMPLE} ${PROJECT_LIBRARIES}
     ${QUAD_LIBRARIES} ${MPFR_LIBRARIES})
diff --git a/examples/JacobiConformal.cpp b/examples/JacobiConformal.cpp
new file mode 100644
index 0000000..6a60f55
--- /dev/null
+++ b/examples/JacobiConformal.cpp
@@ -0,0 +1,24 @@
+#include <iostream>
+#include <iomanip>
+#include <GeographicLib/Utility.hpp>
+#include "JacobiConformal.hpp"
+
+using namespace std;
+using namespace GeographicLib;
+
+int main() {
+  Utility::set_digits();
+  Math::real a = 6378137+35, b = 6378137-35, c = 6356752;
+  JacobiConformal jc(a, b, c);
+  cout  << fixed << setprecision(1)
+        << "Ellipsoid parameters: a = "
+        << a << ", b = " << b << ", c = " << c << "\n"
+        << setprecision(10)
+        << "Quadrants: x = " << jc.x() << ", y = " << jc.y() << "\n";
+  Math::real f = 90 / jc.x();
+  cout << "Scaled coordinates (angle x y):\n";
+  for (int i = 0; i <= 90; i += 5) {
+    Math::real omg = i, bet = i;
+    cout << i << " " << jc.x(omg)*f << " " << jc.y(bet)*f << "\n";
+  }
+}
diff --git a/examples/JacobiConformal.hpp b/examples/JacobiConformal.hpp
new file mode 100644
index 0000000..01ff124
--- /dev/null
+++ b/examples/JacobiConformal.hpp
@@ -0,0 +1,135 @@
+/**
+ * \file JacobiConformal.hpp
+ * \brief A class for Jacobi's conformal projection of a triaxial ellipsoid.
+ *
+ * Copyright (c) Charles Karney (2014) <charles at karney.com> and licensed
+ * under the MIT/X11 License.  For more information, see
+ * http://geographiclib.sourceforge.net/
+ **********************************************************************/
+
+#include <GeographicLib/EllipticFunction.hpp>
+
+namespace GeographicLib {
+
+  /**
+   * \brief Jacobi's conformal projection
+   *
+   * This is a conformal projection of the ellipsoid to a plane in which the
+   * grid lines are straight; see Jacobi, Vorlesungen ueber Dynamik, Sect. 28.
+   * The constructor takes the semi-axes of the ellipsoid (which must be
+   * scalene).  Member functions map the ellipsoidal coordinates ω and
+   * β separately to \e x and \e y.
+   **********************************************************************/
+  class JacobiConformal {
+    Math::real _a, _b, _c, _ab2, _bc2, _ac2, _ab, _bc, _ac;
+    EllipticFunction _exa, _eya;
+    static void norm(Math::real& x, Math::real& y)
+    { Math::real z = Math::hypot(x, y); x /= z; y /= z; }
+  public:
+    /**
+     * Constructor for a trixial ellipsoid with semi-axes
+     *
+     * @param[in] a
+     * @param[in] b
+     * @param[in] c
+     *
+     * The semi-axes must satisfy \e a > \e b > \e c > 0.
+     **********************************************************************/
+    JacobiConformal(Math::real a, Math::real b, Math::real c)
+      : _a(a), _b(b), _c(c)
+      , _ab2((_a - _b) * (_a + _b))
+      , _bc2((_b - _c) * (_b + _c))
+      , _ac2((_a - _c) * (_a + _c))
+      , _exa(+_ab2 / _ac2 * Math::sq(_c / _b), -_ab2 / Math::sq(_b),
+             +_bc2 / _ac2 * Math::sq(_a / _b), +Math::sq(_a / _b) )
+      , _eya(-_bc2 / _ab2 * Math::sq(_a / _c), -_bc2 / Math::sq(_c),
+             +_ac2 / _ab2 * Math::sq(_b / _c), +Math::sq(_b / _c))
+    {
+      using std::sqrt;
+      if (!(a > b && b > c && c > 0))
+        throw GeographicErr("axes are not in order");
+      _ab = sqrt(_ab2);
+      _bc = sqrt(_bc2);
+      _ac = sqrt(_ac2);
+    }
+    /**
+     * @return the quadrant length in the \e x direction
+     **********************************************************************/
+    Math::real x() const {
+      return 2 * Math::sq(_a) / (_b * _ac) * _exa.Pi();
+    }
+    /**
+     * The \e x projection
+     *
+     * @param[in] somg sin(ω)
+     * @param[in] comg cos(ω)
+     * @return \e x
+     **********************************************************************/
+    Math::real x(Math::real somg, Math::real comg) const {
+      using std::sqrt; using std::atan;
+      Math::real somg1 = _ac * somg, comg1 = _bc * comg;
+      norm(somg1, comg1);
+      Math::real domg1 = _exa.Delta(somg1, comg1);
+      return 2 *
+        ( Math::sq(_a) / (_b * _ac) * _exa.Pi(somg1, comg1, domg1) -
+          atan(_ab2 * somg1 * comg1 / sqrt(Math::sq(_a * somg1) * _bc2 +
+                                           Math::sq(_b * comg1) * _ac2)) );
+    }
+    /**
+     * The \e x projection
+     *
+     * @param[in] omg ω (in degrees)
+     * @return \e x
+     *
+     * ω must be in (−180°, 180°].
+     **********************************************************************/
+    Math::real x(Math::real omg) const {
+      using std::abs; using std::sin; using std::cos;
+      Math::real
+        a = omg * Math::degree(),
+        somg = abs(omg) == 180 ? 0 : sin(a),
+        comg = abs(omg) ==  90 ? 0 : cos(a);
+      return x(somg, comg);
+    }
+    /**
+     * @return the quadrant length in the \e y direction
+     **********************************************************************/
+    Math::real y() const {
+      return  2 * Math::sq(_b) / (_c * _ab) * _eya.Pi();
+    }
+    /**
+     * The \e y projection
+     *
+     * @param[in] sbet sin(β)
+     * @param[in] cbet cos(β)
+     * @return \e y
+     **********************************************************************/
+    Math::real y(Math::real sbet, Math::real cbet) const {
+      using std::sqrt;
+      Math::real sbet1 = _ab * sbet, cbet1 = _ac * cbet;
+      norm(sbet1, cbet1);
+      Math::real dbet1 = _eya.Delta(sbet1, cbet1);
+      return 2 *
+        ( Math::sq(_b) / (_c * _ab) * _eya.Pi(sbet1, cbet1, dbet1) -
+          Math::asinh(_bc2 * sbet * cbet / sqrt(Math::sq(_b * sbet) * _ab2 +
+                                                Math::sq(_c * cbet) * _ac2 )) );
+    }
+    /**
+     * The \e y projection
+     *
+     * @param[in] bet β (in degrees)
+     * @return \e y
+     *
+     * β must be in (−180°, 180°].
+     **********************************************************************/
+    Math::real y(Math::real bet) const {
+      using std::abs; using std::sin; using std::cos;
+      Math::real
+        a = bet * Math::degree(),
+        sbet = abs(bet) == 180 ? 0 : sin(a),
+        cbet = abs(bet) ==  90 ? 0 : cos(a);
+      return y(sbet, cbet);
+    }
+  };
+
+} // namespace GeographicLib
diff --git a/include/GeographicLib/Accumulator.hpp b/include/GeographicLib/Accumulator.hpp
index 924b74e..492dc4f 100644
--- a/include/GeographicLib/Accumulator.hpp
+++ b/include/GeographicLib/Accumulator.hpp
@@ -22,7 +22,7 @@ namespace GeographicLib {
    * precision of the sum is 106 bits or about 32 decimal places.
    *
    * The implementation follows J. R. Shewchuk,
-   * <a href="http://dx.doi.org/10.1007/PL00009321"> Adaptive Precision
+   * <a href="https://dx.doi.org/10.1007/PL00009321"> Adaptive Precision
    * Floating-Point Arithmetic and Fast Robust Geometric Predicates</a>,
    * Discrete & Computational Geometry 18(3) 305--363 (1997).
    *
diff --git a/include/GeographicLib/AlbersEqualArea.hpp b/include/GeographicLib/AlbersEqualArea.hpp
index c0b7474..db12abc 100644
--- a/include/GeographicLib/AlbersEqualArea.hpp
+++ b/include/GeographicLib/AlbersEqualArea.hpp
@@ -88,7 +88,7 @@ namespace GeographicLib {
     //   W. M. Kahan and R. J. Fateman,
     //   Symbolic computation of divided differences,
     //   SIGSAM Bull. 33(3), 7-28 (1999)
-    //   http://dx.doi.org/10.1145/334714.334716
+    //   https://dx.doi.org/10.1145/334714.334716
     //   http://www.cs.berkeley.edu/~fateman/papers/divdiff.pdf
     //
     // General rules
diff --git a/include/GeographicLib/Config.h b/include/GeographicLib/Config.h
index db6f773..f1d1498 100644
--- a/include/GeographicLib/Config.h
+++ b/include/GeographicLib/Config.h
@@ -1,8 +1,8 @@
 // This will be overwritten by ./configure
 
-#define GEOGRAPHICLIB_VERSION_STRING "1.39"
+#define GEOGRAPHICLIB_VERSION_STRING "1.40"
 #define GEOGRAPHICLIB_VERSION_MAJOR 1
-#define GEOGRAPHICLIB_VERSION_MINOR 39
+#define GEOGRAPHICLIB_VERSION_MINOR 40
 #define GEOGRAPHICLIB_VERSION_PATCH 0
 
 // Undefine HAVE_LONG_DOUBLE if this type is unknown to the compiler
diff --git a/include/GeographicLib/DMS.hpp b/include/GeographicLib/DMS.hpp
index eeb97ed..132072e 100644
--- a/include/GeographicLib/DMS.hpp
+++ b/include/GeographicLib/DMS.hpp
@@ -2,7 +2,7 @@
  * \file DMS.hpp
  * \brief Header for GeographicLib::DMS class
  *
- * Copyright (c) Charles Karney (2008-2011) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2008-2014) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
  **********************************************************************/
@@ -120,24 +120,25 @@ namespace GeographicLib {
      * Degrees, minutes, and seconds are indicated by the characters d, '
      * (single quote), " (double quote), and these components may only be
      * given in this order.  Any (but not all) components may be omitted and
-     * other symbols (e.g., the ° symbol for degrees and the unicode
-     * prime and double prime symbols for minutes and seconds) may be
-     * substituted.  The last component indicator may be omitted and is assumed
-     * to be the next smallest unit (thus 33d10 is interpreted as 33d10').  The
-     * final component may be a decimal fraction but the non-final components
-     * must be integers.  Instead of using d, ', and " to indicate
-     * degrees, minutes, and seconds, : (colon) may be used to <i>separate</i>
-     * these components (numbers must appear before and after each colon); thus
-     * 50d30'10.3" may be written as 50:30:10.3, 5.5' may be written
-     * 0:5.5, and so on.  The integer parts of the minutes and seconds
-     * components must be less than 60.  A single leading sign is permitted.  A
-     * hemisphere designator (N, E, W, S) may be added to the beginning or end
-     * of the string.  The result is multiplied by the implied sign of the
-     * hemisphere designator (negative for S and W).  In addition \e ind is set
-     * to DMS::LATITUDE if N or S is present, to DMS::LONGITUDE if E or W is
-     * present, and to DMS::NONE otherwise.  Throws an error on a malformed
-     * string.  No check is performed on the range of the result.  Examples of
-     * legal and illegal strings are
+     * other symbols (e.g., the ° symbol for degrees and the unicode prime
+     * and double prime symbols for minutes and seconds) may be substituted;
+     * two single quotes can be used instead of ".  The last component
+     * indicator may be omitted and is assumed to be the next smallest unit
+     * (thus 33d10 is interpreted as 33d10').  The final component may be a
+     * decimal fraction but the non-final components must be integers.  Instead
+     * of using d, ', and " to indicate degrees, minutes, and seconds, :
+     * (colon) may be used to <i>separate</i> these components (numbers must
+     * appear before and after each colon); thus 50d30'10.3" may be
+     * written as 50:30:10.3, 5.5' may be written 0:5.5, and so on.  The
+     * integer parts of the minutes and seconds components must be less than
+     * 60.  A single leading sign is permitted.  A hemisphere designator (N, E,
+     * W, S) may be added to the beginning or end of the string.  The result is
+     * multiplied by the implied sign of the hemisphere designator (negative
+     * for S and W).  In addition \e ind is set to DMS::LATITUDE if N or S is
+     * present, to DMS::LONGITUDE if E or W is present, and to DMS::NONE
+     * otherwise.  Throws an error on a malformed string.  No check is
+     * performed on the range of the result.  Examples of legal and illegal
+     * strings are
      * - <i>LEGAL</i> (all the entries on each line are equivalent)
      *   - -20.51125, 20d30'40.5"S, -20°30'40.5, -20d30.675,
      *     N-20d30'40.5", -20:30:40.5
@@ -281,7 +282,8 @@ namespace GeographicLib {
      *
      * @param[in] angle input angle (degrees)
      * @param[in] trailing DMS::component value indicating the trailing units
-     *   on the string and this is given as a decimal number if necessary.
+     *   of the string (this component is given as a decimal number if
+     *   necessary).
      * @param[in] prec the number of digits after the decimal point for the
      *   trailing component.
      * @param[in] ind DMS::flag value indicated additional formatting.
diff --git a/include/GeographicLib/EllipticFunction.hpp b/include/GeographicLib/EllipticFunction.hpp
index e6654d3..fe4f3fb 100644
--- a/include/GeographicLib/EllipticFunction.hpp
+++ b/include/GeographicLib/EllipticFunction.hpp
@@ -43,14 +43,14 @@ namespace GeographicLib {
    *
    * The computation of the elliptic integrals uses the algorithms given in
    * - B. C. Carlson,
-   *   <a href="http://dx.doi.org/10.1007/BF02198293"> Computation of real or
+   *   <a href="https://dx.doi.org/10.1007/BF02198293"> Computation of real or
    *   complex elliptic integrals</a>, Numerical Algorithms 10, 13--26 (1995)
    * .
    * with the additional optimizations given in http://dlmf.nist.gov/19.36.i.
    * The computation of the Jacobi elliptic functions uses the algorithm given
    * in
    * - R. Bulirsch,
-   *   <a href="http://dx.doi.org/10.1007/BF01397975"> Numerical Calculation of
+   *   <a href="https://dx.doi.org/10.1007/BF01397975"> Numerical Calculation of
    *   Elliptic Integrals and Elliptic Functions</a>, Numericshe Mathematik 7,
    *   78--90 (1965).
    * .
@@ -240,7 +240,7 @@ namespace GeographicLib {
      * http://dlmf.nist.gov/19.2.E7
      * \f[
      *   \Pi(\alpha^2, k) = \int_0^{\pi/2}
-     *     \frac1{\sqrt{1-k^2\sin^2\phi}(1 - \alpha^2\sin^2\phi_)}\,d\phi.
+     *     \frac1{\sqrt{1-k^2\sin^2\phi}(1 - \alpha^2\sin^2\phi)}\,d\phi.
      * \f]
      **********************************************************************/
     Math::real Pi() const { return _Pic; }
@@ -330,7 +330,7 @@ namespace GeographicLib {
      * http://dlmf.nist.gov/19.2.E7
      * \f[
      *   \Pi(\phi, \alpha^2, k) = \int_0^\phi
-     *     \frac1{\sqrt{1-k^2\sin^2\theta}(1 - \alpha^2\sin^2\theta_)}\,d\theta.
+     *     \frac1{\sqrt{1-k^2\sin^2\theta}(1 - \alpha^2\sin^2\theta)}\,d\theta.
      * \f]
      **********************************************************************/
     Math::real Pi(real phi) const;
@@ -369,7 +369,7 @@ namespace GeographicLib {
      * Legendre expresses the longitude of a point on the geodesic in terms of
      * this combination of elliptic integrals in Exercices de Calcul
      * Intégral, Vol. 1 (1811), p. 181,
-     * http://books.google.com/books?id=riIOAAAAQAAJ&pg=PA181.
+     * https://books.google.com/books?id=riIOAAAAQAAJ&pg=PA181.
      *
      * See \ref geodellip for the expression for the longitude in terms of this
      * function.
@@ -396,7 +396,7 @@ namespace GeographicLib {
      *
      * Cayley expresses the longitude difference of a point on the geodesic in
      * terms of this combination of elliptic integrals in Phil. Mag. <b>40</b>
-     * (1870), p. 333, http://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA333.
+     * (1870), p. 333, https://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA333.
      *
      * See \ref geodellip for the expression for the longitude in terms of this
      * function.
diff --git a/include/GeographicLib/GeoCoords.hpp b/include/GeographicLib/GeoCoords.hpp
index ac20165..d25a6ff 100644
--- a/include/GeographicLib/GeoCoords.hpp
+++ b/include/GeographicLib/GeoCoords.hpp
@@ -71,19 +71,17 @@ namespace GeographicLib {
      **********************************************************************/
     ///@{
     /**
-     * The default constructor is equivalent to \e latitude = 90°,
-     * \e longitude = 0°.
+     * The default constructor sets the coordinate as undefined.
      **********************************************************************/
     GeoCoords()
-      // This is the N pole
-      : _lat(90)
-      , _long(0)
-      , _easting(2000000)
-      , _northing(2000000)
-      , _gamma(0)
-      , _k(Constants::UPS_k0())
-      , _northp(true)
-      , _zone(0)
+      : _lat(Math::NaN())
+      , _long(Math::NaN())
+      , _easting(Math::NaN())
+      , _northing(Math::NaN())
+      , _gamma(Math::NaN())
+      , _k(Math::NaN())
+      , _northp(false)
+      , _zone(UTMUPS::INVALID)
     { CopyToAlt(); }
 
     /**
diff --git a/include/GeographicLib/Geocentric.hpp b/include/GeographicLib/Geocentric.hpp
index ed75203..44e69fa 100644
--- a/include/GeographicLib/Geocentric.hpp
+++ b/include/GeographicLib/Geocentric.hpp
@@ -29,7 +29,7 @@ namespace GeographicLib {
    * The conversion from geographic to geocentric coordinates is
    * straightforward.  For the reverse transformation we use
    * - H. Vermeille,
-   *   <a href="http://dx.doi.org/10.1007/s00190-002-0273-6"> Direct
+   *   <a href="https://dx.doi.org/10.1007/s00190-002-0273-6"> Direct
    *   transformation from geocentric coordinates to geodetic coordinates</a>,
    *   J. Geodesy 76, 451--454 (2002).
    * .
@@ -45,7 +45,7 @@ namespace GeographicLib {
    * .
    * Vermeille similarly updated his method in
    * - H. Vermeille,
-   *   <a href="http://dx.doi.org/10.1007/s00190-010-0419-x">
+   *   <a href="https://dx.doi.org/10.1007/s00190-010-0419-x">
    *   An analytical method to transform geocentric into
    *   geodetic coordinates</a>, J. Geodesy 85, 105--117 (2011).
    * .
diff --git a/include/GeographicLib/Geodesic.hpp b/include/GeographicLib/Geodesic.hpp
index 47f99d7..4c73fa6 100644
--- a/include/GeographicLib/Geodesic.hpp
+++ b/include/GeographicLib/Geodesic.hpp
@@ -151,10 +151,10 @@ namespace GeographicLib {
    *
    * The algorithms are described in
    * - C. F. F. Karney,
-   *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   Algorithms for geodesics</a>,
    *   J. Geodesy <b>87</b>, 43--55 (2013);
-   *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
    *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    *   geod-addenda.html</a>.
diff --git a/include/GeographicLib/GeodesicLine.hpp b/include/GeographicLib/GeodesicLine.hpp
index 49df02b..3d39587 100644
--- a/include/GeographicLib/GeodesicLine.hpp
+++ b/include/GeographicLib/GeodesicLine.hpp
@@ -39,10 +39,10 @@ namespace GeographicLib {
    *
    * The algorithms are described in
    * - C. F. F. Karney,
-   *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   Algorithms for geodesics</a>,
    *   J. Geodesy <b>87</b>, 43--55 (2013);
-   *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
    *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    *   geod-addenda.html</a>.
diff --git a/include/GeographicLib/Geohash.hpp b/include/GeographicLib/Geohash.hpp
index 575e825..c182f9b 100644
--- a/include/GeographicLib/Geohash.hpp
+++ b/include/GeographicLib/Geohash.hpp
@@ -25,7 +25,7 @@ namespace GeographicLib {
    *
    * Geohashes are described in
    * - https://en.wikipedia.org/wiki/Geohash
-   * - http://geohash.org/
+   * - http://geohash.org/ (this link is broken as of 2012-12-11)
    * .
    * They provide a compact string representation of a particular geographic
    * location (expressed as latitude and longitude), with the property that if
diff --git a/include/GeographicLib/Gnomonic.hpp b/include/GeographicLib/Gnomonic.hpp
index 86e5a93..97b03c4 100644
--- a/include/GeographicLib/Gnomonic.hpp
+++ b/include/GeographicLib/Gnomonic.hpp
@@ -22,10 +22,10 @@ namespace GeographicLib {
    * %Gnomonic projection centered at an arbitrary position \e C on the
    * ellipsoid.  This projection is derived in Section 8 of
    * - C. F. F. Karney,
-   *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   Algorithms for geodesics</a>,
    *   J. Geodesy <b>87</b>, 43--55 (2013);
-   *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
    *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    *   geod-addenda.html</a>.
diff --git a/include/GeographicLib/LambertConformalConic.hpp b/include/GeographicLib/LambertConformalConic.hpp
index 48a59af..e8cfc19 100644
--- a/include/GeographicLib/LambertConformalConic.hpp
+++ b/include/GeographicLib/LambertConformalConic.hpp
@@ -75,7 +75,7 @@ namespace GeographicLib {
     //   W. M. Kahan and R. J. Fateman,
     //   Symbolic computation of divided differences,
     //   SIGSAM Bull. 33(3), 7-28 (1999)
-    //   http://dx.doi.org/10.1145/334714.334716
+    //   https://dx.doi.org/10.1145/334714.334716
     //   http://www.cs.berkeley.edu/~fateman/papers/divdiff.pdf
     //
     // General rules
diff --git a/include/GeographicLib/MGRS.hpp b/include/GeographicLib/MGRS.hpp
index 498ce9a..23cf076 100644
--- a/include/GeographicLib/MGRS.hpp
+++ b/include/GeographicLib/MGRS.hpp
@@ -235,7 +235,7 @@ namespace GeographicLib {
      * of a band boundary.  For prec in [6, 11], the conversion is accurate to
      * roundoff.
      *
-     * If \e prec = -1, then the "grid zone designation", e.g., 18T, is
+     * If \e prec = −1, then the "grid zone designation", e.g., 18T, is
      * returned.  This consists of the UTM zone number (absent for UPS) and the
      * first letter of the MGRS string which labels the latitude band for UTM
      * and the hemisphere for UPS.
@@ -311,10 +311,11 @@ namespace GeographicLib {
      * suitable (but essentially arbitrary) point within that grid zone is
      * returned.  The main utility of the conversion is to allow \e zone and \e
      * northp to be determined.  In this case, the \e centerp parameter is
-     * ignored.
+     * ignored and \e prec is set to −1.
      *
      * If the first 3 characters of \e mgrs are "INV", then \e x and \e y are
-     * set to NaN and \e zone is set to UTMUPS::INVALID.
+     * set to NaN, \e zone is set to UTMUPS::INVALID, and \e prec is set to
+     * −2.
      *
      * If an exception is thrown, then the arguments are unchanged.
      **********************************************************************/
diff --git a/include/GeographicLib/MagneticModel.hpp b/include/GeographicLib/MagneticModel.hpp
index 544a15d..f27b4fe 100644
--- a/include/GeographicLib/MagneticModel.hpp
+++ b/include/GeographicLib/MagneticModel.hpp
@@ -42,6 +42,9 @@ namespace GeographicLib {
    * - WMM2010:
    *   - http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
    *   - http://ngdc.noaa.gov/geomag/WMM/data/WMM2010/WMM2010COF.zip
+   * - WMM2015:
+   *   - http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
+   *   - http://ngdc.noaa.gov/geomag/WMM/data/WMM2015/WMM2015COF.zip
    * - IGRF11:
    *   - http://ngdc.noaa.gov/IAGA/vmod/igrf.html
    *   - http://ngdc.noaa.gov/IAGA/vmod/igrf11coeffs.txt
@@ -327,7 +330,7 @@ namespace GeographicLib {
      * @return the default name for the magnetic model.
      *
      * This is the value of the environment variable
-     * GEOGRAPHICLIB_MAGNETIC_NAME, if set; otherwise, it is "wmm2010".  The
+     * GEOGRAPHICLIB_MAGNETIC_NAME, if set; otherwise, it is "wmm2015".  The
      * MagneticModel class does not use this function; it is just provided as a
      * convenience for a calling program when constructing a MagneticModel
      * object.
diff --git a/include/GeographicLib/Math.hpp b/include/GeographicLib/Math.hpp
index 5df7715..90afb92 100644
--- a/include/GeographicLib/Math.hpp
+++ b/include/GeographicLib/Math.hpp
@@ -22,9 +22,10 @@
 // and support the new C++11 mathematical functions, std::atanh, etc.  However
 // the Android toolchain, which uses g++ -std=c++11 (4.8 as of 2014-03-11,
 // according to Pullan Lu), does not support std::atanh.  Android toolchains
-// might define __ANDROID__ or ANDROID; so need to check both.
-#  if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 7 \
-  && __cplusplus >= 201103 && \
+// might define __ANDROID__ or ANDROID; so need to check both.  With OSX the
+// version is GNUC version 4.2 and __cplusplus is set to 201103, so remove the
+// version check on GNUC.
+#  if defined(__GNUC__) && __cplusplus >= 201103 && \
   !(defined(__ANDROID__) || defined(ANDROID) || defined(__CYGWIN__))
 #    define GEOGRAPHICLIB_CXX11_MATH 1
 // Visual C++ 12 supports these functions
@@ -261,8 +262,8 @@ namespace GeographicLib {
       y /= (x ? x : 1);
       return x * sqrt(1 + y * y);
       // For an alternative (square-root free) method see
-      // C. Moler and D. Morrision (1983) http://dx.doi.org/10.1147/rd.276.0577
-      // and A. A. Dubrulle (1983) http://dx.doi.org/10.1147/rd.276.0582
+      // C. Moler and D. Morrision (1983) https://dx.doi.org/10.1147/rd.276.0577
+      // and A. A. Dubrulle (1983) https://dx.doi.org/10.1147/rd.276.0582
 #endif
     }
 
@@ -278,7 +279,7 @@ namespace GeographicLib {
       using std::expm1; return expm1(x);
 #else
       using std::exp; using std::abs; using std::log;
-      volatile T
+      GEOGRAPHICLIB_VOLATILE T
         y = exp(x),
         z = y - 1;
       // The reasoning here is similar to that for log1p.  The expression
@@ -301,7 +302,7 @@ namespace GeographicLib {
       using std::log1p; return log1p(x);
 #else
       using std::log;
-      volatile T
+      GEOGRAPHICLIB_VOLATILE T
         y = 1 + x,
         z = y - 1;
       // Here's the explanation for this magic: y = 1 + z, exactly, and z
diff --git a/include/GeographicLib/NormalGravity.hpp b/include/GeographicLib/NormalGravity.hpp
index 4e6df63..eaaaf08 100644
--- a/include/GeographicLib/NormalGravity.hpp
+++ b/include/GeographicLib/NormalGravity.hpp
@@ -51,7 +51,7 @@ namespace GeographicLib {
    * - W. A. Heiskanen and H. Moritz, Physical Geodesy (Freeman, San
    *   Francisco, 1967), Secs. 1-19, 2-7, 2-8 (2-9, 2-10), 6-2 (6-3).
    * - H. Moritz, Geodetic Reference System 1980, J. Geodesy 54(3), 395-405
-   *   (1980) http://dx.doi.org/10.1007/BF02521480
+   *   (1980) https://dx.doi.org/10.1007/BF02521480
    *
    * Example of use:
    * \include example-NormalGravity.cpp
diff --git a/include/GeographicLib/OSGB.hpp b/include/GeographicLib/OSGB.hpp
index a33cf37..cb029fb 100644
--- a/include/GeographicLib/OSGB.hpp
+++ b/include/GeographicLib/OSGB.hpp
@@ -2,7 +2,7 @@
  * \file OSGB.hpp
  * \brief Header for GeographicLib::OSGB class
  *
- * Copyright (c) Charles Karney (2010-2013) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2010-2014) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
  **********************************************************************/
@@ -47,8 +47,6 @@ namespace GeographicLib {
     static const std::string letters_;
     static const std::string digits_;
     static const TransverseMercator& OSGBTM();
-    static real northoffset_;
-    static bool init_;
     enum {
       base_ = 10,
       tile_ = 100000,
@@ -151,6 +149,8 @@ namespace GeographicLib {
      * northing must be in the range [−500 km, 2000 km).  These bounds
      * are consistent with rules for the letter designations for the grid
      * system.
+     *
+     * If \e x or \e y is NaN, the returned grid reference is "INVALID".
      **********************************************************************/
     static void GridReference(real x, real y, int prec, std::string& gridref);
 
@@ -167,6 +167,9 @@ namespace GeographicLib {
      *
      * The grid reference must be of the form: two letters (not including I)
      * followed by an even number of digits (up to 22).
+     *
+     * If the first 2 characters of \e gridref are "IN", then \e x and \e y are
+     * set to NaN and \e prec is set to −2.
      **********************************************************************/
     static void GridReference(const std::string& gridref,
                               real& x, real& y, int& prec,
diff --git a/include/GeographicLib/PolygonArea.hpp b/include/GeographicLib/PolygonArea.hpp
index 84c0e03..a7b351d 100644
--- a/include/GeographicLib/PolygonArea.hpp
+++ b/include/GeographicLib/PolygonArea.hpp
@@ -23,10 +23,10 @@ namespace GeographicLib {
    * This computes the area of a polygon whose edges are geodesics using the
    * method given in Section 6 of
    * - C. F. F. Karney,
-   *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   Algorithms for geodesics</a>,
    *   J. Geodesy <b>87</b>, 43--55 (2013);
-   *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+   *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
    *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
    *   geod-addenda.html</a>.
diff --git a/include/GeographicLib/Rhumb.hpp b/include/GeographicLib/Rhumb.hpp
index a629be4..723f720 100644
--- a/include/GeographicLib/Rhumb.hpp
+++ b/include/GeographicLib/Rhumb.hpp
@@ -98,7 +98,7 @@ namespace GeographicLib {
     //   W. M. Kahan and R. J. Fateman,
     //   Symbolic computation of divided differences,
     //   SIGSAM Bull. 33(3), 7-28 (1999)
-    //   http://dx.doi.org/10.1145/334714.334716
+    //   https://dx.doi.org/10.1145/334714.334716
     //   http://www.cs.berkeley.edu/~fateman/papers/divdiff.pdf
 
     static inline real Dlog(real x, real y) {
diff --git a/include/GeographicLib/TransverseMercator.hpp b/include/GeographicLib/TransverseMercator.hpp
index 459dba4..414e5a2 100644
--- a/include/GeographicLib/TransverseMercator.hpp
+++ b/include/GeographicLib/TransverseMercator.hpp
@@ -30,12 +30,12 @@ namespace GeographicLib {
    * This uses Krüger's method which evaluates the projection and its
    * inverse in terms of a series.  See
    *  - L. Krüger,
-   *    <a href="http://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme
+   *    <a href="https://dx.doi.org/10.2312/GFZ.b103-krueger28"> Konforme
    *    Abbildung des Erdellipsoids in der Ebene</a> (Conformal mapping of the
    *    ellipsoidal earth to the plane), Royal Prussian Geodetic Institute, New
    *    Series 52, 172 pp. (1912).
    *  - C. F. F. Karney,
-   *    <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
+   *    <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">
    *    Transverse Mercator with an accuracy of a few nanometers,</a>
    *    J. Geodesy 85(8), 475--485 (Aug. 2011);
    *    preprint
diff --git a/include/GeographicLib/TransverseMercatorExact.hpp b/include/GeographicLib/TransverseMercatorExact.hpp
index 55302b4..103af98 100644
--- a/include/GeographicLib/TransverseMercatorExact.hpp
+++ b/include/GeographicLib/TransverseMercatorExact.hpp
@@ -20,7 +20,7 @@ namespace GeographicLib {
    *
    * Implementation of the Transverse Mercator Projection given in
    *  - L. P. Lee,
-   *    <a href="http://dx.doi.org/10.3138/X687-1574-4325-WM62"> Conformal
+   *    <a href="https://dx.doi.org/10.3138/X687-1574-4325-WM62"> Conformal
    *    Projections Based On Jacobian Elliptic Functions</a>, Part V of
    *    Conformal Projections Based on Elliptic Functions,
    *    (B. V. Gutsell, Toronto, 1976), 128pp.,
@@ -28,7 +28,7 @@ namespace GeographicLib {
    *    (also appeared as:
    *    Monograph 16, Suppl. No. 1 to Canadian Cartographer, Vol 13).
    *  - C. F. F. Karney,
-   *    <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">
+   *    <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">
    *    Transverse Mercator with an accuracy of a few nanometers,</a>
    *    J. Geodesy 85(8), 475--485 (Aug. 2011);
    *    preprint
diff --git a/include/GeographicLib/Utility.hpp b/include/GeographicLib/Utility.hpp
index f44cad1..1f0eabe 100644
--- a/include/GeographicLib/Utility.hpp
+++ b/include/GeographicLib/Utility.hpp
@@ -462,7 +462,8 @@ namespace GeographicLib {
     template<typename ExtT, typename IntT, bool bigendp>
       static inline void readarray(std::istream& str,
                                    std::vector<IntT>& array) {
-      readarray<ExtT, IntT, bigendp>(str, &array[0], array.size());
+      if (array.size() > 0)
+        readarray<ExtT, IntT, bigendp>(str, &array[0], array.size());
     }
 
     /**
@@ -527,7 +528,8 @@ namespace GeographicLib {
     template<typename ExtT, typename IntT, bool bigendp>
       static inline void writearray(std::ostream& str,
                                    std::vector<IntT>& array) {
-      writearray<ExtT, IntT, bigendp>(str, &array[0], array.size());
+      if (array.size() > 0)
+        writearray<ExtT, IntT, bigendp>(str, &array[0], array.size());
     }
 
     /**
diff --git a/java/README.txt b/java/README.txt
index f58b008..329377b 100644
--- a/java/README.txt
+++ b/java/README.txt
@@ -3,7 +3,7 @@ This is a Java implementation of the geodesic algorithms described in
   C. F. F. Karney,
   Algorithms for geodesics,
   J. Geodesy 87, 43-55 (2013);
-  http://dx.doi.org/10.1007/s00190-012-0578-z
+  https://dx.doi.org/10.1007/s00190-012-0578-z
   Addenda: http://geographiclib.sf.net/geod-addenda.html
 
 For documentation, see
diff --git a/java/direct/pom.xml b/java/direct/pom.xml
index 0fd9053..4f25d69 100644
--- a/java/direct/pom.xml
+++ b/java/direct/pom.xml
@@ -1,87 +1,88 @@
 <project
     xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                        http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-    <modelVersion>4.0.0</modelVersion>
+  <modelVersion>4.0.0</modelVersion>
 
-    <groupId>net.sf.geographiclib.example</groupId>
-    <artifactId>Direct</artifactId>
-    <name>Direct</name>
-    <version>1.31</version>
+  <groupId>net.sf.geographiclib.example</groupId>
+  <artifactId>Direct</artifactId>
+  <name>Direct</name>
+  <version>1.40</version>
 
-    <packaging>jar</packaging>
+  <packaging>jar</packaging>
 
-    <properties>
-        <basedir>.</basedir>
-        <java.version>1.6</java.version>
-        <surefire-plugin.version>2.9</surefire-plugin.version>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
-        <maven-project-info-reports.version>2.4</maven-project-info-reports.version>
-        <maven-javadoc.version>2.8</maven-javadoc.version>
-        <maven-site.version>3.0</maven-site.version>
-    </properties>
+  <properties>
+    <basedir>.</basedir>
+    <java.version>1.6</java.version>
+    <surefire-plugin.version>2.9</surefire-plugin.version>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
+    <maven-project-info-reports.version>2.4</maven-project-info-reports.version>
+    <maven-javadoc.version>2.8</maven-javadoc.version>
+    <maven-site.version>3.0</maven-site.version>
+  </properties>
 
-    <dependencies>
-        <dependency>
-            <groupId>net.sf.geographiclib</groupId>
-            <artifactId>GeographicLib</artifactId>
-            <version>1.31</version>
-        </dependency>
-    </dependencies>
+  <dependencies>
+    <dependency>
+      <groupId>net.sf.geographiclib</groupId>
+      <artifactId>GeographicLib</artifactId>
+      <version>1.40</version>
+    </dependency>
+  </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${maven-compiler-plugin.version}</version>
-                <configuration>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
-                </configuration>
-            </plugin>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${maven-compiler-plugin.version}</version>
+        <configuration>
+          <source>${java.version}</source>
+          <target>${java.version}</target>
+        </configuration>
+      </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>${surefire-plugin.version}</version>
-                <configuration>
-                    <skipTests>false</skipTests>
-                </configuration>
-            </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire-plugin.version}</version>
+        <configuration>
+          <skipTests>false</skipTests>
+        </configuration>
+      </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <version>${maven-javadoc.version}</version>
-                <configuration>
-                    <show>public</show>
-                    <nohelp>true</nohelp>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-javadocs</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>${maven-javadoc.version}</version>
+        <configuration>
+          <show>public</show>
+          <nohelp>true</nohelp>
+        </configuration>
+        <executions>
+          <execution>
+            <id>attach-javadocs</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>exec-maven-plugin</artifactId>
-                <version>1.2.1</version>
-                <configuration>
-                    <mainClass>Direct</mainClass>
-                    <arguments>
-                    </arguments>
-                </configuration>
-            </plugin>
-        </plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.2.1</version>
+        <configuration>
+          <mainClass>Direct</mainClass>
+          <arguments>
+          </arguments>
+        </configuration>
+      </plugin>
+    </plugins>
 
-    </build>
+  </build>
 
 </project>
diff --git a/java/inverse/pom.xml b/java/inverse/pom.xml
index a6e025c..02fe630 100644
--- a/java/inverse/pom.xml
+++ b/java/inverse/pom.xml
@@ -1,87 +1,88 @@
 <project
     xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                        http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-    <modelVersion>4.0.0</modelVersion>
+  <modelVersion>4.0.0</modelVersion>
 
-    <groupId>net.sf.geographiclib.example</groupId>
-    <artifactId>Inverse</artifactId>
-    <name>Inverse</name>
-    <version>1.31</version>
+  <groupId>net.sf.geographiclib.example</groupId>
+  <artifactId>Inverse</artifactId>
+  <name>Inverse</name>
+  <version>1.40</version>
 
-    <packaging>jar</packaging>
+  <packaging>jar</packaging>
 
-    <properties>
-        <basedir>.</basedir>
-        <java.version>1.6</java.version>
-        <surefire-plugin.version>2.9</surefire-plugin.version>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
-        <maven-project-info-reports.version>2.4</maven-project-info-reports.version>
-        <maven-javadoc.version>2.8</maven-javadoc.version>
-        <maven-site.version>3.0</maven-site.version>
-    </properties>
+  <properties>
+    <basedir>.</basedir>
+    <java.version>1.6</java.version>
+    <surefire-plugin.version>2.9</surefire-plugin.version>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
+    <maven-project-info-reports.version>2.4</maven-project-info-reports.version>
+    <maven-javadoc.version>2.8</maven-javadoc.version>
+    <maven-site.version>3.0</maven-site.version>
+  </properties>
 
-    <dependencies>
-        <dependency>
-            <groupId>net.sf.geographiclib</groupId>
-            <artifactId>GeographicLib</artifactId>
-            <version>1.31</version>
-        </dependency>
-    </dependencies>
+  <dependencies>
+    <dependency>
+      <groupId>net.sf.geographiclib</groupId>
+      <artifactId>GeographicLib</artifactId>
+      <version>1.40</version>
+    </dependency>
+  </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${maven-compiler-plugin.version}</version>
-                <configuration>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
-                </configuration>
-            </plugin>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${maven-compiler-plugin.version}</version>
+        <configuration>
+          <source>${java.version}</source>
+          <target>${java.version}</target>
+        </configuration>
+      </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>${surefire-plugin.version}</version>
-                <configuration>
-                    <skipTests>false</skipTests>
-                </configuration>
-            </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire-plugin.version}</version>
+        <configuration>
+          <skipTests>false</skipTests>
+        </configuration>
+      </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <version>${maven-javadoc.version}</version>
-                <configuration>
-                    <show>public</show>
-                    <nohelp>true</nohelp>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-javadocs</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>${maven-javadoc.version}</version>
+        <configuration>
+          <show>public</show>
+          <nohelp>true</nohelp>
+        </configuration>
+        <executions>
+          <execution>
+            <id>attach-javadocs</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>exec-maven-plugin</artifactId>
-                <version>1.2.1</version>
-                <configuration>
-                    <mainClass>Inverse</mainClass>
-                    <arguments>
-                    </arguments>
-                </configuration>
-            </plugin>
-        </plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.2.1</version>
+        <configuration>
+          <mainClass>Inverse</mainClass>
+          <arguments>
+          </arguments>
+        </configuration>
+      </plugin>
+    </plugins>
 
-    </build>
+  </build>
 
 </project>
diff --git a/java/planimeter/pom.xml b/java/planimeter/pom.xml
index fe50ea2..f8d5c81 100644
--- a/java/planimeter/pom.xml
+++ b/java/planimeter/pom.xml
@@ -1,87 +1,88 @@
 <project
     xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                        http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-    <modelVersion>4.0.0</modelVersion>
+  <modelVersion>4.0.0</modelVersion>
 
-    <groupId>net.sf.geographiclib.example</groupId>
-    <artifactId>Planimeter</artifactId>
-    <name>Planimeter</name>
-    <version>1.31</version>
+  <groupId>net.sf.geographiclib.example</groupId>
+  <artifactId>Planimeter</artifactId>
+  <name>Planimeter</name>
+  <version>1.40</version>
 
-    <packaging>jar</packaging>
+  <packaging>jar</packaging>
 
-    <properties>
-        <basedir>.</basedir>
-        <java.version>1.6</java.version>
-        <surefire-plugin.version>2.9</surefire-plugin.version>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
-        <maven-project-info-reports.version>2.4</maven-project-info-reports.version>
-        <maven-javadoc.version>2.8</maven-javadoc.version>
-        <maven-site.version>3.0</maven-site.version>
-    </properties>
+  <properties>
+    <basedir>.</basedir>
+    <java.version>1.6</java.version>
+    <surefire-plugin.version>2.9</surefire-plugin.version>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
+    <maven-project-info-reports.version>2.4</maven-project-info-reports.version>
+    <maven-javadoc.version>2.8</maven-javadoc.version>
+    <maven-site.version>3.0</maven-site.version>
+  </properties>
 
-    <dependencies>
-        <dependency>
-            <groupId>net.sf.geographiclib</groupId>
-            <artifactId>GeographicLib</artifactId>
-            <version>1.31</version>
-        </dependency>
-    </dependencies>
+  <dependencies>
+    <dependency>
+      <groupId>net.sf.geographiclib</groupId>
+      <artifactId>GeographicLib</artifactId>
+      <version>1.40</version>
+    </dependency>
+  </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${maven-compiler-plugin.version}</version>
-                <configuration>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
-                </configuration>
-            </plugin>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${maven-compiler-plugin.version}</version>
+        <configuration>
+          <source>${java.version}</source>
+          <target>${java.version}</target>
+        </configuration>
+      </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>${surefire-plugin.version}</version>
-                <configuration>
-                    <skipTests>false</skipTests>
-                </configuration>
-            </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire-plugin.version}</version>
+        <configuration>
+          <skipTests>false</skipTests>
+        </configuration>
+      </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <version>${maven-javadoc.version}</version>
-                <configuration>
-                    <show>public</show>
-                    <nohelp>true</nohelp>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-javadocs</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>${maven-javadoc.version}</version>
+        <configuration>
+          <show>public</show>
+          <nohelp>true</nohelp>
+        </configuration>
+        <executions>
+          <execution>
+            <id>attach-javadocs</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>exec-maven-plugin</artifactId>
-                <version>1.2.1</version>
-                <configuration>
-                    <mainClass>Planimeter</mainClass>
-                    <arguments>
-                    </arguments>
-                </configuration>
-            </plugin>
-        </plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.2.1</version>
+        <configuration>
+          <mainClass>Planimeter</mainClass>
+          <arguments>
+          </arguments>
+        </configuration>
+      </plugin>
+    </plugins>
 
-    </build>
+  </build>
 
 </project>
diff --git a/java/pom.xml b/java/pom.xml
index 22f3bb5..e5d4607 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -1,90 +1,95 @@
 <project
     xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                        http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-    <modelVersion>4.0.0</modelVersion>
+  <modelVersion>4.0.0</modelVersion>
 
-    <groupId>net.sf.geographiclib</groupId>
-    <artifactId>GeographicLib</artifactId>
-    <name>GeographicLib</name>
-    <version>1.39</version>
+  <groupId>net.sf.geographiclib</groupId>
+  <artifactId>GeographicLib</artifactId>
+  <name>GeographicLib</name>
+  <version>1.40</version>
 
-    <packaging>jar</packaging>
+  <packaging>jar</packaging>
 
-    <description>This is a Java implementation of the geodesic algorithms from GeographicLib. This is a self-contained library which makes it easy to do geodesic computations for an ellipsoid of revolution in a Java program. It requires Java version 1.1 or later.
-    </description>
+  <description>
+    This is a Java implementation of the geodesic algorithms from
+    GeographicLib. This is a self-contained library which makes it
+    easy to do geodesic computations for an ellipsoid of revolution in
+    a Java program. It requires Java version 1.1 or later.
+  </description>
 
-    <properties>
-        <basedir>.</basedir>
-        <java.version>1.6</java.version>
-        <surefire-plugin.version>2.9</surefire-plugin.version>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
-        <maven-project-info-reports.version>2.4</maven-project-info-reports.version>
-        <maven-javadoc.version>2.8</maven-javadoc.version>
-        <maven-site.version>3.0</maven-site.version>
-    </properties>
+  <properties>
+    <basedir>.</basedir>
+    <java.version>1.6</java.version>
+    <surefire-plugin.version>2.9</surefire-plugin.version>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
+    <maven-project-info-reports.version>2.4</maven-project-info-reports.version>
+    <maven-javadoc.version>2.8</maven-javadoc.version>
+    <maven-site.version>3.0</maven-site.version>
+  </properties>
 
-    <dependencies>
-    </dependencies>
+  <dependencies>
+  </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${maven-compiler-plugin.version}</version>
-                <configuration>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
-                </configuration>
-            </plugin>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${maven-compiler-plugin.version}</version>
+        <configuration>
+          <source>${java.version}</source>
+          <target>${java.version}</target>
+        </configuration>
+      </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>${surefire-plugin.version}</version>
-                <configuration>
-                    <skipTests>false</skipTests>
-                </configuration>
-            </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire-plugin.version}</version>
+        <configuration>
+          <skipTests>false</skipTests>
+        </configuration>
+      </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <version>${maven-javadoc.version}</version>
-                <configuration>
-                    <show>public</show>
-                    <nohelp>true</nohelp>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-javadocs</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>${maven-javadoc.version}</version>
+        <configuration>
+          <show>public</show>
+          <nohelp>true</nohelp>
+        </configuration>
+        <executions>
+          <execution>
+            <id>attach-javadocs</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
 
-    </build>
+  </build>
 
-    <distributionManagement>
-    </distributionManagement>
+  <distributionManagement>
+  </distributionManagement>
 
-    <scm>
-        <connection>
-            scm:git:http://
-        </connection>
-        <developerConnection>
-            scm:git:https://
-        </developerConnection>
-        <tag>devel</tag>
-        <url>
-            http://
-        </url>
-    </scm>
+  <scm>
+    <connection>
+      scm:git:http://
+    </connection>
+    <developerConnection>
+      scm:git:https://
+    </developerConnection>
+    <tag>devel</tag>
+    <url>
+      http://
+    </url>
+  </scm>
 
 </project>
diff --git a/java/src/main/java/net/sf/geographiclib/Accumulator.java b/java/src/main/java/net/sf/geographiclib/Accumulator.java
index bcba4b7..991b912 100644
--- a/java/src/main/java/net/sf/geographiclib/Accumulator.java
+++ b/java/src/main/java/net/sf/geographiclib/Accumulator.java
@@ -15,7 +15,7 @@ package net.sf.geographiclib;
  * about 32 decimal places.
  * <p>
  * The implementation follows J. R. Shewchuk,
- * <a href="http://dx.doi.org/10.1007/PL00009321"> Adaptive Precision
+ * <a href="https://dx.doi.org/10.1007/PL00009321"> Adaptive Precision
  * Floating-Point Arithmetic and Fast Robust Geometric Predicates</a>,
  * Discrete & Computational Geometry 18(3) 305–363 (1997).
  * <p>
diff --git a/java/src/main/java/net/sf/geographiclib/GeoMath.java b/java/src/main/java/net/sf/geographiclib/GeoMath.java
index 80631eb..f3f6165 100644
--- a/java/src/main/java/net/sf/geographiclib/GeoMath.java
+++ b/java/src/main/java/net/sf/geographiclib/GeoMath.java
@@ -56,8 +56,8 @@ public class GeoMath {
     double a = Math.max(x, y), b = Math.min(x, y) / (a != 0 ? a : 1);
     return a * Math.sqrt(1 + b * b);
     // For an alternative method see
-    // C. Moler and D. Morrision (1983) http://dx.doi.org/10.1147/rd.276.0577
-    // and A. A. Dubrulle (1983) http://dx.doi.org/10.1147/rd.276.0582
+    // C. Moler and D. Morrision (1983) https://dx.doi.org/10.1147/rd.276.0577
+    // and A. A. Dubrulle (1983) https://dx.doi.org/10.1147/rd.276.0582
   }
 
   /**
@@ -65,7 +65,7 @@ public class GeoMath {
    * later, Math.log1p can be used.
    * <p>
    * This is taken from D. Goldberg,
-   * <a href="http://dx.doi.org/10.1145/103162.103163">What every computer
+   * <a href="https://dx.doi.org/10.1145/103162.103163">What every computer
    * scientist should know about floating-point arithmetic</a> (1991),
    * Theorem 4.  See also, N. J. Higham, Accuracy and Stability of Numerical
    * Algorithms, 2nd Edition (SIAM, 2002), Answer to Problem 1.5, p 528.
diff --git a/java/src/main/java/net/sf/geographiclib/Geodesic.java b/java/src/main/java/net/sf/geographiclib/Geodesic.java
index 337e71f..812eee3 100644
--- a/java/src/main/java/net/sf/geographiclib/Geodesic.java
+++ b/java/src/main/java/net/sf/geographiclib/Geodesic.java
@@ -167,10 +167,10 @@ package net.sf.geographiclib;
  * The algorithms are described in
  * <ul>
  * <li>C. F. F. Karney,
- *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43–55 (2013);
- *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
  *   10.1007/s00190-012-0578-z</a>;
  *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
  *   geod-addenda.html</a>.
@@ -1292,7 +1292,8 @@ public class Geodesic {
         w.calp1 = sbet12a - cbet2 * sbet1 * GeoMath.sq(somg12) / (1 - comg12);
       }
     }
-    if (w.salp1 > 0)              // Sanity check on starting guess
+    // Sanity check on starting guess.  Backwards check allows NaN through.
+    if (!(w.salp1 <= 0))
       { Pair p = SinCosNorm(w.salp1, w.calp1);
         w.salp1 = p.first; w.calp1 = p.second; }
     else {
diff --git a/java/src/main/java/net/sf/geographiclib/GeodesicLine.java b/java/src/main/java/net/sf/geographiclib/GeodesicLine.java
index 35d8202..80a32b8 100644
--- a/java/src/main/java/net/sf/geographiclib/GeodesicLine.java
+++ b/java/src/main/java/net/sf/geographiclib/GeodesicLine.java
@@ -29,10 +29,10 @@ package net.sf.geographiclib;
  * <ul>
  * <li>
  *   C. F. F. Karney,
- *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43–55 (2013);
- *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
  *   10.1007/s00190-012-0578-z</a>;
  *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
  *   geod-addenda.html</a>.
diff --git a/java/src/main/java/net/sf/geographiclib/PolygonArea.java b/java/src/main/java/net/sf/geographiclib/PolygonArea.java
index 1163df4..1edd979 100644
--- a/java/src/main/java/net/sf/geographiclib/PolygonArea.java
+++ b/java/src/main/java/net/sf/geographiclib/PolygonArea.java
@@ -15,10 +15,10 @@ package net.sf.geographiclib;
  * <ul>
  * <li>
  *   C. F. F. Karney,
- *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43–55 (2013);
- *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
  *   10.1007/s00190-012-0578-z</a>;
  *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
  *   geod-addenda.html</a>.
diff --git a/java/src/main/java/net/sf/geographiclib/package-info.java b/java/src/main/java/net/sf/geographiclib/package-info.java
index 77894b8..e593097 100644
--- a/java/src/main/java/net/sf/geographiclib/package-info.java
+++ b/java/src/main/java/net/sf/geographiclib/package-info.java
@@ -1,7 +1,7 @@
 /**
  * <h1>Geodesic routines from GeographicLib implemented in Java</h1>
  * @author Charles F. F. Karney (charles at karney.com)
- * @version 1.39
+ * @version 1.40
  *
  * <h2>Abstract</h2>
  * <p>
@@ -16,15 +16,15 @@
  * The Java library is part of GeographicLib which available for download at
  * <ul>
  * <li>
- *   <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.39.tar.gz">
- *   GeographicLib-1.39.tar.gz</a>
+ *   <a href="https://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.40.tar.gz">
+ *   GeographicLib-1.40.tar.gz</a>
  * <li>
- *   <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.39.zip">
- *   GeographicLib-1.39.zip</a>
+ *   <a href="https://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.40.zip">
+ *   GeographicLib-1.40.zip</a>
  * </ul>
  * <p>
  * as either a compressed tar file (tar.gz) or a zip file.  After unpacking
- * the source, the Java library can be found in GeographicLib-1.39/java.  (This
+ * the source, the Java library can be found in GeographicLib-1.40/java.  (This
  * library is completely independent from the rest of GeodegraphicLib.)  The
  * library consists of the files in the src/main/java/net/sf/geographiclib
  * subdirectory.
@@ -88,9 +88,9 @@
  * some additional packages to your local repository.)  Then compile and run
  * Inverse.java with <pre>
  * cd inverse/src/main/java
- * javac -cp .:../../../../target/GeographicLib-1.39.jar Inverse.java
+ * javac -cp .:../../../../target/GeographicLib-1.40.jar Inverse.java
  * echo -30 0 29.5 179.5 |
- *   java -cp .:../../../../target/GeographicLib-1.39.jar Inverse </pre>
+ *   java -cp .:../../../../target/GeographicLib-1.40.jar Inverse </pre>
  * <h3>Using maven to build and run {@code Inverse.java}</h3>
  * Use <a href="http://maven.apache.org/">maven</a> to install GeographicLib by
  * running (in the main java directory) <pre>
@@ -150,7 +150,7 @@
  * <ul>
  * <li>
  *   These algorithms are derived in C. F. F. Karney,
- *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43–55 (2013)
  *   (<a href="http://geographiclib.sf.net/geod-addenda.html">addenda</a>).
diff --git a/legacy/C/00README.txt b/legacy/C/00README.txt
index 4502721..a288ae4 100644
--- a/legacy/C/00README.txt
+++ b/legacy/C/00README.txt
@@ -3,7 +3,7 @@ This is a C implementation of the geodesic algorithms described in
   C. F. F. Karney,
   Algorithms for geodesics,
   J. Geodesy 87, 43-55 (2013);
-  http://dx.doi.org/10.1007/s00190-012-0578-z
+  https://dx.doi.org/10.1007/s00190-012-0578-z
   Addenda: http://geographiclib.sf.net/geod-addenda.html
 
 For documentation, see
diff --git a/legacy/C/geodesic.c b/legacy/C/geodesic.c
index 0244267..fd0214c 100644
--- a/legacy/C/geodesic.c
+++ b/legacy/C/geodesic.c
@@ -13,7 +13,7 @@
  *   C. F. F. Karney,
  *   Algorithms for geodesics,
  *   J. Geodesy <b>87</b>, 43--55 (2013);
- *   http://dx.doi.org/10.1007/s00190-012-0578-z
+ *   https://dx.doi.org/10.1007/s00190-012-0578-z
  *   Addenda: http://geographiclib.sf.net/geod-addenda.html
  *
  * See the comments in geodesic.h for documentation.
@@ -1217,7 +1217,8 @@ real InverseStart(const struct geod_geodesic* g,
       calp1 = sbet12a - cbet2 * sbet1 * sq(somg12) / (1 - comg12);
     }
   }
-  if (salp1 > 0)              /* Sanity check on starting guess */
+  /* Sanity check on starting guess.  Backwards check allows NaN through. */
+  if (!(salp1 <= 0))
     SinCosNorm(&salp1, &calp1);
   else {
     salp1 = 1; calp1 = 0;
diff --git a/legacy/C/geodesic.h b/legacy/C/geodesic.h
index a92323b..6b2afc5 100644
--- a/legacy/C/geodesic.h
+++ b/legacy/C/geodesic.h
@@ -4,10 +4,10 @@
  *
  * This an implementation in C of the geodesic algorithms described in
  * - C. F. F. Karney,
- *   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43--55 (2013);
- *   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+ *   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
  *   10.1007/s00190-012-0578-z</a>;
  *   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
  *   geod-addenda.html</a>.
@@ -113,7 +113,7 @@
  * http://geographiclib.sourceforge.net/
  *
  * This library was distributed with
- * <a href="../index.html">GeographicLib</a> 1.39.
+ * <a href="../index.html">GeographicLib</a> 1.40.
  **********************************************************************/
 
 #if !defined(GEODESIC_H)
@@ -128,7 +128,7 @@
  * The minor version of the geodesic library.  (This tracks the version of
  * GeographicLib.)
  **********************************************************************/
-#define GEODESIC_VERSION_MINOR 39
+#define GEODESIC_VERSION_MINOR 40
 /**
  * The patch level of the geodesic library.  (This tracks the version of
  * GeographicLib.)
diff --git a/legacy/Fortran/00README.txt b/legacy/Fortran/00README.txt
index de2f01f..537c7ab 100644
--- a/legacy/Fortran/00README.txt
+++ b/legacy/Fortran/00README.txt
@@ -3,7 +3,7 @@ This is a Fortran implementation of the geodesic algorithms described in
   C. F. F. Karney,
   Algorithms for geodesics,
   J. Geodesy 87, 43-55 (2013);
-  http://dx.doi.org/10.1007/s00190-012-0578-z
+  https://dx.doi.org/10.1007/s00190-012-0578-z
   Addenda: http://geographiclib.sf.net/geod-addenda.html
 
 For documentation, see
diff --git a/legacy/Fortran/geodesic.for b/legacy/Fortran/geodesic.for
index 8873cbc..4998a20 100644
--- a/legacy/Fortran/geodesic.for
+++ b/legacy/Fortran/geodesic.for
@@ -7,10 +7,10 @@
 *! This is a Fortran implementation of the geodesic algorithms described
 *! in
 *! - C. F. F. Karney,
-*!   <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+*!   <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
 *!   Algorithms for geodesics</a>,
 *!   J. Geodesy <b>87</b>, 43--55 (2013);
-*!   DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">
+*!   DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">
 *!   10.1007/s00190-012-0578-z</a>;
 *!   addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">
 *!   geod-addenda.html</a>.
@@ -117,7 +117,7 @@
 *! http://geographiclib.sourceforge.net/
 *!
 *! This library was distributed with
-*! <a href="../index.html">GeographicLib</a> 1.39.
+*! <a href="../index.html">GeographicLib</a> 1.40.
 
 *> Solve the direct geodesic problem
 *!
@@ -1327,8 +1327,8 @@
           calp1 = sbt12a - cbet2 * sbet1 * somg12**2 / (1 - comg12)
         end if
       end if
-* Sanity check on starting guess
-      if (salp1 .gt. 0) then
+* Sanity check on starting guess.  Backwards check allows NaN through.
+      if (.not. (salp1 .le. 0)) then
         call Norm(salp1, calp1)
       else
         salp1 = 1
diff --git a/man/CartConvert.1 b/man/CartConvert.1
index a53ecd0..01e1640 100644
--- a/man/CartConvert.1
+++ b/man/CartConvert.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CARTCONVERT 1"
-.TH CARTCONVERT 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH CARTCONVERT 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/CartConvert.usage b/man/CartConvert.usage
index 6f12b5c..f761cc1 100644
--- a/man/CartConvert.usage
+++ b/man/CartConvert.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    CartConvert --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/CartConvert.1.html\n";
+"    http://geographiclib.sf.net/1.40/CartConvert.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/ConicProj.1 b/man/ConicProj.1
index 39d3d1b..9314beb 100644
--- a/man/ConicProj.1
+++ b/man/ConicProj.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CONICPROJ 1"
-.TH CONICPROJ 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH CONICPROJ 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/ConicProj.usage b/man/ConicProj.usage
index 0c128c9..00f4d87 100644
--- a/man/ConicProj.usage
+++ b/man/ConicProj.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    ConicProj --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/ConicProj.1.html\n";
+"    http://geographiclib.sf.net/1.40/ConicProj.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/GeoConvert.1 b/man/GeoConvert.1
index 5b8ce77..9474a16 100644
--- a/man/GeoConvert.1
+++ b/man/GeoConvert.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEOCONVERT 1"
-.TH GEOCONVERT 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH GEOCONVERT 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -164,15 +164,16 @@ is used (\fIa\fR = 6378137 m, \fIf\fR = 1/298.257223563).
 2 tokens (output options \fB\-g\fR, \fB\-d\fR, or \fB\-:\fR) given as \fIlatitude\fR
 \&\fIlongitude\fR using decimal degrees or degrees minutes seconds.  d, ',
 and " are used to denote degrees, minutes, and seconds, with the least
-significant designator optional.  (See \*(L"\s-1QUOTING\*(R"\s0 for how to
-quote the characters ' and " when entering coordinates on the command
-line.)  Various unicode characters (encoded with \s-1UTF\-8\s0) may also be used
-to denote degrees, minutes, and seconds, e.g., the degree, prime, and
-double prime symbols.  Alternatively, : (colon) may be used to separate
-the various components.  Latitude is given first (unless the \fB\-w\fR
-option is given); however, on input, either may be given first by
-appending or prepending \fIN\fR or \fIS\fR to the latitude and \fIE\fR or \fIW\fR to
-the longitude.  For example, the following are all equivalent
+significant designator optional.  (See \*(L"\s-1QUOTING\*(R"\s0 for how to quote
+the characters ' and \*(L" when entering coordinates on the command line.)
+Various unicode characters (encoded with \s-1UTF\-8\s0) may also be used to
+denote degrees, minutes, and seconds, e.g., the degree, prime, and
+double prime symbols; in addition two single quotes can be used to
+represent \*(R".  Alternatively, : (colon) may be used to separate the
+various components.  Latitude is given first (unless the \fB\-w\fR option
+is given); however, on input, either may be given first by appending
+or prepending \fIN\fR or \fIS\fR to the latitude and \fIE\fR or \fIW\fR to the
+longitude.  For example, the following are all equivalent
 .Sp
 .Vb 5
 \&    33.3 44.4
@@ -371,8 +372,8 @@ separator character.  Thus 10d20' can be entered as 10d20 or 10:20 and
 .IP "Unix shells (sh, bash, tsch)" 4
 .IX Item "Unix shells (sh, bash, tsch)"
 The characters ' and \*(L" can be quoted by preceding them with a \e
-(backslash); or you can quote a ' with a pair of \*(R"s.  The two
-alternatives are illustrated by
+(backslash); or you can quote a string containing ' with a pair of \*(R"s.
+The two alternatives are illustrated by
 .Sp
 .Vb 2
 \&   echo 10d20\e\*(Aq30\e" "20d30\*(Aq40" | GeoConvert \-d \-p \-1
@@ -387,12 +388,13 @@ Quoting of command line arguments is similar
 .Ve
 .IP "Windows command shell (cmd)" 4
 .IX Item "Windows command shell (cmd)"
-The ' character needs no quoting and the " character can be quoted by a
-^.  (This quoting is usually unnecessary because the trailing designator
-can be omitted.)  Thus
+The ' character needs no quoting; the " character can either be quoted
+by a ^ or can be represented by typing ' twice.  (This quoting is
+usually unnecessary because the trailing designator can be omitted.)
+Thus
 .Sp
 .Vb 2
-\&   echo 10d20\*(Aq30^" 20d30\*(Aq40 | GeoConvert \-d \-p \-1
+\&   echo 10d20\*(Aq30\*(Aq\*(Aq 20d30\*(Aq40 | GeoConvert \-d \-p \-1
 \&   => 10d20\*(Aq30"N 020d30\*(Aq40"E
 .Ve
 .Sp
@@ -429,25 +431,28 @@ following lines will be converted.
 .IP "\fB\s-1UTM\s0\fR" 4
 .IX Item "UTM"
 Universal Transverse Mercator,
-<http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system>.
+<https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system>.
 .IP "\fB\s-1UPS\s0\fR" 4
 .IX Item "UPS"
 Universal Polar Stereographic,
-<http://en.wikipedia.org/wiki/Universal_Polar_Stereographic>.
+<https://en.wikipedia.org/wiki/Universal_Polar_Stereographic>.
 .IP "\fB\s-1MGRS\s0\fR" 4
 .IX Item "MGRS"
 Military Grid Reference System,
-<http://en.wikipedia.org/wiki/Military_grid_reference_system>.
+<https://en.wikipedia.org/wiki/Military_grid_reference_system>.
 .IP "\fB\s-1WGS84\s0\fR" 4
 .IX Item "WGS84"
 World Geodetic System 1984,
-<http://en.wikipedia.org/wiki/WGS84>.
+<https://en.wikipedia.org/wiki/WGS84>.
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
+An online version of this utility is availbable at
+<http://geographiclib.sourceforge.net/cgi\-bin/GeoConvert>.
+.PP
 The algorithms for the transverse Mercator projection are described in
 C. F. F. Karney, \fITransverse Mercator with an accuracy of a few
 nanometers\fR, J. Geodesy \fB85\fR(8), 475\-485 (Aug. 2011); \s-1DOI
-\&\s0<http://dx.doi.org/10.1007/s00190\-011\-0445\-3>; preprint
+\&\s0<https://dx.doi.org/10.1007/s00190\-011\-0445\-3>; preprint
 <http://arxiv.org/abs/1002.1417>.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
diff --git a/man/GeoConvert.1.html b/man/GeoConvert.1.html
index 677ca9d..f0769ff 100644
--- a/man/GeoConvert.1.html
+++ b/man/GeoConvert.1.html
@@ -28,7 +28,7 @@
 <dt id="geographic"><b>geographic</b></dt>
 <dd>
 
-<p>2 tokens (output options <b>-g</b>, <b>-d</b>, or <b>-:</b>) given as <i>latitude</i> <i>longitude</i> using decimal degrees or degrees minutes seconds. d, ', and " are used to denote degrees, minutes, and seconds, with the least significant designator optional. (See <a href="#QUOTING">"QUOTING"</a> for how to quote the characters ' and " when entering coordinates on the command line.) Various unicode characters (encoded with UTF-8) may also be used to deno [...]
+<p>2 tokens (output options <b>-g</b>, <b>-d</b>, or <b>-:</b>) given as <i>latitude</i> <i>longitude</i> using decimal degrees or degrees minutes seconds. d, ', and " are used to denote degrees, minutes, and seconds, with the least significant designator optional. (See <a href="#QUOTING">"QUOTING"</a> for how to quote the characters ' and " when entering coordinates on the command line.) Various unicode characters (encoded with UTF-8) may also be used to deno [...]
 
 <pre><code>    33.3 44.4
     E44.4 N33.3
@@ -242,7 +242,7 @@
 <dt id="Unix-shells-sh-bash-tsch">Unix shells (sh, bash, tsch)</dt>
 <dd>
 
-<p>The characters ' and " can be quoted by preceding them with a \ (backslash); or you can quote a ' with a pair of "s. The two alternatives are illustrated by</p>
+<p>The characters ' and " can be quoted by preceding them with a \ (backslash); or you can quote a string containing ' with a pair of "s. The two alternatives are illustrated by</p>
 
 <pre><code>   echo 10d20\'30\" "20d30'40" | GeoConvert -d -p -1
    => 10d20'30"N 020d30'40"E</code></pre>
@@ -256,9 +256,9 @@
 <dt id="Windows-command-shell-cmd">Windows command shell (cmd)</dt>
 <dd>
 
-<p>The ' character needs no quoting and the " character can be quoted by a ^. (This quoting is usually unnecessary because the trailing designator can be omitted.) Thus</p>
+<p>The ' character needs no quoting; the " character can either be quoted by a ^ or can be represented by typing ' twice. (This quoting is usually unnecessary because the trailing designator can be omitted.) Thus</p>
 
-<pre><code>   echo 10d20'30^" 20d30'40 | GeoConvert -d -p -1
+<pre><code>   echo 10d20'30'' 20d30'40 | GeoConvert -d -p -1
    => 10d20'30"N 020d30'40"E</code></pre>
 
 <p>Use \ to quote the " character in a command line argument</p>
@@ -295,32 +295,34 @@
 <dt id="UTM"><b>UTM</b></dt>
 <dd>
 
-<p>Universal Transverse Mercator, <a href="http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system">http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system</a>.</p>
+<p>Universal Transverse Mercator, <a href="https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system">https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system</a>.</p>
 
 </dd>
 <dt id="UPS"><b>UPS</b></dt>
 <dd>
 
-<p>Universal Polar Stereographic, <a href="http://en.wikipedia.org/wiki/Universal_Polar_Stereographic">http://en.wikipedia.org/wiki/Universal_Polar_Stereographic</a>.</p>
+<p>Universal Polar Stereographic, <a href="https://en.wikipedia.org/wiki/Universal_Polar_Stereographic">https://en.wikipedia.org/wiki/Universal_Polar_Stereographic</a>.</p>
 
 </dd>
 <dt id="MGRS1"><b>MGRS</b></dt>
 <dd>
 
-<p>Military Grid Reference System, <a href="http://en.wikipedia.org/wiki/Military_grid_reference_system">http://en.wikipedia.org/wiki/Military_grid_reference_system</a>.</p>
+<p>Military Grid Reference System, <a href="https://en.wikipedia.org/wiki/Military_grid_reference_system">https://en.wikipedia.org/wiki/Military_grid_reference_system</a>.</p>
 
 </dd>
 <dt id="WGS84"><b>WGS84</b></dt>
 <dd>
 
-<p>World Geodetic System 1984, <a href="http://en.wikipedia.org/wiki/WGS84">http://en.wikipedia.org/wiki/WGS84</a>.</p>
+<p>World Geodetic System 1984, <a href="https://en.wikipedia.org/wiki/WGS84">https://en.wikipedia.org/wiki/WGS84</a>.</p>
 
 </dd>
 </dl>
 
 <h1 id="SEE-ALSO">SEE ALSO</h1>
 
-<p>The algorithms for the transverse Mercator projection are described in C. F. F. Karney, <i>Transverse Mercator with an accuracy of a few nanometers</i>, J. Geodesy <b>85</b>(8), 475-485 (Aug. 2011); DOI <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">http://dx.doi.org/10.1007/s00190-011-0445-3</a>; preprint <a href="http://arxiv.org/abs/1002.1417">http://arxiv.org/abs/1002.1417</a>.</p>
+<p>An online version of this utility is availbable at <a href="http://geographiclib.sourceforge.net/cgi-bin/GeoConvert">http://geographiclib.sourceforge.net/cgi-bin/GeoConvert</a>.</p>
+
+<p>The algorithms for the transverse Mercator projection are described in C. F. F. Karney, <i>Transverse Mercator with an accuracy of a few nanometers</i>, J. Geodesy <b>85</b>(8), 475-485 (Aug. 2011); DOI <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">https://dx.doi.org/10.1007/s00190-011-0445-3</a>; preprint <a href="http://arxiv.org/abs/1002.1417">http://arxiv.org/abs/1002.1417</a>.</p>
 
 <h1 id="AUTHOR">AUTHOR</h1>
 
diff --git a/man/GeoConvert.pod b/man/GeoConvert.pod
index 928cb7e..07d160e 100644
--- a/man/GeoConvert.pod
+++ b/man/GeoConvert.pod
@@ -30,15 +30,16 @@ is used (I<a> = 6378137 m, I<f> = 1/298.257223563).
 2 tokens (output options B<-g>, B<-d>, or B<-:>) given as I<latitude>
 I<longitude> using decimal degrees or degrees minutes seconds.  d, ',
 and " are used to denote degrees, minutes, and seconds, with the least
-significant designator optional.  (See L</QUOTING> for how to
-quote the characters ' and " when entering coordinates on the command
-line.)  Various unicode characters (encoded with UTF-8) may also be used
-to denote degrees, minutes, and seconds, e.g., the degree, prime, and
-double prime symbols.  Alternatively, : (colon) may be used to separate
-the various components.  Latitude is given first (unless the B<-w>
-option is given); however, on input, either may be given first by
-appending or prepending I<N> or I<S> to the latitude and I<E> or I<W> to
-the longitude.  For example, the following are all equivalent
+significant designator optional.  (See L</QUOTING> for how to quote
+the characters ' and " when entering coordinates on the command line.)
+Various unicode characters (encoded with UTF-8) may also be used to
+denote degrees, minutes, and seconds, e.g., the degree, prime, and
+double prime symbols; in addition two single quotes can be used to
+represent ".  Alternatively, : (colon) may be used to separate the
+various components.  Latitude is given first (unless the B<-w> option
+is given); however, on input, either may be given first by appending
+or prepending I<N> or I<S> to the latitude and I<E> or I<W> to the
+longitude.  For example, the following are all equivalent
 
     33.3 44.4
     E44.4 N33.3
@@ -260,8 +261,8 @@ separator character.  Thus 10d20' can be entered as 10d20 or 10:20 and
 =item Unix shells (sh, bash, tsch)
 
 The characters ' and " can be quoted by preceding them with a \
-(backslash); or you can quote a ' with a pair of "s.  The two
-alternatives are illustrated by
+(backslash); or you can quote a string containing ' with a pair of "s.
+The two alternatives are illustrated by
 
    echo 10d20\'30\" "20d30'40" | GeoConvert -d -p -1
    => 10d20'30"N 020d30'40"E
@@ -273,11 +274,12 @@ Quoting of command line arguments is similar
 
 =item Windows command shell (cmd)
 
-The ' character needs no quoting and the " character can be quoted by a
-^.  (This quoting is usually unnecessary because the trailing designator
-can be omitted.)  Thus
+The ' character needs no quoting; the " character can either be quoted
+by a ^ or can be represented by typing ' twice.  (This quoting is
+usually unnecessary because the trailing designator can be omitted.)
+Thus
 
-   echo 10d20'30^" 20d30'40 | GeoConvert -d -p -1
+   echo 10d20'30'' 20d30'40 | GeoConvert -d -p -1
    => 10d20'30"N 020d30'40"E
 
 Use \ to quote the " character in a command line argument
@@ -315,31 +317,34 @@ following lines will be converted.
 =item B<UTM>
 
 Universal Transverse Mercator,
-L<http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system>.
+L<https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system>.
 
 =item B<UPS>
 
 Universal Polar Stereographic,
-L<http://en.wikipedia.org/wiki/Universal_Polar_Stereographic>.
+L<https://en.wikipedia.org/wiki/Universal_Polar_Stereographic>.
 
 =item B<MGRS>
 
 Military Grid Reference System,
-L<http://en.wikipedia.org/wiki/Military_grid_reference_system>.
+L<https://en.wikipedia.org/wiki/Military_grid_reference_system>.
 
 =item B<WGS84>
 
 World Geodetic System 1984,
-L<http://en.wikipedia.org/wiki/WGS84>.
+L<https://en.wikipedia.org/wiki/WGS84>.
 
 =back
 
 =head1 SEE ALSO
 
+An online version of this utility is availbable at
+L<http://geographiclib.sourceforge.net/cgi-bin/GeoConvert>.
+
 The algorithms for the transverse Mercator projection are described in
 C. F. F. Karney, I<Transverse Mercator with an accuracy of a few
 nanometers>, J. Geodesy B<85>(8), 475-485 (Aug. 2011); DOI
-L<http://dx.doi.org/10.1007/s00190-011-0445-3>; preprint
+L<https://dx.doi.org/10.1007/s00190-011-0445-3>; preprint
 L<http://arxiv.org/abs/1002.1417>.
 
 =head1 AUTHOR
diff --git a/man/GeoConvert.usage b/man/GeoConvert.usage
index 1d54eae..dd7b8b7 100644
--- a/man/GeoConvert.usage
+++ b/man/GeoConvert.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeoConvert --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/GeoConvert.1.html\n";
+"    http://geographiclib.sf.net/1.40/GeoConvert.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -38,12 +38,12 @@ int usage(int retval, bool brief) {
 "           the characters ' and \" when entering coordinates on the command\n"
 "           line.)  Various unicode characters (encoded with UTF-8) may also be\n"
 "           used to denote degrees, minutes, and seconds, e.g., the degree,\n"
-"           prime, and double prime symbols.  Alternatively, : (colon) may be\n"
-"           used to separate the various components.  Latitude is given first\n"
-"           (unless the -w option is given); however, on input, either may be\n"
-"           given first by appending or prepending N or S to the latitude and E\n"
-"           or W to the longitude.  For example, the following are all\n"
-"           equivalent\n"
+"           prime, and double prime symbols; in addition two single quotes can\n"
+"           be used to represent \".  Alternatively, : (colon) may be used to\n"
+"           separate the various components.  Latitude is given first (unless\n"
+"           the -w option is given); however, on input, either may be given\n"
+"           first by appending or prepending N or S to the latitude and E or W\n"
+"           to the longitude.  For example, the following are all equivalent\n"
 "\n"
 "               33.3 44.4\n"
 "               E44.4 N33.3\n"
@@ -214,8 +214,8 @@ int usage(int retval, bool brief) {
 "\n"
 "       Unix shells (sh, bash, tsch)\n"
 "           The characters ' and \" can be quoted by preceding them with a \\\n"
-"           (backslash); or you can quote a ' with a pair of \"s.  The two\n"
-"           alternatives are illustrated by\n"
+"           (backslash); or you can quote a string containing ' with a pair of\n"
+"           \"s.  The two alternatives are illustrated by\n"
 "\n"
 "              echo 10d20\\'30\\\" \"20d30'40\" | GeoConvert -d -p -1\n"
 "              => 10d20'30\"N 020d30'40\"E\n"
@@ -226,11 +226,12 @@ int usage(int retval, bool brief) {
 "              => 10d20'30\"N 020d30'40\"E\n"
 "\n"
 "       Windows command shell (cmd)\n"
-"           The ' character needs no quoting and the \" character can be quoted\n"
-"           by a ^.  (This quoting is usually unnecessary because the trailing\n"
-"           designator can be omitted.)  Thus\n"
+"           The ' character needs no quoting; the \" character can either be\n"
+"           quoted by a ^ or can be represented by typing ' twice.  (This\n"
+"           quoting is usually unnecessary because the trailing designator can\n"
+"           be omitted.)  Thus\n"
 "\n"
-"              echo 10d20'30^\" 20d30'40 | GeoConvert -d -p -1\n"
+"              echo 10d20'30'' 20d30'40 | GeoConvert -d -p -1\n"
 "              => 10d20'30\"N 020d30'40\"E\n"
 "\n"
 "           Use \\ to quote the \" character in a command line argument\n"
@@ -258,23 +259,26 @@ int usage(int retval, bool brief) {
 "\n"
 "ABBREVIATIONS\n"
 "       UTM Universal Transverse Mercator,\n"
-"           <http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system>.\n"
+"           <https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system>.\n"
 "\n"
 "       UPS Universal Polar Stereographic,\n"
-"           <http://en.wikipedia.org/wiki/Universal_Polar_Stereographic>.\n"
+"           <https://en.wikipedia.org/wiki/Universal_Polar_Stereographic>.\n"
 "\n"
 "       MGRS\n"
 "           Military Grid Reference System,\n"
-"           <http://en.wikipedia.org/wiki/Military_grid_reference_system>.\n"
+"           <https://en.wikipedia.org/wiki/Military_grid_reference_system>.\n"
 "\n"
 "       WGS84\n"
-"           World Geodetic System 1984, <http://en.wikipedia.org/wiki/WGS84>.\n"
+"           World Geodetic System 1984, <https://en.wikipedia.org/wiki/WGS84>.\n"
 "\n"
 "SEE ALSO\n"
+"       An online version of this utility is availbable at\n"
+"       <http://geographiclib.sourceforge.net/cgi-bin/GeoConvert>.\n"
+"\n"
 "       The algorithms for the transverse Mercator projection are described in\n"
 "       C. F. F. Karney, Transverse Mercator with an accuracy of a few\n"
 "       nanometers, J. Geodesy 85(8), 475-485 (Aug. 2011); DOI\n"
-"       <http://dx.doi.org/10.1007/s00190-011-0445-3>; preprint\n"
+"       <https://dx.doi.org/10.1007/s00190-011-0445-3>; preprint\n"
 "       <http://arxiv.org/abs/1002.1417>.\n"
 "\n"
 "AUTHOR\n"
diff --git a/man/GeodSolve.1 b/man/GeodSolve.1
index d658b71..f1ea676 100644
--- a/man/GeodSolve.1
+++ b/man/GeodSolve.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEODSOLVE 1"
-.TH GEODSOLVE 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH GEODSOLVE 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -420,12 +420,18 @@ Waypoints on the route at intervals of 2000km:
 .Ve
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
-\&\fIGeoConvert\fR\|(1).  The algorithms are described in C. F. F. Karney,
+\&\fIGeoConvert\fR\|(1).
+.PP
+An online version of this utility is availbable at
+<http://geographiclib.sourceforge.net/cgi\-bin/GeodSolve>.
+.PP
+The algorithms are described in C. F. F. Karney,
 \&\fIAlgorithms for geodesics\fR, J. Geodesy 87, 43\-55 (2013); \s-1DOI:
-\&\s0<http://dx.doi.org/10.1007/s00190\-012\-0578\-z>;
+\&\s0<https://dx.doi.org/10.1007/s00190\-012\-0578\-z>;
 addenda: <http://geographiclib.sf.net/geod\-addenda.html>.
-The wikipedia page, Geodesics on an ellipsoid,
-<http://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>.
+.PP
+The Wikipedia page, Geodesics on an ellipsoid,
+<https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 \&\fBGeodSolve\fR was written by Charles Karney.
diff --git a/man/GeodSolve.1.html b/man/GeodSolve.1.html
index 2ec36bc..fd7c440 100644
--- a/man/GeodSolve.1.html
+++ b/man/GeodSolve.1.html
@@ -270,7 +270,13 @@
 
 <h1 id="SEE-ALSO">SEE ALSO</h1>
 
-<p>GeoConvert(1). The algorithms are described in C. F. F. Karney, <i>Algorithms for geodesics</i>, J. Geodesy 87, 43-55 (2013); DOI: <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">http://dx.doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">http://geographiclib.sf.net/geod-addenda.html</a>. The wikipedia page, Geodesics on an ellipsoid, <a href="http://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid">http://en.wikipedia.org/wik [...]
+<p>GeoConvert(1).</p>
+
+<p>An online version of this utility is availbable at <a href="http://geographiclib.sourceforge.net/cgi-bin/GeodSolve">http://geographiclib.sourceforge.net/cgi-bin/GeodSolve</a>.</p>
+
+<p>The algorithms are described in C. F. F. Karney, <i>Algorithms for geodesics</i>, J. Geodesy 87, 43-55 (2013); DOI: <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">https://dx.doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">http://geographiclib.sf.net/geod-addenda.html</a>.</p>
+
+<p>The Wikipedia page, Geodesics on an ellipsoid, <a href="https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid">https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid</a>.</p>
 
 <h1 id="AUTHOR">AUTHOR</h1>
 
diff --git a/man/GeodSolve.pod b/man/GeodSolve.pod
index 07f91fd..edf0342 100644
--- a/man/GeodSolve.pod
+++ b/man/GeodSolve.pod
@@ -324,12 +324,18 @@ Waypoints on the route at intervals of 2000km:
 
 =head1 SEE ALSO
 
-GeoConvert(1).  The algorithms are described in C. F. F. Karney,
+GeoConvert(1).
+
+An online version of this utility is availbable at
+L<http://geographiclib.sourceforge.net/cgi-bin/GeodSolve>.
+
+The algorithms are described in C. F. F. Karney,
 I<Algorithms for geodesics>, J. Geodesy 87, 43-55 (2013); DOI:
-L<http://dx.doi.org/10.1007/s00190-012-0578-z>;
+L<https://dx.doi.org/10.1007/s00190-012-0578-z>;
 addenda: L<http://geographiclib.sf.net/geod-addenda.html>.
-The wikipedia page, Geodesics on an ellipsoid,
-L<http://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>.
+
+The Wikipedia page, Geodesics on an ellipsoid,
+L<https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>.
 
 =head1 AUTHOR
 
diff --git a/man/GeodSolve.usage b/man/GeodSolve.usage
index 4632a85..bcae93f 100644
--- a/man/GeodSolve.usage
+++ b/man/GeodSolve.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeodSolve --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/GeodSolve.1.html\n";
+"    http://geographiclib.sf.net/1.40/GeodSolve.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -264,12 +264,18 @@ int usage(int retval, bool brief) {
 "          04:32:05.7S 104:14:48.7E 177:28:43.6\n"
 "\n"
 "SEE ALSO\n"
-"       GeoConvert(1).  The algorithms are described in C. F. F. Karney,\n"
-"       Algorithms for geodesics, J. Geodesy 87, 43-55 (2013); DOI:\n"
-"       <http://dx.doi.org/10.1007/s00190-012-0578-z>; addenda:\n"
-"       <http://geographiclib.sf.net/geod-addenda.html>.  The wikipedia page,\n"
-"       Geodesics on an ellipsoid,\n"
-"       <http://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>.\n"
+"       GeoConvert(1).\n"
+"\n"
+"       An online version of this utility is availbable at\n"
+"       <http://geographiclib.sourceforge.net/cgi-bin/GeodSolve>.\n"
+"\n"
+"       The algorithms are described in C. F. F. Karney, Algorithms for\n"
+"       geodesics, J. Geodesy 87, 43-55 (2013); DOI:\n"
+"       <https://dx.doi.org/10.1007/s00190-012-0578-z>; addenda:\n"
+"       <http://geographiclib.sf.net/geod-addenda.html>.\n"
+"\n"
+"       The Wikipedia page, Geodesics on an ellipsoid,\n"
+"       <https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>.\n"
 "\n"
 "AUTHOR\n"
 "       GeodSolve was written by Charles Karney.\n"
diff --git a/man/GeodesicProj.1 b/man/GeodesicProj.1
index 57807cc..3081d2a 100644
--- a/man/GeodesicProj.1
+++ b/man/GeodesicProj.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEODESICPROJ 1"
-.TH GEODESICPROJ 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH GEODESICPROJ 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -255,7 +255,7 @@ terminate; following lines will be converted.
 .IX Header "SEE ALSO"
 The ellipsoidal gnomonic projection is derived in Section 8 of
 C. F. F. Karney, \fIAlgorithms for geodesics\fR, J. Geodesy 87, 43\-55 (2013); \s-1DOI
-\&\s0<http://dx.doi.org/10.1007/s00190\-012\-0578\-z>;
+\&\s0<https://dx.doi.org/10.1007/s00190\-012\-0578\-z>;
 addenda: <http://geographiclib.sf.net/geod\-addenda.html>.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
diff --git a/man/GeodesicProj.1.html b/man/GeodesicProj.1.html
index 9f4ab71..ac0068c 100644
--- a/man/GeodesicProj.1.html
+++ b/man/GeodesicProj.1.html
@@ -128,7 +128,7 @@
 
 <h1 id="SEE-ALSO">SEE ALSO</h1>
 
-<p>The ellipsoidal gnomonic projection is derived in Section 8 of C. F. F. Karney, <i>Algorithms for geodesics</i>, J. Geodesy 87, 43-55 (2013); DOI <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">http://dx.doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">http://geographiclib.sf.net/geod-addenda.html</a>.</p>
+<p>The ellipsoidal gnomonic projection is derived in Section 8 of C. F. F. Karney, <i>Algorithms for geodesics</i>, J. Geodesy 87, 43-55 (2013); DOI <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">https://dx.doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">http://geographiclib.sf.net/geod-addenda.html</a>.</p>
 
 <h1 id="AUTHOR">AUTHOR</h1>
 
diff --git a/man/GeodesicProj.pod b/man/GeodesicProj.pod
index d271d25..6414a24 100644
--- a/man/GeodesicProj.pod
+++ b/man/GeodesicProj.pod
@@ -137,7 +137,7 @@ terminate; following lines will be converted.
 
 The ellipsoidal gnomonic projection is derived in Section 8 of
 C. F. F. Karney, I<Algorithms for geodesics>, J. Geodesy 87, 43-55 (2013); DOI
-L<http://dx.doi.org/10.1007/s00190-012-0578-z>;
+L<https://dx.doi.org/10.1007/s00190-012-0578-z>;
 addenda: L<http://geographiclib.sf.net/geod-addenda.html>.
 
 =head1 AUTHOR
diff --git a/man/GeodesicProj.usage b/man/GeodesicProj.usage
index 79c06e1..c767e9d 100644
--- a/man/GeodesicProj.usage
+++ b/man/GeodesicProj.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeodesicProj --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/GeodesicProj.1.html\n";
+"    http://geographiclib.sf.net/1.40/GeodesicProj.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -117,7 +117,7 @@ int usage(int retval, bool brief) {
 "SEE ALSO\n"
 "       The ellipsoidal gnomonic projection is derived in Section 8 of C. F. F.\n"
 "       Karney, Algorithms for geodesics, J. Geodesy 87, 43-55 (2013); DOI\n"
-"       <http://dx.doi.org/10.1007/s00190-012-0578-z>; addenda:\n"
+"       <https://dx.doi.org/10.1007/s00190-012-0578-z>; addenda:\n"
 "       <http://geographiclib.sf.net/geod-addenda.html>.\n"
 "\n"
 "AUTHOR\n"
diff --git a/man/GeoidEval.1 b/man/GeoidEval.1
index 50e3263..b1d91a7 100644
--- a/man/GeoidEval.1
+++ b/man/GeoidEval.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEOIDEVAL 1"
-.TH GEOIDEVAL 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH GEOIDEVAL 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -373,7 +373,7 @@ An earth gravity model published by the \s-1NGA\s0 in 2008,
 .IP "\fB\s-1WGS84\s0\fR" 4
 .IX Item "WGS84"
 World Geodetic System 1984,
-<http://en.wikipedia.org/wiki/WGS84>.
+<https://en.wikipedia.org/wiki/WGS84>.
 .IP "\fB\s-1HAE\s0\fR" 4
 .IX Item "HAE"
 Height above the \s-1WGS84\s0 ellipsoid.
@@ -403,6 +403,9 @@ Convert a point in \s-1UTM\s0 zone 18n from \s-1MSL\s0 to \s-1HAE\s0
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 \&\fIGeoConvert\fR\|(1), \fIGravity\fR\|(1).
+.PP
+An online version of this utility is availbable at
+<http://geographiclib.sourceforge.net/cgi\-bin/GeoidEval>.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 \&\fBGeoidEval\fR was written by Charles Karney.
diff --git a/man/GeoidEval.1.html b/man/GeoidEval.1.html
index 9e725e1..3d419d3 100644
--- a/man/GeoidEval.1.html
+++ b/man/GeoidEval.1.html
@@ -243,7 +243,7 @@
 <dt id="WGS84"><b>WGS84</b></dt>
 <dd>
 
-<p>World Geodetic System 1984, <a href="http://en.wikipedia.org/wiki/WGS84">http://en.wikipedia.org/wiki/WGS84</a>.</p>
+<p>World Geodetic System 1984, <a href="https://en.wikipedia.org/wiki/WGS84">https://en.wikipedia.org/wiki/WGS84</a>.</p>
 
 </dd>
 <dt id="HAE"><b>HAE</b></dt>
@@ -278,6 +278,8 @@
 
 <p>GeoConvert(1), Gravity(1).</p>
 
+<p>An online version of this utility is availbable at <a href="http://geographiclib.sourceforge.net/cgi-bin/GeoidEval">http://geographiclib.sourceforge.net/cgi-bin/GeoidEval</a>.</p>
+
 <h1 id="AUTHOR">AUTHOR</h1>
 
 <p><b>GeoidEval</b> was written by Charles Karney.</p>
diff --git a/man/GeoidEval.pod b/man/GeoidEval.pod
index 22c83cb..b57a8ef 100644
--- a/man/GeoidEval.pod
+++ b/man/GeoidEval.pod
@@ -274,7 +274,7 @@ L<http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008>.
 =item B<WGS84>
 
 World Geodetic System 1984,
-L<http://en.wikipedia.org/wiki/WGS84>.
+L<https://en.wikipedia.org/wiki/WGS84>.
 
 =item B<HAE>
 
@@ -307,6 +307,9 @@ Convert a point in UTM zone 18n from MSL to HAE
 
 GeoConvert(1), Gravity(1).
 
+An online version of this utility is availbable at
+L<http://geographiclib.sourceforge.net/cgi-bin/GeoidEval>.
+
 =head1 AUTHOR
 
 B<GeoidEval> was written by Charles Karney.
diff --git a/man/GeoidEval.usage b/man/GeoidEval.usage
index cdc6a93..3d3650c 100644
--- a/man/GeoidEval.usage
+++ b/man/GeoidEval.usage
@@ -10,7 +10,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeoidEval --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/GeoidEval.1.html\n";
+"    http://geographiclib.sf.net/1.40/GeoidEval.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -225,7 +225,7 @@ int usage(int retval, bool brief) {
 "           <http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008>.\n"
 "\n"
 "       WGS84\n"
-"           World Geodetic System 1984, <http://en.wikipedia.org/wiki/WGS84>.\n"
+"           World Geodetic System 1984, <https://en.wikipedia.org/wiki/WGS84>.\n"
 "\n"
 "       HAE Height above the WGS84 ellipsoid.\n"
 "\n"
@@ -250,6 +250,9 @@ int usage(int retval, bool brief) {
 "SEE ALSO\n"
 "       GeoConvert(1), Gravity(1).\n"
 "\n"
+"       An online version of this utility is availbable at\n"
+"       <http://geographiclib.sourceforge.net/cgi-bin/GeoidEval>.\n"
+"\n"
 "AUTHOR\n"
 "       GeoidEval was written by Charles Karney.\n"
 "\n"
diff --git a/man/Gravity.1 b/man/Gravity.1
index 7b2e762..6273c92 100644
--- a/man/Gravity.1
+++ b/man/Gravity.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GRAVITY 1"
-.TH GRAVITY 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH GRAVITY 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/man/Gravity.usage b/man/Gravity.usage
index 7cbd1db..1136667 100644
--- a/man/Gravity.usage
+++ b/man/Gravity.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    Gravity --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/Gravity.1.html\n";
+"    http://geographiclib.sf.net/1.40/Gravity.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
diff --git a/man/MagneticField.1 b/man/MagneticField.1
index 8df049c..fad3e28 100644
--- a/man/MagneticField.1
+++ b/man/MagneticField.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "MAGNETICFIELD 1"
-.TH MAGNETICFIELD 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH MAGNETICFIELD 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -191,7 +191,7 @@ The \s-1WGS84\s0 ellipsoid is used, \fIa\fR = 6378137 m, \fIf\fR = 1/298.2572235
 .IX Header "OPTIONS"
 .IP "\fB\-n\fR" 4
 .IX Item "-n"
-use magnetic field model \fIname\fR instead of the default \f(CW\*(C`wmm2010\*(C'\fR.  See
+use magnetic field model \fIname\fR instead of the default \f(CW\*(C`wmm2015\*(C'\fR.  See
 \&\*(L"\s-1MODELS\*(R"\s0.
 .IP "\fB\-d\fR" 4
 .IX Item "-d"
@@ -269,6 +269,9 @@ following models
 \&    wmm2010, the World Magnetic Model 2010, which approximates the
 \&      main magnetic field for the period 2010\-2015.  See
 \&      http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
+\&    wmm2015, the World Magnetic Model 2015, which approximates the
+\&      main magnetic field for the period 2015\-2020.  See
+\&      http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
 \&    igrf11, the International Geomagnetic Reference Field (11th
 \&      generation) which approximates the main magnetic field for
 \&      the period 1900\-2015.  See
@@ -283,7 +286,7 @@ These models approximate the magnetic field due to the earth's core and
 the ionosphere, the magnetosphere, nearby magnetized materials,
 electrical machinery, etc.
 .PP
-By default, the \f(CW\*(C`wmm2010\*(C'\fR magnetic model is used.  This may changed by
+By default, the \f(CW\*(C`wmm2015\*(C'\fR magnetic model is used.  This may changed by
 setting the environment variable \f(CW\*(C`GEOGRAPHICLIB_MAGNETIC_NAME\*(C'\fR or with
 the \fB\-n\fR option.
 .PP
@@ -301,7 +304,7 @@ available at
 .IX Header "ENVIRONMENT"
 .IP "\fB\s-1GEOGRAPHICLIB_MAGNETIC_NAME\s0\fR" 4
 .IX Item "GEOGRAPHICLIB_MAGNETIC_NAME"
-Override the compile-time default magnetic name of \f(CW\*(C`wmm2010\*(C'\fR.  The
+Override the compile-time default magnetic name of \f(CW\*(C`wmm2015\*(C'\fR.  The
 \&\fB\-h\fR option reports the value of \fB\s-1GEOGRAPHICLIB_MAGNETIC_NAME\s0\fR, if
 defined, otherwise it reports the compile-time value.  If the \fB\-n\fR
 \&\fIname\fR option is used, then \fIname\fR takes precedence.
@@ -330,12 +333,12 @@ error and the field (which may be inaccurate) is returned in the normal
 way.
 .SH "EXAMPLES"
 .IX Header "EXAMPLES"
-The magnetic field from \s-1WMM2010\s0 in Timbuktu on 2012\-01\-01
+The magnetic field from \s-1WMM2015\s0 in Timbuktu on 2016\-01\-01
 .PP
 .Vb 3
-\&    echo 2012\-01\-01 16:46:33N 3:00:34W 300 | MagneticField \-r
-\&    => \-2.55 12.43 33771.0 33737.6 \-1500.5 7446.0 34582.1
-\&       0.10 \-0.07 34.3 36.8 54.4 \-35.3 25.9
+\&    echo 2016\-01\-01 16:46:33N 3:00:34W 300 | MagneticField \-r
+\&    => \-2.12 12.15 33871.9 33848.7 \-1251.4 7293.9 34648.3
+\&       0.09 \-0.08 31.8 33.8 53.7 \-41.4 22.3
 .Ve
 .PP
 The first two numbers returned are the declination and inclination of
diff --git a/man/MagneticField.1.html b/man/MagneticField.1.html
index 7cd0282..200dbb1 100644
--- a/man/MagneticField.1.html
+++ b/man/MagneticField.1.html
@@ -48,7 +48,7 @@
 <dt id="n"><b>-n</b></dt>
 <dd>
 
-<p>use magnetic field model <i>name</i> instead of the default <code>wmm2010</code>. See <a href="#MODELS">"MODELS"</a>.</p>
+<p>use magnetic field model <i>name</i> instead of the default <code>wmm2015</code>. See <a href="#MODELS">"MODELS"</a>.</p>
 
 </dd>
 <dt id="d"><b>-d</b></dt>
@@ -156,6 +156,9 @@
 <pre><code>    wmm2010, the World Magnetic Model 2010, which approximates the
       main magnetic field for the period 2010-2015.  See
       http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
+    wmm2015, the World Magnetic Model 2015, which approximates the
+      main magnetic field for the period 2015-2020.  See
+      http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
     igrf11, the International Geomagnetic Reference Field (11th
       generation) which approximates the main magnetic field for
       the period 1900-2015.  See
@@ -166,7 +169,7 @@
 
 <p>These models approximate the magnetic field due to the earth's core and (in the case of emm2010) its crust. They neglect magnetic fields due to the ionosphere, the magnetosphere, nearby magnetized materials, electrical machinery, etc.</p>
 
-<p>By default, the <code>wmm2010</code> magnetic model is used. This may changed by setting the environment variable <code>GEOGRAPHICLIB_MAGNETIC_NAME</code> or with the <b>-n</b> option.</p>
+<p>By default, the <code>wmm2015</code> magnetic model is used. This may changed by setting the environment variable <code>GEOGRAPHICLIB_MAGNETIC_NAME</code> or with the <b>-n</b> option.</p>
 
 <p>The magnetic models will be loaded from a directory specified at compile time. This may changed by setting the environment variables <code>GEOGRAPHICLIB_MAGNETIC_PATH</code> or <code>GEOGRAPHICLIB_DATA</code>, or with the <b>-d</b> option. The <b>-h</b> option prints the default magnetic path and name. Use the <b>-v</b> option to ascertain the full path name of the data file.</p>
 
@@ -179,7 +182,7 @@
 <dt id="GEOGRAPHICLIB_MAGNETIC_NAME"><b>GEOGRAPHICLIB_MAGNETIC_NAME</b></dt>
 <dd>
 
-<p>Override the compile-time default magnetic name of <code>wmm2010</code>. The <b>-h</b> option reports the value of <b>GEOGRAPHICLIB_MAGNETIC_NAME</b>, if defined, otherwise it reports the compile-time value. If the <b>-n</b> <i>name</i> option is used, then <i>name</i> takes precedence.</p>
+<p>Override the compile-time default magnetic name of <code>wmm2015</code>. The <b>-h</b> option reports the value of <b>GEOGRAPHICLIB_MAGNETIC_NAME</b>, if defined, otherwise it reports the compile-time value. If the <b>-n</b> <i>name</i> option is used, then <i>name</i> takes precedence.</p>
 
 </dd>
 <dt id="GEOGRAPHICLIB_MAGNETIC_PATH"><b>GEOGRAPHICLIB_MAGNETIC_PATH</b></dt>
@@ -202,11 +205,11 @@
 
 <h1 id="EXAMPLES">EXAMPLES</h1>
 
-<p>The magnetic field from WMM2010 in Timbuktu on 2012-01-01</p>
+<p>The magnetic field from WMM2015 in Timbuktu on 2016-01-01</p>
 
-<pre><code>    echo 2012-01-01 16:46:33N 3:00:34W 300 | MagneticField -r
-    => -2.55 12.43 33771.0 33737.6 -1500.5 7446.0 34582.1
-       0.10 -0.07 34.3 36.8 54.4 -35.3 25.9</code></pre>
+<pre><code>    echo 2016-01-01 16:46:33N 3:00:34W 300 | MagneticField -r
+    => -2.12 12.15 33871.9 33848.7 -1251.4 7293.9 34648.3
+       0.09 -0.08 31.8 33.8 53.7 -41.4 22.3</code></pre>
 
 <p>The first two numbers returned are the declination and inclination of the field. The second line gives the annual change.</p>
 
diff --git a/man/MagneticField.pod b/man/MagneticField.pod
index 7bbc580..369a0ac 100644
--- a/man/MagneticField.pod
+++ b/man/MagneticField.pod
@@ -55,7 +55,7 @@ The WGS84 ellipsoid is used, I<a> = 6378137 m, I<f> = 1/298.257223563.
 
 =item B<-n>
 
-use magnetic field model I<name> instead of the default C<wmm2010>.  See
+use magnetic field model I<name> instead of the default C<wmm2015>.  See
 L</MODELS>.
 
 =item B<-d>
@@ -151,6 +151,9 @@ following models
     wmm2010, the World Magnetic Model 2010, which approximates the
       main magnetic field for the period 2010-2015.  See
       http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
+    wmm2015, the World Magnetic Model 2015, which approximates the
+      main magnetic field for the period 2015-2020.  See
+      http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml
     igrf11, the International Geomagnetic Reference Field (11th
       generation) which approximates the main magnetic field for
       the period 1900-2015.  See
@@ -164,7 +167,7 @@ These models approximate the magnetic field due to the earth's core and
 the ionosphere, the magnetosphere, nearby magnetized materials,
 electrical machinery, etc.
 
-By default, the C<wmm2010> magnetic model is used.  This may changed by
+By default, the C<wmm2015> magnetic model is used.  This may changed by
 setting the environment variable C<GEOGRAPHICLIB_MAGNETIC_NAME> or with
 the B<-n> option.
 
@@ -185,7 +188,7 @@ L<http://geographiclib.sf.net/html/magnetic.html#magneticinst>.
 
 =item B<GEOGRAPHICLIB_MAGNETIC_NAME>
 
-Override the compile-time default magnetic name of C<wmm2010>.  The
+Override the compile-time default magnetic name of C<wmm2015>.  The
 B<-h> option reports the value of B<GEOGRAPHICLIB_MAGNETIC_NAME>, if
 defined, otherwise it reports the compile-time value.  If the B<-n>
 I<name> option is used, then I<name> takes precedence.
@@ -220,11 +223,11 @@ way.
 
 =head1 EXAMPLES
 
-The magnetic field from WMM2010 in Timbuktu on 2012-01-01
+The magnetic field from WMM2015 in Timbuktu on 2016-01-01
 
-    echo 2012-01-01 16:46:33N 3:00:34W 300 | MagneticField -r
-    => -2.55 12.43 33771.0 33737.6 -1500.5 7446.0 34582.1
-       0.10 -0.07 34.3 36.8 54.4 -35.3 25.9
+    echo 2016-01-01 16:46:33N 3:00:34W 300 | MagneticField -r
+    => -2.12 12.15 33871.9 33848.7 -1251.4 7293.9 34648.3
+       0.09 -0.08 31.8 33.8 53.7 -41.4 22.3
 
 The first two numbers returned are the declination and inclination of
 the field.  The second line gives the annual change.
diff --git a/man/MagneticField.usage b/man/MagneticField.usage
index bde21b3..e4c78ff 100644
--- a/man/MagneticField.usage
+++ b/man/MagneticField.usage
@@ -10,7 +10,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    MagneticField --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/MagneticField.1.html\n";
+"    http://geographiclib.sf.net/1.40/MagneticField.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -58,7 +58,7 @@ int usage(int retval, bool brief) {
 "       The WGS84 ellipsoid is used, a = 6378137 m, f = 1/298.257223563.\n"
 "\n"
 "OPTIONS\n"
-"       -n  use magnetic field model name instead of the default \"wmm2010\".\n"
+"       -n  use magnetic field model name instead of the default \"wmm2015\".\n"
 "           See \"MODELS\".\n"
 "\n"
 "       -d  read magnetic models from dir instead of the default.  See\n"
@@ -127,6 +127,9 @@ int usage(int retval, bool brief) {
 "           wmm2010, the World Magnetic Model 2010, which approximates the\n"
 "             main magnetic field for the period 2010-2015.  See\n"
 "             http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml\n"
+"           wmm2015, the World Magnetic Model 2015, which approximates the\n"
+"             main magnetic field for the period 2015-2020.  See\n"
+"             http://ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml\n"
 "           igrf11, the International Geomagnetic Reference Field (11th\n"
 "             generation) which approximates the main magnetic field for\n"
 "             the period 1900-2015.  See\n"
@@ -140,7 +143,7 @@ int usage(int retval, bool brief) {
 "       to the ionosphere, the magnetosphere, nearby magnetized materials,\n"
 "       electrical machinery, etc.\n"
 "\n"
-"       By default, the \"wmm2010\" magnetic model is used.  This may changed by\n"
+"       By default, the \"wmm2015\" magnetic model is used.  This may changed by\n"
 "       setting the environment variable \"GEOGRAPHICLIB_MAGNETIC_NAME\" or with\n"
 "       the -n option.\n"
 "\n"
@@ -156,7 +159,7 @@ int usage(int retval, bool brief) {
 "\n"
 "ENVIRONMENT\n"
 "       GEOGRAPHICLIB_MAGNETIC_NAME\n"
-"           Override the compile-time default magnetic name of \"wmm2010\".  The\n"
+"           Override the compile-time default magnetic name of \"wmm2015\".  The\n"
 "           -h option reports the value of GEOGRAPHICLIB_MAGNETIC_NAME, if\n"
 "           defined, otherwise it reports the compile-time value.  If the -n\n"
 "           name option is used, then name takes precedence.\n"
@@ -184,11 +187,11 @@ int usage(int retval, bool brief) {
 "       field (which may be inaccurate) is returned in the normal way.\n"
 "\n"
 "EXAMPLES\n"
-"       The magnetic field from WMM2010 in Timbuktu on 2012-01-01\n"
+"       The magnetic field from WMM2015 in Timbuktu on 2016-01-01\n"
 "\n"
-"           echo 2012-01-01 16:46:33N 3:00:34W 300 | MagneticField -r\n"
-"           => -2.55 12.43 33771.0 33737.6 -1500.5 7446.0 34582.1\n"
-"              0.10 -0.07 34.3 36.8 54.4 -35.3 25.9\n"
+"           echo 2016-01-01 16:46:33N 3:00:34W 300 | MagneticField -r\n"
+"           => -2.12 12.15 33871.9 33848.7 -1251.4 7293.9 34648.3\n"
+"              0.09 -0.08 31.8 33.8 53.7 -41.4 22.3\n"
 "\n"
 "       The first two numbers returned are the declination and inclination of\n"
 "       the field.  The second line gives the annual change.\n"
diff --git a/man/Planimeter.1 b/man/Planimeter.1
index c835217..4a57ea9 100644
--- a/man/Planimeter.1
+++ b/man/Planimeter.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "PLANIMETER 1"
-.TH PLANIMETER 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH PLANIMETER 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -307,10 +307,15 @@ covered by the data (assuming the edges of the image are geodesics).
 .Ve
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
-\&\fIGeoConvert\fR\|(1).  The algorithm for the area of geodesic polygon is
+\&\fIGeoConvert\fR\|(1), \fIGeodSolve\fR\|(1).
+.PP
+An online version of this utility is availbable at
+<http://geographiclib.sourceforge.net/cgi\-bin/Planimeter>.
+.PP
+The algorithm for the area of geodesic polygon is
 given in Section 6 of C. F. F. Karney, \fIAlgorithms for geodesics\fR,
 J. Geodesy 87, 43\-55 (2013);
-\&\s-1DOI \s0<http://dx.doi.org/10.1007/s00190\-012\-0578\-z>;
+\&\s-1DOI \s0<https://dx.doi.org/10.1007/s00190\-012\-0578\-z>;
 addenda: <http://geographiclib.sf.net/geod\-addenda.html>.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
diff --git a/man/Planimeter.1.html b/man/Planimeter.1.html
index eac96b9..8c25f13 100644
--- a/man/Planimeter.1.html
+++ b/man/Planimeter.1.html
@@ -173,7 +173,11 @@
 
 <h1 id="SEE-ALSO">SEE ALSO</h1>
 
-<p>GeoConvert(1). The algorithm for the area of geodesic polygon is given in Section 6 of C. F. F. Karney, <i>Algorithms for geodesics</i>, J. Geodesy 87, 43-55 (2013); DOI <a href="http://dx.doi.org/10.1007/s00190-012-0578-z">http://dx.doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">http://geographiclib.sf.net/geod-addenda.html</a>.</p>
+<p>GeoConvert(1), GeodSolve(1).</p>
+
+<p>An online version of this utility is availbable at <a href="http://geographiclib.sourceforge.net/cgi-bin/Planimeter">http://geographiclib.sourceforge.net/cgi-bin/Planimeter</a>.</p>
+
+<p>The algorithm for the area of geodesic polygon is given in Section 6 of C. F. F. Karney, <i>Algorithms for geodesics</i>, J. Geodesy 87, 43-55 (2013); DOI <a href="https://dx.doi.org/10.1007/s00190-012-0578-z">https://dx.doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="http://geographiclib.sf.net/geod-addenda.html">http://geographiclib.sf.net/geod-addenda.html</a>.</p>
 
 <h1 id="AUTHOR">AUTHOR</h1>
 
diff --git a/man/Planimeter.pod b/man/Planimeter.pod
index 58e143a..cd2ce66 100644
--- a/man/Planimeter.pod
+++ b/man/Planimeter.pod
@@ -189,10 +189,15 @@ covered by the data (assuming the edges of the image are geodesics).
 
 =head1 SEE ALSO
 
-GeoConvert(1).  The algorithm for the area of geodesic polygon is
+GeoConvert(1), GeodSolve(1).
+
+An online version of this utility is availbable at
+L<http://geographiclib.sourceforge.net/cgi-bin/Planimeter>.
+
+The algorithm for the area of geodesic polygon is
 given in Section 6 of C. F. F. Karney, I<Algorithms for geodesics>,
 J. Geodesy 87, 43-55 (2013);
-DOI L<http://dx.doi.org/10.1007/s00190-012-0578-z>;
+DOI L<https://dx.doi.org/10.1007/s00190-012-0578-z>;
 addenda: L<http://geographiclib.sf.net/geod-addenda.html>.
 
 =head1 AUTHOR
diff --git a/man/Planimeter.usage b/man/Planimeter.usage
index 1228a81..a964f05 100644
--- a/man/Planimeter.usage
+++ b/man/Planimeter.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    Planimeter --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/Planimeter.1.html\n";
+"    http://geographiclib.sf.net/1.40/Planimeter.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -167,10 +167,15 @@ int usage(int retval, bool brief) {
 "          ' | Planimeter | cut -f3 -d' '\n"
 "\n"
 "SEE ALSO\n"
-"       GeoConvert(1).  The algorithm for the area of geodesic polygon is given\n"
-"       in Section 6 of C. F. F. Karney, Algorithms for geodesics, J. Geodesy\n"
-"       87, 43-55 (2013); DOI <http://dx.doi.org/10.1007/s00190-012-0578-z>;\n"
-"       addenda: <http://geographiclib.sf.net/geod-addenda.html>.\n"
+"       GeoConvert(1), GeodSolve(1).\n"
+"\n"
+"       An online version of this utility is availbable at\n"
+"       <http://geographiclib.sourceforge.net/cgi-bin/Planimeter>.\n"
+"\n"
+"       The algorithm for the area of geodesic polygon is given in Section 6 of\n"
+"       C. F. F. Karney, Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);\n"
+"       DOI <https://dx.doi.org/10.1007/s00190-012-0578-z>; addenda:\n"
+"       <http://geographiclib.sf.net/geod-addenda.html>.\n"
 "\n"
 "AUTHOR\n"
 "       Planimeter was written by Charles Karney.\n"
diff --git a/man/RhumbSolve.1 b/man/RhumbSolve.1
index b2f38db..4ad176a 100644
--- a/man/RhumbSolve.1
+++ b/man/RhumbSolve.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RHUMBSOLVE 1"
-.TH RHUMBSOLVE 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH RHUMBSOLVE 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -335,6 +335,12 @@ Waypoints on the route at intervals of 2000km:
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 \&\fIGeoConvert\fR\|(1), \fIGeodSolve\fR\|(1), \fITransverseMercatorProj\fR\|(1).
+.PP
+An online version of this utility is availbable at
+<http://geographiclib.sourceforge.net/cgi\-bin/RhumbSolve>.
+.PP
+The Wikipedia page, Rhumb line,
+<https://en.wikipedia.org/wiki/Rhumb_line>.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 \&\fBRhumbSolve\fR was written by Charles Karney.
diff --git a/man/RhumbSolve.1.html b/man/RhumbSolve.1.html
index e936680..abb1c3f 100644
--- a/man/RhumbSolve.1.html
+++ b/man/RhumbSolve.1.html
@@ -186,6 +186,10 @@
 
 <p>GeoConvert(1), GeodSolve(1), TransverseMercatorProj(1).</p>
 
+<p>An online version of this utility is availbable at <a href="http://geographiclib.sourceforge.net/cgi-bin/RhumbSolve">http://geographiclib.sourceforge.net/cgi-bin/RhumbSolve</a>.</p>
+
+<p>The Wikipedia page, Rhumb line, <a href="https://en.wikipedia.org/wiki/Rhumb_line">https://en.wikipedia.org/wiki/Rhumb_line</a>.</p>
+
 <h1 id="AUTHOR">AUTHOR</h1>
 
 <p><b>RhumbSolve</b> was written by Charles Karney.</p>
diff --git a/man/RhumbSolve.pod b/man/RhumbSolve.pod
index d8ae8bd..1f28045 100644
--- a/man/RhumbSolve.pod
+++ b/man/RhumbSolve.pod
@@ -230,6 +230,12 @@ Waypoints on the route at intervals of 2000km:
 
 GeoConvert(1), GeodSolve(1), TransverseMercatorProj(1).
 
+An online version of this utility is availbable at
+L<http://geographiclib.sourceforge.net/cgi-bin/RhumbSolve>.
+
+The Wikipedia page, Rhumb line,
+L<https://en.wikipedia.org/wiki/Rhumb_line>.
+
 =head1 AUTHOR
 
 B<RhumbSolve> was written by Charles Karney.
diff --git a/man/RhumbSolve.usage b/man/RhumbSolve.usage
index bf75b2e..41ab0a3 100644
--- a/man/RhumbSolve.usage
+++ b/man/RhumbSolve.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    RhumbSolve --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/RhumbSolve.1.html\n";
+"    http://geographiclib.sf.net/1.40/RhumbSolve.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -192,6 +192,12 @@ int usage(int retval, bool brief) {
 "SEE ALSO\n"
 "       GeoConvert(1), GeodSolve(1), TransverseMercatorProj(1).\n"
 "\n"
+"       An online version of this utility is availbable at\n"
+"       <http://geographiclib.sourceforge.net/cgi-bin/RhumbSolve>.\n"
+"\n"
+"       The Wikipedia page, Rhumb line,\n"
+"       <https://en.wikipedia.org/wiki/Rhumb_line>.\n"
+"\n"
 "AUTHOR\n"
 "       RhumbSolve was written by Charles Karney.\n"
 "\n"
diff --git a/man/TransverseMercatorProj.1 b/man/TransverseMercatorProj.1
index 3bee655..bb5a251 100644
--- a/man/TransverseMercatorProj.1
+++ b/man/TransverseMercatorProj.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "TRANSVERSEMERCATORPROJ 1"
-.TH TRANSVERSEMERCATORPROJ 1 "2014-11-11" "GeographicLib 1.39" "GeographicLib Utilities"
+.TH TRANSVERSEMERCATORPROJ 1 "2014-12-18" "GeographicLib 1.40" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -266,7 +266,7 @@ terminate; following lines will be converted.
 The algorithms for the transverse Mercator projection are described in
 C. F. F. Karney, \fITransverse Mercator with an accuracy of a few
 nanometers\fR, J. Geodesy \fB85\fR(8), 475\-485 (Aug. 2011); \s-1DOI
-\&\s0<http://dx.doi.org/10.1007/s00190\-011\-0445\-3>; preprint
+\&\s0<https://dx.doi.org/10.1007/s00190\-011\-0445\-3>; preprint
 <http://arxiv.org/abs/1002.1417>.  The explanation of the extended
 domain of the projection with the \fB\-t\fR option is given in Section 5 of
 this paper.
diff --git a/man/TransverseMercatorProj.1.html b/man/TransverseMercatorProj.1.html
index 106d02f..d19c583 100644
--- a/man/TransverseMercatorProj.1.html
+++ b/man/TransverseMercatorProj.1.html
@@ -142,7 +142,7 @@
 
 <h1 id="SEE-ALSO">SEE ALSO</h1>
 
-<p>The algorithms for the transverse Mercator projection are described in C. F. F. Karney, <i>Transverse Mercator with an accuracy of a few nanometers</i>, J. Geodesy <b>85</b>(8), 475-485 (Aug. 2011); DOI <a href="http://dx.doi.org/10.1007/s00190-011-0445-3">http://dx.doi.org/10.1007/s00190-011-0445-3</a>; preprint <a href="http://arxiv.org/abs/1002.1417">http://arxiv.org/abs/1002.1417</a>. The explanation of the extended domain of the projection with the <b>-t</b> option is given in Se [...]
+<p>The algorithms for the transverse Mercator projection are described in C. F. F. Karney, <i>Transverse Mercator with an accuracy of a few nanometers</i>, J. Geodesy <b>85</b>(8), 475-485 (Aug. 2011); DOI <a href="https://dx.doi.org/10.1007/s00190-011-0445-3">https://dx.doi.org/10.1007/s00190-011-0445-3</a>; preprint <a href="http://arxiv.org/abs/1002.1417">http://arxiv.org/abs/1002.1417</a>. The explanation of the extended domain of the projection with the <b>-t</b> option is given in  [...]
 
 <h1 id="HISTORY">HISTORY</h1>
 
diff --git a/man/TransverseMercatorProj.pod b/man/TransverseMercatorProj.pod
index 2aa2ade..62220ef 100644
--- a/man/TransverseMercatorProj.pod
+++ b/man/TransverseMercatorProj.pod
@@ -151,7 +151,7 @@ B<TransverseMercatorProj> was written by Charles Karney.
 The algorithms for the transverse Mercator projection are described in
 C. F. F. Karney, I<Transverse Mercator with an accuracy of a few
 nanometers>, J. Geodesy B<85>(8), 475-485 (Aug. 2011); DOI
-L<http://dx.doi.org/10.1007/s00190-011-0445-3>; preprint
+L<https://dx.doi.org/10.1007/s00190-011-0445-3>; preprint
 L<http://arxiv.org/abs/1002.1417>.  The explanation of the extended
 domain of the projection with the B<-t> option is given in Section 5 of
 this paper.
diff --git a/man/TransverseMercatorProj.usage b/man/TransverseMercatorProj.usage
index d9cc7c4..c730ec2 100644
--- a/man/TransverseMercatorProj.usage
+++ b/man/TransverseMercatorProj.usage
@@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    TransverseMercatorProj --help\n"
 "or visit:\n"
-"    http://geographiclib.sf.net/1.39/TransverseMercatorProj.1.html\n";
+"    http://geographiclib.sf.net/1.40/TransverseMercatorProj.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -127,7 +127,7 @@ int usage(int retval, bool brief) {
 "       The algorithms for the transverse Mercator projection are described in\n"
 "       C. F. F. Karney, Transverse Mercator with an accuracy of a few\n"
 "       nanometers, J. Geodesy 85(8), 475-485 (Aug. 2011); DOI\n"
-"       <http://dx.doi.org/10.1007/s00190-011-0445-3>; preprint\n"
+"       <https://dx.doi.org/10.1007/s00190-011-0445-3>; preprint\n"
 "       <http://arxiv.org/abs/1002.1417>.  The explanation of the extended\n"
 "       domain of the projection with the -t option is given in Section 5 of\n"
 "       this paper.\n"
diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt
index d9d03c8..45cab20 100644
--- a/matlab/CMakeLists.txt
+++ b/matlab/CMakeLists.txt
@@ -21,14 +21,13 @@ install (FILES ${PRIVATE_MATLAB_FILES}
 # On Windows systems, need also to copy the shared library to where the
 # mex files live (in the build and install trees).
 if (MEX)
-  get_target_property (_LIBTYPE ${PROJECT_LIBRARIES} TYPE)
   if (MSVC)
     set (CMAKE_INSTALL_DEBUG_LIBRARIES ON)
     include (InstallRequiredSystemLibraries)
     install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
       DESTINATION ${INSTALL_MATLAB_DIR})
     add_custom_target (matlabinterface)
-    if (_LIBTYPE STREQUAL "SHARED_LIBRARY")
+    if (GEOGRAPHICLIB_SHARED_LIB)
       set (_LIB Geographic-i)
     else ()
       set (_LIB Geographic)
@@ -57,7 +56,7 @@ if (MEX)
       set_property (TARGET matlab-${TARGET} PROPERTY FOLDER matlab)
     else ()
       set (INTERFACE_LIST ${INTERFACE_LIST} ${TARGET_INTERFACE})
-      if (_LIBTYPE STREQUAL "SHARED_LIBRARY")
+      if (GEOGRAPHICLIB_SHARED_LIB)
         set (RPATH_OPTS -Wl,-rpath=${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
       endif ()
       add_custom_command (OUTPUT ${TARGET_INTERFACE}
@@ -76,7 +75,11 @@ if (MEX)
     install (PROGRAMS ${INTERFACE_LIST}
       DESTINATION ${INSTALL_MATLAB_DIR} CONFIGURATIONS Release)
   endif ()
-  if (MSVC AND _LIBTYPE STREQUAL "SHARED_LIBRARY")
+  if (MSVC AND GEOGRAPHICLIB_SHARED_LIB)
+    if (NOT CMAKE_VERSION VERSION_LESS 3.0)
+      # Suppress 3.0 warnings about use of the LOCATION target property
+      cmake_policy (SET CMP0026 OLD)
+    endif ()
     get_target_property (_LOC ${PROJECT_LIBRARIES} LOCATION_RELEASE)
     add_custom_command (TARGET matlabinterface POST_BUILD
       COMMAND ${CMAKE_COMMAND} -E copy ${_LOC} ./)
diff --git a/matlab/geodarea.m b/matlab/geodarea.m
index 1eea2dd..f0f7244 100644
--- a/matlab/geodarea.m
+++ b/matlab/geodarea.m
@@ -27,7 +27,7 @@ function [A, P, N] = geodarea(lats, lons, ellipsoid)
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 %   See also GEODDOC, GEODDISTANCE, GEODRECKON, POLYGONAREA,
diff --git a/matlab/geoddistance.m b/matlab/geoddistance.m
index f30132f..708de81 100644
--- a/matlab/geoddistance.m
+++ b/matlab/geoddistance.m
@@ -26,7 +26,7 @@ function [s12, azi1, azi2, S12, m12, M12, M21, a12] = geoddistance ...
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 %   This function duplicates some of the functionality of the DISTANCE
diff --git a/matlab/geoddoc.m b/matlab/geoddoc.m
index 415f587..ea886b5 100644
--- a/matlab/geoddoc.m
+++ b/matlab/geoddoc.m
@@ -7,7 +7,7 @@ function geoddoc
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 %   which, in turn, is based on the classic solution of the geodesic
diff --git a/matlab/geodesicdirect.m b/matlab/geodesicdirect.m
index 4e55756..d4ff5c5 100644
--- a/matlab/geodesicdirect.m
+++ b/matlab/geodesicdirect.m
@@ -29,7 +29,7 @@ function geodesicdirect(~, ~, ~)
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 % This is an interface to the GeographicLib C++ routine
diff --git a/matlab/geodesicinverse.m b/matlab/geodesicinverse.m
index cbe0309..f8be843 100644
--- a/matlab/geodesicinverse.m
+++ b/matlab/geodesicinverse.m
@@ -29,7 +29,7 @@ function geodesicinverse(~, ~, ~)
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 % This is an interface to the GeographicLib C++ routine
diff --git a/matlab/geodesicline.m b/matlab/geodesicline.m
index bd291a4..67b001c 100644
--- a/matlab/geodesicline.m
+++ b/matlab/geodesicline.m
@@ -32,7 +32,7 @@ function geodesicline(~, ~, ~, ~, ~, ~)
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 % This is an interface to the GeographicLib C++ routine
diff --git a/matlab/geodproj.m b/matlab/geodproj.m
index 9381259..26b8ef9 100644
--- a/matlab/geodproj.m
+++ b/matlab/geodproj.m
@@ -64,7 +64,7 @@ function geodproj
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 %   The parameters of the ellipsoid are specified by the optional ELLIPSOID
diff --git a/matlab/geodreckon.m b/matlab/geodreckon.m
index a810e5b..6e027de 100644
--- a/matlab/geodreckon.m
+++ b/matlab/geodreckon.m
@@ -52,7 +52,7 @@ function [lat2, lon2, azi2, S12, m12, M12, M21, a12_s12] = geodreckon ...
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 %   This function duplicates some of the functionality of the RECKON
diff --git a/matlab/geographiclibinterface.m b/matlab/geographiclibinterface.m
index 420a3f6..1bcfca4 100644
--- a/matlab/geographiclibinterface.m
+++ b/matlab/geographiclibinterface.m
@@ -17,12 +17,15 @@ function geographiclibinterface(incdir, libdir)
 % This has been tested with
 %
 %   Octave 3.2.3 and g++ 4.4.4 under Linux
+%   Octave 3.6.4 and g++ 4.8.3 under Linux
 %   Matlab 2007a and Visual Studio 2005 under Windows
 %   Matlab 2008a and Visual Studio 2005 under Windows
 %   Matlab 2008a and Visual Studio 2008 under Windows (*)
 %   Matlab 2010b and Visual Studio 2005 under Windows
 %   Matlab 2010b and Visual Studio 2008 under Windows (*)
 %   Matlab 2010b and Visual Studio 2010 under Windows
+%   Matlab 2013b and Visual Studio 2012 under Windows
+%   Matlab 2014b and Mac OSX 10.10 (Yosemite)
 %
 % (*) Note that geoidheight compiled with Visual Studio 2008 causes Matlab
 %     to CRASH.  The crash happens on the second call.
@@ -49,7 +52,7 @@ function geographiclibinterface(incdir, libdir)
   end
   if (nargin < 2)
     if (nargin == 0)
-      if ispc,
+      if ispc
         installdir = 'C:/Program Files/GeographicLib';
       else
         installdir = '/usr/local';
@@ -66,9 +69,9 @@ function geographiclibinterface(incdir, libdir)
   end
   fprintf('Compiling Matlab interface to GeographicLib\n');
   fprintf('Include directory: %s\nLibrary directory: %s\n', incdir, libdir);
-  for i=1:size(funs,2),
+  for i=1:size(funs,2)
     fprintf('Compiling %s...', funs{i});
-    if ispc,
+    if ispc || ismac
       mex( ['-I' incdir], ['-L' libdir], ['-l' lib], [funs{i} '.cpp'] );
     else
       mex( ['-I' incdir], ['-L' libdir], ['-l' lib], ['-Wl,-rpath=' libdir], ...
diff --git a/matlab/gnomonic_fwd.m b/matlab/gnomonic_fwd.m
index e0f4d1c..3608239 100644
--- a/matlab/gnomonic_fwd.m
+++ b/matlab/gnomonic_fwd.m
@@ -34,7 +34,7 @@ function [x, y, azi, rk] = gnomonic_fwd(lat0, lon0, lat, lon, ellipsoid)
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 %   which also includes methods for solving the "intersection" and
diff --git a/matlab/gnomonic_inv.m b/matlab/gnomonic_inv.m
index 58973db..9cb0e72 100644
--- a/matlab/gnomonic_inv.m
+++ b/matlab/gnomonic_inv.m
@@ -35,7 +35,7 @@ function [lat, lon, azi, rk] = gnomonic_inv(lat0, lon0, x, y, ellipsoid)
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 %   which also includes methods for solving the "intersection" and
diff --git a/matlab/polygonarea.m b/matlab/polygonarea.m
index 0c23da4..036a962 100644
--- a/matlab/polygonarea.m
+++ b/matlab/polygonarea.m
@@ -25,7 +25,7 @@ function polygonarea(~, ~, ~)
 %
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
-%     http://dx.doi.org/10.1007/s00190-012-0578-z
+%     https://dx.doi.org/10.1007/s00190-012-0578-z
 %     Addenda: http://geographiclib.sf.net/geod-addenda.html
 %
 % This is an interface to the GeographicLib C++ class
diff --git a/maxima/geod.mac b/maxima/geod.mac
index 445dd7e..929a5d3 100644
--- a/maxima/geod.mac
+++ b/maxima/geod.mac
@@ -9,7 +9,7 @@ References:
 
    Charles F. F. Karney,
    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
-   http://dx.doi.org/10.1007/s00190-012-0578-z
+   https://dx.doi.org/10.1007/s00190-012-0578-z
    Addenda: http://geographiclib.sf.net/geod-addenda.html
 
 There are 4 sections in this file
@@ -93,7 +93,7 @@ Then the Lagrange Inversion Theorem
    J. L. Lagrange, Nouvelle methode pour resoudre les equations
    litterales par le moyen des series, Mem. de l'Acad. Roy. des Sciences
    de Berlin 24, 251-326 (1768, publ. 1770), Sec. 16,
-   http://books.google.com/books?id=YywPAAAAIAAJ&pg=PA25
+   https://books.google.com/books?id=YywPAAAAIAAJ&pg=PA25
 
 gives
 
diff --git a/maxima/geodesic.mac b/maxima/geodesic.mac
index 4be3538..e1c078c 100644
--- a/maxima/geodesic.mac
+++ b/maxima/geodesic.mac
@@ -9,7 +9,7 @@ References:
 
    Charles F. F. Karney,
    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
-   http://dx.doi.org/10.1007/s00190-012-0578-z
+   https://dx.doi.org/10.1007/s00190-012-0578-z
    Addenda: http://geographiclib.sf.net/geod-addenda.html
 
 This program solves the geodesic problem either using series expansions
diff --git a/pom.xml b/pom.xml
index 5e45a6b..31234c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,12 +8,12 @@
   <parent>
     <groupId>com.sri.vt.majic</groupId>
     <artifactId>majic-parent</artifactId>
-    <version>0.2.1-SNAPSHOT</version>
+    <version>0.2.3</version>
   </parent>
 
   <groupId>com.sri.vt</groupId>
   <artifactId>geographiclib</artifactId>
-  <version>1.39-SNAPSHOT</version>
+  <version>1.40-SNAPSHOT</version>
   <packaging>majic-cmake</packaging>
   <name>GeographicLib</name>
 
diff --git a/python/geographiclib/geodesic.py b/python/geographiclib/geodesic.py
index 39dc02c..23ccd1c 100644
--- a/python/geographiclib/geodesic.py
+++ b/python/geographiclib/geodesic.py
@@ -10,7 +10,7 @@
 #
 #    Charles F. F. Karney,
 #    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
-#    http://dx.doi.org/10.1007/s00190-012-0578-z
+#    https://dx.doi.org/10.1007/s00190-012-0578-z
 #    Addenda: http://geographiclib.sf.net/geod-addenda.html
 #
 # Copyright (c) Charles Karney (2011-2014) <charles at karney.com> and licensed
@@ -569,7 +569,8 @@ class Geodesic(object):
         # Update spherical estimate of alp1 using omg12 instead of lam12
         salp1 = cbet2 * somg12
         calp1 = sbet12a - cbet2 * sbet1 * Math.sq(somg12) / (1 - comg12)
-    if salp1 > 0:               # Sanity check on starting guess
+    # Sanity check on starting guess.  Backwards check allows NaN through.
+    if not (salp1 <= 0):
       salp1, calp1 = Geodesic.SinCosNorm(salp1, calp1)
     else:
       salp1 = 1; calp1 = 0
diff --git a/python/geographiclib/geodesicline.py b/python/geographiclib/geodesicline.py
index 2872e28..1d1dce8 100644
--- a/python/geographiclib/geodesicline.py
+++ b/python/geographiclib/geodesicline.py
@@ -10,7 +10,7 @@
 #
 #    Charles F. F. Karney,
 #    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
-#    http://dx.doi.org/10.1007/s00190-012-0578-z
+#    https://dx.doi.org/10.1007/s00190-012-0578-z
 #    Addenda: http://geographiclib.sf.net/geod-addenda.html
 #
 # Copyright (c) Charles Karney (2011-2014) <charles at karney.com> and licensed
diff --git a/python/geographiclib/polygonarea.py b/python/geographiclib/polygonarea.py
index 070a918..533e36c 100644
--- a/python/geographiclib/polygonarea.py
+++ b/python/geographiclib/polygonarea.py
@@ -10,7 +10,7 @@
 #
 #    Charles F. F. Karney,
 #    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
-#    http://dx.doi.org/10.1007/s00190-012-0578-z
+#    https://dx.doi.org/10.1007/s00190-012-0578-z
 #    Addenda: http://geographiclib.sf.net/geod-addenda.html
 #
 # Copyright (c) Charles Karney (2011-2014) <charles at karney.com> and licensed
diff --git a/python/setup.py b/python/setup.py
index 253e92e..8cdad36 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -15,7 +15,7 @@
 from distutils.core import setup
 
 setup(name="geographiclib",
-      version="1.39",
+      version="1.40",
       description=
         "A translation of the GeographicLib::Geodesic class to Python",
       author="Charles Karney",
diff --git a/src/EllipticFunction.cpp b/src/EllipticFunction.cpp
index eba6c61..7540cc0 100644
--- a/src/EllipticFunction.cpp
+++ b/src/EllipticFunction.cpp
@@ -79,15 +79,18 @@ namespace GeographicLib {
   }
 
   Math::real EllipticFunction::RC(real x, real y) {
+    // Defined only for y != 0 and x >= 0.
     return ( !(x >= y) ?        // x < y  and catch nans
              // http://dlmf.nist.gov/19.2.E18
              atan(sqrt((y - x) / x)) / sqrt(y - x) :
-             ( x == y && y > 0 ? 1 / sqrt(y) :
-               Math::atanh( y > 0 ?
+             ( x == y ? 1 / sqrt(y) :
+               Math::asinh( y > 0 ?
                             // http://dlmf.nist.gov/19.2.E19
-                            sqrt((x - y) / x) :
+                            // atanh(sqrt((x - y) / x))
+                            sqrt((x - y) / y) :
                             // http://dlmf.nist.gov/19.2.E20
-                            sqrt(x / (x - y)) ) / sqrt(x - y) ) );
+                            // atanh(sqrt(x / (x - y)))
+                            sqrt(-x / y) ) / sqrt(x - y) ) );
   }
 
   Math::real EllipticFunction::RG(real x, real y, real z) {
@@ -350,7 +353,7 @@ namespace GeographicLib {
 
   Math::real EllipticFunction::D(real sn, real cn, real dn) const {
     // Carlson, eq. 4.8 and
-    // http://dlmf.nist.gov/19.25.E5
+    // http://dlmf.nist.gov/19.25.E13
     real di = abs(sn) * sn*sn * RD(cn*cn, dn*dn, 1) / 3;
     // Enforce usual trig-like symmetries
     if (cn < 0)
@@ -361,8 +364,8 @@ namespace GeographicLib {
   }
 
   Math::real EllipticFunction::Pi(real sn, real cn, real dn) const {
-    // Carlson, eq. 4.5 and
-    // http://dlmf.nist.gov/19.25.E5
+    // Carlson, eq. 4.7 and
+    // http://dlmf.nist.gov/19.25.E14
     real
       cn2 = cn*cn, dn2 = dn*dn, sn2 = sn*sn,
       pii = abs(sn) * (RF(cn2, dn2, 1) +
diff --git a/src/Geodesic.cpp b/src/Geodesic.cpp
index a428ae4..d62e518 100644
--- a/src/Geodesic.cpp
+++ b/src/Geodesic.cpp
@@ -710,7 +710,8 @@ namespace GeographicLib {
         calp1 = sbet12a - cbet2 * sbet1 * Math::sq(somg12) / (1 - comg12);
       }
     }
-    if (salp1 > 0)              // Sanity check on starting guess
+    // Sanity check on starting guess.  Backwards check allows NaN through.
+    if (!(salp1 <= 0))
       SinCosNorm(salp1, calp1);
     else {
       salp1 = 1; calp1 = 0;
diff --git a/src/GeodesicExact.cpp b/src/GeodesicExact.cpp
index 47479e7..3912a24 100644
--- a/src/GeodesicExact.cpp
+++ b/src/GeodesicExact.cpp
@@ -721,7 +721,8 @@ namespace GeographicLib {
         calp1 = sbet12a - cbet2 * sbet1 * Math::sq(somg12) / (1 - comg12);
       }
     }
-    if (salp1 > 0)              // Sanity check on starting guess
+    // Sanity check on starting guess.  Backwards check allows NaN through.
+    if (!(salp1 <= 0))
       SinCosNorm(salp1, calp1);
     else {
       salp1 = 1; calp1 = 0;
diff --git a/src/GeographicLib.pro b/src/GeographicLib.pro
index 0d3e8e0..aea8873 100644
--- a/src/GeographicLib.pro
+++ b/src/GeographicLib.pro
@@ -1,4 +1,4 @@
-VERSION = 14.0.0
+VERSION = 14.0.1
 
 TEMPLATE = lib
 
diff --git a/src/MagneticModel.cpp b/src/MagneticModel.cpp
index e50c381..3be2255 100644
--- a/src/MagneticModel.cpp
+++ b/src/MagneticModel.cpp
@@ -22,7 +22,7 @@
 #endif
 
 #if !defined(GEOGRAPHICLIB_MAGNETIC_DEFAULT_NAME)
-#  define GEOGRAPHICLIB_MAGNETIC_DEFAULT_NAME "wmm2010"
+#  define GEOGRAPHICLIB_MAGNETIC_DEFAULT_NAME "wmm2015"
 #endif
 
 #if defined(_MSC_VER)
diff --git a/src/OSGB.cpp b/src/OSGB.cpp
index 1b83f45..b0d4298 100644
--- a/src/OSGB.cpp
+++ b/src/OSGB.cpp
@@ -2,7 +2,7 @@
  * \file OSGB.cpp
  * \brief Implementation for GeographicLib::OSGB class
  *
- * Copyright (c) Charles Karney (2010-2012) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2010-2014) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
  * http://geographiclib.sourceforge.net/
  **********************************************************************/
@@ -23,17 +23,12 @@ namespace GeographicLib {
     return osgbtm;
   }
 
-  Math::real OSGB::northoffset_ = 0;
-  bool OSGB::init_ = false;
-
   Math::real OSGB::computenorthoffset() {
-    if (!init_) {
-      real x, y;
-      OSGBTM().Forward(real(0), OriginLatitude(), real(0), x, y);
-      northoffset_ = FalseNorthing() - y;
-      init_ = true;
-    }
-    return northoffset_;
+    real x, y;
+    static const real northoffset =
+      ( OSGBTM().Forward(real(0), OriginLatitude(), real(0), x, y),
+        FalseNorthing() - y );
+    return northoffset;
   }
 
   void OSGB::GridReference(real x, real y, int prec, std::string& gridref) {
@@ -42,10 +37,14 @@ namespace GeographicLib {
       throw GeographicErr("OSGB precision " + Utility::str(prec)
                           + " not in [0, "
                           + Utility::str(int(maxprec_)) + "]");
+    if (Math::isnan(x) || Math::isnan(y)) {
+      gridref = "INVALID";
+      return;
+    }
     char grid[2 + 2 * maxprec_];
     int
-      xh = int(floor(x)) / tile_,
-      yh = int(floor(y)) / tile_;
+      xh = int(floor(x / tile_)),
+      yh = int(floor(y / tile_));
     real
       xf = x - tile_ * xh,
       yf = y - tile_ * yh;
@@ -90,6 +89,13 @@ namespace GeographicLib {
     int
       len = int(gridref.size()),
       p = 0;
+    if (len >= 2 &&
+        toupper(gridref[0]) == 'I' &&
+        toupper(gridref[1]) == 'N') {
+      x = y = Math::NaN();
+      prec = -2;                // For compatibility with MGRS::Reverse.
+      return;
+    }
     char grid[2 + 2 * maxprec_];
     for (int i = 0; i < len; ++i) {
       if (!isspace(gridref[i])) {
@@ -145,13 +151,13 @@ namespace GeographicLib {
   void OSGB::CheckCoords(real x, real y) {
     // Limits are all multiples of 100km and are all closed on the lower end
     // and open on the upper end -- and this is reflected in the error
-    // messages.
-    if (! (x >= minx_ && x < maxx_) )
+    // messages.  NaNs are let through.
+    if (x < minx_ || x >= maxx_)
       throw GeographicErr("Easting " + Utility::str(int(floor(x/1000)))
                           + "km not in OSGB range ["
                           + Utility::str(minx_/1000) + "km, "
                           + Utility::str(maxx_/1000) + "km)");
-    if (! (y >= miny_ && y < maxy_) )
+    if (y < miny_ || y >= maxy_)
       throw GeographicErr("Northing " + Utility::str(int(floor(y/1000)))
                           + "km not in OSGB range ["
                           + Utility::str(miny_/1000) + "km, "
diff --git a/src/TransverseMercatorExact.cpp b/src/TransverseMercatorExact.cpp
index 9be13a5..66dc062 100644
--- a/src/TransverseMercatorExact.cpp
+++ b/src/TransverseMercatorExact.cpp
@@ -7,7 +7,7 @@
  * http://geographiclib.sourceforge.net/
  *
  * The relevant section of Lee's paper is part V, pp 67--101,
- * <a href="http://dx.doi.org/10.3138/X687-1574-4325-WM62">Conformal
+ * <a href="https://dx.doi.org/10.3138/X687-1574-4325-WM62">Conformal
  * Projections Based On Jacobian Elliptic Functions</a>.
  *
  * The method entails using the Thompson Transverse Mercator as an
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index ef7664a..542e9bb 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -170,6 +170,11 @@ add_test (NAME GeodSolve13 COMMAND
 set_tests_properties (GeodSolve12 GeodSolve13
   PROPERTIES PASS_REGULAR_EXPRESSION "120\\.27.* 105\\.15.* 266\\.7")
 
+# Check fix for inverse ignoring lon12 = nan
+add_test (NAME GeodSolve14 COMMAND GeodSolve -i --input-string "0 0 1 nan")
+set_tests_properties (GeodSolve14
+  PROPERTIES PASS_REGULAR_EXPRESSION "nan nan nan")
+
 # Check fix for pole-encircling bug found 2011-03-16
 add_test (NAME Planimeter0
   COMMAND Planimeter --input-string "89 0;89 90;89 180;89 270")
diff --git a/tools/geographiclib-get-geoids.sh b/tools/geographiclib-get-geoids.sh
index 13f506c..7290eb2 100644
--- a/tools/geographiclib-get-geoids.sh
+++ b/tools/geographiclib-get-geoids.sh
@@ -140,7 +140,7 @@ while test $# -gt 0; do
 	    all )
 		cat $TEMP/all
 		;;
-	    minimal )		# same as no argument
+	    minimal )
 		echo egm96-5
 		;;
 	    best )		# highest resolution models
diff --git a/tools/geographiclib-get-gravity.sh b/tools/geographiclib-get-gravity.sh
index d9534c3..68547db 100644
--- a/tools/geographiclib-get-gravity.sh
+++ b/tools/geographiclib-get-gravity.sh
@@ -129,7 +129,7 @@ while test $# -gt 0; do
 	    all )
 		cat $TEMP/all
 		;;
-	    minimal )		# same as no argument
+	    minimal )
 		echo egm96; echo wgs84
 		;;
 	    * )
diff --git a/tools/geographiclib-get-magnetic.sh b/tools/geographiclib-get-magnetic.sh
index 75bbd01..1dc613f 100644
--- a/tools/geographiclib-get-magnetic.sh
+++ b/tools/geographiclib-get-magnetic.sh
@@ -25,6 +25,7 @@ table:
                                   size (kB)
   name     degree    years      tar.bz2  disk
   wmm2010    12    2010-2015      2       3
+  wmm2015    12    2015-2020      2       3
   igrf11     13    1900-2015      7      25
   emm2010   740    2010-2015    3700    4400
 
@@ -32,7 +33,7 @@ The size columns give the download and installed sizes of the datasets.
 In addition you can specify
 
   all = all of the supported magnetic models
-  minimal = wmm2010 igrf11
+  minimal = wmm2015 igrf11
 
 -p parentdir (default $DEFAULTDIR) specifies where the
 datasets should be stored.  The "Default $NAME path" listed when running
@@ -112,6 +113,7 @@ set -e
 
 cat > $TEMP/all <<EOF
 wmm2010
+wmm2015
 emm2010
 igrf11
 EOF
@@ -124,8 +126,8 @@ while test $# -gt 0; do
 	    all )
 		cat $TEMP/all
 		;;
-	    minimal )		# same as no argument
-		echo wmm2010; echo igrf11
+	    minimal )
+		echo wmm2015; echo igrf11
 		;;
 	    * )
 		echo Unknown magnetic model $1 1>&2
diff --git a/windows/Geographic-vc13n.vcxproj b/windows/Geographic-vc13n.vcxproj
new file mode 100644
index 0000000..6516063
--- /dev/null
+++ b/windows/Geographic-vc13n.vcxproj
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}</ProjectGuid>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <Keyword>ManagedCProj</Keyword>
+    <RootNamespace>Geographic</RootNamespace>
+    <ProjectName>Geographic</ProjectName>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CLRSupport>false</CLRSupport>
+    <CharacterSet>NotSet</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CLRSupport>false</CLRSupport>
+    <CharacterSet>NotSet</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CLRSupport>false</CLRSupport>
+    <CharacterSet>NotSet</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CLRSupport>false</CLRSupport>
+    <CharacterSet>NotSet</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <TargetName>$(ProjectName)_d</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <TargetName>$(ProjectName)_d</TargetName>
+    <OutDir>$(SolutionDir)$(Configuration)64\</OutDir>
+    <IntDir>$(Configuration)64\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>$(SolutionDir)$(Configuration)64\</OutDir>
+    <IntDir>$(Configuration)64\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>
+      </AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>
+      </AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>
+      </AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>
+      </AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="../include/GeographicLib/Accumulator.hpp" />
+    <ClInclude Include="../include/GeographicLib/AlbersEqualArea.hpp" />
+    <ClInclude Include="../include/GeographicLib/AzimuthalEquidistant.hpp" />
+    <ClInclude Include="../include/GeographicLib/CassiniSoldner.hpp" />
+    <ClInclude Include="../include/GeographicLib/CircularEngine.hpp" />
+    <ClInclude Include="../include/GeographicLib/Constants.hpp" />
+    <ClInclude Include="../include/GeographicLib/DMS.hpp" />
+    <ClInclude Include="../include/GeographicLib/Ellipsoid.hpp" />
+    <ClInclude Include="../include/GeographicLib/EllipticFunction.hpp" />
+    <ClInclude Include="../include/GeographicLib/GeoCoords.hpp" />
+    <ClInclude Include="../include/GeographicLib/Geocentric.hpp" />
+    <ClInclude Include="../include/GeographicLib/Geodesic.hpp" />
+    <ClInclude Include="../include/GeographicLib/GeodesicExact.hpp" />
+    <ClInclude Include="../include/GeographicLib/GeodesicLine.hpp" />
+    <ClInclude Include="../include/GeographicLib/GeodesicLineExact.hpp" />
+    <ClInclude Include="../include/GeographicLib/Geohash.hpp" />
+    <ClInclude Include="../include/GeographicLib/Geoid.hpp" />
+    <ClInclude Include="../include/GeographicLib/Gnomonic.hpp" />
+    <ClInclude Include="../include/GeographicLib/GravityCircle.hpp" />
+    <ClInclude Include="../include/GeographicLib/GravityModel.hpp" />
+    <ClInclude Include="../include/GeographicLib/LambertConformalConic.hpp" />
+    <ClInclude Include="../include/GeographicLib/LocalCartesian.hpp" />
+    <ClInclude Include="../include/GeographicLib/MGRS.hpp" />
+    <ClInclude Include="../include/GeographicLib/MagneticCircle.hpp" />
+    <ClInclude Include="../include/GeographicLib/MagneticModel.hpp" />
+    <ClInclude Include="../include/GeographicLib/Math.hpp" />
+    <ClInclude Include="../include/GeographicLib/NormalGravity.hpp" />
+    <ClInclude Include="../include/GeographicLib/OSGB.hpp" />
+    <ClInclude Include="../include/GeographicLib/PolarStereographic.hpp" />
+    <ClInclude Include="../include/GeographicLib/PolygonArea.hpp" />
+    <ClInclude Include="../include/GeographicLib/Rhumb.hpp" />
+    <ClInclude Include="../include/GeographicLib/SphericalEngine.hpp" />
+    <ClInclude Include="../include/GeographicLib/SphericalHarmonic.hpp" />
+    <ClInclude Include="../include/GeographicLib/SphericalHarmonic1.hpp" />
+    <ClInclude Include="../include/GeographicLib/SphericalHarmonic2.hpp" />
+    <ClInclude Include="../include/GeographicLib/TransverseMercator.hpp" />
+    <ClInclude Include="../include/GeographicLib/TransverseMercatorExact.hpp" />
+    <ClInclude Include="../include/GeographicLib/UTMUPS.hpp" />
+    <ClInclude Include="../include/GeographicLib/Utility.hpp" />
+    <ClInclude Include="../include/GeographicLib/Config.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="../src/Accumulator.cpp" />
+    <ClCompile Include="../src/AlbersEqualArea.cpp" />
+    <ClCompile Include="../src/AzimuthalEquidistant.cpp" />
+    <ClCompile Include="../src/CassiniSoldner.cpp" />
+    <ClCompile Include="../src/CircularEngine.cpp" />
+    <ClCompile Include="../src/DMS.cpp" />
+    <ClCompile Include="../src/Ellipsoid.cpp" />
+    <ClCompile Include="../src/EllipticFunction.cpp" />
+    <ClCompile Include="../src/GeoCoords.cpp" />
+    <ClCompile Include="../src/Geocentric.cpp" />
+    <ClCompile Include="../src/Geodesic.cpp" />
+    <ClCompile Include="../src/GeodesicExact.cpp" />
+    <ClCompile Include="../src/GeodesicExactC4.cpp" />
+    <ClCompile Include="../src/GeodesicLine.cpp" />
+    <ClCompile Include="../src/GeodesicLineExact.cpp" />
+    <ClCompile Include="../src/Geohash.cpp" />
+    <ClCompile Include="../src/Geoid.cpp" />
+    <ClCompile Include="../src/Gnomonic.cpp" />
+    <ClCompile Include="../src/GravityCircle.cpp" />
+    <ClCompile Include="../src/GravityModel.cpp" />
+    <ClCompile Include="../src/LambertConformalConic.cpp" />
+    <ClCompile Include="../src/LocalCartesian.cpp" />
+    <ClCompile Include="../src/MGRS.cpp" />
+    <ClCompile Include="../src/MagneticCircle.cpp" />
+    <ClCompile Include="../src/MagneticModel.cpp" />
+    <ClCompile Include="../src/NormalGravity.cpp" />
+    <ClCompile Include="../src/OSGB.cpp" />
+    <ClCompile Include="../src/PolarStereographic.cpp" />
+    <ClCompile Include="../src/PolygonArea.cpp" />
+    <ClCompile Include="../src/Rhumb.cpp" />
+    <ClCompile Include="../src/SphericalEngine.cpp" />
+    <ClCompile Include="../src/TransverseMercator.cpp" />
+    <ClCompile Include="../src/TransverseMercatorExact.cpp" />
+    <ClCompile Include="../src/UTMUPS.cpp" />
+    <ClCompile Include="../src/Utility.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/windows/NETGeographic-vc10.sln b/windows/NETGeographic-vc10.sln
new file mode 100644
index 0000000..9bbe5b0
--- /dev/null
+++ b/windows/NETGeographic-vc10.sln
@@ -0,0 +1,59 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NETGeographic", "NETGeographic-vc10.vcxproj", "{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1} = {4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}
+	EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Projections", "..\dotnet\Projections\Projections.csproj", "{74B48389-E1D1-491F-B198-ADD4878C3F2B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geographic", "Geographic-vc10.vcxproj", "{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|Win32.Build.0 = Debug|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|x64.ActiveCfg = Debug|x64
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|x64.Build.0 = Debug|x64
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|x86.ActiveCfg = Debug|x64
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|Win32.ActiveCfg = Release|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|Win32.Build.0 = Release|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|x64.ActiveCfg = Release|x64
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|x64.Build.0 = Release|x64
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|x86.ActiveCfg = Release|x64
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|Win32.ActiveCfg = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|Win32.Build.0 = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|x64.ActiveCfg = Debug|x64
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|x64.Build.0 = Debug|x64
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|x86.ActiveCfg = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|x86.Build.0 = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|Win32.ActiveCfg = Release|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|Win32.Build.0 = Release|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|x64.ActiveCfg = Release|x64
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|x64.Build.0 = Release|x64
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|x86.ActiveCfg = Release|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|x86.Build.0 = Release|x86
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|Win32.Build.0 = Debug|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|x64.ActiveCfg = Debug|x64
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|x64.Build.0 = Debug|x64
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|x86.ActiveCfg = Debug|x64
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|Win32.ActiveCfg = Release|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|Win32.Build.0 = Release|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|x64.ActiveCfg = Release|x64
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|x64.Build.0 = Release|x64
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|x86.ActiveCfg = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/windows/NETGeographic-vc13.sln b/windows/NETGeographic-vc13.sln
new file mode 100644
index 0000000..b84d4f2
--- /dev/null
+++ b/windows/NETGeographic-vc13.sln
@@ -0,0 +1,76 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30723.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NETGeographic", "NETGeographic-vc13.vcxproj", "{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Projections-vs13", "..\dotnet\Projections\Projections-vs13.csproj", "{74B48389-E1D1-491F-B198-ADD4878C3F2B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geographic", "Geographic-vc13n.vcxproj", "{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Mixed Platforms = Debug|Mixed Platforms
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Mixed Platforms = Release|Mixed Platforms
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|Mixed Platforms.Build.0 = Debug|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|Win32.Build.0 = Debug|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|x64.ActiveCfg = Debug|x64
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|x64.Build.0 = Debug|x64
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|x86.ActiveCfg = Debug|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Debug|x86.Build.0 = Debug|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|Mixed Platforms.Build.0 = Release|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|Win32.ActiveCfg = Release|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|Win32.Build.0 = Release|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|x64.ActiveCfg = Release|x64
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|x64.Build.0 = Release|x64
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|x86.ActiveCfg = Release|Win32
+		{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}.Release|x86.Build.0 = Release|Win32
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|Win32.ActiveCfg = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|Win32.Build.0 = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|x64.ActiveCfg = Debug|x64
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|x64.Build.0 = Debug|x64
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|x86.ActiveCfg = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Debug|x86.Build.0 = Debug|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|Mixed Platforms.Build.0 = Release|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|Win32.ActiveCfg = Release|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|Win32.Build.0 = Release|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|x64.ActiveCfg = Release|x64
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|x64.Build.0 = Release|x64
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|x86.ActiveCfg = Release|x86
+		{74B48389-E1D1-491F-B198-ADD4878C3F2B}.Release|x86.Build.0 = Release|x86
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|Mixed Platforms.Build.0 = Debug|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|Win32.Build.0 = Debug|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|x64.ActiveCfg = Debug|x64
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|x64.Build.0 = Debug|x64
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|x86.ActiveCfg = Debug|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Debug|x86.Build.0 = Debug|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|Mixed Platforms.Build.0 = Release|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|Win32.ActiveCfg = Release|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|Win32.Build.0 = Release|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|x64.ActiveCfg = Release|x64
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|x64.Build.0 = Release|x64
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|x86.ActiveCfg = Release|Win32
+		{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}.Release|x86.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/windows/NETGeographic-vc13.vcxproj b/windows/NETGeographic-vc13.vcxproj
new file mode 100644
index 0000000..f6392e7
--- /dev/null
+++ b/windows/NETGeographic-vc13.vcxproj
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{BC1ADBEC-537D-487E-AF21-8B7025AAF46D}</ProjectGuid>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <Keyword>ManagedCProj</Keyword>
+    <RootNamespace>NETGeographic</RootNamespace>
+    <ProjectName>NETGeographic</ProjectName>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CLRSupport>true</CLRSupport>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CLRSupport>true</CLRSupport>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CLRSupport>true</CLRSupport>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CLRSupport>true</CLRSupport>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+    <TargetName>$(ProjectName)_d</TargetName>
+    <IntDir>$(Configuration)\dotnet\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <TargetName>$(ProjectName)_d</TargetName>
+    <OutDir>$(SolutionDir)$(Configuration)64\</OutDir>
+    <IntDir>$(Configuration)64\dotnet\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <IntDir>$(Configuration)\dotnet\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>$(SolutionDir)$(Configuration)64\</OutDir>
+    <IntDir>$(Configuration)64\dotnet\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <AdditionalIncludeDirectories>../include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Geographic_d.lib</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <AdditionalIncludeDirectories>..\include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Geographic_d.lib</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <AdditionalIncludeDirectories>..\include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Geographic.lib</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level4</WarningLevel>
+      <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <AdditionalIncludeDirectories>..\include</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>Geographic.lib</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="../dotnet/NETGeographicLib/Accumulator.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/AlbersEqualArea.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/AzimuthalEquidistant.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/CassiniSoldner.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/CircularEngine.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/DMS.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/Ellipsoid.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/EllipticFunction.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/Geocentric.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/GeoCoords.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/Geodesic.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/GeodesicExact.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/GeodesicLine.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/GeodesicLineExact.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/Geohash.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/Geoid.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/Gnomonic.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/GravityCircle.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/GravityModel.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/LambertConformalConic.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/LocalCartesian.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/MagneticCircle.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/MagneticModel.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/MGRS.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/NETGeographicLib.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/NormalGravity.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/OSGB.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/PolarStereographic.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/PolygonArea.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/SphericalCoefficients.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/SphericalHarmonic.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/SphericalHarmonic1.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/SphericalHarmonic2.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/Stdafx.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/TransverseMercator.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/TransverseMercatorExact.h" />
+    <ClInclude Include="../dotnet/NETGeographicLib/UTMUPS.h" />
+    <ClInclude Include="..\dotnet\NETGeographicLib\Rhumb.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="../dotnet/NETGeographicLib/Accumulator.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/AlbersEqualArea.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/AssemblyInfo.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/AzimuthalEquidistant.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/CassiniSoldner.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/CircularEngine.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/DMS.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/Ellipsoid.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/EllipticFunction.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/Geocentric.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/GeoCoords.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/Geodesic.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/GeodesicExact.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/GeodesicLine.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/GeodesicLineExact.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/Geohash.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/Geoid.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/Gnomonic.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/GravityCircle.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/GravityModel.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/LambertConformalConic.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/LocalCartesian.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/MagneticCircle.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/MagneticModel.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/MGRS.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/NETGeographicLib.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/NormalGravity.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/OSGB.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/PolarStereographic.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/PolygonArea.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/SphericalCoefficients.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/SphericalHarmonic.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/SphericalHarmonic1.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/SphericalHarmonic2.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/TransverseMercator.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/TransverseMercatorExact.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/UTMUPS.cpp" />
+    <ClCompile Include="../dotnet/NETGeographicLib/stdafx.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="..\dotnet\NETGeographicLib\Rhumb.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="../dotnet/NETGeographicLib/ReadMe.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="Geographic-vc10.vcxproj">
+      <Project>{4CFBCD6C-956C-42BC-A863-3C60F3ED9CC1}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

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



More information about the Pkg-grass-devel mailing list