[geographiclib] 01/08: Imported Upstream version 1.48

Bas Couwenberg sebastic at debian.org
Sun Apr 9 22:55:14 UTC 2017


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

sebastic pushed a commit to branch master
in repository geographiclib.

commit 3f5018400227d406a00157e233d00e4bb9679dc5
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Mon Apr 10 00:23:59 2017 +0200

    Imported Upstream version 1.48
---
 00README.txt                                       | 139 +---
 CMakeLists.txt                                     |  82 +-
 INSTALL                                            |   2 +-
 LICENSE.txt                                        |   2 +-
 Makefile.in                                        |   8 +-
 NEWS                                               |  49 +-
 README.md                                          |   9 +-
 aclocal.m4                                         |   6 +-
 cmake/project.pc.in                                |   2 +-
 configure                                          |  24 +-
 configure.ac                                       |   6 +-
 doc/CMakeLists.txt                                 |   2 +-
 doc/GeographicLib.dox.in                           | 821 +++++++++++++++------
 doc/Makefile.am                                    |   4 +-
 doc/Makefile.in                                    |   4 +-
 doc/NETGeographicLib.dox                           |   4 +-
 doc/doxyfile-c.in                                  |   2 +-
 doc/doxyfile-for.in                                |   2 +-
 doc/doxyfile-net.in                                |   2 +-
 doc/doxyfile.in                                    |   2 +-
 doc/geodesic-c.dox                                 |  43 +-
 doc/geodesic-for.dox                               |  42 +-
 doc/geodseries30.html                              |   2 +-
 doc/index.html.in                                  |   6 +-
 doc/normal-gravity-potential-1.svg                 | 170 +++++
 doc/tmseries30.html                                |   2 +-
 doc/utilities.html.in                              |   6 +-
 doc/vptree.gif                                     | Bin 0 -> 175551 bytes
 dotnet/NETGeographicLib/Accumulator.cpp            |   2 +-
 dotnet/NETGeographicLib/Accumulator.h              |   2 +-
 dotnet/NETGeographicLib/AlbersEqualArea.cpp        |   2 +-
 dotnet/NETGeographicLib/AlbersEqualArea.h          |   2 +-
 dotnet/NETGeographicLib/AzimuthalEquidistant.cpp   |   2 +-
 dotnet/NETGeographicLib/AzimuthalEquidistant.h     |   2 +-
 dotnet/NETGeographicLib/CassiniSoldner.cpp         |   2 +-
 dotnet/NETGeographicLib/CassiniSoldner.h           |   2 +-
 dotnet/NETGeographicLib/CircularEngine.cpp         |   2 +-
 dotnet/NETGeographicLib/CircularEngine.h           |   2 +-
 dotnet/NETGeographicLib/DMS.cpp                    |   2 +-
 dotnet/NETGeographicLib/DMS.h                      |   2 +-
 dotnet/NETGeographicLib/Ellipsoid.cpp              |   2 +-
 dotnet/NETGeographicLib/Ellipsoid.h                |   2 +-
 dotnet/NETGeographicLib/EllipticFunction.cpp       |   2 +-
 dotnet/NETGeographicLib/EllipticFunction.h         |   2 +-
 dotnet/NETGeographicLib/GARS.cpp                   |   2 +-
 dotnet/NETGeographicLib/GARS.h                     |   2 +-
 dotnet/NETGeographicLib/GeoCoords.cpp              |   2 +-
 dotnet/NETGeographicLib/GeoCoords.h                |   2 +-
 dotnet/NETGeographicLib/Geocentric.cpp             |   2 +-
 dotnet/NETGeographicLib/Geocentric.h               |   2 +-
 dotnet/NETGeographicLib/Geodesic.cpp               |   2 +-
 dotnet/NETGeographicLib/Geodesic.h                 |  12 +-
 dotnet/NETGeographicLib/GeodesicExact.cpp          |   2 +-
 dotnet/NETGeographicLib/GeodesicExact.h            |   2 +-
 dotnet/NETGeographicLib/GeodesicLine.cpp           |   2 +-
 dotnet/NETGeographicLib/GeodesicLine.h             |   4 +-
 dotnet/NETGeographicLib/GeodesicLineExact.cpp      |   2 +-
 dotnet/NETGeographicLib/GeodesicLineExact.h        |   2 +-
 dotnet/NETGeographicLib/Geohash.cpp                |   2 +-
 dotnet/NETGeographicLib/Geohash.h                  |   2 +-
 dotnet/NETGeographicLib/Geoid.cpp                  |   2 +-
 dotnet/NETGeographicLib/Geoid.h                    |   2 +-
 dotnet/NETGeographicLib/Georef.cpp                 |   2 +-
 dotnet/NETGeographicLib/Georef.h                   |   2 +-
 dotnet/NETGeographicLib/Gnomonic.cpp               |   2 +-
 dotnet/NETGeographicLib/Gnomonic.h                 |   4 +-
 dotnet/NETGeographicLib/GravityCircle.cpp          |   2 +-
 dotnet/NETGeographicLib/GravityCircle.h            |   2 +-
 dotnet/NETGeographicLib/GravityModel.cpp           |   2 +-
 dotnet/NETGeographicLib/GravityModel.h             |   2 +-
 dotnet/NETGeographicLib/LambertConformalConic.cpp  |   2 +-
 dotnet/NETGeographicLib/LambertConformalConic.h    |   2 +-
 dotnet/NETGeographicLib/LocalCartesian.cpp         |   2 +-
 dotnet/NETGeographicLib/LocalCartesian.h           |   2 +-
 dotnet/NETGeographicLib/MGRS.cpp                   |   2 +-
 dotnet/NETGeographicLib/MGRS.h                     |   2 +-
 dotnet/NETGeographicLib/MagneticCircle.cpp         |   2 +-
 dotnet/NETGeographicLib/MagneticCircle.h           |   2 +-
 dotnet/NETGeographicLib/MagneticModel.cpp          |   2 +-
 dotnet/NETGeographicLib/MagneticModel.h            |   2 +-
 dotnet/NETGeographicLib/NETGeographicLib.cpp       |   2 +-
 dotnet/NETGeographicLib/NETGeographicLib.h         |   2 +-
 dotnet/NETGeographicLib/NormalGravity.cpp          |   2 +-
 dotnet/NETGeographicLib/NormalGravity.h            |   2 +-
 dotnet/NETGeographicLib/OSGB.cpp                   |   2 +-
 dotnet/NETGeographicLib/OSGB.h                     |   2 +-
 dotnet/NETGeographicLib/PolarStereographic.cpp     |   2 +-
 dotnet/NETGeographicLib/PolarStereographic.h       |   2 +-
 dotnet/NETGeographicLib/PolygonArea.cpp            |   2 +-
 dotnet/NETGeographicLib/PolygonArea.h              |   4 +-
 dotnet/NETGeographicLib/Rhumb.cpp                  |   2 +-
 dotnet/NETGeographicLib/Rhumb.h                    |   2 +-
 dotnet/NETGeographicLib/SphericalCoefficients.cpp  |   2 +-
 dotnet/NETGeographicLib/SphericalCoefficients.h    |   2 +-
 dotnet/NETGeographicLib/SphericalHarmonic.cpp      |   2 +-
 dotnet/NETGeographicLib/SphericalHarmonic.h        |   2 +-
 dotnet/NETGeographicLib/SphericalHarmonic1.cpp     |   2 +-
 dotnet/NETGeographicLib/SphericalHarmonic1.h       |   2 +-
 dotnet/NETGeographicLib/SphericalHarmonic2.cpp     |   2 +-
 dotnet/NETGeographicLib/SphericalHarmonic2.h       |   2 +-
 dotnet/NETGeographicLib/TransverseMercator.cpp     |   2 +-
 dotnet/NETGeographicLib/TransverseMercator.h       |   2 +-
 .../NETGeographicLib/TransverseMercatorExact.cpp   |   2 +-
 dotnet/NETGeographicLib/TransverseMercatorExact.h  |   4 +-
 dotnet/NETGeographicLib/UTMUPS.cpp                 |   2 +-
 dotnet/NETGeographicLib/UTMUPS.h                   |   2 +-
 dotnet/Projections/AccumPanel.cs                   |   2 +-
 dotnet/Projections/AlbersPanel.cs                  |   2 +-
 dotnet/Projections/EllipsoidPanel.cs               |   2 +-
 dotnet/Projections/EllipticPanel.cs                |   2 +-
 dotnet/Projections/Form1.cs                        |   2 +-
 dotnet/Projections/GeocentricPanel.cs              |   2 +-
 dotnet/Projections/GeodesicPanel.cs                |   2 +-
 dotnet/Projections/GeoidPanel.cs                   |   2 +-
 dotnet/Projections/GravityPanel.cs                 |   2 +-
 dotnet/Projections/LocalCartesianPanel.cs          |   2 +-
 dotnet/Projections/MagneticPanel.cs                |   2 +-
 dotnet/Projections/MiscPanel.cs                    |   2 +-
 dotnet/Projections/PolarStereoPanel.cs             |   2 +-
 dotnet/Projections/PolyPanel.cs                    |   2 +-
 dotnet/Projections/Program.cs                      |   2 +-
 dotnet/Projections/ProjectionsPanel.cs             |   2 +-
 dotnet/Projections/SphericalHarmonicsPanel.cs      |   2 +-
 dotnet/Projections/TypeIIIProjPanel.cs             |   2 +-
 examples/CMakeLists.txt                            |   5 +-
 examples/JacobiConformal.hpp                       |   2 +-
 examples/example-NearestNeighbor.cpp               |   8 +-
 include/GeographicLib/Accumulator.hpp              |   2 +-
 include/GeographicLib/AlbersEqualArea.hpp          |   2 +-
 include/GeographicLib/AzimuthalEquidistant.hpp     |   2 +-
 include/GeographicLib/CassiniSoldner.hpp           |   2 +-
 include/GeographicLib/CircularEngine.hpp           |   2 +-
 include/GeographicLib/Config.h                     |   4 +-
 include/GeographicLib/Constants.hpp                |   3 +-
 include/GeographicLib/DMS.hpp                      |   2 +-
 include/GeographicLib/Ellipsoid.hpp                |   2 +-
 include/GeographicLib/EllipticFunction.hpp         |   2 +-
 include/GeographicLib/GARS.hpp                     |   2 +-
 include/GeographicLib/GeoCoords.hpp                |   2 +-
 include/GeographicLib/Geocentric.hpp               |   2 +-
 include/GeographicLib/Geodesic.hpp                 |  14 +-
 include/GeographicLib/GeodesicExact.hpp            |   2 +-
 include/GeographicLib/GeodesicLine.hpp             |   5 +-
 include/GeographicLib/GeodesicLineExact.hpp        |   2 +-
 include/GeographicLib/Geohash.hpp                  |   2 +-
 include/GeographicLib/Geoid.hpp                    |   2 +-
 include/GeographicLib/Georef.hpp                   |   2 +-
 include/GeographicLib/Gnomonic.hpp                 |   4 +-
 include/GeographicLib/GravityCircle.hpp            |   2 +-
 include/GeographicLib/GravityModel.hpp             |   2 +-
 include/GeographicLib/LambertConformalConic.hpp    |   2 +-
 include/GeographicLib/LocalCartesian.hpp           |   2 +-
 include/GeographicLib/MGRS.hpp                     |   2 +-
 include/GeographicLib/MagneticCircle.hpp           |   2 +-
 include/GeographicLib/MagneticModel.hpp            |   2 +-
 include/GeographicLib/Math.hpp                     |   8 +-
 include/GeographicLib/NearestNeighbor.hpp          | 281 ++++---
 include/GeographicLib/NormalGravity.hpp            |   6 +-
 include/GeographicLib/OSGB.hpp                     |   2 +-
 include/GeographicLib/PolarStereographic.hpp       |   2 +-
 include/GeographicLib/PolygonArea.hpp              |   4 +-
 include/GeographicLib/Rhumb.hpp                    |   2 +-
 include/GeographicLib/SphericalEngine.hpp          |   2 +-
 include/GeographicLib/SphericalHarmonic.hpp        |   2 +-
 include/GeographicLib/SphericalHarmonic1.hpp       |   2 +-
 include/GeographicLib/SphericalHarmonic2.hpp       |   2 +-
 include/GeographicLib/TransverseMercator.hpp       |   2 +-
 include/GeographicLib/TransverseMercatorExact.hpp  |   4 +-
 include/GeographicLib/UTMUPS.hpp                   |   2 +-
 include/GeographicLib/Utility.hpp                  |  11 +-
 java/README.txt                                    |   4 +-
 java/direct/pom.xml                                |   4 +-
 java/inverse/pom.xml                               |   4 +-
 java/planimeter/pom.xml                            |   4 +-
 java/pom.xml                                       |  10 +-
 .../java/net/sf/geographiclib/Accumulator.java     |   2 +-
 .../main/java/net/sf/geographiclib/Constants.java  |   2 +-
 .../main/java/net/sf/geographiclib/GeoMath.java    |  29 +-
 .../main/java/net/sf/geographiclib/Geodesic.java   |  22 +-
 .../java/net/sf/geographiclib/GeodesicData.java    |   2 +-
 .../java/net/sf/geographiclib/GeodesicLine.java    |  16 +-
 .../java/net/sf/geographiclib/GeodesicMask.java    |   2 +-
 .../java/net/sf/geographiclib/GeographicErr.java   |   2 +-
 .../main/java/net/sf/geographiclib/Gnomonic.java   |  12 +-
 .../java/net/sf/geographiclib/GnomonicData.java    |   2 +-
 java/src/main/java/net/sf/geographiclib/Pair.java  |   2 +-
 .../java/net/sf/geographiclib/PolygonArea.java     |  12 +-
 .../java/net/sf/geographiclib/PolygonResult.java   |   2 +-
 .../java/net/sf/geographiclib/package-info.java    |  70 +-
 .../java/net/sf/geographiclib/GeodesicTest.java    |  24 +-
 js/GeographicLib.md                                |  34 +-
 js/HEADER.js                                       |   6 +-
 js/README.md                                       |   6 +-
 js/doc/1-geodesics.md                              |   8 +-
 js/doc/2-interface.md                              |   6 +-
 js/doc/3-examples.md                               |   6 +-
 js/package.json                                    |   2 +-
 js/samples/geod-calc.html                          |  27 +-
 js/samples/geod-google-instructions.html           |  14 +-
 js/samples/geod-google.html                        |  17 +-
 js/src/DMS.js                                      |   4 +-
 js/src/Geodesic.js                                 |   4 +-
 js/src/GeodesicLine.js                             |   4 +-
 js/src/Math.js                                     |  35 +-
 js/src/PolygonArea.js                              |  10 +-
 js/test/geodesictest.js                            |  32 +-
 legacy/C/00README.txt                              |   4 +-
 legacy/C/geodesic.c                                |  44 +-
 legacy/C/geodesic.h                                |  20 +-
 legacy/C/geodtest.c                                | 102 +--
 legacy/Fortran/00README.txt                        |   4 +-
 legacy/Fortran/geodesic.for                        |  57 +-
 legacy/Fortran/geodinverse.for                     |   2 +-
 legacy/Fortran/geodtest.for                        |  16 +-
 man/CartConvert.1                                  |   4 +-
 man/CartConvert.1.html                             |   2 +-
 man/CartConvert.pod                                |   2 +-
 man/CartConvert.usage                              |   4 +-
 man/ConicProj.1                                    |   4 +-
 man/ConicProj.1.html                               |   2 +-
 man/ConicProj.pod                                  |   2 +-
 man/ConicProj.usage                                |   4 +-
 man/GeoConvert.1                                   |  10 +-
 man/GeoConvert.1.html                              |   6 +-
 man/GeoConvert.pod                                 |   8 +-
 man/GeoConvert.usage                               |  10 +-
 man/GeodSolve.1                                    |   8 +-
 man/GeodSolve.1.html                               |   6 +-
 man/GeodSolve.pod                                  |   6 +-
 man/GeodSolve.usage                                |   8 +-
 man/GeodesicProj.1                                 |   6 +-
 man/GeodesicProj.1.html                            |   4 +-
 man/GeodesicProj.pod                               |   4 +-
 man/GeodesicProj.usage                             |   6 +-
 man/GeoidEval.1                                    |   8 +-
 man/GeoidEval.1.html                               |   6 +-
 man/GeoidEval.pod                                  |   6 +-
 man/GeoidEval.usage                                |   8 +-
 man/Gravity.1                                      |   6 +-
 man/Gravity.1.html                                 |   4 +-
 man/Gravity.pod                                    |   4 +-
 man/Gravity.usage                                  |   6 +-
 man/MagneticField.1                                |   6 +-
 man/MagneticField.1.html                           |   4 +-
 man/MagneticField.pod                              |   4 +-
 man/MagneticField.usage                            |   6 +-
 man/Planimeter.1                                   |   8 +-
 man/Planimeter.1.html                              |   6 +-
 man/Planimeter.pod                                 |   6 +-
 man/Planimeter.usage                               |   8 +-
 man/RhumbSolve.1                                   |   6 +-
 man/RhumbSolve.1.html                              |   4 +-
 man/RhumbSolve.pod                                 |   4 +-
 man/RhumbSolve.usage                               |   6 +-
 man/TransverseMercatorProj.1                       |   4 +-
 man/TransverseMercatorProj.1.html                  |   2 +-
 man/TransverseMercatorProj.pod                     |   2 +-
 man/TransverseMercatorProj.usage                   |   4 +-
 man/dummy.1.html.in                                |   6 +-
 man/dummy.1.in                                     |   4 +-
 man/dummy.usage.in                                 |   2 +-
 man/makeusage.sh                                   |   2 +-
 man/script.8.in                                    |   2 +-
 matlab/geographiclib/Contents.m                    |   4 +-
 matlab/geographiclib/cassini_fwd.m                 |   4 +-
 matlab/geographiclib/eqdazim_fwd.m                 |   2 +-
 matlab/geographiclib/eqdazim_inv.m                 |   2 +-
 matlab/geographiclib/gedoc.m                       |   6 +-
 matlab/geographiclib/geocent_inv.m                 |   1 -
 matlab/geographiclib/geodarea.m                    |   6 +-
 matlab/geographiclib/geoddistance.m                |   5 +-
 matlab/geographiclib/geoddoc.m                     |   7 +-
 matlab/geographiclib/geodreckon.m                  |  22 +-
 matlab/geographiclib/geographiclib_test.m          |  29 +-
 matlab/geographiclib/geoid_height.m                |   2 +-
 matlab/geographiclib/geoid_load.m                  |   2 +-
 matlab/geographiclib/gnomonic_fwd.m                |   2 +-
 matlab/geographiclib/gnomonic_inv.m                |   2 +-
 matlab/geographiclib/private/AngDiff.m             |   8 +-
 matlab/geographiclib/private/AngNormalize.m        |   8 +-
 matlab/geographiclib/private/SinCosSeries.m        |   2 +-
 matlab/geographiclib/private/atan2dx.m             |  16 +-
 matlab/geographiclib/private/sincosdx.m            |   8 +-
 matlab/geographiclib/projdoc.m                     |   2 +-
 matlab/geographiclib/tranmerc_fwd.m                |   2 +-
 matlab/geographiclib/tranmerc_inv.m                |   2 +-
 maxima/auxlat.mac                                  |   4 +-
 maxima/ellint.mac                                  |   2 +-
 maxima/gearea.mac                                  |   2 +-
 maxima/geod.mac                                    |   4 +-
 maxima/geodesic.mac                                |  36 +-
 maxima/rhumbarea.mac                               |   2 +-
 maxima/tm.mac                                      |   4 +-
 maxima/tmseries.mac                                |   4 +-
 python/README.rst                                  |   2 +-
 python/doc/geodesics.rst                           |   8 +-
 python/doc/index.rst                               |  19 +-
 python/geographiclib/__init__.py                   |   4 +-
 python/geographiclib/accumulator.py                |   4 +-
 python/geographiclib/constants.py                  |   4 +-
 python/geographiclib/geodesic.py                   |  10 +-
 python/geographiclib/geodesiccapability.py         |   4 +-
 python/geographiclib/geodesicline.py               |   7 +-
 python/geographiclib/geomath.py                    |  39 +-
 python/geographiclib/polygonarea.py                |  12 +-
 python/geographiclib/test/test_geodesic.py         |  24 +-
 python/setup.py                                    |   4 +-
 src/Accumulator.cpp                                |   2 +-
 src/AlbersEqualArea.cpp                            |   2 +-
 src/AzimuthalEquidistant.cpp                       |   2 +-
 src/CMakeLists.txt                                 |   2 -
 src/CassiniSoldner.cpp                             |   2 +-
 src/CircularEngine.cpp                             |   2 +-
 src/DMS.cpp                                        |   2 +-
 src/Ellipsoid.cpp                                  |   2 +-
 src/EllipticFunction.cpp                           |   2 +-
 src/GARS.cpp                                       |   2 +-
 src/GeoCoords.cpp                                  |   2 +-
 src/Geocentric.cpp                                 |   2 +-
 src/Geodesic.cpp                                   |   2 +-
 src/GeodesicExact.cpp                              |   2 +-
 src/GeodesicExactC4.cpp                            |   2 +-
 src/GeodesicLine.cpp                               |   2 +-
 src/GeodesicLineExact.cpp                          |   2 +-
 src/Geohash.cpp                                    |   2 +-
 src/Geoid.cpp                                      |   2 +-
 src/Georef.cpp                                     |   2 +-
 src/Gnomonic.cpp                                   |   2 +-
 src/GravityCircle.cpp                              |   2 +-
 src/GravityModel.cpp                               |   2 +-
 src/LambertConformalConic.cpp                      |   2 +-
 src/LocalCartesian.cpp                             |   2 +-
 src/MGRS.cpp                                       |   2 +-
 src/MagneticCircle.cpp                             |   2 +-
 src/MagneticModel.cpp                              |   2 +-
 src/Math.cpp                                       |   2 +-
 src/NormalGravity.cpp                              |  16 +-
 src/OSGB.cpp                                       |   2 +-
 src/PolarStereographic.cpp                         |   2 +-
 src/PolygonArea.cpp                                |   2 +-
 src/Rhumb.cpp                                      |   2 +-
 src/SphericalEngine.cpp                            |   2 +-
 src/TransverseMercator.cpp                         |   2 +-
 src/TransverseMercatorExact.cpp                    |   2 +-
 src/UTMUPS.cpp                                     |   5 +-
 src/Utility.cpp                                    |   2 +-
 tools/CartConvert.cpp                              |   2 +-
 tools/ConicProj.cpp                                |   2 +-
 tools/GeoConvert.cpp                               |   2 +-
 tools/GeodSolve.cpp                                |   2 +-
 tools/GeodesicProj.cpp                             |   2 +-
 tools/GeoidEval.cpp                                |   2 +-
 tools/Gravity.cpp                                  |   2 +-
 tools/MagneticField.cpp                            |   2 +-
 tools/Planimeter.cpp                               |   2 +-
 tools/RhumbSolve.cpp                               |   2 +-
 tools/TransverseMercatorProj.cpp                   |   2 +-
 tools/geographiclib-get-geoids.sh                  |   6 +-
 tools/geographiclib-get-gravity.sh                 |   6 +-
 tools/geographiclib-get-magnetic.sh                |   6 +-
 wrapper/C/00README.txt                             |   2 +-
 wrapper/matlab/geodesicinverse.cpp                 |   6 +-
 wrapper/matlab/geodesicinverse.m                   |   2 +-
 wrapper/python/00README.txt                        |   2 +-
 364 files changed, 2097 insertions(+), 1410 deletions(-)

diff --git a/00README.txt b/00README.txt
index 3080e1b..8a16e66 100644
--- a/00README.txt
+++ b/00README.txt
@@ -3,7 +3,7 @@ A library for geographic projections.
 Written by Charles Karney <charles at karney.com> and licensed under
 the MIT/X11 License.  For more information, see
 
-    http://geographiclib.sourceforge.net/
+    https://geographiclib.sourceforge.io/
 
 Files
 
@@ -13,122 +13,57 @@ Files
     INSTALL -- brief installation instructions
     NEWS -- a history of changes
 
-    include/GeographicLib/ and src/
-      Config.h.in, Config.h -- system dependent configuration
-      Constants.hpp -- WGS84 constants
-      Math.[ch]pp -- math routines
-      Utility.[ch]pp -- I/O and date routines
-      Accumulator.[ch]pp -- quad precision adder
-      PolarStereographic.[ch]pp -- polar stereographic projection
-      TransverseMercator.[ch]pp -- transverse Mercator projection
-      UTMUPS.[ch]pp -- UTM and UPS
-      MGRS.[ch]pp -- MGRS
-      TransverseMercatorExact.[ch]pp -- exact TM projection
-      EllipticFunction.[ch]pp -- elliptic functions
-      GeoCoords.[ch]pp -- hold geographic location
-      DMS.[ch]pp -- handle degrees minutes seconds
-      Geocentric.[ch]pp -- geocentric coordinates
-      LocalCartesian.[ch]pp -- local cartesian coordinates
-      Geodesic.[ch]pp -- geodesic calculations
-      GeodesicLine.[ch]pp -- calculations on a single geodesic
-      PolygonArea.[ch]pp -- polygon area
-      AzimuthalEquidistant.[ch]pp -- azimuthal equidistant projection
-      Gnomonic.[ch]pp -- gnomonic projection
-      CassiniSoldner.[ch]pp -- Cassini-Soldner equidistant projection
-      Geoid.[ch]pp -- geoid heights above the ellipsoid
-      Gravity{Model,Circle}.[ch]pp -- gravity models
-      Magnetic{Model,Circle}.[ch]pp -- geomagentic models
-      {Spherical,Circular}Engine.[ch]pp -- spherical harmonic sums
-      SphericalHarmonic{,1,2}.hpp -- frontend for spherical harmonics
-      LambertConformalConic.[ch]pp -- Lambert conformal conic projection
-      AlbersEqualArea.[ch]pp -- Albers equal area projection
-      Gnomonic.[ch]pp -- Ellipsoidal gnomonic projection
-      OSGB.[ch]pp -- Ordnance Survey grid system
-      Geohash.[ch]pp -- conversions for geohashes
-      GARS.[ch]pp -- conversions for GARS
-      Georef.[ch]pp -- conversions for georefs
-      Ellipsoid.[ch]pp -- ellipsoid properties
-      Rhumb.[ch]pp -- rhumb line calculations
+    include/GeographicLib/*.hpp
+      headers for the library
+    src/*.cpp
+      implementation for the library
 
     examples/
-      example-*.cpp -- simple usage examples for all the classes
-      GeoidToGTX.cpp -- a parallelization example
-      JacobiConformal.[ch]pp -- mapping a triaxial ellipsoid
+      examples for each class
 
     tools/
-      GeoConvert.cpp -- geographic conversion utility
-      TransverseMercatorTest.cpp -- TM tester
-      GeodSolve.cpp -- geodesic utility
-      CartConvert.cpp -- convert to geocentric and local cartesian
-      EquidistantTest.cpp -- exercise AzimuthalEquidistant and CassiniSoldner
-      GeoidEval.cpp -- evaluate geoid heights
-      Gravity.cpp -- evaluate gravity
-      MagneticField.cpp -- evaluate magnetic field
-      Planimeter.cpp -- computer polygon areas
-      RhumbSolve.cpp -- calculate rhumb lines
-      geographiclib-get-geoids -- download geoid datasets
-      geographiclib-get-gravity -- download gravity models
-      geographiclib-get-magnetic -- download geomagnetic models
+      command-line utilities
+
+    Makefile.mk -- Unix/Linux makefiles
+    configure -- autoconf configuration script
+    CMakeLists.txt -- cmake configuration files
+    cmake/
+      support files for building with CMake
 
     windows/
-      GeographicLib-vc9.sln -- MS Studio 2008 solution
-      Geographic-vc9.vcproj -- project for library
-      GeoConvert-vc9.vcproj -- project for GeoConvert
-      TransverseMercatorTest-vc9.vcproj -- project for TransverseMercatorTest
-      Geod-vc9.vcproj -- project for Geod
-      Planimeter-vc9.vcproj -- project for Planimeter
-      CartConvert-vc9.vcproj -- project for CartConvert
-      EquidistantTest-vc9.vcproj -- project for EquidistantTest
-      GeoidEval-vc9.vcproj -- project for GeoidEval
-      Gravity-vc9.vcproj -- project for Gravity
-      MagneticField-vc9.vcproj -- project for MagneticField
-      also files for MS Studio 2010 (with vc10)
-      NETGeographic-vc10.vcxproj -- project for .NET wrapper
+      project files for building under Windows (but CMake is preferred)
 
     maxima/
-      tm.mac -- Maxima code for high precision TM
-      ellint.mac -- Maxima code for elliptic functions needed by tm.mac
-      tmseries.mac -- Maxima code for series approximations for TM
-      geod.mac -- Maxima code for series approximations for Geodesic
-      geodesic.mac -- Maxima code for geodesic problems
-
-    matlab/geographiclib
-      *.m, private/*.m -- Matlab implementation of some classes
+      Maxima code for generating series expansions, etc.
 
-    matlab/geographiclib-legacy
-      *.{m,cpp} -- legacy Matlab routines
+    matlab/
+      geographiclib/
+        *.m, private/*.m -- Matlab implementation of some classes
+      geographiclib-legacy/
+        *.{m,cpp} -- legacy Matlab routines
 
     doc/
-      doxyfile.in -- Doxygen config file
-      GeographicLib.dox -- main page of Doxygen documentation
-      geodseries30.html -- geodesic series to 30th order
-      tmseries30.html -- transverse Mercator series to 30th order
-      html/* -- directory with built documentation
-      scripts/*.html -- demonstrations of the JavaScript interface
-      scripts/GeographicLib/*.js -- JavaScript implementation of geodesics
+      files for generating documentation with Doxygen
 
     man/
-      *.pod -- plain old documentation
-      *.1 -- man pages in nroff format
-      *.1.html -- man pages in html format
-      *.usage -- documentation for incorporation into executables
+      man pages for the utilities
 
     python/GeographicLib/*.py -- Python implementation of geodesic routines
 
     java/.../*.java -- Java implementation of geodesic routines
 
-    dotnet/NETGeographicLib/*.{cpp,h} -- .NET wrapper for GeographicLib
-    dotnet/examples/CS/*.cs -- simple C# examples for each class
-    dotnet/examples/ManagedCPP/*.cpp -- Managed C++ examples for each class
-    dotnet/examples/VB/*.vb -- simple Visual Basic examples for each class
-    dotnet/Projection/* -- a more complex C# application
-
-    legacy/C/* -- C implementation of geodesic routines
-    legacy/Fortran/* -- Fortran implementation of geodesic routines
-
-    Makefile.mk -- Unix/Linux makefiles
-    configure -- autoconf configuration script
-    CMakeLists.txt -- cmake configuration files
-    cmake/
-      FindGeographicLib.cmake -- cmake find script
-      *.cmake.in -- cmake config templates
+    js/
+      src/*.js -- JavaScript implementation of geodesic routines
+      samples/*.html -- demonstrations of the JavaScript interface
+
+    legacy/
+      C/ -- C implementation of geodesic routines
+      Fortran/ -- Fortran implementation of geodesic routines
+
+    dotnet/
+      NETGeographicLib/*.{cpp,h} -- .NET wrapper for GeographicLib
+      examples/
+        CS/*.cs -- simple C# examples for each class
+        ManagedCPP/*.cpp -- Managed C++ examples for each class
+        VB/*.vb -- simple Visual Basic examples for each class
+      Projection/ -- a more complex C# application
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e79923b..5aabbfb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ project (GeographicLib)
 
 # Version information
 set (PROJECT_VERSION_MAJOR 1)
-set (PROJECT_VERSION_MINOR 47)
+set (PROJECT_VERSION_MINOR 48)
 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_API 17)
-set (LIBVERSION_BUILD 17.1.0)
+set (LIBVERSION_BUILD 17.1.1)
 string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
 string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
 
@@ -159,6 +159,19 @@ set_property (CACHE GEOGRAPHICLIB_PRECISION PROPERTY STRINGS 1 2 3 4 5)
 option (PACKAGE_DEBUG_LIBS
   "Include debug versions of library in binary package" OFF)
 
+# (9) Try to link against boost when building the examples.  The
+# NearestNeighbor example optionally uses the Boost library.  Set to ON,
+# if you want to exercise this functionality.  Default is OFF, so that
+# cmake configuration isn't slowed down looking for Boost.
+option (USE_BOOST_FOR_EXAMPLES
+  "Look for Boost library when compiling examples" OFF)
+
+# (10) On Mac OS X, build multiple architectures?  Set to ON to build
+# i386 and x86_64.  Default is OFF, meaning build for default
+# architecture.
+option (APPLE_MULTIPLE_ARCHITECTURES
+  "Build multiple architectures for Apple systems" OFF)
+
 set (LIBNAME Geographic)
 if (MSVC OR CMAKE_CONFIGURATION_TYPES)
   # For multi-config systems and for Visual Studio, the debug version of
@@ -203,26 +216,30 @@ if (MSVC)
   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MP")
 else ()
   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
-  # check for C++11 support.  This flag is *not* propagated to clients
-  # that use GeographicLib.  However, this is of no consequence.  When
-  # the client code is being compiled (and the GeographicLib headers
-  # being included), work-alike substitutions are used.
-  include (CheckCXXCompilerFlag)
-  # The only "deprecated" flag included here is "0x" to activate C++11
-  # with old versions of g++.  We'll add "17" when it's available.
-  # Note: C++11 (actually gnu++14) support is turned on by default in
-  # g++ 6.1 and later.
-  foreach (_F 14 11 0x)
-    set (CXX11_FLAG "-std=c++${_F}")
-    set (_T CXX11TEST${_F})
-    check_cxx_compiler_flag (${CXX11_FLAG} ${_T})
-    if (${_T})
-      break ()
+  # g++ 6.0 defaults to -std=gnu++14
+  if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND
+        NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0))
+    # check for C++11 support.  This flag is *not* propagated to clients
+    # that use GeographicLib.  However, this is of no consequence.  When
+    # the client code is being compiled (and the GeographicLib headers
+    # being included), work-alike substitutions are used.
+    include (CheckCXXCompilerFlag)
+    # The only "deprecated" flag included here is "0x" to activate C++11
+    # with old versions of g++.  We'll add "17" when it's available.
+    # Note: C++11 (actually gnu++14) support is turned on by default in
+    # g++ 6.1 and later.
+    foreach (_F 14 11 0x)
+      set (CXX11_FLAG "-std=c++${_F}")
+      set (_T CXX11TEST${_F})
+      check_cxx_compiler_flag (${CXX11_FLAG} ${_T})
+      if (${_T})
+        break ()
+      endif ()
+      unset (CXX11_FLAG)
+    endforeach ()
+    if (CXX11_FLAG)
+      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAG}")
     endif ()
-    unset (CXX11_FLAG)
-  endforeach ()
-  if (CXX11_FLAG)
-    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAG}")
   endif ()
 endif ()
 
@@ -271,6 +288,15 @@ endif ()
 # first because that's where Config.h will be
 include_directories ("${PROJECT_BINARY_DIR}/include" include)
 
+if (USE_BOOST_FOR_EXAMPLES)
+  # quad precision numbers appeared in Boost 1.54.
+  find_package (Boost 1.54 COMPONENTS serialization)
+elseif (GEOGRAPHICLIB_PRECISION EQUAL 4)
+  if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CXX11_MATH)
+    find_package (Boost 1.54)
+  endif ()
+endif ()
+
 set (HIGHPREC_LIBRARIES)
 if (GEOGRAPHICLIB_PRECISION EQUAL 1)
   message (WARNING "Compiling with floats which results in poor accuracy")
@@ -284,8 +310,6 @@ elseif (GEOGRAPHICLIB_PRECISION EQUAL 3)
   endif ()
 elseif (GEOGRAPHICLIB_PRECISION EQUAL 4)
   if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CXX11_MATH)
-    # quad precision numbers appeared in Boost 1.54.
-    find_package (Boost 1.54)
     if (Boost_FOUND)
       include_directories ("${Boost_INCLUDE_DIRS}")
       set (HIGHPREC_LIBRARIES quadmath)
@@ -308,7 +332,7 @@ elseif (GEOGRAPHICLIB_PRECISION EQUAL 4)
   endif ()
 elseif (GEOGRAPHICLIB_PRECISION EQUAL 5)
   if (CXX11_MATH)
-    # Install MPFR C++ version 3.6.2 or later from
+    # Install MPFR C++ version 3.6.5 (2016-12-19) or later from
     # http://www.holoborodko.com/pavel/mpfr and install mpreal.h in the
     # include directory.  NOTE: MPFR C++ is covered by the GPL; be sure
     # to abide by the terms of this license.
@@ -360,7 +384,7 @@ elseif (GEOGRAPHICLIB_PRECISION EQUAL 5)
   endif ()
 endif ()
 
-if (APPLE AND GEOGRAPHICLIB_PRECISION EQUAL 2)
+if (APPLE AND APPLE_MULTIPLE_ARCHITECTURES)
   if (CMAKE_SYSTEM_PROCESSOR MATCHES "i.86" OR
       CMAKE_SYSTEM_PROCESSOR MATCHES "amd64" OR
       CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
@@ -503,7 +527,7 @@ if (WIN32)
   # The Windows binary packager is NSIS.  Set the necessary variables
   # for this.
   set (CPACK_NSIS_CONTACT "charles at karney.com")
-  set (CPACK_NSIS_URL_INFO_ABOUT "http://geographiclib.sourceforge.net")
+  set (CPACK_NSIS_URL_INFO_ABOUT "https://geographiclib.sourceforge.io")
   set (CPACK_NSIS_HELP_LINK "mailto:charles at karney.com")
   if (CMAKE_SIZEOF_VOID_P EQUAL 8)
     # Hardcode the prefix for Visual Studio 12 2013
@@ -522,11 +546,11 @@ if (WIN32)
   endif ()
   set (CPACK_NSIS_DISPLAY_NAME ${CPACK_NSIS_PACKAGE_NAME})
   set (CPACK_NSIS_MENU_LINKS
-    "http://geographiclib.sourceforge.net/${PROJECT_VERSION}/index.html"
+    "https://geographiclib.sourceforge.io/${PROJECT_VERSION}/index.html"
     "Library documentation"
-    "http://geographiclib.sourceforge.net/${PROJECT_VERSION}/utilities.html"
+    "https://geographiclib.sourceforge.io/${PROJECT_VERSION}/utilities.html"
     "Utilities documentation"
-    "http://geographiclib.sourceforge.net" "GeographicLib home page"
+    "https://geographiclib.sourceforge.io" "GeographicLib home page"
     "https://sourceforge.net/projects/geographiclib/" "Main project page")
   set (CPACK_NSIS_MODIFY_PATH ON)
 elseif (APPLE)
diff --git a/INSTALL b/INSTALL
index f669d15..79d1162 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,3 +1,3 @@
 For installation instructions, open
 
-  http://geographiclib.sourceforge.net/html/install.html
+  https://geographiclib.sourceforge.io/html/install.html
diff --git a/LICENSE.txt b/LICENSE.txt
index 7fef94d..d0df4c1 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,7 +1,7 @@
 The MIT License (MIT); this license applies to GeographicLib,
 versions 1.12 and later.
 
-Copyright (c) 2008-2016, Charles Karney
+Copyright (c) 2008-2017, Charles Karney
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
diff --git a/Makefile.in b/Makefile.in
index 56846ea..1325b01 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -647,7 +647,7 @@ distdir: $(DISTFILES)
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
 	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -673,7 +673,7 @@ dist-shar: distdir
 	@echo WARNING: "Support for shar distribution archives is" \
 	               "deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -691,7 +691,7 @@ dist dist-all:
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lz*) \
@@ -701,7 +701,7 @@ distcheck: dist
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
diff --git a/NEWS b/NEWS
index 25d7220..c078d70 100644
--- a/NEWS
+++ b/NEWS
@@ -2,9 +2,48 @@ A reverse chronological list of changes to GeographicLib
 
 For more information, see
 
-    http://geographiclib.sourceforge.net/
+    https://geographiclib.sourceforge.io/
 
-The current version of the library is 1.47.
+The current version of the library is 1.48.
+
+Changes between 1.48 (released 2017-04-09) and 1.47 versions:
+
+  * The "official" URL for GeographicLib is now
+    https://geographiclib.sourceforge.io (instead of
+    http://geographiclib.sourceforge.net).
+
+  * The default range for longitude and azimuth is now (-180d, 180d],
+    instead of [-180d, 180d).  This was already the case for the C++
+    library; now the change has been made to the other implementations
+    (C, Fortran, Java, JavaScript, Python, MATLAB, and Maxima).
+
+  * Changes to NearestNeighbor:
+    + fix BUG in reading a NearestNeighbor object from a stream which
+      sometimes incorrectly caused a "Bad index" exception to be thrown;
+    + add operator<<, operator>>, swap,
+      std::swap(NearestNeighbor&, NearestNeighbor&);
+
+  * Additions to the documentation:
+    + add documentation on finding nearest neighbors;
+    + normal gravity documentation is now on its own page and now has an
+      illustrative figure;
+    + document the truncation error in the series for auxiliary
+      latitudes.
+
+  * Fix BUGS in MATLAB function geodreckon with mixed scalar and array
+    arguments.
+
+  * Workaround bug in math.fmod for Python 2.7 on 32-bit Windows
+    machines.
+
+  * Changes in cmake support:
+    + add USE_BOOST_FOR_EXAMPLES option (default OFF), if ON search for
+      Boost libraries for building examples;
+    + add APPLE_MULTIPLE_ARCHITECTURES option (default OFF), if ON build
+      for both i386 and x86_64 on Mac OS X systems;
+    + don't add flag for C++11 for g++ 6.0 (since it's not needed).
+
+  * Fix compiler warnings with Visual Studio 2017 and for the C library.
 
 Changes between 1.47 (released 2017-02-15) and 1.46 versions:
 
@@ -286,7 +325,7 @@ Changes between 1.44 (released 2015-08-14) and 1.43 versions:
       o version number included as comment in packed script
         geographiclib.js;
       o geod-calc.html and geod-google.html report the version number;
-      o http://geographiclib.sourceforge.net/scripts/ gives access to
+      o https://geographiclib.sourceforge.io/scripts/ gives access to
         earlier versions of geographiclib.js as geographiclib-m.nn.js;
     + Fortran: add geover subroutine to return version numbers;
     + Maxima: geodesic.mac defines geod_version;
@@ -474,7 +513,7 @@ Changes between 1.40 (released 2014-12-18) and 1.39 versions:
     position (latitude and longitude = NaN), instead of the north pole.
 
   * Add an online version of RhumbSolve at
-    http://geographiclib.sourceforge.net/cgi-bin/RhumbSolve.
+    https://geographiclib.sourceforge.io/cgi-bin/RhumbSolve.
 
   * Additions to the documentation:
     + documentation on  Jacobi's conformal projection;
@@ -1465,7 +1504,7 @@ Changes between 2009-11 and 2009-10 versions:
 
 Changes between 2009-10 and 2009-09 versions:
 
-  * Change web site to http://geographiclib.sourceforge.net
+  * Change web site to https://geographiclib.sourceforge.io
 
   * Several house-cleaning changes:
     + Change from the a flat directory structure to a more easily
diff --git a/README.md b/README.md
index f111c67..3ab31c8 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,11 @@
 GeographicLib
 =============
 
-A C++ library for geographic projections.
+A C++ library for geographic projections.  The web site for the package
+is
+
+> https://geographiclib.sourceforge.io
+
+The API for the library is documented at
+
+> https://geographiclib.sourceforge.io/html
diff --git a/aclocal.m4 b/aclocal.m4
index 4062d1b..59ed644 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -21,7 +21,7 @@ If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
 # ===========================================================================
-#   http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
 # ===========================================================================
 #
 # SYNOPSIS
@@ -62,7 +62,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 #   Public License for more details.
 #
 #   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#   with this program. If not, see <https://www.gnu.org/licenses/>.
 #
 #   As a special exception, the respective Autoconf Macro's copyright owner
 #   gives unlimited permission to copy, distribute and modify the configure
@@ -77,7 +77,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 4
+#serial 5
 
 AC_DEFUN([AX_CHECK_COMPILE_FLAG],
 [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
diff --git a/cmake/project.pc.in b/cmake/project.pc.in
index 5555905..2eb0c4c 100644
--- a/cmake/project.pc.in
+++ b/cmake/project.pc.in
@@ -7,7 +7,7 @@ bindir=@bindir@
 Name: @PACKAGE_NAME@
 Description: A library for geographic projections
 Version: @PACKAGE_VERSION@
-URL: http://geographiclib.sourceforge.net
+URL: https://geographiclib.sourceforge.io
 
 Requires:
 Libs: -L${libdir} -lGeographic
diff --git a/configure b/configure
index 4a61ac5..1aedd83 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.47.
+# Generated by GNU Autoconf 2.69 for GeographicLib 1.48.
 #
 # 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.47'
-PACKAGE_STRING='GeographicLib 1.47'
+PACKAGE_VERSION='1.48'
+PACKAGE_STRING='GeographicLib 1.48'
 PACKAGE_BUGREPORT='charles at karney.com'
 PACKAGE_URL=''
 
@@ -1354,7 +1354,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.47 to adapt to many kinds of systems.
+\`configure' configures GeographicLib 1.48 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1425,7 +1425,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GeographicLib 1.47:";;
+     short | recursive ) echo "Configuration of GeographicLib 1.48:";;
    esac
   cat <<\_ACEOF
 
@@ -1548,7 +1548,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GeographicLib configure 1.47
+GeographicLib configure 1.48
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1989,7 +1989,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.47, which was
+It was created by GeographicLib $as_me 1.48, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2966,7 +2966,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='geographiclib'
- VERSION='1.47'
+ VERSION='1.48'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3061,7 +3061,7 @@ fi
 
 
 GEOGRAPHICLIB_VERSION_MAJOR=1
-GEOGRAPHICLIB_VERSION_MINOR=47
+GEOGRAPHICLIB_VERSION_MINOR=48
 GEOGRAPHICLIB_VERSION_PATCH=0
 
 cat >>confdefs.h <<_ACEOF
@@ -3110,7 +3110,7 @@ ac_config_headers="$ac_config_headers include/GeographicLib/Config-ac.h"
 
 
 LT_CURRENT=18
-LT_REVISION=0
+LT_REVISION=1
 LT_AGE=1
 
 
@@ -17141,7 +17141,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.47, which was
+This file was extended by GeographicLib $as_me 1.48, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17207,7 +17207,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.47
+GeographicLib config.status 1.48
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 62f05dd..1b1bdef 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.47],[charles at karney.com])
+AC_INIT([GeographicLib],[1.48],[charles at karney.com])
 AC_CANONICAL_SYSTEM
 AC_PREREQ(2.61)
 AC_CONFIG_SRCDIR(src/Geodesic.cpp)
@@ -9,7 +9,7 @@ AC_CONFIG_MACRO_DIR(m4)
 AM_INIT_AUTOMAKE
 
 GEOGRAPHICLIB_VERSION_MAJOR=1
-GEOGRAPHICLIB_VERSION_MINOR=47
+GEOGRAPHICLIB_VERSION_MINOR=48
 GEOGRAPHICLIB_VERSION_PATCH=0
 AC_DEFINE_UNQUOTED([GEOGRAPHICLIB_VERSION_MAJOR],
         [$GEOGRAPHICLIB_VERSION_MAJOR],[major version number])
@@ -35,7 +35,7 @@ dnl Interfaces changed/added/removed:   CURRENT++ REVISION=0
 dnl Interfaces added:                   AGE++
 dnl Interfaces removed:                 AGE=0
 LT_CURRENT=18
-LT_REVISION=0
+LT_REVISION=1
 LT_AGE=1
 AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index a4a4b18..a1b2d48 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -39,7 +39,7 @@ if (DOXYGEN_FOUND)
     ../examples/[A-Za-z]*.hpp)
   file (GLOB EXTRA_FILES ../maxima/[A-Za-z]*.mac
     tmseries30.html geodseries30.html ../LICENSE.txt)
-  file (GLOB FIGURES *.png)
+  file (GLOB FIGURES *.png *.svg *.gif)
   file (COPY ${EXTRA_FILES} DESTINATION html-stage)
   add_custom_target (cxxdoc ALL
     DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
diff --git a/doc/GeographicLib.dox.in b/doc/GeographicLib.dox.in
index ade011f..3e34c7c 100644
--- a/doc/GeographicLib.dox.in
+++ b/doc/GeographicLib.dox.in
@@ -5,17 +5,17 @@
  *
  * Written by Charles Karney <charles at karney.com> and licensed under the
  * MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 namespace GeographicLib {
 /**
 \mainpage GeographicLib library
 \author Charles F. F. Karney (charles at karney.com)
 \version @PROJECT_VERSION@
-\date 2017-02-15
+\date 2017-04-09
 
 The documentation for other versions is available at
-<tt>http://geographiclib.sourceforge.net/m.nn/</tt> for versions numbers
+<tt>https://geographiclib.sourceforge.io/m.nn/</tt> for versions numbers
 <tt>m.nn</tt> ≥ 1.0.
 
 \section abstract Abstract
@@ -68,7 +68,7 @@ GeographicLib is licensed under the
 see <a href="LICENSE.txt">LICENSE.txt</a> for the terms.
 
 For more information on GeographicLib, see
-- http://geographiclib.sourceforge.net/.
+- https://geographiclib.sourceforge.io/.
 
 \section contents Contents
  - \ref intro
@@ -79,8 +79,10 @@ For more information on GeographicLib, see
  - \ref other
  - \ref geoid
  - \ref gravity
+ - \ref normalgravity
  - \ref magnetic
  - \ref geodesic
+ - \ref nearest
  - \ref triaxial
  - \ref jacobi
  - \ref rhumb
@@ -141,8 +143,8 @@ Various \ref utilities are provided with the library.  These illustrate
 the use of the library and are useful in their own right.  This library
 and the utilities have been tested with g++ 5.3.1 under Linux, with
 Apple LLVM 7.0.2 under Mac OS X, and with MS Visual Studio 10 (2010), 11
-(2012), 12 (2013), and 14 (2015) compiled for 32 bit and 64 bit on
-Windows.
+(2012), 12 (2013), 14 (2015), and 15 (2017) compiled for 32 bit and 64
+bit on Windows.
 
 MATLAB, JavaScript, and Python interfaces are provided to portions of
 GeographicLib; see \ref other.
@@ -177,6 +179,7 @@ report any you find to charles at karney.com.
 <center>
 Forward to \ref install.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page install Installing GeographicLib
@@ -270,7 +273,7 @@ cmake.  Building under cmake depends on whether it is targeting an IDE
 (interactive development environment) or generating Unix-style
 makefiles.  The instructions below have been tested with makefiles and
 g++ on Linux and with the Visual Studio IDE on Windows.  It is known to
-work also for Visual Studio 12 Express (2013).
+work also for Visual Studio 2017 Build Tools.
 
 Here are the steps to compile and install GeographicLib:
 - Unpack the source, running one of \verbatim
@@ -367,6 +370,12 @@ Here are the steps to compile and install GeographicLib:
     and that's the recommended configuration.  In particular you should
     avoid "installing" the library with a precision different from
     double.
+  - <code>USE_BOOST_FOR_EXAMPLES</code> (default: OFF).  If set to ON,
+    then the Boost library is searched for in order to build the
+    NearestNeighbor example.
+  - <code>APPLE_MULTIPLE_ARCHITECTURES</code> (default: OFF).  If set to
+    ON, build for i386 and x86_64 and Mac OS X systems.  Otherwise,
+    build for the default architecture.
 - Build and install the software.  In non-IDE environments, run
   \verbatim
   make         # compile the library and utilities
@@ -381,8 +390,9 @@ Here are the steps to compile and install GeographicLib:
   GeographicLib.sln, pick the build type (e.g., Release), and select
   "Build Solution".  If this succeeds, select "RUN_TESTS" to build;
   finally, select "INSTALL" to install (RUN_TESTS and INSTALL are in
-  the CMakePredefinedTargets folder).  Alternatively, you run the
-  Visual Studio compiler from the command line with \verbatim
+  the CMakePredefinedTargets folder).  Alternatively (for example, if
+  you are using the Visual Studio 2017 Build Tools), you run the Visual
+  Studio compiler from the command line with \verbatim
   cmake --build . --config Release --target ALL_BUILD
   cmake --build . --config Release --target RUN_TESTS
   cmake --build . --config Release --target INSTALL \endverbatim
@@ -618,6 +628,7 @@ for distribution as \verbatim
 <center>
 Back to \ref intro.  Forward to \ref start.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page start Getting started
@@ -877,6 +888,7 @@ corresponding Wikipedia articles:
 <center>
 Back to \ref install.  Forward to \ref utilities.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page utilities Utility programs
@@ -946,15 +958,16 @@ e.g.,
  - echo 38SMB4488 | GeoConvert -d
 
 Online versions of four of these utilities are provided:
- - <a href="http://geographiclib.sourceforge.net/cgi-bin/GeoConvert">GeoConvert</a>
- - <a href="http://geographiclib.sourceforge.net/cgi-bin/GeodSolve">GeodSolve</a>
- - <a href="http://geographiclib.sourceforge.net/cgi-bin/Planimeter">Planimeter</a>
- - <a href="http://geographiclib.sourceforge.net/cgi-bin/GeoidEval">GeoidEval</a>
- - <a href="http://geographiclib.sourceforge.net/cgi-bin/RhumbSolve">RhumbSolve</a>
+ - <a href="https://geographiclib.sourceforge.io/cgi-bin/GeoConvert">GeoConvert</a>
+ - <a href="https://geographiclib.sourceforge.io/cgi-bin/GeodSolve">GeodSolve</a>
+ - <a href="https://geographiclib.sourceforge.io/cgi-bin/Planimeter">Planimeter</a>
+ - <a href="https://geographiclib.sourceforge.io/cgi-bin/GeoidEval">GeoidEval</a>
+ - <a href="https://geographiclib.sourceforge.io/cgi-bin/RhumbSolve">RhumbSolve</a>
 
 <center>
 Back to \ref start.  Forward to \ref organization.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page organization Code organization
@@ -1035,9 +1048,9 @@ 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.
 
-NearestNeighbor is a header-only classes for finding the nearest
-neighbor of a collection of points where the distance function obeys the
-triangle inequality, such as the geodesic distance.
+NearestNeighbor is a header-only class for efficiently \ref nearest of a
+collection of points where the distance function obeys the triangle
+inequality.  The geodesic distance obeys this condition.
 
 Geocentric and LocalCartesian convert between
 geodetic and geocentric or a local cartesian system.  The constructor for
@@ -1093,6 +1106,11 @@ numbers.  This allows the library to be easily switched to using floats,
 doubles, or long doubles.  However all the testing has been with real
 set to double and the library should be installed in this way.
 
+GeographicLib uniformly represents all angle-like variables (latitude,
+longitude, azimuth) in terms of degrees.  To convert from degrees to
+radians, multiple the quantity by Math::degree().  To convert from
+radians to degrees , divide the quantity by Math::degree().
+
 In general, the constructors for the classes in GeographicLib check
 their arguments and throw GeographicErr exceptions with a
 explanatory message if these are illegal.  The member functions, e.g.,
@@ -1160,6 +1178,7 @@ with, e.g.,
 <center>
 Back to \ref utilities.  Forward to \ref other.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page other Implementations in other languages
@@ -1370,6 +1389,7 @@ them.
 <center>
 Back to \ref organization.  Forward to \ref geoid.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page geoid Geoid height
@@ -1920,20 +1940,20 @@ requires a <code>SAVE</code> statement in subroutine
 <center>
 Back to \ref other.  Forward to \ref gravity.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page gravity Gravity models
 
 <center>
-Back to \ref geoid.  Forward to \ref magnetic.  Up to \ref contents.
+Back to \ref geoid.  Forward to \ref normalgravity.  Up to \ref contents.
 </center>
 
-GeographicLib can compute the earth's gravitational field with an
-earth gravity model using the GravityModel and
-GravityCircle classes and with the
-<a href="Gravity.1.html">Gravity</a> utility.  These models expand the
-gravitational potential of the earth as sum of spherical harmonics.  The
-models also specify a reference ellipsoid, relative to which geoid
+GeographicLib can compute the earth's gravitational field with an earth
+gravity model using the GravityModel and GravityCircle classes and with
+the <a href="Gravity.1.html">Gravity</a> utility.  These models expand
+the gravitational potential of the earth as sum of spherical harmonics.
+The models also specify a reference ellipsoid, relative to which geoid
 heights and gravity disturbances are measured.  Underlying all these
 models is <i>normal gravity</i> which is the exact solution for an
 idealized rotating ellipsoidal body.  This is implemented with the
@@ -1947,7 +1967,7 @@ Go to
  - \ref gravitygeoid
  - \ref gravityatmos
  - \ref gravityparallel
- - \ref normalgravity
+ - \ref normalgravity (now on its own page)
 
 The supported models are
  - <b>egm84</b>, the
@@ -2219,7 +2239,7 @@ As an illustration, here is egm2008.egm:
 EGMF-1
 # An Earth Gravity Model (Format 1) file.  For documentation on the
 # format of this file see
-# http://geographiclib.sourceforge.net/html/gravity.html#gravityformat
+# https://geographiclib.sourceforge.io/html/gravity.html#gravityformat
 Name            egm2008
 Publisher       National Geospatial Intelligence Agency
 Description     Earth Gravity Model 2008
@@ -2433,7 +2453,17 @@ optimizations, the computation would have taken about 200 days!)
 cmake will add in support for OpenMP for
 <code>examples/GeoidToGTX.cpp</code>, if it is available.
 
-\section normalgravity Normal gravity
+<center>
+Back to \ref geoid.  Forward to \ref normalgravity.  Up to \ref contents.
+</center>
+
+**********************************************************************/
+/**
+\page normalgravity Normal gravity
+
+<center>
+Back to \ref gravity.  Forward to \ref magnetic.  Up to \ref contents.
+</center>
 
 The NormalGravity class computes "normal gravity" which refers to the
 exact (classical) solution of an idealised system consisting of an
@@ -2448,12 +2478,20 @@ m<sup>3</sup>/s<sup>2</sup>, where \e G is the gravtitational constant.)
 The distribution of the mass \e M within the ellipsoid is such that the
 surface of the ellipsoid is at a constant normal potential where the
 normal potential is the sum of the gravitational potential (due to the
-gravitional attraction) and the centrifugal potention (due to the
+gravitational attraction) and the centrifugal potential (due to the
 rotation).  The resulting field exterior to the ellipsoid is called
 <i>normal gravity</i> and was found by Somigliana (1929).  Because the
 potential is constant on the ellipsoid it is sometimes referred to as
 the <i>level ellipsoid</i>.
 
+Go to
+ - \ref normalgravcoords
+ - \ref normalgravpot
+ - \ref normalgravmass
+ - \ref normalgravsurf
+ - \ref normalgravmean
+ - \ref normalgravj2
+
 References:
  - C. Somigliana, Teoria generale del campo gravitazionale dell'ellissoide
    di rotazione, Mem. Soc. Astron. Ital, <b>4</b>, 541--599 (1929).
@@ -2469,13 +2507,13 @@ References:
    exterieur, Jour. Liouville 5, 465--488 (1840), Note 2.
    http://sites.mathdoc.fr/JMPA/PDF/JMPA_1840_1_5_A41_0.pdf
 
-\subsection normalgravcoords Ellipsoidal coordinates
+\section normalgravcoords Ellipsoidal coordinates
 
 Two set of formulas are presented: those of Heiskanen and Moritz (1967)
 which are applicable to an oblate ellipsoid and a second set where the
 variables are distinguished with primes which apply to a prolate
 ellipsoid.  The primes are omitted from those variables which are the
-same in the two cases.  In the text, the parenthetical "resp." clauses
+same in the two cases.  In the text, the parenthetical "alt." clauses
 apply to prolate ellipsoids.
 
 Cylindrical coordinates \f$ R,Z \f$ are expressed in terms of
@@ -2494,10 +2532,10 @@ where
 \end{align}
 \f]
 Surfaces of constant \f$ u \f$ (or \f$ u' \f$) are confocal ellipsoids.
-The surface \f$ u = 0 \f$ (resp. \f$ u' = 0 \f$) corresponds to the
-focal disc of diameter \f$ 2E \f$ (resp. focal rod of length
+The surface \f$ u = 0 \f$ (alt. \f$ u' = 0 \f$) corresponds to the
+focal disc of diameter \f$ 2E \f$ (alt. focal rod of length
 \f$ 2E' \f$).  The level ellipsoid is given by \f$ u = b \f$
-(resp. \f$ u' = a \f$).  On the level ellipsoid, \f$ \beta \f$ is the
+(alt. \f$ u' = a \f$).  On the level ellipsoid, \f$ \beta \f$ is the
 familiar parametric latitude.
 
 In writing the potential and the gravity, it is useful to introduce the
@@ -2509,21 +2547,21 @@ functions
   Q'(z') &= \frac{(1+z'^2)^{3/2}}{2z'^3}
     \biggl[\biggl(2 + \frac3{z'^2}\biggr)\sinh^{-1}z' -
       \frac{3\sqrt{1+z'^2}}{z'}\biggr],\\
-  G(z) &= \biggl(3Q(z)+z\frac{dQ(z)}{dz}\biggr)(1+z^2)\\
+  H(z) &= \biggl(3Q(z)+z\frac{dQ(z)}{dz}\biggr)(1+z^2)\\
        &= \frac1{z^4}\biggl[3(1+z^2)
          \biggl(1-\frac{\tan^{-1}z}z\biggr)-z^2\biggr],\\
-  G'(z') &= \frac{3Q'(z')}{1+z'^2}+z'\frac{dQ'(z')}{dz'}\\
+  H'(z') &= \frac{3Q'(z')}{1+z'^2}+z'\frac{dQ'(z')}{dz'}\\
          &= \frac{1+z'^2}{z'^4}
            \biggl[3\biggl(1-\frac{\sqrt{1+z'^2}\sinh^{-1}z'}{z'}\biggr)
            +z'^2\biggr].
 \end{align}
 \f]
 The function arguments are \f$ z = E/u \f$
-(resp. \f$ z' = E'/u' \f$) and the unprimed and primed quantities are
+(alt. \f$ z' = E'/u' \f$) and the unprimed and primed quantities are
 related by
 \f[
 \begin{align}
-Q'(z') = Q(z),&{} \qquad G'(z') = G(z),\\
+Q'(z') = Q(z),&{} \qquad H'(z') = H(z),\\
 z'^2 = -\frac{z^2}{1 + z^2},&{} \qquad z^2 = -\frac{z'^2}{1 + z'^2}.
 \end{align}
 \f]
@@ -2531,14 +2569,14 @@ The functions \f$ q(u) \f$ and \f$ q'(u) \f$ used by Heiskanen and
 Moritz are given by
 \f[
   q(u) = \frac{E^3}{u^3}Q\biggl(\frac Eu\biggr),\qquad
-  q'(u) = \frac{E^2}{u^2}G\biggl(\frac Eu\biggr).
+  q'(u) = \frac{E^2}{u^2}H\biggl(\frac Eu\biggr).
 \f]
-The functions \f$ Q(z) \f$, \f$ Q'(z') \f$, \f$ G(z) \f$, and
-\f$ G'(z') \f$ are more convenient for use in numerical codes because
+The functions \f$ Q(z) \f$, \f$ Q'(z') \f$, \f$ H(z) \f$, and
+\f$ H'(z') \f$ are more convenient for use in numerical codes because
 they are finite in the spherical limit \f$ E \rightarrow 0 \f$, i.e.,
-\f$ Q(0) = Q'(0) = \frac2{15} \f$, and \f$ G(0) = G'(0) = \frac25 \f$.
+\f$ Q(0) = Q'(0) = \frac2{15} \f$, and \f$ H(0) = H'(0) = \frac25 \f$.
 
-\subsection normalgravpot The normal potential
+\section normalgravpot The normal potential
 
 The normal potential is the sum of three components, a mass term, a
 quadrupole term and a centrifugal term,
@@ -2575,11 +2613,26 @@ non-rotating ellipsoid.  \f$ U_q + U_r \f$ is the potential for a
 massless rotating ellipsoid.  Combining all the terms, \f$ U \f$ is the
 normal potential for a massive rotating ellipsoid.
 
-\subsection normalgravmass The mass distribution
+The figure shows normal gravity for the case \f$ GM = 1 \f$,
+\f$ a = 1 \f$, \f$ b = 0.8 \f$, \f$ \omega = 0.3 \f$.  The level
+ellipsoid is shown in red.  Contours of constant gravity potential are
+shown in blue; the contour spacing is constant outside the ellipsoid and
+equal to 1/20 of the difference between the potentials on the ellipsoid
+and at the geostationary point (\f$ R = 2.2536 \f$, \f$ Z = 0 \f$);
+inside the ellipsoid the contour spacing is 5 times greater.  The green
+lines are stream lines for the gravity; these are spaced at intervals of
+10° in parametric latitude on the surface of the ellipsoid.  The
+normal gravity is continued into the level ellipsoid under the
+assumption that the mass is concentrated on the focal disc, shown in
+black.
+
+\image html normal-gravity-potential-1.svg "Normal gravity"
+
+\section normalgravmass The mass distribution
 
 Typically, the normal potential, \f$ U \f$, is only of interest for
-outside the ellipsoid \f$ u \ge b \f$ (resp. \f$ u' \ge a \f$).  In
-planetary applications a open problem is finding a mass distribution
+outside the ellipsoid \f$ u \ge b \f$ (alt. \f$ u' \ge a \f$).  In
+planetary applications, an open problem is finding a mass distribution
 which is in hydrostatic equilibrium (the mass density is non-negative
 and a non-decreasing function of the potential interior to the
 ellipsoid).
@@ -2599,8 +2652,8 @@ ellipsoid.
 
 Observing that \f$ U_m \f$ and \f$ U_q \f$ as defined above obey
 \f$ \nabla^2 U_m = \nabla^2 U_q = 0 \f$ everywhere for \f$ u > 0 \f$
-(resp. \f$ u' > 0 \f$), we see that these potentials correspond to
-masses concentrated at \f$ u = 0 \f$ (resp. \f$ u' = 0 \f$).
+(alt. \f$ u' > 0 \f$), we see that these potentials correspond to
+masses concentrated at \f$ u = 0 \f$ (alt. \f$ u' = 0 \f$).
 
 In the oblate case, \f$ U_m \f$ is generated by a massive disc at
 \f$ Z = 0 \f$, \f$ R < E \f$, with mass density (mass per unit area) \f$
@@ -2664,7 +2717,7 @@ J_2 & = \frac{C - A}{Ma^2},
 \f]
 where \f$ J_2 \f$ is the <i>dynamical form factor</i>.
 
-\subsection normalgravsurg The surface gravity
+\section normalgravsurf The surface gravity
 
 Each term in the potential contributes to the gravity on the surface of
 the ellipsoid
@@ -2699,15 +2752,15 @@ where
 \f[
 \begin{align}
 \gamma_{ma} &= \frac{GM}{ab},\qquad \gamma_{mb} = \frac{GM}{a^2},\\
-\gamma_{qa} &= -\frac{\omega^2 a}6 \frac{G(E/b)}{Q(E/b)}
-             = -\frac{\omega^2 a}6 \frac{G'(E'/a)}{Q'(E'/a)},\\
-\gamma_{qb} &= -\frac{\omega^2 b}3 \frac{G(E/b)}{Q(E/b)}
-             = -\frac{\omega^2 b}3 \frac{G'(E'/a)}{Q'(E'/a)},\\
+\gamma_{qa} &= -\frac{\omega^2 a}6 \frac{H(E/b)}{Q(E/b)}
+             = -\frac{\omega^2 a}6 \frac{H'(E'/a)}{Q'(E'/a)},\\
+\gamma_{qb} &= -\frac{\omega^2 b}3 \frac{H(E/b)}{Q(E/b)}
+             = -\frac{\omega^2 b}3 \frac{H'(E'/a)}{Q'(E'/a)},\\
 \gamma_{ra} &= -\omega^2 a,\qquad \gamma_{rb} = 0.
 \end{align}
 \f]
 
-\subsection normalgravmean The mean gravity
+\section normalgravmean The mean gravity
 
 Performing an average of the surface gravity over the area of the
 ellipsoid gives
@@ -2737,7 +2790,7 @@ resulting in
     \biggl(GM - \frac{2\omega^2 a^2b}3\biggr).
 \f]
 
-\subsection normalgrav Possible values of the dynamical form factor
+\section normalgravj2 Possible values of the dynamical form factor
 
 The solution for the normal gravity is well defined for arbitrary
 \f$ M \f$, \f$ \omega \f$, \f$ a > 0\f$, and \f$ f < 1 \f$.  (Note that
@@ -2773,14 +2826,15 @@ J_2 = -\frac13 \frac{\omega^2 a^3}{GM}
 results in a sphere (\f$ f = 0 \f$).
 
 <center>
-Back to \ref geoid.  Forward to \ref magnetic.  Up to \ref contents.
+Back to \ref gravity.  Forward to \ref magnetic.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page magnetic Magnetic models
 
 <center>
-Back to \ref gravity.  Forward to \ref geodesic.  Up to \ref contents.
+Back to \ref normalgravity.  Forward to \ref geodesic.  Up to \ref contents.
 </center>
 
 GeographicLib can compute the earth's magnetic field by a magnetic
@@ -3096,7 +3150,7 @@ As an illustration, here is igrf11.wmm:
 WMMF-1
 # A World Magnetic Model (Format 1) file.  For documentation on the
 # format of this file see
-# http://geographiclib.sourceforge.net/html/magnetic.html#magneticformat
+# https://geographiclib.sourceforge.io/html/magnetic.html#magneticformat
 Name            igrf11
 Description     International Geomagnetic Reference Field 11th Generation
 URL             http://ngdc.noaa.gov/IAGA/vmod/igrf.html
@@ -3121,14 +3175,15 @@ ID              IGRF11-A
 \endverbatim
 
 <center>
-Back to \ref gravity.  Forward to \ref geodesic.  Up to \ref contents.
+Back to \ref normalgravity.  Forward to \ref geodesic.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page geodesic Geodesics on an ellipsoid of revolution
 
 <center>
-Back to \ref magnetic.  Forward to \ref triaxial.  Up to \ref contents.
+Back to \ref magnetic.  Forward to \ref nearest.  Up to \ref contents.
 </center>
 
 Geodesic and GeodesicLine provide accurate
@@ -3185,12 +3240,12 @@ References:
    J. Geodesy 87(1), 43--55 (2013);
    DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    10.1007/s00190-012-0578-z</a>;
-   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    geod-addenda.html</a>;
    resource page:
-   <a href="http://geographiclib.sourceforge.net/geod.html"> geod.html</a>.
+   <a href="https://geographiclib.sourceforge.io/geod.html"> geod.html</a>.
  - A collection of some papers on geodesics is available at
-   http://geographiclib.sourceforge.net/geodesic-papers/biblio.html
+   https://geographiclib.sourceforge.io/geodesic-papers/biblio.html
  - The wikipedia page,
    <a href="https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid">
    Geodesics on an ellipsoid</a>.
@@ -4084,14 +4139,110 @@ as part of the general solution and, as much as possible, we allow all
 geodesics to be computed by the general method.
 
 <center>
-Back to \ref magnetic.  Forward to \ref triaxial.  Up to \ref contents.
+Back to \ref magnetic.  Forward to \ref nearest.  Up to \ref contents.
+</center>
+
+**********************************************************************/
+/**
+\page nearest Finding nearest neighbors
+
+<center>
+Back to \ref geodesic.  Forward to \ref  triaxial.  Up to \ref contents.
+</center>
+
+The problem of finding the maritime boundary defined by the "median
+line" is discussed in Section 14 of
+ - C. F. F. Karney,
+   <a href="https://arxiv.org/abs/1102.1215v1">Geodesics
+   on an ellipsoid of revolution</a>,
+   Feb. 2011; preprint
+   <a href="https://arxiv.org/abs/1102.1215v1">arxiv:1102.1215v1</a>.
+ .
+Figure 14 shows the median line which is equidistant from Britain and
+mainland Europe.  Determining the median line involves finding, for any
+given \e P, the closest points on the coast of Britain and on the coast
+of mainland Europe.  The operation of finding the closest in a set of
+points is usually referred to as the <i>nearest neighbor</i> problem and
+the NearestNeighbor class implements an efficient algorithm for solving
+it.
+
+The NearestNeighbor class implements nearest-neighbor calculations using
+the vantage-point tree described by
+- J. K. Uhlmann,
+  <a href="https://doi.org/10.1016/0020-0190(91)90074-r">
+  Satisfying general proximity/similarity queries with metric trees</a>,
+  Information Processing Letters 40 175–179 (1991).
+- P. N. Yianilos,
+  <a href="http://pnylab.com/pny/papers/vptree/vptree/">
+  Data structures and algorithms for nearest neighbor search in general
+  metric spaces</a>, Proc. 4th ACM-SIAM Symposium on Discrete Algorithms,
+  (SIAM, 1993). pp. 311–321.
+
+Given a set of points \e x, \e y, \e z, …, in some space and a
+distance function \e d satisfying the metric conditions,
+\f[
+\begin{align}
+ d(x,y) &\ge 0,\\
+ d(x,y) &= 0, \ \text{iff $x = y$},\\
+ d(x,y) &= d(y,x),\\
+ d(x,z) &\le d(x,y) + d(y,z),
+\end{align}
+\f]
+the vantage-point (VP) tree provides an efficient way of determining
+nearest neighbors.  The geodesic distance (implemented by the Geodesic
+class) satisfies these metric conditions, while the great ellipse
+distance and the rhumb line distance <i>do not</i> (they do not satisfy
+the last condition, the triangle inequality).  Typically the cost of
+constructing a VP tree of \e N points is \e N log \e N, while the cost
+of a query is log \e N.  Thus a VP tree should be used in situations
+where \e N is large and at least log \e N queries are to be made.  The
+condition, \e N is large, means that \f$ N \gg 2^D \f$, where \e D is
+the dimensionality of the space.
+
+- This implementation includes Yianilos' upper and lower bounds for the
+  inside and outside sets.  This helps limit the number of searches
+  (compared to just using the median distance).
+- Rather than do a depth-first or breath-first search on the tree, the
+  nodes to be processed are put on a priority queue with the nodes most
+  likely to contain close points processed first.  Frequently, this allows
+  nodes lower down on the priority queue to be skipped.
+- This technique also allows non-exhaustive searchs to be performed (to
+  answer questions such as "are there any points within 1km of the query
+  point?).
+- When building the tree, the first vantage point is (arbitrarily)
+  chosen as the middle element of the set.  Thereafter, the points
+  furthest from the parent vantage point in both the inside and outside
+  sets are selected as the children's vantage points.  This information
+  is already available from the computation of the upper and lower
+  bounds of the children.  This choice seems to lead to a reasonably
+  optimized tree.
+- The leaf nodes can contain a bucket of points (instead of just a vantage
+  point).
+- Coincident points are allowed in the set; these are treated as distinct
+  points.
+
+The figure below shows the construction of the VP tree for the points
+making up the coastlines of Britain and Ireland (about 5000 points shown
+in blue).  The set of points is recursively split into 2 equal "inside"
+and "outside" subsets based on the distance from a "vantage point".  The
+boundaries between the inside and outside sets are shown as green
+circular arcs (arcs of geodesic circles).  At each stage, the newly
+added vantage points are shown as red dots and the vantage points for
+the next stage are shown as red plus signs.  The data is shown in the
+Cassini-Soldner projection with a central meridian of 5°W.
+
+\image html vptree.gif "Vantage-point tree"
+
+<center>
+Back to \ref geodesic.  Forward to \ref triaxial.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page triaxial Geodesics on a triaxial ellipsoid
 
 <center>
-Back to \ref geodesic.  Forward to \ref jacobi.  Up to \ref contents.
+Back to \ref nearest.  Forward to \ref jacobi.  Up to \ref contents.
 </center>
 
 Jacobi (1839) showed that the problem of geodesics on a triaxial
@@ -4152,7 +4303,7 @@ Go to
     <a href="http://hp41programs.yolasite.com/geod3axial.php"> here</a>.
  -# I do not give full citations of the papers here.  You can find these
     in the
-    <a href="http://geographiclib.sourceforge.net/geodesic-papers/biblio.html">
+    <a href="https://geographiclib.sourceforge.io/geodesic-papers/biblio.html">
     Geodesic Bibliography</a>; this includes links to online
     versions of the papers.
  -# An alternative to exploring geodesics using Jacobi's solution is to
@@ -4172,7 +4323,7 @@ Go to
       J. Geodesy 87(1), 43--55 (2013);
       DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
       10.1007/s00190-012-0578-z</a>;
-      addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+      addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
       geod-addenda.html</a>.
 
 \section triaxial-coords Triaxial coordinate systems
@@ -4664,15 +4815,15 @@ The shortest path found by this method is unique unless:
 This material is now on its own page; see \ref jacobi.
 
 <center>
-Back to \ref geodesic.  Forward to \ref jacobi.  Up to \ref contents.
+Back to \ref nearest.  Forward to \ref jacobi.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page jacobi Jacobi's conformal projection
 
 <center>
-Back to \ref triaxial.  Forward to \ref rhumb.  Up to
-\ref contents.
+Back to \ref triaxial.  Forward to \ref rhumb.  Up to \ref contents.
 </center>
 
 In addition to solving the geodesic problem for the triaxial ellipsoid,
@@ -4682,7 +4833,7 @@ of ellipsoid.  He covers this in greater detail in
 <i>Vorlesungen über Dynamik</i>, §28</a>, which is now
 available in an <a href="https://www.worldcat.org/oclc/440645889">
 English translation: Lectures on Dynamics</a>
-(<a href="http://geographiclib.sourceforge.net/jacobi-errata.html">
+(<a href="https://geographiclib.sourceforge.io/jacobi-errata.html">
 errata</a>).
 
 \section jacobi-conformal Conformal projection
@@ -4972,13 +5123,13 @@ code.  It is not part of GeographicLib itself.
 <center>
 Back to \ref triaxial.  Forward to \ref rhumb.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page rhumb Rhumb lines
 
 <center>
-Back to \ref jacobi.  Forward to \ref greatellipse.  Up to
-\ref contents.
+Back to \ref jacobi.  Forward to \ref greatellipse.  Up to \ref contents.
 </center>
 
 The Rhumb and RhumbLine classes together with the
@@ -5055,30 +5206,32 @@ References:
    <a href="https://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">
+   addenda: <a href="https://geographiclib.sourceforge.io/tm-addenda.html">
    tm-addenda.html</a>;
    preprint:
    <a href="https://arxiv.org/abs/1002.1417"> arXiv:1002.1417</a>;
    resource page:
-   <a href="http://geographiclib.sourceforge.net/tm.html"> tm.html</a>.
+   <a href="https://geographiclib.sourceforge.io/tm.html"> tm.html</a>.
  - C. F. F. Karney,
    <a href="https://doi.org/10.1007/s00190-012-0578-z">
    Algorithms for geodesics</a>,
    J. Geodesy 87(1), 43--55 (2013);
    DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    10.1007/s00190-012-0578-z</a>;
-   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    geod-addenda.html</a>;
    resource page:
-   <a href="http://geographiclib.sourceforge.net/geod.html"> geod.html</a>.
+   <a href="https://geographiclib.sourceforge.io/geod.html"> geod.html</a>.
  - L. Krüger,
    <a href="https://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).
  - P. Osborne,
-   <a href="http://www.mercator99.webspace.virginmedia.com/">
-   The Mercator Projections</a> (2013), §2.5 and §6.5.
+   <a href="https://doi.org/10.5281/zenodo.35392">
+   The Mercator Projections</a> (2013), §2.5 and §6.5;
+   DOI: <a href="https://doi.org/10.5281/zenodo.35392">
+   10.5281/zenodo.35392</a>.
  - W. M. Smart
    <a href="https://doi.org/10.1093/mnras/106.2.124">
    On a Problem in Navigation</a>
@@ -5473,7 +5626,7 @@ desire for speed.
 \section dividedclenshaw Clenshaw evaluation of differenced sums
 
 The use of
-<a href="https://en.wikipedia.org/wiki/Clenshaw_algorithm#Geodetic_applications">
+<a href="https://en.wikipedia.org/wiki/Clenshaw_algorithm#Meridian_arc_length_on_the_ellipsoid">
 Clenshaw summation</a> for summing series of the form,
 \f[
 g(x) = \sum_{k=1}^N c_k \sin kx,
@@ -5566,16 +5719,15 @@ unchanged.  The result for the sum is
 \f]
 
 <center>
-Back to \ref jacobi.  Forward to \ref greatellipse.  Up to
-\ref contents.
+Back to \ref jacobi.  Forward to \ref greatellipse.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page greatellipse Great Ellipses
 
 <center>
-Back to \ref rhumb.  Forward to \ref transversemercator.  Up to
-\ref contents.
+Back to \ref rhumb.  Forward to \ref transversemercator.  Up to \ref contents.
 </center>
 
 Great ellipses are sometimes proposed (Williams, 1996; Pallikaris &
@@ -5613,7 +5765,7 @@ References:
  - C. F. F. Karney,
    <a href="https://doi.org/10.1007/s00190-012-0578-z">
    Algorithms for geodesics</a>, J. Geodesy 87(1), 43--55 (2013);
-   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    geod-addenda.html</a>.
  - A. Pallikaris & G. Latsas,
    <a href="https://doi.org/1017/S0373463309005323">
@@ -5929,9 +6081,9 @@ time of closest approach, median lines, tri-points, etc.) are all
 amenable to simple and fast solutions in terms of geodesics.
 
 <center>
-Back to \ref rhumb.  Forward to \ref transversemercator.  Up to
-\ref contents.
+Back to \ref rhumb.  Forward to \ref transversemercator.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page transversemercator Transverse Mercator projection
@@ -5969,18 +6121,18 @@ References:
    <a href="https://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">
+   addenda: <a href="https://geographiclib.sourceforge.io/tm-addenda.html">
    tm-addenda.html</a>;
    preprint:
    <a href="https://arxiv.org/abs/1002.1417"> arXiv:1002.1417</a>;
    resource page:
-   <a href="http://geographiclib.sourceforge.net/tm.html"> tm.html</a>.
+   <a href="https://geographiclib.sourceforge.io/tm.html"> tm.html</a>.
  .
 The algorithm for TransverseMercator is based on
 Krüger (1912); that for TransverseMercatorExact is
 based on Lee (1976).
 
-See <a href="http://geographiclib.sourceforge.net/tm-grid.kmz"
+See <a href="https://geographiclib.sourceforge.io/tm-grid.kmz"
 type="application/vnd.google-earth.kmz"> tm-grid.kmz</a>, for an
 illustration of the exact transverse Mercator grid in Google Earth.
 
@@ -6214,18 +6366,18 @@ This section gives color versions of the figures in
    <a href="https://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">
+   addenda: <a href="https://geographiclib.sourceforge.io/tm-addenda.html">
    tm-addenda.html</a>;
    preprint:
    <a href="https://arxiv.org/abs/1002.1417"> arXiv:1002.1417</a>;
    resource page:
-   <a href="http://geographiclib.sourceforge.net/tm.html"> tm.html</a>.
+   <a href="https://geographiclib.sourceforge.io/tm.html"> tm.html</a>.
 
 \b NOTE:
 The numbering of the figures matches that in the paper cited above.  The
 figures in this section are relatively small in order to allow them to
 be displayed quickly.  Vector versions of these figures are available in
-<a href="http://geographiclib.sourceforge.net/tm-figs.pdf"
+<a href="https://geographiclib.sourceforge.io/tm-figs.pdf"
 type="application/pdf"> tm-figs.pdf</a>.  This allows you to magnify the
 figures to show the details more clearly.
 
@@ -6313,13 +6465,13 @@ reflection symmetry on all the four sides of Fig. 3(c).
 <center>
 Back to \ref greatellipse.  Forward to \ref geocentric.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page geocentric Geocentric coordinates
 
 <center>
-Back to \ref transversemercator.  Forward to \ref auxlat.  Up to
-\ref contents.
+Back to \ref transversemercator.  Forward to \ref auxlat.  Up to \ref contents.
 </center>
 
 The implementation of Geocentric::Reverse is adapted from
@@ -6429,19 +6581,22 @@ However the choice of independent variables in these methods leads
 to a loss of accuracy for points near the equatorial plane.
 
 <center>
-Back to \ref transversemercator.  Forward to \ref auxlat.  Up to
-\ref contents.
-
+Back to \ref transversemercator.  Forward to \ref auxlat.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page auxlat Auxiliary latitudes
 
 <center>
-Back to \ref geocentric.  Forward to \ref highprec.  Up to
-\ref contents.
+Back to \ref geocentric.  Forward to \ref highprec.  Up to \ref contents.
 </center>
 
+Go to
+ - \ref auxlatformula
+ - \ref auxlattable
+ - \ref auxlaterror
+
 Six latitudes are used by GeographicLib:
 - φ, the (geographic) latitude;
 - β, the parametric latitude;
@@ -6453,42 +6608,65 @@ Six latitudes are used by GeographicLib:
 The last five of these are called <i>auxiliary latitudes</i>.  These
 quantities are all defined in the
 <a href="https://en.wikipedia.org/wiki/Latitude#Auxiliary_latitudes">
-Wikipedia article on latitudes</a>.  (In addition there's the isometric
-latitude, ψ = sinh<sup>−1</sup> tanχ; but this is not
-an angle-like variable and we don't consider it further here.)  The
-relations between φ, β, and θ are all simple elementary
-functions.  The latitudes χ and ξ can be expressed as elementary
-functions of φ; however, these functions can only be inverted
-iteratively.  The rectifying latitude μ as a function of φ (or
-β) involves the incomplete elliptic integral of the second kind
-(which is not an elementary function) and this needs to be inverted
-iteratively.  The Ellipsoid class evaluates all the auxiliary latitudes
-(and the corresponding inverse relations) in terms of their basic
-definitions.
+Wikipedia article on latitudes</a>.
+
+In addition there's the isometric latitude, ψ, defined by ψ =
+gd<sup>−1</sup>χ = sinh<sup>−1</sup> tanχ and
+χ = gdψ = tan<sup>−1</sup> sinhψ.  This is not an
+angle-like variable (for example, it diverges at the poles) and so we
+don't treat it further here.  However conversions between ψ and any
+of the auxiliary latitudes is easily accomplished via an intermediate
+conversion to χ.
+
+The relations between φ, β, and θ are all simple
+elementary functions.  The latitudes χ and ξ can be expressed as
+elementary functions of φ; however, these functions can only be
+inverted iteratively.  The rectifying latitude μ as a function of
+φ (or β) involves the incomplete elliptic integral of the
+second kind (which is not an elementary function) and this needs to be
+inverted iteratively.  The Ellipsoid class evaluates all the auxiliary
+latitudes (and the corresponding inverse relations) in terms of their
+basic definitions.
 
 An alternative method of evaluating these auxiliary latitudes is in
 terms of trigonometric series.  This offers some advantages:
 - these series give a uniform way of expressing any latitude in terms of
   any other latitude;
-- the evaluation may be faster, particularly if Clenshaw summation is
-  used;
+- the evaluation may be faster, particularly if
+  <a href="https://en.wikipedia.org/wiki/Clenshaw_algorithm#Meridian_arc_length_on_the_ellipsoid">
+  Clenshaw summation</a> is used;
 - provided that the flattening is sufficiently small, the result may be
   more accurate.
 
 Here we give the complete matrix of relations between all six latitudes;
-there are 30 (= 6 × 5) such relations.  The
-expansions are in terms of the third flattening <i>n</i> =
+there are 30 (= 6 × 5) such relations.  These
+expansions complement the work of
+- O. S. Adams,
+  <a href="http://docs.lib.noaa.gov/rescue/cgs_specpubs/QB275U35no671921.pdf">
+  Latitude developments connected with geodesy and cartography</a>,
+  Spec. Pub. 67 (US Coast and Geodetic Survey, 1921).
+- P. Osborne,
+  <a href="https://dx.doi.org/10.5281/zenodo.35392">
+  The Mercator Projections</a> (2013), Chap. 5.
+- S. Orihuela,
+  <a href="https://sites.google.com/site/geodesiafich/funciones_latitud.pdf">
+  Funciones de Latitud</a> (2013).
+.
+Here, the expansions are in terms of the third flattening <i>n</i> =
 (<i>a</i> − <i>b</i>)/(<i>a</i> + <i>b</i>).
-(Similar results have been obtained by Sebastián Orihuela,
-<a href="https://sites.google.com/site/geodesiafich/funciones_latitud.pdf">
-<i>Funciones de Latitud</i></a>, 2013.)
-This results in expansions in which half the coefficients vanish for all
-relations between φ, β, θ, and μ.  In addition, the
-expansions converge for <i>b</i>/<i>a</i> ∈ (0, ∞).
-(Some authors use the eccentricity as the expansion parameter, but the
-resulting series only converge for <i>b</i>/<i>a</i> ∈
-(0, √2).)  These expansions were obtained with the the maxima
-code, <a href="auxlat.mac">auxlat.mac</a>.
+This choice of expansion parameter results in expansions in which half
+the coefficients vanish for all relations between φ, β,
+θ, and μ.  In addition, the expansions converge for
+<i>b</i>/<i>a</i> ∈ (0, ∞).  These expansions were
+obtained with the the maxima code, <a href="auxlat.mac">auxlat.mac</a>.
+
+Adams (1921) uses the eccentricity squared <i>e</i><sup>2</sup> as the
+expansion parameter, but the resulting series only converge for
+<i>b</i>/<i>a</i> ∈ (0, √2).  In addition, it is shown
+in \ref auxlaterror, that the errors when the series are truncated are
+much worse than for the corresponding series in \e n.
+
+\section auxlatformula Series approximations for conversions
 
 Here are the relations between φ, β, θ, and μ carried
 out to 4th order in <i>n</i>:
@@ -6666,6 +6844,8 @@ to 3rd order in <i>n</i>:
 \end{align}
 \f]
 
+\section auxlattable Series approximations in tabular form
+
 Finally, this is a listing of all the coefficients for the expansions
 carried out to 8th order in <i>n</i>.  Here's how to interpret this
 data: the 5th line for φ − θ is <tt>[32/5, 0,
@@ -6973,11 +7153,138 @@ data: the 5th line for φ − θ is <tt>[32/5, 0,
    [-14744861191/651283132500]<br>
 </small></tt>
 
+\section auxlaterror Truncation errors
+
+There are two sources of error when using these series.  The truncation
+error arises from retaing terms up to a certain order in \e n; it is the
+absolute difference between the value of the truncated series compared
+with the exact latitude (evaluated with exact arithmetic).  In addition,
+using standard double-precision arithmetic entails accumulating
+round-off errors so that at the end of a complex calculation a few of
+the trailing bits of the result are wrong.
+
+Here's a table of the truncation errors.  The errors are given in "units
+in the last place (ulp)" where 1 ulp = 2<sup>−53</sup> radian =
+6.4 × 10<sup>−15</sup> degree = 2.3 ×
+10<sup>−11</sup> arcsecond which is a measure of the round-off
+error for double precision.  Here is some rough guidance on how to
+interpret these errors:
+- if the truncation error is less than 1 ulp, then round-off errors
+  dominate;
+- if the truncation error is greater than 8 ulp, then truncation errors
+  dominate;
+- otherwise, round-off and truncation errors are comparable.
+.
+The truncation errors are given accurate to 2 significant figures.
+
 <center>
-Back to \ref geocentric.  Forward to \ref highprec.  Up to
-\ref contents.
+<table>
+<caption>Auxiliary latitude truncation errors (ulp)</caption>
+<tr>
+<th rowspan="2"> expression
+<th colspan="2"> [<i>f</i> = 1/150, order = 6]
+<th colspan="2"> [<i>f</i> = 1/297, order = 5]
+<tr>
+<th> <i>n</i> series <th> <i>e</i><sup>2</sup> series
+<th> <i>n</i> series <th> <i>e</i><sup>2</sup> series
+<tr><td>  β − φ   <td><tt><center> 0.0060  </center></tt><td><tt><center> 28    </center></tt><td><tt><center>  0.035  </center></tt><td><tt><center>  41    </center></tt>
+<tr><td>   φ − β  <td><tt><center> 0.0060  </center></tt><td><tt><center> 28    </center></tt><td><tt><center>  0.035  </center></tt><td><tt><center>  41    </center></tt>
+<tr><td> θ − φ   <td><tt><center> 2.9     </center></tt><td><tt><center> 82    </center></tt><td><tt><center>  6.0    </center></tt><td><tt><center> 120    </center></tt>
+<tr><td>   φ − θ <td><tt><center> 2.9     </center></tt><td><tt><center> 82    </center></tt><td><tt><center>  6.0    </center></tt><td><tt><center> 120    </center></tt>
+<tr><td> θ − β  <td><tt><center> 0.0060  </center></tt><td><tt><center> 28    </center></tt><td><tt><center>  0.035  </center></tt><td><tt><center>  41    </center></tt>
+<tr><td>  β − θ <td><tt><center> 0.0060  </center></tt><td><tt><center> 28    </center></tt><td><tt><center>  0.035  </center></tt><td><tt><center>  41    </center></tt>
+<tr><td>    μ − φ   <td><tt><center> 0.037   </center></tt><td><tt><center> 41    </center></tt><td><tt><center>  0.18   </center></tt><td><tt><center>  60    </center></tt>
+<tr><td>   φ − μ    <td><tt><center> 0.98    </center></tt><td><tt><center> 59    </center></tt><td><tt><center>  2.3    </center></tt><td><tt><center>  84    </center></tt>
+<tr><td>    μ − β  <td><tt><center> 0.00069 </center></tt><td><tt><center>  5.8  </center></tt><td><tt><center>  0.0024 </center></tt><td><tt><center>   9.6  </center></tt>
+<tr><td>  β − μ    <td><tt><center> 0.13    </center></tt><td><tt><center> 12    </center></tt><td><tt><center>  0.35   </center></tt><td><tt><center>  19    </center></tt>
+<tr><td>    μ − θ <td><tt><center> 0.24    </center></tt><td><tt><center> 30    </center></tt><td><tt><center>  0.67   </center></tt><td><tt><center>  40    </center></tt>
+<tr><td> θ − μ    <td><tt><center> 0.099   </center></tt><td><tt><center> 23    </center></tt><td><tt><center>  0.23   </center></tt><td><tt><center>  33    </center></tt>
+<tr><td>   χ − φ   <td><tt><center> 0.78    </center></tt><td><tt><center> 43    </center></tt><td><tt><center>  2.1    </center></tt><td><tt><center>  64    </center></tt>
+<tr><td>   φ − χ   <td><tt><center> 9.0     </center></tt><td><tt><center> 71    </center></tt><td><tt><center> 17      </center></tt><td><tt><center> 100    </center></tt>
+<tr><td>   χ − β  <td><tt><center> 0.018   </center></tt><td><tt><center>  3.7  </center></tt><td><tt><center>  0.11   </center></tt><td><tt><center>   6.4  </center></tt>
+<tr><td>  β − χ   <td><tt><center> 1.7     </center></tt><td><tt><center> 16    </center></tt><td><tt><center>  3.4    </center></tt><td><tt><center>  24    </center></tt>
+<tr><td>   χ − θ <td><tt><center> 0.18    </center></tt><td><tt><center> 31    </center></tt><td><tt><center>  0.56   </center></tt><td><tt><center>  43    </center></tt>
+<tr><td> θ − χ   <td><tt><center> 0.87    </center></tt><td><tt><center> 23    </center></tt><td><tt><center>  1.9    </center></tt><td><tt><center>  32    </center></tt>
+<tr><td>   χ − μ    <td><tt><center> 0.022   </center></tt><td><tt><center>  0.56 </center></tt><td><tt><center>  0.11   </center></tt><td><tt><center>   0.91 </center></tt>
+<tr><td>    μ − χ   <td><tt><center> 0.31    </center></tt><td><tt><center>  1.2  </center></tt><td><tt><center>  0.86   </center></tt><td><tt><center>   2.0  </center></tt>
+<tr><td>    ξ − φ   <td><tt><center> 0.015   </center></tt><td><tt><center> 39    </center></tt><td><tt><center>  0.086  </center></tt><td><tt><center>  57    </center></tt>
+<tr><td>   φ − ξ    <td><tt><center> 0.34    </center></tt><td><tt><center> 53    </center></tt><td><tt><center>  1.1    </center></tt><td><tt><center>  75    </center></tt>
+<tr><td>    ξ − β  <td><tt><center> 0.00042 </center></tt><td><tt><center>  6.3  </center></tt><td><tt><center>  0.0039 </center></tt><td><tt><center>  10    </center></tt>
+<tr><td>  β − ξ    <td><tt><center> 0.040   </center></tt><td><tt><center> 10    </center></tt><td><tt><center>  0.15   </center></tt><td><tt><center>  15    </center></tt>
+<tr><td>    ξ − θ <td><tt><center> 0.28    </center></tt><td><tt><center> 28    </center></tt><td><tt><center>  0.75   </center></tt><td><tt><center>  38    </center></tt>
+<tr><td> θ − ξ    <td><tt><center> 0.040   </center></tt><td><tt><center> 23    </center></tt><td><tt><center>  0.11   </center></tt><td><tt><center>  33    </center></tt>
+<tr><td>    ξ − μ    <td><tt><center> 0.015   </center></tt><td><tt><center>  0.79 </center></tt><td><tt><center>  0.058  </center></tt><td><tt><center>   1.5  </center></tt>
+<tr><td>    μ − ξ    <td><tt><center> 0.0043  </center></tt><td><tt><center>  0.54 </center></tt><td><tt><center>  0.018  </center></tt><td><tt><center>   1.1  </center></tt>
+<tr><td>    ξ − χ   <td><tt><center> 0.60    </center></tt><td><tt><center>  1.9  </center></tt><td><tt><center>  1.5    </center></tt><td><tt><center>   3.6  </center></tt>
+<tr><td>   χ − ξ    <td><tt><center> 0.023   </center></tt><td><tt><center>  0.53 </center></tt><td><tt><center>  0.079  </center></tt><td><tt><center>   0.92 </center></tt>
+</table>
+</center>
+
+\if SKIP
+ 0  beta phi  ,0.0060!,28!!!,!0.035!,!41!!!
+ 1   phi beta ,0.0060!,28!!!,!0.035!,!41!!!
+ 2 theta phi  ,2.9!!!!,82!!!,!6.0!!!,120!!!
+ 3   phi theta,2.9!!!!,82!!!,!6.0!!!,120!!!
+ 4 theta beta ,0.0060!,28!!!,!0.035!,!41!!!
+ 5  beta theta,0.0060!,28!!!,!0.035!,!41!!!
+ 6    mu phi  ,0.037!!,41!!!,!0.18!!,!60!!!
+ 7   phi mu   ,0.98!!!,59!!!,!2.3!!!,!84!!!
+ 8    mu beta ,0.00069,!5.8!,!0.0024,!!9.6!
+ 9  beta mu   ,0.13!!!,12!!!,!0.35!!,!19!!!
+10    mu theta,0.24!!!,30!!!,!0.67!!,!40!!!
+11 theta mu   ,0.099!!,23!!!,!0.23!!,!33!!!
+12   chi phi  ,0.78!!!,43!!!,!2.1!!!,!64!!!
+13   phi chi  ,9.0!!!!,71!!!,17!!!!!,100!!!
+14   chi beta ,0.018!!,!3.7!,!0.11!!,!!6.4!
+15  beta chi  ,1.7!!!!,16!!!,!3.4!!!,!24!!!
+16   chi theta,0.18!!!,31!!!,!0.56!!,!43!!!
+17 theta chi  ,0.87!!!,23!!!,!1.9!!!,!32!!!
+18   chi mu   ,0.022!!,!0.56,!0.11!!,!!0.91
+19    mu chi  ,0.31!!!,!1.2!,!0.86!!,!!2.0!
+20    xi phi  ,0.015!!,39!!!,!0.086!,!57!!!
+21   phi xi   ,0.34!!!,53!!!,!1.1!!!,!75!!!
+22    xi beta ,0.00042,!6.3!,!0.0039,!10!!!
+23  beta xi   ,0.040!!,10!!!,!0.15!!,!15!!!
+24    xi theta,0.28!!!,28!!!,!0.75!!,!38!!!
+25 theta xi   ,0.040!!,23!!!,!0.11!!,!33!!!
+26    xi mu   ,0.015!!,!0.79,!0.058!,!!1.5!
+27    mu xi   ,0.0043!,!0.54,!0.018!,!!1.1!
+28    xi chi  ,0.60!!!,!1.9!,!1.5!!!,!!3.6!
+29   chi xi   ,0.023!!,!0.53,!0.079!,!!0.92
+\endif
+
+The 2nd and 3rd columns show the results for the SRMmax ellipsoid, \e f
+= 1/150, retaining 6th order terms in the series expansion.  The 4th and
+5th columns show the results for the International ellipsoid, \e f =
+1/297, retaining 5th order terms in the series expansion.  The 2nd and
+4th columns give the errors for the series expansions in terms of \e n
+given in this section (appropriately truncated).  The 3rd and 5th
+columns give the errors when the series are reexpanded in terms of
+<i>e</i><sup>2</sup> = 4\e n/(1 + \e n)<sup>2</sup> and truncated
+retaining the <i>e</i><sup>12</sup> and <i>e</i><sup>10</sup> terms
+respectively.
+
+Some observations:
+- For production use, the 6th order series in \e n are recommended.  For
+  \e f = 1/150, the resulting errors are close to the round-off limit.
+  The errors in the 6th order series scale as <i>f</i><sup>7</sup>; so
+  the errors with \e f = 1/297 are about 120 times smaller.
+- It's inadvisable to use the 5th order series in \e n; this order is
+  barely acceptable for \e f = 1/297 and the errors grow as
+  <i>f</i><sup>6</sup> as \e f is increased.
+- In all cases, the expansions in terms of <i>e</i><sup>2</sup> are
+  considerably less accurate than the corresponding series in \e n.
+- For every series converting between φ and any of θ, μ,
+  χ, or ξ, the series where β is substituted for φ is
+  more accurate.  Considering that the transformation between φ and
+  β is so simple, tanβ = (1 - \e f) tanφ, it sometimes
+  makes sense to use β internally as the basic measure of latitude.
+  (This is the case with geodesic calculations.)
 
+<center>
+Back to \ref geocentric.  Forward to \ref highprec.  Up to \ref contents.
 </center>
+
 **********************************************************************/
 /**
 \page highprec Support for high precision arithmetic
@@ -7246,8 +7553,8 @@ The following steps needed to be taken
 
 <center>
 Back to \ref auxlat.  Forward to \ref changes.  Up to \ref contents.
-
 </center>
+
 **********************************************************************/
 /**
 \page changes Change log
@@ -7276,50 +7583,86 @@ of the
 <a href="https://sourceforge.net/p/geographiclib/code/ci/release/tree/">
 git repository for GeographicLib</a>.
 
- - <a href="http://geographiclib.sourceforge.net/1.47">Version 1.47</a>
+ - <a href="https://geographiclib.sourceforge.io/1.48">Version 1.48</a>
+   (released 2017-04-09)
+   - The "official" URL for GeographicLib is now
+     https://geographiclib.sourceforge.io (instead of
+     http://geographiclib.sourceforge.net).
+   - The default range for longitude and azimuth is now
+     (−180°, 180°], instead of [−180°,
+     180°).  This was already the case for the C++ library; now the
+     change has been made to the other implementations (C, Fortran,
+     Java, JavaScript, Python, MATLAB, and Maxima).
+   - Changes to NearestNeighbor:
+     - fix BUG in reading a NearestNeighbor object from a stream which
+       sometimes incorrectly caused a "Bad index" exception to be
+       thrown;
+     - add NearestNeighbor::operator<<, NearestNeighbor::operator>>,
+       NearestNeighbor::swap, std::swap(GeographicLib::NearestNeighbor&,
+       GeographicLib::NearestNeighbor&);
+   - Additions to the documentation:
+     - add documentation on \ref nearest;
+     - \ref normalgravity documentation is now on its own page and now
+       has an illustrative figure;
+     - document the \ref auxlaterror in the series for auxiliary
+       latitudes.
+   - Fix BUGS in MATLAB function geodreckon with mixed scalar and array
+     arguments.
+   - Workaround bug in math.fmod for Python 2.7 on 32-bit Windows
+     machines.
+   - Changes in cmake support:
+     - add USE_BOOST_FOR_EXAMPLES option (default OFF), if ON search for
+       Boost libraries for building examples;
+     - add APPLE_MULTIPLE_ARCHITECTURES option (default OFF), if ON
+       build for both i386 and x86_64 on Mac OS X systems;
+     - don't add flag for C++11 for g++ 6.0 (since it's not needed).
+   - Fix compiler warnings with Visual Studio 2017 and for the C
+     library.
+
+ - <a href="https://geographiclib.sourceforge.io/1.47">Version 1.47</a>
    (released 2017-02-15)
-     - Add NearestNeighbor class.
-     - Improve accuracy of area calculation (fixing a flaw introduced in
-       version 1.46); fix applied in Geodesic, GeodesicExact, and the
-       implementations in C, Fortran, Java, JavaScript, Python, MATLAB,
-       and Maxima.
-     - Generalize NormalGravity to allow oblate and prolate ellipsoids.
-       As a consequence a new form of constructor,
-       NormalGravity::NormalGravity, has been introduced and the old
-       form is now deprecated (and because the signatures of the two
-       constructors are similar, the compiler will warn about the use of
-       the old one).
-     - Changes in Math class:
-       - Math::sincosd, Math::sind, Math::cosd only return −0 for
-         the case sin(−0);
-       - Math::atan2d and Math::AngNormalize return results in
-         (−180°, 180°]; this may affect the longitudes and
-         azimuth returned by several other functions.
-     - Add Utility::trim() and Utility::val<T>(); Utility::num<T>() is now
-       DEPRECATED.
-     - Changes in cmake support:
-       - remove support of PACKAGE_PATH and INSTALL_PATH in cmake
-         configuration;
-       - fix to FindGeographicLib.cmake to make it work on Debian systems;
-       - use $<TARGET_PDB_FILE:tgt> (cmake version >= 3.1);
-       - use NAMESPACE for exported targets;
-       - geographiclib-config.cmake exports GEOGRAPHICLIB_DATA,
-         GEOGRAPHICLIB_PRECISION, and GeographicLib_HIGHPREC_LIBRARIES.
-     - Add pkg-config support for cmake and autoconf builds.
-     - Minor fixes:
-       - fix the order of declarations in C library, incorporating the
-         patches in version 1.46.1;
-       - fix the packaging of the python library, incorporating the
-         patches in version 1.46.3;
-       - restrict junit dependency in the Java package to testing scope
-         (thanks to Mick Killianey);
-       - various behind-the-scenes fixes to EllipticFunction;
-       - fix documentation and default install location for Windows binary
-         installers;
-       - fix clang compiler warnings in GeodesicExactC4 and
-         TransverseMercator.
-
- - <a href="http://geographiclib.sourceforge.net/1.46">Version 1.46</a>
+   - Add NearestNeighbor class.
+   - Improve accuracy of area calculation (fixing a flaw introduced in
+     version 1.46); fix applied in Geodesic, GeodesicExact, and the
+     implementations in C, Fortran, Java, JavaScript, Python, MATLAB,
+     and Maxima.
+   - Generalize NormalGravity to allow oblate and prolate ellipsoids.
+     As a consequence a new form of constructor,
+     NormalGravity::NormalGravity, has been introduced and the old
+     form is now <b>deprecated</b> (and because the signatures of the two
+     constructors are similar, the compiler will warn about the use of
+     the old one).
+   - Changes in Math class:
+     - Math::sincosd, Math::sind, Math::cosd only return −0 for
+       the case sin(−0);
+     - Math::atan2d and Math::AngNormalize return results in
+       (−180°, 180°]; this may affect the longitudes and
+       azimuth returned by several other functions.
+   - Add Utility::trim() and Utility::val<T>(); Utility::num<T>() is now
+     <b>deprecated</b>.
+   - Changes in cmake support:
+     - remove support of PACKAGE_PATH and INSTALL_PATH in cmake
+       configuration;
+     - fix to FindGeographicLib.cmake to make it work on Debian systems;
+     - use $<TARGET_PDB_FILE:tgt> (cmake version ≥ 3.1);
+     - use NAMESPACE for exported targets;
+     - geographiclib-config.cmake exports GEOGRAPHICLIB_DATA,
+       GEOGRAPHICLIB_PRECISION, and GeographicLib_HIGHPREC_LIBRARIES.
+   - Add pkg-config support for cmake and autoconf builds.
+   - Minor fixes:
+     - fix the order of declarations in C library, incorporating the
+       patches in version 1.46.1;
+     - fix the packaging of the Python library, incorporating the
+       patches in version 1.46.3;
+     - restrict junit dependency in the Java package to testing scope
+       (thanks to Mick Killianey);
+     - various behind-the-scenes fixes to EllipticFunction;
+     - fix documentation and default install location for Windows binary
+       installers;
+     - fix clang compiler warnings in GeodesicExactC4 and
+       TransverseMercator.
+
+ - <a href="https://geographiclib.sourceforge.io/1.46">Version 1.46</a>
    (released 2016-02-15)
    - The following BUGS have been fixed:
      - the -w flag to <a href="Planimeter.1.html">Planimeter(1)</a> was
@@ -7383,8 +7726,8 @@ git repository for GeographicLib</a>.
      - the -I and -D options now specify geodesic line calculation via
        the standard inverse or direct geodesic problems;
      - rename -l flag to -L to parallel the new -I and -D flags (-l is
-       is retained for backward compatibility but is deprecated), and
-       similarly for <a href="GeodSolve.1.html">RhumbSolve(1)</a>;
+       is retained for backward compatibility but is <b>deprecated</b>),
+       and similarly for <a href="GeodSolve.1.html">RhumbSolve(1)</a>;
      - the -F flag (in conjunction with the -I or -D flags) specifies that
        distances read on standard input are fractions of \e s13 or \e
        a13;
@@ -7412,7 +7755,7 @@ git repository for GeographicLib</a>.
      - Windows: ${CMAKE_INSTALL_PREFIX}/doc/scripts
      - Others: ${CMAKE_INSTALL_PREFIX}/share/doc/GeographicLib/scripts
 
- - <a href="http://geographiclib.sourceforge.net/1.45">Version 1.45</a>
+ - <a href="https://geographiclib.sourceforge.io/1.45">Version 1.45</a>
    (released 2015-09-30)
    - Fix BUG in solution of inverse geodesic caused by misbehavior of
      some versions of Visual Studio on Windows (fmod(−0.0, 360.0)
@@ -7468,7 +7811,7 @@ git repository for GeographicLib</a>.
      - turn illegal latitudes into NaNs for Fortran library;
      - add test suites for the C and Fortran libraries.
 
- - <a href="http://geographiclib.sourceforge.net/1.44">Version 1.44</a>
+ - <a href="https://geographiclib.sourceforge.io/1.44">Version 1.44</a>
    (released 2015-08-14)
    - Various changes to improve accuracy, e.g., by minimizing round-off
      errors:
@@ -7526,7 +7869,7 @@ git repository for GeographicLib</a>.
        geographic coordinates;
      - document limitations of the series used for TransverseMercator;
      - hide the documentation of the computation of the gradient of the
-       geoid height (now deprecated) in the Geoid class;
+       geoid height (now <b>deprecated</b>) in the Geoid class;
      - warn about the possible misinterpretation of 7.0E+1 by
        DMS::Decode;
      - \e swaplatlong optional argument of DMS::DecodeLatLon and
@@ -7542,7 +7885,7 @@ git repository for GeographicLib</a>.
        - <a href="../scripts/geod-calc.html">geod-calc.html</a> and
          <a href="../scripts/geod-google.html">geod-google.html</a>
          report the version number;
-       - http://geographiclib.sourceforge.net/scripts/ gives access to
+       - https://geographiclib.sourceforge.io/scripts/ gives access to
          earlier versions of geographiclib.js as
          geographiclib-<i>m.nn</i>.js;
      - Fortran: add geover subroutine to return version numbers;
@@ -7566,7 +7909,7 @@ git repository for GeographicLib</a>.
    - Geohash uses "invalid" instead of "nan" when the latitude or
      longitude is a nan.
 
- - <a href="http://geographiclib.sourceforge.net/1.43">Version 1.43</a>
+ - <a href="https://geographiclib.sourceforge.io/1.43">Version 1.43</a>
    (released 2015-05-23)
    - Add the Enhanced Magnetic Model 2015, emm2015.  This is valid for
      2000 thru the end of 2019.  This required some changes in the
@@ -7599,7 +7942,7 @@ git repository for GeographicLib</a>.
        similarly sets <code>lon1</code> and <code>lon2</code> in output
        dictionary respecting the LONG_UNROLL flag.
      - The online version of
-       <a href="http://geographiclib.sourceforge.net/cgi-bin/GeodSolve">GeodSolve</a>
+       <a href="https://geographiclib.sourceforge.io/cgi-bin/GeodSolve">GeodSolve</a>
        now offers an option to unroll the longitude.
      - To support these changes DMS::DecodeLatLon no longer reduces the
        longitude to the range [−180°, 180°) and
@@ -7632,7 +7975,7 @@ git repository for GeographicLib</a>.
      - ${CMAKE_INSTALL_PREFIX}/share/cmake/GeographicLib*
      - ${CMAKE_INSTALL_PREFIX}/libexec/GeographicLib/matlab
 
- - <a href="http://geographiclib.sourceforge.net/1.42">Version 1.42</a>
+ - <a href="https://geographiclib.sourceforge.io/1.42">Version 1.42</a>
    (released 2015-04-28)
    - DMS::Decode allows a single addition or subtraction operation,
      e.g., 70W+0:0:15.  This affects the GeoCoords class and the
@@ -7649,7 +7992,7 @@ git repository for GeographicLib</a>.
    - MATLAB changes:
      - provide native MATLAB implementations for compiled interface
        functions, see \ref matlab;
-     - the compiled MATLAB interface is now deprecated and so the
+     - the compiled MATLAB interface is now <b>deprecated</b> and so the
        MATLAB_COMPILER option in the cmake build has been removed;
      - reorganize directories, so that
        - matlab/geographiclib contains the native matlab code;
@@ -7674,12 +8017,12 @@ git repository for GeographicLib</a>.
      in versions 1.40 and 1.41).
    - Mark the computation of the gradient of the geoid height in the
      Geoid class and the <a href="GeoidEval.1.html">GeoidEval</a>
-     utility as deprecated.
+     utility as <b>deprecated</b>.
    - Work around the boost-quadmath bug with setprecision(0).
    - Deprecate use of Visual Studio 2005 "-vc8" project files in the
      windows directory.
 
- - <a href="http://geographiclib.sourceforge.net/1.41">Version 1.41</a>
+ - <a href="https://geographiclib.sourceforge.io/1.41">Version 1.41</a>
    (released 2015-03-09)
    - Fix bug in Rhumb::Inverse (with \e exact = true) and related
      functions which causes the wrong distance to be reported if one of
@@ -7691,7 +8034,7 @@ git repository for GeographicLib</a>.
    - Split information about \ref jacobi to a separate section and
      include more material.
 
- - <a href="http://geographiclib.sourceforge.net/1.40">Version 1.40</a>
+ - <a href="https://geographiclib.sourceforge.io/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
@@ -7711,7 +8054,7 @@ git repository for GeographicLib</a>.
    - 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.
+     at https://geographiclib.sourceforge.io/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);
@@ -7720,7 +8063,7 @@ git repository for GeographicLib</a>.
    - The MATLAB function, geographiclibinterface, which compiles the
      wrapper routines for MATLAB now works with MATLAB on a Mac.
 
- - <a href="http://geographiclib.sourceforge.net/1.39">Version 1.39</a>
+ - <a href="https://geographiclib.sourceforge.io/1.39">Version 1.39</a>
    (released 2014-11-11)
    - GeographicLib usually normalizes longitudes to the range
      [−180°, 180°).  However, when solving the direct
@@ -7772,7 +8115,7 @@ git repository for GeographicLib</a>.
      <a href="MagneticField.1.html">MagneticField</a> utility accepts
      the string "now" as a legal time (meaning today).
 
- - <a href="http://geographiclib.sourceforge.net/1.38">Version 1.38</a>
+ - <a href="https://geographiclib.sourceforge.io/1.38">Version 1.38</a>
    (released 2014-10-02)
    - On MacOSX, the installed package is relocatable (for cmake version
      2.8.12 and later).
@@ -7786,7 +8129,7 @@ git repository for GeographicLib</a>.
      greatellipse.
    - Provide man pages for geographiclib-get-{geoids,gravity,magnetic}.
 
- - <a href="http://geographiclib.sourceforge.net/1.37">Version 1.37</a>
+ - <a href="https://geographiclib.sourceforge.io/1.37">Version 1.37</a>
    (released 2014-08-08)
    - Add \ref highprec.
    - <b>INCOMPATIBLE CHANGE</b>: the static instantiations of various
@@ -7863,7 +8206,7 @@ git repository for GeographicLib</a>.
        <code>GEOGRAPHICLIB_VERSION_NUM</code>;
      - add solution and project files for Visual Studio Express 2010.
 
- - <a href="http://geographiclib.sourceforge.net/1.36">Version 1.36</a>
+ - <a href="https://geographiclib.sourceforge.io/1.36">Version 1.36</a>
    (released 2014-05-13)
    - Changes to comply with NGA's prohibition of the use of the
      upper-case letters N/S to designate the hemisphere when displaying
@@ -7901,7 +8244,7 @@ git repository for GeographicLib</a>.
    - Add missing std:: qualifications to copy in LocalCartesion and
      Geocentric headers (bug found by Clemens).
 
- - <a href="http://geographiclib.sourceforge.net/1.35">Version 1.35</a>
+ - <a href="https://geographiclib.sourceforge.io/1.35">Version 1.35</a>
    (released 2014-03-13)
    - Fix blunder in UTMUPS::EncodeEPSG (found by Ben
      Adler).
@@ -7921,7 +8264,7 @@ git repository for GeographicLib</a>.
      - this release includes a file, pom.xml, which is used by an
        experimental build system (based on maven) at SRI.
 
- - <a href="http://geographiclib.sourceforge.net/1.34">Version 1.34</a>
+ - <a href="https://geographiclib.sourceforge.io/1.34">Version 1.34</a>
    (released 2013-12-11)
    - Many changes in cmake support:
      - minimum version of cmake needed increased to 2.8.4 (which was
@@ -7955,7 +8298,7 @@ git repository for GeographicLib</a>.
      with <a href="GeodSolve.1.html">GeodSolve</a> (introduced in
      version 1.30).
 
- - <a href="http://geographiclib.sourceforge.net/1.33">Version 1.33</a>
+ - <a href="https://geographiclib.sourceforge.io/1.33">Version 1.33</a>
    (released 2013-10-08)
    - Add <a href="NET/index.html">NETGeographic .NET wrapper library</a>
      (courtesy of Scott Heiman).
@@ -7965,13 +8308,13 @@ git repository for GeographicLib</a>.
      is first called.
    - Fix bug in autoconf builds under MacOS.
 
- - <a href="http://geographiclib.sourceforge.net/1.32">Version 1.32</a>
+ - <a href="https://geographiclib.sourceforge.io/1.32">Version 1.32</a>
    (released 2013-07-12)
    - Generalize C interface for polygon areas to allow vertices to be
      specified incrementally.
    - Fix way flags for C++11 support are determined.
 
- - <a href="http://geographiclib.sourceforge.net/1.31">Version 1.31</a>
+ - <a href="https://geographiclib.sourceforge.io/1.31">Version 1.31</a>
    (released 2013-07-01)
    - Changes breaking binary compatibility (source compatibility is
      maintained):
@@ -8021,7 +8364,7 @@ git repository for GeographicLib</a>.
    - Fixes to the way the MATLAB interface routines are built (thanks to
      Phil Miller and Chris F.).
 
- - <a href="http://geographiclib.sourceforge.net/1.30">Version 1.30</a>
+ - <a href="https://geographiclib.sourceforge.io/1.30">Version 1.30</a>
    (released 2013-02-27)
    - Changes to geodesic routines:
      - FIX BUG in fail-safe mechanisms in Geodesic::Inverse;
@@ -8030,13 +8373,13 @@ git repository for GeographicLib</a>.
      - allow addition of polygon edges in PolygonArea;
      - add full Maxima implementation of geodesic algorithms.
 
- - <a href="http://geographiclib.sourceforge.net/1.29">Version 1.29</a>
+ - <a href="https://geographiclib.sourceforge.io/1.29">Version 1.29</a>
    (released 2013-01-16)
    - Changes to allow compilation with libc++ (courtesy of Kal Conley).
    - Add description of \ref triaxial to documentation.
    - Update journal reference for "Algorithms for geodesics".
 
- - <a href="http://geographiclib.sourceforge.net/1.28">Version 1.28</a>
+ - <a href="https://geographiclib.sourceforge.io/1.28">Version 1.28</a>
    (released 2012-12-11)
    - Changes to geodesic routines:
      - compute longitude difference exactly;
@@ -8049,7 +8392,7 @@ git repository for GeographicLib</a>.
      - include polygon area routine in C and Fortran implementations;
      - add doxygen documentation for C and Fortran libraries.
 
- - <a href="http://geographiclib.sourceforge.net/1.27">Version 1.27</a>
+ - <a href="https://geographiclib.sourceforge.io/1.27">Version 1.27</a>
    (released 2012-11-29)
    - Changes to geodesic routines:
      - add native MATLAB implementations: geoddistance.m, geodreckon.m,
@@ -8065,13 +8408,13 @@ git repository for GeographicLib</a>.
    - On MacOSX platforms with the cmake configuration, universal
      binaries are built.
 
- - <a href="http://geographiclib.sourceforge.net/1.26">Version 1.26</a>
+ - <a href="https://geographiclib.sourceforge.io/1.26">Version 1.26</a>
    (released 2012-10-22)
    - Replace the series used for geodesic areas by one with better
      convergence (this only makes an appreciable difference if
      |<i>f</i>| > 1/150).
 
- - <a href="http://geographiclib.sourceforge.net/1.25">Version 1.25</a>
+ - <a href="https://geographiclib.sourceforge.io/1.25">Version 1.25</a>
    (released 2012-10-16)
    - Changes to geodesic calculations:
      - restart Newton's method in Geodesic::Inverse when it goes awry;
@@ -8098,7 +8441,7 @@ git repository for GeographicLib</a>.
        vulnerability; see
        http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3386
 
- - <a href="http://geographiclib.sourceforge.net/1.24">Version 1.24</a>
+ - <a href="https://geographiclib.sourceforge.io/1.24">Version 1.24</a>
    (released 2012-09-22)
    - Allow the specification of the hemisphere in UTM coordinates in
      order to provide continuity across the equator:
@@ -8116,7 +8459,7 @@ git repository for GeographicLib</a>.
    - Document restrictions on \e f in \ref intro.
    - Fix Python interface to work with version 2.6.x.
 
- - <a href="http://geographiclib.sourceforge.net/1.23">Version 1.23</a>
+ - <a href="https://geographiclib.sourceforge.io/1.23">Version 1.23</a>
    (released 2012-07-17)
    - Documentation changes:
      - remove html documentation from distribution and use web links if
@@ -8139,7 +8482,7 @@ git repository for GeographicLib</a>.
      (incorrect results were returned if the tangent latitude was
      negative).
 
- - <a href="http://geographiclib.sourceforge.net/1.22">Version 1.22</a>
+ - <a href="https://geographiclib.sourceforge.io/1.22">Version 1.22</a>
    (released 2012-05-27)
    - Add Geohash and Ellipsoid classes.
    - FIX BUG in AlbersEqualArea for very prolate
@@ -8157,7 +8500,7 @@ git repository for GeographicLib</a>.
        CMAKE_INSTALL_PREFIX;
      - add a cmake configuration for build tree.
 
- - <a href="http://geographiclib.sourceforge.net/1.21">Version 1.21</a>
+ - <a href="https://geographiclib.sourceforge.io/1.21">Version 1.21</a>
    (released 2012-04-25)
    - Support colon-separated DMS output:
      - DMS::Encode and
@@ -8176,7 +8519,7 @@ git repository for GeographicLib</a>.
      - allow the MATLAB compiler to be specified with the
        MATLAB_COMPILER option.
 
- - <a href="http://geographiclib.sourceforge.net/1.20">Version 1.20</a>
+ - <a href="https://geographiclib.sourceforge.io/1.20">Version 1.20</a>
    (released 2012-03-23)
    - cmake tweaks:
      - improve find_package's matching of compiler versions;
@@ -8187,7 +8530,7 @@ git repository for GeographicLib</a>.
      checking by Visual Studio.
    - Fix transcription BUG is Geodesic.js.
 
- - <a href="http://geographiclib.sourceforge.net/1.19">Version 1.19</a>
+ - <a href="https://geographiclib.sourceforge.io/1.19">Version 1.19</a>
    (released 2012-03-13)
    - Slight improvement in Geodesic::Inverse for very
      short lines.
@@ -8197,14 +8540,14 @@ git repository for GeographicLib</a>.
    - Add installer for 64-bit Windows; the compiled MATLAB interface is
      supplied with the Windows 64-bit installer only.
 
- - <a href="http://geographiclib.sourceforge.net/1.18">Version 1.18</a>
+ - <a href="https://geographiclib.sourceforge.io/1.18">Version 1.18</a>
    (released 2012-02-18)
    - Improve documentation on configuration with cmake.
    - cmake's find_package ensures that the compiler versions match on Windows.
    - Improve documentation on compiling MATLAB interface.
    - Binary installer for Windows installs under C:/pkg-vc10 by default.
 
- - <a href="http://geographiclib.sourceforge.net/1.17">Version 1.17</a>
+ - <a href="https://geographiclib.sourceforge.io/1.17">Version 1.17</a>
    (released 2012-01-21)
    - Work around optimization BUG in Geodesic::Inverse
      with g++ version 4.4.0 (mingw).
@@ -8213,7 +8556,7 @@ git repository for GeographicLib</a>.
    - Add simple examples of usage for each class.
    - Add internal documentation to the cmake configuration files.
 
- - <a href="http://geographiclib.sourceforge.net/1.16">Version 1.16</a>
+ - <a href="https://geographiclib.sourceforge.io/1.16">Version 1.16</a>
    (released 2011-12-07)
    - Add calculation of the earth's gravitational field:
      - add NormalGravity GravityModel and
@@ -8247,7 +8590,7 @@ git repository for GeographicLib</a>.
      - default height to zero in
        <a href="MagneticField.1.html">MagneticField</a>.
 
- - <a href="http://geographiclib.sourceforge.net/1.15">Version 1.15</a>
+ - <a href="https://geographiclib.sourceforge.io/1.15">Version 1.15</a>
    (released 2011-11-08)
    - Add calculation of the earth's magnetic field:
      - add MagneticModel and MagneticCircle
@@ -8270,7 +8613,7 @@ git repository for GeographicLib</a>.
      install setup.py for non-Windows systems.
    - Include Doxygen tag file in distribution as doc/html/Geographic.tag.
 
- - <a href="http://geographiclib.sourceforge.net/1.14">Version 1.14</a>
+ - <a href="https://geographiclib.sourceforge.io/1.14">Version 1.14</a>
    (released 2011-09-30)
    - Ensure that geographiclib-config.cmake is relocatable.
    - Allow more unicode symbols to be used in DMS::Decode.
@@ -8285,7 +8628,7 @@ git repository for GeographicLib</a>.
    - Supply a minimal Qt qmake project file for library
      src/Geographic.pro.
 
- - <a href="http://geographiclib.sourceforge.net/1.13">Version 1.13</a>
+ - <a href="https://geographiclib.sourceforge.io/1.13">Version 1.13</a>
    (released 2011-08-13)
    - Changes to I/O:
      - allow : (colon) to be used as a DMS separator in
@@ -8314,7 +8657,7 @@ git repository for GeographicLib</a>.
        geographiclib-config.cmake;
      - better support for building a shared library under Windows.
 
- - <a href="http://geographiclib.sourceforge.net/1.12">Version 1.12</a>
+ - <a href="https://geographiclib.sourceforge.io/1.12">Version 1.12</a>
    (released 2011-07-21)
    - Change license to MIT/X11.
    - Add PolygonArea class and equivalent MATLAB function.
@@ -8326,7 +8669,7 @@ git repository for GeographicLib</a>.
    - A couple of code changes to enable compilation with Visual
      Studio 2003.
 
- - <a href="http://geographiclib.sourceforge.net/1.11">Version 1.11</a>
+ - <a href="https://geographiclib.sourceforge.io/1.11">Version 1.11</a>
    (released 2011-06-27)
    - Changes to <a href="Planimeter.1.html">Planimeter</a>:
      - add -l flag to <a href="Planimeter.1.html">Planimeter</a> for polyline
@@ -8353,7 +8696,7 @@ git repository for GeographicLib</a>.
      - InverseFlattening() has been deprecated (and now returns inf for a
        sphere, instead of 0).
 
- - <a href="http://geographiclib.sourceforge.net/1.10">Version 1.10</a>
+ - <a href="https://geographiclib.sourceforge.io/1.10">Version 1.10</a>
    (released 2011-06-11)
    - Improvements to MATLAB/Octave interface:
      - add {geocentric,localcartesian}{forward,reverse};
@@ -8366,7 +8709,7 @@ git repository for GeographicLib</a>.
      - cmake installed in man/man1 instead of share/man/man1;
      - cmake did not set the rpath on the tools.
 
- - <a href="http://geographiclib.sourceforge.net/1.9">Version 1.9</a>
+ - <a href="https://geographiclib.sourceforge.io/1.9">Version 1.9</a>
    (released 2011-05-28)
    - FIX BUG in area returned by
      <a href="Planimeter.1.html">Planimeter</a> for pole encircling polygons.
@@ -8392,11 +8735,9 @@ git repository for GeographicLib</a>.
    - Add <a href="ConicProj.1.html"> ConicProj</a>.
    - Reverse the initial sense of the -s option for
      <a href="Planimeter.1.html"> Planimeter</a>.
-   - Migrate source from subversion to
-     <a href="http://geographiclib.git.sourceforge.net/git/gitweb-index.cgi">
-     git</a>.
+   - Migrate source from subversion to git.
 
- - <a href="http://geographiclib.sourceforge.net/1.8">Version 1.8</a>
+ - <a href="https://geographiclib.sourceforge.io/1.8">Version 1.8</a>
    (released 2011-02-22)
    - Optionally return rotation matrix from Geocentric and
      LocalCartesian.
@@ -8416,7 +8757,7 @@ git repository for GeographicLib</a>.
    - Remove documentation that duplicates papers on transverse Mercator
      and geodesics.
 
- - <a href="http://geographiclib.sourceforge.net/1.7">Version 1.7</a>
+ - <a href="https://geographiclib.sourceforge.io/1.7">Version 1.7</a>
    (released 2010-12-21)
    - FIX BUG in scale returned by LambertConformalConic::Reverse.
    - Add AlbersEqualArea projection.
@@ -8427,12 +8768,12 @@ git repository for GeographicLib</a>.
    - Add solution/project files for Visual Studio 2010 (32-bit only).
    - Use C++11 static_assert and math functions, if available.
 
- - <a href="http://geographiclib.sourceforge.net/1.6">Version 1.6</a>
+ - <a href="https://geographiclib.sourceforge.io/1.6">Version 1.6</a>
    (released 2010-11-23)
    - FIX BUG introduced in Geoid in version 1.5 (found by
      Dave Edwards).
 
- - <a href="http://geographiclib.sourceforge.net/1.5">Version 1.5</a>
+ - <a href="https://geographiclib.sourceforge.io/1.5">Version 1.5</a>
    (released 2010-11-19)
    - Improve area calculations for small polygons.
    - Add -s and -r flags to <a href="Planimeter.1.html">Planimeter</a>.
@@ -8458,7 +8799,7 @@ git repository for GeographicLib</a>.
      - fixes to compile under cygwin;
      - tweak expression used to find latitude from conformal latitude.
 
- - <a href="http://geographiclib.sourceforge.net/1.4">Version 1.4</a>
+ - <a href="https://geographiclib.sourceforge.io/1.4">Version 1.4</a>
    (released 2010-09-12)
    - Changes to Geodesic and GeodesicLine:
      - FIX BUG in Geodesic::Inverse with prolate ellipsoids;
@@ -8489,7 +8830,7 @@ git repository for GeographicLib</a>.
      classes which don't return the convergence (or azimuth) and scale.
    - Document function parameters and return values consistently.
 
- - <a href="http://geographiclib.sourceforge.net/1.3">Version 1.3</a>
+ - <a href="https://geographiclib.sourceforge.io/1.3">Version 1.3</a>
    (released 2010-07-21)
    - Add Gnomonic, the ellipsoid generalization of the
      gnomonic projection.
@@ -8509,7 +8850,7 @@ git repository for GeographicLib</a>.
    - Update references to Geotrans in MGRS documentation.
    - Speed up tmseries.mac.
 
- - <a href="http://geographiclib.sourceforge.net/1.2">Version 1.2</a>
+ - <a href="https://geographiclib.sourceforge.io/1.2">Version 1.2</a>
    (released 2010-05-21)
    - FIX BUGS in Geodesic,
      - wrong azimuth returned by Direct if point 2 is on a pole;
@@ -8541,7 +8882,7 @@ git repository for GeographicLib</a>.
      - <a href="CartConvert.1.html">CartConvert</a> allows the ellipsoid
        to be specified with -e.
 
- - <a href="http://geographiclib.sourceforge.net/1.1">Version 1.1</a>
+ - <a href="https://geographiclib.sourceforge.io/1.1">Version 1.1</a>
    (released 2010-02-09)
    - FIX BUG (introduced in 2009-03) in EllipticFunction::E(sn,cn,dn).
    - Increase accuracy of scale calculation in TransverseMercator and
@@ -8549,7 +8890,7 @@ git repository for GeographicLib</a>.
    - Code and documentation changes for consistency with
      <a  href="https://arxiv.org/abs/1002.1417">arXiv:1002.1417</a>
 
- - <a href="http://geographiclib.sourceforge.net/1.0">Version 1.0</a>
+ - <a href="https://geographiclib.sourceforge.io/1.0">Version 1.0</a>
    (released 2010-01-07)
    - Add autoconf configuration files.
    - BUG FIX: Improve initial guess for Newton's method in
@@ -8573,7 +8914,7 @@ git repository for GeographicLib</a>.
        cached area without disk reads;
      - Add inspector functions to query the extent of the cache.
 
- - <a href="http://geographiclib.sourceforge.net/2009-11">Version 2009-11</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-11">Version 2009-11</a>
    (released 2009-11-03)
    - Allow specification of "closest UTM zone" in UTMUPS
      and <a href="GeoConvert.1.html">GeoConvert</a> (via -t option).
@@ -8588,9 +8929,9 @@ git repository for GeographicLib</a>.
      - Improve accuracy of inverse hyperbolic functions.
      - Fix the way Math functions handle different precisions.
 
- - <a href="http://geographiclib.sourceforge.net/2009-10">Version 2009-10</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-10">Version 2009-10</a>
    (released 2009-10-18)
-  - Change web site to http://geographiclib.sourceforge.net
+  - Change web site to https://geographiclib.sourceforge.io
   - Several house-cleaning changes:
     - Change from the a flat directory structure to a more easily
       maintained one.
@@ -8610,12 +8951,12 @@ git repository for GeographicLib</a>.
       northings.
     - Add 64-bit targets in Visual Studio project files.
 
- - <a href="http://geographiclib.sourceforge.net/2009-09">Version 2009-09</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-09">Version 2009-09</a>
    (released 2009-09-01)
    - Add Geoid and
      <a href="GeoidEval.1.html">GeoidEval</a> utility.
 
- - <a href="http://geographiclib.sourceforge.net/2009-08">Version 2009-08</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-08">Version 2009-08</a>
    (released 2009-08-14)
    - Add CassiniSoldner class and
      <a href="GeodesicProj.1.html">EquidistantTest</a> utility.
@@ -8625,17 +8966,17 @@ git repository for GeographicLib</a>.
      of the azimuthal scale instead of the reduced length.
    - Add -n option to <a href="GeoConvert.1.html">GeoConvert</a>.
 
- - <a href="http://geographiclib.sourceforge.net/2009-07">Version 2009-07</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-07">Version 2009-07</a>
    (released 2009-07-16)
    - Speed up the series inversion code in tmseries.mac and geod.mac.
    - Reference Borkowski in section on \ref geocentric.
 
- - <a href="http://geographiclib.sourceforge.net/2009-06">Version 2009-06</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-06">Version 2009-06</a>
    (released 2009-06-01)
    - Add routines to decode and encode zone+hemisphere to UTMUPS.
    - Clean up code in Geodesic.
 
- - <a href="http://geographiclib.sourceforge.net/2009-05">Version 2009-05</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-05">Version 2009-05</a>
    (released 2009-05-01)
    - Improvements to Geodesic:
      - more economical series expansions,
@@ -8651,7 +8992,7 @@ git repository for GeographicLib</a>.
      carefully.
    - Remove reference to defunct Constants.cpp from GeographicLib.vcproj.
 
- - <a href="http://geographiclib.sourceforge.net/2009-04">Version 2009-04</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-04">Version 2009-04</a>
    (released 2009-04-01)
    - Use compile-time constants to select the order of series in
      TransverseMercator.
@@ -8669,7 +9010,7 @@ git repository for GeographicLib</a>.
      - add -a, -e, -b options to the <a href="GeodSolve.1.html">Geod</a>
        utility.
 
- - <a href="http://geographiclib.sourceforge.net/2009-03">Version 2009-03</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-03">Version 2009-03</a>
    (released 2009-03-01)
    - Add Geodesic and the
      <a href="GeodSolve.1.html">Geod</a> utility.
@@ -8681,7 +9022,7 @@ git repository for GeographicLib</a>.
      to <a href="CartConvert.1.html">CartConvert</a>.
    - Use inline functions to define constant doubles in Constants.hpp.
 
- - <a href="http://geographiclib.sourceforge.net/2009-02">Version 2009-02</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-02">Version 2009-02</a>
    (released 2009-01-30)
    - Fix documentation of constructors (flattening → inverse
      flattening).
@@ -8690,7 +9031,7 @@ git repository for GeographicLib</a>.
      and the ECEFConvert utility.
    - Gather the documentation on the \ref utilities onto one page.
 
- - <a href="http://geographiclib.sourceforge.net/2009-01">Version 2009-01</a>
+ - <a href="https://geographiclib.sourceforge.io/2009-01">Version 2009-01</a>
    (released 2009-01-12)
    - First proper release of library.
    - More robust TransverseMercatorExact:
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 8bdb88f..d183293 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -8,7 +8,9 @@ FIGURES = \
 	$(srcdir)/gauss-krueger-graticule-a.png \
 	$(srcdir)/thompson-tm-graticule-a.png \
 	$(srcdir)/gauss-krueger-error.png \
-	$(srcdir)/meridian-measures.png
+	$(srcdir)/meridian-measures.png \
+	$(srcdir)/normal-gravity-potential-1.svg \
+	$(srcdir)/vptree.gif
 
 HPPFILES = \
 	$(top_srcdir)/include/GeographicLib/Accumulator.hpp \
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 042a25d..7a4f60e 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -271,7 +271,9 @@ FIGURES = \
 	$(srcdir)/gauss-krueger-graticule-a.png \
 	$(srcdir)/thompson-tm-graticule-a.png \
 	$(srcdir)/gauss-krueger-error.png \
-	$(srcdir)/meridian-measures.png
+	$(srcdir)/meridian-measures.png \
+	$(srcdir)/normal-gravity-potential-1.svg \
+	$(srcdir)/vptree.gif
 
 HPPFILES = \
 	$(top_srcdir)/include/GeographicLib/Accumulator.hpp \
diff --git a/doc/NETGeographicLib.dox b/doc/NETGeographicLib.dox
index 637e1c0..459b39d 100644
--- a/doc/NETGeographicLib.dox
+++ b/doc/NETGeographicLib.dox
@@ -5,7 +5,7 @@
  *
  * Written by Scott Heiman <mrmtdew2 at outlook.com> and licensed under the
  * MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 /**
@@ -15,7 +15,7 @@
 \date 2017-02-15
 
 The documentation for other versions is available at
-<tt>http://geographiclib.sourceforge.net/m.nn/NET</tt> for versions numbers
+<tt>https://geographiclib.sourceforge.io/m.nn/NET</tt> for versions numbers
 <tt>m.nn</tt> ≥ 1.33.
 
 \section abstract-net Abstract
diff --git a/doc/doxyfile-c.in b/doc/doxyfile-c.in
index 030bab6..cbefed0 100644
--- a/doc/doxyfile-c.in
+++ b/doc/doxyfile-c.in
@@ -1186,7 +1186,7 @@ USE_MATHJAX            = NO
 # However, it is strongly recommended to install a local
 # copy of MathJax from http://www.mathjax.org before deployment.
 
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_RELPATH        = https://cdn.mathjax.org/mathjax/latest
 
 # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
 # names that should be enabled during MathJax rendering.
diff --git a/doc/doxyfile-for.in b/doc/doxyfile-for.in
index 4a1bdeb..6285dd2 100644
--- a/doc/doxyfile-for.in
+++ b/doc/doxyfile-for.in
@@ -1185,7 +1185,7 @@ USE_MATHJAX            = NO
 # However, it is strongly recommended to install a local
 # copy of MathJax from http://www.mathjax.org before deployment.
 
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_RELPATH        = https://cdn.mathjax.org/mathjax/latest
 
 # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
 # names that should be enabled during MathJax rendering.
diff --git a/doc/doxyfile-net.in b/doc/doxyfile-net.in
index 230b6b4..ff1d0af 100644
--- a/doc/doxyfile-net.in
+++ b/doc/doxyfile-net.in
@@ -1187,7 +1187,7 @@ USE_MATHJAX            = YES
 # However, it is strongly recommended to install a local
 # copy of MathJax from http://www.mathjax.org before deployment.
 
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_RELPATH        = https://cdn.mathjax.org/mathjax/latest
 
 # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
 # names that should be enabled during MathJax rendering.
diff --git a/doc/doxyfile.in b/doc/doxyfile.in
index dca5a53..db1dc8c 100644
--- a/doc/doxyfile.in
+++ b/doc/doxyfile.in
@@ -1190,7 +1190,7 @@ USE_MATHJAX            = YES
 # However, it is strongly recommended to install a local
 # copy of MathJax from http://www.mathjax.org before deployment.
 
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_RELPATH        = https://cdn.mathjax.org/mathjax/latest
 
 # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
 # names that should be enabled during MathJax rendering.
diff --git a/doc/geodesic-c.dox b/doc/geodesic-c.dox
index 10daeb8..7cc43d6 100644
--- a/doc/geodesic-c.dox
+++ b/doc/geodesic-c.dox
@@ -5,22 +5,22 @@
  *
  * Written by Charles Karney <charles at karney.com> and licensed under the
  * MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 /**
 \mainpage Geodesic routines implemented in C
 \author Charles F. F. Karney (charles at karney.com)
-\version 1.47
+\version 1.48
 
 The documentation for other versions is available at
-<tt>http://geographiclib.sourceforge.net/m.nn/C</tt> for versions numbers
+<tt>https://geographiclib.sourceforge.io/m.nn/C</tt> for versions numbers
 <tt>m.nn</tt> ≥ 1.28.
 
 \section abstract-c Abstract
 
 This is a C implementation of the geodesic algorithms from <a
-href="http://geographiclib.sourceforge.net">GeographicLib</a>.  This is a
+href="https://geographiclib.sourceforge.io">GeographicLib</a>.  This is a
 self-contained library (requiring only the standard C math library)
 which makes it easy to do geodesic computations for an ellipsoid of
 revolution in a C program.  It is included with the recent version of
@@ -32,10 +32,10 @@ compile correctly with just about any C compiler.
 \section download-c Downloading the source
 
 The C library is part of %GeographicLib which available for download at
-- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.47.tar.gz">
-  GeographicLib-1.47.tar.gz</a>
-- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.47.zip">
-  GeographicLib-1.47.zip</a>
+- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.48.tar.gz">
+  GeographicLib-1.48.tar.gz</a>
+- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.48.zip">
+  GeographicLib-1.48.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 the directory <tt>legacy/C</tt>.
@@ -49,7 +49,7 @@ Instructions for how to use the library via proj.4 are given below.
 
 Licensed under the
 <a href="http://www.opensource.org/licenses/MIT">MIT/X11 License</a>; see
-<a href="http://geographiclib.sourceforge.net/html/LICENSE.txt">LICENSE.txt</a>.
+<a href="https://geographiclib.sourceforge.io/html/LICENSE.txt">LICENSE.txt</a>.
 
 \section doc-c Library documentation
 
@@ -128,22 +128,22 @@ echo 30 0 29.5 179.5 | ./inverse \endverbatim
   <a href="https://doi.org/10.1007/s00190-012-0578-z">
   Algorithms for geodesics</a>,
   J. Geodesy <b>87</b>, 43--55 (2013)
-  (<a href="http://geographiclib.sourceforge.net/geod-addenda.html"> addenda</a>).
+  (<a href="https://geographiclib.sourceforge.io/geod-addenda.html"> addenda</a>).
 - A longer paper on geodesics: C. F. F. Karney,
    <a href="https://arxiv.org/abs/1102.1215v1">Geodesics
    on an ellipsoid of revolution</a>,
    Feb. 2011
-   (<a href="http://geographiclib.sourceforge.net/geod-addenda.html#geod-errata">
+   (<a href="https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata">
    errata</a>).
 - <a href="https://sourceforge.net/projects/geographiclib/">
   Main project page</a>
-- <a href="http://geographiclib.sourceforge.net/">
+- <a href="https://geographiclib.sourceforge.io/">
   GeographicLib web site</a>
   - Documentation on the C++ classes: GeographicLib::Geodesic,
     GeographicLib::GeodesicLine, GeographicLib::PolygonAreaT.
   - The section in the %GeographicLib documentation on geodesics: \ref
     geodesic.
-- <a href="http://sourceforge.net/p/geographiclib/code/ci/release/tree/">
+- <a href="https://sourceforge.net/p/geographiclib/code/ci/release/tree/">
   git repository</a>
 - Implementations in various languages
   - C++ (complete library):
@@ -182,7 +182,7 @@ echo 30 0 29.5 179.5 | ./inverse \endverbatim
   - C# (.NET wrapper for complete C++ library):
     <a href="../NET/index.html">
       documentation</a>.
-- <a href="http://geographiclib.sourceforge.net/geodesic-papers/biblio.html">
+- <a href="https://geographiclib.sourceforge.io/geodesic-papers/biblio.html">
   A geodesic bibliography</a>.
 - The wikipedia page,
   <a href="https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid">
@@ -190,21 +190,28 @@ echo 30 0 29.5 179.5 | ./inverse \endverbatim
 
 \section changes-c Change log
 
- - <a href="http://geographiclib.sourceforge.net/1.47/C">Version 1.47</a>
+ - <a href="https://geographiclib.sourceforge.io/1.48/C">Version 1.48</a>
+   (released 2017-04-09)
+   - Fix warnings messages from some compilers.
+   - Change default range for longitude and azimuth to
+     (−180°, 180°] (instead of
+     [−180°, 180°)).
+
+ - <a href="https://geographiclib.sourceforge.io/1.47/C">Version 1.47</a>
    (released 2017-02-15)
    - Fix the order of declarations, incorporating the patches in version
      1.46.1.
    - Improve accuracy of area calculation (fixing a flaw introduced in
      version 1.46).
 
- - <a href="http://geographiclib.sourceforge.net/1.46/C">Version 1.46</a>
+ - <a href="https://geographiclib.sourceforge.io/1.46/C">Version 1.46</a>
    (released 2016-02-15)
    - Add s13 and a13 to the geod_geodesicline struct.
    - Add geod_directline, geod_gendirectline, and geod_inverseline.
    - More accurate inverse solution when longitude difference is close
      to 180°.
 
- - <a href="http://geographiclib.sourceforge.net/1.45/C">Version 1.45</a>
+ - <a href="https://geographiclib.sourceforge.io/1.45/C">Version 1.45</a>
    (released 2015-09-30)
    - The solution of the inverse problem now correctly returns NaNs if
      one of the latitudes is a NaN.
@@ -212,7 +219,7 @@ echo 30 0 29.5 179.5 | ./inverse \endverbatim
      configuring with cmake.
    - Add geod_polygon_clear().
 
- - <a href="http://geographiclib.sourceforge.net/1.44/C">Version 1.44</a>
+ - <a href="https://geographiclib.sourceforge.io/1.44/C">Version 1.44</a>
    (released 2015-08-14)
    - Improve accuracy of calculations by evaluating trigonometric
      functions more carefully and replacing the series for the reduced
diff --git a/doc/geodesic-for.dox b/doc/geodesic-for.dox
index cdba88d..690edad 100644
--- a/doc/geodesic-for.dox
+++ b/doc/geodesic-for.dox
@@ -5,22 +5,22 @@
  *
  * Written by Charles Karney <charles at karney.com> and licensed under the
  * MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 /**
 \mainpage Geodesic routines implemented in Fortran
 \author Charles F. F. Karney (charles at karney.com)
-\version 1.47
+\version 1.48
 
 The documentation for other versions is available at
-<tt>http://geographiclib.sourceforge.net/m.nn/Fortran</tt> for versions numbers
+<tt>https://geographiclib.sourceforge.io/m.nn/Fortran</tt> for versions numbers
 <tt>m.nn</tt> ≥ 1.28.
 
 \section abstract-for Abstract
 
 This is a Fortran implementation of the geodesic algorithms from <a
-href="http://geographiclib.sourceforge.net">GeographicLib</a>.  This is a
+href="https://geographiclib.sourceforge.io">GeographicLib</a>.  This is a
 self-contained library which makes it easy to do geodesic computations
 for an ellipsoid of revolution in a Fortran program.  It is written in
 Fortran 77 (avoiding features which are now deprecated) and should
@@ -29,10 +29,10 @@ compile correctly with just about any Fortran compiler.
 \section download-for Downloading the source
 
 The Fortran library is part of %GeographicLib which available for download at
-- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.47.tar.gz">
-  GeographicLib-1.47.tar.gz</a>
-- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.47.zip">
-  GeographicLib-1.47.zip</a>
+- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.48.tar.gz">
+  GeographicLib-1.48.tar.gz</a>
+- <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.48.zip">
+  GeographicLib-1.48.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 the directory
@@ -41,7 +41,7 @@ geodesic.for.  The Fortran-90 interface is defined in geodesic.inc.
 
 Licensed under the
 <a href="http://www.opensource.org/licenses/MIT">MIT/X11 License</a>; see
-<a href="http://geographiclib.sourceforge.net/html/LICENSE.txt">LICENSE.txt</a>.
+<a href="https://geographiclib.sourceforge.io/html/LICENSE.txt">LICENSE.txt</a>.
 
 \section doc-for Library documentation
 
@@ -112,22 +112,22 @@ and are therefore in the public domain.
   <a href="https://doi.org/10.1007/s00190-012-0578-z">
   Algorithms for geodesics</a>,
   J. Geodesy <b>87</b>, 43--55 (2013)
-  (<a href="http://geographiclib.sourceforge.net/geod-addenda.html"> addenda</a>).
+  (<a href="https://geographiclib.sourceforge.io/geod-addenda.html"> addenda</a>).
 - A longer paper on geodesics: C. F. F. Karney,
    <a href="https://arxiv.org/abs/1102.1215v1">Geodesics
    on an ellipsoid of revolution</a>,
    Feb. 2011
-   (<a href="http://geographiclib.sourceforge.net/geod-addenda.html#geod-errata">
+   (<a href="https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata">
    errata</a>).
 - <a href="https://sourceforge.net/projects/geographiclib/">
   Main project page</a>
-- <a href="http://geographiclib.sourceforge.net/">
+- <a href="https://geographiclib.sourceforge.io/">
   GeographicLib web site</a>
   - Documentation on the C++ classes: GeographicLib::Geodesic,
     GeographicLib::GeodesicLine, GeographicLib::PolygonAreaT.
   - The section in the %GeographicLib documentation on geodesics: \ref
     geodesic.
-- <a href="http://sourceforge.net/p/geographiclib/code/ci/release/tree/">
+- <a href="https://sourceforge.net/p/geographiclib/code/ci/release/tree/">
   git repository</a>
 - Implementations in various languages
   - C++ (complete library):
@@ -166,7 +166,7 @@ and are therefore in the public domain.
   - C# (.NET wrapper for complete C++ library):
     <a href="../NET/index.html">
       documentation</a>.
-- <a href="http://geographiclib.sourceforge.net/geodesic-papers/biblio.html">
+- <a href="https://geographiclib.sourceforge.io/geodesic-papers/biblio.html">
   A geodesic bibliography</a>.
 - The wikipedia page,
   <a href="https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid">
@@ -174,17 +174,23 @@ and are therefore in the public domain.
 
 \section changes-for Change log
 
- - <a href="http://geographiclib.sourceforge.net/1.47/Fortran">Version 1.47</a>
+ - <a href="https://geographiclib.sourceforge.io/1.48/Fortran">Version 1.48</a>
+   (released 2017-04-09)
+   - Change default range for longitude and azimuth to
+     (−180°, 180°] (instead of
+     [−180°, 180°)).
+
+ - <a href="https://geographiclib.sourceforge.io/1.47/Fortran">Version 1.47</a>
    (released 2017-02-15)
    - Improve accuracy of area calculation (fixing a flaw introduced in
      version 1.46).
 
- - <a href="http://geographiclib.sourceforge.net/1.46/Fortran">Version 1.46</a>
+ - <a href="https://geographiclib.sourceforge.io/1.46/Fortran">Version 1.46</a>
    (released 2016-02-15)
    - More accurate inverse solution when longitude difference is close
      to 180°.
 
- - <a href="http://geographiclib.sourceforge.net/1.45/Fortran">Version 1.45</a>
+ - <a href="https://geographiclib.sourceforge.io/1.45/Fortran">Version 1.45</a>
    (released 2015-09-30)
    - The solution of the inverse problem now correctly returns NaNs if
      one of the latitudes is a NaN.
@@ -194,7 +200,7 @@ and are therefore in the public domain.
      90°] as NaNs; so the sample programs no longer check for legal
      values of latitude.
 
- - <a href="http://geographiclib.sourceforge.net/1.44/Fortran">Version 1.44</a>
+ - <a href="https://geographiclib.sourceforge.io/1.44/Fortran">Version 1.44</a>
    (released 2015-08-14)
    - Improve accuracy of calculations by evaluating trigonometric
      functions more carefully and replacing the series for the reduced
diff --git a/doc/geodseries30.html b/doc/geodseries30.html
index f6093df..263f751 100644
--- a/doc/geodseries30.html
+++ b/doc/geodseries30.html
@@ -20,7 +20,7 @@ flattening.  See
       <a href="https://doi.org/10.1007/s00190-012-0578-z">
 	10.1007/s00190-012-0578-z</a>
       (<a href="https://doi.org/10.1007/s00190-012-0578-z">pdf</a>);
-      addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+      addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
 	geod-addenda.html</a>.
     </blockquote>
 
diff --git a/doc/index.html.in b/doc/index.html.in
index 828a358..9e0dc78 100644
--- a/doc/index.html.in
+++ b/doc/index.html.in
@@ -2,7 +2,7 @@
   <head>
     <title>GeographicLib- at PROJECT_VERSION@ documentation</title>
     <meta HTTP-EQUIV="Refresh"
-	  CONTENT="0; URL=http://geographiclib.sourceforge.net/@PROJECT_VERSION@/index.html">
+	  CONTENT="0; URL=https://geographiclib.sourceforge.io/@PROJECT_VERSION@/index.html">
   </head>
   <body topmargin=10 leftmargin=10>
     <h3>
@@ -11,8 +11,8 @@
 	  Online documentation for GeographicLib version
 	  @PROJECT_VERSION@ is available at
 	  <center>
-	    <a href="http://geographiclib.sourceforge.net/@PROJECT_VERSION@/index.html">
-	      http://geographiclib.sourceforge.net/@PROJECT_VERSION@/index.html</a>.
+	    <a href="https://geographiclib.sourceforge.io/@PROJECT_VERSION@/index.html">
+	      https://geographiclib.sourceforge.io/@PROJECT_VERSION@/index.html</a>.
 	  </center>
 	  <br>
 	  You will be redirected there.  Click on the link to go there
diff --git a/doc/normal-gravity-potential-1.svg b/doc/normal-gravity-potential-1.svg
new file mode 100644
index 0000000..416ef94
--- /dev/null
+++ b/doc/normal-gravity-potential-1.svg
@@ -0,0 +1,170 @@
+<?xml version="1.0"?>
+<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
+          'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
+<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; stroke:black; text-rendering:auto; stroke-linecap:square; stroke-miterlimit:10; stroke-opacity:1; shape-rendering:auto; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:'Dialog'; font-style:normal; stroke-linejoin:miter; font-size:12px; stroke-dashoffset:0; image-rendering:auto;" width="566" height="396" xmlns="http://www.w3.org/2000/svg"
+><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
+  /><g
+  ><defs id="defs1"
+    ><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
+      ><path d="M0 0 L566 0 L566 396 L0 396 L0 0 Z"
+      /></clipPath
+      ><font horiz-adv-x="60.009766" id="font1"
+      ><font-face ascent="92.822266" descent="23.583984" units-per-em="100" style="font-style:normal; font-family:SansSerif; font-weight:normal;"
+        /><missing-glyph horiz-adv-x="60.009766" d="M4.9844 -17.6719 L4.9844 70.5156 L54.9844 70.5156 L54.9844 -17.6719 L4.9844 -17.6719 ZM10.5938 -12.1094 L49.4219 -12.1094 L49.4219 64.8906 L10.5938 64.8906 L10.5938 -12.1094 Z"
+        /><glyph unicode="0" horiz-adv-x="63.623047" d="M31.7812 66.4062 Q24.1719 66.4062 20.3359 58.9141 Q16.5 51.4219 16.5 36.375 Q16.5 21.3906 20.3359 13.8906 Q24.1719 6.3906 31.7812 6.3906 Q39.4531 6.3906 43.2891 13.8906 Q47.125 21.3906 47.125 36.375 Q47.125 51.4219 43.2891 58.9141 Q39.4531 66.4062 31.7812 66.4062 ZM31.7812 74.2188 Q44.0469 74.2188 50.5156 64.5234 Q56.9844 54.8281 56.9844 36.375 Q56.9844 17.9688 50.5156 8.2734 Q44.0469 -1.4219 31.7812 -1.4219 Q19.5312 -1.4219 13.0625 [...]
+        /><glyph unicode="1" horiz-adv-x="63.623047" d="M12.4062 8.2969 L28.5156 8.2969 L28.5156 63.9219 L10.9844 60.4062 L10.9844 69.3906 L28.4219 72.9062 L38.2812 72.9062 L38.2812 8.2969 L54.3906 8.2969 L54.3906 0 L12.4062 0 L12.4062 8.2969 Z"
+        /><glyph unicode="2" horiz-adv-x="63.623047" d="M19.1875 8.2969 L53.6094 8.2969 L53.6094 0 L7.3281 0 L7.3281 8.2969 Q12.9375 14.1094 22.6328 23.8984 Q32.3281 33.6875 34.8125 36.5312 Q39.5469 41.8438 41.4297 45.5312 Q43.3125 49.2188 43.3125 52.7812 Q43.3125 58.5938 39.2344 62.2578 Q35.1562 65.9219 28.6094 65.9219 Q23.9688 65.9219 18.8203 64.3125 Q13.6719 62.7031 7.8125 59.4219 L7.8125 69.3906 Q13.7656 71.7812 18.9453 73 Q24.125 74.2188 28.4219 74.2188 Q39.75 74.2188 46.4844 68.554 [...]
+        /><glyph unicode="3" horiz-adv-x="63.623047" d="M40.5781 39.3125 Q47.6562 37.7969 51.6328 33.0078 Q55.6094 28.2188 55.6094 21.1875 Q55.6094 10.4062 48.1875 4.4922 Q40.7656 -1.4219 27.0938 -1.4219 Q22.5156 -1.4219 17.6562 -0.5156 Q12.7969 0.3906 7.625 2.2031 L7.625 11.7188 Q11.7188 9.3281 16.6016 8.1094 Q21.4844 6.8906 26.8125 6.8906 Q36.0781 6.8906 40.9375 10.5469 Q45.7969 14.2031 45.7969 21.1875 Q45.7969 27.6406 41.2812 31.2734 Q36.7656 34.9062 28.7188 34.9062 L20.2188 34.9062 L [...]
+        /><glyph unicode="R" horiz-adv-x="69.48242" d="M44.3906 34.1875 Q47.5625 33.1094 50.5625 29.5938 Q53.5625 26.0781 56.5938 19.9219 L66.6094 0 L56 0 L46.6875 18.7031 Q43.0625 26.0312 39.6719 28.4219 Q36.2812 30.8125 30.4219 30.8125 L19.6719 30.8125 L19.6719 0 L9.8125 0 L9.8125 72.9062 L32.0781 72.9062 Q44.5781 72.9062 50.7344 67.6797 Q56.8906 62.4531 56.8906 51.9062 Q56.8906 45.0156 53.6875 40.4766 Q50.4844 35.9375 44.3906 34.1875 ZM19.6719 64.7969 L19.6719 38.9219 L32.0781 38.9219 [...]
+        /><glyph unicode="Z" horiz-adv-x="68.50586" d="M5.6094 72.9062 L62.8906 72.9062 L62.8906 65.375 L16.7969 8.2969 L64.0156 8.2969 L64.0156 0 L4.5 0 L4.5 7.5156 L50.5938 64.5938 L5.6094 64.5938 L5.6094 72.9062 Z"
+      /></font
+    ></defs
+    ><g style="fill:white; stroke:white;"
+    ><rect x="0" y="0" width="566" style="clip-path:url(#clipPath1); stroke:none;" height="396"
+    /></g
+    ><g style="fill:white; text-rendering:optimizeSpeed; color-rendering:optimizeSpeed; image-rendering:optimizeSpeed; shape-rendering:crispEdges; color-interpolation:sRGB; stroke:white;"
+    ><rect x="0" width="566" height="396" y="0" style="stroke:none;"
+      /><path style="stroke:none;" d="M40 353.6667 L549 353.6667 L549 14.3333 L40 14.3333 Z"
+    /></g
+    ><g style="fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; stroke-linejoin:round; color-interpolation:linearRGB; stroke:rgb(38,38,38); stroke-width:0.6667;"
+    ><line y2="353.6667" style="fill:none;" x1="40" x2="549" y1="353.6667"
+      /><line y2="14.3333" style="fill:none;" x1="40" x2="549" y1="14.3333"
+      /><line y2="348.5767" style="fill:none;" x1="40" x2="40" y1="353.6667"
+      /><line y2="348.5767" style="fill:none;" x1="209.6667" x2="209.6667" y1="353.6667"
+      /><line y2="348.5767" style="fill:none;" x1="379.3333" x2="379.3333" y1="353.6667"
+      /><line y2="348.5767" style="fill:none;" x1="549" x2="549" y1="353.6667"
+      /><line y2="19.4233" style="fill:none;" x1="40" x2="40" y1="14.3333"
+      /><line y2="19.4233" style="fill:none;" x1="209.6667" x2="209.6667" y1="14.3333"
+      /><line y2="19.4233" style="fill:none;" x1="379.3333" x2="379.3333" y1="14.3333"
+      /><line y2="19.4233" style="fill:none;" x1="549" x2="549" y1="14.3333"
+    /></g
+    ><g transform="translate(40,359)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
+    ><text x="-4.5" xml:space="preserve" y="13" style="stroke:none;"
+      >0</text
+    ></g
+    ><g transform="translate(209.6667,359)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
+    ><text x="-4.5" xml:space="preserve" y="13" style="stroke:none;"
+      >1</text
+    ></g
+    ><g transform="translate(379.3333,359)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
+    ><text x="-4.5" xml:space="preserve" y="13" style="stroke:none;"
+      >2</text
+    ></g
+    ><g transform="translate(549,359)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
+    ><text x="-4.5" xml:space="preserve" y="13" style="stroke:none;"
+      >3</text
+    ></g
+    ><g transform="translate(294.5002,377.3333)" style="font-size:15px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
+    ><text x="-5.5" xml:space="preserve" y="14" style="stroke:none;"
+      >R</text
+    ></g
+    ><g style="fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; stroke-linejoin:round; color-interpolation:linearRGB; stroke:rgb(38,38,38); stroke-width:0.6667;"
+    ><line y2="14.3333" style="fill:none;" x1="40" x2="40" y1="353.6667"
+      /><line y2="14.3333" style="fill:none;" x1="549" x2="549" y1="353.6667"
+      /><line y2="353.6667" style="fill:none;" x1="40" x2="45.09" y1="353.6667"
+      /><line y2="184" style="fill:none;" x1="40" x2="45.09" y1="184"
+      /><line y2="14.3333" style="fill:none;" x1="40" x2="45.09" y1="14.3333"
+      /><line y2="353.6667" style="fill:none;" x1="549" x2="543.91" y1="353.6667"
+      /><line y2="184" style="fill:none;" x1="549" x2="543.91" y1="184"
+      /><line y2="14.3333" style="fill:none;" x1="549" x2="543.91" y1="14.3333"
+    /></g
+    ><g transform="translate(34.6667,353.6667)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
+    ><text x="-9" xml:space="preserve" y="4.5" style="stroke:none;"
+      >0</text
+    ></g
+    ><g transform="translate(34.6667,184)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
+    ><text x="-9" xml:space="preserve" y="4.5" style="stroke:none;"
+      >1</text
+    ></g
+    ><g transform="translate(34.6667,14.3333)" style="font-size:13px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
+    ><text x="-9" xml:space="preserve" y="4.5" style="stroke:none;"
+      >2</text
+    ></g
+    ><g transform="translate(11.9506,150.0665)" style="font-size:15px; fill:rgb(38,38,38); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; font-family:'SansSerif'; color-interpolation:linearRGB; stroke:rgb(38,38,38);"
+    ><text x="-5.5" xml:space="preserve" y="-4" style="stroke:none;"
+      >Z</text
+    ></g
+    ><g style="stroke-linecap:butt; fill:rgb(23,115,69); text-rendering:geometricPrecision; color-rendering:optimizeQuality; image-rendering:optimizeQuality; stroke-linejoin:round; color-interpolation:linearRGB; stroke:rgb(23,115,69); stroke-width:0.6667;"
+    ><line y2="353.6667" style="fill:none;" x1="209.6667" x2="549" y1="353.6667"
+      /><path d="M207.0891 330.0967 L236.9066 323.4906 L256.7424 318.9066 L274.8645 314.4418 L289.6187 310.5099 L304.2762 306.2299 L317.1844 302.0323 L328.34 297.9586 L339.3022 293.3956 L348.4761 288.9841 L352.9553 286.5662 L357.3412 283.9844 L361.6133 281.2195 L365.7498 278.2526 L369.7166 275.0645 L372.2498 272.8081 L375.8568 269.2187 L378.1151 266.6862 L380.2427 264.0426 L382.2278 261.2908 L384.0602 258.436 L385.7365 255.4853 L387.2483 252.4479 L389.2079 247.7517 L390.3108 244.543 L391 [...]
+      /><path d="M199.4346 307.2432 L222.5868 296.6773 L237.9484 289.4711 L251.6626 282.7587 L263.7259 276.5357 L275.6195 269.9976 L285.8436 263.9542 L295.8404 257.5442 L304.1778 251.7045 L312.2437 245.494 L319.9653 238.862 L323.6691 235.3724 L327.2542 231.7591 L332.9244 225.4513 L338.1552 218.7749 L342.8771 211.7296 L347.0271 204.3329 L349.2192 199.7398 L350.5511 196.6193 L353.4236 188.6394 L355.636 180.4523 L357.2071 172.1182 L357.8586 167.069 L358.3015 161.9993 L358.5492 156.9161 L358 [...]
+      /><path d="M186.9356 285.8 L215.7339 264.8197 L226.5468 256.6158 L235.8768 249.2667 L245.0422 241.7155 L254.004 233.9212 L261.4812 227.0144 L268.7327 219.8709 L275.7162 212.464 L281.2932 206.0726 L287.6489 198.1217 L292.6235 191.2507 L297.2656 184.1512 L301.5378 176.8231 L305.4045 169.2729 L308.8334 161.5158 L311.7975 153.5686 L314.278 145.4568 L316.2665 137.211 L317.7647 128.8617 L318.781 120.4412 L319.3358 111.9765 L319.4495 103.4949 L319.1543 95.0183 L318.4756 86.5621 L317.2014  [...]
+      /><path d="M169.9721 266.419 L190.9684 244.2415 L205.8005 227.9174 L212.4746 220.2301 L219.0034 212.4203 L225.3625 204.4703 L230.5068 197.7262 L235.495 190.8639 L240.3034 183.8761 L244.9132 176.7552 L249.3025 169.4952 L253.4474 162.0943 L257.326 154.5493 L260.9145 146.8634 L263.5613 140.6145 L266.5746 132.6843 L269.24 124.6319 L271.5458 116.4693 L273.1237 109.8676 L274.4573 103.2149 L275.7841 94.8368 L276.573 88.0959 L277.2211 79.638 L277.4739 72.8565 L277.4723 64.3731 L277.1278 55 [...]
+      /><path d="M149.0597 249.6888 L164.1276 227.1081 L175.1756 210.0067 L184.9403 194.1023 L193.3939 179.3918 L201.3296 164.3967 L207.9327 150.63 L211.3464 142.8643 L213.9338 136.59 L218.6929 123.8803 L221.3652 115.8279 L223.3231 109.3314 L225.1165 102.7857 L226.7402 96.1958 L228.1875 89.5652 L229.4532 82.899 L230.5374 76.1989 L231.4366 69.4716 L232.1509 62.724 L232.6769 55.9577 L233.0179 49.1795 L233.1757 42.3945 L233.1536 35.6078 L232.9534 28.8246 L232.5785 22.0481 L231.9324 14.2929" [...]
+      /><path d="M124.8333 236.1182 L135.4541 212.9903 L143.0664 195.9501 L149.7492 180.3556 L155.4996 166.2088 L160.9376 151.9415 L165.4605 139.1435 L169.6476 126.2336 L173.4579 113.2066 L176.8524 100.0642 L179.795 86.8149 L182.2534 73.4673 L183.9868 61.7178 L185.4719 48.2276 L186.3277 36.3815 L186.7657 24.5133 L186.7843 14.2929" style="fill:none; fill-rule:evenodd;"
+      /><path d="M98.0294 226.1191 L108.7986 188.6114 L116.7251 159.1184 L120.01 145.9489 L123.1093 132.7335 L125.9966 119.4724 L128.3286 107.8265 L130.7501 94.4703 L132.6383 82.7463 L134.2965 70.985 L135.712 59.1932 L136.8737 47.3742 L137.773 35.5315 L138.4024 23.6718 L138.6988 14.2929" style="fill:none; fill-rule:evenodd;"
+      /><path d="M69.4623 219.9955 L74.6093 183.0261 L78.3616 154.4271 L81.5763 127.4721 L84.0514 103.8478 L86.1431 80.1877 L87.6919 58.1854 L88.8218 36.1576 L89.4974 14.2929" style="fill:none; fill-rule:evenodd;"
+      /><line y2="14.3333" style="fill:none;" x1="40" x2="40" y1="217.9333"
+      /><path d="M422.3676 353.6667 L422.2759 343.3175 L422.0079 333.1412 L421.5634 322.9711 L420.9441 312.8101 L420.1483 302.6613 L419.1795 292.5275 L418.0394 282.4117 L416.492 270.6366 L413.3057 250.5283 L411.4648 240.5165 L409.1098 228.8755 L406.9194 218.9342 L404.164 207.3816 L401.636 197.5207 L398.4955 186.0669 L395.6434 176.2937 L392.1347 164.9481 L385.1122 144.0401 L377.4653 123.3526 L373.0998 112.3074 L368.568 101.3299 L359.0327 79.5752 L348.9019 58.0904 L337.4409 35.3686 L326.13 [...]
+      /><path d="M549 277.3167 L537.1997 275.9758 L527.1079 274.6404 L517.0467 273.0931 L507.0279 271.284 L498.7295 269.5305 L490.4921 267.5038 L482.3431 265.1454 L475.9144 262.9734 L469.5926 260.5039 L463.4167 257.694 L457.4292 254.5024 L451.6809 250.8972 L446.2261 246.8618 L442.356 243.5564 L438.6912 240.0251 L434.134 234.9991 L428.9489 228.2874 L424.278 221.2084 L419.2254 212.3718 L414.6325 203.288 L410.3586 194.0487 L405.6351 183.1517 L388.2256 140.7791 L380.3361 122.0106 L373.5545 1 [...]
+      /><path d="M549 200.9667 L538.9965 199.0849 L530.693 197.3465 L520.781 195.0276 L512.5743 192.8759 L504.4319 190.4994 L496.366 187.8723 L488.3951 184.9676 L482.1021 182.4272 L474.3619 178.9575 L468.2862 175.9341 L462.3309 172.6815 L456.5079 169.1949 L450.8326 165.4741 L445.315 161.5226 L439.9654 157.3488 L434.7872 152.9629 L429.7786 148.3819 L424.9414 143.6244 L420.2654 138.7058 L415.7404 133.648 L411.3579 128.4664 L406.0592 121.8409 L400.9336 115.0814 L395.959 108.2099 L386.3592 9 [...]
+      /><path d="M549 141.5833 L532.4439 137.8761 L517.6761 133.9975 L503.078 129.5217 L490.2903 124.973 L477.7332 119.8253 L471.5573 117.0122 L465.4595 114.0346 L459.4449 110.8872 L453.5235 107.572 L447.7005 104.087 L441.9794 100.4375 L432.2269 93.661 L426.8061 89.5788 L421.4955 85.3541 L411.1984 76.5111 L406.2068 71.9131 L400.1039 66.0223 L389.4675 55.0669 L378.1033 42.4692 L367.1173 29.5406 L354.7701 14.2929" style="fill:none; fill-rule:evenodd;"
+      /><path d="M549 82.2 L537.4152 79.582 L525.8931 76.7079 L514.4423 73.5521 L504.7 70.605 L493.4291 66.8604 L483.865 63.3721 L474.4043 59.614 L465.0608 55.5759 L455.8462 51.2494 L446.7724 46.6328 L439.3292 42.5642 L430.5455 37.4199 L421.9298 32.0007 L413.4839 26.3152 L405.2126 20.3837 L397.2033 14.2929" style="fill:none; fill-rule:evenodd;"
+      /><path d="M549 31.3 L532.4507 27.5588 L516.0151 23.3511 L499.7203 18.6276 L486.4319 14.2929" style="fill:none; fill-rule:evenodd;"
+      /><path d="M209.6667 353.6667 L209.4548 346.8844 L208.8205 340.1285 L207.7693 333.4247 L206.3093 326.7982 L204.4514 320.2719 L202.2091 313.8673 L199.598 307.604 L196.6351 301.4994 L193.3385 295.5682 L189.7266 289.8233 L185.8188 284.2755 L180.5466 277.6312 L176.0414 272.5563 L171.3004 267.7011 L166.3409 263.0694 L159.8591 257.5982 L154.467 253.4778 L147.4927 248.6498 L141.7427 245.0456 L134.3632 240.8628 L128.3207 237.7737 L120.6127 234.2324 L112.7517 231.0448 L104.7572 228.2087 L98 [...]
+      /><path d="M213.0227 353.6667 L212.8174 346.8842 L212.2032 340.1263 L211.1852 333.4176 L209.7685 326.7815 L207.9649 320.2398 L205.7862 313.8133 L203.2465 307.5207 L199.5878 299.8688 L196.2941 293.9359 L192.6929 288.1843 L188.8022 282.6245 L183.5589 275.9571 L179.0817 270.8576 L173.1598 264.7849 L168.1818 260.1729 L161.6848 254.7196 L156.2856 250.6086 L149.3074 245.7862 L142.0986 241.3154 L134.6833 237.1963 L128.6176 234.1533 L120.886 230.6638 L113.0069 227.5214 L104.9985 224.7244 L [...]
+      /><path d="M216.567 353.6667 L216.3668 346.8839 L215.7713 340.1243 L214.7838 333.4108 L213.4095 326.7658 L211.6586 320.2099 L209.5421 313.7628 L207.0716 307.4427 L203.5084 299.7456 L200.2966 293.7679 L195.8565 286.5411 L191.9843 280.9682 L186.7715 274.2771 L182.3234 269.1523 L176.442 263.0401 L171.4991 258.3904 L165.0481 252.8828 L159.6864 248.7229 L152.7555 243.8324 L145.5938 239.2871 L138.2243 235.0865 L130.669 231.2299 L122.9483 227.7161 L115.0812 224.5435 L107.0857 221.7103 L98 [...]
+      /><path d="M220.3149 353.6667 L220.1215 346.8836 L219.5447 340.1225 L218.586 333.4047 L216.8605 325.1004 L215.0705 318.5552 L212.926 312.1172 L210.437 305.8037 L206.867 298.11 L203.6591 292.1302 L199.2344 284.8938 L195.3817 279.3074 L190.2006 272.5916 L185.7827 267.4407 L179.9436 261.2881 L173.7796 255.4609 L167.3189 249.9645 L161.9544 245.8084 L155.0247 240.9162 L147.8685 236.3618 L140.5082 232.1455 L132.9644 228.2664 L125.257 224.7236 L117.4043 221.5155 L109.4235 218.6407 L101.33 [...]
+      /><path d="M224.2868 353.6667 L224.0985 346.8835 L223.5386 340.1208 L222.6088 333.399 L220.9342 325.0843 L219.1951 318.5253 L216.5348 310.4712 L214.0322 304.1635 L210.4556 296.4724 L207.2535 290.4897 L202.8456 283.243 L198.015 276.2707 L192.7906 269.5883 L188.3465 264.4598 L182.4845 258.3291 L176.3068 252.5163 L169.84 247.0273 L163.1088 241.8653 L156.1372 237.0332 L148.9475 232.5316 L141.5611 228.3611 L133.9975 224.5206 L126.2755 221.0097 L118.4126 217.8266 L110.4254 214.9699 L102. [...]
+      /><path d="M228.5048 353.6667 L228.3232 346.8832 L227.5869 338.4334 L226.596 331.7205 L224.8603 323.4182 L223.0839 316.8688 L220.393 308.825 L217.8785 302.5225 L214.2986 294.8327 L211.1021 288.8467 L206.7124 281.5887 L201.9095 274.5974 L196.7204 267.8876 L192.3092 262.7306 L186.4929 256.5564 L180.3644 250.6919 L173.9491 245.1424 L167.271 239.9121 L160.3529 235.0035 L153.2165 230.4183 L145.882 226.1566 L138.369 222.2183 L130.6955 218.6027 L122.8784 215.3086 L113.3315 211.7778 L105.2 [...]
+      /><path d="M232.9992 353.6667 L232.8228 346.8831 L232.1085 338.4313 L231.1431 331.7142 L229.4566 323.4019 L227.7294 316.8395 L225.1114 308.7717 L222.0014 300.8803 L218.4198 293.1915 L215.2317 287.2014 L210.8594 279.9321 L206.0857 272.9211 L200.9329 266.1833 L195.4274 259.7306 L189.5939 253.5723 L183.4572 247.7163 L177.0411 242.1678 L170.3681 236.9309 L163.4602 232.008 L156.3377 227.4009 L147.5352 222.2897 L140.0083 218.378 L132.3256 214.7816 L124.5035 211.4994 L114.9545 207.9739 L1 [...]
+      /><path d="M237.7991 353.6667 L237.6277 346.8829 L236.9321 338.4294 L235.7088 330.0362 L233.9646 321.7356 L232.2035 315.182 L229.5567 307.1234 L226.4331 299.2378 L222.8515 291.5492 L218.8321 284.0793 L214.4004 276.8469 L209.5793 269.8681 L204.3921 263.1566 L198.8633 256.7235 L193.0164 250.5782 L186.8748 244.7273 L179.1474 238.1023 L172.4348 232.9161 L165.4962 228.0365 L158.3506 223.465 L149.5292 218.3867 L141.9922 214.494 L132.7498 210.2291 L124.9005 207.0124 L115.3266 203.5553 L10 [...]
+      /><path d="M242.9434 353.6667 L242.7771 346.8827 L242.1018 338.4277 L240.9108 330.0295 L239.2141 321.7191 L237.0203 313.5254 L234.3481 305.4754 L231.2109 297.5947 L227.6276 289.9061 L223.6217 282.4301 L219.2121 275.1843 L214.4207 268.1844 L208.2012 260.127 L202.6526 253.711 L196.7957 247.5751 L190.6523 241.7262 L182.9314 235.0932 L176.231 229.8914 L167.8995 224.0437 L160.7357 219.5009 L151.9003 214.4467 L144.3574 210.5656 L135.1133 206.3042 L127.2662 203.0821 L117.698 199.6087 L109 [...]
+      /><path d="M248.4796 353.6667 L248.2268 345.1884 L247.4684 336.7403 L246.2095 328.3522 L244.4568 320.0528 L242.2257 311.8696 L239.5263 303.8281 L236.3773 295.9523 L232.7956 288.2635 L228.8 280.7812 L224.4107 273.5224 L219.6516 266.5018 L213.4774 258.4087 L207.9753 251.9532 L200.9735 244.5654 L194.8307 238.7156 L187.12 232.0708 L180.434 226.8503 L172.1261 220.9692 L163.5357 215.5088 L154.6913 210.4699 L147.1464 206.5926 L137.9048 202.3257 L128.4808 198.478 L118.897 195.0477 L109.174 [...]
+      /><path d="M254.4655 353.6667 L254.2177 345.1881 L253.478 336.7383 L252.2496 328.3454 L250.5428 320.037 L248.3642 311.8393 L245.7293 303.7764 L242.655 295.8714 L238.4048 286.6227 L234.4193 279.1348 L229.1342 270.4365 L224.3326 263.4435 L218.1263 255.3759 L212.6087 248.934 L205.5994 241.5526 L199.4599 235.6993 L191.7619 229.0396 L185.093 223.7973 L176.8114 217.879 L168.2527 212.3691 L159.4436 207.2686 L150.4097 202.5778 L141.1749 198.2958 L131.762 194.4213 L122.192 190.9526 L112.485 [...]
+      /><path d="M260.9705 353.6667 L260.7295 345.1879 L260.0068 336.7365 L258.8072 328.3395 L257.8622 323.3384 L256.7492 318.3718 L254.5316 310.1847 L251.2842 300.5383 L248.108 292.6727 L243.7595 283.4705 L239.7061 276.0189 L234.3583 267.3593 L229.5177 260.3928 L223.2807 252.3487 L217.7479 245.9188 L210.7356 238.5419 L203.3435 231.5435 L195.605 224.9307 L187.5489 218.7092 L179.2029 212.8819 L170.5936 207.4508 L161.7464 202.417 L152.6845 197.7803 L143.4305 193.5399 L134.0055 189.6945 L12 [...]
+      /><path d="M268.0897 353.6667 L267.8539 345.1877 L266.9478 335.0498 L265.6821 326.6627 L263.5579 316.7085 L261.2979 308.5328 L258.0166 298.8979 L254.8251 291.039 L250.4715 281.8391 L246.425 274.3833 L241.0974 265.7103 L235.2846 257.3547 L229.0189 249.3337 L223.4724 242.9152 L216.4567 235.5413 L209.0732 228.5338 L201.3532 221.8995 L193.3237 215.6432 L185.0112 209.7681 L176.4407 204.2762 L166.1472 198.3543 L157.0971 193.6946 L147.8596 189.4183 L138.4545 185.5246 L127.2949 181.4635 L1 [...]
+      /><path d="M275.9453 353.6667 L275.7128 345.1876 L274.8238 335.0483 L273.5801 326.6576 L271.4966 316.6951 L269.2774 308.508 L266.0554 298.8528 L262.2498 289.4132 L257.8842 280.2183 L252.9893 271.2937 L247.5973 262.6609 L241.7371 254.3382 L235.439 246.3408 L228.7355 238.6812 L221.6553 231.3689 L214.2256 224.4115 L206.4724 217.8152 L198.4235 211.5837 L188.6913 204.7787 L180.0829 199.3463 L169.7592 193.4769 L160.6937 188.8472 L149.8916 183.9135 L140.46 180.0841 L129.2794 176.08 L119.5 [...]
+      /><path d="M284.7035 353.6667 L284.4744 345.1875 L283.5989 335.0469 L282.0736 324.9837 L279.9138 315.0371 L277.6436 306.8643 L274.3724 297.2259 L270.5295 287.8004 L266.1436 278.6151 L261.2437 269.6934 L255.8601 261.0551 L250.0219 252.7169 L243.7595 244.6923 L237.1018 236.9927 L228.8712 228.432 L221.4517 221.4643 L212.4034 213.7738 L204.3385 207.5623 L194.6026 200.7624 L184.5462 194.446 L174.2012 188.6143 L165.1271 184.0012 L154.3243 179.0678 L143.3138 174.6191 L132.1208 170.6489 L1 [...]
+      /><path d="M294.6086 353.6667 L294.2811 343.4937 L293.3038 333.3625 L291.6852 323.3138 L289.4406 313.3859 L286.5901 303.6145 L283.1612 294.0312 L279.1791 284.6641 L274.6711 275.5374 L269.671 266.6718 L264.206 258.0843 L258.3067 249.7893 L250.9126 240.4966 L244.1701 232.872 L235.8649 224.3841 L228.3996 217.464 L219.319 209.8112 L209.8703 202.6158 L200.0897 195.8811 L190.0057 189.6087 L179.6477 183.7998 L169.043 178.4536 L158.2175 173.5723 L147.1951 169.1508 L135.9989 165.1908 L124.6 [...]
+      /><path d="M306.0288 353.6667 L305.7014 343.4937 L304.719 333.3628 L303.097 323.3147 L300.8506 313.3873 L298.0036 303.6153 L294.5815 294.0294 L290.6129 284.6558 L288.4344 280.0558 L285.3363 274.018 L280.2938 265.176 L277.6029 260.8558 L273.8465 255.2033 L267.8708 246.9628 L260.4157 237.7204 L252.477 228.8887 L244.0937 220.4771 L235.3033 212.4918 L226.1396 204.938 L216.6349 197.8195 L206.8166 191.1386 L196.7133 184.8969 L184.8511 178.3026 L174.2225 173.0039 L163.3855 168.1463 L152.3 [...]
+      /><path d="M319.5869 353.6667 L319.251 343.494 L318.2499 333.3652 L316.5957 323.3223 L314.3103 313.4037 L311.4209 303.6438 L309.7598 298.8328 L307.3302 292.4967 L303.2429 283.1744 L301.0101 278.6005 L297.8475 272.5965 L295.3398 268.1671 L291.8244 262.3619 L285.2277 252.488 L278.1017 242.9885 L270.4888 233.8734 L262.4313 225.1501 L253.9632 216.8246 L245.1168 208.9015 L239.9047 204.5561 L234.5822 200.3438 L225.0266 193.2943 L213.7489 185.7415 L203.5999 179.5751 L191.7073 173.0361 L18 [...]
+      /><path d="M336.4908 353.6667 L336.4009 348.5777 L336.1345 343.4949 L335.6917 338.4245 L335.0758 333.3723 L334.2868 328.3439 L333.3299 323.3448 L332.2101 318.3799 L330.4693 311.8206 L327.3542 302.1308 L325.5812 297.3599 L323.004 291.0821 L320.9188 286.4388 L317.9462 280.3384 L315.5777 275.8329 L312.2455 269.9212 L305.961 259.8451 L299.1472 250.1196 L291.8481 240.7516 L287.4758 235.5607 L282.9677 230.4887 L274.7644 221.9008 L264.939 212.5381 L254.6724 203.6615 L244.0021 195.2749 L23 [...]
+      /><path d="M359.8556 353.6667 L359.7521 348.5781 L359.4399 343.498 L358.9207 338.4348 L358.2031 333.3961 L357.2903 328.389 L356.1891 323.4199 L354.9081 318.4939 L352.9349 312.0011 L351.2671 307.1921 L348.8103 300.8661 L346.8031 296.1887 L343.9239 290.0437 L341.6215 285.5048 L338.3707 279.5469 L332.2356 269.3798 L328.4944 263.7179 L324.5955 258.1633 L320.5489 252.7155 L316.3615 247.3739 L307.5999 237.0088 L298.3616 227.0663 L288.6872 217.5473 L278.6124 208.4537 L268.166 199.789 L262 [...]
+      /><path d="M493.0134 353.6667 L493.1355 345.1845 L493.4969 336.7092 L494.0925 328.247 L495.0918 318.1166 L496.3745 308.018 L497.9049 297.9539 L499.6457 287.924 L501.8988 276.2632 L505.8029 258.013 L510.4042 238.18 L528.6315 164.037 L536.5447 131.0403 L543.0176 102.9333 L549.0405 75.5666" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M524.4594 353.6667 L524.5323 345.1837 L524.8106 335.0078 L525.8405 316.3738 L527.4913 297.7844 L529.8955 277.5674 L533.07 255.741 L536.9774 232.3114 L542.1658 203.9389 L549.0405 168.3724" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M40 105.5716 L48.4828 105.653 L58.6577 105.9669 L67.1295 106.408 L77.2819 107.1529 L85.7274 107.9537 L95.8392 109.1278 L105.9213 110.5343 L115.9684 112.1716 L124.3104 113.7139 L134.2797 115.7719 L144.1996 118.0591 L154.0649 120.5684 L162.2409 122.8318 L171.9942 125.7466 L181.6801 128.8787 L191.2946 132.2245 L199.2493 135.1716 L208.7233 138.8958 L218.1161 142.8202 L227.4257 146.938 L236.6505 151.2458 L245.787 155.7318 L254.8387 160.3926 L263.8039 165.2145 L280.0206 174.44 [...]
+      /><path d="M40 96.5266 L55.2674 96.7693 L72.2122 97.6108 L87.4288 98.8799 L104.2794 100.8532 L119.378 103.1318 L136.062 106.2112 L150.9805 109.4654 L167.4336 113.6053 L183.7438 118.2762 L199.9003 123.4544 L215.8968 129.1095 L233.3046 135.835 L248.9682 142.357 L264.4911 149.2048 L279.9036 156.2985 L312.1385 171.4769 L324.4971 177.0878 L336.9981 182.3746 L348.1181 186.5435 L354.5722 188.6399 L361.1111 190.4565 L367.7366 191.9211 L372.7604 192.7377 L379.5149 193.3751 L384.6032 193.462 [...]
+      /><path d="M40 86.8777 L53.5718 87.0525 L67.1346 87.575 L80.6796 88.4471 L94.1982 89.6619 L107.6816 91.2178 L121.1224 93.1079 L134.5128 95.3271 L149.5091 98.203 L164.4257 101.4674 L179.2568 105.0999 L193.9988 109.0786 L210.2741 113.87 L224.8332 118.4764 L239.3176 123.3136 L285.7198 139.6746 L300.1685 144.6136 L314.7328 149.1997 L326.1836 152.3504 L332.787 153.9147 L339.4396 155.2585 L346.1397 156.3325 L352.884 157.0824 L359.6605 157.4506 L364.7488 157.437 L371.5185 156.9874 L376.56 [...]
+      /><path d="M40 76.5586 L51.8759 76.6774 L63.7469 77.0353 L75.6085 77.6309 L87.4559 78.4605 L99.2849 79.521 L111.0913 80.8104 L122.8713 82.3205 L134.6216 84.0477 L148.0107 86.2754 L161.3543 88.761 L174.6509 91.4876 L189.5535 94.8164 L202.7531 97.979 L217.5562 101.7252 L261.8171 113.5374 L276.6019 117.3549 L291.4596 120.8772 L303.0902 123.2763 L311.448 124.7304 L318.1668 125.6924 L324.911 126.4406 L331.6791 126.9326 L338.4623 127.1294 L343.5523 127.0565 L350.3237 126.6289 L355.3798 1 [...]
+      /><path d="M40 65.4963 L51.8761 65.5998 L63.7484 65.9103 L75.6137 66.4278 L87.4685 67.1489 L99.3094 68.0668 L111.1336 69.1798 L122.9388 70.4811 L136.4046 72.1846 L158.2232 75.4116 L179.964 79.1307 L201.6379 83.2197 L243.2437 91.474 L259.9236 94.5755 L274.9934 97.0407 L288.4497 98.8104 L300.2772 99.8911 L312.1419 100.3849 L318.9269 100.3408 L324.0135 100.1253 L329.0883 99.7384 L334.146 99.1667 L342.5106 97.7652 L350.7513 95.7598 L358.8105 93.1163 L365.0864 90.5374 L371.1791 87.553 L [...]
+      /><path d="M40 53.601 L60.3578 53.8589 L80.703 54.6224 L101.0238 55.8779 L123.0001 57.7527 L141.5598 59.7158 L161.7691 62.1861 L218.9033 70.1469 L235.7241 72.3695 L250.894 74.1103 L262.7214 75.1894 L276.2693 76.0055 L288.1426 76.2311 L298.3175 75.9614 L308.4669 75.1707 L316.874 74.0492 L323.5452 72.8107 L330.1487 71.2463 L336.6605 69.3359 L344.6348 66.4448 L350.8514 63.7267 L356.9 60.6506 L362.762 57.2319 L368.4204 53.4873 L373.8684 49.4408 L379.0992 45.1194 L385.3345 39.3676 L391. [...]
+      /><path d="M40 40.7759 L56.9659 40.9184 L75.6227 41.3986 L92.5739 42.1196 L111.2057 43.2004 L143.3475 45.664 L207.5523 51.5412 L221.0852 52.5898 L232.9381 53.3261 L246.4996 53.8741 L258.3763 54.0065 L268.5529 53.7893 L278.7142 53.1938 L285.4703 52.5541 L292.2027 51.6905 L298.8978 50.5843 L305.5436 49.2134 L312.125 47.5592 L318.6232 45.6029 L325.0197 43.3362 L329.7364 41.4257 L335.9055 38.5957 L340.4305 36.2661 L344.8605 33.7602 L350.6088 30.1548 L354.7961 27.2602 L360.2068 23.1645  [...]
+      /><path d="M40 26.9005 L68.8413 27.1975 L97.6716 28.0526 L124.7907 29.2691 L179.0081 32.1398 L201.0471 33.0136 L212.9209 33.2749 L223.1009 33.3258 L233.2792 33.1748 L241.7557 32.8592 L253.6052 32.0686 L265.4124 30.7859 L275.4702 29.2233 L285.4398 27.1652 L295.2771 24.5541 L304.9345 21.3406 L309.6784 19.4963 L314.3578 17.4925 L320.9536 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M422.3676 353.6667 L414.1812 340.1275 L405.048 325.83 L395.5331 311.7826 L386.6358 299.3728 L376.3709 285.8648 L366.7831 273.9805 L356.861 262.3745 L346.5995 251.067 L335.9971 240.0786 L325.0536 229.4296 L313.7708 219.1415 L303.4584 210.3161 L291.5461 200.7659 L280.6823 192.6286 L268.1626 183.888 L256.778 176.499 L243.6916 168.6316 L231.8234 162.0451 L218.2213 155.1075 L205.9208 149.371 L191.8634 143.4089 L179.1877 138.5565 L164.7428 133.6073 L151.7545 129.6676 L138.6418 [...]
+      /><path d="M422.3676 353.6667 L431.8842 336.9903 L440.7119 320.5477 L449.8909 302.3742 L458.6169 283.9795 L466.9119 265.3871 L475.441 245.0464 L483.5171 224.522 L491.1674 203.8351 L498.4173 183.0041 L505.8029 160.4282 L512.7778 137.7234 L519.8275 113.2694 L526.4666 88.6999 L532.7222 64.0321 L538.6249 39.276 L544.217 14.2929" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><line y2="353.6667" style="fill:none;" x1="209.6667" x2="141.8" y1="353.6667"
+      /><path d="M207.0891 330.0967 L187.2194 334.5385 L172.3615 338.0613 L160.8772 341.0863 L152.7706 343.5833 L146.4441 346.0327 L143.422 347.5726 L141.9902 348.4821 L140.6522 349.5237 L139.4576 350.7266 L138.4559 352.094 L137.6476 353.5847 L136.9133 353.6678" style="fill:none; fill-rule:evenodd;"
+      /><path d="M199.4346 307.2432 L180.9423 315.7614 L167.2028 322.4237 L156.7027 327.9717 L152.2947 330.5165 L147.976 333.2098 L143.7883 336.1021 L141.1013 338.1739 L138.5302 340.3876 L136.1102 342.7654 L133.8774 345.3194 L131.853 348.0416 L128.3526 353.6671" style="fill:none; fill-rule:evenodd;"
+      /><path d="M186.9356 285.8 L169.1226 298.8072 L156.9975 308.0881 L146.5415 316.7409 L139.0562 323.6382 L135.4887 327.2686 L132.0778 331.046 L128.8568 334.9864 L126.8298 337.7076 L124.9063 340.5029 L122.2162 344.8232 L117.4515 353.6672" style="fill:none; fill-rule:evenodd;"
+      /><path d="M169.9721 266.419 L154.8258 282.4525 L143.4274 295.0193 L134.6416 305.3646 L127.3503 314.7383 L121.5225 323.0836 L116.1968 331.7574 L113.7468 336.2187 L110.7045 342.2847 L108.5827 346.9112 L105.9432 353.1631 L105.3123 353.6674" style="fill:none; fill-rule:evenodd;"
+      /><path d="M149.0597 249.6888 L135.8942 269.4597 L126.7244 283.7346 L119.6704 295.3305 L112.9967 307.149 L107.5762 317.7155 L103.3081 326.9569 L100.6743 333.2115 L98.2123 339.5355 L93.2587 353.6666 L92.7512 353.6678" style="fill:none; fill-rule:evenodd;"
+      /><path d="M124.8333 236.1182 L114.2236 259.2511 L107.3388 274.7579 L101.3988 288.825 L96.4157 301.45 L91.7938 314.2117 L88.0981 325.4983 L84.3025 338.5293 L80.5627 353.3334 L80.1784 353.6675" style="fill:none; fill-rule:evenodd;"
+      /><path d="M98.0294 226.1191 L86.3511 266.8961 L82.3736 281.6388 L78.6182 296.4396 L75.518 309.6539 L73.0199 321.2647 L70.126 336.2577 L67.3262 352.9912 L67.0686 353.6663 L66.8138 353.667" style="fill:none; fill-rule:evenodd;"
+      /><path d="M69.4623 219.9955 L63.3962 263.6895 L59.3391 295.6697 L56.3967 322.656 L53.599 353.6668" style="fill:none; fill-rule:evenodd;"
+      /><line y2="353.6667" style="fill:none;" x1="40" x2="40" y1="217.9333"
+      /><path d="M195.2145 353.6667 L195.0738 348.5793 L194.4505 341.8228 L193.6605 336.795 L192.1878 330.1717 L190.7778 325.2814 L188.5077 318.887 L186.5251 314.1996 L183.5293 308.1113 L181.0325 303.6762 L177.3916 297.9502 L173.4191 292.4489 L169.1409 287.1816 L164.5822 282.1549 L159.7665 277.3738 L154.7164 272.8414 L149.4523 268.559 L143.9936 264.5274 L138.3583 260.7463 L132.5632 257.2152 L125.1177 253.1514 L119.0173 250.1785 L112.8035 247.4509 L106.488 244.9673 L98.4683 242.2035 L91.9 [...]
+      /><path d="M183.7582 353.6667 L183.5904 348.5804 L183.0889 343.516 L182.2594 338.4949 L181.1113 333.5371 L179.6567 328.6602 L177.9097 323.8802 L175.886 319.2104 L172.7861 313.1749 L170.1817 308.8022 L166.3677 303.1903 L163.2717 299.1509 L158.8578 293.9969 L155.3509 290.3082 L150.4376 285.6278 L146.5897 282.2964 L141.2625 278.0927 L137.1325 275.1183 L131.4631 271.3889 L125.6262 267.9275 L119.6395 264.7321 L113.5193 261.8003 L107.2808 259.1296 L100.9376 256.7174 L94.5029 254.562 L87. [...]
+      /><path d="M174.4859 353.6667 L174.3957 350.2749 L173.9235 345.2082 L173.0565 340.1939 L171.8105 335.26 L170.2068 330.4305 L168.2694 325.7246 L166.0245 321.1573 L163.4975 316.7397 L160.7134 312.4796 L157.6954 308.3818 L154.4646 304.4491 L149.8598 299.4651 L146.2059 295.9223 L142.3974 292.5461 L138.4482 289.3355 L132.9851 285.31 L128.7543 282.4808 L122.9543 278.9582 L118.4966 276.5014 L112.4253 273.4702 L107.7854 271.3778 L101.497 268.8269 L95.1055 266.5462 L88.6249 264.5328 L83.713 [...]
+      /><path d="M166.8823 353.6667 L166.7709 350.2758 L166.1904 345.221 L165.5367 341.8918 L164.1787 336.988 L163.0382 333.7926 L161.0058 329.1274 L159.4545 326.1099 L156.8625 321.7303 L153.9856 317.5326 L150.8563 313.519 L147.5037 309.6899 L143.9524 306.0443 L140.2238 302.58 L136.3367 299.2946 L132.3073 296.1853 L128.1496 293.2497 L123.8764 290.4848 L119.4988 287.8884 L115.0268 285.4579 L108.933 282.472 L104.275 280.4207 L97.9612 277.9334 L93.1572 276.2515 L86.6728 274.251 L81.7572 272 [...]
+      /><path d="M160.6028 353.6667 L160.4615 350.2773 L160.0417 346.9109 L159.3554 343.5886 L157.8652 338.7242 L156.5951 335.5782 L155.1288 332.5186 L153.4866 329.5496 L150.7336 325.2699 L148.7282 322.5328 L145.4984 318.5999 L143.214 316.0911 L139.6138 312.4938 L135.8291 309.091 L131.882 305.878 L127.7913 302.8498 L123.5727 300.0023 L119.2399 297.3319 L114.8048 294.8351 L110.2778 292.5088 L105.6685 290.3505 L100.985 288.3575 L96.2355 286.5279 L91.4268 284.8597 L84.9347 282.8838 L75.053  [...]
+      /><path d="M155.41 353.6667 L155.3633 351.9709 L154.994 348.5993 L154.2759 345.2843 L153.2444 342.0528 L151.9395 338.9214 L150.4006 335.8978 L148.662 332.9845 L145.7412 328.8176 L143.618 326.171 L140.2117 322.3898 L137.813 319.9901 L134.0491 316.5645 L130.1112 313.3403 L126.0222 310.3101 L121.8002 307.4676 L117.4606 304.8081 L110.0018 300.77 L105.4082 298.5781 L100.7374 296.5557 L95.998 294.7004 L91.1973 293.0098 L81.439 290.116 L71.5137 287.8615 L61.4657 286.2372 L51.3366 285.2369 [...]
+      /><path d="M151.1405 353.6667 L151.0752 351.9717 L150.5653 348.6199 L149.6042 345.3679 L148.2757 342.247 L146.6586 339.265 L144.8141 336.4175 L142.7876 333.6964 L140.6115 331.0932 L138.3094 328.6006 L134.6582 325.0555 L132.1107 322.8141 L128.1439 319.6258 L121.2033 314.7513 L113.9244 310.3974 L106.3699 306.5411 L101.7258 304.4586 L97.009 302.5461 L92.2278 300.8009 L87.3894 299.2211 L77.5679 296.5503 L69.2648 294.8157 L59.1976 293.3164 L49.0564 292.4464 L39.9596 292.2284" style="fil [...]
+      /><path d="M147.6857 353.6667 L147.5855 351.9739 L147.2933 350.3035 L146.8316 348.6715 L145.5069 345.5508 L143.8002 342.6198 L141.8339 339.8553 L139.68 337.2338 L137.3815 334.7382 L134.9655 332.3557 L131.1605 328.9758 L128.5214 326.8432 L124.4311 323.8147 L117.3166 319.1975 L109.8949 315.0916 L102.2224 311.4756 L94.3434 308.3344 L86.2947 305.6571 L76.4576 303.0444 L68.1443 301.3601 L58.0678 299.9231 L49.6156 299.2089 L39.9596 298.9434" style="fill:none; fill-rule:evenodd; stroke:rg [...]
+      /><path d="M144.9865 353.6667 L144.807 351.9826 L144.3155 350.3607 L143.6029 348.8221 L141.7842 345.9605 L139.6669 343.3099 L137.37 340.8128 L132.4186 336.1745 L127.1218 331.9339 L120.1327 327.1291 L112.8164 322.8387 L105.2328 319.0397 L97.4284 315.7173 L89.4421 312.8601 L81.3064 310.46 L73.0512 308.5104 L64.7033 307.0065 L56.2877 305.9442 L47.8282 305.3214 L39.9596 305.1496" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M143.0408 353.6667 L142.6229 352.0374 L141.7282 350.5985 L140.6642 349.2775 L138.3364 346.8095 L133.3133 342.2486 L126.6089 337.0543 L120.9804 333.2641 L113.6686 328.9654 L107.6296 325.8698 L99.8801 322.422 L93.5424 319.996 L85.4759 317.3733 L78.9258 315.5994 L70.6401 313.7836 L63.9493 312.6499 L55.5286 311.6289 L47.0662 311.0462 L39.9596 310.9243" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M141.9424 353.6667 L140.7696 352.491 L131.3182 345.2996 L125.7623 341.403 L120.0331 337.7659 L114.1364 334.4076 L108.0857 331.3351 L101.8973 328.5506 L95.5874 326.0538 L89.1713 323.8437 L82.6637 321.9188 L76.0791 320.2778 L67.7595 318.6234 L61.0487 317.6159 L54.3016 316.8884 L47.5302 316.4398 L39.9596 316.2891" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M138.5429 353.6667 L135.5478 352.0761 L121.1597 343.0869 L112.2256 338.2103 L106.1025 335.2852 L101.4283 333.2704 L96.6902 331.4113 L90.2826 329.1766 L85.4165 327.6843 L78.8588 325.9389 L72.2328 324.473 L65.5513 323.2858 L58.8262 322.3766 L52.0695 321.7451 L45.2926 321.3906 L39.9596 321.3297" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M132.2571 353.6667 L118.9607 346.1593 L112.9355 343.0365 L108.3411 340.8463 L102.1148 338.1471 L97.374 336.2952 L87.7279 333.0466 L82.8329 331.6526 L76.2423 330.0343 L71.2585 329.0012 L64.5682 327.8644 L59.523 327.1927 L52.7685 326.5377 L45.9929 326.1574 L39.9596 326.0639" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M125.5106 353.6667 L113.44 347.4614 L104.1533 343.2944 L97.8351 340.8181 L93.0336 339.1294 L83.2864 336.1983 L73.3773 333.8722 L68.374 332.9378 L61.663 331.93 L51.534 330.9284 L46.4514 330.6577 L39.9596 330.5401" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M118.1841 353.6667 L108.9537 349.3753 L99.5211 345.55 L89.8852 342.2711 L80.0709 339.5727 L70.1119 337.4701 L60.0446 335.9701 L49.9055 335.0758 L39.9596 334.7948" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M110.0959 353.6667 L100.6553 349.8605 L92.6411 347.081 L82.862 344.2575 L74.5974 342.3473 L66.2486 340.8472 L57.836 339.7611 L49.38 339.0911 L39.9596 338.8563" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M100.9436 353.6667 L92.9177 350.9204 L84.7732 348.5496 L76.5247 346.5711 L69.8629 345.2776 L61.4732 344.0269 L54.7236 343.3216 L47.9518 342.8798 L39.9596 342.7095" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M90.1477 353.6667 L83.6035 351.8702 L76.9963 350.3214 L70.335 349.0255 L65.309 348.2217 L58.5756 347.3762 L51.8148 346.7906 L45.0363 346.4659 L39.9596 346.394" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M76.2695 353.6667 L66.2485 351.8825 L57.8311 350.8329 L47.6786 350.1035 L39.9596 349.9543" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><path d="M50.7775 353.6667 L43.997 353.3881 L39.9596 353.3555" style="fill:none; fill-rule:evenodd; stroke:rgb(0,48,143);"
+      /><line x1="40" x2="141.8" y1="353.6667" style="fill:none; stroke:black; stroke-width:1.3333;" y2="353.6667"
+    /></g
+  ></g
+></svg
+>
diff --git a/doc/tmseries30.html b/doc/tmseries30.html
index 099fbde..0d0ee79 100644
--- a/doc/tmseries30.html
+++ b/doc/tmseries30.html
@@ -28,7 +28,7 @@
       J. Geodesy 85(8), 475–485 (Aug. 2011); preprint
       <a href="https://arxiv.org/abs/1002.1417">arXiv:1002.1417</a>;
       resource page
-      <a href="http://geographiclib.sourceforge.net/tm.html">tm.html</a>.
+      <a href="https://geographiclib.sourceforge.io/tm.html">tm.html</a>.
     </blockquote>
     <pre>
 
diff --git a/doc/utilities.html.in b/doc/utilities.html.in
index adadcb9..740a70c 100644
--- a/doc/utilities.html.in
+++ b/doc/utilities.html.in
@@ -2,7 +2,7 @@
   <head>
     <title>GeographicLib- at PROJECT_VERSION@ utilities</title>
     <meta HTTP-EQUIV="Refresh"
-	  CONTENT="0; URL=http://geographiclib.sourceforge.net/@PROJECT_VERSION@/utilities.html">
+	  CONTENT="0; URL=https://geographiclib.sourceforge.io/@PROJECT_VERSION@/utilities.html">
   </head>
   <body topmargin=10 leftmargin=10>
     <h3>
@@ -11,8 +11,8 @@
 	  Online documentation for utilities for GeographicLib version
 	  @PROJECT_VERSION@ is available at
 	  <center>
-	    <a href="http://geographiclib.sourceforge.net/@PROJECT_VERSION@/utilities.html">
-	      http://geographiclib.sourceforge.net/@PROJECT_VERSION@/utilities.html</a>.
+	    <a href="https://geographiclib.sourceforge.io/@PROJECT_VERSION@/utilities.html">
+	      https://geographiclib.sourceforge.io/@PROJECT_VERSION@/utilities.html</a>.
 	  </center>
 	  <br>
 	  You will be redirected there.  Click on the link to go there
diff --git a/doc/vptree.gif b/doc/vptree.gif
new file mode 100644
index 0000000..4f70cce
Binary files /dev/null and b/doc/vptree.gif differ
diff --git a/dotnet/NETGeographicLib/Accumulator.cpp b/dotnet/NETGeographicLib/Accumulator.cpp
index fda88f6..9a24961 100644
--- a/dotnet/NETGeographicLib/Accumulator.cpp
+++ b/dotnet/NETGeographicLib/Accumulator.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/Accumulator.hpp"
diff --git a/dotnet/NETGeographicLib/Accumulator.h b/dotnet/NETGeographicLib/Accumulator.h
index 095f8b3..4b8b1d0 100644
--- a/dotnet/NETGeographicLib/Accumulator.h
+++ b/dotnet/NETGeographicLib/Accumulator.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/AlbersEqualArea.cpp b/dotnet/NETGeographicLib/AlbersEqualArea.cpp
index d25546a..9d0d251 100644
--- a/dotnet/NETGeographicLib/AlbersEqualArea.cpp
+++ b/dotnet/NETGeographicLib/AlbersEqualArea.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/AlbersEqualArea.hpp"
diff --git a/dotnet/NETGeographicLib/AlbersEqualArea.h b/dotnet/NETGeographicLib/AlbersEqualArea.h
index 58cce2c..6c1ac02 100644
--- a/dotnet/NETGeographicLib/AlbersEqualArea.h
+++ b/dotnet/NETGeographicLib/AlbersEqualArea.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/AzimuthalEquidistant.cpp b/dotnet/NETGeographicLib/AzimuthalEquidistant.cpp
index 35b6f2d..c4b0919 100644
--- a/dotnet/NETGeographicLib/AzimuthalEquidistant.cpp
+++ b/dotnet/NETGeographicLib/AzimuthalEquidistant.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/AzimuthalEquidistant.hpp"
diff --git a/dotnet/NETGeographicLib/AzimuthalEquidistant.h b/dotnet/NETGeographicLib/AzimuthalEquidistant.h
index 7fa27a5..b28431c 100644
--- a/dotnet/NETGeographicLib/AzimuthalEquidistant.h
+++ b/dotnet/NETGeographicLib/AzimuthalEquidistant.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 #include "Geodesic.h"
diff --git a/dotnet/NETGeographicLib/CassiniSoldner.cpp b/dotnet/NETGeographicLib/CassiniSoldner.cpp
index 82652a7..29a7327 100644
--- a/dotnet/NETGeographicLib/CassiniSoldner.cpp
+++ b/dotnet/NETGeographicLib/CassiniSoldner.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/CassiniSoldner.hpp"
diff --git a/dotnet/NETGeographicLib/CassiniSoldner.h b/dotnet/NETGeographicLib/CassiniSoldner.h
index 3e494dc..c6de0e4 100644
--- a/dotnet/NETGeographicLib/CassiniSoldner.h
+++ b/dotnet/NETGeographicLib/CassiniSoldner.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/CircularEngine.cpp b/dotnet/NETGeographicLib/CircularEngine.cpp
index 37aae21..1ac48d2 100644
--- a/dotnet/NETGeographicLib/CircularEngine.cpp
+++ b/dotnet/NETGeographicLib/CircularEngine.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/CircularEngine.hpp"
diff --git a/dotnet/NETGeographicLib/CircularEngine.h b/dotnet/NETGeographicLib/CircularEngine.h
index febed2b..9bf1014 100644
--- a/dotnet/NETGeographicLib/CircularEngine.h
+++ b/dotnet/NETGeographicLib/CircularEngine.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/DMS.cpp b/dotnet/NETGeographicLib/DMS.cpp
index ef1a9da..89deb3f 100644
--- a/dotnet/NETGeographicLib/DMS.cpp
+++ b/dotnet/NETGeographicLib/DMS.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/DMS.hpp"
diff --git a/dotnet/NETGeographicLib/DMS.h b/dotnet/NETGeographicLib/DMS.h
index 8f778eb..c68622a 100644
--- a/dotnet/NETGeographicLib/DMS.h
+++ b/dotnet/NETGeographicLib/DMS.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/Ellipsoid.cpp b/dotnet/NETGeographicLib/Ellipsoid.cpp
index 63d61f9..a6abdae 100644
--- a/dotnet/NETGeographicLib/Ellipsoid.cpp
+++ b/dotnet/NETGeographicLib/Ellipsoid.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/Ellipsoid.hpp"
diff --git a/dotnet/NETGeographicLib/Ellipsoid.h b/dotnet/NETGeographicLib/Ellipsoid.h
index 5e9f121..e94dc75 100644
--- a/dotnet/NETGeographicLib/Ellipsoid.h
+++ b/dotnet/NETGeographicLib/Ellipsoid.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/EllipticFunction.cpp b/dotnet/NETGeographicLib/EllipticFunction.cpp
index 1a05b8a..29e32eb 100644
--- a/dotnet/NETGeographicLib/EllipticFunction.cpp
+++ b/dotnet/NETGeographicLib/EllipticFunction.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/EllipticFunction.hpp"
diff --git a/dotnet/NETGeographicLib/EllipticFunction.h b/dotnet/NETGeographicLib/EllipticFunction.h
index b56a6df..07b3eb7 100644
--- a/dotnet/NETGeographicLib/EllipticFunction.h
+++ b/dotnet/NETGeographicLib/EllipticFunction.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/GARS.cpp b/dotnet/NETGeographicLib/GARS.cpp
index 867944a..82dd066 100644
--- a/dotnet/NETGeographicLib/GARS.cpp
+++ b/dotnet/NETGeographicLib/GARS.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/GARS.hpp"
diff --git a/dotnet/NETGeographicLib/GARS.h b/dotnet/NETGeographicLib/GARS.h
index 0e7c358..dde365f 100644
--- a/dotnet/NETGeographicLib/GARS.h
+++ b/dotnet/NETGeographicLib/GARS.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/GeoCoords.cpp b/dotnet/NETGeographicLib/GeoCoords.cpp
index 40d43c9..60bbd57 100644
--- a/dotnet/NETGeographicLib/GeoCoords.cpp
+++ b/dotnet/NETGeographicLib/GeoCoords.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/GeoCoords.hpp"
diff --git a/dotnet/NETGeographicLib/GeoCoords.h b/dotnet/NETGeographicLib/GeoCoords.h
index 79cdfa6..1921d4d 100644
--- a/dotnet/NETGeographicLib/GeoCoords.h
+++ b/dotnet/NETGeographicLib/GeoCoords.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/Geocentric.cpp b/dotnet/NETGeographicLib/Geocentric.cpp
index 902059b..e99d0db 100644
--- a/dotnet/NETGeographicLib/Geocentric.cpp
+++ b/dotnet/NETGeographicLib/Geocentric.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/Geocentric.hpp"
diff --git a/dotnet/NETGeographicLib/Geocentric.h b/dotnet/NETGeographicLib/Geocentric.h
index ba61c27..c865463 100644
--- a/dotnet/NETGeographicLib/Geocentric.h
+++ b/dotnet/NETGeographicLib/Geocentric.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/Geodesic.cpp b/dotnet/NETGeographicLib/Geodesic.cpp
index 28c5824..89fd01d 100644
--- a/dotnet/NETGeographicLib/Geodesic.cpp
+++ b/dotnet/NETGeographicLib/Geodesic.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include <GeographicLib/Geodesic.hpp>
diff --git a/dotnet/NETGeographicLib/Geodesic.h b/dotnet/NETGeographicLib/Geodesic.h
index af80024..822087d 100644
--- a/dotnet/NETGeographicLib/Geodesic.h
+++ b/dotnet/NETGeographicLib/Geodesic.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 #include "NETGeographicLib.h"
@@ -28,7 +28,7 @@ namespace NETGeographicLib
    * labeled φ, longitude λ (with λ<sub>12</sub> =
    * λ<sub>2</sub> − λ<sub>1</sub>), and azimuth α.
    *
-   * <img src="http://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg" width=250 alt="spheroidal triangle">
+   * <img src="https://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg" width=250 alt="spheroidal triangle">
    *
    * Given \e lat1, \e lon1, \e azi1, and \e s12, we can determine \e lat2, \e
    * lon2, and \e azi2.  This is the \e direct geodesic problem and its
@@ -115,9 +115,9 @@ namespace NETGeographicLib
    *   which can be generated by setting [\e azi1, \e azi2] → [\e azi1, \e
    *   azi2] + [\e d, −\e d], for arbitrary \e d.  (For spheres, this
    *   prescription applies when points 1 and 2 are antipodal.)
-   * - s12 = 0 (coincident points).  There are infinitely many geodesics which
-   *   can be generated by setting [\e azi1, \e azi2] → [\e azi1, \e azi2]
-   *   + [\e d, \e d], for arbitrary \e d.
+   * - \e s12 = 0 (coincident points).  There are infinitely many geodesics
+   *   which can be generated by setting [\e azi1, \e azi2] →
+   *   [\e azi1, \e azi2] + [\e d, \e d], for arbitrary \e d.
    *
    * The calculations are accurate to better than 15 nm (15 nanometers) for the
    * WGS84 ellipsoid.  See Sec. 9 of
@@ -145,7 +145,7 @@ namespace NETGeographicLib
    *   J. Geodesy <b>87</b>, 43--55 (2013);
    *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
-   *   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   *   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    *   geod-addenda.html</a>.
    * .
    * For more information on geodesics see \ref geodesic.
diff --git a/dotnet/NETGeographicLib/GeodesicExact.cpp b/dotnet/NETGeographicLib/GeodesicExact.cpp
index cdd224b..abd70f5 100644
--- a/dotnet/NETGeographicLib/GeodesicExact.cpp
+++ b/dotnet/NETGeographicLib/GeodesicExact.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/GeodesicExact.hpp"
diff --git a/dotnet/NETGeographicLib/GeodesicExact.h b/dotnet/NETGeographicLib/GeodesicExact.h
index ff636e3..ab03a5c 100644
--- a/dotnet/NETGeographicLib/GeodesicExact.h
+++ b/dotnet/NETGeographicLib/GeodesicExact.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "NETGeographicLib.h"
 
diff --git a/dotnet/NETGeographicLib/GeodesicLine.cpp b/dotnet/NETGeographicLib/GeodesicLine.cpp
index a1d8b28..1d92fbc 100644
--- a/dotnet/NETGeographicLib/GeodesicLine.cpp
+++ b/dotnet/NETGeographicLib/GeodesicLine.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/GeodesicLine.hpp"
diff --git a/dotnet/NETGeographicLib/GeodesicLine.h b/dotnet/NETGeographicLib/GeodesicLine.h
index 450cf17..5e59687 100644
--- a/dotnet/NETGeographicLib/GeodesicLine.h
+++ b/dotnet/NETGeographicLib/GeodesicLine.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "NETGeographicLib.h"
 
@@ -44,7 +44,7 @@ namespace NETGeographicLib
    *   J. Geodesy <b>87</b>, 43--55 (2013);
    *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
-   *   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   *   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    *   geod-addenda.html</a>.
    * .
    * For more information on geodesics see \ref geodesic.
diff --git a/dotnet/NETGeographicLib/GeodesicLineExact.cpp b/dotnet/NETGeographicLib/GeodesicLineExact.cpp
index 059ebd6..d332745 100644
--- a/dotnet/NETGeographicLib/GeodesicLineExact.cpp
+++ b/dotnet/NETGeographicLib/GeodesicLineExact.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/GeodesicLineExact.hpp"
diff --git a/dotnet/NETGeographicLib/GeodesicLineExact.h b/dotnet/NETGeographicLib/GeodesicLineExact.h
index 411fc64..fe804ed 100644
--- a/dotnet/NETGeographicLib/GeodesicLineExact.h
+++ b/dotnet/NETGeographicLib/GeodesicLineExact.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "NETGeographicLib.h"
 
diff --git a/dotnet/NETGeographicLib/Geohash.cpp b/dotnet/NETGeographicLib/Geohash.cpp
index 08c31c8..438a1d3 100644
--- a/dotnet/NETGeographicLib/Geohash.cpp
+++ b/dotnet/NETGeographicLib/Geohash.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/Geohash.hpp"
diff --git a/dotnet/NETGeographicLib/Geohash.h b/dotnet/NETGeographicLib/Geohash.h
index b6b0864..116867d 100644
--- a/dotnet/NETGeographicLib/Geohash.h
+++ b/dotnet/NETGeographicLib/Geohash.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/Geoid.cpp b/dotnet/NETGeographicLib/Geoid.cpp
index a3b37c6..f7dff97 100644
--- a/dotnet/NETGeographicLib/Geoid.cpp
+++ b/dotnet/NETGeographicLib/Geoid.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/Geoid.hpp"
diff --git a/dotnet/NETGeographicLib/Geoid.h b/dotnet/NETGeographicLib/Geoid.h
index d0a4422..1387bf8 100644
--- a/dotnet/NETGeographicLib/Geoid.h
+++ b/dotnet/NETGeographicLib/Geoid.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/Georef.cpp b/dotnet/NETGeographicLib/Georef.cpp
index 2939cf3..f42e1aa 100644
--- a/dotnet/NETGeographicLib/Georef.cpp
+++ b/dotnet/NETGeographicLib/Georef.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/Georef.hpp"
diff --git a/dotnet/NETGeographicLib/Georef.h b/dotnet/NETGeographicLib/Georef.h
index b27b4c4..404fdbf 100644
--- a/dotnet/NETGeographicLib/Georef.h
+++ b/dotnet/NETGeographicLib/Georef.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/Gnomonic.cpp b/dotnet/NETGeographicLib/Gnomonic.cpp
index 2a78c52..c574c7b 100644
--- a/dotnet/NETGeographicLib/Gnomonic.cpp
+++ b/dotnet/NETGeographicLib/Gnomonic.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/Gnomonic.hpp"
diff --git a/dotnet/NETGeographicLib/Gnomonic.h b/dotnet/NETGeographicLib/Gnomonic.h
index 5b8f26b..8c193a8 100644
--- a/dotnet/NETGeographicLib/Gnomonic.h
+++ b/dotnet/NETGeographicLib/Gnomonic.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
@@ -26,7 +26,7 @@ namespace NETGeographicLib
    *   J. Geodesy <b>87</b>, 43--55 (2013);
    *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
-   *   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   *   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    *   geod-addenda.html</a>.
    * .
    * The projection of \e P is defined as follows: compute the geodesic line
diff --git a/dotnet/NETGeographicLib/GravityCircle.cpp b/dotnet/NETGeographicLib/GravityCircle.cpp
index 3b155cd..6ff8529 100644
--- a/dotnet/NETGeographicLib/GravityCircle.cpp
+++ b/dotnet/NETGeographicLib/GravityCircle.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/GravityCircle.hpp"
diff --git a/dotnet/NETGeographicLib/GravityCircle.h b/dotnet/NETGeographicLib/GravityCircle.h
index 35b16d8..fa7ce68 100644
--- a/dotnet/NETGeographicLib/GravityCircle.h
+++ b/dotnet/NETGeographicLib/GravityCircle.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/GravityModel.cpp b/dotnet/NETGeographicLib/GravityModel.cpp
index 7504a9d..dfa2efa 100644
--- a/dotnet/NETGeographicLib/GravityModel.cpp
+++ b/dotnet/NETGeographicLib/GravityModel.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/GravityModel.hpp"
diff --git a/dotnet/NETGeographicLib/GravityModel.h b/dotnet/NETGeographicLib/GravityModel.h
index 7ea8e2d..456e9a9 100644
--- a/dotnet/NETGeographicLib/GravityModel.h
+++ b/dotnet/NETGeographicLib/GravityModel.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/LambertConformalConic.cpp b/dotnet/NETGeographicLib/LambertConformalConic.cpp
index 37cafac..7c00850 100644
--- a/dotnet/NETGeographicLib/LambertConformalConic.cpp
+++ b/dotnet/NETGeographicLib/LambertConformalConic.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/LambertConformalConic.hpp"
diff --git a/dotnet/NETGeographicLib/LambertConformalConic.h b/dotnet/NETGeographicLib/LambertConformalConic.h
index cd491a1..4babd64 100644
--- a/dotnet/NETGeographicLib/LambertConformalConic.h
+++ b/dotnet/NETGeographicLib/LambertConformalConic.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/LocalCartesian.cpp b/dotnet/NETGeographicLib/LocalCartesian.cpp
index 8e4f772..a3883ec 100644
--- a/dotnet/NETGeographicLib/LocalCartesian.cpp
+++ b/dotnet/NETGeographicLib/LocalCartesian.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/LocalCartesian.hpp"
diff --git a/dotnet/NETGeographicLib/LocalCartesian.h b/dotnet/NETGeographicLib/LocalCartesian.h
index 8ede9ea..d3891c4 100644
--- a/dotnet/NETGeographicLib/LocalCartesian.h
+++ b/dotnet/NETGeographicLib/LocalCartesian.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/MGRS.cpp b/dotnet/NETGeographicLib/MGRS.cpp
index 753a7f1..8d0baba 100644
--- a/dotnet/NETGeographicLib/MGRS.cpp
+++ b/dotnet/NETGeographicLib/MGRS.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/MGRS.hpp"
diff --git a/dotnet/NETGeographicLib/MGRS.h b/dotnet/NETGeographicLib/MGRS.h
index c32c27c..319094c 100644
--- a/dotnet/NETGeographicLib/MGRS.h
+++ b/dotnet/NETGeographicLib/MGRS.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/MagneticCircle.cpp b/dotnet/NETGeographicLib/MagneticCircle.cpp
index bef0ff0..4fdd557 100644
--- a/dotnet/NETGeographicLib/MagneticCircle.cpp
+++ b/dotnet/NETGeographicLib/MagneticCircle.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/MagneticCircle.hpp"
diff --git a/dotnet/NETGeographicLib/MagneticCircle.h b/dotnet/NETGeographicLib/MagneticCircle.h
index a60298e..cec8536 100644
--- a/dotnet/NETGeographicLib/MagneticCircle.h
+++ b/dotnet/NETGeographicLib/MagneticCircle.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/MagneticModel.cpp b/dotnet/NETGeographicLib/MagneticModel.cpp
index 7fbb242..0b6be21 100644
--- a/dotnet/NETGeographicLib/MagneticModel.cpp
+++ b/dotnet/NETGeographicLib/MagneticModel.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/MagneticModel.hpp"
diff --git a/dotnet/NETGeographicLib/MagneticModel.h b/dotnet/NETGeographicLib/MagneticModel.h
index d474044..e069968 100644
--- a/dotnet/NETGeographicLib/MagneticModel.h
+++ b/dotnet/NETGeographicLib/MagneticModel.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/NETGeographicLib.cpp b/dotnet/NETGeographicLib/NETGeographicLib.cpp
index 601b069..cbd31b3 100644
--- a/dotnet/NETGeographicLib/NETGeographicLib.cpp
+++ b/dotnet/NETGeographicLib/NETGeographicLib.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/Config.h"
diff --git a/dotnet/NETGeographicLib/NETGeographicLib.h b/dotnet/NETGeographicLib/NETGeographicLib.h
index 64d097f..3594d51 100644
--- a/dotnet/NETGeographicLib/NETGeographicLib.h
+++ b/dotnet/NETGeographicLib/NETGeographicLib.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include <string>
 
diff --git a/dotnet/NETGeographicLib/NormalGravity.cpp b/dotnet/NETGeographicLib/NormalGravity.cpp
index 5c99ec2..d9cd0e8 100644
--- a/dotnet/NETGeographicLib/NormalGravity.cpp
+++ b/dotnet/NETGeographicLib/NormalGravity.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/NormalGravity.hpp"
diff --git a/dotnet/NETGeographicLib/NormalGravity.h b/dotnet/NETGeographicLib/NormalGravity.h
index fe55a42..0eab353 100644
--- a/dotnet/NETGeographicLib/NormalGravity.h
+++ b/dotnet/NETGeographicLib/NormalGravity.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/OSGB.cpp b/dotnet/NETGeographicLib/OSGB.cpp
index 766398b..5fa6562 100644
--- a/dotnet/NETGeographicLib/OSGB.cpp
+++ b/dotnet/NETGeographicLib/OSGB.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/OSGB.hpp"
diff --git a/dotnet/NETGeographicLib/OSGB.h b/dotnet/NETGeographicLib/OSGB.h
index 73ecf05..a252b1d 100644
--- a/dotnet/NETGeographicLib/OSGB.h
+++ b/dotnet/NETGeographicLib/OSGB.h
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #pragma once
 
diff --git a/dotnet/NETGeographicLib/PolarStereographic.cpp b/dotnet/NETGeographicLib/PolarStereographic.cpp
index cb36407..d31a150 100644
--- a/dotnet/NETGeographicLib/PolarStereographic.cpp
+++ b/dotnet/NETGeographicLib/PolarStereographic.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/PolarStereographic.hpp"
diff --git a/dotnet/NETGeographicLib/PolarStereographic.h b/dotnet/NETGeographicLib/PolarStereographic.h
index 52f43e9..cc26dc7 100644
--- a/dotnet/NETGeographicLib/PolarStereographic.h
+++ b/dotnet/NETGeographicLib/PolarStereographic.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/PolygonArea.cpp b/dotnet/NETGeographicLib/PolygonArea.cpp
index 5fa9439..249c63b 100644
--- a/dotnet/NETGeographicLib/PolygonArea.cpp
+++ b/dotnet/NETGeographicLib/PolygonArea.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/PolygonArea.hpp"
diff --git a/dotnet/NETGeographicLib/PolygonArea.h b/dotnet/NETGeographicLib/PolygonArea.h
index f423033..2229286 100644
--- a/dotnet/NETGeographicLib/PolygonArea.h
+++ b/dotnet/NETGeographicLib/PolygonArea.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
@@ -26,7 +26,7 @@ namespace NETGeographicLib
    *   J. Geodesy <b>87</b>, 43--55 (2013);
    *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
-   *   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   *   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    *   geod-addenda.html</a>.
    *
    * This class lets you add vertices one at a time to the polygon.  The area
diff --git a/dotnet/NETGeographicLib/Rhumb.cpp b/dotnet/NETGeographicLib/Rhumb.cpp
index 2096876..b235f6b 100644
--- a/dotnet/NETGeographicLib/Rhumb.cpp
+++ b/dotnet/NETGeographicLib/Rhumb.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/Rhumb.hpp"
diff --git a/dotnet/NETGeographicLib/Rhumb.h b/dotnet/NETGeographicLib/Rhumb.h
index d76ff64..887e343 100644
--- a/dotnet/NETGeographicLib/Rhumb.h
+++ b/dotnet/NETGeographicLib/Rhumb.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib {
diff --git a/dotnet/NETGeographicLib/SphericalCoefficients.cpp b/dotnet/NETGeographicLib/SphericalCoefficients.cpp
index ec834ff..9c97bfd 100644
--- a/dotnet/NETGeographicLib/SphericalCoefficients.cpp
+++ b/dotnet/NETGeographicLib/SphericalCoefficients.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/SphericalEngine.hpp"
diff --git a/dotnet/NETGeographicLib/SphericalCoefficients.h b/dotnet/NETGeographicLib/SphericalCoefficients.h
index c2727c6..8f1d38e 100644
--- a/dotnet/NETGeographicLib/SphericalCoefficients.h
+++ b/dotnet/NETGeographicLib/SphericalCoefficients.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/SphericalHarmonic.cpp b/dotnet/NETGeographicLib/SphericalHarmonic.cpp
index 964609a..08a0e72 100644
--- a/dotnet/NETGeographicLib/SphericalHarmonic.cpp
+++ b/dotnet/NETGeographicLib/SphericalHarmonic.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/SphericalHarmonic.hpp"
diff --git a/dotnet/NETGeographicLib/SphericalHarmonic.h b/dotnet/NETGeographicLib/SphericalHarmonic.h
index 6bacb3a..2b1b214 100644
--- a/dotnet/NETGeographicLib/SphericalHarmonic.h
+++ b/dotnet/NETGeographicLib/SphericalHarmonic.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/SphericalHarmonic1.cpp b/dotnet/NETGeographicLib/SphericalHarmonic1.cpp
index 4308591..9ccb7f3 100644
--- a/dotnet/NETGeographicLib/SphericalHarmonic1.cpp
+++ b/dotnet/NETGeographicLib/SphericalHarmonic1.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/SphericalHarmonic1.hpp"
diff --git a/dotnet/NETGeographicLib/SphericalHarmonic1.h b/dotnet/NETGeographicLib/SphericalHarmonic1.h
index c05a1b8..68c6136 100644
--- a/dotnet/NETGeographicLib/SphericalHarmonic1.h
+++ b/dotnet/NETGeographicLib/SphericalHarmonic1.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/SphericalHarmonic2.cpp b/dotnet/NETGeographicLib/SphericalHarmonic2.cpp
index b529359..b2e7ce1 100644
--- a/dotnet/NETGeographicLib/SphericalHarmonic2.cpp
+++ b/dotnet/NETGeographicLib/SphericalHarmonic2.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/SphericalHarmonic2.hpp"
diff --git a/dotnet/NETGeographicLib/SphericalHarmonic2.h b/dotnet/NETGeographicLib/SphericalHarmonic2.h
index faffcae..1e8d86c 100644
--- a/dotnet/NETGeographicLib/SphericalHarmonic2.h
+++ b/dotnet/NETGeographicLib/SphericalHarmonic2.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/TransverseMercator.cpp b/dotnet/NETGeographicLib/TransverseMercator.cpp
index 11962b7..e798749 100644
--- a/dotnet/NETGeographicLib/TransverseMercator.cpp
+++ b/dotnet/NETGeographicLib/TransverseMercator.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/TransverseMercator.hpp"
diff --git a/dotnet/NETGeographicLib/TransverseMercator.h b/dotnet/NETGeographicLib/TransverseMercator.h
index 8309960..07144fb 100644
--- a/dotnet/NETGeographicLib/TransverseMercator.h
+++ b/dotnet/NETGeographicLib/TransverseMercator.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/NETGeographicLib/TransverseMercatorExact.cpp b/dotnet/NETGeographicLib/TransverseMercatorExact.cpp
index af2e49e..bbdc952 100644
--- a/dotnet/NETGeographicLib/TransverseMercatorExact.cpp
+++ b/dotnet/NETGeographicLib/TransverseMercatorExact.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/TransverseMercatorExact.hpp"
diff --git a/dotnet/NETGeographicLib/TransverseMercatorExact.h b/dotnet/NETGeographicLib/TransverseMercatorExact.h
index 3ea151c..3a5879d 100644
--- a/dotnet/NETGeographicLib/TransverseMercatorExact.h
+++ b/dotnet/NETGeographicLib/TransverseMercatorExact.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
@@ -58,7 +58,7 @@ namespace NETGeographicLib
    * taken to be the equator.  See the documentation on TransverseMercator for
    * how to include a false easting, false northing, or a latitude of origin.
    *
-   * See <a href="http://geographiclib.sourceforge.net/tm-grid.kmz"
+   * See <a href="https://geographiclib.sourceforge.io/tm-grid.kmz"
    * type="application/vnd.google-earth.kmz"> tm-grid.kmz</a>, for an
    * illustration of the transverse Mercator grid in Google Earth.
    *
diff --git a/dotnet/NETGeographicLib/UTMUPS.cpp b/dotnet/NETGeographicLib/UTMUPS.cpp
index 8e02529..890dfb1 100644
--- a/dotnet/NETGeographicLib/UTMUPS.cpp
+++ b/dotnet/NETGeographicLib/UTMUPS.cpp
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 #include "stdafx.h"
 #include "GeographicLib/UTMUPS.hpp"
diff --git a/dotnet/NETGeographicLib/UTMUPS.h b/dotnet/NETGeographicLib/UTMUPS.h
index c8af9dc..b7aa366 100644
--- a/dotnet/NETGeographicLib/UTMUPS.h
+++ b/dotnet/NETGeographicLib/UTMUPS.h
@@ -7,7 +7,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 namespace NETGeographicLib
diff --git a/dotnet/Projections/AccumPanel.cs b/dotnet/Projections/AccumPanel.cs
index 0459812..c49ec5a 100644
--- a/dotnet/Projections/AccumPanel.cs
+++ b/dotnet/Projections/AccumPanel.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/AlbersPanel.cs b/dotnet/Projections/AlbersPanel.cs
index db2384f..8027608 100644
--- a/dotnet/Projections/AlbersPanel.cs
+++ b/dotnet/Projections/AlbersPanel.cs
@@ -11,7 +11,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/EllipsoidPanel.cs b/dotnet/Projections/EllipsoidPanel.cs
index 85372a8..276f5a2 100644
--- a/dotnet/Projections/EllipsoidPanel.cs
+++ b/dotnet/Projections/EllipsoidPanel.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/EllipticPanel.cs b/dotnet/Projections/EllipticPanel.cs
index 715441a..9dcd210 100644
--- a/dotnet/Projections/EllipticPanel.cs
+++ b/dotnet/Projections/EllipticPanel.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/Form1.cs b/dotnet/Projections/Form1.cs
index a4f6caa..24a6416 100644
--- a/dotnet/Projections/Form1.cs
+++ b/dotnet/Projections/Form1.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/GeocentricPanel.cs b/dotnet/Projections/GeocentricPanel.cs
index a3231b3..4bdb039 100644
--- a/dotnet/Projections/GeocentricPanel.cs
+++ b/dotnet/Projections/GeocentricPanel.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/GeodesicPanel.cs b/dotnet/Projections/GeodesicPanel.cs
index b09a6a6..bbba69d 100644
--- a/dotnet/Projections/GeodesicPanel.cs
+++ b/dotnet/Projections/GeodesicPanel.cs
@@ -11,7 +11,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/GeoidPanel.cs b/dotnet/Projections/GeoidPanel.cs
index 290106f..cf795d9 100644
--- a/dotnet/Projections/GeoidPanel.cs
+++ b/dotnet/Projections/GeoidPanel.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/GravityPanel.cs b/dotnet/Projections/GravityPanel.cs
index 8e4d5ba..62e247b 100644
--- a/dotnet/Projections/GravityPanel.cs
+++ b/dotnet/Projections/GravityPanel.cs
@@ -10,7 +10,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/LocalCartesianPanel.cs b/dotnet/Projections/LocalCartesianPanel.cs
index 2f9a9e9..575d278 100644
--- a/dotnet/Projections/LocalCartesianPanel.cs
+++ b/dotnet/Projections/LocalCartesianPanel.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/MagneticPanel.cs b/dotnet/Projections/MagneticPanel.cs
index c51e836..f13218b 100644
--- a/dotnet/Projections/MagneticPanel.cs
+++ b/dotnet/Projections/MagneticPanel.cs
@@ -9,7 +9,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/MiscPanel.cs b/dotnet/Projections/MiscPanel.cs
index 2b66bd1..d1a9bf5 100644
--- a/dotnet/Projections/MiscPanel.cs
+++ b/dotnet/Projections/MiscPanel.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/PolarStereoPanel.cs b/dotnet/Projections/PolarStereoPanel.cs
index 655a04f..da2c94d 100644
--- a/dotnet/Projections/PolarStereoPanel.cs
+++ b/dotnet/Projections/PolarStereoPanel.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/PolyPanel.cs b/dotnet/Projections/PolyPanel.cs
index b26f9cc..a5ed4ce 100644
--- a/dotnet/Projections/PolyPanel.cs
+++ b/dotnet/Projections/PolyPanel.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/Program.cs b/dotnet/Projections/Program.cs
index 87882dc..d1543af 100644
--- a/dotnet/Projections/Program.cs
+++ b/dotnet/Projections/Program.cs
@@ -6,7 +6,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/ProjectionsPanel.cs b/dotnet/Projections/ProjectionsPanel.cs
index 6fd73a6..6643333 100644
--- a/dotnet/Projections/ProjectionsPanel.cs
+++ b/dotnet/Projections/ProjectionsPanel.cs
@@ -10,7 +10,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/SphericalHarmonicsPanel.cs b/dotnet/Projections/SphericalHarmonicsPanel.cs
index 7b04fb3..aedf2fe 100644
--- a/dotnet/Projections/SphericalHarmonicsPanel.cs
+++ b/dotnet/Projections/SphericalHarmonicsPanel.cs
@@ -11,7 +11,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/dotnet/Projections/TypeIIIProjPanel.cs b/dotnet/Projections/TypeIIIProjPanel.cs
index 1cf2544..fcbeafb 100644
--- a/dotnet/Projections/TypeIIIProjPanel.cs
+++ b/dotnet/Projections/TypeIIIProjPanel.cs
@@ -10,7 +10,7 @@
  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
  * <charles at karney.com> and licensed under the MIT/X11 License.
  * For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 using System;
 using System.Collections.Generic;
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 397c5d7..02ace0c 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -5,10 +5,9 @@
 if (GEOGRAPHICLIB_PRECISION EQUAL 2)
   # These examples all assume real = double
   file (GLOB EXAMPLE_SOURCES example-*.cpp)
-  find_package (Boost COMPONENTS serialization)
-  if (Boost_FOUND)
+  if (USE_BOOST_FOR_EXAMPLES AND Boost_FOUND)
     add_definitions (-DGEOGRAPHICLIB_HAVE_BOOST_SERIALIZATION=1)
-    include_directories (${Boost_INCLUDE_DIRS})
+    include_directories ("${Boost_INCLUDE_DIRS}")
   endif ()
 else ()
   set (EXAMPLE_SOURCES)
diff --git a/examples/JacobiConformal.hpp b/examples/JacobiConformal.hpp
index 984ffa9..6b35616 100644
--- a/examples/JacobiConformal.hpp
+++ b/examples/JacobiConformal.hpp
@@ -7,7 +7,7 @@
  *
  * Copyright (c) Charles Karney (2014-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/EllipticFunction.hpp>
diff --git a/examples/example-NearestNeighbor.cpp b/examples/example-NearestNeighbor.cpp
index 295b0f0..eb8319f 100644
--- a/examples/example-NearestNeighbor.cpp
+++ b/examples/example-NearestNeighbor.cpp
@@ -86,8 +86,8 @@ int main() {
       boost::archive::xml_oarchive oa(f);
       oa << BOOST_SERIALIZATION_NVP(posset);
 #else
-      ofstream ofs("vptree.bin", ios::binary);
-      posset.Save(ofs, true);
+      ofstream ofs("vptree.txt");
+      ofs << posset << "\n";
 #endif
     }
     // Construct an empty GeodesicNeighbor
@@ -99,8 +99,8 @@ int main() {
       boost::archive::xml_iarchive ia(f);
       ia >> BOOST_SERIALIZATION_NVP(posset);
 #else
-      ifstream ifs("vptree.bin", ios::binary);
-      posset.Load(ifs, true);
+      ifstream ifs("vptree.txt");
+      ifs >> posset;
 #endif
     }
     // Now use it
diff --git a/include/GeographicLib/Accumulator.hpp b/include/GeographicLib/Accumulator.hpp
index 78b5760..a001583 100644
--- a/include/GeographicLib/Accumulator.hpp
+++ b/include/GeographicLib/Accumulator.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_ACCUMULATOR_HPP)
diff --git a/include/GeographicLib/AlbersEqualArea.hpp b/include/GeographicLib/AlbersEqualArea.hpp
index 9148f44..113bcfa 100644
--- a/include/GeographicLib/AlbersEqualArea.hpp
+++ b/include/GeographicLib/AlbersEqualArea.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_ALBERSEQUALAREA_HPP)
diff --git a/include/GeographicLib/AzimuthalEquidistant.hpp b/include/GeographicLib/AzimuthalEquidistant.hpp
index 6c5add0..6eac6db 100644
--- a/include/GeographicLib/AzimuthalEquidistant.hpp
+++ b/include/GeographicLib/AzimuthalEquidistant.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_AZIMUTHALEQUIDISTANT_HPP)
diff --git a/include/GeographicLib/CassiniSoldner.hpp b/include/GeographicLib/CassiniSoldner.hpp
index f6f5f6b..a973913 100644
--- a/include/GeographicLib/CassiniSoldner.hpp
+++ b/include/GeographicLib/CassiniSoldner.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_CASSINISOLDNER_HPP)
diff --git a/include/GeographicLib/CircularEngine.hpp b/include/GeographicLib/CircularEngine.hpp
index 10ab8fb..ef43a21 100644
--- a/include/GeographicLib/CircularEngine.hpp
+++ b/include/GeographicLib/CircularEngine.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_CIRCULARENGINE_HPP)
diff --git a/include/GeographicLib/Config.h b/include/GeographicLib/Config.h
index 8033012..d3ce77c 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.47"
+#define GEOGRAPHICLIB_VERSION_STRING "1.48"
 #define GEOGRAPHICLIB_VERSION_MAJOR 1
-#define GEOGRAPHICLIB_VERSION_MINOR 47
+#define GEOGRAPHICLIB_VERSION_MINOR 48
 #define GEOGRAPHICLIB_VERSION_PATCH 0
 
 // Undefine HAVE_LONG_DOUBLE if this type is unknown to the compiler
diff --git a/include/GeographicLib/Constants.hpp b/include/GeographicLib/Constants.hpp
index 47d3349..7361809 100644
--- a/include/GeographicLib/Constants.hpp
+++ b/include/GeographicLib/Constants.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_CONSTANTS_HPP)
@@ -58,6 +58,7 @@
 //   1700     vc11  (2012)
 //   1800     vc12  (2013)
 //   1900     vc14  (2015)
+//   1910+    vc15  (2017)
 #    define GEOGRAPHICLIB_HAS_STATIC_ASSERT 1
 #  else
 #    define GEOGRAPHICLIB_HAS_STATIC_ASSERT 0
diff --git a/include/GeographicLib/DMS.hpp b/include/GeographicLib/DMS.hpp
index e14bb43..0b3ac34 100644
--- a/include/GeographicLib/DMS.hpp
+++ b/include/GeographicLib/DMS.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_DMS_HPP)
diff --git a/include/GeographicLib/Ellipsoid.hpp b/include/GeographicLib/Ellipsoid.hpp
index 2939504..530ade5 100644
--- a/include/GeographicLib/Ellipsoid.hpp
+++ b/include/GeographicLib/Ellipsoid.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2012-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_ELLIPSOID_HPP)
diff --git a/include/GeographicLib/EllipticFunction.hpp b/include/GeographicLib/EllipticFunction.hpp
index b7fb56c..ff89b2b 100644
--- a/include/GeographicLib/EllipticFunction.hpp
+++ b/include/GeographicLib/EllipticFunction.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_ELLIPTICFUNCTION_HPP)
diff --git a/include/GeographicLib/GARS.hpp b/include/GeographicLib/GARS.hpp
index a63420e..375b67e 100644
--- a/include/GeographicLib/GARS.hpp
+++ b/include/GeographicLib/GARS.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2015) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GARS_HPP)
diff --git a/include/GeographicLib/GeoCoords.hpp b/include/GeographicLib/GeoCoords.hpp
index 4ea0808..18cfd99 100644
--- a/include/GeographicLib/GeoCoords.hpp
+++ b/include/GeographicLib/GeoCoords.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GEOCOORDS_HPP)
diff --git a/include/GeographicLib/Geocentric.hpp b/include/GeographicLib/Geocentric.hpp
index b8fec88..85122e4 100644
--- a/include/GeographicLib/Geocentric.hpp
+++ b/include/GeographicLib/Geocentric.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GEOCENTRIC_HPP)
diff --git a/include/GeographicLib/Geodesic.hpp b/include/GeographicLib/Geodesic.hpp
index d3bfa90..7870ab9 100644
--- a/include/GeographicLib/Geodesic.hpp
+++ b/include/GeographicLib/Geodesic.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GEODESIC_HPP)
@@ -39,7 +39,7 @@ namespace GeographicLib {
    * labeled φ, longitude λ (with λ<sub>12</sub> =
    * λ<sub>2</sub> − λ<sub>1</sub>), and azimuth α.
    *
-   * <img src="http://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg" width=250 alt="spheroidal triangle">
+   * <img src="https://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg" width=250 alt="spheroidal triangle">
    *
    * Given \e lat1, \e lon1, \e azi1, and \e s12, we can determine \e lat2, \e
    * lon2, and \e azi2.  This is the \e direct geodesic problem and its
@@ -126,9 +126,9 @@ namespace GeographicLib {
    *   which can be generated by setting [\e azi1, \e azi2] → [\e azi1, \e
    *   azi2] + [\e d, −\e d], for arbitrary \e d.  (For spheres, this
    *   prescription applies when points 1 and 2 are antipodal.)
-   * - s12 = 0 (coincident points).  There are infinitely many geodesics which
-   *   can be generated by setting [\e azi1, \e azi2] → [\e azi1, \e azi2]
-   *   + [\e d, \e d], for arbitrary \e d.
+   * - \e s12 = 0 (coincident points).  There are infinitely many geodesics
+   *   which can be generated by setting [\e azi1, \e azi2] →
+   *   [\e azi1, \e azi2] + [\e d, \e d], for arbitrary \e d.
    *
    * The calculations are accurate to better than 15 nm (15 nanometers) for the
    * WGS84 ellipsoid.  See Sec. 9 of
@@ -138,7 +138,7 @@ namespace GeographicLib {
    * for |<i>f</i>| < 0.02; however reasonably accurate results will be
    * obtained for |<i>f</i>| < 0.2.  Here is a table of the approximate
    * maximum error (expressed as a distance) for an ellipsoid with the same
-   * major radius as the WGS84 ellipsoid and different values of the
+   * equatorial radius as the WGS84 ellipsoid and different values of the
    * flattening.<pre>
    *     |f|      error
    *     0.01     25 nm
@@ -156,7 +156,7 @@ namespace GeographicLib {
    *   J. Geodesy <b>87</b>, 43--55 (2013);
    *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
-   *   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   *   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    *   geod-addenda.html</a>.
    * .
    * For more information on geodesics see \ref geodesic.
diff --git a/include/GeographicLib/GeodesicExact.hpp b/include/GeographicLib/GeodesicExact.hpp
index 2eafecb..770aed5 100644
--- a/include/GeographicLib/GeodesicExact.hpp
+++ b/include/GeographicLib/GeodesicExact.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2012-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GEODESICEXACT_HPP)
diff --git a/include/GeographicLib/GeodesicLine.hpp b/include/GeographicLib/GeodesicLine.hpp
index 868daab..b1aad22 100644
--- a/include/GeographicLib/GeodesicLine.hpp
+++ b/include/GeographicLib/GeodesicLine.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GEODESICLINE_HPP)
@@ -55,7 +55,8 @@ namespace GeographicLib {
    *   J. Geodesy <b>87</b>, 43--55 (2013);
    *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
-   *   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   *   addenda:
+   *   <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    *   geod-addenda.html</a>.
    * .
    * For more information on geodesics see \ref geodesic.
diff --git a/include/GeographicLib/GeodesicLineExact.hpp b/include/GeographicLib/GeodesicLineExact.hpp
index 31d66c1..8073dfd 100644
--- a/include/GeographicLib/GeodesicLineExact.hpp
+++ b/include/GeographicLib/GeodesicLineExact.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2012-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GEODESICLINEEXACT_HPP)
diff --git a/include/GeographicLib/Geohash.hpp b/include/GeographicLib/Geohash.hpp
index 38b5a04..888549e 100644
--- a/include/GeographicLib/Geohash.hpp
+++ b/include/GeographicLib/Geohash.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2012-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GEOHASH_HPP)
diff --git a/include/GeographicLib/Geoid.hpp b/include/GeographicLib/Geoid.hpp
index 4e1a42d..38634be 100644
--- a/include/GeographicLib/Geoid.hpp
+++ b/include/GeographicLib/Geoid.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GEOID_HPP)
diff --git a/include/GeographicLib/Georef.hpp b/include/GeographicLib/Georef.hpp
index d1ed366..eef6d88 100644
--- a/include/GeographicLib/Georef.hpp
+++ b/include/GeographicLib/Georef.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2015) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GEOREF_HPP)
diff --git a/include/GeographicLib/Gnomonic.hpp b/include/GeographicLib/Gnomonic.hpp
index 75ca938..1fcefa6 100644
--- a/include/GeographicLib/Gnomonic.hpp
+++ b/include/GeographicLib/Gnomonic.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GNOMONIC_HPP)
@@ -27,7 +27,7 @@ namespace GeographicLib {
    *   J. Geodesy <b>87</b>, 43--55 (2013);
    *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
-   *   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   *   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    *   geod-addenda.html</a>.
    * .
    * The projection of \e P is defined as follows: compute the geodesic line
diff --git a/include/GeographicLib/GravityCircle.hpp b/include/GeographicLib/GravityCircle.hpp
index 5427256..c47c80f 100644
--- a/include/GeographicLib/GravityCircle.hpp
+++ b/include/GeographicLib/GravityCircle.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GRAVITYCIRCLE_HPP)
diff --git a/include/GeographicLib/GravityModel.hpp b/include/GeographicLib/GravityModel.hpp
index db1a095..a0dd9fd 100644
--- a/include/GeographicLib/GravityModel.hpp
+++ b/include/GeographicLib/GravityModel.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_GRAVITYMODEL_HPP)
diff --git a/include/GeographicLib/LambertConformalConic.hpp b/include/GeographicLib/LambertConformalConic.hpp
index a63e3c1..e9ae6dd 100644
--- a/include/GeographicLib/LambertConformalConic.hpp
+++ b/include/GeographicLib/LambertConformalConic.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_LAMBERTCONFORMALCONIC_HPP)
diff --git a/include/GeographicLib/LocalCartesian.hpp b/include/GeographicLib/LocalCartesian.hpp
index e3104b0..21ca4af 100644
--- a/include/GeographicLib/LocalCartesian.hpp
+++ b/include/GeographicLib/LocalCartesian.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_LOCALCARTESIAN_HPP)
diff --git a/include/GeographicLib/MGRS.hpp b/include/GeographicLib/MGRS.hpp
index b423195..1e9bd12 100644
--- a/include/GeographicLib/MGRS.hpp
+++ b/include/GeographicLib/MGRS.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_MGRS_HPP)
diff --git a/include/GeographicLib/MagneticCircle.hpp b/include/GeographicLib/MagneticCircle.hpp
index 085d419..11196ae 100644
--- a/include/GeographicLib/MagneticCircle.hpp
+++ b/include/GeographicLib/MagneticCircle.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_MAGNETICCIRCLE_HPP)
diff --git a/include/GeographicLib/MagneticModel.hpp b/include/GeographicLib/MagneticModel.hpp
index 6a631d4..44748b4 100644
--- a/include/GeographicLib/MagneticModel.hpp
+++ b/include/GeographicLib/MagneticModel.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_MAGNETICMODEL_HPP)
diff --git a/include/GeographicLib/Math.hpp b/include/GeographicLib/Math.hpp
index dc01065..8ca82f4 100644
--- a/include/GeographicLib/Math.hpp
+++ b/include/GeographicLib/Math.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 // Constants.hpp includes Math.hpp.  Place this include outside Math.hpp's
@@ -445,6 +445,8 @@ namespace GeographicLib {
       // Before version 14 (2015), Visual Studio had problems dealing
       // with -0.0.  Specifically
       //   VC 10,11,12 and 32-bit compile: fmod(-0.0, 360.0) -> +0.0
+      // sincosd has a similar fix.
+      // python 2.7 on Windows 32-bit machines has the same problem.
       if (x == 0) y = x;
 #endif
       return y <= -180 ? y + 360 : (y <= 180 ? y : y - 360);
@@ -580,6 +582,8 @@ namespace GeographicLib {
       // with -0.0.  Specifically
       //   VC 10,11,12 and 32-bit compile: fmod(-0.0, 360.0) -> +0.0
       //   VC 12       and 64-bit compile:  sin(-0.0)        -> +0.0
+      // AngNormalize has a similar fix.
+      // python 2.7 on Windows 32-bit machines has the same problem.
       if (x == 0) s = x;
 #endif
       switch (unsigned(q) & 3U) {
@@ -747,7 +751,7 @@ namespace GeographicLib {
 #else
       using std::abs;
       // NaN counts as positive
-      return abs(x) * (y < 0 || (y == 0 && 1/y < 0)  ? -1 : 1);
+      return abs(x) * (y < 0 || (y == 0 && 1/y < 0) ? -1 : 1);
 #endif
     }
 
diff --git a/include/GeographicLib/NearestNeighbor.hpp b/include/GeographicLib/NearestNeighbor.hpp
index ebefeb9..3dd8612 100644
--- a/include/GeographicLib/NearestNeighbor.hpp
+++ b/include/GeographicLib/NearestNeighbor.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2016) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_NEARESTNEIGHBOR_HPP)
@@ -43,76 +43,73 @@ namespace GeographicLib {
   /**
    * \brief Nearest-neighbor calculations
    *
-   * This class implements nearest-neighbor calculations using the
-   * vantage-point tree described by
-   * - J. K. Uhlmann,
-   *   <a href="doi:10.1016/0020-0190(91)90074-r">
-   *   Satisfying general proximity/similarity queries with metric trees</a>,
-   *   Information Processing Letters 40 175–179 (1991).
-   * - P. N. Yianilos,
-   *   <a href="http://pnylab.com/pny/papers/vptree/vptree/">
-   *   Data structures and algorithms for nearest neighbor search in general
-   *   metric spaces</a>, Proc. 4th ACM-SIAM Symposium on Discrete Algorithms,
-   *   (SIAM, 1993). pp. 311–321.
-   *
-   * Given a set of points in some space and a distance function \e d
-   * satisfying the metric conditions:
-   * \f[
-   * \begin{align}
-   *  d(x,y) &\ge 0,\\
-   *  d(x,y) &= 0, \ \text{iff $x = y$},\\
-   *  d(x,y) &= d(y,x),\\
-   *  d(x,z) &\ge d(x,y) + d(y,z),
-   * \end{align}
-   * \f]
-   * the vantage-point (VP) tree provides an efficient way of determining
-   * nearest neighbors.  Typically the cost of constructing a VP tree of \e N
-   * points is \e N log \e N, while the cost of a query is log \e N.  Thus a VP
-   * tree should be used in situations where \e N is large and at least log \e
-   * N queries are to be made.  The condition, \e N is large, means that
-   * \f$ N \gg 2^D \f$, where \e D is the dimensionality of the space.
-   *
-   * - This implementation includes Yianilos' upper and lower bounds for the
-   *   inside and outside sets.  This helps limit the number of searches
-   *   (compared to just using the median distance).
-   * - Rather than do a depth-first or breath-first search on the tree, the
-   *   nodes to be processed are put on a priority queue with the nodes most
-   *   likely to contain close points processed first.  Frequently, this allows
-   *   nodes lower down on the priority queue to be skipped.
-   * - This technique also allows non-exhaustive searchs to be performed (to
-   *   answer questions such as "are there any points within 1km of the query
-   *   point?).
-   * - When building the tree, the points furthest from the parent vantage
-   *   point in both the inside and outside sets are selected as the children's
-   *   vantage points.  This information is already available from the
-   *   computation of the upper and lower bounds of the children.  This choice
-   *   seems to lead to a reasonably optimized tree.
-   * - The leaf nodes can contain a bucket of points (instead of just a vantage
-   *   point).
+   * This class solves the nearest-neighbor problm using a vantage-point tree
+   * as described in \ref nearest.
    *
    * This class is templated so that it can handle arbitrary metric spaces as
    * follows:
    *
-   * @tparam real the type used for measuring distances; it can be a real or
-   *   signed integer type.
-   * @tparam position the type for specifying points.
-   * @tparam distance the type for a function object which takes takes two
-   *   positions as arguments and returns the distance (of type \e real).
+   * @tparam dist_t the type used for measuring distances; it can be a real or
+   *   signed integer type; in typical geodetic applications, \e dist_t might be
+   *   <code>double</code>.
+   * @tparam pos_t the type for specifying the positions of points; geodetic
+   *   application might bundled the latitude and longitude into a
+   *   <code>std::pair<dist_t, dist_t></code>.
+   * @tparam distfun_t the type of a function object which takes takes two
+   *   positions (of type \e pos_t) and returns the distance (of type \e
+   *   dist_t); in geodetic applications, this might be a class which is
+   *   constructed with a Geodesic object and which implements a member
+   *   function with a signature <code>dist_t operator() (const pos_t&, const
+   *   pos_t&) const</code>, which returns the geodesic distance between two
+   *   points.
+   *
+   * \note The distance measure must satisfy the triangle inequality, \f$
+   * d(a,c) \le d(a,b) + d(b,c) \f$ for all points \e a, \e b, \e c.  The
+   * geodesic distance (given by Geodesic::Inverse) does, while the great
+   * ellipse distance and the rhumb line distance <i>do not</i>.  If you use
+   * the ordinary Euclidean distance, i.e., \f$ \sqrt{(x_a-x_b)^2 +
+   * (y_a-y_b)^2} \f$ for two dimensions, don't be tempted to leave out the
+   * square root in the interests of "efficiency"; the squared distance does
+   * not satisfy the triangle inequality!
    *
-   * The \e real type must support numeric_limits queries (specifically:
+   * This is a "header-only" implementation and, as such, depends in a minimal
+   * way on the rest of GeographicLib (the only dependency is through the use
+   * of GEOGRAPHICLIB_STATIC_ASSERT and GeographicLib::GeographicErr for
+   * handling run-time and compile-time exceptions).  Therefore, it is easy to
+   * extract this class from the rest of GeographicLib and use it as a
+   * stand-alone facility.
+   *
+   * The \e dist_t type must support numeric_limits queries (specifically:
    * is_signed, is_integer, max(), digits, and digits10).
    *
+   * The NearestNeighbor object is constructed with a vector of points (type \e
+   * pos_t) and a distance function (type \e distfun_t).  However the object
+   * does \e not store the points.  When querying the object with Search(),
+   * it's necessary to supply the same vector of points and the same distance
+   * function.
+   *
+   * There's no capability in this implementation to add or remove points from
+   * the set.  Instead Initialize() should be called to re-initialize the
+   * object with the modified vector of points.
+   *
+   * Because of the overhead in constructing a NearestNeighbor object for a
+   * large set of points, functions Save() and Load() are provided to save the
+   * object to an external file.  operator<<(), operator>>() and <a
+   * href="http://www.boost.org/libs/serialization/doc"> Boost
+   * serialization</a> can also be used to save and restore a NearestNeighbor
+   * object.  This is illustrated in the example.
+   *
    * Example of use:
    * \include example-NearestNeighbor.cpp
    **********************************************************************/
-  template <typename real, typename position, class distance>
+  template <typename dist_t, typename pos_t, class distfun_t>
   class NearestNeighbor {
     // For tracking changes to the I/O format
     static const int version = 1;
-    // This is what we get "free"; but if sizeof(real) = 1 (unlikely), allow 4
+    // This is what we get "free"; but if sizeof(dist_t) = 1 (unlikely), allow 4
     // slots (and this accommodates the default value bucket = 4).
-    static const int maxbucket = (2 + ((4 * sizeof(real)) / sizeof(int) >= 2 ?
-                                       (4 * sizeof(real)) / sizeof(int) : 2));
+    static const int maxbucket = (2 + ((4 * sizeof(dist_t)) / sizeof(int) >= 2 ?
+                                       (4 * sizeof(dist_t)) / sizeof(int) : 2));
   public:
 
     /**
@@ -120,7 +117,7 @@ namespace GeographicLib {
      *
      * This is equivalent to specifying an empty set of points.
      **********************************************************************/
-    NearestNeighbor() : _numpoints(0) {}
+    NearestNeighbor() : _numpoints(0), _bucket(0), _cost(0) {}
 
     /**
      * Constructor for NearestNeighbor.
@@ -128,7 +125,7 @@ namespace GeographicLib {
      * @param[in] pts a vector of points to include in the set.
      * @param[in] dist the distance function object.
      * @param[in] bucket the size of the buckets at the leaf nodes; this must
-     *   lie in [0, 2 + 4*sizeof(real)/sizeof(int)] (default 4).
+     *   lie in [0, 2 + 4*sizeof(dist_t)/sizeof(int)] (default 4).
      * @exception GeographicErr if the value of \e bucket is out of bounds or
      *   the size of \e pts is too big for an int.
      * @exception std::bad_alloc if memory for the tree can't be allocated.
@@ -142,7 +139,7 @@ namespace GeographicLib {
      * vanishes); these are treated as distinct.
      *
      * The choice of \e bucket is a tradeoff between space and efficiency.  A
-     * larger \e bucket decreases the size of the NearestNeigbor object which
+     * larger \e bucket decreases the size of the NearestNeighbor object which
      * scales as pts.size() / max(1, bucket) and reduces the number of distance
      * calculations to construct the object by log2(bucket) * pts.size().
      * However each search then requires about bucket additional distance
@@ -151,7 +148,7 @@ namespace GeographicLib {
      * \warning The same arguments \e pts and \e dist must be provided
      * to the Search() function.
      **********************************************************************/
-    NearestNeighbor(const std::vector<position>& pts, const distance& dist,
+    NearestNeighbor(const std::vector<pos_t>& pts, const distfun_t& dist,
                     int bucket = 4) {
       Initialize(pts, dist, bucket);
     }
@@ -162,7 +159,7 @@ namespace GeographicLib {
      * @param[in] pts a vector of points to include in the tree.
      * @param[in] dist the distance function object.
      * @param[in] bucket the size of the buckets at the leaf nodes; this must
-     *   lie in [0, 2 + 4*sizeof(real)/sizeof(int)] (default 4).
+     *   lie in [0, 2 + 4*sizeof(dist_t)/sizeof(int)] (default 4).
      * @exception GeographicErr if the value of \e bucket is out of bounds or
      *   the size of \e pts is too big for an int.
      * @exception std::bad_alloc if memory for the tree can't be allocated.
@@ -172,19 +169,19 @@ namespace GeographicLib {
      * If an exception is thrown, the state of the NearestNeighbor is
      * unchanged.
      **********************************************************************/
-    void Initialize(const std::vector<position>& pts, const distance& dist,
+    void Initialize(const std::vector<pos_t>& pts, const distfun_t& dist,
                     int bucket = 4) {
-      GEOGRAPHICLIB_STATIC_ASSERT(std::numeric_limits<real>::is_signed,
-                                  "real must be a signed type");
+      GEOGRAPHICLIB_STATIC_ASSERT(std::numeric_limits<dist_t>::is_signed,
+                                  "dist_t must be a signed type");
       if (!( 0 <= bucket && bucket <= maxbucket ))
         throw GeographicLib::GeographicErr
-          ("bucket must lie in [0, 2 + 4*sizeof(real)/sizeof(int)]");
+          ("bucket must lie in [0, 2 + 4*sizeof(dist_t)/sizeof(int)]");
       if (pts.size() > size_t(std::numeric_limits<int>::max()))
         throw GeographicLib::GeographicErr("pts array too big");
       // the pair contains distance+id
       std::vector<item> ids(pts.size());
       for (int k = int(ids.size()); k--;)
-        ids[k] = std::make_pair(real(0), k);
+        ids[k] = std::make_pair(dist_t(0), k);
       int cost = 0;
       std::vector<Node> tree;
       init(pts, dist, bucket, tree, ids, cost,
@@ -206,7 +203,7 @@ namespace GeographicLib {
      * @param[out] ind a vector of indices to the closest points found.
      * @param[in] k the number of points to search for (default = 1).
      * @param[in] maxdist only return points with distances of \e maxdist or
-     *   less from \e query (default is the maximum \e real).
+     *   less from \e query (default is the maximum \e dist_t).
      * @param[in] mindist only return points with distances of more than
      *   \e mindist from \e query (default = −1).
      * @param[in] exhaustive whether to do an exhaustive search (default true).
@@ -217,6 +214,13 @@ namespace GeographicLib {
      * The indices returned in \e ind are sorted by distance from \e query
      * (closest first).
      *
+     * The simplest invocation is with just the 4 non-optional arguments.  This
+     * returns the closest distance and the index to the closest point in
+     * <i>ind</i><sub>0</sub>.  If there are several points equally close, then
+     * <i>ind</i><sub>0</sub> gives the index of an arbirary one of them.  If
+     * there's no closest point (because the set of points is empty), then \e
+     * ind is empty and −1 is returned.
+     *
      * With \e exhaustive = true and \e tol = 0 (their default values), this
      * finds the indices of \e k closest neighbors to \e query whose distances
      * to \e query are in (\e mindist, \e maxdist].  If \e mindist and \e
@@ -239,39 +243,43 @@ namespace GeographicLib {
      * point (relative to the average spacing of the data).  If \e mindist is
      * large, the efficiency of the search deteriorates.
      *
+     * \note Only the shortest distance is returned (as as the function value).
+     * The distances to other points (indexed by <i>ind</i><sub><i>j</i></sub>
+     * for \e j > 0) can be found by invoking \e dist again.
+     *
      * \warning The arguments \e pts and \e dist must be identical to
      * those used to initialize the NearestNeighbor; if not, the behavior of
      * this function is undefined (however, if the size of \e pts is wrong,
      * this function exits with no results returned).
      **********************************************************************/
-    real Search(const std::vector<position>& pts, const distance& dist,
-                const position& query,
+    dist_t Search(const std::vector<pos_t>& pts, const distfun_t& dist,
+                const pos_t& query,
                 std::vector<int>& ind,
                 int k = 1,
-                real maxdist = std::numeric_limits<real>::max(),
-                real mindist = -1,
+                dist_t maxdist = std::numeric_limits<dist_t>::max(),
+                dist_t mindist = -1,
                 bool exhaustive = true,
-                real tol = 0) const {
+                dist_t tol = 0) const {
       std::priority_queue<item> results;
       if (_numpoints > 0 && _numpoints == int(pts.size()) &&
           k > 0 && maxdist > mindist) {
         // distance to the kth closest point so far
-        real tau = maxdist;
+        dist_t tau = maxdist;
         // first is negative of how far query is outside boundary of node
         // +1 if on boundary or inside
         // second is node index
         std::priority_queue<item> todo;
-        todo.push(std::make_pair(real(1), int(_tree.size()) - 1));
+        todo.push(std::make_pair(dist_t(1), int(_tree.size()) - 1));
         int c = 0;
         while (!todo.empty()) {
           int n = todo.top().second;
-          real d = -todo.top().first;
+          dist_t d = -todo.top().first;
           todo.pop();
-          real tau1 = tau - tol;
+          dist_t tau1 = tau - tol;
           // compare tau and d again since tau may have become smaller.
           if (!( n >= 0 && tau1 >= d )) continue;
           const Node& current = _tree[n];
-          real dst = 0;     // to suppress warning about uninitialized variable
+          dist_t dst = 0;   // to suppress warning about uninitialized variable
           bool exitflag = false, leaf = current.index < 0;
           for (int i = 0; i < (leaf ? _bucket : 1); ++i) {
             int index = leaf ? current.leaves[i] : current.index;
@@ -312,7 +320,7 @@ namespace GeographicLib {
                 if (tau1 >= d)
                   todo.push(std::make_pair(-d, current.data.child[l]));
               } else
-                todo.push(std::make_pair(real(1), current.data.child[l]));
+                todo.push(std::make_pair(dist_t(1), current.data.child[l]));
             }
           }
         }
@@ -325,7 +333,7 @@ namespace GeographicLib {
         if (c < _cmin) _cmin = c;
       }
 
-      real d = -1;
+      dist_t d = -1;
       ind.resize(results.size());
 
       for (int i = int(ind.size()); i--;) {
@@ -360,8 +368,8 @@ namespace GeographicLib {
      * GEOGRAPHICLIB_HAVE_BOOST_SERIALIZATION macro be defined.
      **********************************************************************/
     void Save(std::ostream& os, bool bin = true) const {
-      int realspec = std::numeric_limits<real>::digits *
-        (std::numeric_limits<real>::is_integer ? -1 : 1);
+      int realspec = std::numeric_limits<dist_t>::digits *
+        (std::numeric_limits<dist_t>::is_integer ? -1 : 1);
       if (bin) {
         char id[] = "NearestNeighbor_";
         os.write(id, 16);
@@ -378,9 +386,9 @@ namespace GeographicLib {
           os.write(reinterpret_cast<const char *>(&node.index), sizeof(int));
           if (node.index >= 0) {
             os.write(reinterpret_cast<const char *>(node.data.lower),
-                     2 * sizeof(real));
+                     2 * sizeof(dist_t));
             os.write(reinterpret_cast<const char *>(node.data.upper),
-                     2 * sizeof(real));
+                     2 * sizeof(dist_t));
             os.write(reinterpret_cast<const char *>(node.data.child),
                      2 * sizeof(int));
           } else {
@@ -390,10 +398,10 @@ namespace GeographicLib {
         }
       } else {
         std::stringstream ostring;
-          // Ensure enough precision for type real.  If real is actually a
-          // signed integer type, full precision is used anyway.  With C++11,
-          // max_digits10 can be used instead.
-        ostring.precision(std::numeric_limits<real>::digits10 + 2);
+          // Ensure enough precision for type dist_t.  With C++11, max_digits10
+          // can be used instead.
+        if (!std::numeric_limits<dist_t>::is_integer)
+          ostring.precision(std::numeric_limits<dist_t>::digits10 + 2);
         ostring << version << " " << realspec << " " << _bucket << " "
                 << _numpoints << " " << _tree.size() << " " << _cost;
         for (int i = 0; i < int(_tree.size()); ++i) {
@@ -418,6 +426,7 @@ namespace GeographicLib {
      * @param[in,out] is the stream to read from
      * @param[in] bin if true (the default) load in binary mode.
      * @exception GeographicErr if the state read from \e is is illegal.
+     * @exception std::bad_alloc if memory for the tree can't be allocated.
      *
      * The counters tracking the statistics of searches are reset by this
      * operation.  Binary data must have been saved on a machine with the same
@@ -453,9 +462,9 @@ namespace GeographicLib {
       }
       if (!( version1 == version ))
         throw GeographicLib::GeographicErr("Incompatible version");
-      if (!( realspec == std::numeric_limits<real>::digits *
-             (std::numeric_limits<real>::is_integer ? -1 : 1) ))
-        throw GeographicLib::GeographicErr("Different real types");
+      if (!( realspec == std::numeric_limits<dist_t>::digits *
+             (std::numeric_limits<dist_t>::is_integer ? -1 : 1) ))
+        throw GeographicLib::GeographicErr("Different dist_t types");
       if (!( 0 <= bucket && bucket <= maxbucket ))
         throw GeographicLib::GeographicErr("Bad bucket size");
       if (!( 0 <= treesize && treesize <= numpoints ))
@@ -468,9 +477,9 @@ namespace GeographicLib {
           is.read(reinterpret_cast<char *>(&node.index), sizeof(int));
           if (node.index >= 0) {
             is.read(reinterpret_cast<char *>(node.data.lower),
-                    2 * sizeof(real));
+                    2 * sizeof(dist_t));
             is.read(reinterpret_cast<char *>(node.data.upper),
-                    2 * sizeof(real));
+                    2 * sizeof(dist_t));
             is.read(reinterpret_cast<char *>(node.data.child),
                     2 * sizeof(int));
           } else {
@@ -511,6 +520,46 @@ namespace GeographicLib {
     }
 
     /**
+     * Write the object to stream \e os as text.
+     *
+     * @param[in,out] os the output stream.
+     * @param[in] t the NearestNeighbor object to be saved.
+     * @exception std::bad_alloc if memory for the string representation of the
+     *   object can't be allocated.
+     **********************************************************************/
+    friend std::ostream& operator<<(std::ostream& os, const NearestNeighbor& t)
+    { t.Save(os, false); return os; }
+
+    /**
+     * Read the object from stream \e is as text.
+     *
+     * @param[in,out] is the input stream.
+     * @param[out] t the NearestNeighbor object to be loaded.
+     * @exception GeographicErr if the state read from \e is is illegal.
+     * @exception std::bad_alloc if memory for the tree can't be allocated.
+     **********************************************************************/
+    friend std::istream& operator>>(std::istream& is, NearestNeighbor& t)
+    { t.Load(is, false); return is; }
+
+    /**
+     * Swap with another NearestNeighbor object.
+     *
+     * @param[in,out] t the NearestNeighbor object to swap with.
+     **********************************************************************/
+    void swap(NearestNeighbor& t) {
+      std::swap(_numpoints, t._numpoints);
+      std::swap(_bucket, t._bucket);
+      std::swap(_cost, t._cost);
+      _tree.swap(t._tree);
+      std::swap(_mc, t._mc);
+      std::swap(_sc, t._sc);
+      std::swap(_c1, t._c1);
+      std::swap(_k, t._k);
+      std::swap(_cmin, t._cmin);
+      std::swap(_cmax, t._cmax);
+    }
+
+    /**
      * The accumulated statistics on the searches so far.
      *
      * @param[out] setupcost the cost of initializing the NearestNeighbor.
@@ -543,13 +592,14 @@ namespace GeographicLib {
     }
 
   private:
-    // Package up a real and an int.  We will want to sort on the real so put
-    // it first.
-    typedef std::pair<real, int> item;
+    // Package up a dist_t and an int.  We will want to sort on the dist_t so
+    // put it first.
+    typedef std::pair<dist_t, int> item;
+    // \cond SKIP
     class Node {
     public:
       struct bounds {
-        real lower[2], upper[2]; // bounds on inner/outer distances
+        dist_t lower[2], upper[2]; // bounds on inner/outer distances
         int child[2];
       };
       union {
@@ -569,7 +619,7 @@ namespace GeographicLib {
 
       // Sanity check on a Node
       void Check(int numpoints, int treesize, int bucket) const {
-        if (!( -1 <= index && index << numpoints ))
+        if (!( -1 <= index && index < numpoints ))
           throw GeographicLib::GeographicErr("Bad index");
         if (index >= 0) {
           if (!( -1 <= data.child[0] && data.child[0] < treesize &&
@@ -622,11 +672,12 @@ namespace GeographicLib {
       { boost::serialization::split_member(ar, *this, file_version); }
 #endif
     };
+    // \endcond
 #if GEOGRAPHICLIB_HAVE_BOOST_SERIALIZATION
     friend class boost::serialization::access;
     template<class Archive> void save(Archive& ar, const unsigned) const {
-      int realspec = std::numeric_limits<real>::digits *
-        (std::numeric_limits<real>::is_integer ? -1 : 1);
+      int realspec = std::numeric_limits<dist_t>::digits *
+        (std::numeric_limits<dist_t>::is_integer ? -1 : 1);
       // Need to use version1, otherwise load error in debug mode on Linux:
       // undefined reference to GeographicLib::NearestNeighbor<...>::version.
       int version1 = version;
@@ -644,9 +695,9 @@ namespace GeographicLib {
         throw GeographicLib::GeographicErr("Incompatible version");
       std::vector<Node> tree;
       ar & boost::serialization::make_nvp("realspec", realspec);
-      if (!( realspec == std::numeric_limits<real>::digits *
-             (std::numeric_limits<real>::is_integer ? -1 : 1) ))
-        throw GeographicLib::GeographicErr("Different real types");
+      if (!( realspec == std::numeric_limits<dist_t>::digits *
+             (std::numeric_limits<dist_t>::is_integer ? -1 : 1) ))
+        throw GeographicLib::GeographicErr("Different dist_t types");
       ar & boost::serialization::make_nvp("bucket", bucket);
       if (!( 0 <= bucket && bucket <= maxbucket ))
         throw GeographicLib::GeographicErr("Bad bucket size");
@@ -675,7 +726,7 @@ namespace GeographicLib {
     mutable double _mc, _sc;
     mutable int _c1, _k, _cmin, _cmax;
 
-    int init(const std::vector<position>& pts, const distance& dist, int bucket,
+    int init(const std::vector<pos_t>& pts, const distfun_t& dist, int bucket,
              std::vector<Node>& tree, std::vector<item>& ids, int& cost,
              int l, int u, int vp) {
 
@@ -695,7 +746,7 @@ namespace GeographicLib {
           ids[k].first = dist(pts[ids[l].second], pts[ids[k].second]);
           ++cost;
         }
-        // partitian around the median distance
+        // partition around the median distance
         std::nth_element(ids.begin() + l + 1, ids.begin() + m, ids.begin() + u);
         node.index = ids[l].second;
         if (m > l + 1) {        // node.child[0] is possibly empty
@@ -741,6 +792,26 @@ namespace GeographicLib {
 
 } // namespace GeographicLib
 
+namespace std {
+
+  /**
+   * Swap two GeographicLib::NearestNeighbor objects.
+   *
+   * @tparam dist_t the type used for measuring distances.
+   * @tparam pos_t the type for specifying the positions of points.
+   * @tparam distfun_t the type for a function object which calculates distances
+   *   between points.
+   * @param[in,out] a the first GeographicLib::NearestNeighbor to swap.
+   * @param[in,out] b the second GeographicLib::NearestNeighbor to swap.
+   **********************************************************************/
+  template <typename dist_t, typename pos_t, class distfun_t>
+  void swap(GeographicLib::NearestNeighbor<dist_t, pos_t, distfun_t>& a,
+            GeographicLib::NearestNeighbor<dist_t, pos_t, distfun_t>& b) {
+    a.swap(b);
+  }
+
+} // namespace std
+
 #if defined(_MSC_VER)
 #  pragma warning (pop)
 #endif
diff --git a/include/GeographicLib/NormalGravity.hpp b/include/GeographicLib/NormalGravity.hpp
index 2f0e7af..2c4955f 100644
--- a/include/GeographicLib/NormalGravity.hpp
+++ b/include/GeographicLib/NormalGravity.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_NORMALGRAVITY_HPP)
@@ -100,8 +100,8 @@ namespace GeographicLib {
     static real atan7series(real x);
     static real atan5series(real x);
     static real Qf(real x, bool alt);
-    static real Gf(real x, bool alt);
-    static real QG3f(real x, bool alt);
+    static real Hf(real x, bool alt);
+    static real QH3f(real x, bool alt);
     real Jn(int n) const;
     void Initialize(real a, real GM, real omega, real f_J2, bool geometricp);
   public:
diff --git a/include/GeographicLib/OSGB.hpp b/include/GeographicLib/OSGB.hpp
index 5889e40..43d0a0f 100644
--- a/include/GeographicLib/OSGB.hpp
+++ b/include/GeographicLib/OSGB.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_OSGB_HPP)
diff --git a/include/GeographicLib/PolarStereographic.hpp b/include/GeographicLib/PolarStereographic.hpp
index b481a42..b89b44a 100644
--- a/include/GeographicLib/PolarStereographic.hpp
+++ b/include/GeographicLib/PolarStereographic.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_POLARSTEREOGRAPHIC_HPP)
diff --git a/include/GeographicLib/PolygonArea.hpp b/include/GeographicLib/PolygonArea.hpp
index 508ad5f..ff71ae4 100644
--- a/include/GeographicLib/PolygonArea.hpp
+++ b/include/GeographicLib/PolygonArea.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_POLYGONAREA_HPP)
@@ -29,7 +29,7 @@ namespace GeographicLib {
    *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
    *   10.1007/s00190-012-0578-z</a>;
    *   addenda:
-   *   <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+   *   <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
    *   geod-addenda.html</a>.
    *
    * This class lets you add vertices and edges one at a time to the polygon.
diff --git a/include/GeographicLib/Rhumb.hpp b/include/GeographicLib/Rhumb.hpp
index 19d694d..e91dca7 100644
--- a/include/GeographicLib/Rhumb.hpp
+++ b/include/GeographicLib/Rhumb.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2014-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_RHUMB_HPP)
diff --git a/include/GeographicLib/SphericalEngine.hpp b/include/GeographicLib/SphericalEngine.hpp
index f1bff78..6f743e4 100644
--- a/include/GeographicLib/SphericalEngine.hpp
+++ b/include/GeographicLib/SphericalEngine.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2012) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_SPHERICALENGINE_HPP)
diff --git a/include/GeographicLib/SphericalHarmonic.hpp b/include/GeographicLib/SphericalHarmonic.hpp
index cf9195b..f0a1e01 100644
--- a/include/GeographicLib/SphericalHarmonic.hpp
+++ b/include/GeographicLib/SphericalHarmonic.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_SPHERICALHARMONIC_HPP)
diff --git a/include/GeographicLib/SphericalHarmonic1.hpp b/include/GeographicLib/SphericalHarmonic1.hpp
index e4d80d9..543686e 100644
--- a/include/GeographicLib/SphericalHarmonic1.hpp
+++ b/include/GeographicLib/SphericalHarmonic1.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_SPHERICALHARMONIC1_HPP)
diff --git a/include/GeographicLib/SphericalHarmonic2.hpp b/include/GeographicLib/SphericalHarmonic2.hpp
index 49fbae7..43eb426 100644
--- a/include/GeographicLib/SphericalHarmonic2.hpp
+++ b/include/GeographicLib/SphericalHarmonic2.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2012) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_SPHERICALHARMONIC2_HPP)
diff --git a/include/GeographicLib/TransverseMercator.hpp b/include/GeographicLib/TransverseMercator.hpp
index a822b7c..4ebd2e5 100644
--- a/include/GeographicLib/TransverseMercator.hpp
+++ b/include/GeographicLib/TransverseMercator.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOR_HPP)
diff --git a/include/GeographicLib/TransverseMercatorExact.hpp b/include/GeographicLib/TransverseMercatorExact.hpp
index ad34fad..8f81efd 100644
--- a/include/GeographicLib/TransverseMercatorExact.hpp
+++ b/include/GeographicLib/TransverseMercatorExact.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_TRANSVERSEMERCATOREXACT_HPP)
@@ -59,7 +59,7 @@ namespace GeographicLib {
    * taken to be the equator.  See the documentation on TransverseMercator for
    * how to include a false easting, false northing, or a latitude of origin.
    *
-   * See <a href="http://geographiclib.sourceforge.net/tm-grid.kmz"
+   * See <a href="https://geographiclib.sourceforge.io/tm-grid.kmz"
    * type="application/vnd.google-earth.kmz"> tm-grid.kmz</a>, for an
    * illustration of the transverse Mercator grid in Google Earth.
    *
diff --git a/include/GeographicLib/UTMUPS.hpp b/include/GeographicLib/UTMUPS.hpp
index 4f1bc79..b7c8cad 100644
--- a/include/GeographicLib/UTMUPS.hpp
+++ b/include/GeographicLib/UTMUPS.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_UTMUPS_HPP)
diff --git a/include/GeographicLib/Utility.hpp b/include/GeographicLib/Utility.hpp
index e3943b9..feb5858 100644
--- a/include/GeographicLib/Utility.hpp
+++ b/include/GeographicLib/Utility.hpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #if !defined(GEOGRAPHICLIB_UTILITY_HPP)
@@ -401,9 +401,9 @@ namespace GeographicLib {
     template<typename T> static T nummatch(const std::string& s) {
       if (s.length() < 3)
         return 0;
-      std::string t;
-      t.resize(s.length());
-      std::transform(s.begin(), s.end(), t.begin(), (int(*)(int))std::toupper);
+      std::string t(s);
+      for (std::string::iterator p = t.begin(); p != t.end(); ++p)
+        *p = char(std::toupper(*p));
       for (size_t i = s.length(); i--;)
         t[i] = char(std::toupper(s[i]));
       int sign = t[0] == '-' ? -1 : 1;
@@ -657,7 +657,8 @@ namespace GeographicLib {
                             " at end of " + t);
       return x;
     }
-    std::transform(t.begin(), t.end(), t.begin(), (int(*)(int))tolower);
+    for (std::string::iterator p = t.begin(); p != t.end(); ++p)
+      *p = char(std::tolower(*p));
     switch (t[0]) {             // already checked that t isn't empty
     case 'f':
       if (t == "f" || t == "false") return false;
diff --git a/java/README.txt b/java/README.txt
index 6ef15ec..c32323b 100644
--- a/java/README.txt
+++ b/java/README.txt
@@ -4,11 +4,11 @@ This is a Java implementation of the geodesic algorithms described in
   Algorithms for geodesics,
   J. Geodesy 87, 43-55 (2013);
   https://doi.org/10.1007/s00190-012-0578-z
-  Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+  Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 
 For documentation, see
 
-  http://geographiclib.sourceforge.net/html/java/
+  https://geographiclib.sourceforge.io/html/java/
 
 The code in this directory is entirely self-contained.  In particular,
 it does not depend on the C++ classes.  You can build the example
diff --git a/java/direct/pom.xml b/java/direct/pom.xml
index af381cf..303a5fa 100644
--- a/java/direct/pom.xml
+++ b/java/direct/pom.xml
@@ -9,7 +9,7 @@
   <groupId>net.sf.geographiclib.example</groupId>
   <artifactId>Direct</artifactId>
   <name>Direct</name>
-  <version>1.47-SNAPSHOT</version>
+  <version>1.48-SNAPSHOT</version>
 
   <packaging>jar</packaging>
 
@@ -28,7 +28,7 @@
     <dependency>
       <groupId>net.sf.geographiclib</groupId>
       <artifactId>GeographicLib-Java</artifactId>
-      <version>1.47</version>
+      <version>1.48</version>
     </dependency>
   </dependencies>
 
diff --git a/java/inverse/pom.xml b/java/inverse/pom.xml
index 1c6afec..9eeb2ea 100644
--- a/java/inverse/pom.xml
+++ b/java/inverse/pom.xml
@@ -9,7 +9,7 @@
   <groupId>net.sf.geographiclib.example</groupId>
   <artifactId>Inverse</artifactId>
   <name>Inverse</name>
-  <version>1.47-SNAPSHOT</version>
+  <version>1.48-SNAPSHOT</version>
 
   <packaging>jar</packaging>
 
@@ -28,7 +28,7 @@
     <dependency>
       <groupId>net.sf.geographiclib</groupId>
       <artifactId>GeographicLib-Java</artifactId>
-      <version>1.47</version>
+      <version>1.48</version>
     </dependency>
   </dependencies>
 
diff --git a/java/planimeter/pom.xml b/java/planimeter/pom.xml
index cb86102..516bda7 100644
--- a/java/planimeter/pom.xml
+++ b/java/planimeter/pom.xml
@@ -9,7 +9,7 @@
   <groupId>net.sf.geographiclib.example</groupId>
   <artifactId>Planimeter</artifactId>
   <name>Planimeter</name>
-  <version>1.47-SNAPSHOT</version>
+  <version>1.48-SNAPSHOT</version>
 
   <packaging>jar</packaging>
 
@@ -28,7 +28,7 @@
     <dependency>
       <groupId>net.sf.geographiclib</groupId>
       <artifactId>GeographicLib-Java</artifactId>
-      <version>1.47</version>
+      <version>1.48</version>
     </dependency>
   </dependencies>
 
diff --git a/java/pom.xml b/java/pom.xml
index 25ca9e2..d0f5d3f 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -8,7 +8,7 @@
 
   <groupId>net.sf.geographiclib</groupId>
   <artifactId>GeographicLib-Java</artifactId>
-  <version>1.47</version>
+  <version>1.48</version>
 
   <packaging>jar</packaging>
 
@@ -26,7 +26,7 @@
     easy to do geodesic computations for an ellipsoid of revolution in
     a Java program. It requires Java version 1.1 or later.
   </description>
-  <url>http://geographiclib.sourceforge.net</url>
+  <url>https://geographiclib.sourceforge.io</url>
 
   <developers>
     <developer>
@@ -34,7 +34,7 @@
       <email>charles at karney.com</email>
       <organization></organization>
       <organizationUrl>
-        http://sourceforge.net/u/karney/profile/
+        https://sourceforge.net/u/karney/profile/
       </organizationUrl>
     </developer>
   </developers>
@@ -160,10 +160,10 @@
       scm:git://git.code.sourceforge.net/p/geographiclib/code
     </connection>
     <developerConnection>
-      scm:git:http://git.code.sourceforge.net/p/geographiclib/code
+      scm:git:https://git.code.sourceforge.net/p/geographiclib/code
     </developerConnection>
     <url>
-      http://sourceforge.net/p/geographiclib/code/ci/master/tree/
+      https://sourceforge.net/p/geographiclib/code/ci/master/tree/
     </url>
   </scm>
 
diff --git a/java/src/main/java/net/sf/geographiclib/Accumulator.java b/java/src/main/java/net/sf/geographiclib/Accumulator.java
index 7dc7dee..b075f56 100644
--- a/java/src/main/java/net/sf/geographiclib/Accumulator.java
+++ b/java/src/main/java/net/sf/geographiclib/Accumulator.java
@@ -3,7 +3,7 @@
  *
  * Copyright (c) Charles Karney (2013) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
diff --git a/java/src/main/java/net/sf/geographiclib/Constants.java b/java/src/main/java/net/sf/geographiclib/Constants.java
index 0476678..6914994 100644
--- a/java/src/main/java/net/sf/geographiclib/Constants.java
+++ b/java/src/main/java/net/sf/geographiclib/Constants.java
@@ -3,7 +3,7 @@
  *
  * Copyright (c) Charles Karney (2013) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
diff --git a/java/src/main/java/net/sf/geographiclib/GeoMath.java b/java/src/main/java/net/sf/geographiclib/GeoMath.java
index a0cf4bc..48d3957 100644
--- a/java/src/main/java/net/sf/geographiclib/GeoMath.java
+++ b/java/src/main/java/net/sf/geographiclib/GeoMath.java
@@ -1,9 +1,9 @@
 /**
  * Implementation of the net.sf.geographiclib.GeoMath class
  *
- * Copyright (c) Charles Karney (2013-2016) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2013-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
@@ -190,7 +190,7 @@ public class GeoMath {
    **********************************************************************/
   public static double AngNormalize(double x) {
     x = x % 360.0;
-    return x < -180 ? x + 360 : (x < 180 ? x : x - 360);
+    return x <= -180 ? x + 360 : (x <= 180 ? x : x - 360);
   }
 
   /**
@@ -221,10 +221,10 @@ public class GeoMath {
   public static Pair AngDiff(double x, double y) {
     double d, t;
     {
-      Pair r = sum(AngNormalize(x), AngNormalize(-y));
-      d = - AngNormalize(r.first); t = r.second;
+      Pair r = sum(AngNormalize(-x), AngNormalize(y));
+      d = AngNormalize(r.first); t = r.second;
     }
-    return sum(d == 180 && t < 0 ? -180 : d, -t);
+    return sum(d == 180 && t > 0 ? -180 : d, t);
   }
 
   /**
@@ -250,11 +250,12 @@ public class GeoMath {
     double s = Math.sin(r), c = Math.cos(r);
     double sinx, cosx;
     switch (q & 3) {
-    case  0: sinx =     s; cosx =     c; break;
-    case  1: sinx =     c; cosx = 0 - s; break;
-    case  2: sinx = 0 - s; cosx = 0 - c; break;
-    default: sinx = 0 - c; cosx =     s; break; // case 3
+    case  0: sinx =  s; cosx =  c; break;
+    case  1: sinx =  c; cosx = -s; break;
+    case  2: sinx = -s; cosx = -c; break;
+    default: sinx = -c; cosx =  s; break; // case 3
     }
+    if (x != 0) { sinx += 0.0; cosx += 0.0; }
     return new Pair(sinx, cosx);
   }
 
@@ -265,9 +266,9 @@ public class GeoMath {
    * @param x the cosine of the angle
    * @return atan2(<i>y</i>, <i>x</i>) in degrees.
    *
-   * The result is in the range [−180° 180°).  N.B.,
-   * atan2d(±0, −1) = −180°; atan2d(+ε,
-   * −1) = +180°, for ε positive and tiny;
+   * The result is in the range (−180° 180°].  N.B.,
+   * atan2d(±0, −1) = +180°; atan2d(−ε,
+   * −1) = −180°, for ε positive and tiny;
    * atan2d(±0, 1) = ±0°.
    **********************************************************************/
   public static double atan2d(double y, double x) {
@@ -287,7 +288,7 @@ public class GeoMath {
       //   case 0: ang = 0 + ang; break;
       //
       // and handle mpfr as in AngRound.
-    case 1: ang = (y > 0 ? 180 : -180) - ang; break;
+    case 1: ang = (y >= 0 ? 180 : -180) - ang; break;
     case 2: ang =  90 - ang; break;
     case 3: ang = -90 + ang; break;
     }
diff --git a/java/src/main/java/net/sf/geographiclib/Geodesic.java b/java/src/main/java/net/sf/geographiclib/Geodesic.java
index a1eddff..b3fbea7 100644
--- a/java/src/main/java/net/sf/geographiclib/Geodesic.java
+++ b/java/src/main/java/net/sf/geographiclib/Geodesic.java
@@ -3,7 +3,7 @@
  *
  * Copyright (c) Charles Karney (2013-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
@@ -142,8 +142,8 @@ package net.sf.geographiclib;
  *   <i>d</i>.  (For spheres, this prescription applies when points 1 and 2 are
  *   antipodal.)
  * <li>
- *   s12 = 0 (coincident points).  There are infinitely many geodesics which
- *   can be generated by setting [<i>azi1</i>, <i>azi2</i>] →
+ *   <i>s12</i> = 0 (coincident points).  There are infinitely many geodesics
+ *   which can be generated by setting [<i>azi1</i>, <i>azi2</i>] →
  *   [<i>azi1</i>, <i>azi2</i>] + [<i>d</i>, <i>d</i>], for arbitrary <i>d</i>.
  * </ul>
  * <p>
@@ -170,7 +170,7 @@ package net.sf.geographiclib;
  *   <a href="https://doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43–55 (2013)
- *   (<a href="http://geographiclib.sourceforge.net/geod-addenda.html">addenda</a>).
+ *   (<a href="https://geographiclib.sourceforge.io/geod-addenda.html">addenda</a>).
  * </ul>
  * <p>
  * Example of use:
@@ -301,7 +301,7 @@ public class Geodesic {
    * <p>
    * <i>lat1</i> should be in the range [−90°, 90°].  The values
    * of <i>lon2</i> and <i>azi2</i> returned are in the range [−180°,
-   * 180°).
+   * 180°].
    * <p>
    * If either point is at a pole, the azimuth is defined by keeping the
    * longitude fixed, writing <i>lat</i> = ±(90° − ε),
@@ -331,7 +331,7 @@ public class Geodesic {
    * <p>
    * <i>lat1</i>, <i>lon1</i>, <i>azi1</i>, <i>s12</i>, and <i>a12</i> are
    * always included in the returned result.  The value of <i>lon2</i> returned
-   * is in the range [−180°, 180°), unless the <i>outmask</i>
+   * is in the range [−180°, 180°], unless the <i>outmask</i>
    * includes the {@link GeodesicMask#LONG_UNROLL} flag.
    **********************************************************************/
   public GeodesicData Direct(double lat1, double lon1,
@@ -354,7 +354,7 @@ public class Geodesic {
    * <p>
    * <i>lat1</i> should be in the range [−90°, 90°].  The values
    * of <i>lon2</i> and <i>azi2</i> returned are in the range [−180°,
-   * 180°).
+   * 180°].
    * <p>
    * If either point is at a pole, the azimuth is defined by keeping the
    * longitude fixed, writing <i>lat</i> = ±(90° − ε),
@@ -385,7 +385,7 @@ public class Geodesic {
    * <p>
    * <i>lat1</i>, <i>lon1</i>, <i>azi1</i>, and <i>a12</i> are always included
    * in the returned result.  The value of <i>lon2</i> returned is in the range
-   * [−180°, 180°), unless the <i>outmask</i> includes the {@link
+   * [−180°, 180°], unless the <i>outmask</i> includes the {@link
    * GeodesicMask#LONG_UNROLL} flag.
    **********************************************************************/
   public GeodesicData ArcDirect(double lat1, double lon1,
@@ -439,7 +439,7 @@ public class Geodesic {
    *   <i>lon1</i> is unchanged and <i>lon2</i> − <i>lon1</i> indicates
    *   how many times and in what sense the geodesic encircles the ellipsoid.
    *   Otherwise <i>lon1</i> and <i>lon2</i> are both reduced to the range
-   *   [−180°, 180°).
+   *   [−180°, 180°].
    * </ul>
    * <p>
    * The function value <i>a12</i> is always computed and returned and this
@@ -600,7 +600,7 @@ public class Geodesic {
    * <p>
    * <i>lat1</i> and <i>lat2</i> should be in the range [−90°,
    * 90°].  The values of <i>azi1</i> and <i>azi2</i> returned are in the
-   * range [−180°, 180°).
+   * range [−180°, 180°].
    * <p>
    * If either point is at a pole, the azimuth is defined by keeping the
    * longitude fixed, writing <i>lat</i> = ±(90° − ε),
@@ -1036,7 +1036,7 @@ public class Geodesic {
    *   <i>lon1</i> is unchanged and <i>lon2</i> − <i>lon1</i> indicates
    *   whether the geodesic is east going or west going.  Otherwise <i>lon1</i>
    *   and <i>lon2</i> are both reduced to the range [−180°,
-   *   180°).
+   *   180°].
    * </ul>
    * <p>
    * <i>lat1</i>, <i>lon1</i>, <i>lat2</i>, <i>lon2</i>, and <i>a12</i> are
diff --git a/java/src/main/java/net/sf/geographiclib/GeodesicData.java b/java/src/main/java/net/sf/geographiclib/GeodesicData.java
index 1a667a5..0f07946 100644
--- a/java/src/main/java/net/sf/geographiclib/GeodesicData.java
+++ b/java/src/main/java/net/sf/geographiclib/GeodesicData.java
@@ -3,7 +3,7 @@
  *
  * Copyright (c) Charles Karney (2013) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
diff --git a/java/src/main/java/net/sf/geographiclib/GeodesicLine.java b/java/src/main/java/net/sf/geographiclib/GeodesicLine.java
index a81fb7c..757b5f5 100644
--- a/java/src/main/java/net/sf/geographiclib/GeodesicLine.java
+++ b/java/src/main/java/net/sf/geographiclib/GeodesicLine.java
@@ -1,9 +1,9 @@
 /**
  * Implementation of the net.sf.geographiclib.GeodesicLine class
  *
- * Copyright (c) Charles Karney (2013-2016) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2013-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
@@ -46,7 +46,7 @@ package net.sf.geographiclib;
  *   <a href="https://doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43–55 (2013)
- *   (<a href="http://geographiclib.sourceforge.net/geod-addenda.html">addenda</a>).
+ *   (<a href="https://geographiclib.sourceforge.io/geod-addenda.html">addenda</a>).
  * </ul>
  * <p>
  * Here's an example of using this class
@@ -303,7 +303,7 @@ public class GeodesicLine {
    *   missing if the GeodesicLine did not include the relevant capability.
    * <p>
    * The values of <i>lon2</i> and <i>azi2</i> returned are in the range
-   * [−180°, 180°).
+   * [−180°, 180°].
    * <p>
    * The GeodesicLine object <i>must</i> have been constructed with <i>caps</i>
    * |= {@link GeodesicMask#DISTANCE_IN}; otherwise no parameters are set.
@@ -325,7 +325,7 @@ public class GeodesicLine {
    * |= {@link GeodesicMask#DISTANCE_IN}; otherwise no parameters are set.
    * Requesting a value which the GeodesicLine object is not capable of
    * computing is not an error (no parameters will be set).  The value of
-   * <i>lon2</i> returned is normally in the range [−180°, 180°);
+   * <i>lon2</i> returned is normally in the range [−180°, 180°];
    * however if the <i>outmask</i> includes the
    * {@link GeodesicMask#LONG_UNROLL} flag, the longitude is "unrolled" so that
    * the quantity <i>lon2</i> − <i>lon1</i> indicates how many times and
@@ -347,7 +347,7 @@ public class GeodesicLine {
    *   missing if the GeodesicLine did not include the relevant capability.
    * <p>
    * The values of <i>lon2</i> and <i>azi2</i> returned are in the range
-   * [−180°, 180°).
+   * [−180°, 180°].
    * <p>
    * The GeodesicLine object <i>must</i> have been constructed with <i>caps</i>
    * |= {@link GeodesicMask#DISTANCE_IN}; otherwise no parameters are set.
@@ -368,7 +368,7 @@ public class GeodesicLine {
    * <p>
    * Requesting a value which the GeodesicLine object is not capable of
    * computing is not an error (no parameters will be set).  The value of
-   * <i>lon2</i> returned is in the range [−180°, 180°), unless
+   * <i>lon2</i> returned is in the range [−180°, 180°], unless
    * the <i>outmask</i> includes the {@link GeodesicMask#LONG_UNROLL} flag.
    **********************************************************************/
   public GeodesicData ArcPosition(double a12, int outmask) {
@@ -414,7 +414,7 @@ public class GeodesicLine {
    *   <i>outmask</i> |= {@link GeodesicMask#ALL} for all of the above;
    * <li>
    *   <i>outmask</i> |= {@link GeodesicMask#LONG_UNROLL} to unroll <i>lon2</i>
-   *   (instead of reducing it to the range [−180°, 180°)).
+   *   (instead of reducing it to the range [−180°, 180°]).
    * </ul>
    * <p>
    * Requesting a value which the GeodesicLine object is not capable of
diff --git a/java/src/main/java/net/sf/geographiclib/GeodesicMask.java b/java/src/main/java/net/sf/geographiclib/GeodesicMask.java
index 7329c09..fff888e 100644
--- a/java/src/main/java/net/sf/geographiclib/GeodesicMask.java
+++ b/java/src/main/java/net/sf/geographiclib/GeodesicMask.java
@@ -3,7 +3,7 @@
  *
  * Copyright (c) Charles Karney (2013-2014) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
diff --git a/java/src/main/java/net/sf/geographiclib/GeographicErr.java b/java/src/main/java/net/sf/geographiclib/GeographicErr.java
index d437a00..106974d 100644
--- a/java/src/main/java/net/sf/geographiclib/GeographicErr.java
+++ b/java/src/main/java/net/sf/geographiclib/GeographicErr.java
@@ -3,7 +3,7 @@
  *
  * Copyright (c) Charles Karney (2013) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
diff --git a/java/src/main/java/net/sf/geographiclib/Gnomonic.java b/java/src/main/java/net/sf/geographiclib/Gnomonic.java
index 9335008..d3b1f8d 100644
--- a/java/src/main/java/net/sf/geographiclib/Gnomonic.java
+++ b/java/src/main/java/net/sf/geographiclib/Gnomonic.java
@@ -1,9 +1,9 @@
 /**
  * Implementation of the net.sf.geographiclib.Gnomonic class
  *
- * Copyright (c) BMW Car IT GmbH (2014-2016) <sebastian.mattheis at bmw-carit.de>
+ * Copyright (c) BMW Car IT GmbH (2014-2017) <sebastian.mattheis at bmw-carit.de>
  * and licensed under the MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
@@ -19,11 +19,11 @@ package net.sf.geographiclib;
  * ellipsoid. This projection is derived in Section 8 of
  * <ul>
  * <li>
- * C. F. F. Karney, <a href="http://doi.org/10.1007/s00190-012-0578-z">
+ * C. F. F. Karney, <a href="https://doi.org/10.1007/s00190-012-0578-z">
  * Algorithms for geodesics</a>, J. Geodesy <b>87</b>, 43–55 (2013);
- * DOI: <a href="http://doi.org/10.1007/s00190-012-0578-z">
+ * DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
  * 10.1007/s00190-012-0578-z</a>; addenda:
- * <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+ * <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
  * geod-addenda.html</a>.
  * </li>
  * </ul>
@@ -202,7 +202,7 @@ public class Gnomonic {
    * <i>lat0</i> should be in the range [−90°, 90°] and
    * <i>lon0</i> should be in the range [−540°, 540°).
    * <i>lat</i> will be in the range [−90°, 90°] and <i>lon</i>
-   * will be in the range [−180°, 180°). The scale of the
+   * will be in the range [−180°, 180°]. The scale of the
    * projection is 1/<i>rk<sup>2</sup></i> in the "radial" direction,
    * <i>azi</i> clockwise from true north, and is 1/<i>rk</i> in the direction
    * perpendicular to this. Even though all inputs should return a valid
diff --git a/java/src/main/java/net/sf/geographiclib/GnomonicData.java b/java/src/main/java/net/sf/geographiclib/GnomonicData.java
index d2bf22a..70a0c8f 100644
--- a/java/src/main/java/net/sf/geographiclib/GnomonicData.java
+++ b/java/src/main/java/net/sf/geographiclib/GnomonicData.java
@@ -3,7 +3,7 @@
  *
  * Copyright (c) BMW Car IT GmbH (2014-2016) <sebastian.mattheis at bmw-carit.de>
  * and licensed under the MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
diff --git a/java/src/main/java/net/sf/geographiclib/Pair.java b/java/src/main/java/net/sf/geographiclib/Pair.java
index 1e1140b..76accde 100644
--- a/java/src/main/java/net/sf/geographiclib/Pair.java
+++ b/java/src/main/java/net/sf/geographiclib/Pair.java
@@ -3,7 +3,7 @@
  *
  * Copyright (c) Charles Karney (2013) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
diff --git a/java/src/main/java/net/sf/geographiclib/PolygonArea.java b/java/src/main/java/net/sf/geographiclib/PolygonArea.java
index 3376d04..8e5c0ec 100644
--- a/java/src/main/java/net/sf/geographiclib/PolygonArea.java
+++ b/java/src/main/java/net/sf/geographiclib/PolygonArea.java
@@ -1,9 +1,9 @@
 /**
  * Implementation of the net.sf.geographiclib.PolygonArea class
  *
- * Copyright (c) Charles Karney (2013-2016) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2013-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
@@ -18,7 +18,7 @@ package net.sf.geographiclib;
  *   <a href="https://doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43–55 (2013)
- *   (<a href="http://geographiclib.sourceforge.net/geod-addenda.html">addenda</a>).
+ *   (<a href="https://geographiclib.sourceforge.io/geod-addenda.html">addenda</a>).
  * </ul>
  * <p>
  * This class lets you add vertices one at a time to the polygon.  The area
@@ -74,8 +74,8 @@ public class PolygonArea {
     lon2 = GeoMath.AngNormalize(lon2);
     double lon12 = GeoMath.AngDiff(lon1, lon2).first;
     int cross =
-      lon1 < 0 && lon2 >= 0 && lon12 > 0 ? 1 :
-      (lon2 < 0 && lon1 >= 0 && lon12 < 0 ? -1 : 0);
+      lon1 <= 0 && lon2 > 0 && lon12 > 0 ? 1 :
+      (lon2 <= 0 && lon1 > 0 && lon12 < 0 ? -1 : 0);
     return cross;
   }
   // an alternate version of transit to deal with longitudes in the direct
@@ -383,7 +383,7 @@ public class PolygonArea {
    * @return Pair(<i>lat</i>, <i>lon</i>), the current latitude and longitude.
    * <p>
    * If no points have been added, then Double.NaN is returned.  Otherwise,
-   * <i>lon</i> will be in the range [−180°, 180°).
+   * <i>lon</i> will be in the range [−180°, 180°].
    **********************************************************************/
   public Pair CurrentPoint() { return new Pair(_lat1, _lon1); }
 }
diff --git a/java/src/main/java/net/sf/geographiclib/PolygonResult.java b/java/src/main/java/net/sf/geographiclib/PolygonResult.java
index fdbb7ef..54057a4 100644
--- a/java/src/main/java/net/sf/geographiclib/PolygonResult.java
+++ b/java/src/main/java/net/sf/geographiclib/PolygonResult.java
@@ -3,7 +3,7 @@
  *
  * Copyright (c) Charles Karney (2013) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 package net.sf.geographiclib;
 
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 eeb47e8..db1909f 100644
--- a/java/src/main/java/net/sf/geographiclib/package-info.java
+++ b/java/src/main/java/net/sf/geographiclib/package-info.java
@@ -1,22 +1,22 @@
 /**
  * <h1>Geodesic routines from GeographicLib implemented in Java</h1>
  * @author Charles F. F. Karney (charles at karney.com)
- * @version 1.47
+ * @version 1.48
  *
  * <p>
  * The documentation for other versions is available at
- * <tt>http://geographiclib.sourceforge.net/m.nn/java</tt> for versions numbers
+ * <tt>https://geographiclib.sourceforge.io/m.nn/java</tt> for versions numbers
  * <tt>m.nn</tt> ≥ 1.31.
  * <p>
  * Licensed under the
  * <a href="http://www.opensource.org/licenses/MIT">MIT/X11 License</a>; see
- * <a href="http://geographiclib.sourceforge.net/html/LICENSE.txt">
+ * <a href="https://geographiclib.sourceforge.io/html/LICENSE.txt">
  * LICENSE.txt</a>.
  *
  * <h2>Abstract</h2>
  * <p>
  * GeographicLib-Java is a Java implementation of the geodesic algorithms from
- * <a href="http://geographiclib.sourceforge.net">GeographicLib</a>.  This is a
+ * <a href="https://geographiclib.sourceforge.io">GeographicLib</a>.  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.2
  * or later.
@@ -29,15 +29,15 @@
  * GeographicLib-Java is part of GeographicLib which available for download at
  * <ul>
  * <li>
- *   <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.47.tar.gz">
- *   GeographicLib-1.47.tar.gz</a>
+ *   <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.48.tar.gz">
+ *   GeographicLib-1.48.tar.gz</a>
  * <li>
- *   <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.47.zip">
- *   GeographicLib-1.47.zip</a>
+ *   <a href="https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.48.zip">
+ *   GeographicLib-1.48.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.47/java.  (This
+ * the source, the Java library can be found in GeographicLib-1.48/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.
@@ -50,7 +50,7 @@
  *   <dependency>
  *     <groupId>net.sf.geographiclib</groupId>
  *     <artifactId>GeographicLib-Java</artifactId>
- *     <version>1.47</version>
+ *     <version>1.48</version>
  *   </dependency> }</pre>
  * in your {@code pom.xml}.
  *
@@ -119,9 +119,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-Java-1.47.jar Inverse.java
+ * javac -cp .:../../../../target/GeographicLib-Java-1.48.jar Inverse.java
  * echo -30 0 29.5 179.5 |
- *   java -cp .:../../../../target/GeographicLib-Java-1.47.jar Inverse </pre>
+ *   java -cp .:../../../../target/GeographicLib-Java-1.48.jar Inverse </pre>
  *
  * <h3>Using maven to build and run {@code Inverse.java}</h3>
  * The sample code includes a {@code pom.xml} which specifies
@@ -174,8 +174,8 @@
  * The documentation is generated using javadoc when
  * {@code mvn package -P release} is run (the top of the documentation tree is
  * {@code target/apidocs/index.html}).  This is also available on the web at
- * <a href="http://geographiclib.sourceforge.net/html/java/index.html">
- * http://geographiclib.sourceforge.net/html/java/index.html</a>.
+ * <a href="https://geographiclib.sourceforge.io/html/java/index.html">
+ * https://geographiclib.sourceforge.io/html/java/index.html</a>.
  *
  * <h2>External links</h2>
  * <ul>
@@ -184,59 +184,59 @@
  *   <a href="https://doi.org/10.1007/s00190-012-0578-z">
  *   Algorithms for geodesics</a>,
  *   J. Geodesy <b>87</b>, 43–55 (2013)
- *   (<a href="http://geographiclib.sourceforge.net/geod-addenda.html">addenda</a>).
+ *   (<a href="https://geographiclib.sourceforge.io/geod-addenda.html">addenda</a>).
  * <li>
  *   A longer paper on geodesics: C. F. F. Karney,
  *    <a href="https://arxiv.org/abs/1102.1215v1">Geodesics
  *    on an ellipsoid of revolution</a>,
  *    Feb. 2011
- *    (<a href="http://geographiclib.sourceforge.net/geod-addenda.html#geod-errata">
+ *    (<a href="https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata">
  *    errata</a>).
  * <li>
- *   <a href="http://geographiclib.sourceforge.net">
+ *   <a href="https://geographiclib.sourceforge.io">
  *   The GeographicLib web site</a>.
  * <li>
  *   <a href="https://sourceforge.net/projects/geographiclib/">
  *     Main project page</a>
  * <li>
- *   <a href="http://sourceforge.net/p/geographiclib/code/ci/release/tree/">
+ *   <a href="https://sourceforge.net/p/geographiclib/code/ci/release/tree/">
  *     git repository</a>
  * <li>
  *   Implementations in various languages:
  *   <ul>
  *     <li>
  *       C++ (complete library):
- *       <a href="http://geographiclib.sourceforge.net/html/">
+ *       <a href="https://geographiclib.sourceforge.io/html/">
  *         documentation</a>,
  *       <a href="https://sourceforge.net/projects/geographiclib/files/distrib">
  *         download</a>
  *     <li>
  *       C (geodesic routines):
- *       <a href="http://geographiclib.sourceforge.net/html/C/">
+ *       <a href="https://geographiclib.sourceforge.io/html/C/">
  *         documentation</a>, also included with recent versions of
  *       <a href="https://github.com/OSGeo/proj.4/wiki">
  *         proj.4</a>
  *     <li>
  *       Fortran (geodesic routines):
- *       <a href="http://geographiclib.sourceforge.net/html/Fortran/">
+ *       <a href="https://geographiclib.sourceforge.io/html/Fortran/">
  *         documentation</a>
  *     <li>
  *       Java (geodesic routines):
  *       <a href="http://repo1.maven.org/maven2/net/sf/geographiclib/GeographicLib-Java/">
  *         Maven Central package</a>,
- *       <a href="http://geographiclib.sourceforge.net/html/java/">
+ *       <a href="https://geographiclib.sourceforge.io/html/java/">
  *         documentation</a>
  *     <li>
  *       JavaScript (geodesic routines):
  *       <a href="https://www.npmjs.com/package/geographiclib">
  *         npm package</a>,
- *       <a href="http://geographiclib.sourceforge.net/html/js/">
+ *       <a href="https://geographiclib.sourceforge.io/html/js/">
  *         documentation</a>
  *     <li>
  *       Python (geodesic routines):
  *       <a href="http://pypi.python.org/pypi/geographiclib">
  *         PyPI package</a>,
- *       <a href="http://geographiclib.sourceforge.net/html/python/">
+ *       <a href="https://geographiclib.sourceforge.io/html/python/">
  *         documentation</a>
  *     <li>
  *       Matlab/Octave (geodesic and some other routines):
@@ -246,15 +246,15 @@
  *         documentation</a>
  *     <li>
  *       C# (.NET wrapper for complete C++ library):
- *       <a href="http://geographiclib.sourceforge.net/html/NET/">
+ *       <a href="https://geographiclib.sourceforge.io/html/NET/">
  *         documentation</a>.
  *   </ul>
  * <li>
  *   The section in the GeographicLib documentation on geodesics:
- *   <a href="http://geographiclib.sourceforge.net/html/geodesic.html">
+ *   <a href="https://geographiclib.sourceforge.io/html/geodesic.html">
  *   Geodesics on an ellipsoid of revolution</a>
  * <li>
- *   <a href="http://geographiclib.sourceforge.net/geodesic-papers/biblio.html">
+ *   <a href="https://geographiclib.sourceforge.io/geodesic-papers/biblio.html">
  *   A geodesic bibliography</a>
  * <li>
  *   The wikipedia page,
@@ -265,7 +265,15 @@
  * <h2>Change log</h2>
  * <ul>
  * <li>
- *   <a href="http://geographiclib.sourceforge.net/1.47/java">Version 1.47</a>
+ *   <a href="https://geographiclib.sourceforge.io/1.47/java">Version 1.48</a>
+ *   (released 2017-04-09)
+ * <ul>
+ * <li>
+ *   Change default range for longitude and azimuth to
+ *   (−180°, 180°] (instead of [−180°, 180°)).
+ * </ul>
+ * <li>
+ *   <a href="https://geographiclib.sourceforge.io/1.47/java">Version 1.47</a>
  *   (released 2017-02-15)
  * <ul>
  * <li>
@@ -273,7 +281,7 @@
  *   version 1.46).
  * </ul>
  * <li>
- *   <a href="http://geographiclib.sourceforge.net/1.46/java">Version 1.46</a>
+ *   <a href="https://geographiclib.sourceforge.io/1.46/java">Version 1.46</a>
  *   (released 2016-02-15)
  * <ul>
  * <li>
@@ -292,7 +300,7 @@
  *   GeoMath.AngDiff now returns a Pair.
  * </ul>
  * <li>
- *   <a href="http://geographiclib.sourceforge.net/1.45/java">Version 1.45</a>
+ *   <a href="https://geographiclib.sourceforge.io/1.45/java">Version 1.45</a>
  *   (released 2015-09-30)
  * <ul>
  * <li>
@@ -307,7 +315,7 @@
  *   1998-12).
  * </ul>
  * <li>
- *   <a href="http://geographiclib.sourceforge.net/1.44/java">Version 1.44</a>
+ *   <a href="https://geographiclib.sourceforge.io/1.44/java">Version 1.44</a>
  *   (released 2015-08-14)
  * <ul>
  * <li>
diff --git a/java/src/test/java/net/sf/geographiclib/GeodesicTest.java b/java/src/test/java/net/sf/geographiclib/GeodesicTest.java
index 0ca0c9b..bdaefde 100644
--- a/java/src/test/java/net/sf/geographiclib/GeodesicTest.java
+++ b/java/src/test/java/net/sf/geographiclib/GeodesicTest.java
@@ -225,7 +225,7 @@ public class GeodesicTest {
     assertEquals(dir.lat2, 90, 0.5e-5);
     if (dir.lon2 < 0) {
       assertEquals(dir.lon2, -150, 0.5e-5);
-      assertEquals(dir.azi2, -180, 0.5e-5);
+      assertEquals(Math.abs(dir.azi2), 180, 0.5e-5);
     } else {
       assertEquals(dir.lon2, 30, 0.5e-5);
       assertEquals(dir.azi2, 0, 0.5e-5);
@@ -378,11 +378,11 @@ public class GeodesicTest {
     assertEquals(inv.s12, 19980862, 0.5);
     inv = Geodesic.WGS84.Inverse(0, 0, 0, 180);
     assertEquals(inv.azi1, 0.00000, 0.5e-5);
-    assertEquals(inv.azi2, -180.00000, 0.5e-5);
+    assertEquals(Math.abs(inv.azi2), 180.00000, 0.5e-5);
     assertEquals(inv.s12, 20003931, 0.5);
     inv = Geodesic.WGS84.Inverse(0, 0, 1, 180);
     assertEquals(inv.azi1, 0.00000, 0.5e-5);
-    assertEquals(inv.azi2, -180.00000, 0.5e-5);
+    assertEquals(Math.abs(inv.azi2), 180.00000, 0.5e-5);
     assertEquals(inv.s12, 19893357, 0.5);
     Geodesic geod = new Geodesic(6.4e6, 0);
     inv = geod.Inverse(0, 0, 0, 179);
@@ -391,11 +391,11 @@ public class GeodesicTest {
     assertEquals(inv.s12, 19994492, 0.5);
     inv = geod.Inverse(0, 0, 0, 180);
     assertEquals(inv.azi1, 0.00000, 0.5e-5);
-    assertEquals(inv.azi2, -180.00000, 0.5e-5);
+    assertEquals(Math.abs(inv.azi2), 180.00000, 0.5e-5);
     assertEquals(inv.s12, 20106193, 0.5);
     inv = geod.Inverse(0, 0, 1, 180);
     assertEquals(inv.azi1, 0.00000, 0.5e-5);
-    assertEquals(inv.azi2, -180.00000, 0.5e-5);
+    assertEquals(Math.abs(inv.azi2), 180.00000, 0.5e-5);
     assertEquals(inv.s12, 19994492, 0.5);
     geod = new Geodesic(6.4e6, -1/300.0);
     inv = geod.Inverse(0, 0, 0, 179);
@@ -412,7 +412,7 @@ public class GeodesicTest {
     assertEquals(inv.s12, 20082617, 0.5);
     inv = geod.Inverse(0, 0, 1, 180);
     assertEquals(inv.azi1, 0.00000, 0.5e-5);
-    assertEquals(inv.azi2, -180.00000, 0.5e-5);
+    assertEquals(Math.abs(inv.azi2), 180.00000, 0.5e-5);
     assertEquals(inv.s12, 20027270, 0.5);
   }
 
@@ -447,13 +447,13 @@ public class GeodesicTest {
                             GeodesicMask.STANDARD | GeodesicMask.LONG_UNROLL);
     assertEquals(dir.lat2, 45.30632, 0.5e-5);
     assertEquals(dir.lon2, -180, 0.5e-5);
-    assertEquals(dir.azi2, -180, 0.5e-5);
+    assertEquals(Math.abs(dir.azi2), 180, 0.5e-5);
     GeodesicLine line = Geodesic.WGS84.InverseLine(45, 0, 80,
                                                    -0.000000000000000003);
-    dir = line.Position(1e7);
+    dir = line.Position(1e7, GeodesicMask.STANDARD | GeodesicMask.LONG_UNROLL);
     assertEquals(dir.lat2, 45.30632, 0.5e-5);
     assertEquals(dir.lon2, -180, 0.5e-5);
-    assertEquals(dir.azi2, -180, 0.5e-5);
+    assertEquals(Math.abs(dir.azi2), 180, 0.5e-5);
   }
 
   @Test
@@ -467,10 +467,10 @@ public class GeodesicTest {
       line.Position(1e7, GeodesicMask.ALL | GeodesicMask.LONG_UNROLL);
     assertEquals(dir.lat1, 30.00000  , 0.5e-5);
     assertEquals(dir.lon1, -0.00000  , 0.5e-5);
-    assertEquals(dir.azi1, -180.00000, 0.5e-5);
+    assertEquals(Math.abs(dir.azi1), 180.00000, 0.5e-5);
     assertEquals(dir.lat2, -60.23169 , 0.5e-5);
     assertEquals(dir.lon2, -0.00000  , 0.5e-5);
-    assertEquals(dir.azi2, -180.00000, 0.5e-5);
+    assertEquals(Math.abs(dir.azi2), 180.00000, 0.5e-5);
     assertEquals(dir.s12 , 10000000  , 0.5);
     assertEquals(dir.a12 , 90.06544  , 0.5e-5);
     assertEquals(dir.m12 , 6363636   , 0.5);
@@ -480,7 +480,7 @@ public class GeodesicTest {
     dir = line.Position(2e7, GeodesicMask.ALL | GeodesicMask.LONG_UNROLL);
     assertEquals(dir.lat1, 30.00000  , 0.5e-5);
     assertEquals(dir.lon1, -0.00000  , 0.5e-5);
-    assertEquals(dir.azi1, -180.00000, 0.5e-5);
+    assertEquals(Math.abs(dir.azi1), 180.00000, 0.5e-5);
     assertEquals(dir.lat2, -30.03547 , 0.5e-5);
     assertEquals(dir.lon2, -180.00000, 0.5e-5);
     assertEquals(dir.azi2, -0.00000  , 0.5e-5);
diff --git a/js/GeographicLib.md b/js/GeographicLib.md
index a0eee0d..bf63bac 100644
--- a/js/GeographicLib.md
+++ b/js/GeographicLib.md
@@ -1,18 +1,18 @@
 ## Geodesic routines from GeographicLib
 
-This documentation applies to version 1.47.
+This documentation applies to version 1.48.
 
 The documentation for other versions is available
-at <tt>http://geographiclib.sourceforge.net/m.nn/js</tt> for versions
+at <tt>https://geographiclib.sourceforge.io/m.nn/js</tt> for versions
 numbers <tt>m.nn</tt> ≥ 1.45.
 
 Licensed under the MIT/X11 License; see
-[LICENSE.txt](http://geographiclib.sourceforge.net/html/LICENSE.txt).
+[LICENSE.txt](https://geographiclib.sourceforge.io/html/LICENSE.txt).
 
 ### Installation
 
 This library is a JavaScript implementation of the geodesic routines
-from [GeographicLib](http://geographiclib.sourceforge.net).  This solves the
+from [GeographicLib](https://geographiclib.sourceforge.io).  This solves the
 direct and inverse geodesic problems for an ellipsoid of revolution.
 
 The library can be used in [node](https://nodejs.org) by first
@@ -34,7 +34,7 @@ Alternatively, you can use it in client-side JavaScript, by including in
 your HTML page
 ```html
 <script type="text/javascript"
-        src="http://geographiclib.sourceforge.net/scripts/geographiclib.js">
+        src="https://geographiclib.sourceforge.io/scripts/geographiclib.js">
 </script>
 ```
 Both of these prescriptions define a {@link GeographicLib} namespace.
@@ -58,9 +58,9 @@ console.log("The position is (" +
 // This prints "The position is (32.11195529, -63.95925278)."
 ```
 Two examples of this library in use are
-* [A geodesic calculator](http://geographiclib.sourceforge.net/scripts/geod-calc.html)
+* [A geodesic calculator](https://geographiclib.sourceforge.io/scripts/geod-calc.html)
 * [Displaying geodesics on Google
-  Maps](http://geographiclib.sourceforge.net/scripts/geod-google.html)
+  Maps](https://geographiclib.sourceforge.io/scripts/geod-google.html)
 
 ### More information
 * {@tutorial 1-geodesics}
@@ -68,35 +68,35 @@ Two examples of this library in use are
 * {@tutorial 3-examples}
 
 ### Implementations in various languages
-* {@link http://sourceforge.net/p/geographiclib/code/ci/release/tree/
+* {@link https://sourceforge.net/p/geographiclib/code/ci/release/tree/
     git repository}
 * C++ (complete library):
-  {@link http://geographiclib.sourceforge.net/html/index.html
+  {@link https://geographiclib.sourceforge.io/html/index.html
     documentation},
   {@link https://sourceforge.net/projects/geographiclib/files/distrib
     download};
 * C (geodesic routines):
-  {@link http://geographiclib.sourceforge.net/html/C/index.html
+  {@link https://geographiclib.sourceforge.io/html/C/index.html
     documentation}, also included with recent versions of
   {@link https://github.com/OSGeo/proj.4/wiki
     proj.4};
 * Fortran (geodesic routines):
-  {@link http://geographiclib.sourceforge.net/html/Fortran/index.html
+  {@link https://geographiclib.sourceforge.io/html/Fortran/index.html
     documentation};
 * Java (geodesic routines):
   {@link http://repo1.maven.org/maven2/net/sf/geographiclib/GeographicLib-Java/
     Maven Central package},
-  {@link http://geographiclib.sourceforge.net/html/java/index.html
+  {@link https://geographiclib.sourceforge.io/html/java/index.html
     documentation};
 * JavaScript (geodesic routines):
   {@link https://www.npmjs.com/package/geographiclib
     npm package},
-  {@link http://geographiclib.sourceforge.net/html/js/index.html
+  {@link https://geographiclib.sourceforge.io/html/js/index.html
     documentation};
 * Python (geodesic routines):
   {@link http://pypi.python.org/pypi/geographiclib
     PyPI package},
-  {@link http://geographiclib.sourceforge.net/html/python/index.html
+  {@link https://geographiclib.sourceforge.io/html/python/index.html
     documentation};
 * Matlab/Octave (geodesic and some other routines):
   {@link http://www.mathworks.com/matlabcentral/fileexchange/50605
@@ -104,11 +104,15 @@ Two examples of this library in use are
   {@link http://www.mathworks.com/matlabcentral/fileexchange/50605/content/Contents.m
     documentation};
 * C# (.NET wrapper for complete C++ library):
-  {@link http://geographiclib.sourceforge.net/html/NET/index.html
+  {@link https://geographiclib.sourceforge.io/html/NET/index.html
     documentation}.
 
 ### Change log
 
+* Version 1.48 (released 2017-04-09)
+  * Change default range for longitude and azimuth to
+    (−180°, 180°] (instead of [−180°, 180°)).
+
 * Version 1.47 (released 2017-02-15)
   * Improve accuracy of area calculation (fixing a flaw introduced in
     version 1.46).
diff --git a/js/HEADER.js b/js/HEADER.js
index a9ee1be..880dfeb 100644
--- a/js/HEADER.js
+++ b/js/HEADER.js
@@ -1,20 +1,20 @@
 /*
  * Geodesic routines from GeographicLib translated to JavaScript.  See
- * http://geographiclib.sourceforge.net/html/js/
+ * https://geographiclib.sourceforge.io/html/js/
  *
  * The algorithms are derived in
  *
  *    Charles F. F. Karney,
  *    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
  *    https://doi.org/10.1007/s00190-012-0578-z
- *    Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+ *    Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
  *
  * This file is the concatenation and compression of the JavaScript files in
  * doc/scripts/GeographicLib in the source tree for GeographicLib.
  *
  * Copyright (c) Charles Karney (2011-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * Version: @JS_VERSION@
  * File inventory:
diff --git a/js/README.md b/js/README.md
index 7a56ede..0508085 100644
--- a/js/README.md
+++ b/js/README.md
@@ -1,11 +1,11 @@
 # Geodesic routines from GeographicLib
 
 This library is a JavaScript implementation of the geodesic routines
-from [GeographicLib](http://geographiclib.sourceforge.net).  This solves the
+from [GeographicLib](https://geographiclib.sourceforge.io).  This solves the
 direct and inverse geodesic problems for an ellipsoid of revolution.
 
 Licensed under the MIT/X11 License; see
-[LICENSE.txt](http://geographiclib.sourceforge.net/html/LICENSE.txt).
+[LICENSE.txt](https://geographiclib.sourceforge.io/html/LICENSE.txt).
 
 ## Installation
 
@@ -23,7 +23,7 @@ var GeographicLib = require("geographiclib");
 ## Documentation
 
 Full documentation is provided at
-[http://geographiclib.sourceforge.net/1.47/js/](http://geographiclib.sourceforge.net/1.47/js/).
+[https://geographiclib.sourceforge.io/1.48/js/](https://geographiclib.sourceforge.io/1.48/js/).
 
 ## Examples
 
diff --git a/js/doc/1-geodesics.md b/js/doc/1-geodesics.md
index 867caf0..dec41d0 100644
--- a/js/doc/1-geodesics.md
+++ b/js/doc/1-geodesics.md
@@ -22,7 +22,7 @@ azimuths α<sub>1</sub> and α<sub>2</sub> at the two end
 points.  In this figure, we have λ<sub>12</sub> =
 λ<sub>2</sub> − λ<sub>1</sub>.
 <center>
-<img src="http://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg" width="250">
+<img src="https://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg" width="250">
 </center>
 A geodesic can be extended indefinitely by requiring that any
 sufficiently small segment is a shortest path; geodesics are also the
@@ -158,14 +158,14 @@ Vincenty (1975) in the following respects:
 * C. F. F. Karney,
   {@link https://doi.org/10.1007/s00190-012-0578-z
   Algorithms for geodesics}, J. Geodesy **87**(1) 43–55 (2013);
-  {@link http://geographiclib.sourceforge.net/geod-addenda.html addenda}.
+  {@link https://geographiclib.sourceforge.io/geod-addenda.html addenda}.
 * C. F. F. Karney,
   {@https://arxiv.org/abs/1102.1215v1
   Geodesics on an ellipsoid of revolution},
   Feb. 2011;
-  {@link http://geographiclib.sourceforge.net/geod-addenda.html#geod-errata
+  {@link https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata
   errata}.
-* {@link http://geographiclib.sourceforge.net/geodesic-papers/biblio.html
+* {@link https://geographiclib.sourceforge.io/geodesic-papers/biblio.html
   A geodesic bibliography}.
 * The wikipedia page,
   {@link https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid
diff --git a/js/doc/2-interface.md b/js/doc/2-interface.md
index 6452d56..e0a009d 100644
--- a/js/doc/2-interface.md
+++ b/js/doc/2-interface.md
@@ -37,7 +37,7 @@ GeodesicLine.Position}, etc., return an object with
   (meters<sup>2</sup>)
 
 The input parameters together with *a12* are always included in the
-object.  Azimuths are reduced to the range [−180°, 180°).
+object.  Azimuths are reduced to the range [−180°, 180°].
 See {@tutorial 1-geodesics} for the definitions of these quantities.
 
 ### <a name="outmask"></a>The *outmask* and *caps* parameters
@@ -75,7 +75,7 @@ of the arc length.)  This only makes sense in the *caps* parameter.
 
 Geodesic.LONG_UNROLL controls the treatment of longitude.  If it is not
 set then the *lon1* and *lon2* fields are both reduced to the range
-[−180°, 180°).  If it is set, then *lon1* is as given in
+[−180°, 180°].  If it is set, then *lon1* is as given in
 the function call and (*lon2* − *lon1*) determines how many times
 and in what sense the geodesic has encircled the ellipsoid.  This only
 makes sense in the *outmask* parameter.
@@ -92,7 +92,7 @@ Note that *a12* is always included in the result.
   on the surface.
 * Similarly, the spherical arc length *a12* is unrestricted.
 * Longitudes and azimuths are unrestricted; internally these are exactly
-  reduced to the range [−180°, 180°); but see also the
+  reduced to the range [−180°, 180°]; but see also the
   LONG_UNROLL bit.
 * The equatorial radius *a* and the polar semi-axis *b* must both be
   positive and finite (this implies that −∞ < *f* < 1).
diff --git a/js/doc/3-examples.md b/js/doc/3-examples.md
index 70258c0..e0afbf1 100644
--- a/js/doc/3-examples.md
+++ b/js/doc/3-examples.md
@@ -51,18 +51,18 @@ redundant white space; this is appropriate for web applications.
 Load geographiclib.min.js with
 ```html
 <script type="text/javascript"
-        src="http://geographiclib.sourceforge.net/scripts/geographiclib.min.js">
+        src="https://geographiclib.sourceforge.io/scripts/geographiclib.min.js">
 </script>
 ```
 This uses the latest version.  If you want use a specific version, load
 with, for example,
 ```html
 <script type="text/javascript"
-        src="http://geographiclib.sourceforge.net/scripts/geographiclib-1.45.min.js">
+        src="https://geographiclib.sourceforge.io/scripts/geographiclib-1.45.min.js">
 </script>
 ```
 Browse
-[http://geographiclib.sourceforge.net/scripts](http://geographiclib.sourceforge.net/scripts)
+[https://geographiclib.sourceforge.io/scripts](https://geographiclib.sourceforge.io/scripts)
 to see what versions are available.
 
 #### Loading geographiclib.min.js with AMD
diff --git a/js/package.json b/js/package.json
index c59626a..0d64147 100644
--- a/js/package.json
+++ b/js/package.json
@@ -1,6 +1,6 @@
 {
   "name": "geographiclib",
-  "version": "1.47.0",
+  "version": "1.48.0",
   "description":
   "JavaScript implementation of geodesic routines in GeographicLib",
   "main": "geographiclib.js",
diff --git a/js/samples/geod-calc.html b/js/samples/geod-calc.html
index 0449bf5..0a567e0 100644
--- a/js/samples/geod-calc.html
+++ b/js/samples/geod-calc.html
@@ -24,10 +24,10 @@
 		   GeographicLib" />
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <!--
-	 Full URL for latest version of geographiclib.min.js is
-	 http://geographiclib.sourceforge.net/scripts/geographiclib.min.js
-	 URL for a specific version is, for example,
-	 http://geographiclib.sourceforge.net/scripts/geographiclib-1.45.min.js
+	Full URL for latest version of geographiclib.min.js is
+	https://geographiclib.sourceforge.io/scripts/geographiclib.min.js
+	URL for a specific version is, for example,
+	https://geographiclib.sourceforge.io/scripts/geographiclib-1.45.min.js
       -->
     <script type="text/javascript" src="geographiclib.min.js">
     </script>
@@ -231,7 +231,8 @@ function GeodesicArea(input, polyline) {
       JavaScript package
       <a href="https://www.npmjs.com/package/geographiclib">
 	geographiclib, the geodesic routines in GeographicLib</a>
-      (<a href="http://geographiclib.sourceforge.net/html/js/">documentation</a>).
+      (<a href="https://geographiclib.sourceforge.io/html/js/">
+	documentation</a>).
       The algorithms are considerably more accurate than Vincenty's
       method, and offer more functionality (an inverse method which
       never fails to converge, differential properties of the geodesic,
@@ -245,7 +246,8 @@ function GeodesicArea(input, polyline) {
 	<a href="https://doi.org/10.1007/s00190-012-0578-z">
 	  10.1007/s00190-012-0578-z</a>
 	(<a href="https://doi.org/10.1007/s00190-012-0578-z">pdf</a>);
-	addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+	addenda:
+	<a href="https://geographiclib.sourceforge.io/geod-addenda.html">
 	  geod-addenda.html</a>.
       </blockquote>
       This page just provides a basic interface.  Enter latitudes,
@@ -258,9 +260,11 @@ function GeodesicArea(input, polyline) {
       areas).  A slicker page where the geodesics are incorporated into
       Google Maps is given <a href="geod-google.html">here</a>.  Basic
       online tools which provide similar capabilities are
-      <a href="http://geographiclib.sourceforge.net/cgi-bin/GeodSolve">GeodSolve</a>
+      <a href="https://geographiclib.sourceforge.io/cgi-bin/GeodSolve">
+	GeodSolve</a>
       and
-      <a href="http://geographiclib.sourceforge.net/cgi-bin/Planimeter">Planimeter</a>;
+      <a href="https://geographiclib.sourceforge.io/cgi-bin/Planimeter">
+	Planimeter</a>;
       these call a C++ backend.  This page uses version
       <script type="text/javascript">
 	document.write(GeographicLib.Constants.version_string);
@@ -284,7 +288,7 @@ function GeodesicArea(input, polyline) {
 	Find the shortest path between two points on the earth.  The
 	path is characterized by its length <i>s12</i> and its azimuth
 	at the two ends <i>azi1</i> and <i>azi2</i>.  See
-	<a href="http://geographiclib.sourceforge.net/html/GeodSolve.1.html">
+	<a href="https://geographiclib.sourceforge.io/html/GeodSolve.1.html">
 	  GeodSolve(1)</a>
 	for the definition of the
 	quantities <i>a12</i>, <i>m12</i>, <i>M12</i>, <i>M21</i>,
@@ -373,7 +377,7 @@ function GeodesicArea(input, polyline) {
 	with a given azimuth at the starting point.  The destination is
 	characterized by its position <i>lat2, lon2</i> and its azimuth
 	at the destination <i>azi2</i>.  See
-	<a href="http://geographiclib.sourceforge.net/html/GeodSolve.1.html">
+	<a href="https://geographiclib.sourceforge.io/html/GeodSolve.1.html">
 	  GeodSolve(1)</a>
 	for the definition of the
 	quantities <i>a12</i>, <i>m12</i>, <i>M12</i>, <i>M21</i>,
@@ -583,6 +587,7 @@ function GeodesicArea(input, polyline) {
       <a href="mailto:charles at karney.com"><charles at karney.com></a>
       (2015-08-12)</address>
     <br>
-    <a href="http://geographiclib.sourceforge.net">Geographiclib Sourceforge</a>
+    <a href="https://geographiclib.sourceforge.io">
+      Geographiclib Sourceforge</a>
   </body>
 </html>
diff --git a/js/samples/geod-google-instructions.html b/js/samples/geod-google-instructions.html
index ee95a9d..5da0b26 100644
--- a/js/samples/geod-google-instructions.html
+++ b/js/samples/geod-google-instructions.html
@@ -84,9 +84,11 @@
       output and choose between decimal degrees and degrees, minutes,
       and seconds.  Basic online tools which provide similar capabilities
       are
-      <a href="http://geographiclib.sourceforge.net/cgi-bin/GeodSolve">GeodSolve</a>
+      <a href="https://geographiclib.sourceforge.io/cgi-bin/GeodSolve">
+	GeodSolve</a>
       and
-      <a href="http://geographiclib.sourceforge.net/cgi-bin/Planimeter">Planimeter</a>;
+      <a href="https://geographiclib.sourceforge.io/cgi-bin/Planimeter">
+	Planimeter</a>;
       these call a C++ backend.
     </p>
     <p>
@@ -94,7 +96,7 @@
       envelopes available in the JavaScript package
       <a href="https://www.npmjs.com/package/geographiclib">
 	geographiclib, the geodesic routines in GeographicLib</a>
-      (<a href="http://geographiclib.sourceforge.net/html/js/">
+      (<a href="https://geographiclib.sourceforge.io/html/js/">
 	documentation</a>).  The algorithms are derived in
       <blockquote>
 	Charles F. F. Karney,<br>
@@ -105,7 +107,8 @@
 	<a href="https://doi.org/10.1007/s00190-012-0578-z">
 	  10.1007/s00190-012-0578-z</a>
 	(<a href="https://doi.org/10.1007/s00190-012-0578-z">pdf</a>);<br>
-	addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+	addenda:
+	<a href="https://geographiclib.sourceforge.io/geod-addenda.html">
 	  geod-addenda.html</a>.
       </blockquote>
       In putting together this Google Maps demonstration, I started with
@@ -118,6 +121,7 @@
       <a href="mailto:charles at karney.com"><charles at karney.com></a>
       (2011-08-02)</address>
     <br>
-    <a href="http://geographiclib.sourceforge.net">Geographiclib Sourceforge</a>
+    <a href="https://geographiclib.sourceforge.io">
+      Geographiclib Sourceforge</a>
   </body>
 </html>
diff --git a/js/samples/geod-google.html b/js/samples/geod-google.html
index ca34daa..1df631e 100644
--- a/js/samples/geod-google.html
+++ b/js/samples/geod-google.html
@@ -32,15 +32,22 @@
       }
     </style>
     <!--
-	 Full URL for latest version of geographiclib.min.js is
-	 http://geographiclib.sourceforge.net/scripts/geographiclib.min.js
-	 URL for a specific version is, for example,
-	 http://geographiclib.sourceforge.net/scripts/geographiclib-1.45.min.js
+	Full URL for latest version of geographiclib.min.js is
+	https://geographiclib.sourceforge.io/scripts/geographiclib.min.js
+	URL for a specific version is, for example,
+	https://geographiclib.sourceforge.io/scripts/geographiclib-1.45.min.js
       -->
     <script type="text/javascript" src="geographiclib.min.js">
     </script>
+    <!--
+	This API key is restricted to geographiclib.sourceforge.io and
+	geographiclib.sourceforge.net.  If you want to deploy this
+	facility or one based on it on another computer, that you will
+	need to acquire your own API key from Google, see
+	https://developers.google.com/maps/documentation/javascript/get-api-key
+      -->
     <script type="text/javascript"
-	    src="https://maps.googleapis.com/maps/api/js?sensor=false">
+	    src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC5ITbit5GimGMxQLncpqetCn1QR-sbW_g">
     </script>
     <script type="text/javascript">
 "use strict";
diff --git a/js/src/DMS.js b/js/src/DMS.js
index 31f6b24..b1e0ebd 100644
--- a/js/src/DMS.js
+++ b/js/src/DMS.js
@@ -7,7 +7,7 @@
  *
  * Copyright (c) Charles Karney (2011-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  */
 
 GeographicLib.DMS = {};
@@ -61,7 +61,7 @@ GeographicLib.DMS = {};
    * @description The interpretation of the string is given in the
    *   documentation of the corresponding function, Decode(string&, flag&)
    *   in the {@link
-   *   http://geographiclib.sourceforge.net/html/classGeographicLib_1_1DMS.html
+   *   https://geographiclib.sourceforge.io/html/classGeographicLib_1_1DMS.html
    *   C++ DMS class}
    * @param {string} dms the string.
    * @returns {object} r where r.val is the decoded value (degrees) and r.ind
diff --git a/js/src/Geodesic.js b/js/src/Geodesic.js
index 85d9c51..c93ca26 100644
--- a/js/src/Geodesic.js
+++ b/js/src/Geodesic.js
@@ -10,11 +10,11 @@
  *    Charles F. F. Karney,
  *    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
  *    https://doi.org/10.1007/s00190-012-0578-z
- *    Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+ *    Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
  *
  * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  */
 
 // Load AFTER Math.js
diff --git a/js/src/GeodesicLine.js b/js/src/GeodesicLine.js
index c91aeb8..9fa4835 100644
--- a/js/src/GeodesicLine.js
+++ b/js/src/GeodesicLine.js
@@ -10,11 +10,11 @@
  *    Charles F. F. Karney,
  *    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
  *    https://doi.org/10.1007/s00190-012-0578-z
- *    Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+ *    Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
  *
  * Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  */
 
 // Load AFTER GeographicLib/Math.js, GeographicLib/Geodesic.js
diff --git a/js/src/Math.js b/js/src/Math.js
index eff90da..c41b137 100644
--- a/js/src/Math.js
+++ b/js/src/Math.js
@@ -3,9 +3,9 @@
  * Transcription of Math.hpp, Constants.hpp, and Accumulator.hpp into
  * JavaScript.
  *
- * Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  */
 
 /**
@@ -65,12 +65,12 @@ GeographicLib.Accumulator = {};
    * @property {number} minor the minor version number.
    * @property {number} patch the patch number.
    */
-  c.version = { major: 1, minor: 47, patch: 0 };
+  c.version = { major: 1, minor: 48, patch: 0 };
   /**
    * @constant
    * @summary version string
    */
-  c.version_string = "1.47";
+  c.version_string = "1.48";
 })(GeographicLib.Constants);
 
 (function(
@@ -221,13 +221,13 @@ GeographicLib.Accumulator = {};
   /**
    * @summary Normalize an angle.
    * @param {number} x the angle in degrees.
-   * @returns {number} the angle reduced to the range [−180°,
-   *   180°).
+   * @returns {number} the angle reduced to the range (−180°,
+   *   180°].
    */
   m.AngNormalize = function(x) {
     // Place angle in [-180, 180).
     x = x % 360;
-    return x < -180 ? x + 360 : (x < 180 ? x : x - 360);
+    return x <= -180 ? x + 360 : (x <= 180 ? x : x - 360);
   };
 
   /**
@@ -254,10 +254,10 @@ GeographicLib.Accumulator = {};
    */
   m.AngDiff = function(x, y) {
     // Compute y - x and reduce to [-180,180] accurately.
-    var r = m.sum(m.AngNormalize(x), m.AngNormalize(-y)),
-        d = -m.AngNormalize(r.s),
+    var r = m.sum(m.AngNormalize(-x), m.AngNormalize(y)),
+        d = m.AngNormalize(r.s),
         t = r.t;
-    return m.sum(d === 180 && t < 0 ? -180 : d, -t);
+    return m.sum(d === 180 && t > 0 ? -180 : d, t);
   };
 
   /**
@@ -278,11 +278,12 @@ GeographicLib.Accumulator = {};
     // Possibly could call the gnu extension sincos
     s = Math.sin(r); c = Math.cos(r);
     switch (q & 3) {
-      case 0:  sinx =     s; cosx =     c; break;
-      case 1:  sinx =     c; cosx = 0 - s; break;
-      case 2:  sinx = 0 - s; cosx = 0 - c; break;
-      default: sinx = 0 - c; cosx =     s; break; // case 3
+      case 0:  sinx =  s; cosx =  c; break;
+      case 1:  sinx =  c; cosx = -s; break;
+      case 2:  sinx = -s; cosx = -c; break;
+      default: sinx = -c; cosx =  s; break; // case 3
     }
+    if (x) { sinx += 0; cosx += 0; }
     return {s: sinx, c: cosx};
   };
 
@@ -290,8 +291,8 @@ GeographicLib.Accumulator = {};
    * @summary Evaluate the atan2 function with the result in degrees
    * @param {number} y
    * @param {number} x
-   * @returns atan2(y, x) in degrees, in the range [−180°
-   *   180°).
+   * @returns atan2(y, x) in degrees, in the range (−180°
+   *   180°].
    */
   m.atan2d = function(y, x) {
     // In order to minimize round-off errors, this function rearranges the
@@ -310,7 +311,7 @@ GeographicLib.Accumulator = {};
       //   case 0: ang = 0 + ang; break;
       //
       // and handle mpfr as in AngRound.
-      case 1: ang = (y > 0 ? 180 : -180) - ang; break;
+      case 1: ang = (y >= 0 ? 180 : -180) - ang; break;
       case 2: ang =  90 - ang; break;
       case 3: ang = -90 + ang; break;
     }
diff --git a/js/src/PolygonArea.js b/js/src/PolygonArea.js
index ea0b9aa..abd340a 100644
--- a/js/src/PolygonArea.js
+++ b/js/src/PolygonArea.js
@@ -10,11 +10,11 @@
  *    Charles F. F. Karney,
  *    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
  *    https://doi.org/10.1007/s00190-012-0578-z
- *    Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+ *    Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
  *
- * Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  */
 
 // Load AFTER GeographicLib/Math.js and GeographicLib/Geodesic.js
@@ -37,8 +37,8 @@
     lon1 = m.AngNormalize(lon1);
     lon2 = m.AngNormalize(lon2);
     lon12 = m.AngDiff(lon1, lon2).s;
-    cross = lon1 < 0 && lon2 >= 0 && lon12 > 0 ? 1 :
-      (lon2 < 0 && lon1 >= 0 && lon12 < 0 ? -1 : 0);
+    cross = lon1 <= 0 && lon2 > 0 && lon12 > 0 ? 1 :
+      (lon2 <= 0 && lon1 > 0 && lon12 < 0 ? -1 : 0);
     return cross;
   };
 
diff --git a/js/test/geodesictest.js b/js/test/geodesictest.js
index 2dc67ac..4544b98 100644
--- a/js/test/geodesictest.js
+++ b/js/test/geodesictest.js
@@ -215,7 +215,7 @@ describe("GeographicLib", function() {
       assert.approx(dir.lat2, 90, 0.5e-5);
       if (dir.lon2 < 0) {
         assert.approx(dir.lon2, -150, 0.5e-5);
-        assert.approx(dir.azi2, -180, 0.5e-5);
+        assert.approx(Math.abs(dir.azi2), 180, 0.5e-5);
       } else {
         assert.approx(dir.lon2, 30, 0.5e-5);
         assert.approx(dir.azi2, 0, 0.5e-5);
@@ -294,13 +294,13 @@ describe("GeographicLib", function() {
     it("GeodSolve17", function() {
       // Check fix for LONG_UNROLL bug found on 2015-05-07
       var geod = g.WGS84,
-          dir = geod.Direct(40, -75, -10, 2e7, g.STANDARD | g.LONG_UNROLL),
+          dir = geod.Direct(40, -75, -10, 2e7, g.LONG_UNROLL),
           line;
       assert.approx(dir.lat2, -39, 1);
       assert.approx(dir.lon2, -254, 1);
       assert.approx(dir.azi2, -170, 1);
       line = geod.Line(40, -75, -10);
-      dir = line.Position(2e7, g.STANDARD | g.LONG_UNROLL);
+      dir = line.Position(2e7, g.LONG_UNROLL);
       assert.approx(dir.lat2, -39, 1);
       assert.approx(dir.lon2, -254, 1);
       assert.approx(dir.azi2, -170, 1);
@@ -336,7 +336,7 @@ describe("GeographicLib", function() {
       assert.approx(dir.lon1, 179, 1e-10);
       assert.approx(dir.lon2, -179, 1e-10);
       assert.approx(dir.s12, 222639, 0.5);
-      dir = geod.Inverse(0, 539, 0, 181, g.STANDARD | g.LONG_UNROLL);
+      dir = geod.Inverse(0, 539, 0, 181, g.LONG_UNROLL);
       assert.approx(dir.lon1, 539, 1e-10);
       assert.approx(dir.lon2, 541, 1e-10);
       assert.approx(dir.s12, 222639, 0.5);
@@ -357,11 +357,11 @@ describe("GeographicLib", function() {
       assert.approx(inv.s12, 19980862, 0.5);
       inv = geod.Inverse(0, 0, 0, 180);
       assert.approx(inv.azi1, 0.00000, 0.5e-5);
-      assert.approx(inv.azi2, -180.00000, 0.5e-5);
+      assert.approx(Math.abs(inv.azi2), 180.00000, 0.5e-5);
       assert.approx(inv.s12, 20003931, 0.5);
       inv = geod.Inverse(0, 0, 1, 180);
       assert.approx(inv.azi1, 0.00000, 0.5e-5);
-      assert.approx(inv.azi2, -180.00000, 0.5e-5);
+      assert.approx(Math.abs(inv.azi2), 180.00000, 0.5e-5);
       assert.approx(inv.s12, 19893357, 0.5);
       geod = new g.Geodesic(6.4e6, 0);
       inv = geod.Inverse(0, 0, 0, 179);
@@ -370,11 +370,11 @@ describe("GeographicLib", function() {
       assert.approx(inv.s12, 19994492, 0.5);
       inv = geod.Inverse(0, 0, 0, 180);
       assert.approx(inv.azi1, 0.00000, 0.5e-5);
-      assert.approx(inv.azi2, -180.00000, 0.5e-5);
+      assert.approx(Math.abs(inv.azi2), 180.00000, 0.5e-5);
       assert.approx(inv.s12, 20106193, 0.5);
       inv = geod.Inverse(0, 0, 1, 180);
       assert.approx(inv.azi1, 0.00000, 0.5e-5);
-      assert.approx(inv.azi2, -180.00000, 0.5e-5);
+      assert.approx(Math.abs(inv.azi2), 180.00000, 0.5e-5);
       assert.approx(inv.s12, 19994492, 0.5);
       geod = new g.Geodesic(6.4e6, -1/300.0);
       inv = geod.Inverse(0, 0, 0, 179);
@@ -391,7 +391,7 @@ describe("GeographicLib", function() {
       assert.approx(inv.s12, 20082617, 0.5);
       inv = geod.Inverse(0, 0, 1, 180);
       assert.approx(inv.azi1, 0.00000, 0.5e-5);
-      assert.approx(inv.azi2, -180.00000, 0.5e-5);
+      assert.approx(Math.abs(inv.azi2), 180.00000, 0.5e-5);
       assert.approx(inv.s12, 20027270, 0.5);
     });
 
@@ -422,16 +422,16 @@ describe("GeographicLib", function() {
       // Make sure small negative azimuths are west-going
       var geod = g.WGS84,
           dir = geod.Direct(45, 0, -0.000000000000000003, 1e7,
-                            g.STANDARD | g.LONG_UNROLL),
+                            g.LONG_UNROLL),
           line;
       assert.approx(dir.lat2, 45.30632, 0.5e-5);
       assert.approx(dir.lon2, -180, 0.5e-5);
-      assert.approx(dir.azi2, -180, 0.5e-5);
+      assert.approx(Math.abs(dir.azi2), 180, 0.5e-5);
       line = geod.InverseLine(45, 0, 80, -0.000000000000000003);
-      dir = line.Position(1e7);
+      dir = line.Position(1e7, g.LONG_UNROLL);
       assert.approx(dir.lat2, 45.30632, 0.5e-5);
       assert.approx(dir.lon2, -180, 0.5e-5);
-      assert.approx(dir.azi2, -180, 0.5e-5);
+      assert.approx(Math.abs(dir.azi2), 180, 0.5e-5);
     });
 
     it("GeodSolve65", function() {
@@ -444,10 +444,10 @@ describe("GeographicLib", function() {
           dir = line.Position(1e7, g.ALL | g.LONG_UNROLL);
       assert.approx(dir.lat1, 30.00000  , 0.5e-5);
       assert.approx(dir.lon1, -0.00000  , 0.5e-5);
-      assert.approx(dir.azi1, -180.00000, 0.5e-5);
+      assert.approx(Math.abs(dir.azi1), 180.00000, 0.5e-5);
       assert.approx(dir.lat2, -60.23169 , 0.5e-5);
       assert.approx(dir.lon2, -0.00000  , 0.5e-5);
-      assert.approx(dir.azi2, -180.00000, 0.5e-5);
+      assert.approx(Math.abs(dir.azi2), 180.00000, 0.5e-5);
       assert.approx(dir.s12 , 10000000  , 0.5);
       assert.approx(dir.a12 , 90.06544  , 0.5e-5);
       assert.approx(dir.m12 , 6363636   , 0.5);
@@ -457,7 +457,7 @@ describe("GeographicLib", function() {
       dir = line.Position(2e7, g.ALL | g.LONG_UNROLL);
       assert.approx(dir.lat1, 30.00000  , 0.5e-5);
       assert.approx(dir.lon1, -0.00000  , 0.5e-5);
-      assert.approx(dir.azi1, -180.00000, 0.5e-5);
+      assert.approx(Math.abs(dir.azi1), 180.00000, 0.5e-5);
       assert.approx(dir.lat2, -30.03547 , 0.5e-5);
       assert.approx(dir.lon2, -180.00000, 0.5e-5);
       assert.approx(dir.azi2, -0.00000  , 0.5e-5);
diff --git a/legacy/C/00README.txt b/legacy/C/00README.txt
index 29e1b27..2d56bc3 100644
--- a/legacy/C/00README.txt
+++ b/legacy/C/00README.txt
@@ -4,11 +4,11 @@ This is a C implementation of the geodesic algorithms described in
   Algorithms for geodesics,
   J. Geodesy 87, 43-55 (2013);
   https://doi.org/10.1007/s00190-012-0578-z
-  Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+  Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 
 For documentation, see
 
-  http://geographiclib.sourceforge.net/html/C/
+  https://geographiclib.sourceforge.io/html/C/
 
 The code in this directory is entirely self-contained.  In particular,
 it does not depend on the C++ classes.  You can compile and link the
diff --git a/legacy/C/geodesic.c b/legacy/C/geodesic.c
index fd96422..927e59e 100644
--- a/legacy/C/geodesic.c
+++ b/legacy/C/geodesic.c
@@ -14,13 +14,13 @@
  *   Algorithms for geodesics,
  *   J. Geodesy <b>87</b>, 43--55 (2013);
  *   https://doi.org/10.1007/s00190-012-0578-z
- *   Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+ *   Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
  *
  * See the comments in geodesic.h for documentation.
  *
  * Copyright (c) Charles Karney (2012-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  */
 
 #include "geodesic.h"
@@ -85,7 +85,10 @@ static void Init() {
     tolb = tol0 * tol2;
     xthresh = 1000 * tol2;
     degree = pi/180;
-    NaN = sqrt(-1.0);
+    {
+      real minus1 = -1;
+      NaN = sqrt(minus1);
+    }
     init = 1;
   }
 }
@@ -168,21 +171,21 @@ static void norm2(real* sinx, real* cosx) {
 
 static real AngNormalize(real x) {
   x = fmod(x, (real)(360));
-  return x < -180 ? x + 360 : (x < 180 ? x : x - 360);
+  return x <= -180 ? x + 360 : (x <= 180 ? x : x - 360);
 }
 
 static real LatFix(real x)
 { return fabs(x) > 90 ? NaN : x; }
 
 static real AngDiff(real x, real y, real* e) {
-  real t, d = - AngNormalize(sumx(AngNormalize(x), AngNormalize(-y), &t));
-  /* Here y - x = d - t (mod 360), exactly, where d is in (-180,180] and
+  real t, d = AngNormalize(sumx(AngNormalize(-x), AngNormalize(y), &t));
+  /* Here y - x = d + t (mod 360), exactly, where d is in (-180,180] and
    * abs(t) <= eps (eps = 2^-45 for doubles).  The only case where the
    * addition of t takes the result outside the range (-180,180] is d = 180
-   * and t < 0.  The case, d = -180 + eps, t = eps, can't happen, since
+   * and t > 0.  The case, d = -180 + eps, t = -eps, can't happen, since
    * sum would have returned the exact result in such a case (i.e., given t
    * = 0). */
-  return sumx(d == 180 && t < 0 ? -180 : d, -t, e);
+  return sumx(d == 180 && t > 0 ? -180 : d, t, e);
 }
 
 static real AngRound(real x) {
@@ -207,11 +210,12 @@ static void sincosdx(real x, real* sinx, real* cosx) {
   /* Possibly could call the gnu extension sincos */
   s = sin(r); c = cos(r);
   switch ((unsigned)q & 3U) {
-  case 0U: *sinx =     s; *cosx =     c; break;
-  case 1U: *sinx =     c; *cosx = 0 - s; break;
-  case 2U: *sinx = 0 - s; *cosx = 0 - c; break;
-  default: *sinx = 0 - c; *cosx =     s; break; /* case 3U */
+  case 0U: *sinx =  s; *cosx =  c; break;
+  case 1U: *sinx =  c; *cosx = -s; break;
+  case 2U: *sinx = -s; *cosx = -c; break;
+  default: *sinx = -c; *cosx =  s; break; /* case 3U */
   }
+  if (x) { *sinx += (real)(0); *cosx += (real)(0); }
 }
 
 static real atan2dx(real y, real x) {
@@ -230,7 +234,7 @@ static real atan2dx(real y, real x) {
      *
      *   case 0: ang = 0 + ang; break;
      */
-  case 1: ang = (y > 0 ? 180 : -180) - ang; break;
+  case 1: ang = (y >= 0 ? 180 : -180) - ang; break;
   case 2: ang =  90 - ang; break;
   case 3: ang = -90 + ang; break;
   }
@@ -1487,7 +1491,7 @@ real A3f(const struct geod_geodesic* g, real eps) {
 
 void C3f(const struct geod_geodesic* g, real eps, real c[]) {
   /* Evaluate C3 coeffs
-   * Elements c[1] thru c[nC3 - 1] are set */
+   * Elements c[1] through c[nC3 - 1] are set */
   real mult = 1;
   int o = 0, l;
   for (l = 1; l < nC3; ++l) {   /* l is index of C3[l] */
@@ -1500,7 +1504,7 @@ void C3f(const struct geod_geodesic* g, real eps, real c[]) {
 
 void C4f(const struct geod_geodesic* g, real eps, real c[]) {
   /* Evaluate C4 coeffs
-   * Elements c[0] thru c[nC4 - 1] are set */
+   * Elements c[0] through c[nC4 - 1] are set */
   real mult = 1;
   int o = 0, l;
   for (l = 0; l < nC4; ++l) {   /* l is index of C4[l] */
@@ -1749,8 +1753,8 @@ int transit(real lon1, real lon2) {
   lon1 = AngNormalize(lon1);
   lon2 = AngNormalize(lon2);
   lon12 = AngDiff(lon1, lon2, 0);
-  return lon1 < 0 && lon2 >= 0 && lon12 > 0 ? 1 :
-    (lon2 < 0 && lon1 >= 0 && lon12 < 0 ? -1 : 0);
+  return lon1 <= 0 && lon2 > 0 && lon12 > 0 ? 1 :
+    (lon2 <= 0 && lon1 > 0 && lon12 < 0 ? -1 : 0);
 }
 
 int transitdirect(real lon1, real lon2) {
@@ -1813,7 +1817,7 @@ void geod_polygon_addpoint(const struct geod_geodesic* g,
     p->lat0 = p->lat = lat;
     p->lon0 = p->lon = lon;
   } else {
-    real s12, S12;
+    real s12, S12 = 0;       /* Initialize S12 to stop Visual Studio warning */
     geod_geninverse(g, p->lat, p->lon, lat, lon,
                     &s12, 0, 0, 0, 0, 0, p->polyline ? 0 : &S12);
     accadd(p->P, s12);
@@ -1830,7 +1834,7 @@ void geod_polygon_addedge(const struct geod_geodesic* g,
                           struct geod_polygon* p,
                           real azi, real s) {
   if (p->num) {                 /* Do nothing is num is zero */
-    real lat, lon, S12;
+    real lat, lon, S12 = 0;  /* Initialize S12 to stop Visual Studio warning */
     geod_gendirect(g, p->lat, p->lon, azi, GEOD_LONG_UNROLL, s,
                    &lat, &lon, 0,
                    0, 0, 0, 0, p->polyline ? 0 : &S12);
@@ -1905,7 +1909,7 @@ unsigned geod_polygon_testpoint(const struct geod_geodesic* g,
   tempsum = p->polyline ? 0 : p->A[0];
   crossings = p->crossings;
   for (i = 0; i < (p->polyline ? 1 : 2); ++i) {
-    real s12, S12;
+    real s12, S12 = 0;       /* Initialize S12 to stop Visual Studio warning */
     geod_geninverse(g,
                     i == 0 ? p->lat  : lat, i == 0 ? p->lon  : lon,
                     i != 0 ? p->lat0 : lat, i != 0 ? p->lon0 : lon,
diff --git a/legacy/C/geodesic.h b/legacy/C/geodesic.h
index cd8989d..b864ccf 100644
--- a/legacy/C/geodesic.h
+++ b/legacy/C/geodesic.h
@@ -9,7 +9,7 @@
  *   J. Geodesy <b>87</b>, 43--55 (2013);
  *   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
  *   10.1007/s00190-012-0578-z</a>;
- *   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+ *   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
  *   geod-addenda.html</a>.
  * .
  * The principal advantages of these algorithms over previous ones (e.g.,
@@ -96,7 +96,7 @@
  *   [\e d, \e d], for arbitrary \e d.
  *
  * These routines are a simple transcription of the corresponding C++ classes
- * in <a href="http://geographiclib.sourceforge.net"> GeographicLib</a>.  The
+ * in <a href="https://geographiclib.sourceforge.io"> GeographicLib</a>.  The
  * "class data" is represented by the structs geod_geodesic, geod_geodesicline,
  * geod_polygon and pointers to these objects are passed as initial arguments
  * to the member functions.  Most of the internal comments have been retained.
@@ -107,12 +107,12 @@
  * twice about restructuring the internals of the C code since this may make
  * porting fixes from the C++ code more difficult.
  *
- * Copyright (c) Charles Karney (2012-2016) <charles at karney.com> and licensed
+ * Copyright (c) Charles Karney (2012-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * This library was distributed with
- * <a href="../index.html">GeographicLib</a> 1.47.
+ * <a href="../index.html">GeographicLib</a> 1.48.
  **********************************************************************/
 
 #if !defined(GEODESIC_H)
@@ -127,7 +127,7 @@
  * The minor version of the geodesic library.  (This tracks the version of
  * GeographicLib.)
  **********************************************************************/
-#define GEODESIC_VERSION_MINOR 47
+#define GEODESIC_VERSION_MINOR 48
 /**
  * The patch level of the geodesic library.  (This tracks the version of
  * GeographicLib.)
@@ -242,7 +242,7 @@ extern "C" {
    *
    * \e g must have been initialized with a call to geod_init().  \e lat1
    * should be in the range [−90°, 90°].  The values of \e lon2
-   * and \e azi2 returned are in the range [−180°, 180°).  Any of
+   * and \e azi2 returned are in the range [−180°, 180°].  Any of
    * the "return" arguments \e plat2, etc., may be replaced by 0, if you do not
    * need some quantities computed.
    *
@@ -327,7 +327,7 @@ extern "C" {
    *
    * \e g must have been initialized with a call to geod_init().  \e lat1 and
    * \e lat2 should be in the range [−90°, 90°].  The values of
-   * \e azi1 and \e azi2 returned are in the range [−180°, 180°).
+   * \e azi1 and \e azi2 returned are in the range [−180°, 180°].
    * Any of the "return" arguments, \e ps12, etc., may be replaced by 0, if you
    * do not need some quantities computed.
    *
@@ -525,7 +525,7 @@ extern "C" {
    *
    * \e l must have been initialized with a call, e.g., to geod_lineinit(),
    * with \e caps |= GEOD_DISTANCE_IN.  The values of \e lon2 and \e azi2
-   * returned are in the range [−180°, 180°).  Any of the
+   * returned are in the range [−180°, 180°].  Any of the
    * "return" arguments \e plat2, etc., may be replaced by 0, if you do not
    * need some quantities computed.
    *
@@ -594,7 +594,7 @@ extern "C" {
    *
    * \e l must have been initialized with a call to geod_lineinit() with \e
    * caps |= GEOD_DISTANCE_IN.  The value \e azi2 returned is in the range
-   * [−180°, 180°).  Any of the "return" arguments \e plat2,
+   * [−180°, 180°].  Any of the "return" arguments \e plat2,
    * etc., may be replaced by 0, if you do not need some quantities
    * computed.  Requesting a value which \e l is not capable of computing
    * is not an error; the corresponding argument will not be altered.
diff --git a/legacy/C/geodtest.c b/legacy/C/geodtest.c
index c94683f..5ca741b 100644
--- a/legacy/C/geodtest.c
+++ b/legacy/C/geodtest.c
@@ -6,7 +6,7 @@
  *
  * Copyright (c) Charles Karney (2015-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 /** @cond SKIP */
@@ -22,7 +22,7 @@
 
 double wgs84_a = 6378137, wgs84_f = 1/298.257223563; /* WGS84 */
 
-int assertEquals(double x, double y, double d) {
+static int assertEquals(double x, double y, double d) {
   if (fabs(x - y) <= d)
     return 0;
   printf("assertEquals fails: %.7g != %.7g +/- %.7g\n", x, y, d);
@@ -112,7 +112,7 @@ double testcases[20][12] = {
    13487015.8381145492, 121.294026715742277, 5481428.9945736388,
    -0.51527225545373252, -0.51556587964721788, 104679964020340.318}};
 
-int testinverse() {
+static int testinverse() {
   double lat1, lon1, azi1, lat2, lon2, azi2, s12, a12, m12, M12, M21, S12;
   double azi1a, azi2a, s12a, a12a, m12a, M12a, M21a, S12a;
   struct geod_geodesic g;
@@ -137,7 +137,7 @@ int testinverse() {
   return result;
 }
 
-int testdirect() {
+static int testdirect() {
   double lat1, lon1, azi1, lat2, lon2, azi2, s12, a12, m12, M12, M21, S12;
   double lat2a, lon2a, azi2a, a12a, m12a, M12a, M21a, S12a;
   struct geod_geodesic g;
@@ -164,7 +164,7 @@ int testdirect() {
   return result;
 }
 
-int testarcdirect() {
+static int testarcdirect() {
   double lat1, lon1, azi1, lat2, lon2, azi2, s12, a12, m12, M12, M21, S12;
   double lat2a, lon2a, azi2a, s12a, m12a, M12a, M21a, S12a;
   struct geod_geodesic g;
@@ -190,7 +190,7 @@ int testarcdirect() {
   return result;
 }
 
-int GeodSolve0() {
+static int GeodSolve0() {
   double azi1, azi2, s12;
   struct geod_geodesic g;
   int result = 0;
@@ -202,7 +202,7 @@ int GeodSolve0() {
   return result;
 }
 
-int GeodSolve1() {
+static int GeodSolve1() {
   double lat2, lon2, azi2;
   struct geod_geodesic g;
   int result = 0;
@@ -215,7 +215,7 @@ int GeodSolve1() {
   return result;
 }
 
-int GeodSolve2() {
+static int GeodSolve2() {
   /* Check fix for antipodal prolate bug found 2010-09-04 */
   double azi1, azi2, s12;
   struct geod_geodesic g;
@@ -232,7 +232,7 @@ int GeodSolve2() {
   return result;
 }
 
-int GeodSolve4() {
+static int GeodSolve4() {
   /* Check fix for short line bug found 2010-05-21 */
   double s12;
   struct geod_geodesic g;
@@ -244,7 +244,7 @@ int GeodSolve4() {
   return result;
 }
 
-int GeodSolve5() {
+static int GeodSolve5() {
   /* Check fix for point2=pole bug found 2010-05-03 */
   double lat2, lon2, azi2;
   struct geod_geodesic g;
@@ -254,7 +254,7 @@ int GeodSolve5() {
   result += assertEquals(lat2, 90, 0.5e-5);
   if (lon2 < 0) {
     result += assertEquals(lon2, -150, 0.5e-5);
-    result += assertEquals(azi2, -180, 0.5e-5);
+    result += assertEquals(fabs(azi2), 180, 0.5e-5);
   } else {
     result += assertEquals(lon2, 30, 0.5e-5);
     result += assertEquals(azi2, 0, 0.5e-5);
@@ -262,7 +262,7 @@ int GeodSolve5() {
   return result;
 }
 
-int GeodSolve6() {
+static int GeodSolve6() {
   /* Check fix for volatile sbet12a bug found 2011-06-25 (gcc 4.4.4
    * x86 -O3).  Found again on 2012-03-27 with tdm-mingw32 (g++ 4.6.1). */
   double s12;
@@ -281,7 +281,7 @@ int GeodSolve6() {
   return result;
 }
 
-int GeodSolve9() {
+static int GeodSolve9() {
   /* Check fix for volatile x bug found 2011-06-25 (gcc 4.4.4 x86 -O3) */
   double s12;
   struct geod_geodesic g;
@@ -293,7 +293,7 @@ int GeodSolve9() {
   return result;
 }
 
-int GeodSolve10() {
+static int GeodSolve10() {
   /* Check fix for adjust tol1_ bug found 2011-06-25 (Visual Studio
    * 10 rel + debug) */
   double s12;
@@ -306,7 +306,7 @@ int GeodSolve10() {
   return result;
 }
 
-int GeodSolve11() {
+static int GeodSolve11() {
   /* Check fix for bet2 = -bet1 bug found 2011-06-25 (Visual Studio
    * 10 rel + debug) */
   double s12;
@@ -319,7 +319,7 @@ int GeodSolve11() {
   return result;
 }
 
-int GeodSolve12() {
+static int GeodSolve12() {
   /* Check fix for inverse geodesics on extreme prolate/oblate
    * ellipsoids Reported 2012-08-29 Stefan Guenther
    * <stefan.gunther at embl.de>; fixed 2012-10-07 */
@@ -334,11 +334,15 @@ int GeodSolve12() {
   return result;
 }
 
-int GeodSolve14() {
+static int GeodSolve14() {
   /* Check fix for inverse ignoring lon12 = nan */
-  double azi1, azi2, s12, nan = sqrt(-1.0);
+  double azi1, azi2, s12, nan;
   struct geod_geodesic g;
   int result = 0;
+  {
+    double minus1 = -1;
+    nan = sqrt(minus1);
+  }
   geod_init(&g, wgs84_a, wgs84_f);
   geod_inverse(&g, 0, 0, 1, nan, &s12, &azi1, &azi2);
   result += azi1 == azi1 ? 1 : 0;
@@ -347,7 +351,7 @@ int GeodSolve14() {
   return result;
 }
 
-int GeodSolve15() {
+static int GeodSolve15() {
   /* Initial implementation of Math::eatanhe was wrong for e^2 < 0.  This
    * checks that this is fixed. */
   double S12;
@@ -360,7 +364,7 @@ int GeodSolve15() {
   return result;
 }
 
-int GeodSolve17() {
+static int GeodSolve17() {
   /* Check fix for LONG_UNROLL bug found on 2015-05-07 */
   double lat2, lon2, azi2;
   struct geod_geodesic g;
@@ -389,7 +393,7 @@ int GeodSolve17() {
   return result;
 }
 
-int GeodSolve26() {
+static int GeodSolve26() {
   /* Check 0/0 problem with area calculation on sphere 2015-09-08 */
   double S12;
   struct geod_geodesic g;
@@ -400,7 +404,7 @@ int GeodSolve26() {
   return result;
 }
 
-int GeodSolve28() {
+static int GeodSolve28() {
   /* Check for bad placement of assignment of r.a12 with |f| > 0.01 (bug in
    * Java implementation fixed on 2015-05-19). */
   double a12;
@@ -412,7 +416,7 @@ int GeodSolve28() {
   return result;
 }
 
-int GeodSolve33() {
+static int GeodSolve33() {
   /* Check max(-0.0,+0.0) issues 2015-08-22 (triggered by bugs in Octave --
    * sind(-0.0) = +0.0 -- and in some version of Visual Studio --
    * fmod(-0.0, 360.0) = +0.0. */
@@ -430,11 +434,11 @@ int GeodSolve33() {
   result += assertEquals(s12, 19980862, 0.5);
   geod_inverse(&g, 0, 0, 0, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 20003931, 0.5);
   geod_inverse(&g, 0, 0, 1, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 19893357, 0.5);
   geod_init(&g, 6.4e6, 0);
   geod_inverse(&g, 0, 0, 0, 179, &s12, &azi1, &azi2);
@@ -443,11 +447,11 @@ int GeodSolve33() {
   result += assertEquals(s12, 19994492, 0.5);
   geod_inverse(&g, 0, 0, 0, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 20106193, 0.5);
   geod_inverse(&g, 0, 0, 1, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 19994492, 0.5);
   geod_init(&g, 6.4e6, -1/300.0);
   geod_inverse(&g, 0, 0, 0, 179, &s12, &azi1, &azi2);
@@ -464,18 +468,22 @@ int GeodSolve33() {
   result += assertEquals(s12, 20082617, 0.5);
   geod_inverse(&g, 0, 0, 1, 180, &s12, &azi1, &azi2);
   result += assertEquals(azi1, 0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 20027270, 0.5);
 
   return result;
 }
 
-int GeodSolve55() {
+static int GeodSolve55() {
   /* Check fix for nan + point on equator or pole not returning all nans in
    * Geodesic::Inverse, found 2015-09-23. */
-  double azi1, azi2, s12, nan = sqrt(-1.0);
+  double azi1, azi2, s12, nan;
   struct geod_geodesic g;
   int result = 0;
+  {
+    double minus1 = -1;
+    nan = sqrt(minus1);
+  }
   geod_init(&g, wgs84_a, wgs84_f);
   geod_inverse(&g, nan, 0, 0, 90, &s12, &azi1, &azi2);
   result += azi1 == azi1 ? 1 : 0;
@@ -488,7 +496,7 @@ int GeodSolve55() {
   return result;
 }
 
-int GeodSolve59() {
+static int GeodSolve59() {
   /* Check for points close with longitudes close to 180 deg apart. */
   double azi1, azi2, s12;
   struct geod_geodesic g;
@@ -501,7 +509,7 @@ int GeodSolve59() {
   return result;
 }
 
-int GeodSolve61() {
+static int GeodSolve61() {
   /* Make sure small negative azimuths are west-going */
   double lat2, lon2, azi2;
   struct geod_geodesic g;
@@ -513,16 +521,16 @@ int GeodSolve61() {
                  &lat2, &lon2, &azi2, 0, 0, 0, 0, 0);
   result += assertEquals(lat2, 45.30632, 0.5e-5);
   result += assertEquals(lon2, -180, 0.5e-5);
-  result += assertEquals(azi2, -180, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180, 0.5e-5);
   geod_inverseline(&l, &g, 45, 0, 80, -0.000000000000000003, 0);
   geod_genposition(&l, flags, 1e7, &lat2, &lon2, &azi2, 0, 0, 0, 0, 0);
   result += assertEquals(lat2, 45.30632, 0.5e-5);
   result += assertEquals(lon2, -180, 0.5e-5);
-  result += assertEquals(azi2, -180, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180, 0.5e-5);
   return result;
 }
 
-int GeodSolve65() {
+static int GeodSolve65() {
   /* Check for bug in east-going check in GeodesicLine (needed to check for
    * sign of 0) and sign error in area calculation due to a bogus override of
    * the code for alp12.  Found/fixed on 2015-12-19. */
@@ -537,7 +545,7 @@ int GeodSolve65() {
                          &lat2, &lon2, &azi2, &s12, &m12, &M12, &M21, &S12);
   result += assertEquals(lat2, -60.23169, 0.5e-5);
   result += assertEquals(lon2, -0.00000, 0.5e-5);
-  result += assertEquals(azi2, -180.00000, 0.5e-5);
+  result += assertEquals(fabs(azi2), 180.00000, 0.5e-5);
   result += assertEquals(s12, 10000000, 0.5);
   result += assertEquals(a12, 90.06544, 0.5e-5);
   result += assertEquals(m12, 6363636, 0.5);
@@ -558,7 +566,7 @@ int GeodSolve65() {
   return result;
 }
 
-int GeodSolve67() {
+static int GeodSolve67() {
   /* Check for InverseLine if line is slightly west of S and that s13 is
      correctly set. */
   double lat2, lon2, azi2;
@@ -579,7 +587,7 @@ int GeodSolve67() {
   return result;
 }
 
-int GeodSolve71() {
+static int GeodSolve71() {
   /* Check that DirectLine sets s13. */
   double lat2, lon2, azi2;
   struct geod_geodesic g;
@@ -594,7 +602,7 @@ int GeodSolve71() {
   return result;
 }
 
-int GeodSolve73() {
+static int GeodSolve73() {
   /* Check for backwards from the pole bug reported by Anon on 2016-02-13.
    * This only affected the Java implementation.  It was introduced in Java
    * version 1.44 and fixed in 1.46-SNAPSHOT on 2016-01-17. */
@@ -610,7 +618,7 @@ int GeodSolve73() {
   return result;
 }
 
-void planimeter(const struct geod_geodesic* g, double points[][2], int N,
+static void planimeter(const struct geod_geodesic* g, double points[][2], int N,
                 double* perimeter, double* area) {
   struct geod_polygon p;
   int i;
@@ -620,7 +628,7 @@ void planimeter(const struct geod_geodesic* g, double points[][2], int N,
   geod_polygon_compute(g, &p, 0, 1, area, perimeter);
 }
 
-void polylength(const struct geod_geodesic* g, double points[][2], int N,
+static void polylength(const struct geod_geodesic* g, double points[][2], int N,
                 double* perimeter) {
   struct geod_polygon p;
   int i;
@@ -630,7 +638,7 @@ void polylength(const struct geod_geodesic* g, double points[][2], int N,
   geod_polygon_compute(g, &p, 0, 1, 0, perimeter);
 }
 
-int GeodSolve74() {
+static int GeodSolve74() {
   /* Check fix for inaccurate areas, bug introduced in v1.46, fixed
      2015-10-16. */
   double a12, s12, azi1, azi2, m12, M12, M21, S12;
@@ -650,7 +658,7 @@ int GeodSolve74() {
   return result;
 }
 
-int Planimeter0() {
+static int Planimeter0() {
   /* Check fix for pole-encircling bug found 2011-03-16 */
   double pa[4][2] = {{89, 0}, {89, 90}, {89, 180}, {89, 270}};
   double pb[4][2] = {{-89, 0}, {-89, 90}, {-89, 180}, {-89, 270}};
@@ -683,7 +691,7 @@ int Planimeter0() {
   return result;
 }
 
-int Planimeter5() {
+static int Planimeter5() {
   /* Check fix for Planimeter pole crossing bug found 2011-06-24 */
   double points[3][2] = {{89, 0.1}, {89, 90.1}, {89, -179.9}};
   struct geod_geodesic g;
@@ -696,7 +704,7 @@ int Planimeter5() {
   return result;
 }
 
-int Planimeter6() {
+static int Planimeter6() {
   /* Check fix for Planimeter lon12 rounding bug found 2012-12-03 */
   double pa[3][2] = {{9, -0.00000000000001}, {9, 180}, {9, 0}};
   double pb[3][2] = {{9, 0.00000000000001}, {9, 0}, {9, 180}};
@@ -722,7 +730,7 @@ int Planimeter6() {
   return result;
 }
 
-int Planimeter12() {
+static int Planimeter12() {
   /* Area of arctic circle (not really -- adjunct to rhumb-area test) */
   double points[2][2] = {{66.562222222, 0}, {66.562222222, 180}};
   struct geod_geodesic g;
@@ -735,7 +743,7 @@ int Planimeter12() {
   return result;
 }
 
-int Planimeter13() {
+static int Planimeter13() {
   /* Check encircling pole twice */
   double points[6][2] = {{89,-360}, {89,-240}, {89,-120},
                          {89,0}, {89,120}, {89,240}};
diff --git a/legacy/Fortran/00README.txt b/legacy/Fortran/00README.txt
index 2f49e9c..5b78630 100644
--- a/legacy/Fortran/00README.txt
+++ b/legacy/Fortran/00README.txt
@@ -4,11 +4,11 @@ This is a Fortran implementation of the geodesic algorithms described in
   Algorithms for geodesics,
   J. Geodesy 87, 43-55 (2013);
   https://doi.org/10.1007/s00190-012-0578-z
-  Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+  Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 
 For documentation, see
 
-  http://geographiclib.sourceforge.net/html/Fortran/
+  https://geographiclib.sourceforge.io/html/Fortran/
 
 The code in this directory is entirely self-contained.  In particular,
 it does not depend on the C++ classes.  You can compile and link the
diff --git a/legacy/Fortran/geodesic.for b/legacy/Fortran/geodesic.for
index 83992b2..0f4e706 100644
--- a/legacy/Fortran/geodesic.for
+++ b/legacy/Fortran/geodesic.for
@@ -1,5 +1,5 @@
 * The subroutines in this files are documented at
-* http://geographiclib.sourceforge.net/html/Fortran/
+* https://geographiclib.sourceforge.io/html/Fortran/
 *
 *> @file geodesic.for
 *! @brief Implementation of geodesic routines in Fortran
@@ -12,7 +12,7 @@
 *!   J. Geodesy <b>87</b>, 43--55 (2013);
 *!   DOI: <a href="https://doi.org/10.1007/s00190-012-0578-z">
 *!   10.1007/s00190-012-0578-z</a>;
-*!   addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">
+*!   addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">
 *!   geod-addenda.html</a>.
 *! .
 *! The principal advantages of these algorithms over previous ones
@@ -101,7 +101,7 @@
 *!   → [\e azi1, \e azi2] + [\e d, \e d], for arbitrary \e d.
 *!
 *! These routines are a simple transcription of the corresponding C++
-*! classes in <a href="http://geographiclib.sourceforge.net"> GeographicLib</a>.
+*! classes in <a href="https://geographiclib.sourceforge.io"> GeographicLib</a>.
 *! Because of the limitations of Fortran 77, the classes have been
 *! replaced by simple subroutines with no attempt to save "state" across
 *! subroutine calls.  Most of the internal comments have been retained.
@@ -115,10 +115,10 @@
 *!
 *! Copyright (c) Charles Karney (2012-2017) <charles at karney.com> and
 *! licensed under the MIT/X11 License.  For more information, see
-*! http://geographiclib.sourceforge.net/
+*! https://geographiclib.sourceforge.io/
 *!
 *! This library was distributed with
-*! <a href="../index.html">GeographicLib</a> 1.47.
+*! <a href="../index.html">GeographicLib</a> 1.48.
 
 *> Solve the direct geodesic problem
 *!
@@ -156,7 +156,7 @@
 *! If \e arcmode is not set, \e s12a12 is \e s12 and \e a12s12 is \e
 *! a12; otherwise, \e s12a12 is \e a12 and \e a12s12 is \e s12.  It \e
 *! unroll is not set, the value \e lon2 returned is in the range
-*! [−180°, 180°); if unroll is set, the longitude variable
+*! [−180°, 180°]; if unroll is set, the longitude variable
 *! is "unrolled" so that \e lon2 − \e lon1 indicates how many
 *! times and in what sense the geodesic encircles the ellipsoid.
 *!
@@ -168,7 +168,7 @@
 *! - 8 return \e SS12
 *!
 *! \e lat1 should be in the range [−90°, 90°].  The value
-*! \e azi2 returned is in the range [−180°, 180°).
+*! \e azi2 returned is in the range [−180°, 180°].
 *!
 *! If either point is at a pole, the azimuth is defined by keeping the
 *! longitude fixed, writing \e lat = \e lat = ±(90° −
@@ -424,7 +424,6 @@
         lon2 = AngNm(AngNm(lon1) + AngNm(lon12))
       end if
       lat2 = atn2dx(sbet2, f1 * cbet2)
-* minus signs give range [-180, 180). 0- converts -0 to +0.
       azi2 = atn2dx(salp2, calp2)
 
       if (redlp .or. scalp) then
@@ -510,7 +509,7 @@
 *!
 *! \e lat1 and \e lat2 should be in the range [−90°, 90°].
 *! The values of \e azi1 and \e azi2 returned are in the range
-*! [−180°, 180°).
+*! [−180°, 180°].
 *!
 *! If either point is at a pole, the azimuth is defined by keeping the
 *! longitude fixed, writing \e lat = ±(90° −
@@ -941,7 +940,6 @@
       salp2 = salp2 * swapp * lonsgn
       calp2 = calp2 * swapp * latsgn
 
-* minus signs give range [-180, 180). 0- converts -0 to +0.
       azi1 = atn2dx(salp1, calp1)
       azi2 = atn2dx(salp2, calp2)
 
@@ -1039,7 +1037,7 @@
       integer major, minor, patch
 
       major = 1
-      minor = 47
+      minor = 48
       patch = 0
 
       return
@@ -1913,9 +1911,9 @@
       double precision x
 
       AngNm = mod(x, 360d0)
-      if (AngNm .lt. -180) then
+      if (AngNm .le. -180) then
         AngNm = AngNm + 360
-      else if (AngNm .ge. 180) then
+      else if (AngNm .gt. 180) then
         AngNm = AngNm - 360
       end if
 
@@ -1946,11 +1944,11 @@
       double precision e
 
       double precision d, t, sumx, AngNm
-      d = - AngNm(sumx(AngNm(x), AngNm(-y), t))
-      if (d .eq. 180 .and. t .lt. 0) then
+      d = AngNm(sumx(AngNm(-x), AngNm(y), t))
+      if (d .eq. 180 .and. t .gt. 0) then
         d = -180
       end if
-      AngDif = sumx(d, -t, e)
+      AngDif = sumx(d, t, e)
 
       return
       end
@@ -2097,9 +2095,9 @@
       lon2x = AngNm(lon2)
       lon12 = AngDif(lon1x, lon2x, e)
       trnsit = 0
-      if (lon1x .lt. 0 .and. lon2x .ge. 0 .and. lon12 .gt. 0) then
+      if (lon1x .le. 0 .and. lon2x .gt. 0 .and. lon12 .gt. 0) then
         trnsit = 1
-      else if (lon2x .lt. 0 .and. lon1x .ge. 0 .and. lon12 .lt. 0) then
+      else if (lon2x .le. 0 .and. lon1x .gt. 0 .and. lon12 .lt. 0) then
         trnsit = -1
       end if
 
@@ -2161,18 +2159,23 @@
       c = cos(r)
       q = mod(q + 4, 4)
       if (q .eq. 0) then
-        sinx =     s
-        cosx =     c
+        sinx =  s
+        cosx =  c
       else if (q .eq. 1) then
-        sinx =     c
-        cosx = 0 - s
+        sinx =  c
+        cosx = -s
       else if (q .eq. 2) then
-        sinx = 0 - s
-        cosx = 0 - c
+        sinx = -s
+        cosx = -c
       else
 * q.eq.3
-        sinx = 0 - c
-        cosx =     s
+        sinx = -c
+        cosx =  s
+      end if
+
+      if (x .ne. 0) then
+        sinx = 0d0 + sinx
+        cosx = 0d0 + cosx
       end if
 
       return
@@ -2206,7 +2209,7 @@
       end if
       atn2dx = atan2(yy, xx) / degree
       if (q .eq. 1) then
-        if (yy .gt. 0) then
+        if (yy .ge. 0) then
           atn2dx =  180 - atn2dx
         else
           atn2dx = -180 - atn2dx
diff --git a/legacy/Fortran/geodinverse.for b/legacy/Fortran/geodinverse.for
index 6d4365b..1e8a2a7 100644
--- a/legacy/Fortran/geodinverse.for
+++ b/legacy/Fortran/geodinverse.for
@@ -25,7 +25,7 @@
       read(*, *, end=90, err=90) lat1, lon1, lat2, lon2
       call invers(a, f, lat1, lon1, lat2, lon2,
      +    s12, azi1, azi2, omask,
-     +    dummy1, dummy2, dummy3, dummy4 , dummy5)
+     +    dummy1, dummy2, dummy3, dummy4, dummy5)
       print 20, azi1, azi2, s12
  20   format(1x, f20.15, 1x, f20.15, 1x, f19.10)
       go to 10
diff --git a/legacy/Fortran/geodtest.for b/legacy/Fortran/geodtest.for
index f40cc28..021a41d 100644
--- a/legacy/Fortran/geodtest.for
+++ b/legacy/Fortran/geodtest.for
@@ -5,7 +5,7 @@
 *!
 *! Copyright (c) Charles Karney (2015-2017) <charles at karney.com> and
 *! licensed under the MIT/X11 License.  For more information, see
-*! http://geographiclib.sourceforge.net/
+*! https://geographiclib.sourceforge.io/
 
 *> @cond SKIP
 
@@ -424,7 +424,7 @@
      +    flags, lat2, lon2, azi2, omask, a12, m12, MM12, MM21, SS12)
       if (lon2 .lt. 0) then
         r = r + assert(lon2, -150d0, 0.5d-5)
-        r = r + assert(azi2, -180d0, 0.5d-5)
+        r = r + assert(abs(azi2), 180d0, 0.5d-5)
       else
         r = r + assert(lon2, 30d0, 0.5d-5)
         r = r + assert(azi2, 0d0, 0.5d-5)
@@ -689,12 +689,12 @@
       call invers(a, f, 0d0, 0d0, 0d0, 180d0,
      +    s12, azi1, azi2, omask, a12, m12, MM12, MM21, SS12)
       r = r + assert(azi1, 0.00000d0, 0.5d-5)
-      r = r + assert(azi2, -180.00000d0, 0.5d-5)
+      r = r + assert(abs(azi2), 180.00000d0, 0.5d-5)
       r = r + assert(s12, 20003931d0, 0.5d0)
       call invers(a, f, 0d0, 0d0, 1d0, 180d0,
      +    s12, azi1, azi2, omask, a12, m12, MM12, MM21, SS12)
       r = r + assert(azi1, 0.00000d0, 0.5d-5)
-      r = r + assert(azi2, -180.00000d0, 0.5d-5)
+      r = r + assert(abs(azi2), 180.00000d0, 0.5d-5)
       r = r + assert(s12, 19893357d0, 0.5d0)
       a = 6.4d6
       f = 0
@@ -706,12 +706,12 @@
       call invers(a, f, 0d0, 0d0, 0d0, 180d0,
      +    s12, azi1, azi2, omask, a12, m12, MM12, MM21, SS12)
       r = r + assert(azi1, 0.00000d0, 0.5d-5)
-      r = r + assert(azi2, -180.00000d0, 0.5d-5)
+      r = r + assert(abs(azi2), 180.00000d0, 0.5d-5)
       r = r + assert(s12, 20106193d0, 0.5d0)
       call invers(a, f, 0d0, 0d0, 1d0, 180d0,
      +    s12, azi1, azi2, omask, a12, m12, MM12, MM21, SS12)
       r = r + assert(azi1, 0.00000d0, 0.5d-5)
-      r = r + assert(azi2, -180.00000d0, 0.5d-5)
+      r = r + assert(abs(azi2), 180.00000d0, 0.5d-5)
       r = r + assert(s12, 19994492d0, 0.5d0)
       a = 6.4d6
       f = -1/300.0d0
@@ -733,7 +733,7 @@
       call invers(a, f, 0d0, 0d0, 1d0, 180d0,
      +    s12, azi1, azi2, omask, a12, m12, MM12, MM21, SS12)
       r = r + assert(azi1, 0.00000d0, 0.5d-5)
-      r = r + assert(azi2, -180.00000d0, 0.5d-5)
+      r = r + assert(abs(azi2), 180.00000d0, 0.5d-5)
       r = r + assert(s12, 20027270d0, 0.5d0)
 
       tstg33 = r
@@ -805,7 +805,7 @@
      +    flags, lat2, lon2, azi2, omask, a12, m12, MM12, MM21, SS12)
       r = r + assert(lat2, 45.30632d0, 0.5d-5)
       r = r + assert(lon2, -180d0, 0.5d-5)
-      r = r + assert(azi2, -180d0, 0.5d-5)
+      r = r + assert(abs(azi2), 180d0, 0.5d-5)
 
       tstg61 = r
       return
diff --git a/man/CartConvert.1 b/man/CartConvert.1
index 3dd428c..ef4ae32 100644
--- a/man/CartConvert.1
+++ b/man/CartConvert.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CARTCONVERT 1"
-.TH CARTCONVERT 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH CARTCONVERT 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -256,5 +256,5 @@ revolution\fR, Feb. 2011; preprint <https://arxiv.org/abs/1102.1215>.
 .SH "HISTORY"
 .IX Header "HISTORY"
 \&\fBCartConvert\fR was added to GeographicLib,
-<http://geographiclib.sourceforge.net>, in 2009\-02.  Prior to 2009\-03 it was
+<https://geographiclib.sourceforge.io>, in 2009\-02.  Prior to 2009\-03 it was
 called ECEFConvert.
diff --git a/man/CartConvert.1.html b/man/CartConvert.1.html
index fdc6ee3..c5d88dd 100644
--- a/man/CartConvert.1.html
+++ b/man/CartConvert.1.html
@@ -132,7 +132,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>CartConvert</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in 2009-02. Prior to 2009-03 it was called ECEFConvert.</p>
+<p><b>CartConvert</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in 2009-02. Prior to 2009-03 it was called ECEFConvert.</p>
 
 
 </body>
diff --git a/man/CartConvert.pod b/man/CartConvert.pod
index a0e7c41..ced70a2 100644
--- a/man/CartConvert.pod
+++ b/man/CartConvert.pod
@@ -143,5 +143,5 @@ B<CartConvert> was written by Charles Karney.
 =head1 HISTORY
 
 B<CartConvert> was added to GeographicLib,
-L<http://geographiclib.sourceforge.net>, in 2009-02.  Prior to 2009-03 it was
+L<https://geographiclib.sourceforge.io>, in 2009-02.  Prior to 2009-03 it was
 called ECEFConvert.
diff --git a/man/CartConvert.usage b/man/CartConvert.usage
index 92e6d9c..72f0547 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.sourceforge.net/1.47/CartConvert.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/CartConvert.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -128,7 +128,7 @@ int usage(int retval, bool brief) {
 "\n"
 "HISTORY\n"
 "       CartConvert was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in 2009-02.  Prior to 2009-03\n"
+"       <https://geographiclib.sourceforge.io>, in 2009-02.  Prior to 2009-03\n"
 "       it was called ECEFConvert.\n"
 ;
   return retval;
diff --git a/man/ConicProj.1 b/man/ConicProj.1
index 61713fd..f75098f 100644
--- a/man/ConicProj.1
+++ b/man/ConicProj.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "CONICPROJ 1"
-.TH CONICPROJ 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH CONICPROJ 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -272,5 +272,5 @@ terminate; following lines will be converted.
 \&\fBConicProj\fR was written by Charles Karney.
 .SH "HISTORY"
 .IX Header "HISTORY"
-\&\fBConicProj\fR was added to GeographicLib, <http://geographiclib.sourceforge.net>,
+\&\fBConicProj\fR was added to GeographicLib, <https://geographiclib.sourceforge.io>,
 in version 1.9.
diff --git a/man/ConicProj.1.html b/man/ConicProj.1.html
index b1217d0..47366a1 100644
--- a/man/ConicProj.1.html
+++ b/man/ConicProj.1.html
@@ -146,7 +146,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>ConicProj</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in version 1.9.</p>
+<p><b>ConicProj</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in version 1.9.</p>
 
 
 </body>
diff --git a/man/ConicProj.pod b/man/ConicProj.pod
index 3caa2b2..48e69bf 100644
--- a/man/ConicProj.pod
+++ b/man/ConicProj.pod
@@ -161,5 +161,5 @@ B<ConicProj> was written by Charles Karney.
 
 =head1 HISTORY
 
-B<ConicProj> was added to GeographicLib, L<http://geographiclib.sourceforge.net>,
+B<ConicProj> was added to GeographicLib, L<https://geographiclib.sourceforge.io>,
 in version 1.9.
diff --git a/man/ConicProj.usage b/man/ConicProj.usage
index fbf9f55..407de58 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.sourceforge.net/1.47/ConicProj.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/ConicProj.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -143,7 +143,7 @@ int usage(int retval, bool brief) {
 "\n"
 "HISTORY\n"
 "       ConicProj was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in version 1.9.\n"
+"       <https://geographiclib.sourceforge.io>, in version 1.9.\n"
 ;
   return retval;
 }
diff --git a/man/GeoConvert.1 b/man/GeoConvert.1
index cd23187..2d12e25 100644
--- a/man/GeoConvert.1
+++ b/man/GeoConvert.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEOCONVERT 1"
-.TH GEOCONVERT 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH GEOCONVERT 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -333,8 +333,8 @@ east of 39N 70W is
 .Ve
 .PP
 \&\fB\s-1WARNING:\s0\fR \*(L"Exponential\*(R" notation is not recognized for geographic
-coordinates; instead 7.0E+1 is parsed as (7.0E) + (+1), yielding the
-same result as 8.0E.
+coordinates.  Thus 7.0E1 is illegal, while 7.0E+1 is parsed
+as (7.0E) + (+1), yielding the same result as 8.0E.
 .PP
 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
@@ -508,7 +508,7 @@ World Geodetic System 1984,
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 An online version of this utility is availbable at
-<http://geographiclib.sourceforge.net/cgi\-bin/GeoConvert>.
+<https://geographiclib.sourceforge.io/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
@@ -521,4 +521,4 @@ nanometers\fR, J. Geodesy \fB85\fR(8), 475\-485 (Aug. 2011); \s-1DOI\s0
 .SH "HISTORY"
 .IX Header "HISTORY"
 \&\fBGeoConvert\fR was added to GeographicLib,
-<http://geographiclib.sourceforge.net>, in 2009\-01.
+<https://geographiclib.sourceforge.io>, in 2009\-01.
diff --git a/man/GeoConvert.1.html b/man/GeoConvert.1.html
index 521575d..14096f4 100644
--- a/man/GeoConvert.1.html
+++ b/man/GeoConvert.1.html
@@ -215,7 +215,7 @@
 
 <pre><code>    39N 70W+0:0:15E</code></pre>
 
-<p><b>WARNING:</b> "Exponential" notation is not recognized for geographic coordinates; instead 7.0E+1 is parsed as (7.0E) + (+1), yielding the same result as 8.0E.</p>
+<p><b>WARNING:</b> "Exponential" notation is not recognized for geographic coordinates. Thus 7.0E1 is illegal, while 7.0E+1 is parsed as (7.0E) + (+1), yielding the same result as 8.0E.</p>
 
 <p>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 ".</p>
 
@@ -359,7 +359,7 @@
 
 <h1 id="SEE-ALSO">SEE ALSO</h1>
 
-<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>An online version of this utility is availbable at <a href="https://geographiclib.sourceforge.io/cgi-bin/GeoConvert">https://geographiclib.sourceforge.io/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://doi.org/10.1007/s00190-011-0445-3">https://doi.org/10.1007/s00190-011-0445-3</a>; preprint <a href="https://arxiv.org/abs/1002.1417">https://arxiv.org/abs/1002.1417</a>.</p>
 
@@ -369,7 +369,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>GeoConvert</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in 2009-01.</p>
+<p><b>GeoConvert</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in 2009-01.</p>
 
 
 </body>
diff --git a/man/GeoConvert.pod b/man/GeoConvert.pod
index c0721e8..60290b9 100644
--- a/man/GeoConvert.pod
+++ b/man/GeoConvert.pod
@@ -228,8 +228,8 @@ east of 39N 70W is
     39N 70W+0:0:15E
 
 B<WARNING:> "Exponential" notation is not recognized for geographic
-coordinates; instead 7.0E+1 is parsed as (7.0E) + (+1), yielding the
-same result as 8.0E.
+coordinates.  Thus 7.0E1 is illegal, while 7.0E+1 is parsed
+as (7.0E) + (+1), yielding the same result as 8.0E.
 
 Various unicode characters (encoded with UTF-8) may also be used to
 denote degrees, minutes, and seconds, e.g., the degree, prime, and
@@ -402,7 +402,7 @@ L<https://en.wikipedia.org/wiki/WGS84>.
 =head1 SEE ALSO
 
 An online version of this utility is availbable at
-L<http://geographiclib.sourceforge.net/cgi-bin/GeoConvert>.
+L<https://geographiclib.sourceforge.io/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
@@ -417,4 +417,4 @@ B<GeoConvert> was written by Charles Karney.
 =head1 HISTORY
 
 B<GeoConvert> was added to GeographicLib,
-L<http://geographiclib.sourceforge.net>, in 2009-01.
+L<https://geographiclib.sourceforge.io>, in 2009-01.
diff --git a/man/GeoConvert.usage b/man/GeoConvert.usage
index 30a988e..bb52db3 100644
--- a/man/GeoConvert.usage
+++ b/man/GeoConvert.usage
@@ -10,7 +10,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeoConvert --help\n"
 "or visit:\n"
-"    http://geographiclib.sourceforge.net/1.47/GeoConvert.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/GeoConvert.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -191,8 +191,8 @@ int usage(int retval, bool brief) {
 "           39N 70W+0:0:15E\n"
 "\n"
 "       WARNING: \"Exponential\" notation is not recognized for geographic\n"
-"       coordinates; instead 7.0E+1 is parsed as (7.0E) + (+1), yielding the\n"
-"       same result as 8.0E.\n"
+"       coordinates.  Thus 7.0E1 is illegal, while 7.0E+1 is parsed as (7.0E) +\n"
+"       (+1), yielding the same result as 8.0E.\n"
 "\n"
 "       Various unicode characters (encoded with UTF-8) may also be used to\n"
 "       denote degrees, minutes, and seconds, e.g., the degree, prime, and\n"
@@ -339,7 +339,7 @@ int usage(int retval, bool brief) {
 "\n"
 "SEE ALSO\n"
 "       An online version of this utility is availbable at\n"
-"       <http://geographiclib.sourceforge.net/cgi-bin/GeoConvert>.\n"
+"       <https://geographiclib.sourceforge.io/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"
@@ -352,7 +352,7 @@ int usage(int retval, bool brief) {
 "\n"
 "HISTORY\n"
 "       GeoConvert was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in 2009-01.\n"
+"       <https://geographiclib.sourceforge.io>, in 2009-01.\n"
 ;
   return retval;
 }
diff --git a/man/GeodSolve.1 b/man/GeodSolve.1
index 6997a0a..769b261 100644
--- a/man/GeodSolve.1
+++ b/man/GeodSolve.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEODSOLVE 1"
-.TH GEODSOLVE 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH GEODSOLVE 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -465,12 +465,12 @@ Equally spaced waypoints on the route:
 \&\fIGeoConvert\fR\|(1).
 .PP
 An online version of this utility is availbable at
-<http://geographiclib.sourceforge.net/cgi\-bin/GeodSolve>.
+<https://geographiclib.sourceforge.io/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
 <https://doi.org/10.1007/s00190\-012\-0578\-z>;
-addenda: <http://geographiclib.sourceforge.net/geod\-addenda.html>.
+addenda: <https://geographiclib.sourceforge.io/geod\-addenda.html>.
 .PP
 The Wikipedia page, Geodesics on an ellipsoid,
 <https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>.
@@ -480,6 +480,6 @@ The Wikipedia page, Geodesics on an ellipsoid,
 .SH "HISTORY"
 .IX Header "HISTORY"
 \&\fBGeodSolve\fR was added to GeographicLib,
-<http://geographiclib.sourceforge.net>, in 2009\-03.  Prior to version
+<https://geographiclib.sourceforge.io>, in 2009\-03.  Prior to version
 1.30, it was called \fBGeod\fR.  (The name was changed to avoid a conflict
 with the \fBgeod\fR utility in \fIproj.4\fR.)
diff --git a/man/GeodSolve.1.html b/man/GeodSolve.1.html
index cb36660..9a17eaf 100644
--- a/man/GeodSolve.1.html
+++ b/man/GeodSolve.1.html
@@ -311,9 +311,9 @@
 
 <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>An online version of this utility is availbable at <a href="https://geographiclib.sourceforge.io/cgi-bin/GeodSolve">https://geographiclib.sourceforge.io/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://doi.org/10.1007/s00190-012-0578-z">https://doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">http://geographiclib.sourceforge.net/geod-addenda.html</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://doi.org/10.1007/s00190-012-0578-z">https://doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">https://geographiclib.sourceforge.io/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>
 
@@ -323,7 +323,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>GeodSolve</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in 2009-03. Prior to version 1.30, it was called <b>Geod</b>. (The name was changed to avoid a conflict with the <b>geod</b> utility in <i>proj.4</i>.)</p>
+<p><b>GeodSolve</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in 2009-03. Prior to version 1.30, it was called <b>Geod</b>. (The name was changed to avoid a conflict with the <b>geod</b> utility in <i>proj.4</i>.)</p>
 
 
 </body>
diff --git a/man/GeodSolve.pod b/man/GeodSolve.pod
index a6e1af6..709c9ab 100644
--- a/man/GeodSolve.pod
+++ b/man/GeodSolve.pod
@@ -376,12 +376,12 @@ Equally spaced waypoints on the route:
 GeoConvert(1).
 
 An online version of this utility is availbable at
-L<http://geographiclib.sourceforge.net/cgi-bin/GeodSolve>.
+L<https://geographiclib.sourceforge.io/cgi-bin/GeodSolve>.
 
 The algorithms are described in C. F. F. Karney,
 I<Algorithms for geodesics>, J. Geodesy 87, 43-55 (2013); DOI:
 L<https://doi.org/10.1007/s00190-012-0578-z>;
-addenda: L<http://geographiclib.sourceforge.net/geod-addenda.html>.
+addenda: L<https://geographiclib.sourceforge.io/geod-addenda.html>.
 
 The Wikipedia page, Geodesics on an ellipsoid,
 L<https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>.
@@ -393,6 +393,6 @@ B<GeodSolve> was written by Charles Karney.
 =head1 HISTORY
 
 B<GeodSolve> was added to GeographicLib,
-L<http://geographiclib.sourceforge.net>, in 2009-03.  Prior to version
+L<https://geographiclib.sourceforge.io>, in 2009-03.  Prior to version
 1.30, it was called B<Geod>.  (The name was changed to avoid a conflict
 with the B<geod> utility in I<proj.4>.)
diff --git a/man/GeodSolve.usage b/man/GeodSolve.usage
index d8afbdf..14064a4 100644
--- a/man/GeodSolve.usage
+++ b/man/GeodSolve.usage
@@ -10,7 +10,7 @@ int usage(int retval, bool brief) {
 "For full documentation type:\n"
 "    GeodSolve --help\n"
 "or visit:\n"
-"    http://geographiclib.sourceforge.net/1.47/GeodSolve.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/GeodSolve.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -315,12 +315,12 @@ int usage(int retval, bool brief) {
 "       GeoConvert(1).\n"
 "\n"
 "       An online version of this utility is availbable at\n"
-"       <http://geographiclib.sourceforge.net/cgi-bin/GeodSolve>.\n"
+"       <https://geographiclib.sourceforge.io/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://doi.org/10.1007/s00190-012-0578-z>; addenda:\n"
-"       <http://geographiclib.sourceforge.net/geod-addenda.html>.\n"
+"       <https://geographiclib.sourceforge.io/geod-addenda.html>.\n"
 "\n"
 "       The Wikipedia page, Geodesics on an ellipsoid,\n"
 "       <https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>.\n"
@@ -330,7 +330,7 @@ int usage(int retval, bool brief) {
 "\n"
 "HISTORY\n"
 "       GeodSolve was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in 2009-03.  Prior to version\n"
+"       <https://geographiclib.sourceforge.io>, in 2009-03.  Prior to version\n"
 "       1.30, it was called Geod.  (The name was changed to avoid a conflict\n"
 "       with the geod utility in proj.4.)\n"
 ;
diff --git a/man/GeodesicProj.1 b/man/GeodesicProj.1
index 3682fa3..019cc61 100644
--- a/man/GeodesicProj.1
+++ b/man/GeodesicProj.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEODESICPROJ 1"
-.TH GEODESICPROJ 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH GEODESICPROJ 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -262,12 +262,12 @@ terminate; following lines will be converted.
 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
 <https://doi.org/10.1007/s00190\-012\-0578\-z>;
-addenda: <http://geographiclib.sourceforge.net/geod\-addenda.html>.
+addenda: <https://geographiclib.sourceforge.io/geod\-addenda.html>.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 \&\fBGeodesicProj\fR was written by Charles Karney.
 .SH "HISTORY"
 .IX Header "HISTORY"
 \&\fBGeodesicProj\fR was added to GeographicLib,
-<http://geographiclib.sourceforge.net>, in 2009\-08.  Prior to version 1.9 it was
+<https://geographiclib.sourceforge.io>, in 2009\-08.  Prior to version 1.9 it was
 called EquidistantTest.
diff --git a/man/GeodesicProj.1.html b/man/GeodesicProj.1.html
index eda2538..cabc84a 100644
--- a/man/GeodesicProj.1.html
+++ b/man/GeodesicProj.1.html
@@ -134,7 +134,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="https://doi.org/10.1007/s00190-012-0578-z">https://doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">http://geographiclib.sourceforge.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://doi.org/10.1007/s00190-012-0578-z">https://doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">https://geographiclib.sourceforge.io/geod-addenda.html</a>.</p>
 
 <h1 id="AUTHOR">AUTHOR</h1>
 
@@ -142,7 +142,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>GeodesicProj</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in 2009-08. Prior to version 1.9 it was called EquidistantTest.</p>
+<p><b>GeodesicProj</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in 2009-08. Prior to version 1.9 it was called EquidistantTest.</p>
 
 
 </body>
diff --git a/man/GeodesicProj.pod b/man/GeodesicProj.pod
index ba359b5..6f5797e 100644
--- a/man/GeodesicProj.pod
+++ b/man/GeodesicProj.pod
@@ -149,7 +149,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<https://doi.org/10.1007/s00190-012-0578-z>;
-addenda: L<http://geographiclib.sourceforge.net/geod-addenda.html>.
+addenda: L<https://geographiclib.sourceforge.io/geod-addenda.html>.
 
 =head1 AUTHOR
 
@@ -158,5 +158,5 @@ B<GeodesicProj> was written by Charles Karney.
 =head1 HISTORY
 
 B<GeodesicProj> was added to GeographicLib,
-L<http://geographiclib.sourceforge.net>, in 2009-08.  Prior to version 1.9 it was
+L<https://geographiclib.sourceforge.io>, in 2009-08.  Prior to version 1.9 it was
 called EquidistantTest.
diff --git a/man/GeodesicProj.usage b/man/GeodesicProj.usage
index 87972c0..a3950a9 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.sourceforge.net/1.47/GeodesicProj.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/GeodesicProj.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -133,14 +133,14 @@ int usage(int retval, bool brief) {
 "       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"
 "       <https://doi.org/10.1007/s00190-012-0578-z>; addenda:\n"
-"       <http://geographiclib.sourceforge.net/geod-addenda.html>.\n"
+"       <https://geographiclib.sourceforge.io/geod-addenda.html>.\n"
 "\n"
 "AUTHOR\n"
 "       GeodesicProj was written by Charles Karney.\n"
 "\n"
 "HISTORY\n"
 "       GeodesicProj was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in 2009-08.  Prior to version\n"
+"       <https://geographiclib.sourceforge.io>, in 2009-08.  Prior to version\n"
 "       1.9 it was called EquidistantTest.\n"
 ;
   return retval;
diff --git a/man/GeoidEval.1 b/man/GeoidEval.1
index 4927c21..f93b037 100644
--- a/man/GeoidEval.1
+++ b/man/GeoidEval.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GEOIDEVAL 1"
-.TH GEOIDEVAL 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH GEOIDEVAL 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -286,7 +286,7 @@ option.  The \fB\-h\fR option prints the default geoid path and name.  Use
 the \fB\-v\fR option to ascertain the full path name of the data file.
 .PP
 Instructions for downloading and installing geoid data are available at
-<http://geographiclib.sourceforge.net/html/geoid.html#geoidinst>.
+<https://geographiclib.sourceforge.io/html/geoid.html#geoidinst>.
 .PP
 \&\fB\s-1NOTE\s0\fR: all the geoids above apply to the \s-1WGS84\s0 ellipsoid (\fIa\fR =
 6378137 m, \fIf\fR = 1/298.257223563) only.
@@ -402,11 +402,11 @@ Convert a point in \s-1UTM\s0 zone 18n from \s-1MSL\s0 to \s-1HAE\s0
 \&\fIGeoConvert\fR\|(1), \fIGravity\fR\|(1), \fIgeographiclib\-get\-geoids\fR\|(8).
 .PP
 An online version of this utility is availbable at
-<http://geographiclib.sourceforge.net/cgi\-bin/GeoidEval>.
+<https://geographiclib.sourceforge.io/cgi\-bin/GeoidEval>.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 \&\fBGeoidEval\fR was written by Charles Karney.
 .SH "HISTORY"
 .IX Header "HISTORY"
-\&\fBGeoidEval\fR was added to GeographicLib, <http://geographiclib.sourceforge.net>,
+\&\fBGeoidEval\fR was added to GeographicLib, <https://geographiclib.sourceforge.io>,
 in 2009\-09.
diff --git a/man/GeoidEval.1.html b/man/GeoidEval.1.html
index b98d5f0..58eb4d6 100644
--- a/man/GeoidEval.1.html
+++ b/man/GeoidEval.1.html
@@ -167,7 +167,7 @@
 
 <p>The geoid data will be loaded from a directory specified at compile time. This may changed by setting the environment variables <code>GEOGRAPHICLIB_GEOID_PATH</code> or <code>GEOGRAPHICLIB_DATA</code>, or with the <b>-d</b> option. The <b>-h</b> option prints the default geoid path and name. Use the <b>-v</b> option to ascertain the full path name of the data file.</p>
 
-<p>Instructions for downloading and installing geoid data are available at <a href="http://geographiclib.sourceforge.net/html/geoid.html#geoidinst">http://geographiclib.sourceforge.net/html/geoid.html#geoidinst</a>.</p>
+<p>Instructions for downloading and installing geoid data are available at <a href="https://geographiclib.sourceforge.io/html/geoid.html#geoidinst">https://geographiclib.sourceforge.io/html/geoid.html#geoidinst</a>.</p>
 
 <p><b>NOTE</b>: all the geoids above apply to the WGS84 ellipsoid (<i>a</i> = 6378137 m, <i>f</i> = 1/298.257223563) only.</p>
 
@@ -278,7 +278,7 @@
 
 <p>GeoConvert(1), Gravity(1), geographiclib-get-geoids(8).</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>
+<p>An online version of this utility is availbable at <a href="https://geographiclib.sourceforge.io/cgi-bin/GeoidEval">https://geographiclib.sourceforge.io/cgi-bin/GeoidEval</a>.</p>
 
 <h1 id="AUTHOR">AUTHOR</h1>
 
@@ -286,7 +286,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>GeoidEval</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in 2009-09.</p>
+<p><b>GeoidEval</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in 2009-09.</p>
 
 
 </body>
diff --git a/man/GeoidEval.pod b/man/GeoidEval.pod
index 7e73096..bbcaf42 100644
--- a/man/GeoidEval.pod
+++ b/man/GeoidEval.pod
@@ -176,7 +176,7 @@ option.  The B<-h> option prints the default geoid path and name.  Use
 the B<-v> option to ascertain the full path name of the data file.
 
 Instructions for downloading and installing geoid data are available at
-L<http://geographiclib.sourceforge.net/html/geoid.html#geoidinst>.
+L<https://geographiclib.sourceforge.io/html/geoid.html#geoidinst>.
 
 B<NOTE>: all the geoids above apply to the WGS84 ellipsoid (I<a> =
 6378137 m, I<f> = 1/298.257223563) only.
@@ -309,7 +309,7 @@ Convert a point in UTM zone 18n from MSL to HAE
 GeoConvert(1), Gravity(1), geographiclib-get-geoids(8).
 
 An online version of this utility is availbable at
-L<http://geographiclib.sourceforge.net/cgi-bin/GeoidEval>.
+L<https://geographiclib.sourceforge.io/cgi-bin/GeoidEval>.
 
 =head1 AUTHOR
 
@@ -317,5 +317,5 @@ B<GeoidEval> was written by Charles Karney.
 
 =head1 HISTORY
 
-B<GeoidEval> was added to GeographicLib, L<http://geographiclib.sourceforge.net>,
+B<GeoidEval> was added to GeographicLib, L<https://geographiclib.sourceforge.io>,
 in 2009-09.
diff --git a/man/GeoidEval.usage b/man/GeoidEval.usage
index 26ea013..58c057a 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.sourceforge.net/1.47/GeoidEval.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/GeoidEval.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -151,7 +151,7 @@ int usage(int retval, bool brief) {
 "       -v option to ascertain the full path name of the data file.\n"
 "\n"
 "       Instructions for downloading and installing geoid data are available at\n"
-"       <http://geographiclib.sourceforge.net/html/geoid.html#geoidinst>.\n"
+"       <https://geographiclib.sourceforge.io/html/geoid.html#geoidinst>.\n"
 "\n"
 "       NOTE: all the geoids above apply to the WGS84 ellipsoid (a = 6378137 m,\n"
 "       f = 1/298.257223563) only.\n"
@@ -257,14 +257,14 @@ int usage(int retval, bool brief) {
 "       GeoConvert(1), Gravity(1), geographiclib-get-geoids(8).\n"
 "\n"
 "       An online version of this utility is availbable at\n"
-"       <http://geographiclib.sourceforge.net/cgi-bin/GeoidEval>.\n"
+"       <https://geographiclib.sourceforge.io/cgi-bin/GeoidEval>.\n"
 "\n"
 "AUTHOR\n"
 "       GeoidEval was written by Charles Karney.\n"
 "\n"
 "HISTORY\n"
 "       GeoidEval was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in 2009-09.\n"
+"       <https://geographiclib.sourceforge.io>, in 2009-09.\n"
 ;
   return retval;
 }
diff --git a/man/Gravity.1 b/man/Gravity.1
index 95275bb..e984060 100644
--- a/man/Gravity.1
+++ b/man/Gravity.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GRAVITY 1"
-.TH GRAVITY 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH GRAVITY 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -295,7 +295,7 @@ name.  Use the \fB\-v\fR option to ascertain the full path name of the data
 file.
 .PP
 Instructions for downloading and installing gravity models are available
-at <http://geographiclib.sourceforge.net/html/gravity.html#gravityinst>.
+at <https://geographiclib.sourceforge.io/html/gravity.html#gravityinst>.
 .SH "ENVIRONMENT"
 .IX Header "ENVIRONMENT"
 .IP "\fB\s-1GEOGRAPHICLIB_GRAVITY_NAME\s0\fR" 4
@@ -339,5 +339,5 @@ The gravity field from \s-1EGM2008\s0 at the top of Mount Everest
 \&\fBGravity\fR was written by Charles Karney.
 .SH "HISTORY"
 .IX Header "HISTORY"
-\&\fBGravity\fR was added to GeographicLib, <http://geographiclib.sourceforge.net>,
+\&\fBGravity\fR was added to GeographicLib, <https://geographiclib.sourceforge.io>,
 in version 1.16.
diff --git a/man/Gravity.1.html b/man/Gravity.1.html
index 43fe5c8..e087ebb 100644
--- a/man/Gravity.1.html
+++ b/man/Gravity.1.html
@@ -160,7 +160,7 @@
 
 <p>The gravity models will be loaded from a directory specified at compile time. This may changed by setting the environment variables <code>GEOGRAPHICLIB_GRAVITY_PATH</code> or <code>GEOGRAPHICLIB_DATA</code>, or with the <b>-d</b> option. The <b>-h</b> option prints the default gravity path and name. Use the <b>-v</b> option to ascertain the full path name of the data file.</p>
 
-<p>Instructions for downloading and installing gravity models are available at <a href="http://geographiclib.sourceforge.net/html/gravity.html#gravityinst">http://geographiclib.sourceforge.net/html/gravity.html#gravityinst</a>.</p>
+<p>Instructions for downloading and installing gravity models are available at <a href="https://geographiclib.sourceforge.io/html/gravity.html#gravityinst">https://geographiclib.sourceforge.io/html/gravity.html#gravityinst</a>.</p>
 
 <h1 id="ENVIRONMENT">ENVIRONMENT</h1>
 
@@ -207,7 +207,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>Gravity</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in version 1.16.</p>
+<p><b>Gravity</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in version 1.16.</p>
 
 
 </body>
diff --git a/man/Gravity.pod b/man/Gravity.pod
index b36df45..c21cddb 100644
--- a/man/Gravity.pod
+++ b/man/Gravity.pod
@@ -183,7 +183,7 @@ name.  Use the B<-v> option to ascertain the full path name of the data
 file.
 
 Instructions for downloading and installing gravity models are available
-at L<http://geographiclib.sourceforge.net/html/gravity.html#gravityinst>.
+at L<https://geographiclib.sourceforge.io/html/gravity.html#gravityinst>.
 
 =head1 ENVIRONMENT
 
@@ -237,5 +237,5 @@ B<Gravity> was written by Charles Karney.
 
 =head1 HISTORY
 
-B<Gravity> was added to GeographicLib, L<http://geographiclib.sourceforge.net>,
+B<Gravity> was added to GeographicLib, L<https://geographiclib.sourceforge.io>,
 in version 1.16.
diff --git a/man/Gravity.usage b/man/Gravity.usage
index 3d0f396..e1050cd 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.sourceforge.net/1.47/Gravity.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/Gravity.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -159,7 +159,7 @@ int usage(int retval, bool brief) {
 "\n"
 "       Instructions for downloading and installing gravity models are\n"
 "       available at\n"
-"       <http://geographiclib.sourceforge.net/html/gravity.html#gravityinst>.\n"
+"       <https://geographiclib.sourceforge.io/html/gravity.html#gravityinst>.\n"
 "\n"
 "ENVIRONMENT\n"
 "       GEOGRAPHICLIB_GRAVITY_NAME\n"
@@ -201,7 +201,7 @@ int usage(int retval, bool brief) {
 "\n"
 "HISTORY\n"
 "       Gravity was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in version 1.16.\n"
+"       <https://geographiclib.sourceforge.io>, in version 1.16.\n"
 ;
   return retval;
 }
diff --git a/man/MagneticField.1 b/man/MagneticField.1
index a81bd73..22190f9 100644
--- a/man/MagneticField.1
+++ b/man/MagneticField.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "MAGNETICFIELD 1"
-.TH MAGNETICFIELD 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH MAGNETICFIELD 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -310,7 +310,7 @@ file.
 .PP
 Instructions for downloading and installing magnetic models are
 available at
-<http://geographiclib.sourceforge.net/html/magnetic.html#magneticinst>.
+<https://geographiclib.sourceforge.io/html/magnetic.html#magneticinst>.
 .SH "ENVIRONMENT"
 .IX Header "ENVIRONMENT"
 .IP "\fB\s-1GEOGRAPHICLIB_MAGNETIC_NAME\s0\fR" 4
@@ -363,4 +363,4 @@ the field.  The second line gives the annual change.
 .SH "HISTORY"
 .IX Header "HISTORY"
 \&\fBMagneticField\fR was added to GeographicLib,
-<http://geographiclib.sourceforge.net>, in version 1.15.
+<https://geographiclib.sourceforge.io>, in version 1.15.
diff --git a/man/MagneticField.1.html b/man/MagneticField.1.html
index 379bd9c..4fec159 100644
--- a/man/MagneticField.1.html
+++ b/man/MagneticField.1.html
@@ -186,7 +186,7 @@
 
 <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>
 
-<p>Instructions for downloading and installing magnetic models are available at <a href="http://geographiclib.sourceforge.net/html/magnetic.html#magneticinst">http://geographiclib.sourceforge.net/html/magnetic.html#magneticinst</a>.</p>
+<p>Instructions for downloading and installing magnetic models are available at <a href="https://geographiclib.sourceforge.io/html/magnetic.html#magneticinst">https://geographiclib.sourceforge.io/html/magnetic.html#magneticinst</a>.</p>
 
 <h1 id="ENVIRONMENT">ENVIRONMENT</h1>
 
@@ -236,7 +236,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>MagneticField</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in version 1.15.</p>
+<p><b>MagneticField</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in version 1.15.</p>
 
 
 </body>
diff --git a/man/MagneticField.pod b/man/MagneticField.pod
index c4bd1ad..0f1b326 100644
--- a/man/MagneticField.pod
+++ b/man/MagneticField.pod
@@ -196,7 +196,7 @@ file.
 
 Instructions for downloading and installing magnetic models are
 available at
-L<http://geographiclib.sourceforge.net/html/magnetic.html#magneticinst>.
+L<https://geographiclib.sourceforge.io/html/magnetic.html#magneticinst>.
 
 =head1 ENVIRONMENT
 
@@ -259,4 +259,4 @@ B<MagneticField> was written by Charles Karney.
 =head1 HISTORY
 
 B<MagneticField> was added to GeographicLib,
-L<http://geographiclib.sourceforge.net>, in version 1.15.
+L<https://geographiclib.sourceforge.io>, in version 1.15.
diff --git a/man/MagneticField.usage b/man/MagneticField.usage
index ca183f5..f5d47b2 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.sourceforge.net/1.47/MagneticField.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/MagneticField.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -175,7 +175,7 @@ int usage(int retval, bool brief) {
 "\n"
 "       Instructions for downloading and installing magnetic models are\n"
 "       available at\n"
-"       <http://geographiclib.sourceforge.net/html/magnetic.html#magneticinst>.\n"
+"       <https://geographiclib.sourceforge.io/html/magnetic.html#magneticinst>.\n"
 "\n"
 "ENVIRONMENT\n"
 "       GEOGRAPHICLIB_MAGNETIC_NAME\n"
@@ -224,7 +224,7 @@ int usage(int retval, bool brief) {
 "\n"
 "HISTORY\n"
 "       MagneticField was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in version 1.15.\n"
+"       <https://geographiclib.sourceforge.io>, in version 1.15.\n"
 ;
   return retval;
 }
diff --git a/man/Planimeter.1 b/man/Planimeter.1
index 747da70..23934f3 100644
--- a/man/Planimeter.1
+++ b/man/Planimeter.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "PLANIMETER 1"
-.TH PLANIMETER 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH PLANIMETER 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -313,17 +313,17 @@ covered by the data (assuming the edges of the image are geodesics).
 \&\fIGeoConvert\fR\|(1), \fIGeodSolve\fR\|(1).
 .PP
 An online version of this utility is availbable at
-<http://geographiclib.sourceforge.net/cgi\-bin/Planimeter>.
+<https://geographiclib.sourceforge.io/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 <https://doi.org/10.1007/s00190\-012\-0578\-z>;
-addenda: <http://geographiclib.sourceforge.net/geod\-addenda.html>.
+addenda: <https://geographiclib.sourceforge.io/geod\-addenda.html>.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 \&\fBPlanimeter\fR was written by Charles Karney.
 .SH "HISTORY"
 .IX Header "HISTORY"
 \&\fBPlanimeter\fR was added to GeographicLib,
-<http://geographiclib.sourceforge.net>, in version 1.4.
+<https://geographiclib.sourceforge.io>, in version 1.4.
diff --git a/man/Planimeter.1.html b/man/Planimeter.1.html
index b7206af..dbe413a 100644
--- a/man/Planimeter.1.html
+++ b/man/Planimeter.1.html
@@ -181,9 +181,9 @@
 
 <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>An online version of this utility is availbable at <a href="https://geographiclib.sourceforge.io/cgi-bin/Planimeter">https://geographiclib.sourceforge.io/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://doi.org/10.1007/s00190-012-0578-z">https://doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="http://geographiclib.sourceforge.net/geod-addenda.html">http://geographiclib.sourceforge.net/geod-addenda.html</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://doi.org/10.1007/s00190-012-0578-z">https://doi.org/10.1007/s00190-012-0578-z</a>; addenda: <a href="https://geographiclib.sourceforge.io/geod-addenda.html">https://geographiclib.sourceforge.io/geod-addenda.html</a>.</p>
 
 <h1 id="AUTHOR">AUTHOR</h1>
 
@@ -191,7 +191,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>Planimeter</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in version 1.4.</p>
+<p><b>Planimeter</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in version 1.4.</p>
 
 
 </body>
diff --git a/man/Planimeter.pod b/man/Planimeter.pod
index 8f27e54..147e328 100644
--- a/man/Planimeter.pod
+++ b/man/Planimeter.pod
@@ -200,13 +200,13 @@ covered by the data (assuming the edges of the image are geodesics).
 GeoConvert(1), GeodSolve(1).
 
 An online version of this utility is availbable at
-L<http://geographiclib.sourceforge.net/cgi-bin/Planimeter>.
+L<https://geographiclib.sourceforge.io/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<https://doi.org/10.1007/s00190-012-0578-z>;
-addenda: L<http://geographiclib.sourceforge.net/geod-addenda.html>.
+addenda: L<https://geographiclib.sourceforge.io/geod-addenda.html>.
 
 =head1 AUTHOR
 
@@ -215,4 +215,4 @@ B<Planimeter> was written by Charles Karney.
 =head1 HISTORY
 
 B<Planimeter> was added to GeographicLib,
-L<http://geographiclib.sourceforge.net>, in version 1.4.
+L<https://geographiclib.sourceforge.io>, in version 1.4.
diff --git a/man/Planimeter.usage b/man/Planimeter.usage
index 469ff03..44e9b14 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.sourceforge.net/1.47/Planimeter.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/Planimeter.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -179,19 +179,19 @@ int usage(int retval, bool brief) {
 "       GeoConvert(1), GeodSolve(1).\n"
 "\n"
 "       An online version of this utility is availbable at\n"
-"       <http://geographiclib.sourceforge.net/cgi-bin/Planimeter>.\n"
+"       <https://geographiclib.sourceforge.io/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://doi.org/10.1007/s00190-012-0578-z>; addenda:\n"
-"       <http://geographiclib.sourceforge.net/geod-addenda.html>.\n"
+"       <https://geographiclib.sourceforge.io/geod-addenda.html>.\n"
 "\n"
 "AUTHOR\n"
 "       Planimeter was written by Charles Karney.\n"
 "\n"
 "HISTORY\n"
 "       Planimeter was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in version 1.4.\n"
+"       <https://geographiclib.sourceforge.io>, in version 1.4.\n"
 ;
   return retval;
 }
diff --git a/man/RhumbSolve.1 b/man/RhumbSolve.1
index b739c94..26cd8fd 100644
--- a/man/RhumbSolve.1
+++ b/man/RhumbSolve.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RHUMBSOLVE 1"
-.TH RHUMBSOLVE 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH RHUMBSOLVE 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -339,7 +339,7 @@ Waypoints on the route at intervals of 2000km:
 \&\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>.
+<https://geographiclib.sourceforge.io/cgi\-bin/RhumbSolve>.
 .PP
 The Wikipedia page, Rhumb line,
 <https://en.wikipedia.org/wiki/Rhumb_line>.
@@ -348,5 +348,5 @@ The Wikipedia page, Rhumb line,
 \&\fBRhumbSolve\fR was written by Charles Karney.
 .SH "HISTORY"
 .IX Header "HISTORY"
-\&\fBRhumbSolve\fR was added to GeographicLib, <http://geographiclib.sourceforge.net>,
+\&\fBRhumbSolve\fR was added to GeographicLib, <https://geographiclib.sourceforge.io>,
 in version 1.37.
diff --git a/man/RhumbSolve.1.html b/man/RhumbSolve.1.html
index 854702f..d04916d 100644
--- a/man/RhumbSolve.1.html
+++ b/man/RhumbSolve.1.html
@@ -192,7 +192,7 @@
 
 <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>An online version of this utility is availbable at <a href="https://geographiclib.sourceforge.io/cgi-bin/RhumbSolve">https://geographiclib.sourceforge.io/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>
 
@@ -202,7 +202,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>RhumbSolve</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in version 1.37.</p>
+<p><b>RhumbSolve</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in version 1.37.</p>
 
 
 </body>
diff --git a/man/RhumbSolve.pod b/man/RhumbSolve.pod
index 6ade5bd..a1fcbfc 100644
--- a/man/RhumbSolve.pod
+++ b/man/RhumbSolve.pod
@@ -238,7 +238,7 @@ 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>.
+L<https://geographiclib.sourceforge.io/cgi-bin/RhumbSolve>.
 
 The Wikipedia page, Rhumb line,
 L<https://en.wikipedia.org/wiki/Rhumb_line>.
@@ -249,5 +249,5 @@ B<RhumbSolve> was written by Charles Karney.
 
 =head1 HISTORY
 
-B<RhumbSolve> was added to GeographicLib, L<http://geographiclib.sourceforge.net>,
+B<RhumbSolve> was added to GeographicLib, L<https://geographiclib.sourceforge.io>,
 in version 1.37.
diff --git a/man/RhumbSolve.usage b/man/RhumbSolve.usage
index ecfdc23..73b85ee 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.sourceforge.net/1.47/RhumbSolve.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/RhumbSolve.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -201,7 +201,7 @@ int usage(int retval, bool brief) {
 "       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"
+"       <https://geographiclib.sourceforge.io/cgi-bin/RhumbSolve>.\n"
 "\n"
 "       The Wikipedia page, Rhumb line,\n"
 "       <https://en.wikipedia.org/wiki/Rhumb_line>.\n"
@@ -211,7 +211,7 @@ int usage(int retval, bool brief) {
 "\n"
 "HISTORY\n"
 "       RhumbSolve was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in version 1.37.\n"
+"       <https://geographiclib.sourceforge.io>, in version 1.37.\n"
 ;
   return retval;
 }
diff --git a/man/TransverseMercatorProj.1 b/man/TransverseMercatorProj.1
index f787e60..1f5c0b8 100644
--- a/man/TransverseMercatorProj.1
+++ b/man/TransverseMercatorProj.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "TRANSVERSEMERCATORPROJ 1"
-.TH TRANSVERSEMERCATORPROJ 1 "2017-02-15" "GeographicLib 1.47" "GeographicLib Utilities"
+.TH TRANSVERSEMERCATORPROJ 1 "2017-04-09" "GeographicLib 1.48" "GeographicLib Utilities"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -275,6 +275,6 @@ this paper.
 .SH "HISTORY"
 .IX Header "HISTORY"
 \&\fBTransverseMercatorProj\fR was added to GeographicLib,
-<http://geographiclib.sourceforge.net>, in 2009\-01.  Prior to version 1.9 it was
+<https://geographiclib.sourceforge.io>, in 2009\-01.  Prior to version 1.9 it was
 called TransverseMercatorTest (and its interface was slightly
 different).
diff --git a/man/TransverseMercatorProj.1.html b/man/TransverseMercatorProj.1.html
index 9b72b46..21148b5 100644
--- a/man/TransverseMercatorProj.1.html
+++ b/man/TransverseMercatorProj.1.html
@@ -152,7 +152,7 @@
 
 <h1 id="HISTORY">HISTORY</h1>
 
-<p><b>TransverseMercatorProj</b> was added to GeographicLib, <a href="http://geographiclib.sourceforge.net">http://geographiclib.sourceforge.net</a>, in 2009-01. Prior to version 1.9 it was called TransverseMercatorTest (and its interface was slightly different).</p>
+<p><b>TransverseMercatorProj</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in 2009-01. Prior to version 1.9 it was called TransverseMercatorTest (and its interface was slightly different).</p>
 
 
 </body>
diff --git a/man/TransverseMercatorProj.pod b/man/TransverseMercatorProj.pod
index 5ab9160..e56d42d 100644
--- a/man/TransverseMercatorProj.pod
+++ b/man/TransverseMercatorProj.pod
@@ -166,6 +166,6 @@ this paper.
 =head1 HISTORY
 
 B<TransverseMercatorProj> was added to GeographicLib,
-L<http://geographiclib.sourceforge.net>, in 2009-01.  Prior to version 1.9 it was
+L<https://geographiclib.sourceforge.io>, in 2009-01.  Prior to version 1.9 it was
 called TransverseMercatorTest (and its interface was slightly
 different).
diff --git a/man/TransverseMercatorProj.usage b/man/TransverseMercatorProj.usage
index c5d007c..0b51ff2 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.sourceforge.net/1.47/TransverseMercatorProj.1.html\n";
+"    https://geographiclib.sourceforge.io/1.48/TransverseMercatorProj.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n"
 "NAME\n"
@@ -143,7 +143,7 @@ int usage(int retval, bool brief) {
 "\n"
 "HISTORY\n"
 "       TransverseMercatorProj was added to GeographicLib,\n"
-"       <http://geographiclib.sourceforge.net>, in 2009-01.  Prior to version\n"
+"       <https://geographiclib.sourceforge.io>, in 2009-01.  Prior to version\n"
 "       1.9 it was called TransverseMercatorTest (and its interface was\n"
 "       slightly different).\n"
 ;
diff --git a/man/dummy.1.html.in b/man/dummy.1.html.in
index ea9aa2e..9a667f2 100644
--- a/man/dummy.1.html.in
+++ b/man/dummy.1.html.in
@@ -2,7 +2,7 @@
   <head>
     <title>@TOOL@ -- a GeographicLib utility</title>
     <meta HTTP-EQUIV="Refresh"
-	  CONTENT="0; URL=http://geographiclib.sourceforge.net/@PROJECT_VERSION@/@TOOL@.1.html">
+	  CONTENT="0; URL=https://geographiclib.sourceforge.io/@PROJECT_VERSION@/@TOOL@.1.html">
   </head>
   <body topmargin=10 leftmargin=10>
     <h3>
@@ -10,8 +10,8 @@
 	<em>
 	  Online documentation for the @TOOL@ utility is available at
 	  <center>
-	    <a href="http://geographiclib.sourceforge.net/@PROJECT_VERSION@/@TOOL@.1.html">
-	      http://geographiclib.sourceforge.net/@PROJECT_VERSION@/@TOOL@.1.html</a>.
+	    <a href="https://geographiclib.sourceforge.io/@PROJECT_VERSION@/@TOOL@.1.html">
+	      https://geographiclib.sourceforge.io/@PROJECT_VERSION@/@TOOL@.1.html</a>.
 	  </center>
 	  <br>
 	  You will be redirected there.  Click on the link to go there
diff --git a/man/dummy.1.in b/man/dummy.1.in
index 10ed436..83365fd 100644
--- a/man/dummy.1.in
+++ b/man/dummy.1.in
@@ -3,7 +3,7 @@
 @TOOL@ \-\- a GeographicLib utility
 .SH DESCRIPTION
 .B @TOOL@
-is part of GeographicLib, <http://geographiclib.sourceforge.net>.  For
+is part of GeographicLib, <https://geographiclib.sourceforge.io>.  For
 documentation, see
 .PP
-    http://geographiclib.sourceforge.net/@PROJECT_VERSION@/@TOOL@.1.html
+    https://geographiclib.sourceforge.io/@PROJECT_VERSION@/@TOOL@.1.html
diff --git a/man/dummy.usage.in b/man/dummy.usage.in
index 16f0a83..87bec46 100644
--- a/man/dummy.usage.in
+++ b/man/dummy.usage.in
@@ -3,6 +3,6 @@
 int usage(int retval, bool /* brief */) {
   ( retval ? std::cerr : std::cout )
     << "For full documentation on @TOOL@, see\n"
-    << "    http://geographiclib.sourceforge.net/@PROJECT_VERSION@/@TOOL@.1.html\n";
+    << "    https://geographiclib.sourceforge.io/@PROJECT_VERSION@/@TOOL@.1.html\n";
   return retval;
 }
diff --git a/man/makeusage.sh b/man/makeusage.sh
index 314a0e6..5f8aee2 100644
--- a/man/makeusage.sh
+++ b/man/makeusage.sh
@@ -20,7 +20,7 @@ cat <<EOF
 For full documentation type:\n\\
     $NAME --help\n\\
 or visit:\n\\
-    http://geographiclib.sourceforge.net/$VERSION/$NAME.1.html\n";
+    https://geographiclib.sourceforge.io/$VERSION/$NAME.1.html\n";
   else
     ( retval ? std::cerr : std::cout ) << "Man page:\n\\
 EOF
diff --git a/man/script.8.in b/man/script.8.in
index 0040f8d..1f64b81 100644
--- a/man/script.8.in
+++ b/man/script.8.in
@@ -4,7 +4,7 @@
 .SH DESCRIPTION
 .B @SCRIPT@
 downloads and installs the @DATA@ datasets used by GeographicLib,
-<http://geographiclib.sourceforge.net>.  For documentation, supply the
+<https://geographiclib.sourceforge.io>.  For documentation, supply the
 .B \-h
 option:
 .PP
diff --git a/matlab/geographiclib/Contents.m b/matlab/geographiclib/Contents.m
index 293d550..5622de5 100644
--- a/matlab/geographiclib/Contents.m
+++ b/matlab/geographiclib/Contents.m
@@ -1,5 +1,5 @@
 % GeographicLib toolbox
-% Version 1.47 2017-02-15
+% Version 1.48 2017-04-09
 %
 %   This toolbox provides native MATLAB implementations of a subset of the
 %   C++ library, GeographicLib.  Key components of this toolbox are
@@ -16,7 +16,7 @@
 %   available in the documentation for the GeographicLib, which is
 %   available at
 %
-%       http://geographiclib.sourceforge.net/html
+%       https://geographiclib.sourceforge.io/html
 %
 %   Some common features of these functions:
 %     * Angles (latitude, longitude, azimuth, meridian convergence) are
diff --git a/matlab/geographiclib/cassini_fwd.m b/matlab/geographiclib/cassini_fwd.m
index 99cb504..35a0670 100644
--- a/matlab/geographiclib/cassini_fwd.m
+++ b/matlab/geographiclib/cassini_fwd.m
@@ -58,7 +58,7 @@ function [x, y, azi, rk] = cassini_fwd(lat0, lon0, lat, lon, ellipsoid)
   x = s12;
   azi = AngNormalize(azi2);
   [~, ~, ~, ~, ~, ~, rk] = ...
-      geodreckon(lat, dlon, -sig12, azi, ellipsoid, true);
+      geodreckon(lat, dlon, -sig12, azi, ellipsoid, 1);
   [sbet, cbet] = sincosdx(lat);
   [sbet, cbet] = norm2((1-f) * sbet, cbet);
   [sbet0, cbet0] = sincosdx(lat0);
@@ -75,5 +75,5 @@ function [x, y, azi, rk] = cassini_fwd(lat0, lon0, lat, lon, ellipsoid)
   sbet01 = sbet1 .* cbet0 - cbet1 .* sbet0;
   cbet01 = cbet1 .* cbet0 + sbet1 .* sbet0;
   sig01 = atan2(sbet01, cbet01) / degree;
-  [~, ~, ~, ~, ~, ~, ~, y] = geodreckon(lat0, 0, sig01, 0, ellipsoid, true);
+  [~, ~, ~, ~, ~, ~, ~, y] = geodreckon(lat0, 0, sig01, 0, ellipsoid, 1);
 end
diff --git a/matlab/geographiclib/eqdazim_fwd.m b/matlab/geographiclib/eqdazim_fwd.m
index 5e4371e..af09631 100644
--- a/matlab/geographiclib/eqdazim_fwd.m
+++ b/matlab/geographiclib/eqdazim_fwd.m
@@ -27,7 +27,7 @@ function [x, y, azi, rk] = eqdazim_fwd(lat0, lon0, lat, lon, ellipsoid)
 %
 %     C. F. F. Karney, Geodesics on an ellipsoid of revolution (2011),
 %     https://arxiv.org/abs/1102.1215
-%     Errata: http://geographiclib.sourceforge.net/geod-addenda.html#geod-errata
+%     Errata: https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata
 %
 %   describes how to use this projection in the determination of maritime
 %   boundaries (finding the median line).
diff --git a/matlab/geographiclib/eqdazim_inv.m b/matlab/geographiclib/eqdazim_inv.m
index 3fed29d..2f12787 100644
--- a/matlab/geographiclib/eqdazim_inv.m
+++ b/matlab/geographiclib/eqdazim_inv.m
@@ -27,7 +27,7 @@ function [lat, lon, azi, rk] = eqdazim_inv(lat0, lon0, x, y, ellipsoid)
 %
 %     C. F. F. Karney, Geodesics on an ellipsoid of revolution (2011),
 %     https://arxiv.org/abs/1102.1215
-%     Errata: http://geographiclib.sourceforge.net/geod-addenda.html#geod-errata
+%     Errata: https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata
 %
 %   describes how to use this projection in the determination of maritime
 %   boundaries (finding the median line).
diff --git a/matlab/geographiclib/gedoc.m b/matlab/geographiclib/gedoc.m
index 965afb1..e35c312 100644
--- a/matlab/geographiclib/gedoc.m
+++ b/matlab/geographiclib/gedoc.m
@@ -5,21 +5,21 @@ function gedoc
 %   problems for great ellipses on the surface of an ellipsoid of
 %   revolution.  For more information, see
 %
-%     http://geographiclib.sourceforge.net/html/greatellipse.html
+%     https://geographiclib.sourceforge.io/html/greatellipse.html
 %
 %   Great ellipses are sometimes proposed as alternatives to computing
 %   ellipsoidal geodesics.  However geodesic calculations are easy to
 %   perform using geoddistance and geodreckon, and these should normally be
 %   used instead of gedistance and gereckon.  For a discussion, see
 %
-%     http://geographiclib.sourceforge.net/html/greatellipse.html#gevsgeodesic
+%     https://geographiclib.sourceforge.io/html/greatellipse.html#gevsgeodesic
 %
 %   The method involves stretching the ellipse along the axis until it
 %   becomes a sphere, solving the corresponding great circle problem on the
 %   sphere and mapping the results back to the ellipsoid.  For details,
 %   see
 %
-%     http://geographiclib.sourceforge.net/html/greatellipse.html#geformulation
+%     https://geographiclib.sourceforge.io/html/greatellipse.html#geformulation
 %
 %   Consider two points on the ellipsoid at (lat1, lon1) and (lat2, lon2).
 %   The plane containing these points and the center of the ellipsoid
diff --git a/matlab/geographiclib/geocent_inv.m b/matlab/geographiclib/geocent_inv.m
index 1d47ead..223ab63 100644
--- a/matlab/geographiclib/geocent_inv.m
+++ b/matlab/geographiclib/geocent_inv.m
@@ -141,7 +141,6 @@ function [lat, lon, h, M] = geocent_inv(X, Y, Z, ellipsoid)
     cphi(far) = R(far) ./ H;
   end
   lat = atan2dx(sphi, cphi);
-  % Negative signs return lon in [-180, 180).  0- converts -0 to +0.
   lon = atan2dx(slam, clam);
   if nargout > 3
     M = GeoRotation(sphi, cphi, slam, clam);
diff --git a/matlab/geographiclib/geodarea.m b/matlab/geographiclib/geodarea.m
index f828e8f..cc75c38 100644
--- a/matlab/geographiclib/geodarea.m
+++ b/matlab/geographiclib/geodarea.m
@@ -28,7 +28,7 @@ function [A, P, N] = geodarea(lats, lons, ellipsoid)
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
 %     https://doi.org/10.1007/s00190-012-0578-z
-%     Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+%     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 %
 %   See also GEODDOC, GEODDISTANCE, GEODRECKON, POLYGONAREA,
 %     DEFAULTELLIPSOID.
@@ -104,8 +104,8 @@ function cross = transit(lon1, lon2)
   lon2 = AngNormalize(lon2);
   lon12 = AngDiff(lon1, lon2);
   cross = zeros(length(lon1), 1);
-  cross(lon1 < 0 & lon2 >= 0 & lon12 > 0) = 1;
-  cross(lon2 < 0 & lon1 >= 0 & lon12 < 0) = -1;
+  cross(lon1 <= 0 & lon2 > 0 & lon12 > 0) =  1;
+  cross(lon2 <= 0 & lon1 > 0 & lon12 < 0) = -1;
 
 end
 
diff --git a/matlab/geographiclib/geoddistance.m b/matlab/geographiclib/geoddistance.m
index 3a9e1fe..a164eb7 100644
--- a/matlab/geographiclib/geoddistance.m
+++ b/matlab/geographiclib/geoddistance.m
@@ -27,7 +27,7 @@ function [s12, azi1, azi2, S12, m12, M12, M21, a12] = geoddistance ...
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
 %     https://doi.org/10.1007/s00190-012-0578-z
-%     Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+%     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 %
 %   This function duplicates some of the functionality of the distance
 %   function in the MATLAB mapping toolbox.  Differences are
@@ -39,8 +39,7 @@ function [s12, azi1, azi2, S12, m12, M12, M21, a12] = geoddistance ...
 %     * The algorithm converges for all pairs of input points.
 %     * Additional properties of the geodesic are calcuated.
 %
-%   See also GEODDOC, GEODRECKON, GEODAREA, GEODESICINVERSE,
-%     DEFAULTELLIPSOID.
+%   See also GEODDOC, GEODRECKON, GEODAREA, DEFAULTELLIPSOID.
 
 % Copyright (c) Charles Karney (2012-2017) <charles at karney.com>.
 %
diff --git a/matlab/geographiclib/geoddoc.m b/matlab/geographiclib/geoddoc.m
index 3004955..6da4c7b 100644
--- a/matlab/geographiclib/geoddoc.m
+++ b/matlab/geographiclib/geoddoc.m
@@ -8,14 +8,14 @@ function geoddoc
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
 %     https://doi.org/10.1007/s00190-012-0578-z
-%     Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+%     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 %
 %   which, in turn, is based on the classic solution of the geodesic
 %   problems pioneered by Legendre (1806), Bessel (1825), and Helmert
 %   (1880).  Links for these and other original papers on geodesics are
 %   given in
 %
-%     http://geographiclib.sourceforge.net/geodesic-papers/biblio.html
+%     https://geographiclib.sourceforge.io/geodesic-papers/biblio.html
 %
 %   The shortest path between two points on the ellipsoid at (lat1, lon1)
 %   and (lat2, lon2) is called the geodesic.  Its length is s12 and the
@@ -163,8 +163,7 @@ function geoddoc
 %       polygon.
 %
 %   See also GEODDISTANCE, GEODRECKON, GEODAREA,
-%     DEFAULTELLIPSOID, ECC2FLAT, FLAT2ECC,
-%     GEODESICDIRECT, GEODESICLINE, GEODESICINVERSE, POLYGONAREA.
+%     DEFAULTELLIPSOID, ECC2FLAT, FLAT2ECC.
 
 % Copyright (c) Charles Karney (2012-2017) <charles at karney.com>.
 
diff --git a/matlab/geographiclib/geodreckon.m b/matlab/geographiclib/geodreckon.m
index 258e0e8..913da40 100644
--- a/matlab/geographiclib/geodreckon.m
+++ b/matlab/geographiclib/geodreckon.m
@@ -31,7 +31,7 @@ function [lat2, lon2, azi2, S12, m12, M12, M21, a12_s12] = geodreckon ...
 %   returned in the final output variable a12_s12 (in meters).
 %
 %   If long_unroll is unset (the default), then the value lon2 is in the
-%   range [-180,180).  If long_unroll is set, the longitude is "unrolled"
+%   range [-180,180].  If long_unroll is set, the longitude is "unrolled"
 %   so that the quantity lon2 - lon1 indicates how many times and in what
 %   sense the geodesic encircles the ellipsoid.
 %
@@ -51,7 +51,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);
 %     https://doi.org/10.1007/s00190-012-0578-z
-%     Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+%     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 %
 %   This function duplicates some of the functionality of the RECKON
 %   function in the MATLAB mapping toolbox.  Differences are
@@ -64,10 +64,9 @@ function [lat2, lon2, azi2, S12, m12, M12, M21, a12_s12] = geodreckon ...
 %       points on a single geodesic.
 %     * Additional properties of the geodesic are calcuated.
 %
-%   See also GEODDOC, GEODDISTANCE, GEODAREA, GEODESICDIRECT, GEODESICLINE,
-%     DEFAULTELLIPSOID.
+%   See also GEODDOC, GEODDISTANCE, GEODAREA, DEFAULTELLIPSOID.
 
-% Copyright (c) Charles Karney (2012-2016) <charles at karney.com>.
+% Copyright (c) Charles Karney (2012-2017) <charles at karney.com>.
 %
 % This is a straightforward transcription of the C++ implementation in
 % GeographicLib and the C++ source should be consulted for additional
@@ -248,11 +247,14 @@ function [lat2, lon2, azi2, S12, m12, M12, M21, a12_s12] = geodreckon ...
                    ssig12 .* (csig1 .* ssig12 ./ (1 + csig12) + ssig1), ...
                    csig12 <= 0);
     calp12 = salp0.^2 + calp0.^2 .* csig1 .* csig2;
-    % Enlarge salp1, calp1 is case lat1 is an array and azi1 is a scalar
-    s = zeros(size(salp0)); salp1 = salp1 + s; calp1 = calp1 + s;
-    s = calp0 == 0 | salp0 == 0;
-    salp12(s) = salp2(s) .* calp1(s) - calp2(s) .* salp1(s);
-    calp12(s) = calp2(s) .* calp1(s) + salp2(s) .* salp1(s);
+    % Deal with geodreckon(10, 0, [], 0) which has calp2 = []
+    if ~isempty(Z)
+      % Enlarge salp1, calp1 is case lat1 is an array and azi1 is a scalar
+      s = zeros(size(salp0)); salp1 = salp1 + s; calp1 = calp1 + s;
+      s = calp0 == 0 | salp0 == 0;
+      salp12(s) = salp2(s) .* calp1(s) - calp2(s) .* salp1(s);
+      calp12(s) = calp2(s) .* calp1(s) + salp2(s) .* salp1(s);
+    end
     if e2 ~= 0
       c2 = (a^2 + b^2 * eatanhe(1, e2) / e2) / 2;
     else
diff --git a/matlab/geographiclib/geographiclib_test.m b/matlab/geographiclib/geographiclib_test.m
index e16f347..6b85bf8 100644
--- a/matlab/geographiclib/geographiclib_test.m
+++ b/matlab/geographiclib/geographiclib_test.m
@@ -33,6 +33,7 @@ function geographiclib_test
   i = Planimeter6; if i, n=n+1; fprintf('Planimeter6 fail: %d\n', i); end
   i = Planimeter12; if i, n=n+1; fprintf('Planimeter12 fail: %d\n', i); end
   i = Planimeter13; if i, n=n+1; fprintf('Planimeter13 fail: %d\n', i); end
+  i = geodreckon0; if i, n=n+1; fprintf('geodreckon0 fail: %d\n', i); end
   i = gedistance0; if i, n=n+1; fprintf('gedistance0 fail: %d\n', i); end
   i = tranmerc0; if i, n=n+1; fprintf('tranmerc0 fail: %d\n', i); end
   i = mgrs0; if i, n=n+1; fprintf('mgrs0 fail: %d\n', i); end
@@ -226,7 +227,7 @@ function n = GeodSolve5
   n = n + assertEquals(lat2, 90, 0.5e-5);
   if lon2 < 0
     n = n + assertEquals(lon2, -150, 0.5e-5);
-    n = n + assertEquals(azi2, -180, 0.5e-5);
+    n = n + assertEquals(abs(azi2), 180, 0.5e-5);
   else
     n = n + assertEquals(lon2, 30, 0.5e-5);
     n = n + assertEquals(azi2, 0, 0.5e-5);
@@ -349,11 +350,11 @@ function n = GeodSolve33
   n = n + assertEquals(s12, 19980862, 0.5);
   [s12, azi1, azi2] = geoddistance(0, 0, 0, 180);
   n = n + assertEquals(azi1, 0.00000, 0.5e-5);
-  n = n + assertEquals(azi2, -180.00000, 0.5e-5);
+  n = n + assertEquals(abs(azi2), 180.00000, 0.5e-5);
   n = n + assertEquals(s12, 20003931, 0.5);
   [s12, azi1, azi2] = geoddistance(0, 0, 1, 180);
   n = n + assertEquals(azi1, 0.00000, 0.5e-5);
-  n = n + assertEquals(azi2, -180.00000, 0.5e-5);
+  n = n + assertEquals(abs(azi2), 180.00000, 0.5e-5);
   n = n + assertEquals(s12, 19893357, 0.5);
   ell = ellipsoid(6.4e6, 0);
   [s12, azi1, azi2] = geoddistance(0, 0, 0, 179, ell);
@@ -362,11 +363,11 @@ function n = GeodSolve33
   n = n + assertEquals(s12, 19994492, 0.5);
   [s12, azi1, azi2] = geoddistance(0, 0, 0, 180, ell);
   n = n + assertEquals(azi1, 0.00000, 0.5e-5);
-  n = n + assertEquals(azi2, -180.00000, 0.5e-5);
+  n = n + assertEquals(abs(azi2), 180.00000, 0.5e-5);
   n = n + assertEquals(s12, 20106193, 0.5);
   [s12, azi1, azi2] = geoddistance(0, 0, 1, 180, ell);
   n = n + assertEquals(azi1, 0.00000, 0.5e-5);
-  n = n + assertEquals(azi2, -180.00000, 0.5e-5);
+  n = n + assertEquals(abs(azi2), 180.00000, 0.5e-5);
   n = n + assertEquals(s12, 19994492, 0.5);
   ell = ellipsoid(6.4e6, -1/300.0);
   [s12, azi1, azi2] = geoddistance(0, 0, 0, 179, ell);
@@ -383,7 +384,7 @@ function n = GeodSolve33
   n = n + assertEquals(s12, 20082617, 0.5);
   [s12, azi1, azi2] = geoddistance(0, 0, 1, 180, ell);
   n = n + assertEquals(azi1, 0.00000, 0.5e-5);
-  n = n + assertEquals(azi2, -180.00000, 0.5e-5);
+  n = n + assertEquals(abs(azi2), 180.00000, 0.5e-5);
   n = n + assertEquals(s12, 20027270, 0.5);
   % Check also octave-specific versions of this problem.
   % In 1.44 this returned [-2.0004e+07, -2.0004e+07, 0.0000e+00, 0.0000e+00]
@@ -420,7 +421,7 @@ function n = GeodSolve61
   [lat2, lon2, azi2] = geodreckon(45, 0, 1e7, -0.000000000000000003, 2);
   n = n + assertEquals(lat2, 45.30632, 0.5e-5);
   n = n + assertEquals(lon2, -180, 0.5e-5);
-  n = n + assertEquals(azi2, -180, 0.5e-5);
+  n = n + assertEquals(abs(azi2), 180, 0.5e-5);
 end
 
 function n = GeodSolve73
@@ -525,6 +526,20 @@ function n = Planimeter13
   n = n + assertEquals(area, 32415230256.0, 1);
 end
 
+function n = geodreckon0
+% Check mixed array size bugs
+  n = 0;
+  % lat1 is an array, azi1 is a scalar: 2015-08-10
+  [~, ~, ~, S12] = geodreckon([10 20], 0, 0, 0);
+  if length(S12) ~= 2, n = n+1; end
+  % scalar args except s12 is empty: 2017-03-26
+  [~, ~, ~, S12] = geodreckon(10, 0, [], 0);
+  if ~isempty(S12), n = n+1; end
+  % atan2dx needs to accommodate scalar + array arguments: 2017-03-27
+  lat2 = geodreckon(3, 4, [1, 2], 90);
+  if length(lat2) ~= 2, n = n+1; end
+end
+
 function n = gedistance0
 % gedistance(0, 0, 0, 100) wrongly return nan; 2015-09-23
   n = 0;
diff --git a/matlab/geographiclib/geoid_height.m b/matlab/geographiclib/geoid_height.m
index fb395c4..94a38b4 100644
--- a/matlab/geographiclib/geoid_height.m
+++ b/matlab/geographiclib/geoid_height.m
@@ -52,7 +52,7 @@ function N = geoid_height(lat, lon, geoidname, geoiddir)
 %   Information on downloading and installing the data for the supported
 %   geoid models is available at
 %
-%     http://geographiclib.sourceforge.net/html/geoid.html#geoidinst
+%     https://geographiclib.sourceforge.io/html/geoid.html#geoidinst
 %
 %   GEOID_HEIGHT uses cubic interpolation on gridded data that has been
 %   quantized at a resolution of 3mm.
diff --git a/matlab/geographiclib/geoid_load.m b/matlab/geographiclib/geoid_load.m
index cc1a72e..f158201 100644
--- a/matlab/geographiclib/geoid_load.m
+++ b/matlab/geographiclib/geoid_load.m
@@ -48,7 +48,7 @@ function geoid = geoid_load(name, dir)
 %   Information on downloading and installing the data for the supported
 %   geoid models is available at
 %
-%     http://geographiclib.sourceforge.net/html/geoid.html#geoidinst
+%     https://geographiclib.sourceforge.io/html/geoid.html#geoidinst
 %
 %   See also GEOID_HEIGHT.
 
diff --git a/matlab/geographiclib/gnomonic_fwd.m b/matlab/geographiclib/gnomonic_fwd.m
index 44ebc61..93be600 100644
--- a/matlab/geographiclib/gnomonic_fwd.m
+++ b/matlab/geographiclib/gnomonic_fwd.m
@@ -35,7 +35,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);
 %     https://doi.org/10.1007/s00190-012-0578-z
-%     Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+%     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 %
 %   which also includes methods for solving the "intersection" and
 %   "interception" problems using the gnomonic projection.
diff --git a/matlab/geographiclib/gnomonic_inv.m b/matlab/geographiclib/gnomonic_inv.m
index ee5c783..a5cc957 100644
--- a/matlab/geographiclib/gnomonic_inv.m
+++ b/matlab/geographiclib/gnomonic_inv.m
@@ -36,7 +36,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);
 %     https://doi.org/10.1007/s00190-012-0578-z
-%     Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+%     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 %
 %   which also includes methods for solving the "intersection" and
 %   "interception" problems using the gnomonic projection.
diff --git a/matlab/geographiclib/private/AngDiff.m b/matlab/geographiclib/private/AngDiff.m
index 9f9b6a9..f0a2f77 100644
--- a/matlab/geographiclib/private/AngDiff.m
+++ b/matlab/geographiclib/private/AngDiff.m
@@ -4,8 +4,8 @@ function [d, e] = AngDiff(x, y)
 %   [d, e] = ANGDIFF(x, y) computes z = y - x, reduced to (-180,180].  d =
 %   round(z) and e = z - round(z).  x and y can be any compatible shapes.
 
-  [d, t] = sumx(AngNormalize(x), AngNormalize(-y));
-  d = - AngNormalize(d);
-  d(d == 180 & t < 0) = -180;
-  [d, e] = sumx(d, -t);
+  [d, t] = sumx(AngNormalize(-x), AngNormalize(y));
+  d = AngNormalize(d);
+  d(d == 180 & t > 0) = -180;
+  [d, e] = sumx(d, t);
 end
diff --git a/matlab/geographiclib/private/AngNormalize.m b/matlab/geographiclib/private/AngNormalize.m
index 8027ffc..c9dd5b6 100644
--- a/matlab/geographiclib/private/AngNormalize.m
+++ b/matlab/geographiclib/private/AngNormalize.m
@@ -1,10 +1,10 @@
 function x = AngNormalize(x)
-%ANGNORMALIZE  Reduce angle to range [-180, 180)
+%ANGNORMALIZE  Reduce angle to range (-180, 180]
 %
-%   x = ANGNORMALIZE(x) reduces angles to the range [-180, 180).  x can be
+%   x = ANGNORMALIZE(x) reduces angles to the range (-180, 180].  x can be
 %   any shape.
 
   x = rem(x, 360);
-  x(x >= 180) = x(x >= 180) - 360;
-  x(x < -180) = x(x < -180) + 360;
+  x(x >   180) = x(x >   180) - 360;
+  x(x <= -180) = x(x <= -180) + 360;
 end
diff --git a/matlab/geographiclib/private/SinCosSeries.m b/matlab/geographiclib/private/SinCosSeries.m
index fa36d43..fca43da 100644
--- a/matlab/geographiclib/private/SinCosSeries.m
+++ b/matlab/geographiclib/private/SinCosSeries.m
@@ -9,7 +9,7 @@ function y = SinCosSeries(sinp, sinx, cosx, c)
 %   and cosx.  sinp is a scalar.  sinx, cosx, and y are K x 1 arrays.  c is
 %   a K x N array.
 
-  if isempty(sinx), y = []; return, end
+  if isempty(sinx), y = sinx; return, end
   n = size(c, 2);
   ar = 2 * (cosx - sinx) .* (cosx + sinx);
   y1 = zeros(length(sinx), 1);
diff --git a/matlab/geographiclib/private/atan2dx.m b/matlab/geographiclib/private/atan2dx.m
index 0488cb7..6516c51 100644
--- a/matlab/geographiclib/private/atan2dx.m
+++ b/matlab/geographiclib/private/atan2dx.m
@@ -2,24 +2,26 @@ function z = atan2dx(y, x)
 %ATAN2DX  Compute 2 argument arctangent with result in degrees
 %
 %   z = ATAN2DX(y, x) compute atan2(y, x) with result in degrees in
-%   [-180,180) and quadrant symmetries enforced.  x and y must be the same
-%   shape.
+%   (-180,180] and quadrant symmetries enforced.  x and y must have
+%   compatible shapes.
 
   persistent octavep
   if isempty(octavep)
     octavep = exist('OCTAVE_VERSION', 'builtin') ~= 0;
   end
   if ~octavep
-    % MATLAB implements symmetries already, just need to fix range
-    z = 0 - atan2d(0 - y, x);
+    % MATLAB implements symmetries already
+    z = atan2d(y, x);
   else
-    q1 = abs(y) > abs(x); t = y(q1); y(q1) = x(q1); x(q1) = t;
+    q1 = abs(y) > abs(x); q2 = ones(size(q1));
+    x = q2 .* x; y = q2 .* y;           % expand x, y if necessary
+    t = y(q1); y(q1) = x(q1); x(q1) = t;
     q2 = x < 0; x(q2) = -x(q2);
     q = 2 * q1 + q2;
     z = atan2(y, x) * (180 / pi);       % z in [-45, 45]
     % t = q == 0;        z(t) =    0 + z(t);
-    t = q == 1 & y >  0; z(t) =  180 - z(t);
-    t = q == 1 & y <= 0; z(t) = -180 - z(t);
+    t = q == 1 & y >= 0; z(t) =  180 - z(t);
+    t = q == 1 & y <  0; z(t) = -180 - z(t);
     t = q == 2;          z(t) =   90 - z(t);
     t = q == 3;          z(t) =  -90 + z(t);
   end
diff --git a/matlab/geographiclib/private/sincosdx.m b/matlab/geographiclib/private/sincosdx.m
index e8b4dc2..44355aa 100644
--- a/matlab/geographiclib/private/sincosdx.m
+++ b/matlab/geographiclib/private/sincosdx.m
@@ -21,8 +21,10 @@ function [sinx, cosx] = sincosdx(x)
     q = mod(q, 4);
     r = r * (pi/180);
     sinx = sin(r); cosx = cos(r);
-    t = q == 1; z = 0 - sinx(t); sinx(t) = cosx(t); cosx(t) = z;
-    t = q == 2; sinx(t) = 0 - sinx(t); cosx(t) = 0 - cosx(t);
-    t = q == 3; z = sinx(t); sinx(t) = 0 - cosx(t); cosx(t) = z;
+    t = q == 1; z = -sinx(t); sinx(t) = cosx(t); cosx(t) = z;
+    t = q == 2; sinx(t) = -sinx(t); cosx(t) = -cosx(t);
+    t = q == 3; z = sinx(t); sinx(t) = -cosx(t); cosx(t) = z;
   end
+  sinx(x ~= 0) = 0 + sinx(x ~= 0);
+  cosx(x ~= 0) = 0 + cosx(x ~= 0);
 end
diff --git a/matlab/geographiclib/projdoc.m b/matlab/geographiclib/projdoc.m
index d8bdaa8..51441e5 100644
--- a/matlab/geographiclib/projdoc.m
+++ b/matlab/geographiclib/projdoc.m
@@ -27,7 +27,7 @@ function projdoc
 %     C. F. F. Karney, Algorithms for geodesics,
 %     J. Geodesy 87, 43-55 (2013);
 %     https://doi.org/10.1007/s00190-012-0578-z
-%     Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+%     Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 %
 %   The parameters of the ellipsoid are specified by the optional ellipsoid
 %   argument to the routines.  This is a two-element vector of the form
diff --git a/matlab/geographiclib/tranmerc_fwd.m b/matlab/geographiclib/tranmerc_fwd.m
index b81e5e7..a7865d3 100644
--- a/matlab/geographiclib/tranmerc_fwd.m
+++ b/matlab/geographiclib/tranmerc_fwd.m
@@ -27,7 +27,7 @@ function [x, y, gam, k] = tranmerc_fwd(lat0, lon0, lat, lon, ellipsoid)
 %
 %     C. F. F. Karney, Transverse Mercator with an accuracy of a few
 %     nanometers, J. Geodesy 85(8), 475-485 (Aug. 2011);
-%     Addenda: http://geographiclib.sourceforge.net/tm-addenda.html
+%     Addenda: https://geographiclib.sourceforge.io/tm-addenda.html
 %
 %   This extends the series given by Krueger (1912) to sixth order in the
 %   flattening.  This is a substantially better series than that used by
diff --git a/matlab/geographiclib/tranmerc_inv.m b/matlab/geographiclib/tranmerc_inv.m
index 6ca0abb..85ab9c0 100644
--- a/matlab/geographiclib/tranmerc_inv.m
+++ b/matlab/geographiclib/tranmerc_inv.m
@@ -27,7 +27,7 @@ function [lat, lon, gam, k] = tranmerc_inv(lat0, lon0, x, y, ellipsoid)
 %
 %     C. F. F. Karney, Transverse Mercator with an accuracy of a few
 %     nanometers, J. Geodesy 85(8), 475-485 (Aug. 2011);
-%     Addenda: http://geographiclib.sourceforge.net/tm-addenda.html
+%     Addenda: https://geographiclib.sourceforge.io/tm-addenda.html
 %
 %   This extends the series given by Krueger (1912) to sixth order in the
 %   flattening.  This is a substantially better series than that used by
diff --git a/maxima/auxlat.mac b/maxima/auxlat.mac
index 15b09db..6b8b3d3 100644
--- a/maxima/auxlat.mac
+++ b/maxima/auxlat.mac
@@ -3,7 +3,7 @@ Compute series expansions for the auxiliary latitudes.
 
 Copyright (c) Charles Karney (2014) <charles at karney.com> and licensed
 under the MIT/X11 License.  For more information, see
-http://geographiclib.sourceforge.net/
+https://geographiclib.sourceforge.io/
 
 This maxima program compute the coefficients for trigonometric series
 relating the six latitudes
@@ -19,7 +19,7 @@ All 30 inter-relations are found.  The coefficients are expressed as
 Taylor series in the third flattening n.  This generates the series
 given on the page
 
-  http://geographiclib.sourceforge.net/html/auxlat.html
+  https://geographiclib.sourceforge.io/html/auxlat.html
 
 Instructions:
 
diff --git a/maxima/ellint.mac b/maxima/ellint.mac
index 0733713..01fcee3 100644
--- a/maxima/ellint.mac
+++ b/maxima/ellint.mac
@@ -6,7 +6,7 @@ Numerical Algorithms 10, 13-26 (1995)
 
 Copyright (c) Charles Karney (2009-2013) <charles at karney.com> and
 licensed under the MIT/X11 License.  For more information, see
-http://geographiclib.sourceforge.net/
+https://geographiclib.sourceforge.io/
 */
 
 /* fpprec:120$  Should be set outside */
diff --git a/maxima/gearea.mac b/maxima/gearea.mac
index 8463901..71cc08a 100644
--- a/maxima/gearea.mac
+++ b/maxima/gearea.mac
@@ -3,7 +3,7 @@ Compute the series expansion for the great ellipse area.
 
 Copyright (c) Charles Karney (2014) <charles at karney.com> and licensed
 under the MIT/X11 License.  For more information, see
-http://geographiclib.sourceforge.net/
+https://geographiclib.sourceforge.io/
 
 Area of great ellipse quad
 
diff --git a/maxima/geod.mac b/maxima/geod.mac
index a7b336f..403bd11 100644
--- a/maxima/geod.mac
+++ b/maxima/geod.mac
@@ -3,14 +3,14 @@ Compute the series expansions for the ellipsoidal geodesic problem.
 
 Copyright (c) Charles Karney (2009-2015) <charles at karney.com> and
 licensed under the MIT/X11 License.  For more information, see
-http://geographiclib.sourceforge.net/
+https://geographiclib.sourceforge.io/
 
 References:
 
    Charles F. F. Karney,
    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
    https://doi.org/10.1007/s00190-012-0578-z
-   Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+   Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 
 There are 4 sections in this file
 
diff --git a/maxima/geodesic.mac b/maxima/geodesic.mac
index dd76ef9..d272b68 100644
--- a/maxima/geodesic.mac
+++ b/maxima/geodesic.mac
@@ -3,14 +3,14 @@ Solve the direct and inverse geodesic problems accurately.
 
 Copyright (c) Charles Karney (2013-2017) <charles at karney.com> and
 licensed under the MIT/X11 License.  For more information, see
-http://geographiclib.sourceforge.net/
+https://geographiclib.sourceforge.io/
 
 References:
 
    Charles F. F. Karney,
    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
    https://doi.org/10.1007/s00190-012-0578-z
-   Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+   Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 
 This program solves the geodesic problem either using series expansions
 (exact : false) or using elliptic integrals (exact : true).  Elliptic
@@ -96,12 +96,12 @@ This returns a list, [a12, s12, azi1, azi2, m12, M12, M21, S12], e.g.,
 (10) The interface is copied from the C library for geodesics which is
 documented at
 
-  http://geographiclib.sourceforge.net/html/C/index.html
+  https://geographiclib.sourceforge.io/html/C/index.html
 
 */
 
 /* The corresponding version of GeographicLib */
-geod_version:[1,47,0]$
+geod_version:[1,48,0]$
 
 /* Load series created by geod.mac (NEED TO UNCOMMENT THE LAST LINE OF
 geod.mac TO GENERATE THIS FILE). */
@@ -197,11 +197,11 @@ swapx(x, y):=[y,x]$
 norm2(x, y):=block([r : hypotx(x, y)], [x/r, y/r])$
 
 AngNormalize(x):=block([y:x-360b0*floor(x/360b0+0.5)],
-  if y < -180b0 then y+360b0 else if y < 180b0 then y else y-360b0)$
+  if y <= -180b0 then y+360b0 else if y <= 180b0 then y else y-360b0)$
 
-AngDiff(x, y) := block([t,d,r:sumx(AngNormalize(x),AngNormalize(-y))],
-  d:-AngNormalize(r[1]), t:r[2],
-  sumx(if d = 180b0 and t < 0b0 then -180b0 else d, -t))$
+AngDiff(x, y) := block([t,d,r:sumx(AngNormalize(-x),AngNormalize(y))],
+  d:AngNormalize(r[1]), t:r[2],
+  sumx(if d = 180b0 and t > 0b0 then -180b0 else d, t))$
 
 AngRound(x) := block([z:1/16b0, y:abs(x)],
   if x = 0b0 then return(x),
@@ -212,10 +212,13 @@ sincosdx(x):=block([r,q:floor(x/90b0 + 0.5),s,c],
   r:(x-q*90b0)*degree,
   s:sin(r), c:cos(r),
   q:mod(q,4),
-  if     q = 0 then [  s,   c]
-  elseif q = 1 then [  c, 0-s]
-  elseif q = 2 then [0-s, 0-c]
-  else              [0-c,   s])$
+  r:
+  if     q = 0 then [ s,  c]
+  elseif q = 1 then [ c, -s]
+  elseif q = 2 then [-s, -c]
+  else              [-c,  s],
+  if x # 0b0 then r:0b0+r,
+  r)$
 
 atan2dx(y,x):=block([q,xx,yy,ang],
   if abs(y) > abs(x)
@@ -225,7 +228,7 @@ atan2dx(y,x):=block([q,xx,yy,ang],
   then (xx:-xx, q:q+1),
   ang:atan2(yy, xx) / degree,
   if     q = 0 then ang
-  elseif q = 1 then (if y > 0b0 then 180b0 else -180b0) - ang
+  elseif q = 1 then (if y >= 0b0 then 180b0 else -180b0) - ang
   elseif q = 2 then  90 - ang
   else              -90 + ang)$
 
@@ -487,7 +490,6 @@ geod_genposition(l, arcmode,  s12_a12):=block(
   /* Don't normalize lon2... */
   lon2 : l[l_lon1] + lon12,
   lat2 : atan2dx(sbet2, l[l_f1] * cbet2),
-  /* minus signs give range [-180, 180). 0- converts -0 to +0. */
   azi2 : atan2dx(salp2, calp2),
   block([B22, AB2, J12],
     if exact then J12 : l[l_k2] * l[l_D0] *
@@ -712,7 +714,7 @@ geod_geninverse(g, lat1, lon1, lat2, lon2):=block(
             tripn : is(abs(v) <= 16 * tol0),
             contflag:true ) ),
         if not contflag then (
-          /* Either dv was not postive or updated value was outside legal
+          /* Either dv was not positive or updated value was outside legal
           range.  Use the midpoint of the bracket as the next estimate.
           This mechanism is not needed for the WGS84 ellipsoid, but it does
           catch problems with more eccentric ellipsoids.  Its efficacy is
@@ -1162,8 +1164,8 @@ transit(lon1, lon2):=block([lon12],
   lon1 : AngNormalize(lon1),
   lon2 : AngNormalize(lon2),
   lon12 : AngDiff(lon1, lon2)[1],
-  if lon1 < 0b0 and lon2 >= 0b0 and lon12 > 0b0 then 1 else
-  (if lon2 < 0b0 and lon1 >= 0b0 and lon12 < 0b0 then -1 else 0))$
+  if lon1 <= 0b0 and lon2 > 0b0 and lon12 > 0b0 then 1 else
+  (if lon2 <= 0b0 and lon1 > 0b0 and lon12 < 0b0 then -1 else 0))$
 
 /* Return [P, A, mins, maxs] */
 geod_polygonarea(g, points) := block([n:length(points), crossings : 0,
diff --git a/maxima/rhumbarea.mac b/maxima/rhumbarea.mac
index c19f0b1..8fde574 100644
--- a/maxima/rhumbarea.mac
+++ b/maxima/rhumbarea.mac
@@ -3,7 +3,7 @@ Compute the series expansion for the rhumb area.
 
 Copyright (c) Charles Karney (2014) <charles at karney.com> and licensed
 under the MIT/X11 License.  For more information, see
-http://geographiclib.sourceforge.net/
+https://geographiclib.sourceforge.io/
 
 Instructions: edit the value of maxpow near the end of this file.  Then
 load the file into maxima.
diff --git a/maxima/tm.mac b/maxima/tm.mac
index d0bfe7e..7b2ecc5 100644
--- a/maxima/tm.mac
+++ b/maxima/tm.mac
@@ -4,7 +4,7 @@ Arbitrary precision Transverse Mercator Projection
 
 Copyright (c) Charles Karney (2009-2017) <charles at karney.com> and
 licensed under the MIT/X11 License.  For more information, see
-http://geographiclib.sourceforge.net/
+https://geographiclib.sourceforge.io/
 
 Reference:
 
@@ -13,7 +13,7 @@ Reference:
    J. Geodesy 85(8), 475-485 (Aug. 2011).
    DOI 10.1007/s00190-011-0445-3
    preprint https://arxiv.org/abs/1002.1417
-   resource page http://geographiclib.sourceforge.net/tm.html
+   resource page https://geographiclib.sourceforge.io/tm.html
 
 The parameters for the transformation are set by
 
diff --git a/maxima/tmseries.mac b/maxima/tmseries.mac
index 4c31c42..86eba0c 100644
--- a/maxima/tmseries.mac
+++ b/maxima/tmseries.mac
@@ -3,7 +3,7 @@ Compute series approximations for Transverse Mercator Projection
 
 Copyright (c) Charles Karney (2009-2010) <charles at karney.com> and
 licensed under the MIT/X11 License.  For more information, see
-http://geographiclib.sourceforge.net/
+https://geographiclib.sourceforge.io/
 
 Reference:
 
@@ -12,7 +12,7 @@ Reference:
    J. Geodesy 85(8), 475-485 (Aug. 2011).
    DOI 10.1007/s00190-011-0445-3
    preprint https://arxiv.org/abs/1002.1417
-   resource page http://geographiclib.sourceforge.net/tm.html
+   resource page https://geographiclib.sourceforge.io/tm.html
 
 Compute coefficient for forward and inverse trigonometric series for
 conversion from conformal latitude to rectifying latitude.  This prints
diff --git a/python/README.rst b/python/README.rst
index bd45034..804621f 100644
--- a/python/README.rst
+++ b/python/README.rst
@@ -4,4 +4,4 @@ This implements
 ellipsoid of revolution.
 
 Documentation is available at
-`<http://geographiclib.sourceforge.net/1.47/python/>`_.
+`<https://geographiclib.sourceforge.io/1.48/python/>`_.
diff --git a/python/doc/geodesics.rst b/python/doc/geodesics.rst
index e35d25c..df4875b 100644
--- a/python/doc/geodesics.rst
+++ b/python/doc/geodesics.rst
@@ -32,7 +32,7 @@ points.  In this figure, we have λ\ :sub:`12` =
     .. raw:: html
 
        <center>
-         <img src="http://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg"
+         <img src="https://upload.wikimedia.org/wikipedia/commons/c/cb/Geodesic_problem_on_an_ellipsoid.svg"
               alt="Figure from wikipedia"
               width="250">
        </center>
@@ -190,15 +190,15 @@ References
   `Algorithms for geodesics
   <https://doi.org/10.1007/s00190-012-0578-z>`_,
   J. Geodesy **87**\ (1) 43–55 (2013);
-  `addenda <http://geographiclib.sourceforge.net/geod-addenda.html>`_.
+  `addenda <https://geographiclib.sourceforge.io/geod-addenda.html>`_.
 * C. F. F. Karney,
   `Geodesics on an ellipsoid of revolution
   <https://arxiv.org/abs/1102.1215v1>`_,
   Feb. 2011;
   `errata
-  <http://geographiclib.sourceforge.net/geod-addenda.html#geod-errata>`_.
+  <https://geographiclib.sourceforge.io/geod-addenda.html#geod-errata>`_.
 * `A geodesic bibliography
-  <http://geographiclib.sourceforge.net/geodesic-papers/biblio.html>`_.
+  <https://geographiclib.sourceforge.io/geodesic-papers/biblio.html>`_.
 * The wikipedia page,
   `Geodesics on an ellipsoid
   <https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>`_.
diff --git a/python/doc/index.rst b/python/doc/index.rst
index 00f866e..89a3362 100644
--- a/python/doc/index.rst
+++ b/python/doc/index.rst
@@ -11,17 +11,17 @@ Author: Charles F. F. Karney (charles at karney.com)
 Version: |version|
 
 The documentation for other versions is available at
-``http://geographiclib.sourceforge.net/m.nn/python/`` for versions numbers
+``https://geographiclib.sourceforge.io/m.nn/python/`` for versions numbers
 ``m.nn`` ≥ 1.46.
 
 Licensed under the MIT/X11 License; see
-`LICENSE.txt <http://geographiclib.sourceforge.net/html/LICENSE.txt>`_.
+`LICENSE.txt <https://geographiclib.sourceforge.io/html/LICENSE.txt>`_.
 
 Introduction
 ============
 
 This is a python implementation of the geodesic routines in
-`GeographicLib <http://geographiclib.sourceforge.net>`_.
+`GeographicLib <https://geographiclib.sourceforge.io>`_.
 
 Although it is maintained in conjunction with the larger C++ library,
 this python package can be used independently.
@@ -29,9 +29,9 @@ this python package can be used independently.
 Installation
 ------------
 
-The full `Geographic <http://geographiclib.sourceforge.net>`_ package
+The full `Geographic <https://geographiclib.sourceforge.io>`_ package
 can be downloaded from
-`sourceforge <http://sourceforge.net/projects/geographiclib/files/distrib>`_.
+`sourceforge <https://sourceforge.net/projects/geographiclib/files/distrib>`_.
 However the python implementation is available as a stand-alone package.
 To install this, run
 
@@ -45,8 +45,8 @@ and install it with
 
 .. code-block:: sh
 
-  tar xpfz geographiclib-1.47.tar.gz
-  cd geographiclib-1.47
+  tar xpfz geographiclib-1.48.tar.gz
+  cd geographiclib-1.48
   python setup.py install
 
 It's a good idea to run the unit tests to verify that the installation
@@ -98,6 +98,11 @@ GeographicLib in various languages
 Change log
 ----------
 
+* Version 1.48 (released 2017-04-09)
+
+  * Change default range for longitude and azimuth to (−180°, 180°]
+    (instead of [−180°, 180°)).
+
 * Version 1.47 (released 2017-02-15)
 
   * Fix the packaging, incorporating the patches in version 1.46.3.
diff --git a/python/geographiclib/__init__.py b/python/geographiclib/__init__.py
index 6dd1a7b..3b5f8f5 100644
--- a/python/geographiclib/__init__.py
+++ b/python/geographiclib/__init__.py
@@ -1,7 +1,7 @@
 """geographiclib: geodesic routines from GeographicLib"""
 
-__version_info__ = (1, 47, 0)
+__version_info__ = (1, 48, 0)
 """GeographicLib version as a tuple"""
 
-__version__ = "1.47"
+__version__ = "1.48"
 """GeographicLib version as a string"""
diff --git a/python/geographiclib/accumulator.py b/python/geographiclib/accumulator.py
index 7d6aaca..7109f07 100644
--- a/python/geographiclib/accumulator.py
+++ b/python/geographiclib/accumulator.py
@@ -5,11 +5,11 @@
 # from to python.  See the documentation for the C++ class for more information
 # at
 #
-#    http://geographiclib.sourceforge.net/html/annotated.html
+#    https://geographiclib.sourceforge.io/html/annotated.html
 #
 # Copyright (c) Charles Karney (2011) <charles at karney.com> and licensed under
 # the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 ######################################################################
 
 from geographiclib.geomath import Math
diff --git a/python/geographiclib/constants.py b/python/geographiclib/constants.py
index 70d6d1a..8d01e8e 100644
--- a/python/geographiclib/constants.py
+++ b/python/geographiclib/constants.py
@@ -4,11 +4,11 @@
 # This is a translation of the GeographicLib::Constants class to python.  See
 # the documentation for the C++ class for more information at
 #
-#    http://geographiclib.sourceforge.net/html/annotated.html
+#    https://geographiclib.sourceforge.io/html/annotated.html
 #
 # Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and
 # licensed under the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 ######################################################################
 
 class Constants(object):
diff --git a/python/geographiclib/geodesic.py b/python/geographiclib/geodesic.py
index a6555e8..08732e7 100644
--- a/python/geographiclib/geodesic.py
+++ b/python/geographiclib/geodesic.py
@@ -63,18 +63,18 @@ The public attributes for this class are
 # This is a rather literal translation of the GeographicLib::Geodesic class to
 # python.  See the documentation for the C++ class for more information at
 #
-#    http://geographiclib.sourceforge.net/html/annotated.html
+#    https://geographiclib.sourceforge.io/html/annotated.html
 #
 # The algorithms are derived in
 #
 #    Charles F. F. Karney,
 #    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
 #    https://doi.org/10.1007/s00190-012-0578-z
-#    Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+#    Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 #
 # Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
 # under the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 ######################################################################
 
 import math
@@ -907,7 +907,7 @@ class Geodesic(object):
               # instead of sqrt(epsilon).
               tripn = abs(v) <= 16 * Geodesic.tol0_
               continue
-          # Either dv was not postive or updated value was outside legal range.
+          # Either dv was not positive or updated value was outside legal range.
           # Use the midpoint of the bracket as the next estimate.  This
           # mechanism is not needed for the WGS84 ellipsoid, but it does catch
           # problems with more eccentric ellipsoids.  Its efficacy is such for
@@ -1284,7 +1284,7 @@ class Geodesic(object):
   """All of the above."""
   LONG_UNROLL   = GeodesicCapability.LONG_UNROLL
   """Unroll longitudes, rather than reducing them to the reducing them to
-  the range [-180d,180d)."""
+  the range [-180d,180d]."""
 
 Geodesic.WGS84 = Geodesic(Constants.WGS84_a, Constants.WGS84_f)
 """Instantiation for the WGS84 ellipsoid"""
diff --git a/python/geographiclib/geodesiccapability.py b/python/geographiclib/geodesiccapability.py
index 43ddb91..4015b4e 100644
--- a/python/geographiclib/geodesiccapability.py
+++ b/python/geographiclib/geodesiccapability.py
@@ -5,11 +5,11 @@
 # geodesicline.py.  See the documentation for the GeographicLib::Geodesic class
 # for more information at
 #
-#    http://geographiclib.sourceforge.net/html/annotated.html
+#    https://geographiclib.sourceforge.io/html/annotated.html
 #
 # Copyright (c) Charles Karney (2011-2014) <charles at karney.com> and licensed
 # under the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 ######################################################################
 
 class GeodesicCapability(object):
diff --git a/python/geographiclib/geodesicline.py b/python/geographiclib/geodesicline.py
index 4e72544..3e558a0 100644
--- a/python/geographiclib/geodesicline.py
+++ b/python/geographiclib/geodesicline.py
@@ -42,18 +42,18 @@ The public attributes for this class are
 # This is a rather literal translation of the GeographicLib::GeodesicLine class
 # to python.  See the documentation for the C++ class for more information at
 #
-#    http://geographiclib.sourceforge.net/html/annotated.html
+#    https://geographiclib.sourceforge.io/html/annotated.html
 #
 # The algorithms are derived in
 #
 #    Charles F. F. Karney,
 #    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
 #    https://doi.org/10.1007/s00190-012-0578-z
-#    Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+#    Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 #
 # Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and licensed
 # under the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 ######################################################################
 
 import math
@@ -293,7 +293,6 @@ class GeodesicLine(object):
       lat2 = Math.atan2d(sbet2, self._f1 * cbet2)
 
     if outmask & Geodesic.AZIMUTH:
-      # minus signs give range [-180, 180). 0- converts -0 to +0.
       azi2 = Math.atan2d(salp2, calp2)
 
     if outmask & (Geodesic.REDUCEDLENGTH | Geodesic.GEODESICSCALE):
diff --git a/python/geographiclib/geomath.py b/python/geographiclib/geomath.py
index af3daad..e9cc1ec 100644
--- a/python/geographiclib/geomath.py
+++ b/python/geographiclib/geomath.py
@@ -4,11 +4,11 @@
 # This is a rather literal translation of the GeographicLib::Math class to
 # python.  See the documentation for the C++ class for more information at
 #
-#    http://geographiclib.sourceforge.net/html/annotated.html
+#    https://geographiclib.sourceforge.io/html/annotated.html
 #
-# Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and
+# Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and
 # licensed under the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 ######################################################################
 
 import sys
@@ -127,11 +127,15 @@ class Math(object):
   AngRound = staticmethod(AngRound)
 
   def AngNormalize(x):
-    """reduce angle to [-180,180)"""
-
-    x = math.fmod(x, 360)
-    return (x + 360 if x < -180 else
-            (x if x < 180 else x - 360))
+    """reduce angle to (-180,180]"""
+
+    y = math.fmod(x, 360)
+    # On Windows 32-bit with python 2.7, math.fmod(-0.0, 360) = +0.0
+    # This fixes this bug.  See also Math::AngNormalize in the C++ library.
+    # sincosd has a similar fix.
+    y = x if x == 0 else y
+    return (y + 360 if y <= -180 else
+            (y if y <= 180 else y - 360))
   AngNormalize = staticmethod(AngNormalize)
 
   def LatFix(x):
@@ -143,9 +147,9 @@ class Math(object):
   def AngDiff(x, y):
     """compute y - x and reduce to [-180,180] accurately"""
 
-    d, t = Math.sum(Math.AngNormalize(x), Math.AngNormalize(-y))
-    d = - Math.AngNormalize(d)
-    return Math.sum(-180 if d == 180 and t < 0 else d, -t)
+    d, t = Math.sum(Math.AngNormalize(-x), Math.AngNormalize(y))
+    d = Math.AngNormalize(d)
+    return Math.sum(-180 if d == 180 and t > 0 else d, t)
   AngDiff = staticmethod(AngDiff)
 
   def sincosd(x):
@@ -157,11 +161,16 @@ class Math(object):
     s = math.sin(r); c = math.cos(r)
     q = q % 4
     if q == 1:
-      s, c =     c, 0.0-s
+      s, c =  c, -s
     elif q == 2:
-      s, c = 0.0-s, 0.0-c
+      s, c = -s, -c
     elif q == 3:
-      s, c = 0.0-c,     s
+      s, c = -c,  s
+    # Remove the minus sign on -0.0 except for sin(-0.0).
+    # On Windows 32-bit with python 2.7, math.fmod(-0.0, 360) = +0.0
+    # (x, c) here fixes this bug.  See also Math::sincosd in the C++ library.
+    # AngNormalize has a similar fix.
+    s, c = (x, c) if x == 0 else (0.0+s, 0.0+c)
     return s, c
   sincosd = staticmethod(sincosd)
 
@@ -176,7 +185,7 @@ class Math(object):
       q += 1; x = -x
     ang = math.degrees(math.atan2(y, x))
     if q == 1:
-      ang = (180 if y > 0 else -180) - ang
+      ang = (180 if y >= 0 else -180) - ang
     elif q == 2:
       ang =  90 - ang
     elif q == 3:
diff --git a/python/geographiclib/polygonarea.py b/python/geographiclib/polygonarea.py
index 9377c63..fed41ab 100644
--- a/python/geographiclib/polygonarea.py
+++ b/python/geographiclib/polygonarea.py
@@ -30,18 +30,18 @@ The public attributes for this class are
 # This is a rather literal translation of the GeographicLib::PolygonArea class
 # to python.  See the documentation for the C++ class for more information at
 #
-#    http://geographiclib.sourceforge.net/html/annotated.html
+#    https://geographiclib.sourceforge.io/html/annotated.html
 #
 # The algorithms are derived in
 #
 #    Charles F. F. Karney,
 #    Algorithms for geodesics, J. Geodesy 87, 43-55 (2013),
 #    https://doi.org/10.1007/s00190-012-0578-z
-#    Addenda: http://geographiclib.sourceforge.net/geod-addenda.html
+#    Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
 #
-# Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and licensed
+# Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
 # under the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 ######################################################################
 
 import math
@@ -59,8 +59,8 @@ class PolygonArea(object):
     lon1 = Math.AngNormalize(lon1)
     lon2 = Math.AngNormalize(lon2)
     lon12, _ = Math.AngDiff(lon1, lon2)
-    cross = (1 if lon1 < 0 and lon2 >= 0 and lon12 > 0
-             else (-1 if lon2 < 0 and lon1 >= 0 and lon12 < 0 else 0))
+    cross = (1 if lon1 <= 0 and lon2 > 0 and lon12 > 0
+             else (-1 if lon2 <= 0 and lon1 > 0 and lon12 < 0 else 0))
     return cross
   _transit = staticmethod(_transit)
 
diff --git a/python/geographiclib/test/test_geodesic.py b/python/geographiclib/test/test_geodesic.py
index 16b4dcf..c6d2aaf 100644
--- a/python/geographiclib/test/test_geodesic.py
+++ b/python/geographiclib/test/test_geodesic.py
@@ -171,7 +171,7 @@ class GeodSolveTest(unittest.TestCase):
     self.assertAlmostEqual(dir["lat2"], 90, delta = 0.5e-5)
     if dir["lon2"] < 0:
       self.assertAlmostEqual(dir["lon2"], -150, delta = 0.5e-5)
-      self.assertAlmostEqual(dir["azi2"], -180, delta = 0.5e-5)
+      self.assertAlmostEqual(abs(dir["azi2"]), 180, delta = 0.5e-5)
     else:
       self.assertAlmostEqual(dir["lon2"], 30, delta = 0.5e-5)
       self.assertAlmostEqual(dir["azi2"], 0, delta = 0.5e-5)
@@ -296,11 +296,11 @@ class GeodSolveTest(unittest.TestCase):
     self.assertAlmostEqual(inv["s12"], 19980862, delta = 0.5)
     inv = Geodesic.WGS84.Inverse(0, 0, 0, 180)
     self.assertAlmostEqual(inv["azi1"], 0.00000, delta = 0.5e-5)
-    self.assertAlmostEqual(inv["azi2"], -180.00000, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(inv["azi2"]), 180.00000, delta = 0.5e-5)
     self.assertAlmostEqual(inv["s12"], 20003931, delta = 0.5)
     inv = Geodesic.WGS84.Inverse(0, 0, 1, 180)
     self.assertAlmostEqual(inv["azi1"], 0.00000, delta = 0.5e-5)
-    self.assertAlmostEqual(inv["azi2"], -180.00000, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(inv["azi2"]), 180.00000, delta = 0.5e-5)
     self.assertAlmostEqual(inv["s12"], 19893357, delta = 0.5)
     geod = Geodesic(6.4e6, 0)
     inv = geod.Inverse(0, 0, 0, 179)
@@ -309,11 +309,11 @@ class GeodSolveTest(unittest.TestCase):
     self.assertAlmostEqual(inv["s12"], 19994492, delta = 0.5)
     inv = geod.Inverse(0, 0, 0, 180)
     self.assertAlmostEqual(inv["azi1"], 0.00000, delta = 0.5e-5)
-    self.assertAlmostEqual(inv["azi2"], -180.00000, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(inv["azi2"]), 180.00000, delta = 0.5e-5)
     self.assertAlmostEqual(inv["s12"], 20106193, delta = 0.5)
     inv = geod.Inverse(0, 0, 1, 180)
     self.assertAlmostEqual(inv["azi1"], 0.00000, delta = 0.5e-5)
-    self.assertAlmostEqual(inv["azi2"], -180.00000, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(inv["azi2"]), 180.00000, delta = 0.5e-5)
     self.assertAlmostEqual(inv["s12"], 19994492, delta = 0.5)
     geod = Geodesic(6.4e6, -1/300.0)
     inv = geod.Inverse(0, 0, 0, 179)
@@ -330,7 +330,7 @@ class GeodSolveTest(unittest.TestCase):
     self.assertAlmostEqual(inv["s12"], 20082617, delta = 0.5)
     inv = geod.Inverse(0, 0, 1, 180)
     self.assertAlmostEqual(inv["azi1"], 0.00000, delta = 0.5e-5)
-    self.assertAlmostEqual(inv["azi2"], -180.00000, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(inv["azi2"]), 180.00000, delta = 0.5e-5)
     self.assertAlmostEqual(inv["s12"], 20027270, delta = 0.5)
 
   def test_GeodSolve55(self):
@@ -358,12 +358,12 @@ class GeodSolveTest(unittest.TestCase):
                   Geodesic.STANDARD | Geodesic.LONG_UNROLL)
     self.assertAlmostEqual(dir["lat2"], 45.30632, delta = 0.5e-5)
     self.assertAlmostEqual(dir["lon2"], -180, delta = 0.5e-5)
-    self.assertAlmostEqual(dir["azi2"], -180, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(dir["azi2"]), 180, delta = 0.5e-5)
     line = Geodesic.WGS84.InverseLine(45, 0, 80, -0.000000000000000003)
-    dir = line.Position(1e7)
+    dir = line.Position(1e7, Geodesic.STANDARD | Geodesic.LONG_UNROLL)
     self.assertAlmostEqual(dir["lat2"], 45.30632, delta = 0.5e-5)
     self.assertAlmostEqual(dir["lon2"], -180, delta = 0.5e-5)
-    self.assertAlmostEqual(dir["azi2"], -180, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(dir["azi2"]), 180, delta = 0.5e-5)
 
   def test_GeodSolve65(self):
     # Check for bug in east-going check in GeodesicLine (needed to check for
@@ -374,10 +374,10 @@ class GeodSolveTest(unittest.TestCase):
     dir = line.Position(1e7, Geodesic.ALL | Geodesic.LONG_UNROLL)
     self.assertAlmostEqual(dir["lat1"], 30.00000  , delta = 0.5e-5)
     self.assertAlmostEqual(dir["lon1"], -0.00000  , delta = 0.5e-5)
-    self.assertAlmostEqual(dir["azi1"], -180.00000, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(dir["azi1"]), 180.00000, delta = 0.5e-5)
     self.assertAlmostEqual(dir["lat2"], -60.23169 , delta = 0.5e-5)
     self.assertAlmostEqual(dir["lon2"], -0.00000  , delta = 0.5e-5)
-    self.assertAlmostEqual(dir["azi2"], -180.00000, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(dir["azi2"]), 180.00000, delta = 0.5e-5)
     self.assertAlmostEqual(dir["s12"] , 10000000  , delta = 0.5)
     self.assertAlmostEqual(dir["a12"] , 90.06544  , delta = 0.5e-5)
     self.assertAlmostEqual(dir["m12"] , 6363636   , delta = 0.5)
@@ -387,7 +387,7 @@ class GeodSolveTest(unittest.TestCase):
     dir = line.Position(2e7, Geodesic.ALL | Geodesic.LONG_UNROLL)
     self.assertAlmostEqual(dir["lat1"], 30.00000  , delta = 0.5e-5)
     self.assertAlmostEqual(dir["lon1"], -0.00000  , delta = 0.5e-5)
-    self.assertAlmostEqual(dir["azi1"], -180.00000, delta = 0.5e-5)
+    self.assertAlmostEqual(abs(dir["azi1"]), 180.00000, delta = 0.5e-5)
     self.assertAlmostEqual(dir["lat2"], -30.03547 , delta = 0.5e-5)
     self.assertAlmostEqual(dir["lon2"], -180.00000, delta = 0.5e-5)
     self.assertAlmostEqual(dir["azi2"], -0.00000  , delta = 0.5e-5)
diff --git a/python/setup.py b/python/setup.py
index ac82aba..4f68283 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -38,7 +38,7 @@ class TestCommand(Command):
                                           ]))
 
 name = "geographiclib"
-version = "1.47"
+version = "1.48"
 
 setup(name = name,
       version = version,
@@ -46,7 +46,7 @@ setup(name = name,
       long_description = open("README.rst").read(),
       author = "Charles Karney",
       author_email = "charles at karney.com",
-      url = "http://geographiclib.sourceforge.net/" + version + "/python",
+      url = "https://geographiclib.sourceforge.io/" + version + "/python",
       packages = ["geographiclib", "geographiclib/test"],
       data_files = [],
       license = "MIT",
diff --git a/src/Accumulator.cpp b/src/Accumulator.cpp
index 2d2d556..d2b00b3 100644
--- a/src/Accumulator.cpp
+++ b/src/Accumulator.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2013) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/Accumulator.hpp>
diff --git a/src/AlbersEqualArea.cpp b/src/AlbersEqualArea.cpp
index 22ca5f2..95ee2b5 100644
--- a/src/AlbersEqualArea.cpp
+++ b/src/AlbersEqualArea.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/AlbersEqualArea.hpp>
diff --git a/src/AzimuthalEquidistant.cpp b/src/AzimuthalEquidistant.cpp
index 5ccc8f8..939f71b 100644
--- a/src/AzimuthalEquidistant.cpp
+++ b/src/AzimuthalEquidistant.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/AzimuthalEquidistant.hpp>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5b3ead3..267f368 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,7 +6,6 @@ file (GLOB HEADERS
   ${PROJECT_BINARY_DIR}/include/GeographicLib/Config.h
   ../include/GeographicLib/[A-Za-z]*.hpp)
 
-add_definitions (-DGEOGRAPHICLIB_DATA="${GEOGRAPHICLIB_DATA}")
 # Define the library and specify whether it is shared or not.
 if (GEOGRAPHICLIB_SHARED_LIB)
   add_library (${PROJECT_SHARED_LIBRARIES} SHARED ${SOURCES} ${HEADERS})
@@ -98,7 +97,6 @@ endif ()
 
 if (MSVC AND GEOGRAPHICLIB_SHARED_LIB)
   if (NOT CMAKE_VERSION VERSION_LESS 3.1)
-    message (STATUS "Using TARGET_PDB_FILE")
     install (FILES $<TARGET_PDB_FILE:${PROJECT_SHARED_LIBRARIES}>
       DESTINATION bin OPTIONAL)
   else ()
diff --git a/src/CassiniSoldner.cpp b/src/CassiniSoldner.cpp
index ecd0297..e53b5d2 100644
--- a/src/CassiniSoldner.cpp
+++ b/src/CassiniSoldner.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/CassiniSoldner.hpp>
diff --git a/src/CircularEngine.cpp b/src/CircularEngine.cpp
index dd65d94..5236089 100644
--- a/src/CircularEngine.cpp
+++ b/src/CircularEngine.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/CircularEngine.hpp>
diff --git a/src/DMS.cpp b/src/DMS.cpp
index 8c46c8c..077ee71 100644
--- a/src/DMS.cpp
+++ b/src/DMS.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/DMS.hpp>
diff --git a/src/Ellipsoid.cpp b/src/Ellipsoid.cpp
index 861a9d5..e71c28b 100644
--- a/src/Ellipsoid.cpp
+++ b/src/Ellipsoid.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2012-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/Ellipsoid.hpp>
diff --git a/src/EllipticFunction.cpp b/src/EllipticFunction.cpp
index f85855b..9047616 100644
--- a/src/EllipticFunction.cpp
+++ b/src/EllipticFunction.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/EllipticFunction.hpp>
diff --git a/src/GARS.cpp b/src/GARS.cpp
index d846250..81b5333 100644
--- a/src/GARS.cpp
+++ b/src/GARS.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2015) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/GARS.hpp>
diff --git a/src/GeoCoords.cpp b/src/GeoCoords.cpp
index f375ef7..7faa09e 100644
--- a/src/GeoCoords.cpp
+++ b/src/GeoCoords.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/GeoCoords.hpp>
diff --git a/src/Geocentric.cpp b/src/Geocentric.cpp
index 1130a83..cf37b6a 100644
--- a/src/Geocentric.cpp
+++ b/src/Geocentric.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/Geocentric.hpp>
diff --git a/src/Geodesic.cpp b/src/Geodesic.cpp
index d2d6d49..8656baa 100644
--- a/src/Geodesic.cpp
+++ b/src/Geodesic.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * This is a reformulation of the geodesic problem.  The notation is as
  * follows:
diff --git a/src/GeodesicExact.cpp b/src/GeodesicExact.cpp
index f823345..e9bfbf1 100644
--- a/src/GeodesicExact.cpp
+++ b/src/GeodesicExact.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2012-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * This is a reformulation of the geodesic problem.  The notation is as
  * follows:
diff --git a/src/GeodesicExactC4.cpp b/src/GeodesicExactC4.cpp
index 2a6ab9f..702438e 100644
--- a/src/GeodesicExactC4.cpp
+++ b/src/GeodesicExactC4.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2014-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * This function is split from the rest of the implementation of
  * GeographicLib::GeodesicExact in order to work around a problem with the
diff --git a/src/GeodesicLine.cpp b/src/GeodesicLine.cpp
index 96eb181..9081c7c 100644
--- a/src/GeodesicLine.cpp
+++ b/src/GeodesicLine.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * This is a reformulation of the geodesic problem.  The notation is as
  * follows:
diff --git a/src/GeodesicLineExact.cpp b/src/GeodesicLineExact.cpp
index 5c92de6..83c8ffb 100644
--- a/src/GeodesicLineExact.cpp
+++ b/src/GeodesicLineExact.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2012-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * This is a reformulation of the geodesic problem.  The notation is as
  * follows:
diff --git a/src/Geohash.cpp b/src/Geohash.cpp
index 6e510f7..52c9d35 100644
--- a/src/Geohash.cpp
+++ b/src/Geohash.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2012-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/Geohash.hpp>
diff --git a/src/Geoid.cpp b/src/Geoid.cpp
index 87bc573..607a3b8 100644
--- a/src/Geoid.cpp
+++ b/src/Geoid.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/Geoid.hpp>
diff --git a/src/Georef.cpp b/src/Georef.cpp
index fd1155e..66b19a0 100644
--- a/src/Georef.cpp
+++ b/src/Georef.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2015) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/Georef.hpp>
diff --git a/src/Gnomonic.cpp b/src/Gnomonic.cpp
index 7d59b49..b06930f 100644
--- a/src/Gnomonic.cpp
+++ b/src/Gnomonic.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/Gnomonic.hpp>
diff --git a/src/GravityCircle.cpp b/src/GravityCircle.cpp
index 939da9e..4f074cd 100644
--- a/src/GravityCircle.cpp
+++ b/src/GravityCircle.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/GravityCircle.hpp>
diff --git a/src/GravityModel.cpp b/src/GravityModel.cpp
index 2450e57..add1cad 100644
--- a/src/GravityModel.cpp
+++ b/src/GravityModel.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/GravityModel.hpp>
diff --git a/src/LambertConformalConic.cpp b/src/LambertConformalConic.cpp
index de6285a..f919580 100644
--- a/src/LambertConformalConic.cpp
+++ b/src/LambertConformalConic.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/LambertConformalConic.hpp>
diff --git a/src/LocalCartesian.cpp b/src/LocalCartesian.cpp
index a914463..b29156d 100644
--- a/src/LocalCartesian.cpp
+++ b/src/LocalCartesian.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/LocalCartesian.hpp>
diff --git a/src/MGRS.cpp b/src/MGRS.cpp
index 50c31bf..646b86c 100644
--- a/src/MGRS.cpp
+++ b/src/MGRS.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/MGRS.hpp>
diff --git a/src/MagneticCircle.cpp b/src/MagneticCircle.cpp
index 7615192..7599ac4 100644
--- a/src/MagneticCircle.cpp
+++ b/src/MagneticCircle.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/MagneticCircle.hpp>
diff --git a/src/MagneticModel.cpp b/src/MagneticModel.cpp
index 036a25d..fab4b1e 100644
--- a/src/MagneticModel.cpp
+++ b/src/MagneticModel.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/MagneticModel.hpp>
diff --git a/src/Math.cpp b/src/Math.cpp
index d5a3c29..582f833 100644
--- a/src/Math.cpp
+++ b/src/Math.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/Math.hpp>
diff --git a/src/NormalGravity.cpp b/src/NormalGravity.cpp
index e906191..0181b66 100644
--- a/src/NormalGravity.cpp
+++ b/src/NormalGravity.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/NormalGravity.hpp>
@@ -44,7 +44,7 @@ namespace GeographicLib {
     _E = _a * sqrt(abs(_e2));   // H+M, Eq 2-54
     // H+M, Eq 2-61
     _U0 = _GM * atanzz(ex2, _f < 0) / _b + _aomega2 / 3;
-    real P = Gf(ex2, _f < 0) / (6 * _Q0);
+    real P = Hf(ex2, _f < 0) / (6 * _Q0);
     // H+M, Eq 2-73
     _gammae = _GM / (_a * _b) - (1 + P) * _a * _omega2;
     // H+M, Eq 2-74
@@ -137,10 +137,10 @@ namespace GeographicLib {
       (3 * (3 + y) * atan5series(y) - 1) / 6;
   }
 
-  Math::real NormalGravity::Gf(real x, bool alt) {
+  Math::real NormalGravity::Hf(real x, bool alt) {
     // z = sqrt(x)
     // Compute
-    //   G(z) = (3*Q(z)+z*diff(Q(z),z))*(1+z^2)
+    //   H(z) = (3*Q(z)+z*diff(Q(z),z))*(1+z^2)
     //        = (3 * (1 + 1/z^2) * (1 - atan(z)/z) - 1) / z^2
     //        = q'(z)/z^2, with q'(z) defined by H+M, Eq 2-67, with z = E/u
     real y = alt ? -x / (1 + x) : x;
@@ -149,9 +149,9 @@ namespace GeographicLib {
       1 - 3 * (1 + y) * atan5series(y);
   }
 
-  Math::real NormalGravity::QG3f(real x, bool alt) {
+  Math::real NormalGravity::QH3f(real x, bool alt) {
     // z = sqrt(x)
-    // (Q(z) - G(z)/3) / z^2
+    // (Q(z) - H(z)/3) / z^2
     //   = - (1+z^2)/(3*z) * d(Q(z))/dz - Q(z)
     //   = ((15+9*z^2)*atan(z)-4*z^3-15*z)/(6*z^7)
     //   = ((25+15*z^2)*atan7+3)/10
@@ -217,7 +217,7 @@ namespace GeographicLib {
       // Qf(z2->inf, false) = pi/(4*z^3)
       q = ((u != 0 || _f < 0 ? Qf(z2, _f < 0) : Math::pi() / 4) / _Q0) *
         bu * Math::sq(bu),
-      qp = _b * Math::sq(bu) * (u != 0 || _f < 0 ? Gf(z2, _f < 0) : 2) / _Q0,
+      qp = _b * Math::sq(bu) * (u != 0 || _f < 0 ? Hf(z2, _f < 0) : 2) / _Q0,
       ang = (Math::sq(sbet) - 1/real(3)) / 2,
       // H+M, Eqs 2-62 + 6-9, but omitting last (rotational) term.
       Vres = _GM * (u != 0 || _f < 0 ?
@@ -296,7 +296,7 @@ namespace GeographicLib {
         f1 = sqrt(f2),          // (1 - f)
         Q0 = Qf(e2 < 0 ? -e2 : ep2, e2 < 0),
         h = e2 - f1 * f2 * K / Q0 - 3 * J2,
-        dh = 1 - 3 * f1 * K * QG3f(e2 < 0 ? -e2 : ep2, e2 < 0) /
+        dh = 1 - 3 * f1 * K * QH3f(e2 < 0 ? -e2 : ep2, e2 < 0) /
                      (2 * Math::sq(Q0));
       e2 = min(e2a - h / dh, maxe_);
       ep2 = max(e2 / (1 - e2), -maxe_);
diff --git a/src/OSGB.cpp b/src/OSGB.cpp
index b0d4298..3a63a11 100644
--- a/src/OSGB.cpp
+++ b/src/OSGB.cpp
@@ -4,7 +4,7 @@
  *
  * 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/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/OSGB.hpp>
diff --git a/src/PolarStereographic.cpp b/src/PolarStereographic.cpp
index a6b2ef4..fbf6865 100644
--- a/src/PolarStereographic.cpp
+++ b/src/PolarStereographic.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/PolarStereographic.hpp>
diff --git a/src/PolygonArea.cpp b/src/PolygonArea.cpp
index 66cd77e..f234ae2 100644
--- a/src/PolygonArea.cpp
+++ b/src/PolygonArea.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/PolygonArea.hpp>
diff --git a/src/Rhumb.cpp b/src/Rhumb.cpp
index 711e7fd..8b4cb56 100644
--- a/src/Rhumb.cpp
+++ b/src/Rhumb.cpp
@@ -5,7 +5,7 @@
  *
  * Copyright (c) Charles Karney (2014-2015) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <algorithm>
diff --git a/src/SphericalEngine.cpp b/src/SphericalEngine.cpp
index ef0dfba..302337c 100644
--- a/src/SphericalEngine.cpp
+++ b/src/SphericalEngine.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * The general sum is\verbatim
  V(r, theta, lambda) = sum(n = 0..N) sum(m = 0..n)
diff --git a/src/TransverseMercator.cpp b/src/TransverseMercator.cpp
index 03777db..17d9714 100644
--- a/src/TransverseMercator.cpp
+++ b/src/TransverseMercator.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * This implementation follows closely
  * <a href="http://www.jhs-suositukset.fi/suomi/jhs154"> JHS 154, ETRS89 -
diff --git a/src/TransverseMercatorExact.cpp b/src/TransverseMercatorExact.cpp
index c15c81b..95decc1 100644
--- a/src/TransverseMercatorExact.cpp
+++ b/src/TransverseMercatorExact.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * The relevant section of Lee's paper is part V, pp 67--101,
  * <a href="https://doi.org/10.3138/X687-1574-4325-WM62">Conformal
diff --git a/src/UTMUPS.cpp b/src/UTMUPS.cpp
index edd574c..d02d62d 100644
--- a/src/UTMUPS.cpp
+++ b/src/UTMUPS.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2016) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <GeographicLib/UTMUPS.hpp>
@@ -233,7 +233,8 @@ namespace GeographicLib {
                           + Utility::str(zone1));
 
     string hemi(zonestr, q - c);
-    transform(hemi.begin(), hemi.end(), hemi.begin(), (int(*)(int))tolower);
+    for (std::string::iterator p = hemi.begin(); p != hemi.end(); ++p)
+      *p = char(std::tolower(*p));
     if (q == c && (hemi == "inv" || hemi == "invalid")) {
       zone = INVALID;
       northp = false;
diff --git a/src/Utility.cpp b/src/Utility.cpp
index 68fb74d..55da6e9 100644
--- a/src/Utility.cpp
+++ b/src/Utility.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011) <charles at karney.com> and licensed under
  * the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 #include <cstdlib>
diff --git a/tools/CartConvert.cpp b/tools/CartConvert.cpp
index e2d29ea..2f648ea 100644
--- a/tools/CartConvert.cpp
+++ b/tools/CartConvert.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="CartConvert.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/ConicProj.cpp b/tools/ConicProj.cpp
index c24791d..1fd350b 100644
--- a/tools/ConicProj.cpp
+++ b/tools/ConicProj.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="ConicProj.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/GeoConvert.cpp b/tools/GeoConvert.cpp
index 9edcb13..2489200 100644
--- a/tools/GeoConvert.cpp
+++ b/tools/GeoConvert.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="GeoConvert.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/GeodSolve.cpp b/tools/GeodSolve.cpp
index 7f971de..a0ee394 100644
--- a/tools/GeodSolve.cpp
+++ b/tools/GeodSolve.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="GeodSolve.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/GeodesicProj.cpp b/tools/GeodesicProj.cpp
index 8d186fa..ff9d1f3 100644
--- a/tools/GeodesicProj.cpp
+++ b/tools/GeodesicProj.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="GeodesicProj.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/GeoidEval.cpp b/tools/GeoidEval.cpp
index d80d5df..7050cfd 100644
--- a/tools/GeoidEval.cpp
+++ b/tools/GeoidEval.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2009-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="GeoidEval.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/Gravity.cpp b/tools/Gravity.cpp
index 21461fd..86311c3 100644
--- a/tools/Gravity.cpp
+++ b/tools/Gravity.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="Gravity.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/MagneticField.cpp b/tools/MagneticField.cpp
index 09525d7..3564157 100644
--- a/tools/MagneticField.cpp
+++ b/tools/MagneticField.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2011-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="MagneticField.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/Planimeter.cpp b/tools/Planimeter.cpp
index d8dd6f4..8105cca 100644
--- a/tools/Planimeter.cpp
+++ b/tools/Planimeter.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="Planimeter.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/RhumbSolve.cpp b/tools/RhumbSolve.cpp
index 4bc4bac..5c363a4 100644
--- a/tools/RhumbSolve.cpp
+++ b/tools/RhumbSolve.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2014-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="RhumbSolve.1.html">man page</a> for usage information.
  **********************************************************************/
diff --git a/tools/TransverseMercatorProj.cpp b/tools/TransverseMercatorProj.cpp
index 9e3c247..af82ba5 100644
--- a/tools/TransverseMercatorProj.cpp
+++ b/tools/TransverseMercatorProj.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2008-2017) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  *
  * See the <a href="TransverseMercatorProj.1.html">man page</a> for usage
  * information.
diff --git a/tools/geographiclib-get-geoids.sh b/tools/geographiclib-get-geoids.sh
index 7290eb2..950a370 100644
--- a/tools/geographiclib-get-geoids.sh
+++ b/tools/geographiclib-get-geoids.sh
@@ -6,7 +6,7 @@
 #
 # Copyright (c) Charles Karney (2011-2013) <charles at karney.com> and
 # licensed under the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 
 DEFAULTDIR="@GEOGRAPHICLIB_DATA@"
 SUBDIR=geoids
@@ -62,7 +62,7 @@ will be saved.  -h prints this help.
 
 For more information on the $NAME datasets, visit
 
-  http://geographiclib.sourceforge.net/html/$NAME.html
+  https://geographiclib.sourceforge.io/html/$NAME.html
 
 EOF
 }
@@ -176,7 +176,7 @@ while read file; do
     fi
     echo download $file.tar.bz2 ...
     echo $file >> $TEMP/download
-    URL="http://downloads.sourceforge.net/project/geographiclib/$SUBDIR-distrib/$file.tar.bz2?use_mirror=autoselect"
+    URL="https://downloads.sourceforge.net/project/geographiclib/$SUBDIR-distrib/$file.tar.bz2?use_mirror=autoselect"
     ARCHIVE=$TEMP/$file.tar.bz2
     wget -O$ARCHIVE $URL
     echo unpack $file.tar.bz2 ...
diff --git a/tools/geographiclib-get-gravity.sh b/tools/geographiclib-get-gravity.sh
index 68547db..fd6904c 100644
--- a/tools/geographiclib-get-gravity.sh
+++ b/tools/geographiclib-get-gravity.sh
@@ -4,7 +4,7 @@
 #
 # Copyright (c) Charles Karney (2011) <charles at karney.com> and licensed
 # under the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 
 DEFAULTDIR="@GEOGRAPHICLIB_DATA@"
 SUBDIR=gravity
@@ -53,7 +53,7 @@ will be saved.  -h prints this help.
 
 For more information on the $NAME datasets, visit
 
-  http://geographiclib.sourceforge.net/html/$NAME.html
+  https://geographiclib.sourceforge.io/html/$NAME.html
 
 EOF
 }
@@ -151,7 +151,7 @@ while read file; do
     fi
     echo download $file.tar.bz2 ...
     echo $file >> $TEMP/download
-    URL="http://downloads.sourceforge.net/project/geographiclib/$SUBDIR-distrib/$file.tar.bz2?use_mirror=autoselect"
+    URL="https://downloads.sourceforge.net/project/geographiclib/$SUBDIR-distrib/$file.tar.bz2?use_mirror=autoselect"
     ARCHIVE=$TEMP/$file.tar.bz2
     wget -O$ARCHIVE $URL
     echo unpack $file.tar.bz2 ...
diff --git a/tools/geographiclib-get-magnetic.sh b/tools/geographiclib-get-magnetic.sh
index b91826b..dcd9a21 100644
--- a/tools/geographiclib-get-magnetic.sh
+++ b/tools/geographiclib-get-magnetic.sh
@@ -4,7 +4,7 @@
 #
 # Copyright (c) Charles Karney (2011-2015) <charles at karney.com> and
 # licensed under the MIT/X11 License.  For more information, see
-# http://geographiclib.sourceforge.net/
+# https://geographiclib.sourceforge.io/
 
 DEFAULTDIR="@GEOGRAPHICLIB_DATA@"
 SUBDIR=magnetic
@@ -54,7 +54,7 @@ will be saved.  -h prints this help.
 
 For more information on the magnetic models, visit
 
-  http://geographiclib.sourceforge.net/html/$NAME.html
+  https://geographiclib.sourceforge.io/html/$NAME.html
 
 EOF
 }
@@ -152,7 +152,7 @@ while read file; do
     fi
     echo download $file.tar.bz2 ...
     echo $file >> $TEMP/download
-    URL="http://downloads.sourceforge.net/project/geographiclib/$SUBDIR-distrib/$file.tar.bz2?use_mirror=autoselect"
+    URL="https://downloads.sourceforge.net/project/geographiclib/$SUBDIR-distrib/$file.tar.bz2?use_mirror=autoselect"
     ARCHIVE=$TEMP/$file.tar.bz2
     wget -O$ARCHIVE $URL
     echo unpack $file.tar.bz2 ...
diff --git a/wrapper/C/00README.txt b/wrapper/C/00README.txt
index e688d6c..6dead75 100644
--- a/wrapper/C/00README.txt
+++ b/wrapper/C/00README.txt
@@ -1,7 +1,7 @@
 The geodesic routines in GeographicLib have been implemented as a native
 C library.  See
 
-  http://geographiclib.sourceforge.net/html/C/
+  https://geographiclib.sourceforge.io/html/C/
 
 It is also possible to call the C++ version of GeographicLib directly
 from C and this directory contains a small example, which convert
diff --git a/wrapper/matlab/geodesicinverse.cpp b/wrapper/matlab/geodesicinverse.cpp
index f03877f..6cadf03 100644
--- a/wrapper/matlab/geodesicinverse.cpp
+++ b/wrapper/matlab/geodesicinverse.cpp
@@ -4,7 +4,7 @@
  *
  * Copyright (c) Charles Karney (2010-2013) <charles at karney.com> and licensed
  * under the MIT/X11 License.  For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
  **********************************************************************/
 
 // Compile in Matlab with
@@ -69,7 +69,7 @@ void mexFunction( int nlhs, mxArray* plhs[],
   else if (nrhs > 3)
     mexErrMsgTxt("More than three input arguments specified.");
   else if (nrhs == 2)
-    mexErrMsgTxt("Must specify flattening with the major radius.");
+    mexErrMsgTxt("Must specify flattening with the equatorial radius.");
   else if (nlhs > 2)
     mexErrMsgTxt("More than two output arguments specified.");
 
@@ -83,7 +83,7 @@ void mexFunction( int nlhs, mxArray* plhs[],
   if (nrhs == 3) {
     if (!( mxIsDouble(prhs[1]) && !mxIsComplex(prhs[1]) &&
            mxGetNumberOfElements(prhs[1]) == 1 ))
-      mexErrMsgTxt("Major radius is not a real scalar.");
+      mexErrMsgTxt("Equatorial radius is not a real scalar.");
     a = mxGetScalar(prhs[1]);
     if (!( mxIsDouble(prhs[2]) && !mxIsComplex(prhs[2]) &&
            mxGetNumberOfElements(prhs[2]) == 1 ))
diff --git a/wrapper/matlab/geodesicinverse.m b/wrapper/matlab/geodesicinverse.m
index 0b953f8..e42b76f 100644
--- a/wrapper/matlab/geodesicinverse.m
+++ b/wrapper/matlab/geodesicinverse.m
@@ -21,7 +21,7 @@ function geodesicinverse(~, ~, ~)
 %       geodesic scale 2 to 1 = aux(:,4)
 %       area under geodesic = aux(:,5) in meters^2
 %
-%   a = major radius (meters)
+%   a = equatorial radius (meters)
 %   f = flattening (0 means a sphere)
 %   If a and f are omitted, the WGS84 values are used.
 %
diff --git a/wrapper/python/00README.txt b/wrapper/python/00README.txt
index 71c6fe9..e139a9e 100644
--- a/wrapper/python/00README.txt
+++ b/wrapper/python/00README.txt
@@ -1,7 +1,7 @@
 The geodesic routines in GeographicLib have been implemented as a native
 Python library.  See
 
-  http://geographiclib.sourceforge.net/html/python/
+  https://geographiclib.sourceforge.io/html/python/
 
 It is also possible to call the C++ version of GeographicLib directly
 from Python and this directory contains a small example,

-- 
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