Skip to content

feat: update geographiclib to 2.5-1 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Charles Karney <charles@karney.com>
Francesco Paolo Lovergine <[email protected]> (autoconfiscation)
Mathieu Peyréga <mathieu.peyrega@gmail.com> (help with gravity models)
Andrew MacIntyre <[email protected]> (python/setup.py)
Charles Karney <karney@alum.mit.edu>
Jared Aurentz <[email protected]> (Trigfun::chop)
Chris Bennight <chris@bennight.com> (deploying Java library)
Mark Borgerding <[email protected]> (KISS FFT)
Skip Breidbach <[email protected]> (maven support for Java)
Scott Heiman <[email protected]> (.NET wrappers + C# examples)
Chris Bennight <[email protected]> (deploying Java library)
Pavel Holoborodko <[email protected]> (mpreal.h for MPFR support)
Francesco Paolo Lovergine <[email protected]> (autoconfiscation)
Andrew MacIntyre <[email protected]> (python/setup.py)
Sebastian Mattheis <[email protected]> (gnomonic projection in Java)
Yurij Mikhalevich <[email protected]> (node.js port)
Phil Miller <[email protected]> (putting tests into python/setup.py)
Mathieu Peyréga <[email protected]> (help with gravity models)
Jonathan Takahashi <[email protected]> (boost-python sample)
William Wall <[email protected]> (Javascript wrapper doc)
Thomas Warner <[email protected]> (Excel wrapper)
Mark Borgerding <[email protected]> (KISS FFT)
27 changes: 14 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 3.13.0)
cmake_minimum_required (VERSION 3.17.0)
project (GeographicLib)

# Version information
set (PROJECT_VERSION_MAJOR 2)
set (PROJECT_VERSION_MINOR 2)
set (PROJECT_VERSION_MINOR 5)
set (PROJECT_VERSION_PATCH 0)
set (PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
if (PROJECT_VERSION_PATCH GREATER 0)
Expand Down Expand Up @@ -49,8 +49,8 @@ set (PACKAGE_NAME "${PROJECT_NAME}-${PROJECT_FULLVERSION}")

# The library version tracks the numbering given by libtool in the
# autoconf set up.
set (LIBVERSION_API 24)
set (LIBVERSION_BUILD 24.1.0)
set (LIBVERSION_API 26)
set (LIBVERSION_BUILD 26.1.1)
string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)

Expand Down Expand Up @@ -263,8 +263,8 @@ endif ()
include (TestBigEndian)
test_big_endian (GEOGRAPHICLIB_WORDS_BIGENDIAN)

# We require C++11
set (CMAKE_CXX_STANDARD 11)
# We require C++14
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
if (GEOGRAPHICLIB_PRECISION EQUAL 4)
set (CMAKE_CXX_EXTENSIONS ON) # Need gnu++11 for quadmath
Expand Down Expand Up @@ -327,7 +327,7 @@ elseif (GEOGRAPHICLIB_PRECISION EQUAL 3)
endif ()
elseif (GEOGRAPHICLIB_PRECISION EQUAL 4)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
find_package (Boost 1.64)
find_package (Boost 1.70 CONFIG)
if (Boost_FOUND)
set (HIGHPREC_LIBRARIES quadmath)
endif ()
Expand Down Expand Up @@ -453,7 +453,8 @@ endif ()

# The list of tools (to be installed into, e.g., /usr/local/bin)
set (TOOLS CartConvert ConicProj GeodesicProj GeoConvert GeodSolve
GeoidEval Gravity MagneticField Planimeter RhumbSolve TransverseMercatorProj)
GeoidEval Gravity IntersectTool MagneticField Planimeter RhumbSolve
TransverseMercatorProj)
# The list of scripts (to be installed into, e.g., /usr/local/sbin)
set (SCRIPTS geographiclib-get-geoids geographiclib-get-gravity
geographiclib-get-magnetic)
Expand All @@ -479,7 +480,7 @@ if (NOT RELEASE)
endif ()

