Upgraded to GeographicLib 1.35

release/4.3a0
cbeall3 2014-05-03 14:44:39 -04:00
parent 46859474cb
commit a6ae176a54
63 changed files with 584 additions and 336 deletions

View File

@ -2,21 +2,48 @@ project (GeographicLib)
# Version information
set (PROJECT_VERSION_MAJOR 1)
set (PROJECT_VERSION_MINOR 34)
set (PROJECT_VERSION_MINOR 35)
set (PROJECT_VERSION_PATCH 0)
set (PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
if (PROJECT_VERSION_PATCH GREATER 0)
set (PROJECT_VERSION "${PROJECT_VERSION}.${PROJECT_VERSION_PATCH}")
endif ()
set (CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set (CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
if (DEFINED CPACK_PACKAGE_VERSION_COUNT)
# majic (version 0.1.9 and later) invokes cmake defining, e.g.,
# -D CPACK_PACKAGE_VERSION=1.35-SNAPSHOT
# -D CPACK_PACKAGE_VERSION_COUNT=2
# -D CPACK_PACKAGE_VERSION_MAJOR=1
# -D CPACK_PACKAGE_VERSION_MINOR=35
# -D CPACK_PACKAGE_VERSION_SUFFIX=-SNAPSHOT
# Check that the first two version numbers are consistent.
if (CPACK_PACKAGE_VERSION_COUNT EQUAL 2)
set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
elseif (CPACK_PACKAGE_VERSION_COUNT LESS 2)
message (FATAL_ERROR "CPACK_PACKAGE_VERSION_COUNT must be 2 or more")
endif ()
if (NOT (
CPACK_PACKAGE_VERSION_MAJOR EQUAL PROJECT_VERSION_MAJOR AND
CPACK_PACKAGE_VERSION_MINOR EQUAL PROJECT_VERSION_MINOR))
message (FATAL_ERROR "Inconsistency in CPACK and PROJECT version numbers")
endif ()
set (PROJECT_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH})
set (PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
else ()
set (CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set (CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set (CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
endif ()
# The library version tracks the numbering given by libtool in the
# autoconf set up.
set (LIBVERSION 10)
set (LIBVERSIONFULL 10.1.1)
set (LIBVERSIONFULL 10.1.2)
string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
@ -201,8 +228,9 @@ if (NOT MSVC)
endif ()
endif ()
if (NOT CYGWIN)
# cygwin has a long double but the support for ::cbrtl etc is missing
if (NOT (CYGWIN OR ANDROID))
# cygwin and android have a long double but the support for ::cbrtl,
# etc., is missing
include (CheckTypeSize)
check_type_size ("long double" LONG_DOUBLE BUILTIN_TYPES_ONLY)
endif ()
@ -296,7 +324,12 @@ if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
# check for C++11 support
# check for C++11 support. If available, the C++11 static_assert and
# various math functions (std::atanh, etc.) are used. 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
# for static_assert and std::atanh are used.
include (CheckCXXCompilerFlag)
set (CXX11FLAG "-std=c++11")
check_cxx_compiler_flag (${CXX11FLAG} CXX11TEST1)
@ -388,7 +421,7 @@ set (CPACK_SOURCE_IGNORE_FILES
"${PROJECT_SOURCE_DIR}/BUILD"
"${PROJECT_SOURCE_DIR}/(tests|testdata|cgi-bin|.*\\\\.cache)/"
"${PROJECT_SOURCE_DIR}/(distrib|.*-distrib|.*-installer|geodesic-papers)/"
"${PROJECT_SOURCE_DIR}/[^/]*\\\\.(html|kmz|pdf|xml)\$"
"${PROJECT_SOURCE_DIR}/[^/]*\\\\.(html|kmz|pdf)\$"
"${PROJECT_SOURCE_DIR}/(autogen|biblio|js-compress)\\\\.sh\$"
"${PROJECT_SOURCE_DIR}/(geodesic-biblio.txt|makefile-admin|[^/]*\\\\.png)\$"
"${PROJECT_SOURCE_DIR}/matlab/matlab-.*blurb.txt\$" )

View File

@ -9,7 +9,7 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src man tools doc include matlab python cmake examples
EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL \
EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL pom.xml \
Makefile.mk CMakeLists.txt windows maxima doc legacy java dotnet
dist-hook:

View File

@ -276,7 +276,7 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src man tools doc include matlab python cmake examples
EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL \
EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL pom.xml \
Makefile.mk CMakeLists.txt windows maxima doc legacy java dotnet
all: all-recursive

View File

@ -4,7 +4,30 @@ For more information, see
http://geographiclib.sourceforge.net/
The current version of the library is 1.34.
The current version of the library is 1.35.
Changes between 1.35 (released 2014-03-13) and 1.34 versions:
* Fix blunder in UTMUPS::EncodeEPSG (found by Ben Adler).
* Matlab wrapper routines geodesic{direct,inverse,line} switch to
"exact" routes if |f| > 0.02.
* GeodSolve.cgi allows ellipsoid to be set (and uses the -E option
for GeodSolve).
* Set title in HTML versions of man pages for the utility programs.
* Changes in cmake support:
+ add _d to names of executables in debug mode of Visual Studio;
+ add support for Android (cmake-only), thanks to Pullan Yu;
+ check CPACK version numbers supplied on command line;
+ configured version of project-config.cmake.in is
project-config.cmake (instead of geographiclib-config.cmake), to
prevent find_package incorrectly using this file;
+ fix tests with multi-line output;
+ this release includes a file, pom.xml, which is used by an
experimental build system (based on maven) at SRI.
Changes between 1.34 (released 2013-12-11) and 1.33 versions:

View File

@ -31,14 +31,17 @@ endif ()
# it to prevent the source and build paths appearing in the installed
# config files
set (PROJECT_INCLUDE_DIRS)
configure_file (project-config.cmake.in
${PROJECT_NAME_LOWER}-config.cmake @ONLY)
configure_file (project-config.cmake.in project-config.cmake @ONLY)
configure_file (project-config-version.cmake.in
${PROJECT_NAME_LOWER}-config-version.cmake @ONLY)
project-config-version.cmake @ONLY)
install (FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake"
DESTINATION "${INSTALL_CMAKE_DIR}")
"${CMAKE_CURRENT_BINARY_DIR}/project-config.cmake"
DESTINATION "${INSTALL_CMAKE_DIR}"
RENAME "${PROJECT_NAME_LOWER}-config.cmake")
install (FILES
"${CMAKE_CURRENT_BINARY_DIR}/project-config-version.cmake"
DESTINATION "${INSTALL_CMAKE_DIR}"
RENAME "${PROJECT_NAME_LOWER}-config-version.cmake")
# Make information about the cmake targets (the library and the tools)
# available.
install (EXPORT depends

View File

@ -30,7 +30,7 @@ if (IS_ABSOLUTE "@PROJECT_ROOT_DIR@")
set (_ROOT "@PROJECT_ROOT_DIR@")
set (@PROJECT_NAME@_INCLUDE_DIRS "@PROJECT_INCLUDE_DIRS@")
set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/src")
set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/src")
set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/tools")
else ()
# This is an installed package; figure out the paths relative to the
# current directory.

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for GeographicLib 1.34.
# Generated by GNU Autoconf 2.69 for GeographicLib 1.35.
#
# Report bugs to <charles@karney.com>.
#
@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GeographicLib'
PACKAGE_TARNAME='geographiclib'
PACKAGE_VERSION='1.34'
PACKAGE_STRING='GeographicLib 1.34'
PACKAGE_VERSION='1.35'
PACKAGE_STRING='GeographicLib 1.35'
PACKAGE_BUGREPORT='charles@karney.com'
PACKAGE_URL=''
@ -1339,7 +1339,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.34 to adapt to many kinds of systems.
\`configure' configures GeographicLib 1.35 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1410,7 +1410,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of GeographicLib 1.34:";;
short | recursive ) echo "Configuration of GeographicLib 1.35:";;
esac
cat <<\_ACEOF
@ -1519,7 +1519,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
GeographicLib configure 1.34
GeographicLib configure 1.35
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2063,7 +2063,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.34, which was
It was created by GeographicLib $as_me 1.35, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -3001,7 +3001,7 @@ fi
# Define the identity of the package.
PACKAGE='geographiclib'
VERSION='1.34'
VERSION='1.35'
cat >>confdefs.h <<_ACEOF
@ -3049,7 +3049,7 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
GEOGRAPHICLIB_VERSION_MAJOR=1
GEOGRAPHICLIB_VERSION_MINOR=34
GEOGRAPHICLIB_VERSION_MINOR=35
GEOGRAPHICLIB_VERSION_PATCH=0
cat >>confdefs.h <<_ACEOF
@ -3098,7 +3098,7 @@ ac_config_headers="$ac_config_headers include/GeographicLib/Config-ac.h"
LT_CURRENT=11
LT_REVISION=1
LT_REVISION=2
LT_AGE=1
@ -16672,7 +16672,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.34, which was
This file was extended by GeographicLib $as_me 1.35, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -16738,7 +16738,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.34
GeographicLib config.status 1.35
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -1,7 +1,7 @@
dnl
dnl Copyright (C) 2009, Francesco P. Lovergine <frankie@debian.org>
AC_INIT([GeographicLib],[1.34],[charles@karney.com])
AC_INIT([GeographicLib],[1.35],[charles@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=34
GEOGRAPHICLIB_VERSION_MINOR=35
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=11
LT_REVISION=1
LT_REVISION=2
LT_AGE=1
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)

View File

@ -11,8 +11,8 @@
/**
\mainpage GeographicLib library
\author Charles F. F. Karney (charles@karney.com)
\version 1.34
\date 2013-12-11
\version 1.35
\date 2014-03-13
\section abstract Abstract
@ -45,22 +45,22 @@ The main project page is at
http://sourceforge.net/projects/geographiclib </a>
.
The code is available for download at
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.34.tar.gz">
GeographicLib-1.34.tar.gz</a>
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.34.zip">
GeographicLib-1.34.zip</a>
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.35.tar.gz">
GeographicLib-1.35.tar.gz</a>
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.35.zip">
GeographicLib-1.35.zip</a>
.
as either a compressed tar file (tar.gz) or a zip file. (The two
archives have identical contents, except that the zip file has DOS
line endings.) Alternatively you can get the latest release using git
\verbatim
git clone -b r1.34 git://git.code.sf.net/p/geographiclib/code geographiclib
git clone -b r1.35 git://git.code.sf.net/p/geographiclib/code geographiclib
\endverbatim
There are also binary installers for Windows available at
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.34-win32.exe">
GeographicLib-1.34-win32.exe</a>
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.34-win64.exe">
GeographicLib-1.34-win64.exe</a>
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.35-win32.exe">
GeographicLib-1.35-win32.exe</a>
- <a href="http://sf.net/projects/geographiclib/files/distrib/GeographicLib-1.35-win64.exe">
GeographicLib-1.35-win64.exe</a>
.
It is licensed under the
<a href="http://www.opensource.org/licenses/MIT">MIT/X11 License</a>;
@ -180,14 +180,14 @@ Back to \ref intro. Forward to \ref start. Up to \ref contents.
(versions 4.0 and later) and under Windows with Visual Studio 2005, 2008,
and 2010. Earlier versions were tested also under Darwin and Solaris. It
should compile on a wide range of other systems. First download either
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.34.tar.gz">
GeographicLib-1.34.tar.gz</a> or
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.34.zip">
GeographicLib-1.34.zip</a> (or
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.34-win32.exe">
GeographicLib-1.34-win32.exe</a> or
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.34-win64.exe">
GeographicLib-1.34-win64.exe</a> for binary installation under Windows).
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.35.tar.gz">
GeographicLib-1.35.tar.gz</a> or
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.35.zip">
GeographicLib-1.35.zip</a> (or
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.35-win32.exe">
GeographicLib-1.35-win32.exe</a> or
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.35-win64.exe">
GeographicLib-1.35-win64.exe</a> for binary installation under Windows).
Then pick one of the first five options below:
- \ref cmake. This is the preferred installation method as it will work
on the widest range of platforms. However it requires that you have
@ -262,10 +262,10 @@ g++ on Linux and with the Visual Studio IDE on Windows.
Here are the steps to compile and install %GeographicLib:
- Unpack the source, running one of \verbatim
tar xfpz GeographicLib-1.34.tar.gz
unzip -q GeographicLib-1.34.zip \endverbatim
tar xfpz GeographicLib-1.35.tar.gz
unzip -q GeographicLib-1.35.zip \endverbatim
then enter the directory created with one of \verbatim
cd GeographicLib-1.34 \endverbatim
cd GeographicLib-1.35 \endverbatim
- Create a separate build directory and enter it, for example, \verbatim
mkdir BUILD
cd BUILD \endverbatim
@ -273,8 +273,8 @@ Here are the steps to compile and install %GeographicLib:
and MacOSX systems, the command is \verbatim
cmake .. \endverbatim
For Windows, the command is typically one of \verbatim
cmake -G "Visual Studio 10" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10/GeographicLib-1.34 ..
cmake -G "Visual Studio 9 2008" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc9/GeographicLib-1.34 ..
cmake -G "Visual Studio 10" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10/GeographicLib-1.35 ..
cmake -G "Visual Studio 9 2008" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc9/GeographicLib-1.35 ..
\endverbatim
The definitions of CMAKE_INSTALL_PREFIX are optional (see below). The
settings given above are recommended to ensure that packages that use
@ -290,7 +290,7 @@ Here are the steps to compile and install %GeographicLib:
convention. If it is on ON (the Linux default), the installation
is to a common directory, e.g., /usr/local. If it is OFF (the
Windows default), the installation directory contains the package
name, e.g., C:/pkg/GeographicLib-1.34. The installation
name, e.g., C:/pkg/GeographicLib-1.35. The installation
directories for the documentation, cmake configuration, python and
matlab interfaces all depend on the variable with deeper paths
relative to CMAKE_INSTALL_PREFIX being used when it's ON:
@ -305,7 +305,7 @@ Here are the steps to compile and install %GeographicLib:
For windows systems, it is recommended to use a prefix which
includes the compiler version, as shown above (and also, possibly,
whether this is a 64-bit build, e.g., <code>cmake -G "Visual Studio
10 Win64" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10-x64/GeographicLib-1.34
10 Win64" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10-x64/GeographicLib-1.35
..</code>). If you just want to try the library to see if it suits
your needs, pick, for example,
<code>CMAKE_INSTALL_PREFIX</code>=/tmp/geographic.
@ -394,9 +394,9 @@ Here are the steps to compile and install %GeographicLib:
The method works on most Unix-like systems including Linux and Mac OS X.
Here are the steps to compile and install %GeographicLib:
- Unpack the source, running \verbatim
tar xfpz GeographicLib-1.34.tar.gz \endverbatim
tar xfpz GeographicLib-1.35.tar.gz \endverbatim
then enter the directory created \verbatim
cd GeographicLib-1.34 \endverbatim
cd GeographicLib-1.35 \endverbatim
- Create a separate build directory and enter it, for example, \verbatim
mkdir BUILD
cd BUILD \endverbatim
@ -425,9 +425,9 @@ and g++. This builds a static library and the examples.
Here are the steps to compile and install %GeographicLib:
- Unpack the source, running \verbatim
tar xfpz GeographicLib-1.34.tar.gz \endverbatim
tar xfpz GeographicLib-1.35.tar.gz \endverbatim
then enter the directory created \verbatim
cd GeographicLib-1.34 \endverbatim
cd GeographicLib-1.35 \endverbatim
- Edit \verbatim
include/GeographicLib/Config.h \endverbatim
If your C++ compiler does not recognize the long double type
@ -458,8 +458,8 @@ static library and the utilities. If you only have Visual Studio 2003,
use cmake to create the necessary solution file, see \ref cmake. (cmake
is needed to build the Matlab interface and to run the tests.)
- Unpack the source, running \verbatim
unzip -q GeographicLib-1.34.zip \endverbatim
- Open GeographicLib-1.34/windows/GeographicLib-vc10.sln in Visual Studio
unzip -q GeographicLib-1.35.zip \endverbatim
- Open GeographicLib-1.35/windows/GeographicLib-vc10.sln in Visual Studio
2010 (for Visual Studio 2005 and 2008, replace -vc10 by -vc8 or -vc9).
- Pick the build type (e.g., Release), and select "Build Solution".
- The library and the compiled examples are in the windows/Release.
@ -486,14 +486,14 @@ be advisable to build it with the compiler you are using for your own
code using either \ref cmake or \ref windows.
Download and run
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.34-win32.exe">
GeographicLib-1.34-win32.exe</a> or
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.34-win64.exe">
GeographicLib-1.34-win64.exe</a>:
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.35-win32.exe">
GeographicLib-1.35-win32.exe</a> or
<a href="http://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.35-win64.exe">
GeographicLib-1.35-win64.exe</a>:
- read the MIT/X11 License agreement,
- select whether you want your PATH modified,
- select the installation folder, by default
C:\\pkg-vc10\\GeographicLib-1.34 or C:\\pkg-vc10-x64\\GeographicLib-1.34,
C:\\pkg-vc10\\GeographicLib-1.35 or C:\\pkg-vc10-x64\\GeographicLib-1.35,
- select the start menu folder,
- and install.
.
@ -501,7 +501,7 @@ GeographicLib-1.34-win64.exe</a>:
given in \ref cmake.) The start menu will now include links to the
documentation for the library and for the utilities (and a link for
uninstalling the library). If you ask for your PATH to be modified, it
will include C:/pkg-vc10/GeographicLib-1.34/bin where the utilities are
will include C:/pkg-vc10/GeographicLib-1.35/bin where the utilities are
installed. The headers and library are installed in the
include/GeographicLib and lib folders. With the 64-bit installer, the
Matlab interface is installed in the matlab folder. Add this to your
@ -552,7 +552,7 @@ Check the code out of git with \verbatim
Here the "master" branch is checked out. There are three branches in
the git repository:
- <b>master</b>: the main branch for code maintainence. Releases are
tagged on this branch as, e.g., v1.34.
tagged on this branch as, e.g., v1.35.
- <b>devel</b>: the development branch; changes made here are merged
into master.
- <b>release</b>: the release branch created by unpacking the source
@ -562,7 +562,7 @@ the git repository:
specifying a branch). This differs from the master branch in that
some administrative files are excluded while some intermediate files
are included (in order to aid building on as many platforms as
possible). Releases are tagged on this branch as, e.g., r1.34.
possible). Releases are tagged on this branch as, e.g., r1.35.
.
The autoconf configuration script and the formatted man pages are not
checked into master branch of the repository. In order to create the
@ -578,8 +578,8 @@ In the case of cmake, you then run \verbatim
which will copy the man pages from the build directory back into the
source tree and package the resulting source tree for distribution as
\verbatim
GeographicLib-1.34.tar.gz
GeographicLib-1.34.zip \endverbatim
GeographicLib-1.35.tar.gz
GeographicLib-1.35.zip \endverbatim
Finally, \verbatim
make package \endverbatim
or building PACKAGE in Visual Studio will create a binary installer for
@ -605,7 +605,7 @@ With configure, run \verbatim
make dist-gzip \endverbatim
which will create the additional files and packages the results ready
for distribution as \verbatim
geographiclib-1.34.tar.gz \endverbatim
geographiclib-1.35.tar.gz \endverbatim
<center>
Back to \ref intro. Forward to \ref start. Up to \ref contents.
@ -695,7 +695,7 @@ In order to use %GeographicLib from C++ code, you will need to
If %GeographicLib is found, then the following cmake variables are set:
- <code>GeographicLib_FOUND</code> = 1
- <code>GeographicLib_VERSION</code> = 1.34
- <code>GeographicLib_VERSION</code> = 1.35
- <code>GeographicLib_INCLUDE_DIRS</code>
- <code>GeographicLib_LIBRARIES</code> = one of the following two:
- <code>GeographicLib_SHARED_LIBRARIES</code> = %GeographicLib
@ -1120,9 +1120,9 @@ feature of %GeographicLib, but want your code still to work with older
versions. In that case, you can test the values of the macros
GEOGRAPHICLIB_VERSION_MAJOR, GEOGRAPHICLIB_VERSION_MINOR, and
GEOGRAPHICLIB_VERSION_PATCH; these expand to numbers (and the last one
is usually 0); these macros appeared starting in version 1.34. There's
is usually 0); these macros appeared starting in version 1.31. There's
also a macro GEOGRAPHICLIB_VERSION_STRING which expands to, e.g.,
"1.34"; this macro has been defined since version 1.9.
"1.35"; this macro has been defined since version 1.9.
<center>
Back to \ref utilities. Forward to \ref other. Up to \ref contents.
@ -1274,7 +1274,7 @@ The <code>matlab</code> directory contains
- Native Matlab implementations of the geodesic routines. To use
these, start Matlab or Octave and run one of (for example) \verbatim
addpath /usr/local/libexec/GeographicLib/matlab
addpath 'C:/pkg-vc10-x64/GeographicLib-1.34/libexec/GeographicLib/matlab'
addpath 'C:/pkg-vc10-x64/GeographicLib-1.35/libexec/GeographicLib/matlab'
\endverbatim
The available functions are:
- geoddoc: briefly descibe the routines
@ -1345,9 +1345,9 @@ There are two ways of compiling the interface code: (1) using cmake and
- <b>Invoking the compiler from Matlab or Octave:</b> Start Matlab or
Octave and run, e.g., \code
mex -setup
cd 'C:/pkg-vc10-x64/GeographicLib-1.34/matlab'
cd 'C:/pkg-vc10-x64/GeographicLib-1.35/matlab'
help geographiclibinterface
geographiclibinterface('C:/pkg-vc10/GeographicLib-1.34');
geographiclibinterface('C:/pkg-vc10/GeographicLib-1.35');
addpath(pwd);
\endcode
The first command allows you to select the compiler to use (which
@ -1356,7 +1356,7 @@ There are two ways of compiling the interface code: (1) using cmake and
To use the interface routines for %GeographicLib, run one of (for
example) \verbatim
addpath /usr/local/libexec/GeographicLib/matlab
addpath 'C:/pkg-vc10-x64/GeographicLib-1.34/libexec/GeographicLib/matlab'
addpath 'C:/pkg-vc10-x64/GeographicLib-1.35/libexec/GeographicLib/matlab'
\endverbatim
in Octave or Matlab. The available functions are:
- geodesicdirect: solve direct geodesic problem
@ -4048,7 +4048,7 @@ starting point of this geodesic is \f$\beta_1 = 87.48^\circ\f$, \f$\omega_1 =
0^\circ\f$, and \f$\alpha_1 = 90^\circ\f$.
If the starting point is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 \in
(0^\circ, 180^\circ)\f$, and \f$\alpha_1 = 0^\circ\f$, then the geodesic
(0^\circ, 180^\circ)\f$, and \f$\alpha_1 = 180^\circ\f$, then the geodesic
encircles the ellipsoid in a "transpolar" sense. The geodesic
oscillates east and west of the ellipse \f$x = 0\f$; on each oscillation
it completes slightly more that a full circuit around the ellipsoid
@ -4067,7 +4067,7 @@ Fig. 4
Fig. 4:
Example of a transpolar geodesic on a triaxial ellipsoid. The
starting point of this geodesic is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
39.9^\circ\f$, and \f$\alpha_1 = 0^\circ\f$.
39.9^\circ\f$, and \f$\alpha_1 = 180^\circ\f$.
<center>
<img src="https://upload.wikimedia.org/wikipedia/commons/9/9c/Transpolar_geodesic_on_a_triaxial_ellipsoid_case_B.svg"
@ -4078,10 +4078,10 @@ Fig. 5
Fig. 5:
Another example of a transpolar geodesic on a triaxial ellipsoid. The
starting point of this geodesic is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
9.966^\circ\f$, and \f$\alpha_1 = 0^\circ\f$.
9.966^\circ\f$, and \f$\alpha_1 = 180^\circ\f$.
If the starting point is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
0^\circ\f$ (an umbilical point), and \f$\alpha_1 = 45^\circ\f$ (the
0^\circ\f$ (an umbilical point), and \f$\alpha_1 = 135^\circ\f$ (the
geodesic leaves the ellipse \f$y = 0\f$ at right angles), then the
geodesic repeatedly intersects the opposite umbilical point and returns to
its starting point. However on each circuit the angle at which it
@ -4099,11 +4099,11 @@ Fig. 6
Fig. 6:
Example of an umbilical geodesic on a triaxial ellipsoid. The
starting point of this geodesic is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
0^\circ\f$, and \f$\alpha_1 = 45^\circ\f$ and the geodesics is followed
0^\circ\f$, and \f$\alpha_1 = 135^\circ\f$ and the geodesics is followed
forwards and backwards until it lies close to the plane \f$y = 0\f$ in
both directions.
Umbilical geodesic enjoy several interesting properties.
Umbilical geodesics enjoy several interesting properties.
- Through any point on the ellipsoid, there are two umbilical geodesics.
- The geodesic distance between opposite umbilical points is the same
regardless of the initial direction of the geodesic.
@ -4217,11 +4217,14 @@ geodesics</a>).
- If only one point is an umbilicial point, the azimuth at the
non-umbilical point is found using the generalization of Clairaut's
equation (given above) with \f$\gamma = 0\f$.
- If both points lie on the equator \f$\beta = 0\f$, then determine the
reduced length \f$m_{12}\f$ for the geodesic which is the shorter
path along the ellipse \f$z = 0\f$. If \f$m_{12} \ge 0\f$, then this
is the shortest path on the ellipsoid; otherwise proceed to the
general case (next).
- Treat the cases where the geodesic might follow a line of constant
\f$\beta\f$. There are two such cases: (a) the points lie on the
ellipse \f$z = 0\f$ on a general ellipsoid and (b) the points lie on
an ellipse whose major axis is the \f$x\f$ axis on a prolate ellipsoid
(\f$a = b > c\f$). Determine the reduced length \f$m_{12}\f$ for the
geodesic which is the shorter path along the ellipse. If \f$m_{12}
\ge 0\f$, then this is the shortest path on the ellipsoid; otherwise
proceed to the general case (next).
- Swap the points, if necessary, so that the first point is the one
closest to a pole. Estimate \f$\alpha_1\f$ (by some means) and solve
the \e hybrid problem, i.e., determine the longitude \f$\omega_2\f$
@ -4238,6 +4241,12 @@ The shortest path found by this method is unique unless:
- The points are opposite umbilical points. In this case,
\f$\alpha_1\f$ can take on any value and \f$\alpha_2\f$ needs to be
adjusted to maintain the value of \f$\tan\alpha_1 / \tan\alpha_2\f$.
Note that \f$\alpha\f$ increases by \f$\pm 90^\circ\f$ as the
geodesic passes through an umbilical point, depending on whether the
geodesic is considered as passing to the right or left of the point.
Here \f$\alpha_2\f$ is the \e forward azimuth at the second umbilical
point, i.e., its azimuth immediately \e after passage through the
umbilical point.
- \f$\beta_1 + \beta_2 = 0\f$ and \f$\cos\alpha_1\f$ and
\f$\cos\alpha_2\f$ have opposite signs. In this case, there another
shortest geodesic with azimuths \f$\pi - \alpha_1\f$ and
@ -4757,6 +4766,26 @@ been migrated to the archive subdirectory). All the releases are
available as tags &ldquo;r<i>m.nn</i>&rdquo; in the the "release" branch
of the git repository for %GeographicLib.
- <a href="http://geographiclib.sf.net/1.35">Version 1.35</a>
(released 2014-03-13)
- Fix blunder in GeographicLib::UTMUPS::EncodeEPSG (found by Ben
Adler).
- Matlab wrapper routines geodesic{direct,inverse,line} switch to
"exact" routes if |<i>f</i>| &gt; 0.02.
- GeodSolve.cgi allows ellipsoid to be set (and uses the -E option
for <a href="GeodSolve.1.html">GeodSolve</a>).
- Set title in HTML versions of man pages for the \ref utilities.
- Changes in cmake support:
- add _d to names of executables in debug mode of Visual Studio;
- add support for Android (cmake-only), thanks to Pullan Yu;
- check CPACK version numbers supplied on command line;
- configured version of project-config.cmake.in is
project-config.cmake (instead of geographiclib-config.cmake), to
prevent find_package incorrectly using this file;
- fix tests with multi-line output;
- this release includes a file, pom.xml, which is used by an
experimental build system (based on maven) at SRI.
- <a href="http://geographiclib.sf.net/1.34">Version 1.34</a>
(released 2013-12-11)
- Many changes in cmake support:

View File

@ -11,8 +11,8 @@
/**
\mainpage NETGeographicLib library
\author Scott Heiman (mrmtdew2@outlook.com)
\version 1.34
\date 2013-12-11
\version 1.35
\date 2014-03-13
\section abstract Abstract
@ -26,14 +26,14 @@ to the GeographicLib classes. GeographicLib and NETGeographicLib is an
integrated product.
The NETGeographic project in the GeographicLib-vc10.sln file located in
\<install folder\>/GeographicLib-1.34/windows will create the NETGeographicLib
\<install folder\>/GeographicLib-1.35/windows will create the NETGeographicLib
DLL. The source code for NETGeographicLib is located in
\<install folder\>/GeographicLib-1.34/dotnet/NETGeographicLib. NETGeographicLib
\<install folder\>/GeographicLib-1.35/dotnet/NETGeographicLib. NETGeographicLib
is not available for older versions of Microsoft Visual Studio.
NETGeographicLib has been tested with C#, Managed C++, and Visual Basic.
Sample code snippets can be found in
\<install folder\>/GeographicLib-1.34/dotnet/examples.
\<install folder\>/GeographicLib-1.35/dotnet/examples.
\section differences Differences between NETGeographicLib and GeographicLib
@ -135,7 +135,7 @@ to any Visual Basic source that uses NETGeographicLib classes.
A C# sample application is provided that demonstrates NETGeographicLib classes.
The source code for the sample application is located in
\<install folder\>/GeographicLib-1.34/dotnet/Projections. The sample
\<install folder\>/GeographicLib-1.35/dotnet/Projections. The sample
application creates a tabbed dialog. Each tab provides data entry fields that
allow the user to exercise one or more NETGeographicLib classes.
@ -200,7 +200,7 @@ code using the installed library: \verbatim
project (geodesictest)
cmake_minimum_required (VERSION 2.8.7) # required for VS_DOTNET_REFERENCES
find_package (GeographicLib 1.34 REQUIRED COMPONENTS NETGeographicLib)
find_package (GeographicLib 1.35 REQUIRED COMPONENTS NETGeographicLib)
add_executable (${PROJECT_NAME} example-Geodesic-small.cpp)
set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/clr")

View File

@ -753,7 +753,7 @@ GeographicLib.GeodesicLine = {};
// Add the check for sig12 since zero length geodesics might yield
// m12 < 0. Test case was
//
// echo 20.001 0 20.001 0 | Geod -i
// echo 20.001 0 20.001 0 | GeodSolve -i
//
// In fact, we will have sig12 > pi/2 for meridional geodesic
// which is not a shortest path.

View File

@ -101,8 +101,8 @@
</blockquote>
In putting together this Google Maps demonstration, I started with
the sample code
<a href="http://code.google.com/apis/maps/documentation/javascript/examples/geometry-headings.html">
geometry-headings.html</a>.
<a href="https://developers.google.com/maps/documentation/javascript/examples/geometry-headings">
geometry-headings</a>.
</p>
<hr>
<address>Charles Karney

View File

@ -24,13 +24,18 @@
Google Maps,
WGS84 ellipsoid,
GeographicLib" />
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css"
rel="stylesheet" type="text/css" />
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
}
</style>
<script type="text/javascript"
src="http://geographiclib.sf.net/scripts/geographiclib.js">
</script>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?sensor=false">
src="https://maps.googleapis.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
var geod = GeographicLib.Geodesic.WGS84;
@ -43,7 +48,7 @@ function initialize() {
center: new google.maps.LatLng(41.3, -5.5),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
var geodesicOptions = {
strokeColor: '#0000FF',
@ -179,7 +184,7 @@ function clearPaths() {
</script>
</head>
<body onload="initialize()">
<div id="map_canvas"
<div id="map-canvas"
style="position:relative; border: 1px solid black; width:99.5%;
height:72%;">
</div>

View File

@ -1,8 +1,8 @@
// This will be overwritten by ./configure
#define GEOGRAPHICLIB_VERSION_STRING "1.34"
#define GEOGRAPHICLIB_VERSION_STRING "1.35"
#define GEOGRAPHICLIB_VERSION_MAJOR 1
#define GEOGRAPHICLIB_VERSION_MINOR 34
#define GEOGRAPHICLIB_VERSION_MINOR 35
#define GEOGRAPHICLIB_VERSION_PATCH 0
// Undefine HAVE_LONG_DOUBLE if this type is unknown to the compiler

View File

@ -21,6 +21,17 @@
# elif defined(__GXX_EXPERIMENTAL_CXX0X__)
# define STATIC_ASSERT static_assert
# elif defined(_MSC_VER) && _MSC_VER >= 1600
// For reference, here is a table of Visual Studio and _MSC_VER
// correspondences:
//
// _MSC_VER Visual Studio
// 1300 vc7
// 1311 vc7.1 (2003)
// 1400 vc8 (2005)
// 1500 vc9 (2008)
// 1600 vc10 (2010)
// 1700 vc11 (2012)
// 1800 vc12 (2013)
# define STATIC_ASSERT static_assert
# else
# define STATIC_ASSERT(cond,reason) \

View File

@ -162,8 +162,8 @@ namespace GeographicLib {
* Example of use:
* \include example-Geodesic.cpp
*
* <a href="Geod.1.html">Geod</a> is a command-line utility providing access
* to the functionality of Geodesic and GeodesicLine.
* <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility
* providing access to the functionality of Geodesic and GeodesicLine.
**********************************************************************/
class GEOGRAPHICLIB_EXPORT Geodesic {

View File

@ -25,7 +25,7 @@ namespace GeographicLib {
class GeodesicLineExact;
/**
* \brief Exact %Geodesic calculations
* \brief Exact geodesic calculations
*
* The equations for geodesics on an ellipsoid can be expressed in terms of
* incomplete elliptic integrals. The Geodesic class expands these integrals
@ -67,14 +67,14 @@ namespace GeographicLib {
* about 8 decimal digits for \e b/\e a &isin; [1/4, 4].
*
* See \ref geodellip for the formulation. See the documentation on the
* Geodesic class for additional information on the geodesics problems.
* Geodesic class for additional information on the geodesic problems.
*
* Example of use:
* \include example-GeodesicExact.cpp
*
* <a href="Geod.1.html">Geod</a> is a command-line utility providing access
* to the functionality of GeodesicExact and GeodesicLineExact (via the -E
* option).
* <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility
* providing access to the functionality of GeodesicExact and
* GeodesicLineExact (via the -E option).
**********************************************************************/
class GEOGRAPHICLIB_EXPORT GeodesicExact {

View File

@ -52,8 +52,8 @@ namespace GeographicLib {
* Example of use:
* \include example-GeodesicLine.cpp
*
* <a href="Geod.1.html">Geod</a> is a command-line utility providing access
* to the functionality of Geodesic and GeodesicLine.
* <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility
* providing access to the functionality of Geodesic and GeodesicLine.
**********************************************************************/
class GEOGRAPHICLIB_EXPORT GeodesicLine {

View File

@ -27,9 +27,9 @@ namespace GeographicLib {
* Example of use:
* \include example-GeodesicLineExact.cpp
*
* <a href="Geod.1.html">Geod</a> is a command-line utility providing access
* to the functionality of GeodesicExact and GeodesicLineExact (via the -E
* option).
* <a href="GeodSolve.1.html">GeodSolve</a> is a command-line utility
* providing access to the functionality of GeodesicExact and
* GeodesicLineExact (via the -E option).
**********************************************************************/
class GEOGRAPHICLIB_EXPORT GeodesicLineExact {

View File

@ -18,8 +18,11 @@
* Are C++11 math functions available?
**********************************************************************/
#if !defined(GEOGRAPHICLIB_CPLUSPLUS11_MATH)
# if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 8 \
&& __cplusplus >= 201103
# if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 7 \
&& __cplusplus >= 201103 && !(defined(__ANDROID__) || defined(ANDROID))
// The android toolchain uses g++ and supports C++11, but not, apparently, the
// new mathematical functions introduced with C++11. Android toolchains might
// define __ANDROID__ or ANDROID; so need to check both.
# define GEOGRAPHICLIB_CPLUSPLUS11_MATH 1
# elif defined(_MSC_VER) && _MSC_VER >= 1800
# define GEOGRAPHICLIB_CPLUSPLUS11_MATH 1

View File

@ -70,7 +70,7 @@ namespace GeographicLib {
static const int epsg01N = 32601; // EPSG code for UTM 01N
static const int epsg60N = 32660; // EPSG code for UTM 60N
static const int epsgN = 32661; // EPSG code for UPS N
static const int epsg01S = 32701; // EPSG code for UTM 01N
static const int epsg01S = 32701; // EPSG code for UTM 01S
static const int epsg60S = 32760; // EPSG code for UTM 60S
static const int epsgS = 32761; // EPSG code for UPS S
static real CentralMeridian(int zone) throw()

View File

@ -700,7 +700,7 @@ real geod_geninverse(const struct geod_geodesic* g,
/* Add the check for sig12 since zero length geodesics might yield m12 <
* 0. Test case was
*
* echo 20.001 0 20.001 0 | Geod -i
* echo 20.001 0 20.001 0 | GeodSolve -i
*
* In fact, we will have sig12 > pi/2 for meridional geodesic which is
* not a shortest path. */

View File

@ -685,7 +685,7 @@
* Add the check for sig12 since zero length geodesics might yield m12 <
* 0. Test case was
*
* echo 20.001 0 20.001 0 | Geod -i
* echo 20.001 0 20.001 0 | GeodSolve -i
*
* In fact, we will have sig12 > pi/2 for meridional geodesic which is
* not a shortest path.

View File

@ -34,7 +34,7 @@ foreach (TOOL ${TOOLS})
MAIN_DEPENDENCY ${TOOL}.pod)
add_custom_command (OUTPUT ${TOOL}.1.html
COMMAND
pod2html --noindex ${CMAKE_CURRENT_SOURCE_DIR}/${TOOL}.pod |
pod2html --title "'${TOOL}(1)'" --noindex ${CMAKE_CURRENT_SOURCE_DIR}/${TOOL}.pod |
sed -e 's%<head>%<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">%'
-e 's%<code>\\\([^<>]*\\\)\(\\\(.\\\)\)</code>%<a href="\\1.\\2.html">&</a>%'g > ${TOOL}.1.html &&
cp ${TOOL}.1.html ../doc/html-stage/

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "CARTCONVERT 1"
.TH CARTCONVERT 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH CARTCONVERT 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>CartConvert(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

View File

@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" CartConvert --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/CartConvert.1.html\n";
" http://geographiclib.sf.net/1.35/CartConvert.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "CONICPROJ 1"
.TH CONICPROJ 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH CONICPROJ 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>ConicProj(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

View File

@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" ConicProj --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/ConicProj.1.html\n";
" http://geographiclib.sf.net/1.35/ConicProj.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "GEOCONVERT 1"
.TH GEOCONVERT 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH GEOCONVERT 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>GeoConvert(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

View File

@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" GeoConvert --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/GeoConvert.1.html\n";
" http://geographiclib.sf.net/1.35/GeoConvert.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "GEODSOLVE 1"
.TH GEODSOLVE 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH GEODSOLVE 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>GeodSolve(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

View File

@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" GeodSolve --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/GeodSolve.1.html\n";
" http://geographiclib.sf.net/1.35/GeodSolve.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "GEODESICPROJ 1"
.TH GEODESICPROJ 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH GEODESICPROJ 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>GeodesicProj(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

View File

@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" GeodesicProj --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/GeodesicProj.1.html\n";
" http://geographiclib.sf.net/1.35/GeodesicProj.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "GEOIDEVAL 1"
.TH GEOIDEVAL 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH GEOIDEVAL 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>GeoidEval(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

View File

@ -10,7 +10,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" GeoidEval --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/GeoidEval.1.html\n";
" http://geographiclib.sf.net/1.35/GeoidEval.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "GRAVITY 1"
.TH GRAVITY 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH GRAVITY 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>Gravity(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

View File

@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" Gravity --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/Gravity.1.html\n";
" http://geographiclib.sf.net/1.35/Gravity.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "MAGNETICFIELD 1"
.TH MAGNETICFIELD 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH MAGNETICFIELD 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>MagneticField(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

View File

@ -10,7 +10,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" MagneticField --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/MagneticField.1.html\n";
" http://geographiclib.sf.net/1.35/MagneticField.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"

View File

@ -62,7 +62,7 @@ if HAVE_PODPROGS
$(POD2MAN) $^ > $@
.pod.1.html:
pod2html --noindex $^ | $(PODFIX) > $@
pod2html --noindex --tile "$*(1)" $^ | $(PODFIX) > $@
else

View File

@ -567,7 +567,7 @@ htmlman: $(HTMLMAN)
@HAVE_PODPROGS_TRUE@ $(POD2MAN) $^ > $@
@HAVE_PODPROGS_TRUE@.pod.1.html:
@HAVE_PODPROGS_TRUE@ pod2html --noindex $^ | $(PODFIX) > $@
@HAVE_PODPROGS_TRUE@ pod2html --noindex --tile "$*(1)" $^ | $(PODFIX) > $@
@HAVE_PODPROGS_FALSE@CartConvert.usage:
@HAVE_PODPROGS_FALSE@ $(USAGECMD)

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "PLANIMETER 1"
.TH PLANIMETER 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH PLANIMETER 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -200,7 +200,7 @@ is allowed for \fIf\fR. (Also, if \fIf\fR > 1, the flattening is set to
1/\fIf\fR.) By default, the \s-1WGS84\s0 ellipsoid is used, \fIa\fR = 6378137 m,
\&\fIf\fR = 1/298.257223563. If entering vertices as \s-1UTM/UPS\s0 or \s-1MGRS\s0
coordinates, use the default ellipsoid, since the conversion of these
coordinates to latitude and longitude uses the \s-1WGS84\s0 parameters.
coordinates to latitude and longitude always uses the \s-1WGS84\s0 parameters.
.IP "\fB\-\-comment\-delimiter\fR" 4
.IX Item "--comment-delimiter"
set the comment delimiter to \fIcommentdelim\fR (e.g., \*(L"#\*(R" or \*(L"//\*(R"). If

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>Planimeter(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
@ -56,7 +56,7 @@
<dt id="e"><b>-e</b></dt>
<dd>
<p>specify the ellipsoid via <i>a</i> <i>f</i>; the equatorial radius is <i>a</i> and the flattening is <i>f</i>. Setting <i>f</i> = 0 results in a sphere. Specify <i>f</i> &lt; 0 for a prolate ellipsoid. A simple fraction, e.g., 1/297, is allowed for <i>f</i>. (Also, if <i>f</i> &gt; 1, the flattening is set to 1/<i>f</i>.) By default, the WGS84 ellipsoid is used, <i>a</i> = 6378137 m, <i>f</i> = 1/298.257223563. If entering vertices as UTM/UPS or MGRS coordinates, use the default ellipsoid, since the conversion of these coordinates to latitude and longitude uses the WGS84 parameters.</p>
<p>specify the ellipsoid via <i>a</i> <i>f</i>; the equatorial radius is <i>a</i> and the flattening is <i>f</i>. Setting <i>f</i> = 0 results in a sphere. Specify <i>f</i> &lt; 0 for a prolate ellipsoid. A simple fraction, e.g., 1/297, is allowed for <i>f</i>. (Also, if <i>f</i> &gt; 1, the flattening is set to 1/<i>f</i>.) By default, the WGS84 ellipsoid is used, <i>a</i> = 6378137 m, <i>f</i> = 1/298.257223563. If entering vertices as UTM/UPS or MGRS coordinates, use the default ellipsoid, since the conversion of these coordinates to latitude and longitude always uses the WGS84 parameters.</p>
</dd>
<dt id="comment-delimiter"><b>--comment-delimiter</b></dt>

View File

@ -78,7 +78,7 @@ is allowed for I<f>. (Also, if I<f> E<gt> 1, the flattening is set to
1/I<f>.) By default, the WGS84 ellipsoid is used, I<a> = 6378137 m,
I<f> = 1/298.257223563. If entering vertices as UTM/UPS or MGRS
coordinates, use the default ellipsoid, since the conversion of these
coordinates to latitude and longitude uses the WGS84 parameters.
coordinates to latitude and longitude always uses the WGS84 parameters.
=item B<--comment-delimiter>

View File

@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" Planimeter --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/Planimeter.1.html\n";
" http://geographiclib.sf.net/1.35/Planimeter.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"
@ -76,7 +76,7 @@ int usage(int retval, bool brief) {
" default, the WGS84 ellipsoid is used, a = 6378137 m, f =\n"
" 1/298.257223563. If entering vertices as UTM/UPS or MGRS\n"
" coordinates, use the default ellipsoid, since the conversion of\n"
" these coordinates to latitude and longitude uses the WGS84\n"
" these coordinates to latitude and longitude always uses the WGS84\n"
" parameters.\n"
"\n"
" --comment-delimiter\n"

View File

@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "TRANSVERSEMERCATORPROJ 1"
.TH TRANSVERSEMERCATORPROJ 1 "2013-12-11" "GeographicLib 1.34" "GeographicLib Utilities"
.TH TRANSVERSEMERCATORPROJ 1 "2014-03-13" "GeographicLib 1.35" "GeographicLib Utilities"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
<title></title>
<title>TransverseMercatorProj(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

View File

@ -9,7 +9,7 @@ int usage(int retval, bool brief) {
"For full documentation type:\n"
" TransverseMercatorProj --help\n"
"or visit:\n"
" http://geographiclib.sf.net/1.34/TransverseMercatorProj.1.html\n";
" http://geographiclib.sf.net/1.35/TransverseMercatorProj.1.html\n";
else
( retval ? std::cerr : std::cout ) << "Man page:\n"
"NAME\n"

View File

@ -2,7 +2,7 @@
* \file geodesicdirect.cpp
* \brief Matlab mex file for geographic to UTM/UPS conversions
*
* Copyright (c) Charles Karney (2010-2011) <charles@karney.com> and licensed
* Copyright (c) Charles Karney (2010-2013) <charles@karney.com> and licensed
* under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/
**********************************************************************/
@ -17,11 +17,51 @@
#include <algorithm>
#include <GeographicLib/Geodesic.hpp>
#include <GeographicLib/GeodesicExact.hpp>
#include <mex.h>
using namespace std;
using namespace GeographicLib;
template<class G> void
compute(double a, double f, mwSize m, const double* geodesic,
double* latlong, double* aux) {
const double* lat1 = geodesic;
const double* lon1 = geodesic + m;
const double* azi1 = geodesic + 2*m;
const double* s12 = geodesic + 3*m;
double* lat2 = latlong;
double* lon2 = latlong + m;
double* azi2 = latlong + 2*m;
double* a12 = NULL;
double* m12 = NULL;
double* M12 = NULL;
double* M21 = NULL;
double* S12 = NULL;
if (aux) {
a12 = aux;
m12 = aux + m;
M12 = aux + 2*m;
M21 = aux + 3*m;
S12 = aux + 4*m;
}
const G g(a, f);
for (mwIndex i = 0; i < m; ++i) {
if (abs(lat1[i]) <= 90 &&
lon1[i] >= -540 && lon1[i] < 540 &&
azi1[i] >= -540 && azi1[i] < 540) {
if (aux)
a12[i] = g.Direct(lat1[i], lon1[i], azi1[i], s12[i],
lat2[i], lon2[i], azi2[i],
m12[i], M12[i], M21[i], S12[i]);
else
g.Direct(lat1[i], lon1[i], azi1[i], s12[i],
lat2[i], lon2[i], azi2[i]);
}
}
}
void mexFunction( int nlhs, mxArray* plhs[],
int nrhs, const mxArray* prhs[] ) {
@ -54,48 +94,22 @@ void mexFunction( int nlhs, mxArray* plhs[],
mwSize m = mxGetM(prhs[0]);
double* lat1 = mxGetPr(prhs[0]);
double* lon1 = lat1 + m;
double* azi1 = lat1 + 2*m;
double* s12 = lat1 + 3*m;
const double* geodesic = mxGetPr(prhs[0]);
plhs[0] = mxCreateDoubleMatrix(m, 3, mxREAL);
double* lat2 = mxGetPr(plhs[0]);
std::fill(lat2, lat2 + 3*m, Math::NaN<double>());
double* lon2 = lat2 + m;
double* azi2 = lat2 + 2*m;
double* a12 = NULL;
double* m12 = NULL;
double* M12 = NULL;
double* M21 = NULL;
double* S12 = NULL;
bool aux = nlhs == 2;
double* latlong = mxGetPr(plhs[0] = mxCreateDoubleMatrix(m, 3, mxREAL));
std::fill(latlong, latlong + 3*m, Math::NaN<double>());
if (aux) {
plhs[1] = mxCreateDoubleMatrix(m, 5, mxREAL);
a12 = mxGetPr(plhs[1]);
std::fill(a12, a12 + 5*m, Math::NaN<double>());
m12 = a12 + m;
M12 = a12 + 2*m;
M21 = a12 + 3*m;
S12 = a12 + 4*m;
}
double* aux =
nlhs == 2 ? mxGetPr(plhs[1] = mxCreateDoubleMatrix(m, 5, mxREAL)) :
NULL;
if (aux)
std::fill(aux, aux + 5*m, Math::NaN<double>());
try {
const Geodesic g(a, f);
for (mwIndex i = 0; i < m; ++i) {
if (abs(lat1[i]) <= 90 &&
lon1[i] >= -540 && lon1[i] < 540 &&
azi1[i] >= -540 && azi1[i] < 540) {
if (aux)
a12[i] = g.Direct(lat1[i], lon1[i], azi1[i], s12[i],
lat2[i], lon2[i], azi2[i], m12[i],
M12[i], M21[i], S12[i]);
else
g.Direct(lat1[i], lon1[i], azi1[i], s12[i],
lat2[i], lon2[i], azi2[i]);
}
}
if (std::abs(f) <= 0.02)
compute<Geodesic>(a, f, m, geodesic, latlong, aux);
else
compute<GeodesicExact>(a, f, m, geodesic, latlong, aux);
}
catch (const std::exception& e) {
mexErrMsgTxt(e.what());

View File

@ -2,7 +2,7 @@
* \file geodesicinverse.cpp
* \brief Matlab mex file for geographic to UTM/UPS conversions
*
* Copyright (c) Charles Karney (2010-2011) <charles@karney.com> and licensed
* Copyright (c) Charles Karney (2010-2013) <charles@karney.com> and licensed
* under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/
**********************************************************************/
@ -17,11 +17,50 @@
#include <algorithm>
#include <GeographicLib/Geodesic.hpp>
#include <GeographicLib/GeodesicExact.hpp>
#include <mex.h>
using namespace std;
using namespace GeographicLib;
template<class G> void
compute(double a, double f, mwSize m, const double* latlong,
double* geodesic, double* aux) {
const double* lat1 = latlong;
const double* lon1 = latlong + m;
const double* lat2 = latlong + 2*m;
const double* lon2 = latlong + 3*m;
double* azi1 = geodesic;
double* azi2 = geodesic + m;
double* s12 = geodesic + 2*m;
double* a12 = NULL;
double* m12 = NULL;
double* M12 = NULL;
double* M21 = NULL;
double* S12 = NULL;
if (aux) {
a12 = aux;
m12 = aux + m;
M12 = aux + 2*m;
M21 = aux + 3*m;
S12 = aux + 4*m;
}
const G g(a, f);
for (mwIndex i = 0; i < m; ++i) {
if (abs(lat1[i]) <= 90 && lon1[i] >= -540 && lon1[i] < 540 &&
abs(lat2[i]) <= 90 && lon2[i] >= -540 && lon2[i] < 540) {
if (aux)
a12[i] = g.Inverse(lat1[i], lon1[i], lat2[i], lon2[i],
s12[i], azi1[i], azi2[i],
m12[i], M12[i], M21[i], S12[i]);
else
g.Inverse(lat1[i], lon1[i], lat2[i], lon2[i],
s12[i], azi1[i], azi2[i]);
}
}
}
void mexFunction( int nlhs, mxArray* plhs[],
int nrhs, const mxArray* prhs[] ) {
@ -54,47 +93,22 @@ void mexFunction( int nlhs, mxArray* plhs[],
mwSize m = mxGetM(prhs[0]);
double* lat1 = mxGetPr(prhs[0]);
double* lon1 = lat1 + m;
double* lat2 = lat1 + 2*m;
double* lon2 = lat1 + 3*m;
const double* latlong = mxGetPr(prhs[0]);
plhs[0] = mxCreateDoubleMatrix(m, 3, mxREAL);
double* azi1 = mxGetPr(plhs[0]);
std::fill(azi1, azi1 + 3*m, Math::NaN<double>());
double* azi2 = azi1 + m;
double* s12 = azi1 + 2*m;
double* a12 = NULL;
double* m12 = NULL;
double* M12 = NULL;
double* M21 = NULL;
double* S12 = NULL;
bool aux = nlhs == 2;
double* geodesic = mxGetPr(plhs[0] = mxCreateDoubleMatrix(m, 3, mxREAL));
std::fill(geodesic, geodesic + 3*m, Math::NaN<double>());
if (aux) {
plhs[1] = mxCreateDoubleMatrix(m, 5, mxREAL);
a12 = mxGetPr(plhs[1]);
std::fill(a12, a12 + 5*m, Math::NaN<double>());
m12 = a12 + m;
M12 = a12 + 2*m;
M21 = a12 + 3*m;
S12 = a12 + 4*m;
}
double* aux =
nlhs == 2 ? mxGetPr(plhs[1] = mxCreateDoubleMatrix(m, 5, mxREAL)) :
NULL;
if (aux)
std::fill(aux, aux + 5*m, Math::NaN<double>());
try {
const Geodesic g(a, f);
for (mwIndex i = 0; i < m; ++i) {
if (abs(lat1[i]) <= 90 && lon1[i] >= -540 && lon1[i] < 540 &&
abs(lat2[i]) <= 90 && lon2[i] >= -540 && lon2[i] < 540) {
if (aux)
a12[i] = g.Inverse(lat1[i], lon1[i], lat2[i], lon2[i],
s12[i], azi1[i], azi2[i],
m12[i], M12[i], M21[i], S12[i]);
else
g.Inverse(lat1[i], lon1[i], lat2[i], lon2[i],
s12[i], azi1[i], azi2[i]);
}
}
if (std::abs(f) <= 0.02)
compute<Geodesic>(a, f, m, latlong, geodesic, aux);
else
compute<GeodesicExact>(a, f, m, latlong, geodesic, aux);
}
catch (const std::exception& e) {
mexErrMsgTxt(e.what());

View File

@ -2,7 +2,7 @@
* \file geodesicline.cpp
* \brief Matlab mex file for geographic to UTM/UPS conversions
*
* Copyright (c) Charles Karney (2010-2011) <charles@karney.com> and licensed
* Copyright (c) Charles Karney (2010-2013) <charles@karney.com> and licensed
* under the MIT/X11 License. For more information, see
* http://geographiclib.sourceforge.net/
**********************************************************************/
@ -16,11 +16,40 @@
// -lGeographic geodesicline.cpp
#include <GeographicLib/GeodesicLine.hpp>
#include <GeographicLib/GeodesicLineExact.hpp>
#include <mex.h>
using namespace std;
using namespace GeographicLib;
template<class G, class L> void
compute(double a, double f, double lat1, double lon1, double azi1,
mwSize m, const double* s12, double* latlong, double* aux) {
double* lat2 = latlong;
double* lon2 = latlong + m;
double* azi2 = latlong + 2*m;
double* a12 = NULL;
double* m12 = NULL;
double* M12 = NULL;
double* M21 = NULL;
double* S12 = NULL;
if (aux) {
a12 = aux;
m12 = aux + m;
M12 = aux + 2*m;
M21 = aux + 3*m;
S12 = aux + 4*m;
}
const G g(a, f);
const L l(g, lat1, lon1, azi1);
for (mwIndex i = 0; i < m; ++i)
if (aux)
a12[i] = l.Position(s12[i], lat2[i], lon2[i], azi2[i],
m12[i], M12[i], M21[i], S12[i]);
else
l.Position(s12[i], lat2[i], lon2[i], azi2[i]);
}
void mexFunction( int nlhs, mxArray* plhs[],
int nrhs, const mxArray* prhs[] ) {
@ -70,41 +99,24 @@ void mexFunction( int nlhs, mxArray* plhs[],
double* s12 = mxGetPr(prhs[3]);
plhs[0] = mxCreateDoubleMatrix(m, 3, mxREAL);
double* lat2 = mxGetPr(plhs[0]);
double* lon2 = lat2 + m;
double* azi2 = lat2 + 2*m;
double* a12 = NULL;
double* m12 = NULL;
double* M12 = NULL;
double* M21 = NULL;
double* S12 = NULL;
bool aux = nlhs == 2;
if (aux) {
plhs[1] = mxCreateDoubleMatrix(m, 5, mxREAL);
a12 = mxGetPr(plhs[1]);
m12 = a12 + m;
M12 = a12 + 2*m;
M21 = a12 + 3*m;
S12 = a12 + 4*m;
}
double* latlong = mxGetPr(plhs[0] = mxCreateDoubleMatrix(m, 3, mxREAL));
double* aux =
nlhs == 2 ? mxGetPr(plhs[1] = mxCreateDoubleMatrix(m, 5, mxREAL)) :
NULL;
try {
const Geodesic g(a, f);
if (!(abs(lat1) <= 90))
throw GeographicErr("Invalid latitude");
if (!(lon1 >= -540 || lon1 < 540))
throw GeographicErr("Invalid longitude");
if (!(azi1 >= -540 || azi1 < 540))
throw GeographicErr("Invalid azimuth");
const GeodesicLine l(g, lat1, lon1, azi1);
for (mwIndex i = 0; i < m; ++i)
if (aux)
a12[i] = l.Position(s12[i], lat2[i], lon2[i], azi2[i],
m12[i], M12[i], M21[i], S12[i]);
else
l.Position(s12[i], lat2[i], lon2[i], azi2[i]);
if (std::abs(f) <= 0.02)
compute<Geodesic, GeodesicLine>
(a, f, lat1, lon1, azi1, m, s12, latlong, aux);
else
compute<GeodesicExact, GeodesicLineExact>
(a, f, lat1, lon1, azi1, m, s12, latlong, aux);
}
catch (const std::exception& e) {
mexErrMsgTxt(e.what());

82
gtsam/3rdparty/GeographicLib/pom.xml vendored Normal file
View File

@ -0,0 +1,82 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.sri.vt.majic</groupId>
<artifactId>majic-parent</artifactId>
<version>0.1.9-SNAPSHOT</version>
</parent>
<groupId>com.sri.vt</groupId>
<artifactId>geographiclib</artifactId>
<version>1.35-SNAPSHOT</version>
<packaging>majic-cmake</packaging>
<name>GeographicLib</name>
<profiles>
<profile>
<id>os-windows</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<properties>
<build.netgeographiclib>ON</build.netgeographiclib>
</properties>
</profile>
<profile>
<id>os-linux</id>
<activation>
<os>
<family>Linux</family>
</os>
</activation>
<properties>
<build.netgeographiclib>OFF</build.netgeographiclib>
</properties>
</profile>
</profiles>
<repositories>
<repository>
<id>artifactory-vt</id>
<name>SRI VT Repository</name>
<url>https://artifactory-vt.sarnoff.internal/artifactory/repo</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>com.sri.vt.majic</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>default-cmake-configure</id>
<configuration>
<options>
<COMMON_INSTALL_PATH>ON</COMMON_INSTALL_PATH>
<GEOGRAPHICLIB_LIB_TYPE>BOTH</GEOGRAPHICLIB_LIB_TYPE>
<MATLAB_COMPILER>OFF</MATLAB_COMPILER>
<GEOGRAPHICLIB_DOCUMENTATION>OFF</GEOGRAPHICLIB_DOCUMENTATION>
<BUILD_NETGEOGRAPHICLIB>${build.netgeographiclib}</BUILD_NETGEOGRAPHICLIB>
</options>
</configuration>
</execution>
<execution>
<id>default-cmake-test</id>
<configuration>
<configs>
<config>Release</config>
</configs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -269,21 +269,19 @@ namespace GeographicLib {
}
void UTMUPS::DecodeEPSG(int epsg, int& zone, bool& northp) throw() {
northp = false;
if (epsg >= epsg01N && epsg <= epsg60N) {
zone = epsg - epsg01N + 1;
zone = (epsg - epsg01N) + MINUTMZONE;
northp = true;
} else if (epsg == epsgN) {
zone = UPS;
northp = true;
} else if (epsg >= epsg01S && epsg <= epsg60S) {
zone = epsg - epsg01S + 1;
northp = false;
zone = (epsg - epsg01S) + MINUTMZONE;
} else if (epsg == epsgS) {
zone = UPS;
northp = false;
} else {
zone = INVALID;
northp = false;
}
}
@ -292,7 +290,7 @@ namespace GeographicLib {
if (zone == UPS)
epsg = epsgS;
else if (zone >= MINUTMZONE && zone <= MAXUTMZONE)
epsg = epsg + (zone - MINUTMZONE) + epsg01S;
epsg = (zone - MINUTMZONE) + epsg01S;
if (epsg >= 0 && northp)
epsg += epsgN - epsgS;
return epsg;

View File

@ -22,6 +22,12 @@ foreach (TOOL ${TOOLS})
endforeach ()
if (MSVC OR CMAKE_CONFIGURATION_TYPES)
# Add _d suffix for your debug versions of the tools
set_target_properties (${TOOLS} PROPERTIES
DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
endif ()
if (MSVC)
get_target_property (_LIBTYPE ${PROJECT_LIBRARIES} TYPE)
if (_LIBTYPE STREQUAL "SHARED_LIBRARY")
@ -62,21 +68,23 @@ enable_testing ()
# Here are the tests. They consists of calling the various tools with
# --input-string and matching the output against regular expressions.
add_test (GeoConvert0 GeoConvert -p -3 -m --input-string "33.3 44.4")
add_test (NAME GeoConvert0
COMMAND GeoConvert -p -3 -m --input-string "33.3 44.4")
set_tests_properties (GeoConvert0
PROPERTIES PASS_REGULAR_EXPRESSION "38SMB4484")
add_test (GeoConvert1 GeoConvert -d --input-string "38smb")
add_test (NAME GeoConvert1 COMMAND GeoConvert -d --input-string "38smb")
set_tests_properties (GeoConvert1
PROPERTIES PASS_REGULAR_EXPRESSION "32d59'14\\.1\"N 044d27'53\\.4\"E")
add_test (GeoConvert2 GeoConvert -p -2 --input-string "30d30'30\" 30.50833")
add_test (NAME GeoConvert2
COMMAND GeoConvert -p -2 --input-string "30d30'30\" 30.50833")
set_tests_properties (GeoConvert2
PROPERTIES PASS_REGULAR_EXPRESSION "30\\.508 30\\.508")
add_test (GeoConvert3 GeoConvert --junk)
add_test (NAME GeoConvert3 COMMAND GeoConvert --junk)
set_tests_properties (GeoConvert3 PROPERTIES WILL_FAIL ON)
add_test (GeoConvert4 GeoConvert --input-string garbage)
add_test (NAME GeoConvert4 COMMAND GeoConvert --input-string garbage)
set_tests_properties (GeoConvert4 PROPERTIES WILL_FAIL ON)
# Check fix for DMS::Decode bug fixed on 2011-03-22
add_test (GeoConvert5 GeoConvert --input-string "5d. 0")
add_test (NAME GeoConvert5 COMMAND GeoConvert --input-string "5d. 0")
set_tests_properties (GeoConvert5 PROPERTIES WILL_FAIL ON)
if (NOT (MSVC AND MSVC_VERSION MATCHES "1[78].."))
# Check fix for DMS::Decode double rounding bug fixed on 2012-11-15
@ -84,48 +92,49 @@ if (NOT (MSVC AND MSVC_VERSION MATCHES "1[78].."))
# http://connect.microsoft.com/VisualStudio/feedback/details/776287
# OK to skip this test for these compilers because this is a question
# of accuracy of the least significant bit.
add_test (GeoConvert6 GeoConvert -p 9
add_test (NAME GeoConvert6 COMMAND GeoConvert -p 9
--input-string "0 179.99999999999998578")
set_tests_properties (GeoConvert6
PROPERTIES PASS_REGULAR_EXPRESSION "179\\.9999999999999[7-9]")
endif ()
add_test (GeodSolve0
add_test (NAME GeodSolve0 COMMAND
GeodSolve -i -p 0 --input-string "40.6 -73.8 49d01'N 2d33'E")
set_tests_properties (GeodSolve0
PROPERTIES PASS_REGULAR_EXPRESSION "53\\.47022 111\\.59367 5853226")
add_test (GeodSolve1
add_test (NAME GeodSolve1 COMMAND
GeodSolve -p 0 --input-string "40d38'23\"N 073d46'44\"W 53d30' 5850e3")
set_tests_properties (GeodSolve1
PROPERTIES PASS_REGULAR_EXPRESSION "49\\.01467 2\\.56106 111\\.62947")
# Check fix for antipodal prolate bug found 2010-09-04
add_test (GeodSolve2
add_test (NAME GeodSolve2 COMMAND
GeodSolve -i -p 0 -e 6.4e6 -1/150 --input-string "0.07476 0 -0.07476 180")
set_tests_properties (GeodSolve2
PROPERTIES PASS_REGULAR_EXPRESSION "90\\.00078 90\\.00078 20106193")
# Another check for similar bug
add_test (GeodSolve3
add_test (NAME GeodSolve3 COMMAND
GeodSolve -i -p 0 -e 6.4e6 -1/150 --input-string "0.1 0 -0.1 180")
set_tests_properties (GeodSolve3
PROPERTIES PASS_REGULAR_EXPRESSION "90\\.00105 90\\.00105 20106193")
# Check fix for short line bug found 2010-05-21
add_test (GeodSolve4
add_test (NAME GeodSolve4 COMMAND
GeodSolve -i --input-string "36.493349428792 0 36.49334942879201 .0000008")
set_tests_properties (GeodSolve4
PROPERTIES PASS_REGULAR_EXPRESSION ".* .* 0\\.072")
# Check fix for point2=pole bug found 2010-05-03 (but only with long double)
add_test (GeodSolve5 GeodSolve -p 0 --input-string "0.01777745589997 30 0 10e6")
add_test (NAME GeodSolve5
COMMAND GeodSolve -p 0 --input-string "0.01777745589997 30 0 10e6")
set_tests_properties (GeodSolve5
PROPERTIES PASS_REGULAR_EXPRESSION
"90\\.00000 -150\\.00000 -180\\.00000;90\\.00000 30\\.00000 0\\.00000")
# 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).
add_test (GeodSolve6 GeodSolve -i --input-string
add_test (NAME GeodSolve6 COMMAND GeodSolve -i --input-string
"88.202499451857 0 -88.202499451857 179.981022032992859592")
add_test (GeodSolve7 GeodSolve -i --input-string
add_test (NAME GeodSolve7 COMMAND GeodSolve -i --input-string
"89.262080389218 0 -89.262080389218 179.992207982775375662")
add_test (GeodSolve8 GeodSolve -i --input-string
add_test (NAME GeodSolve8 COMMAND GeodSolve -i --input-string
"89.333123580033 0 -89.333123580032997687 179.99295812360148422")
set_tests_properties (GeodSolve6
PROPERTIES PASS_REGULAR_EXPRESSION ".* .* 20003898.214")
@ -135,39 +144,42 @@ set_tests_properties (GeodSolve8
PROPERTIES PASS_REGULAR_EXPRESSION ".* .* 20003926.881")
# Check fix for volatile x bug found 2011-06-25 (gcc 4.4.4 x86 -O3)
add_test (GeodSolve9 GeodSolve -i --input-string
add_test (NAME GeodSolve9 COMMAND GeodSolve -i --input-string
"56.320923501171 0 -56.320923501171 179.664747671772880215")
set_tests_properties (GeodSolve9
PROPERTIES PASS_REGULAR_EXPRESSION ".* .* 19993558.287")
# Check fix for adjust tol1_ bug found 2011-06-25 (Visual Studio 10 rel + debug)
add_test (GeodSolve10 GeodSolve -i --input-string
add_test (NAME GeodSolve10 COMMAND GeodSolve -i --input-string
"52.784459512564 0 -52.784459512563990912 179.634407464943777557")
set_tests_properties (GeodSolve10
PROPERTIES PASS_REGULAR_EXPRESSION ".* .* 19991596.095")
# Check fix for bet2 = -bet1 bug found 2011-06-25 (Visual Studio 10 rel + debug)
add_test (GeodSolve11 GeodSolve -i --input-string
add_test (NAME GeodSolve11 COMMAND GeodSolve -i --input-string
"48.522876735459 0 -48.52287673545898293 179.599720456223079643")
set_tests_properties (GeodSolve11
PROPERTIES PASS_REGULAR_EXPRESSION ".* .* 19989144.774")
# Check fix for inverse geodesics on extreme prolate/oblate ellipsoids
# Reported 2012-08-29 Stefan Guenther <stefan.gunther@embl.de>; fixed 2012-10-07
add_test (GeodSolve12
add_test (NAME GeodSolve12 COMMAND
GeodSolve -i -e 89.8 -1.83 -p 0 --input-string "0 0 -10 160")
add_test (GeodSolve13
add_test (NAME GeodSolve13 COMMAND
GeodSolve -i -e 89.8 -1.83 -p 0 --input-string "0 0 -10 160" -E)
set_tests_properties (GeodSolve12 GeodSolve13
PROPERTIES PASS_REGULAR_EXPRESSION "120\\.27.* 105\\.15.* 267")
# Check fix for pole-encircling bug found 2011-03-16
add_test (Planimeter0 Planimeter --input-string "89 0;89 90;89 180;89 270")
add_test (Planimeter1
add_test (NAME Planimeter0
COMMAND Planimeter --input-string "89 0;89 90;89 180;89 270")
add_test (NAME Planimeter1 COMMAND
Planimeter -r --input-string "-89 0;-89 90;-89 180;-89 270")
add_test (Planimeter2 Planimeter --input-string "0 -1;-1 0;0 1;1 0")
add_test (Planimeter3 Planimeter --input-string "90 0; 0 0; 0 90")
add_test (Planimeter4 Planimeter -l --input-string "90 0; 0 0; 0 90")
add_test (NAME Planimeter2
COMMAND Planimeter --input-string "0 -1;-1 0;0 1;1 0")
add_test (NAME Planimeter3 COMMAND Planimeter --input-string "90 0; 0 0; 0 90")
add_test (NAME Planimeter4
COMMAND Planimeter -l --input-string "90 0; 0 0; 0 90")
set_tests_properties (Planimeter0
PROPERTIES PASS_REGULAR_EXPRESSION
"4 631819\\.8745[0-9]+ 2495230567[78]\\.[0-9]+")
@ -182,56 +194,65 @@ set_tests_properties (Planimeter3
set_tests_properties (Planimeter4
PROPERTIES PASS_REGULAR_EXPRESSION "3 20020719\\.[0-9]+")
# Check fix for Planimeter pole crossing bug found 2011-06-24
add_test (Planimeter5 Planimeter --input-string "89,0.1;89,90.1;89,-179.9")
add_test (NAME Planimeter5
COMMAND Planimeter --input-string "89,0.1;89,90.1;89,-179.9")
set_tests_properties (Planimeter5
PROPERTIES PASS_REGULAR_EXPRESSION
"3 539297\\.[0-9]+ 1247615283[89]\\.[0-9]+")
# Check fix for Planimeter lon12 rounding bug found 2012-12-03
add_test (Planimeter6 Planimeter --input-string "9 -0.00000000000001;9 180;9 0")
add_test (Planimeter7 Planimeter --input-string "9 0.00000000000001;9 0;9 180")
add_test (Planimeter8 Planimeter --input-string "9 0.00000000000001;9 180;9 0")
add_test (Planimeter9 Planimeter --input-string "9 -0.00000000000001;9 0;9 180")
add_test (NAME Planimeter6
COMMAND Planimeter --input-string "9 -0.00000000000001;9 180;9 0")
add_test (NAME Planimeter7
COMMAND Planimeter --input-string "9 0.00000000000001;9 0;9 180")
add_test (NAME Planimeter8
COMMAND Planimeter --input-string "9 0.00000000000001;9 180;9 0")
add_test (NAME Planimeter9
COMMAND Planimeter --input-string "9 -0.00000000000001;9 0;9 180")
set_tests_properties (Planimeter6 Planimeter7 Planimeter8 Planimeter9
PROPERTIES PASS_REGULAR_EXPRESSION "3 36026861\\.[0-9]+ -?0.0[0-9]+")
# Check fix for AlbersEqualArea::Reverse bug found 2011-05-01
add_test (ConicProj0
add_test (NAME ConicProj0 COMMAND
ConicProj -a 40d58 39d56 -l 77d45W -r --input-string "220e3 -52e3")
set_tests_properties (ConicProj0
PROPERTIES PASS_REGULAR_EXPRESSION
"39\\.95[0-9]+ -75\\.17[0-9]+ 1\\.67[0-9]+ 0\\.99[0-9]+")
# Check fix for AlbersEqualArea prolate bug found 2012-05-15
add_test (ConicProj1
add_test (NAME ConicProj1 COMMAND
ConicProj -a 0 0 -e 6.4e6 -0.5 -r --input-string "0 8605508")
set_tests_properties (ConicProj1
PROPERTIES PASS_REGULAR_EXPRESSION "^85\\.00")
# Check fix for LambertConformalConic::Forward bug found 2012-07-14
add_test (ConicProj2 ConicProj -c -30 -30 --input-string "-30 0")
add_test (NAME ConicProj2 COMMAND ConicProj -c -30 -30 --input-string "-30 0")
set_tests_properties (ConicProj2
PROPERTIES PASS_REGULAR_EXPRESSION "^-?0\\.0+ -?0\\.0+ -?0\\.0+ 1\\.0+")
# Check fixes for LambertConformalConic::Reverse overflow bugs found 2012-07-14
add_test (ConicProj3 ConicProj -r -c 0 0 --input-string "1113195 -1e10")
add_test (NAME ConicProj3
COMMAND ConicProj -r -c 0 0 --input-string "1113195 -1e10")
set_tests_properties (ConicProj3
PROPERTIES PASS_REGULAR_EXPRESSION "^-90\\.0+ 10\\.00[0-9]+ ")
add_test (ConicProj4 ConicProj -r -c 0 0 --input-string "1113195 inf")
add_test (NAME ConicProj4
COMMAND ConicProj -r -c 0 0 --input-string "1113195 inf")
set_tests_properties (ConicProj4
PROPERTIES PASS_REGULAR_EXPRESSION "^90\\.0+ 10\\.00[0-9]+ ")
add_test (ConicProj5 ConicProj -r -c 45 45 --input-string "0 -1e100")
add_test (NAME ConicProj5
COMMAND ConicProj -r -c 45 45 --input-string "0 -1e100")
set_tests_properties (ConicProj5
PROPERTIES PASS_REGULAR_EXPRESSION "^-90\\.0+ -?0\\.00[0-9]+ ")
add_test (ConicProj6 ConicProj -r -c 45 45 --input-string "0 -inf")
add_test (NAME ConicProj6 COMMAND ConicProj -r -c 45 45 --input-string "0 -inf")
set_tests_properties (ConicProj6
PROPERTIES PASS_REGULAR_EXPRESSION "^-90\\.0+ -?0\\.00[0-9]+ ")
add_test (ConicProj7 ConicProj -r -c 90 90 --input-string "0 -1e150")
add_test (NAME ConicProj7
COMMAND ConicProj -r -c 90 90 --input-string "0 -1e150")
set_tests_properties (ConicProj7
PROPERTIES PASS_REGULAR_EXPRESSION "^-90\\.0+ -?0\\.00[0-9]+ ")
add_test (ConicProj8 ConicProj -r -c 90 90 --input-string "0 -inf")
add_test (NAME ConicProj8 COMMAND ConicProj -r -c 90 90 --input-string "0 -inf")
set_tests_properties (ConicProj8
PROPERTIES PASS_REGULAR_EXPRESSION "^-90\\.0+ -?0\\.00[0-9]+ ")
add_test (CartConvert0
add_test (NAME CartConvert0 COMMAND
CartConvert -e 6.4e6 1/100 -r --input-string "10e3 0 1e3")
add_test (CartConvert1
add_test (NAME CartConvert1 COMMAND
CartConvert -e 6.4e6 -1/100 -r --input-string "1e3 0 10e3")
set_tests_properties (CartConvert0
PROPERTIES PASS_REGULAR_EXPRESSION
@ -242,60 +263,60 @@ set_tests_properties (CartConvert1
# Test fix to bad meridian convergence at pole with
# TransverseMercatorExact found 2013-06-26
add_test (TransverseMercatorProj0
add_test (NAME TransverseMercatorProj0 COMMAND
TransverseMercatorProj -k 1 --input-string "90 75")
set_tests_properties (TransverseMercatorProj0
PROPERTIES PASS_REGULAR_EXPRESSION
"^0\\.0+ 10001965\\.7293[0-9]+ 75\\.0+ 1\\.0+")
# Test fix to bad scale at pole with TransverseMercatorExact
# found 2013-06-30 (quarter meridian = 10001965.7293127228128889202m)
add_test (TransverseMercatorProj1
add_test (NAME TransverseMercatorProj1 COMMAND
TransverseMercatorProj -k 1 -r --input-string "0 10001965.7293127228")
set_tests_properties (TransverseMercatorProj1
PROPERTIES PASS_REGULAR_EXPRESSION "90\\.0+ 0\\.0+ 0\\.0+ (1\\.0+|0\\.9999+)")
if (EXISTS ${GEOGRAPHICLIB_DATA}/geoids/egm96-5.pgm)
# Check fix for single-cell cache bug found 2010-11-23
add_test (GeoidEval0 GeoidEval -n egm96-5 --input-string "0d1 0d1;0d4 0d4")
add_test (NAME GeoidEval0
COMMAND GeoidEval -n egm96-5 --input-string "0d1 0d1;0d4 0d4")
set_tests_properties (GeoidEval0
PROPERTIES PASS_REGULAR_EXPRESSION "^17\\.1[56]..
17\\.1[45]..")
PROPERTIES PASS_REGULAR_EXPRESSION "^17\\.1[56]..\n17\\.1[45]..")
endif ()
if (EXISTS ${GEOGRAPHICLIB_DATA}/magnetic/wmm2010.wmm)
# Test case from WMM2010_Report.pdf, Sec 1.5, pp 14-15:
# t = 2012.5, lat = -80, lon = 240, h = 100e3
add_test (MagneticField0
add_test (NAME MagneticField0 COMMAND
MagneticField -n wmm2010 -p 10 -r --input-string "2012.5 -80 240 100e3")
add_test (MagneticField1
add_test (NAME MagneticField1 COMMAND
MagneticField -n wmm2010 -p 10 -r -t 2012.5 --input-string "-80 240 100e3")
add_test (MagneticField2
add_test (NAME MagneticField2 COMMAND
MagneticField -n wmm2010 -p 10 -r -c 2012.5 -80 100e3 --input-string "240")
set_tests_properties (MagneticField0
PROPERTIES PASS_REGULAR_EXPRESSION
" 5535\\.5249148687 14765\\.3703243050 -50625\\.9305478794 .*
.* 20\\.4904268023 1\\.0272592716 83\\.5313962281 ")
" 5535\\.5249148687 14765\\.3703243050 -50625\\.9305478794 .*\n.* 20\\.4904268023 1\\.0272592716 83\\.5313962281 ")
set_tests_properties (MagneticField1
PROPERTIES PASS_REGULAR_EXPRESSION
" 5535\\.5249148687 14765\\.3703243050 -50625\\.9305478794 .*
.* 20\\.4904268023 1\\.0272592716 83\\.5313962281 ")
" 5535\\.5249148687 14765\\.3703243050 -50625\\.9305478794 .*\n.* 20\\.4904268023 1\\.0272592716 83\\.5313962281 ")
set_tests_properties (MagneticField2
PROPERTIES PASS_REGULAR_EXPRESSION
" 5535\\.5249148687 14765\\.3703243050 -50625\\.9305478794 .*
.* 20\\.4904268023 1\\.0272592716 83\\.5313962281 ")
" 5535\\.5249148687 14765\\.3703243050 -50625\\.9305478794 .*\n.* 20\\.4904268023 1\\.0272592716 83\\.5313962281 ")
endif ()
if (EXISTS ${GEOGRAPHICLIB_DATA}/gravity/egm2008.egm)
# Verify no overflow at poles with high degree model
add_test (Gravity0 Gravity -n egm2008 -p 6 --input-string "90 110 0")
add_test (NAME Gravity0
COMMAND Gravity -n egm2008 -p 6 --input-string "90 110 0")
set_tests_properties (Gravity0
PROPERTIES PASS_REGULAR_EXPRESSION "-0\\.000146 0\\.000078 -9\\.832294")
# Check fix for invR bug in GravityCircle found by Mathieu Peyrega on
# 2013-04-09
add_test (Gravity1 Gravity -n egm2008 -A -c -18 4000 --input-string "-86")
add_test (NAME Gravity1
COMMAND Gravity -n egm2008 -A -c -18 4000 --input-string "-86")
set_tests_properties (Gravity1
PROPERTIES PASS_REGULAR_EXPRESSION "-7\\.438 1\\.305 -1\\.563")
add_test (Gravity2 Gravity -n egm2008 -D -c -18 4000 --input-string "-86")
add_test (NAME Gravity2
COMMAND Gravity -n egm2008 -D -c -18 4000 --input-string "-86")
set_tests_properties (Gravity2
PROPERTIES PASS_REGULAR_EXPRESSION "7\\.404 -6\\.168 7\\.616")
endif ()