# make exampleprograms does a fresh cmake configuration and so uses
# find_package to find the just-built version og GeographicLib (via the
# find_package to find the just-built version of GeographicLib (via the
# GeographicLib_DIR option to cmake).
if (CMAKE_GENERATOR_PLATFORM)
set (PLATFORM_FLAG "-A")
Expand Down Expand Up @@ -511,7 +512,7 @@ include (InstallRequiredSystemLibraries)

# The configuration of CPack is via variables that need to be set before
# the include (CPack).
set (CPACK_PACKAGE_CONTACT charles@karney.com)
set (CPACK_PACKAGE_CONTACT karney@alum.mit.edu)
set (CPACK_PACKAGE_VENDOR "GeographicLib")
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY
"GeographicLib library, utilities, and documentation")
Expand All @@ -528,7 +529,7 @@ set (CPACK_SOURCE_IGNORE_FILES
"${PROJECT_SOURCE_DIR}/(archive|scratch|mpfr_mpir_x86_x64_msvc2010)/"
"${PROJECT_SOURCE_DIR}/.*\\\\.(zip|tar\\\\.gz|bak|lsp)\$"
"${PROJECT_SOURCE_DIR}/(autogen|biblio)\\\\.sh\$"
"${PROJECT_SOURCE_DIR}/(pom.xml|makefile-admin|HOWTO-RELEASE.txt)\$")
"${PROJECT_SOURCE_DIR}/(makefile-admin|HOWTO-RELEASE.txt)\$")
set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")

set (CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.txt)
Expand All @@ -538,9 +539,9 @@ set (CPACK_PACKAGE_INSTALL_DIRECTORY "${PACKAGE_DIR}")
if (WIN32)
# The Windows binary packager is NSIS. Set the necessary variables
# for this.
set (CPACK_NSIS_CONTACT "charles@karney.com")
set (CPACK_NSIS_CONTACT "karney@alum.mit.edu")
set (CPACK_NSIS_URL_INFO_ABOUT "https://geographiclib.sourceforge.io")
set (CPACK_NSIS_HELP_LINK "mailto:charles@karney.com")
set (CPACK_NSIS_HELP_LINK "mailto:karney@alum.mit.edu")
# No provision for accommodating different compiler versions. However
# the Visual Studio 14 2015 build works also with Visual Studio 15
# 2017, Visual Studio 16 2019, and Visual Studio 17 2022.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT).

Copyright (c) 2008-2022, Charles Karney
Copyright (c) 2008-2023, Charles Karney

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
lib_postfix = @lib_postfix@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
Expand Down
105 changes: 100 additions & 5 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,103 @@ For more information, see

https://geographiclib.sourceforge.io/

The current version of the library is 2.2
The current version of the library is 2.5

Changes between 2.5 (released 2024-12-28) and 2.4 versions:

* New magnetic models provided

+ World Magnetic Model 2025, wmm2025; this covers the period
2025-2030. This is now the model returned by
MagneticModel::DefaultMagneticName and is default magnetic
model for MagneticField (replacing wmm2020 which is only valid
thru the end of 2024).
+ World Magnetic Model High Resolution 2025, wmmhr2025; this is a
high-resolution version of wmm2025 including terms up to degree
133 (as opposed to 12 for wmm2025).
+ International Geomagnetic Reference Field (14th generation),
igrf14, which approximates the main magnetic field of the earth
for the period 1900-2030.

* Update CMake's cmake_minimum_required to 3.17.0 (to facilitate
integration with Qt projects).

* For GEOGRAPHICLIB_PRECISION > 2, readarray treats doubles as
approximations to exact decimal constants.

Changes between 2.4 (released 2024-07-14) and 2.3 versions:

* Math::sind, Math::sincosd, etc., now return accurate results for
arguments = 30d, 45d, 60d, ...

* Add Math::hypot3.

* Add EllipticFunction::am.

* Make constructor for AuxAngle explicit.

* Include notes for plate carree areas.

* C++14 compliant compiler required (this requirement tracks the
Boost Math library).

* CMake configuration changes
+ update cmake_minimum_required to 3.16.0.
+ exclude the tools and doc targets from the default build (make
all) if these components won't be installed (BINDIR or DOCDIR
set to OFF).
+ testprograms is now excluded from the default build and it now
depends on tools. Before running the test suite, build
testprograms, e.g., make testprograms test.
+ added a target libs to build only the static and/or shared
libraries.
+ document the use of CMake's FetchContent as an alternative to
find_package.
+ stop requiring that CMAKE_CROSSCOMPILING match with
find_package(GeographicLib).

* Internal code changes
+ stop using reserved identifiers (_N in the DST class and _R in
the Intersect class).
+ remove the workaround for the boost-quadmath bug with
setprecision(0).
+ GEOGRAPHICLIB_PANIC(msg) macro now takes a message argument.

Changes between 2.3 (released 2023-07-25) and 2.2 versions:

* Add the Intersect class and the IntersectTool utility. The
methods are described in "Geodesic intersections",
https://arxiv.org/abs/2308.00495.

* Add typedefs Geodesic::LineClass, GeodesicExact::LineClass,
Rhumb::LineClass, GeodesicLine::BaseClass,
GeodesicLineExact::BaseClass, RhumbLine::BaseClass.

* Geodesic constructor accepts optional third argument exact, default
false. If true, then the calculations are delegated to
GeodesicExact. GeodSolve and Planimeter now use this simplified
interface.

* PolygonAreaExact is deprecated; use PolygonArea instead.

* Bug in Planimeter -Q (introduced in version 2.2) has been fixed.

* TransverseMercator constructor accepts optional arguments exact
and extendp (default false for both). If exact = true, then the
calculations are delegated to TransverseMercatorExact.
TransverseMercatorProj now uses this simplified interface.

* Minor fixes:
+ Fix documentation bug for TransverseMercatorProj (incorrectly
stated that -t for the extended domain was the default).
+ Remove unnecessary friend declarations for Ellipsoid in
AlbersEqualArea and TransverseMercator. (As of version 2.2,
Ellipsoid uses the AuxLatitude class for this functionality.)
+ Small change in EllipticFunction to speed up the default
contructor.
+ Remove workaround for boost 1.76 with enums (not needed for boost
1.78).
+ Remove unused header from NearestNeighbor.

Changes between 2.2 (released 2023-03-07) and 2.1.2 versions:

Expand All @@ -24,8 +120,8 @@ Changes between 2.2 (released 2023-03-07) and 2.1.2 versions:
+ rhumb lines which include a pole as one of the endpoints are
treated properly (previously point at the pole were moved
slightly away from the pole);
+ this treatment of rhumb areas is described in polygons,
https://arxiv.org/abs/2303.03219.
+ this treatment of rhumb areas is described in "The area of
rhumb polygons", https://doi.org/10.1007/s11200-024-0709-z.

* The -E option for Planimeter(1) is now a toggle switching on
exact treatment for geodesics (-G option), rhumb lines (-R
Expand Down Expand Up @@ -871,8 +967,7 @@ Changes between 1.42 (released 2015-04-28) and 1.41 versions:
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.
Geoid class and the GeoidEval utility as deprecated.

* Work around the boost-quadmath bug with setprecision(0).

Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ It is licensed under the MIT License; see

## Links:

* Library documentation: https://geographiclib.sourceforge.io/C++/doc
* Library documentation (latest release):
https://geographiclib.sourceforge.io/C++/doc
* Library documentation (all versions):
https://geographiclib.sourceforge.io/C++
* Change log: https://geographiclib.sourceforge.io/C++/doc/changes.html
* Git repository: https://github.com/geographiclib/geographiclib
* Releases are on the [`release`](../../release) branch, and specific
* Releases are on the [`release`](../../tree/release) branch, and specific
releases are tagged as, e.g., [`r1.52`](../../tree/r1.52),
[`r2.0`](../../tree/r2.0), etc. This is the appropriate branch
for most *users* of GeographicLib.
Expand All @@ -30,4 +33,4 @@ It is licensed under the MIT License; see
* GeographicLib: https://geographiclib.sourceforge.io
* GeographicLib in various languages:
https://geographiclib.sourceforge.io/doc/library.html#languages
* Author: Charles Karney, <charles@karney.com>
* Author: Charles Karney, <karney@alum.mit.edu>
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2
2.5
15 changes: 12 additions & 3 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ AS_VAR_POPDEF([CACHEVAR])dnl
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 15
#serial 18

dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
Expand Down Expand Up @@ -180,9 +180,18 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
dnl MSVC needs -std:c++NN for C++17 and later (default is C++14)
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
if test x"$switch" = xMSVC; then
dnl AS_TR_SH maps both `:` and `=` to `_` so -std:c++17 would collide
dnl with -std=c++17. We suffix the cache variable name with _MSVC to
dnl avoid this.
switch=-std:c++${alternative}
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_${switch}_MSVC])
else
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
fi
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
Expand Down
8 changes: 1 addition & 7 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ else ()
set (MSVC_TOOLSET_VERSION 0)
set (MSVC_TOOLSET_MAJOR 0)
endif ()
if (CMAKE_CROSSCOMPILING)
# Ensure that all "true" (resp. "false") settings are represented by
# the same string.
set (CMAKE_CROSSCOMPILING_STR "ON")
else ()
set (CMAKE_CROSSCOMPILING_STR "OFF")
endif ()

# geographiclib-config.cmake for the build tree
set (PROJECT_ROOT_DIR "${PROJECT_BINARY_DIR}")
Expand Down Expand Up @@ -92,6 +85,7 @@ endif ()
# Support for pkgconfig/geographiclib.pc
set (prefix ${CMAKE_INSTALL_PREFIX})
set (exec_prefix "\${prefix}")
set (lib_postfix ${CMAKE_DEBUG_POSTFIX})
set (libdir "\${exec_prefix}/${LIBDIR}")
set (includedir "\${prefix}/${INCDIR}")
set (bindir "\${exec_prefix}/${BINDIR}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Makefile.am
#
# Copyright (C) 2011-2022, Charles Karney <charles@karney.com>
# Copyright (C) 2011-2022, Charles Karney <karney@alum.mit.edu>

cmakedir=$(datadir)/cmake/GeographicLib

Expand Down
3 changes: 2 additions & 1 deletion cmake/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
# Makefile.am
#
# Copyright (C) 2011-2022, Charles Karney <charles@karney.com>
# Copyright (C) 2011-2022, Charles Karney <karney@alum.mit.edu>
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
Expand Down Expand Up @@ -245,6 +245,7 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
lib_postfix = @lib_postfix@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
Expand Down
11 changes: 0 additions & 11 deletions cmake/project-config-version.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ if (MSVC)
# digit.
math (EXPR MSVC_TOOLSET_MAJOR "${MSVC_TOOLSET_VERSION}/10")
endif ()
if (CMAKE_CROSSCOMPILING)
# Ensure that all "true" (resp. "false") settings are represented by
# the same string.
set (CMAKE_CROSSCOMPILING_STR "ON")
else ()
set (CMAKE_CROSSCOMPILING_STR "OFF")
endif ()

if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_NAME@")
# Check package name (in particular, because of the way cmake finds
Expand Down Expand Up @@ -48,10 +41,6 @@ elseif (GEOGRAPHICLIB_PRECISION MATCHES "^[1-5]\$" AND NOT (
# Reject if the user asks for an incompatible precsision.
set (REASON "GEOGRAPHICLIB_PRECISION = @GEOGRAPHICLIB_PRECISION@")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (NOT CMAKE_CROSSCOMPILING_STR STREQUAL "@CMAKE_CROSSCOMPILING_STR@")
# Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING}.
set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (CMAKE_CROSSCOMPILING AND
NOT (CMAKE_SYSTEM_NAME STREQUAL "@CMAKE_SYSTEM_NAME@" AND
CMAKE_SYSTEM_PROCESSOR STREQUAL "@CMAKE_SYSTEM_PROCESSOR@"))
Expand Down
2 changes: 1 addition & 1 deletion cmake/project.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Version: @PACKAGE_VERSION@
URL: https://geographiclib.sourceforge.io

Requires:
Libs: -L${libdir} -l@PACKAGE_NAME@
Libs: -L${libdir} -l@PACKAGE_NAME@@lib_postfix@
Cflags: -I${includedir}
Loading
Loading